/* Specimen Intake & Processing — preview styles.
   Palette: kit teal #0D9488 (registered kit color) · formalin amber #D97706
   · stat red #DC2626 · solution blue #2563EB · slate ink on platform white.
   Type: IBM Plex Sans (chrome) + IBM Plex Mono (everything a lab prints). */

:root {
  --teal: #0d9488;
  --teal-dark: #0b7d73;
  --teal-tint: #e6f4f2;
  --amber: #d97706;
  --amber-tint: #fdf1e0;
  --red: #dc2626;
  --red-tint: #fdeaea;
  --blue: #2563eb;
  --blue-tint: #e8effd;
  --green: #10b981;
  --green-tint: #e6f7f1;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.05);
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); color: var(--ink); background: var(--surface); min-height: 100vh; }
.mono { font-family: var(--mono); }

:is(.tab, .btn, .chip, .stepper-btn, .code-chip, .filter-chip):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ── Top nav (platform chrome) ─────────────────────────────── */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  background: #ffffff; border-bottom: 1px solid var(--line);
  padding: 0 20px; height: 56px;
}
.topnav-left { display: flex; align-items: center; gap: 14px; }
.topnav-launcher { display: inline-flex; }
.topnav-divider { width: 1px; height: 24px; background: var(--line); }
.app-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.kit-chip {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--teal-dark); background: var(--teal-tint);
  border: 1px solid #c6e7e3; border-radius: 999px; padding: 3px 10px;
}
.topnav-right { display: flex; align-items: center; gap: 14px; }
.demo-clock { font-size: 0.85rem; color: var(--ink-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--teal);
  color: #fff; font-size: 0.78rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabbar { display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tab {
  padding: 12px 16px; font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  border-bottom: 2.5px solid transparent; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
a.tab:visited { color: var(--ink-2); }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--teal-dark); border-bottom-color: var(--teal); font-weight: 600; }
a.tab.is-active:visited { color: var(--teal-dark); }
.tab-count {
  background: var(--amber); color: #fff; font-size: 0.7rem; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tab-count.is-zero { background: var(--ink-3); }

main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.view { display: none; }
.view.is-active { display: block; }

/* ── Intake: glove mode ────────────────────────────────────── */
.intake-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

.glove-banner {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 500; color: var(--teal-dark);
  background: var(--teal-tint); border: 1px solid #c6e7e3;
  border-radius: var(--radius); padding: 9px 14px; margin-bottom: 14px;
}
.glove-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }

.wizard-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 34px 34px 30px; min-height: 420px;
  display: flex; flex-direction: column;
}
.step-eyebrow {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}
.step-question { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 26px; }
.step-question .q-hint { display: block; font-size: 0.95rem; font-weight: 400; color: var(--ink-2); margin-top: 6px; letter-spacing: 0; }

