/* ============================================================
   Site navigation
   ============================================================ */
nav.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  padding: 0.5rem 0;
}
nav.site-nav .brand {
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  margin-right: auto;
}
nav.site-nav .nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #ccc;
  color: #333;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 0;
  line-height: 1;
}
nav.site-nav ul.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}
nav.site-nav ul.nav-links li { margin: 0; }
nav.site-nav ul.nav-links a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  color: #334;
  border-radius: 4px;
  font-size: 0.95em;
}
nav.site-nav ul.nav-links a:hover { background: #eef2f7; }
nav.site-nav .nav-user {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 0.4rem;
  border-left: 1px solid var(--c-card-brd);
  margin-left: 0.4rem;
}
nav.site-nav .user-name { font-size: 0.9em; color: #556; white-space: nowrap; }
nav.site-nav .logout-link {
  padding: 0.25rem 0.55rem !important;
  background: #f1f5f9;
  font-size: 0.85em;
}

@media (max-width: 900px) {
  nav.site-nav { flex-wrap: wrap; }
  nav.site-nav .nav-toggle { display: inline-block; }
  nav.site-nav ul.nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid var(--c-card-brd);
    border-radius: 6px;
    margin-top: 0.5rem;
  }
  nav.site-nav ul.nav-links.open { display: flex; }
  nav.site-nav ul.nav-links li {
    border-bottom: 1px solid #f1f5f9;
  }
  nav.site-nav ul.nav-links li:last-child { border-bottom: none; }
  nav.site-nav ul.nav-links a {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 0;
  }
  nav.site-nav .nav-user {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-left: none;
    margin-left: 0;
    border-top: 1px solid var(--c-card-brd);
  }
  nav.site-nav .logout-link {
    text-align: center;
    background: #f1f5f9;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
  }
}

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --c-good:      #2f9e44;
  --c-warn:      #f08c00;
  --c-bad:       #d9480f;
  --c-accent:    #1971c2;
  --c-card-bg:   #ffffff;
  --c-card-brd:  #e0e6ed;
  --c-soft-bg:   #f7f9fc;
  --c-soft-brd:  #dfe4ec;
  --c-muted:     #6b7280;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Semantic colour helpers */
.sev-good { color: var(--c-good); }
.sev-warn { color: var(--c-warn); }
.sev-bad  { color: var(--c-bad);  }
.text-muted { color: var(--c-muted); }

/* ============================================================
   Legacy row-fill (still used on person edit / master table)
   ============================================================ */
tr.verified-green { background: #d4edda; }
tr.verified-white { background: transparent; }
tr.verified-gray  { background: #eaeaea; }

/* ============================================================
   Flash messages
   ============================================================ */
.flash { padding: 0.6rem 1rem; margin: 0.5rem 0; border-radius: 4px; }
.flash-success { background: #d4edda; border-left: 3px solid var(--c-good); }
.flash-error   { background: #f8d7da; border-left: 3px solid var(--c-bad); }
.flash-warning { background: #fff3cd; border-left: 3px solid var(--c-warn); }
.flash-info    { background: #d1ecf1; border-left: 3px solid var(--c-accent); }

/* ============================================================
   Tables
   ============================================================ */
table.compact th, table.compact td {
  padding: 0.3rem 0.5rem;
  font-size: 0.9em;
}
table.dept-scan { font-size: 0.85em; }
table.dept-scan th, table.dept-scan td { padding: 0.2rem 0.4rem; }

tr.dept-header td {
  background: #eef3f9;
  border-top: 2px solid #b8c8de;
  padding: 0.5rem 0.6rem;
  color: #234;
}
tr.dept-header + tr td { padding-top: 0.35rem; }

/* ============================================================
   Status pills
   ============================================================ */
.pill { padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.85em; }
.pill-p  { background: #cce5cc; }
.pill-a  { background: #f5c6cb; }
.pill-fp { background: #e6d6f5; }
.pill-clickable {
  cursor: pointer; text-decoration: none;
  border-bottom: 1px dashed #b34;
}
.pill-clickable:hover { background: #eb9096; }

/* ============================================================
   Group tabs (Daily/Range All/Faculty/Residents)
   ============================================================ */
nav.group-tabs {
  display: flex; gap: 0.25rem;
  margin: 0.5rem 0 1rem 0;
  border-bottom: 1px solid var(--c-card-brd);
}
nav.group-tabs .tab {
  padding: 0.5rem 1rem;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 4px 4px 0 0;
  text-decoration: none; color: #555;
}
nav.group-tabs .tab:hover { background: #f5f5f5; }
nav.group-tabs .tab.active {
  background: #fff; border-color: var(--c-card-brd);
  color: #000; font-weight: 600;
  position: relative; top: 1px;
}

/* ============================================================
   Person page master card
   ============================================================ */
.master-card { padding: 1rem; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 4px; }
.master-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.master-card dt { font-weight: 600; }

/* ============================================================
   Chip filter (Master page)
   ============================================================ */
form.chip-filter {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  margin: 0.5rem 0 1rem 0;
  padding: 0.6rem 0.9rem;
  background: var(--c-soft-bg);
  border: 1px solid var(--c-soft-brd);
  border-radius: var(--radius);
}
.chip-group { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.chip-legend {
  font-size: 0.78em; font-weight: 600; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-right: 0.25rem;
}
.chip {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.88em;
  color: #334;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--c-accent); }
.chip.active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  font-weight: 500;
}
.chip input { display: none; }
.chip-actions { margin-left: auto; }
.chip-reset {
  font-size: 0.85em; color: var(--c-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
}
.chip-reset:hover { color: var(--c-bad); text-decoration: underline; }

/* ============================================================
   Dashboard
   ============================================================ */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--c-card-brd);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.hero-metric-block { min-width: 0; }
.hero-eyebrow {
  font-size: 0.78em; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.hero-metric-line { display: flex; align-items: baseline; gap: 0.6rem; }
.hero-metric { font-size: 3rem; font-weight: 700; line-height: 1; }
.hero-note   { font-size: 0.95em; color: var(--c-muted); }

/* Hero stats: 2-column label|value table — always readable, no crammed text */
table.hero-stats-table {
  width: 100%;
  max-width: 22rem;
  margin: 0;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--c-card-brd);
  border-radius: 6px;
  overflow: hidden;
}
table.hero-stats-table th {
  text-align: left;
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  color: #334;
  font-size: 0.92em;
  background: transparent;
  border: none;
}
table.hero-stats-table td {
  text-align: right;
  padding: 0.4rem 0.75rem;
  font-variant-numeric: tabular-nums;
  border: none;
}
table.hero-stats-table td.num strong { font-size: 1.1em; }
table.hero-stats-table tr { border-bottom: 1px solid #f1f5f9; }
table.hero-stats-table tr:last-child { border-bottom: none; }

.hero-actions { display: flex; flex-direction: column; gap: 0.4rem; min-width: 12rem; }
.hero-actions [role=button] { margin: 0; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.dash-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-brd);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  margin: 0;
}
.dash-card.wide { grid-column: span 3; }
.dash-card header { margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid #eef2f7; }
.dash-card h3 { margin: 0; font-size: 1rem; }
.dash-card header small { color: var(--c-muted); font-size: 0.82em; }

/* Legacy .chase-list kept for backward compat (not used on dashboard anymore) */
ul.chase-list { list-style: none; padding: 0; margin: 0; }

/* Dashboard mini-tables */
table.mini-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9em;
}
table.mini-table thead th {
  padding: 0.35rem 0.4rem;
  text-align: left;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-card-brd);
}
table.mini-table thead th.num { text-align: right; }
table.mini-table tbody tr { border-bottom: 1px solid #f1f5f9; }
table.mini-table tbody tr:last-child { border-bottom: none; }
table.mini-table tbody td {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
}
table.mini-table tbody td.num  { text-align: right; font-variant-numeric: tabular-nums; }
table.mini-table tbody td.mono { font-family: monospace; font-size: 0.9em; }
table.mini-table a { text-decoration: none; }
table.mini-table a:hover { text-decoration: underline; }
p.table-footnote { margin: 0.4rem 0 0 0; font-size: 0.85em; text-align: right; }
p.table-footnote a { color: var(--c-accent); text-decoration: none; }
p.table-footnote a:hover { text-decoration: underline; }

/* Mobile responsive rules — keep tables inside the viewport */
@media (max-width: 720px) {
  /* Dashboard hero: stack the columns */
  .hero-card { grid-template-columns: 1fr; gap: 0.75rem; padding: 0.85rem 1rem; }
  table.hero-stats-table { max-width: none; }
  .hero-actions { flex-direction: row; min-width: 0; }
  .hero-actions [role=button] { flex: 1; text-align: center; padding: 0.5rem; }

  /* Dashboard grid: single column */
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-card.wide { grid-column: span 1; }

  /* Master person list: hide the least-critical columns on narrow screens */
  table.person-list .col-desig,
  table.person-list .col-verified,
  table.person-list .col-deficiency { display: none; }
  table.person-list thead th.col-desig,
  table.person-list thead th.col-verified,
  table.person-list thead th.col-deficiency { display: none; }
  table.person-list .col-id { width: auto; }

  /* Master dept-summary: tighter padding */
  .dept-card-head { padding: 0.65rem 0.75rem; }
  .dept-name { font-size: 0.98rem; }
  .dept-stats-row { gap: 0.75rem; font-size: 0.85em; flex-wrap: wrap; }

  /* Cadre mini-table: compress padding + smaller font */
  table.cadre-table th, table.cadre-table td {
    padding: 0.25rem 0.15rem;
    font-size: 0.8em;
  }
  table.cadre-table td strong { font-size: 1em; }

  /* Range page hero + controls: stack */
  .range-header { flex-direction: column; align-items: stretch; }
  .range-stats { flex-wrap: wrap; gap: 0.75rem; }
  .range-controls { flex-wrap: wrap; }
}

/* Very narrow (< 420px): absolute minimum */
@media (max-width: 420px) {
  .hero-metric { font-size: 2.4rem; }
  .hero-metric-line { flex-direction: row; }
  table.cadre-table { font-size: 0.75em; }
}

/* Inline mini-progress used in the dashboard's dept-today table */
.col-progress {
  display: flex; align-items: center; gap: 0.5rem;
  min-width: 10rem;
}
.mini-progress {
  flex: 1;
  height: 8px;
  min-width: 4rem;
  background: #e2e8f0;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  overflow: hidden;
}
.mini-progress-fill { height: 100%; }
.mini-progress-fill.sev-good { background: var(--c-good); }
.mini-progress-fill.sev-warn { background: var(--c-warn); }
.mini-progress-fill.sev-bad  { background: var(--c-bad);  }
.mini-pct { min-width: 3rem; text-align: right; font-weight: 600; font-size: 0.9em; }

/* Dept grid on dashboard */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}
.dept-tile {
  display: block;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid var(--c-card-brd);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
}
.dept-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.dept-tile-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.3rem;
}
.dept-tile-head strong { font-size: 0.9em; }
.dept-tile-body {
  display: flex; justify-content: space-between;
  font-size: 0.8em; color: var(--c-muted);
  margin-top: 0.3rem;
}
.pct { font-weight: 600; font-size: 0.92em; }
.dept-progress {
  height: 4px; background: #edf1f6; border-radius: 2px; overflow: hidden;
}
.dept-progress-fill { height: 100%; border-radius: 2px; }
.dept-progress-fill.sev-good { background: var(--c-good); }
.dept-progress-fill.sev-warn { background: var(--c-warn); }
.dept-progress-fill.sev-bad  { background: var(--c-bad);  }

.vac.sev-good { color: var(--c-good); }
.vac.sev-warn { color: var(--c-warn); }
.vac.sev-bad  { color: var(--c-bad);  }

/* ============================================================
   Master — dept cards
   ============================================================ */
.dept-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-brd);
  border-radius: var(--radius);
  margin: 0.75rem 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dept-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid transparent;
  display: block;
}
.dept-card[open] > summary {
  border-bottom-color: var(--c-card-brd);
}
.dept-card > summary::-webkit-details-marker { display: none; }
.dept-card > summary:hover { background: #f5f8fc; }
/* Inner wrapper — needed because <summary>'s children are treated as inline
   by some browsers; wrapping in a plain block div normalises layout. */
.dept-card-head {
  display: block;
  padding: 0.85rem 1.1rem;
}
.dept-card-head > div, .dept-card-head > table { display: block; }
.dept-card-head > table { display: table; }

.dept-title-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 0.5rem;
}
.dept-title { display: flex; align-items: baseline; gap: 0.45rem; }
.dept-caret {
  color: var(--c-muted); font-size: 0.85em;
  transition: transform 0.15s;
  display: inline-block;
}
.dept-card[open] .dept-caret { transform: rotate(90deg); }
.dept-name { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.01em; }

/* Stats row (Present / Absent / FP / vacancy badge) */
.dept-stats-row {
  display: flex; align-items: center; gap: 1.5rem;
  margin: 0.7rem 0 0.6rem 0;
  font-size: 0.92em;
}
.dept-stat { color: #333; }
.dept-stat b { font-size: 1.05em; margin-right: 0.15rem; }
.dept-stat-spacer { flex: 1; }
.dept-vac-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
}
.badge-good { background: #e6f5ea; color: #2b8a3e; border: 1px solid #b7e0c0; }
.badge-bad  { background: #ffe3e3; color: #a51111; border: 1px solid #f5b5b5; }

/* Cadre mini-table (in dept card header) */
table.cadre-table {
  width: 100%;
  margin: 0.3rem 0 0 0;
  border-collapse: collapse;
  font-size: 0.9em;
}
table.cadre-table th {
  padding: 0.3rem 0.5rem;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  background: transparent;
  border-bottom: 1px solid var(--c-card-brd);
  border-top: none;
}
table.cadre-table td {
  padding: 0.4rem 0.5rem;
  text-align: center;
  border: 1px solid var(--c-card-brd);
  vertical-align: middle;
}
table.cadre-table td strong { font-size: 1.1em; }
.cadre-slash { color: var(--c-muted); margin: 0 0.15rem; }
.cadre-req { color: var(--c-muted); font-size: 0.95em; }
.cadre-full    { background: #eef7f0; }
.cadre-over    { background: #eef3fb; }
.cadre-has-vac { background: #fdecec; }
.cadre-vac {
  color: var(--c-bad);
  font-weight: 700;
  font-size: 0.82em;
  margin-top: 0.15rem;
}

.pct-chip {
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  background: #f1f5f9;
  letter-spacing: 0.01em;
}
.pct-chip.sev-good { background: #d3f9d8; color: #2b8a3e; }
.pct-chip.sev-warn { background: #fff3bf; color: #a67200; }
.pct-chip.sev-bad  { background: #ffe3e3; color: #a51111; }

.dept-progress {
  display: block;
  height: 10px;
  background: #e2e8f0;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  overflow: hidden;
  margin: 0.35rem 0 0.75rem 0;
  width: 100%;
}
.dept-progress-fill {
  display: block;
  height: 100%;
  border-radius: 4px 0 0 4px;
  transition: width 0.3s;
}
.dept-progress-fill.sev-good { background: var(--c-good); }
.dept-progress-fill.sev-warn { background: var(--c-warn); }
.dept-progress-fill.sev-bad  { background: var(--c-bad);  }
.dept-progress-fill.sev-good { background: var(--c-good); }
.dept-progress-fill.sev-warn { background: var(--c-warn); }
.dept-progress-fill.sev-bad  { background: var(--c-bad);  }

/* (removed: dept-head-bottom / cadre-chips — replaced by cadre-table) */

/* Expanded body — single tabular table per dept */
.dept-body { padding: 0; background: #fff; }

table.person-list {
  width: 100%;
  margin: 0;
  font-size: 0.9em;
  border-collapse: collapse;
  table-layout: auto;
}
table.person-list thead th {
  padding: 0.5rem 0.75rem;
  background: #f4f7fb;
  border-bottom: 2px solid #cdd6e0;
  text-align: left;
  font-size: 0.82em;
  font-weight: 600;
  color: #345;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
table.person-list tbody tr { border-bottom: 1px solid #eef2f7; }
table.person-list tbody tr:last-child { border-bottom: none; }
table.person-list tbody td {
  padding: 0.4rem 0.75rem;
  vertical-align: middle;
  text-align: left;                    /* consistent left-align */
}
table.person-list .col-id       { width: 7rem;  font-family: monospace; font-size: 0.85em; white-space: nowrap; }
table.person-list .col-name     { min-width: 12rem; font-weight: 500; }
table.person-list .col-cadre    { width: 4.5rem; font-size: 0.85em; color: #345; }
table.person-list .col-desig    { min-width: 10rem; color: var(--c-muted); }
table.person-list .col-status   { width: 6rem; white-space: nowrap; }
table.person-list .col-verified { width: 6rem; white-space: nowrap; }
table.person-list .col-deficiency { color: #333; }

/* Reason code sitting next to a Status pill */
.reason-inline {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  background: #fff5cc;
  border: 1px solid #f0d17a;
  border-radius: 3px;
  font-size: 0.82em;
  color: #7a5900;
}

/* verified indicator dot */
.verified-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.verified-green-dot { background: #2b8a3e; }
.verified-white-dot { border: 1.5px solid #999; }
.verified-gray-dot  { background: #adb5bd; }

/* Filter panel (collapsible) */
details.filter-panel {
  background: var(--c-soft-bg);
  border: 1px solid var(--c-soft-brd);
  border-radius: var(--radius);
  margin: 0.5rem 0 1rem 0;
}
details.filter-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
details.filter-panel > summary::-webkit-details-marker { display: none; }
details.filter-panel > summary::before {
  content: "▸";
  color: var(--c-muted);
  transition: transform 0.15s;
  display: inline-block;
}
details.filter-panel[open] > summary::before { transform: rotate(90deg); }
.filter-label { font-weight: 600; }
.filter-state {
  font-size: 0.88em;
  color: var(--c-muted);
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
}
.chip-mini {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  background: #fff;
  border: 1px solid var(--c-soft-brd);
  border-radius: 3px;
  font-size: 0.92em;
  color: #234;
}
details.filter-panel .chip-filter {
  border: none; border-top: 1px solid var(--c-soft-brd);
  background: transparent;
  border-radius: 0;
  margin: 0;
}

/* Range sub-tabs */
nav.sub-tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  margin: 0.5rem 0 1rem 0;
  border-bottom: 1px solid var(--c-card-brd);
}
nav.sub-tabs .sub-tab {
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 4px 4px 0 0;
  text-decoration: none; color: #555;
  display: inline-flex; gap: 0.4rem; align-items: center;
  font-size: 0.9em;
}
nav.sub-tabs .sub-tab:hover { background: #f5f5f5; }
nav.sub-tabs .sub-tab.active {
  background: #fff; border-color: var(--c-card-brd);
  color: #000; font-weight: 600;
  position: relative; top: 1px;
}
nav.sub-tabs .count {
  padding: 0.05rem 0.4rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
}

/* Range header (page top) */
.range-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--c-card-brd);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.range-eyebrow { font-size: 0.9em; color: var(--c-muted); margin-bottom: 0.3rem; }
.range-stats { display: flex; gap: 1.5rem; }
.range-controls { display: flex; gap: 0.5rem; align-items: end; }
.range-controls input[type=date] { max-width: 10rem; margin: 0; }
.range-controls button { margin: 0; padding: 0.4rem 0.9rem; }
