/* Task pages: reduce ornamental chrome and give the table back its space. */
body[data-section="tasks"] .premium-page-brief,
body[data-section="tasks"] .premium-filter-summary,
body[data-section="tasks"] .premium-table-summary {
  display: none !important;
}

body[data-section="tasks"] .content-area {
  padding: 14px 20px 18px !important;
}

body[data-section="tasks"] .tasks-page {
  gap: 12px !important;
}

body[data-section="tasks"] .tasks-page > .panel:first-child {
  padding: 12px 16px 13px !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  border-color: #d8e1ee !important;
  background: #ffffff !important;
}

body[data-section="tasks"] .tasks-page .module-hero {
  display: grid !important;
  grid-template-columns: minmax(170px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-section="tasks"] .tasks-page .module-hero::before {
  display: none !important;
}

body[data-section="tasks"] .tasks-page .module-hero h2 {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.05 !important;
  color: #0f172a !important;
  font-weight: 760 !important;
}

body[data-section="tasks"] .tasks-page .module-hero > div:first-child {
  min-width: 0 !important;
}

body[data-section="tasks"] .tasks-page .module-hero .muted,
body[data-section="tasks"] .tasks-page .module-subtitle {
  display: none !important;
}

body[data-section="tasks"] .tasks-page .kpi-strip {
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill {
  min-width: 116px !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill:nth-child(1) {
  border-color: #bfd8f0 !important;
  background: linear-gradient(180deg, #f5f9ff, #ffffff) !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill:nth-child(2),
body[data-section="tasks"] .tasks-page .kpi-pill:nth-child(3) {
  border-color: #efc7cf !important;
  background: linear-gradient(180deg, #fff8f9, #ffffff) !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill:nth-child(4) {
  border-color: #ead29b !important;
  background: linear-gradient(180deg, #fffaf0, #ffffff) !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill:nth-child(5) {
  border-color: #bfe3db !important;
  background: linear-gradient(180deg, #f3fbf8, #ffffff) !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill span {
  font-size: 9px !important;
  color: #5f6f86 !important;
  letter-spacing: 0.075em !important;
}

body[data-section="tasks"] .tasks-page .kpi-pill strong {
  font-size: 18px !important;
  color: #0f172a !important;
  letter-spacing: 0 !important;
}

body[data-section="tasks"] .tasks-page.task-view-all .module-hero .kpi-pill,
body[data-section="tasks"] .tasks-page.task-view-cancelled .module-hero .kpi-pill {
  display: none !important;
}

body[data-section="tasks"] .tasks-page.task-view-cancelled .module-hero,
body[data-section="tasks"] .tasks-page.task-view-all .module-hero {
  padding-bottom: 0 !important;
}

body[data-section="tasks"] .tasks-page.task-view-cancelled .task-fixed-filter {
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 10px !important;
  border: 1px solid #cdd8e7 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: #26364f !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body[data-section="tasks"] .premium-assignee-filter-search {
  min-width: 190px !important;
}

body[data-section="tasks"] .premium-active-assignees-ready .premium-assignee-filter-search + select {
  min-width: 180px !important;
}

body[data-section="tasks"] .tasks-page .module-hero .kpi-strip > button,
body[data-section="tasks"] .tasks-page .module-hero .kpi-strip .action-save {
  align-self: stretch !important;
  min-height: 48px !important;
  padding: 0 18px !important;
  border-radius: 9px !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 18px -14px rgba(22, 54, 105, 0.65) !important;
}

body[data-section="tasks"] .task-filter-shell {
  margin-top: 7px !important;
  padding: 9px !important;
  border-radius: 11px !important;
  background: #f8fafc !important;
  gap: 8px !important;
  border-color: #e0e7f1 !important;
}

body[data-section="tasks"] .task-filter-primary,
body[data-section="tasks"] .task-filter-primary--with-actions {
  display: grid !important;
  grid-template-columns:
    minmax(140px, 0.75fr)
    minmax(160px, 0.85fr)
    minmax(170px, 0.95fr)
    minmax(200px, 1.1fr)
    minmax(92px, auto)
    minmax(86px, auto)
    minmax(92px, auto) !important;
  gap: 8px !important;
  align-items: center !important;
}

body[data-section="tasks"] .task-filter-shell input,
body[data-section="tasks"] .task-filter-shell select,
body[data-section="tasks"] .task-filter-shell button {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
  border-color: #cdd8e7 !important;
  box-shadow: none !important;
}

body[data-section="tasks"] .task-filter-shell input,
body[data-section="tasks"] .task-filter-shell select {
  background-color: #ffffff !important;
}

body[data-section="tasks"] .task-filter-shell button {
  background: #ffffff !important;
  color: #26364f !important;
}

body[data-section="tasks"] .task-filter-shell button:hover {
  background: #f3f7fc !important;
  border-color: #b6c6dc !important;
}

body[data-section="tasks"] .task-filter-actions {
  padding-top: 0 !important;
  border-top: 0 !important;
}

body[data-section="tasks"] .tasks-page .table-wrap {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  border-color: #d6e0ec !important;
  max-height: calc(100vh - 290px) !important;
  overflow: auto !important;
  background: #ffffff !important;
}

body[data-section="tasks"] .tasks-page table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 4 !important;
  padding: 8px 11px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #d7e0ec !important;
  font-size: 9.5px !important;
  letter-spacing: 0.07em !important;
}

body[data-section="tasks"] .tasks-page table td {
  padding: 8px 11px !important;
  color: #1f2937 !important;
  font-size: 12px !important;
  line-height: 1.28 !important;
  vertical-align: middle !important;
}

body[data-section="tasks"] .tasks-page table tbody tr {
  min-height: 48px !important;
  border-bottom: 1px solid #eef2f7 !important;
}

body[data-section="tasks"] .tasks-page table tbody tr:nth-child(even) {
  background: #fcfdff !important;
}

body[data-section="tasks"] .tasks-page table tbody tr:hover {
  background: #f6f9fd !important;
}

body[data-section="tasks"] .tasks-page table td[data-label="Task"],
body[data-section="tasks"] .tasks-page table td[data-label="Main Task"] {
  min-width: 180px !important;
  color: #17315f !important;
  font-weight: 750 !important;
}

body[data-section="tasks"] .tasks-page table td[data-label="Client"] {
  min-width: 230px !important;
  color: #111827 !important;
  font-weight: 560 !important;
}

body[data-section="tasks"] .tasks-page table td[data-label="Department"],
body[data-section="tasks"] .tasks-page table td[data-label="Month"],
body[data-section="tasks"] .tasks-page table td[data-label="Assigned"] {
  color: #334155 !important;
}

body[data-section="tasks"] .tasks-page table td[data-label="Effective"],
body[data-section="tasks"] .tasks-page table td[data-label="Internal Due"],
body[data-section="tasks"] .tasks-page table td[data-label="Stat Due"] {
  color: #1f2937 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

body[data-section="tasks"] .tasks-page .sticky-col-title,
body[data-section="tasks"] .tasks-page .sticky-col-status {
  box-shadow: 1px 0 0 #e0e7f1 !important;
  background: inherit !important;
}

body[data-section="tasks"] .tasks-page .sticky-col-title {
  left: 0 !important;
  min-width: 180px !important;
  max-width: 220px !important;
}

body[data-section="tasks"] .tasks-page .sticky-col-status {
  left: 180px !important;
  min-width: 132px !important;
  max-width: 150px !important;
}

body[data-section="tasks"] .tasks-page thead .sticky-col-title,
body[data-section="tasks"] .tasks-page thead .sticky-col-status,
body[data-section="tasks"] .tasks-page table thead th.sticky-col-title,
body[data-section="tasks"] .tasks-page table thead th.sticky-col-status {
  background: #1e2d4a !important;
  color: #ffffff !important;
  border-bottom-color: #2c3e5e !important;
  box-shadow: 1px 0 0 #2c3e5e, 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  z-index: 16 !important;
}

body[data-section="tasks"] .tasks-page .tag {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] {
  min-width: 148px !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] .approval-actions,
body[data-section="tasks"] .tasks-page td[data-label="Actions"] .task-row-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  align-items: center !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] button {
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] button:first-child {
  border-color: #b7c8e2 !important;
  background: #f1f6fd !important;
  color: #17315f !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] button:nth-child(2) {
  border-color: #ccd7e6 !important;
  background: #ffffff !important;
  color: #26364f !important;
}

body[data-section="tasks"] .tasks-page td[data-label="Actions"] button:hover {
  border-color: #9fb4d2 !important;
  background: #eaf2fc !important;
  color: #10294f !important;
  transform: none !important;
}

body[data-section="tasks"] .pagination-bar {
  padding: 8px 4px 0 !important;
  color: #64748b !important;
}

body[data-section="tasks"] .pagination-actions button {
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid #cdd8e7 !important;
  background: #ffffff !important;
  color: #26364f !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  body[data-section="tasks"] .tasks-page .module-hero {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  body[data-section="tasks"] .tasks-page .kpi-strip {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  body[data-section="tasks"] .task-filter-primary,
  body[data-section="tasks"] .task-filter-primary--with-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body[data-section="tasks"] .task-filter-primary,
  body[data-section="tasks"] .task-filter-primary--with-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Shared navigation refinement, intentionally subtle. */
.sidebar {
  background: linear-gradient(180deg, #071327 0%, #102849 100%) !important;
  box-shadow: 12px 0 28px -24px rgba(5, 13, 30, 0.8) !important;
}

.sidebar .logo {
  letter-spacing: 0 !important;
}

.sidebar-nav {
  gap: 7px !important;
}

.sidebar-nav a,
.sidebar-group-toggle {
  border-radius: 10px !important;
}

.sidebar-group-toggle {
  border-color: rgba(156, 184, 224, 0.26) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow: none !important;
}

.sidebar-group-toggle.active,
.sidebar-nav a.active,
.sidebar-subnav a.active {
  border-color: rgba(132, 172, 232, 0.62) !important;
  background: rgba(71, 122, 196, 0.34) !important;
  box-shadow: inset 3px 0 0 #74a7ef !important;
}

.sidebar-subnav {
  gap: 5px !important;
  border-left-color: rgba(156, 184, 224, 0.24) !important;
}

.sidebar-subnav a {
  border-radius: 9px !important;
}

.sidebar-logout-btn {
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #1f2f47 !important;
}