.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.chip {
  min-height: 76px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 1.06rem; font-weight: 600; color: var(--ink); text-align: center; padding: 10px;
  transition: border-color 120ms ease, background 120ms ease, transform 80ms ease;
}
.chip:hover { border-color: var(--teal); background: var(--teal-tint); }
.chip:active { transform: scale(0.985); }
.chip .chip-sub { font-size: 0.8rem; font-weight: 400; color: var(--ink-2); }
.chip.is-selected { border-color: var(--teal); background: var(--teal-tint); box-shadow: inset 0 0 0 1px var(--teal); }
.chip.chip-defer { border-color: #f0cf9d; background: var(--amber-tint); color: #92400e; }
.chip.chip-defer:hover { border-color: var(--amber); }
.chip.chip-skip, .chip.chip-mono-sub { grid-column: 1 / -1; min-height: 56px; }
.chip.chip-skip { border-style: dashed; color: var(--ink-2); font-weight: 500; background: transparent; }
.chip.chip-stat { border-color: #f3b9b9; background: var(--red-tint); color: #991b1b; }
.chip.chip-urgent { border-color: #f0cf9d; background: var(--amber-tint); color: #92400e; }

.id-entry { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.id-input {
  flex: 1; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink);
}
.id-input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.id-suggest {
  font-family: var(--mono); font-size: 0.95rem; min-height: 60px;
}

.stepper-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stepper-row:last-of-type { border-bottom: 0; }
.stepper-label { font-size: 1.05rem; font-weight: 600; }
.stepper-label small { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.8rem; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper-btn {
  width: 64px; height: 64px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  font-size: 1.7rem; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 120ms ease, background 120ms ease;
}
.stepper-btn:hover { border-color: var(--teal); background: var(--teal-tint); }
.stepper-val { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; min-width: 48px; text-align: center; }

.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; font-weight: 600; cursor: pointer; user-select: none;
  transition: background 120ms ease, transform 80ms ease;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--teal); color: #fff; font-size: 1.05rem; padding: 16px 30px; min-height: 60px; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--ink-2); font-size: 0.95rem; padding: 12px 18px; }
.btn-ghost:hover { color: var(--ink); background: var(--surface); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

.wizard-progress { display: flex; gap: 7px; justify-content: center; margin-top: 16px; }
.wp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.wp-dot.is-done { background: var(--teal); }
.wp-dot.is-current { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }

/* ── The ticket (signature element) ────────────────────────── */
.ticket-col { position: sticky; top: 20px; }
.ticket {
  font-family: var(--mono); font-size: 0.83rem; line-height: 1.75; color: var(--ink);
  background: #fffdf6; border: 1.5px dashed #cbd5e1; border-radius: 4px;
  padding: 18px 20px 22px; box-shadow: var(--shadow);
}
.ticket-head {
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin-bottom: 10px; display: flex; justify-content: space-between;
}
.ticket-row { display: flex; justify-content: space-between; gap: 12px; }
.ticket-row .t-key { color: var(--ink-3); }
.ticket-row .t-val { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.ticket-row .t-val.t-pending { color: var(--ink-3); font-weight: 400; }
.ticket-row .t-val.t-defer { color: var(--amber); font-weight: 600; }
.ticket-barcode {
  margin-top: 14px; height: 34px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px);
  opacity: 0.85;
}
.ticket-note { font-size: 0.78rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }

/* ── KPIs ──────────────────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.kpi .kpi-label { font-size: 0.78rem; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.kpi .kpi-value { font-family: var(--mono); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.kpi.k-amber .kpi-value { color: var(--amber); }
.kpi.k-blue .kpi-value { color: var(--blue); }
.kpi.k-green .kpi-value { color: var(--green); }

/* ── Board ─────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  font-size: 0.83rem; font-weight: 500; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; user-select: none;
}
.filter-chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.filter-chip.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }

.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow-x: auto;
}
.board-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.board-table th {
  text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-2); background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 12px; white-space: nowrap;
}
.board-table td { padding: 11px 12px; border-bottom: 1px solid #eef2f6; vertical-align: middle; white-space: nowrap; }
.board-table tbody tr:last-child td { border-bottom: 0; }
.board-table tbody tr:hover td { background: #fafcff; }
.cell-id { font-family: var(--mono); font-weight: 600; }
.cell-time { font-family: var(--mono); color: var(--ink-2); }
.cell-batch { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  border-radius: 999px; padding: 3px 10px;
}
.b-stat { background: var(--red); color: #fff; }
.b-urgent { background: var(--amber-tint); color: #92400e; }
.b-routine { background: #eef2f6; color: var(--ink-2); }
.b-deferred { background: var(--amber-tint); color: #92400e; }
.b-classified { background: var(--green-tint); color: #065f46; }
.b-in-solution { background: var(--blue-tint); color: #1d4ed8; }
.b-ready { background: var(--green-tint); color: #065f46; }
.b-handoff { background: var(--amber); color: #fff; }

@keyframes rowFlash { from { background: var(--teal-tint); } to { background: transparent; } }
tr.is-new td { animation: rowFlash 2.4s ease-out; }

/* ── Queue ─────────────────────────────────────────────────── */
.queue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.section-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.section-sub { font-size: 0.85rem; color: var(--ink-2); margin: 4px 0 14px; }

.q-card {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.q-card.q-handoff { border-left-color: var(--blue); }
.q-card.q-done { border-left-color: var(--green); opacity: 0.75; }
.q-meta { min-width: 0; }
.q-id { font-family: var(--mono); font-weight: 600; font-size: 0.95rem; }
.q-sub { font-size: 0.82rem; color: var(--ink-2); margin-top: 2px; }
.q-sub .mono { font-size: 0.78rem; }
.btn-small { font-size: 0.85rem; padding: 11px 16px; min-height: 44px; border-radius: 10px; background: var(--teal); color: #fff; flex-shrink: 0; }
.btn-small:hover { background: var(--teal-dark); }
.q-empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 22px;
  text-align: center; color: var(--ink-3); font-size: 0.88rem;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
/* display:flex above would defeat the hidden attribute's display:none */
.modal-scrim[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  width: min(560px, 100%); padding: 24px;
}
.modal h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.modal-summary {
  font-size: 0.8rem; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.7;
}
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; margin-bottom: 14px; }
.code-chip {
  font-family: var(--mono); font-size: 0.88rem; font-weight: 600;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff;
  padding: 13px 8px; text-align: center; cursor: pointer; user-select: none;
}
.code-chip:hover { border-color: var(--teal); background: var(--teal-tint); }
.code-chip.is-selected { border-color: var(--teal); background: var(--teal-tint); box-shadow: inset 0 0 0 1px var(--teal); }
.modal-notes {
  width: 100%; font-family: var(--font); font-size: 0.9rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 9px; padding: 10px 12px; min-height: 64px; resize: vertical;
}
.modal-notes:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ── Charts ────────────────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 18px;
}
.chart-card h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 14px; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 10px; font-size: 0.82rem; }
.bar-label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--surface); border-radius: 5px; height: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--teal); min-width: 2px; transition: width 500ms ease; }
.bar-fill.f-amber { background: var(--amber); }
.bar-fill.f-blue { background: var(--blue); }
.bar-val { font-family: var(--mono); font-weight: 600; text-align: right; }

