/* Tasks */
.tasks-headerRow {
  align-items: center;
  gap: 16px;
}

.tasks-headerRow .headerIconBox {
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #ffffff;
  border-radius: 14px;
}

.tasks-headerRow .headerIconBox i {
  font-size: 1.8rem;
}

.tasks-headerText {
  gap: 4px;
}

.tasks-headerText .tasks-subtitle {
  color: #475569;
  font-size: 14px;
}

.tasks-toolbarRow {
  padding: 10px 12px;
  gap: 10px;
  align-items: center;
}

.tasks-toolbarRow sl-button::part(base) {
  min-width: 120px;
}

.tasks-summaryRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tasks-summaryCard {
  background: linear-gradient(135deg, #2563eb, #6366f1);
  border-radius: 16px;
  padding: 16px;
  color: #ffffff;
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tasks-summaryCard:nth-child(2) {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}

.tasks-summaryCard:nth-child(3) {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.tasks-summaryCard strong {
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
}

.tasks-summaryCard span {
  font-size: 13px;
  opacity: 0.9;
}

.tasks-filtersCard {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tasks-filtersCard .tasks-filter-buttons {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.tasks-viewSwitch {
  margin-top: 16px;
  display: inline-flex;
}

.tasks-contentCard {
  margin-top: 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  min-height: 320px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.tasks-wizard-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 0 4px;
}

.tasks-wizard-icon {
  font-size: 24px;
  color: #1d4ed8;
}

.tasks-wizard-labelText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tasks-wizard-labelTitle {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.tasks-wizard-labelSubtitle {
  font-size: 13px;
  color: #64748b;
}

.tasks-wizard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.tasks-wizard-stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 0 32px 8px;
  --tasks-progress: 0;
}

.tasks-wizard-stepper::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 40px;
  right: 40px;
  height: 4px;
  background: linear-gradient(90deg, #dbeafe, #bfdbfe);
  border-radius: 2px;
  opacity: 0.7;
}

.tasks-stepper-progress {
  content: "";
  position: absolute;
  top: 19px;
  left: 40px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  border-radius: 2px;
  transition: width 0.25s ease;
  width: var(--tasks-progress);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.tasks-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 11px;
  padding: 0;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tasks-step:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tasks-step__index {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: #ffffff;
}

.tasks-step.is-active {
  color: #1d4ed8;
}

.tasks-step.is-active .tasks-step__index {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.tasks-step.is-complete {
  color: #0ea5e9;
}

.tasks-step.is-complete .tasks-step__index {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(14, 165, 233, 0.25);
}

.tasks-wizard-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tasks-wizard-body .wizard-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tasks-wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
}

.tasks-table th,
.tasks-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.tasks-table tbody tr:hover {
  background: #f1f5f9;
}

.tasks-empty {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
}

.tasks-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.tasks-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  margin: 0 4px 4px 0;
}

sl-tag.tasks-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

sl-tag.tasks-pill .tasks-pill-text {
  line-height: 1;
}

sl-tag.tasks-pill .tasks-pill-icon {
  font-size: 14px;
  color: #0284c7;
}

.tasks-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.priority-critical { background: #fee2e2; color: #b91c1c; }
.priority-high { background: #fde68a; color: #92400e; }
.priority-medium { background: #bfdbfe; color: #1d4ed8; }
.priority-low { background: #dcfce7; color: #047857; }

.status-not_started { background: #e2e8f0; color: #334155; }
.status-in_progress { background: #bfdbfe; color: #1d4ed8; }
.status-blocked { background: #fee2e2; color: #b91c1c; }
.status-completed { background: #dcfce7; color: #047857; }
.status-canceled { background: #f1f5f9; color: #64748b; }

.tasks-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tasks-progress-bar {
  height: 6px;
  width: 90px;
  border-radius: 6px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
}

#tasksBoardContainer {
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 12px;
}

.tasks-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  width: 100%;
  padding-right: 12px;
}

.tasks-board-column {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.tasks-board-column header {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #e2e8f0;
  font-weight: 600;
}

.tasks-board-items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.tasks-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  cursor: grab;
}

.tasks-card header,
.tasks-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tasks-card h5 {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
}

.tasks-card p {
  margin: 0;
  color: #475569;
  font-size: 12px;
}

.tasks-empty-column {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

.tasks-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tasks-drawer-header {
  margin: 0;
  padding-top: 0;
  position: relative;
}

.tasks-drawer-header h3 {
  margin: 0;
  line-height: 1.15;
}

.tasks-drawer-header p {
  margin: 4px 0 0;
}

.tasks-drawer-header::before,
.tasks-drawer-header::after {
  content: none !important;
  display: none !important;
}

.tasks-drawer::part(header) {
  padding-top: 10px;
  padding-bottom: 8px;
}

.tasks-drawer::part(title) {
  margin: 0;
}

.tasks-drawer::part(close-button) {
  background: transparent;
  box-shadow: none;
}

.tasks-drawer-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tasks-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tasks-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tasks-checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
}

.tasks-checklist-text {
  flex: 1;
}

.tasks-checklist-date {
  font-size: 11px;
  color: #94a3b8;
}

.tasks-checklist-empty {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 8px 4px;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
}

.tasks-comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.tasks-comment {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.tasks-comment header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.tasks-comment-author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1f2937;
}

.tasks-comment-icon {
  font-size: 14px;
  color: #0ea5e9;
}

.tasks-comment-date {
  font-size: 11px;
  color: #94a3b8;
}

.tasks-comment-empty {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 12px;
}

.tasks-drawer-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tasks-drawer-spacer {
  flex: 1;
}

.tasks-comments-new {
  display: flex;
  gap: 8px;
}

.tasks-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tasks-attachment {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 12px;
}

.tasks-attachment a {
  color: #2563eb;
  text-decoration: none;
}

.tasks-attachment a:hover {
  text-decoration: underline;
}

.tasks-attachment-empty {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 12px;
}

.tasks-attachment-actions {
  margin-top: 4px;
}

.tasks-template-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tasks-template-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.tasks-template-item input {
  margin-top: 4px;
}

.tasks-template-item p {
  margin: 4px 0;
  color: #475569;
  font-size: 13px;
}

.tasks-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.tasks-tag {
  background: #c7d2fe;
  color: #4338ca;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}

.tasks-link {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.tasks-link:hover {
  text-decoration: underline;
}

.tasks-muted {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .tasks-summaryRow {
    grid-template-columns: 1fr;
  }
  .tasks-toolbarRow {
    flex-direction: column;
    align-items: stretch;
  }
  .tasks-toolbarRow sl-button::part(base) {
    width: 100%;
  }
  .tasks-filtersCard {
    grid-template-columns: 1fr;
  }
  .tasks-board {
    grid-template-columns: 1fr;
  }
}
