/* panel-shelves.css — the memory surface's chrome (ADR-0019, ticket 04): the masthead VIEW SWITCHER (Inbox · Done ·
   Snoozed · All patients), the Done/Snoozed shelves' per-row RECEIPT line + the never-calming critical / back-in-inbox
   BADGES + the Done shelf's plain live-critical count, the time-band FILTER, and the census review-state CHIP.
   Structural + role hues via tokens ONLY (no new colours/fonts). Reuses the .ptab segmented-control idiom from the
   panel's own inline styles. Inert on the static demo (the switcher renders only when the review envelope is present). */

/* ── the VIEW SWITCHER — a segmented control, obvious but quiet (the Inbox stays the working home) ──────────────── */
.view-switcher {
  display: inline-flex;
  margin-top: 14px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  overflow: hidden;
}
.vtab {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--mid);
  background: var(--card);
  border: 0;
  padding: 5px 13px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.vtab + .vtab { border-left: 1px solid var(--hairline); }
.vtab:hover { color: var(--ink); }
.vtab.active { background: var(--ink); color: var(--paper); }
.vtab:focus-visible { outline: 2px solid var(--ui-selection); outline-offset: 2px; }
/* the tab's live count — quiet, tabular; on the active (inverted) tab it rides the paper colour at reduced weight */
.vtab .vtab-n { font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.75; }
.vtab.active .vtab-n { opacity: 0.85; }
.vtab .vtab-n:empty { display: none; }

/* ── the TIME-BAND FILTER — small chips on the shelves (Today · This week · This month · All) ───────────────────── */
.band-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 22px 0 2px;
}
.band-filter .band-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.band-chip {
  font: inherit;
  font-size: 11.5px;
  color: var(--mid);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.band-chip:hover { color: var(--ink); border-color: var(--mid); }
.band-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.band-chip:focus-visible { outline: 2px solid var(--ui-selection); outline-offset: 1px; }

/* ── the Done shelf's plain LIVE-CRITICAL COUNT (story 16) — plain language, never an alarming decoration ───────── */
.shelf-critical-count {
  font-size: 12.5px;
  color: var(--mid);
  margin: 2px 2px 10px;
  font-variant-numeric: tabular-nums;
}

/* ── a shelf ROW's receipt line + badges (below the existing patient-row treatment; hidden while a board is open) ── */
.shelf-receipt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 3px 12px 9px 20px; /* align under the row's identity column (past the danger rail) */
  font-size: 12px;
  color: var(--muted);
}
.row-host.open > .shelf-receipt { display: none; } /* the open board carries its own identity — no orphaned receipt */
.shelf-receipt .receipt-when { color: var(--mid); font-variant-numeric: tabular-nums; }

/* the badges — small pills in the house idiom. The critical badge BURNS (never calms); back-in-inbox is neutral. */
.shelf-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.shelf-badge.critical {
  color: var(--role-critical);
  background: var(--role-critical-soft);
  border: 1px solid var(--role-critical);
}
.shelf-badge.back {
  color: var(--mid);
  background: var(--card);
  border: 1px solid var(--hairline);
}

/* ── the census REVIEW-STATE CHIP — a small inert label on Done/Snoozed rows (labels, never removes anyone) ─────── */
.census-chip {
  display: inline-block;
  margin: 1px 12px 8px 20px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.row-host.open > .census-chip { display: none; }

/* the shelves' honest empty state (a band filtered everything out) reuses the panel's own .empty idiom (italic muted). */