.bars-vert { flex-direction: row; align-items: flex-end; gap: 12px; height: 150px; padding-top: 6px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.vbar-fill { width: 100%; max-width: 46px; border-radius: 5px 5px 0 0; background: var(--teal); transition: height 500ms ease; }
.vbar.is-today .vbar-fill { background: var(--amber); }
.vbar-label { font-size: 0.68rem; color: var(--ink-3); white-space: nowrap; }
.vbar-val { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 0.9rem; font-weight: 500;
  border-radius: 10px; padding: 12px 20px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3); z-index: 80;
}
.toast .mono { color: #7dd3c8; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .intake-grid { grid-template-columns: 1fr; }
  .ticket-col { position: static; }
  .queue-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .tabbar { overflow-x: auto; }
  .wizard-card { padding: 22px 18px; }
  .step-question { font-size: 1.35rem; }
  .kit-chip, .demo-clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ══ Jasmine crosswalk additions (2026-08-07) ═══════════════════ */

/* Intake mode toggle */
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mode-toggle { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.mode-btn { padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--ink); }
.mode-btn.is-on { background: var(--teal); color: #fff; }
.mode-btn:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }
.config-pill { font-size: 0.76rem; color: var(--teal-dark); background: var(--teal-tint); border: 1px dashed var(--teal); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.glove-dot-ehr { background: var(--blue); }

/* Full accession form */
.wizard-card.is-fullform { max-height: calc(100vh - 245px); overflow-y: auto; }
.acc-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 12px; overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.acc-num { color: var(--teal-dark); background: var(--teal-tint); border-radius: 6px; padding: 1px 7px; font-size: 0.8rem; }
.src-chip { margin-left: auto; font-size: 0.7rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; letter-spacing: 0.02em; }
.src-ehr { background: var(--blue-tint); color: #1d4ed8; }
.src-bench { background: var(--amber-tint); color: var(--amber); }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 12px 14px; }
.acc-field { display: flex; flex-direction: column; gap: 4px; }
.acc-field.is-wide { grid-column: 1 / -1; }
.acc-label { font-size: 0.74rem; font-weight: 600; color: #64748b; letter-spacing: 0.02em; }
.acc-input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.acc-input.mono { font-family: var(--mono); font-size: 0.88rem; }
.acc-input:focus-visible { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.acc-textarea { resize: vertical; font-size: 0.9rem; }
.acc-toggle { align-self: flex-start; min-width: 58px; text-align: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.acc-toggle.is-on { background: var(--amber-tint); border-color: var(--amber); color: var(--amber); }
.acc-toggle:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }
.acc-auto { color: #64748b; font-size: 0.85rem; padding: 8px 0; }
.acc-foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.acc-ruling { flex: 1; background: var(--green-tint); color: #065f46; border-radius: 8px; padding: 10px 13px; font-size: 0.85rem; }

/* Stage KPI strip (status board) */
#boardKpis { align-items: stretch; }
.stage-kpi { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 86px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.stage-kpi-n { font-size: 1.35rem; font-weight: 700; font-family: var(--mono); }
.stage-kpi-l { font-size: 0.72rem; color: #64748b; white-space: nowrap; }
.stage-kpi.is-zero .stage-kpi-n { color: #94a3b8; }
.stage-kpi.is-on { border-color: var(--teal); background: var(--teal-tint); }
.stage-kpi.is-on .stage-kpi-n, .stage-kpi.is-on .stage-kpi-l { color: var(--teal-dark); }
.stage-kpi:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }
#boardFilters .config-pill { margin-left: auto; }

/* Stage badges — early stages neutral→amber, processing blue, terminal green */
.b-stg-accessioned { background: #eef2f7; color: #475569; }
.b-stg-grossed { background: var(--amber-tint); color: var(--amber); }
.b-stg-in_solution { background: var(--blue-tint); color: #1d4ed8; }
.b-stg-embedding { background: #ede9fe; color: #6d28d9; }
.b-stg-sectioning { background: #e0f2fe; color: #0369a1; }
.b-stg-staining { background: #fce7f3; color: #be185d; }
.b-stg-ready_for_lab { background: var(--green-tint); color: #065f46; }

/* Expandable row: stepper + cassette table */
.board-row { cursor: pointer; }
.board-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.board-row.is-open td { background: var(--teal-tint); }
.row-chev { display: inline-block; width: 14px; color: var(--teal-dark); }
.detail-row td { background: var(--surface); padding: 14px 18px 16px; border-bottom: 2px solid var(--teal); }
.detail-wrap { display: flex; flex-direction: column; gap: 14px; }
.sp-track { display: flex; align-items: flex-start; }
.sp-node { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.sp-node::before { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.sp-node:first-child::before { display: none; }
.sp-node.is-done::before, .sp-node.is-current::before { background: var(--teal); }
.sp-dot { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid var(--line); z-index: 1; }
.sp-node.is-done .sp-dot { background: var(--teal); border-color: var(--teal); }
.sp-node.is-current .sp-dot { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.18); }
.sp-label { font-size: 0.72rem; color: #64748b; white-space: nowrap; }
.sp-node.is-current .sp-label { color: var(--teal-dark); font-weight: 700; }
.cassette-table { width: auto; min-width: 420px; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cassette-table th { text-align: left; font-size: 0.72rem; letter-spacing: 0.03em; color: #64748b; padding: 7px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.cassette-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.cassette-table tr:last-child td { border-bottom: none; }
.cassette-note { font-size: 0.75rem; color: var(--teal-dark); }
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; border-top: 1px dashed var(--line); padding-top: 10px; }
.ext-pair { display: flex; gap: 8px; font-size: 0.82rem; align-items: baseline; }
.ext-k { flex: 0 0 84px; font-size: 0.72rem; font-weight: 600; color: #64748b; letter-spacing: 0.02em; }
.ext-v { color: var(--ink); }

@media (max-width: 900px) {
  .acc-grid { grid-template-columns: 1fr; }
  .stage-kpi { min-width: 68px; }
}

/* ── Dummy login (scanner / demo gate) ─────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, #cceeea 0%, transparent 55%),
    var(--surface);
}
.login-shell { width: 100%; max-width: 420px; }
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.login-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--teal); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center;
}
.login-product { font-size: 0.95rem; font-weight: 600; }
.login-kit {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--teal-dark); margin-top: 2px;
}
.login-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.login-sub { margin-top: 6px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.45; }
.login-form { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; }
.login-label {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-2);
  letter-spacing: 0.02em; margin-top: 8px;
}
.login-input {
  font: inherit; font-size: 0.95rem;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; background: #fff; color: var(--ink);
}
.login-input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.login-error {
  margin-top: 10px; font-size: 0.85rem; color: var(--red);
  background: var(--red-tint); border-radius: 8px; padding: 8px 10px;
}
.login-submit {
  margin-top: 16px; font: inherit; font-weight: 600; font-size: 0.95rem;
  border: none; border-radius: 8px; cursor: pointer;
  padding: 12px 16px; background: var(--teal); color: #fff;
}
.login-submit:hover { background: var(--teal-dark); }
.login-hint {
  margin-top: 16px; text-align: center;
  font-size: 0.78rem; color: var(--ink-3);
}
