/* Pack 14 Platform console components. Tokens only. */

/* Bar rows that are links to their records (R1 C04) */
.hbar-link { display: block; color: inherit; border-radius: var(--r-sm); padding: 2px 4px; margin: 0 -4px; }
.hbar-link:hover { background: var(--surface-sunk); }

/* Attention list: one row per alert, whole row is the link */
.alist { display: grid; }
.arow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); color: inherit; min-height: var(--tap); }
.arow:last-child { border-bottom: 0; }
.arow:hover { background: var(--surface-2); }
.arow .ai { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--grey-tint); color: var(--grey-ink); }
.arow .ai.bad { background: var(--bad-tint); color: var(--bad-ink); }
.arow .ai.warn { background: var(--warn-tint); color: var(--warn-ink); }
.arow .ai.info { background: var(--info-tint); color: var(--info-ink); }
.arow .ai.purple { background: var(--primary-tint); color: var(--primary-ink); }
.arow .at { min-width: 0; display: grid; gap: 2px; }
.arow .at strong { font-size: 13.5px; font-weight: 600; }
.arow .at small { font-size: 12.5px; color: var(--muted); }
.arow .ar { display: flex; gap: 8px; align-items: center; color: var(--muted); }

/* Metadata-only banner shown on console pages that describe one clinic */
.meta-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r); background: var(--surface-sunk); color: var(--text-2); font-size: 13px; margin-bottom: var(--s4); }
.meta-banner .icon { flex-shrink: 0; margin-top: 2px; color: var(--grey-ink); }

/* Readiness checklist */
.checklist { display: grid; gap: 0; }
.checklist .ci { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.checklist .ci:last-child { border-bottom: 0; }
.checklist .ci .icon { margin-top: 2px; }
.checklist .ci.ok .icon { color: var(--ok-ink); }
.checklist .ci.bad .icon { color: var(--bad-ink); }
.checklist .ci.grey .icon { color: var(--grey-ink); }
.checklist .ci small { display: block; color: var(--muted); font-size: 12.5px; }

/* Countdown and grant summary */
.grant-box { border: 1px solid var(--primary-tint-2); background: var(--primary-tint); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 10px; }
.grant-box.ended { border-color: var(--border); background: var(--surface-sunk); }
.grant-box .big { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Result figure for the patients-touched tool */
.result-figure { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px; border-radius: var(--r-card); background: var(--surface-2); border: 1px solid var(--border); }
.result-figure .n { font-size: 34px; font-weight: 800; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; }

/* Small two-column definition grid for dense cards */
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.mini-grid .lbl { font-size: 11.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.mini-grid .v { font-size: 15px; font-weight: 600; }
.mini-grid a.v { color: var(--primary-ink); }

/* Announcement preview */
.ann-preview { border-radius: var(--r); border: 1px solid var(--info-line); background: var(--info-tint); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text); }

@media (max-width: 1279px) {
  .arow { padding: 11px 14px; }
}
@media (max-width: 1023px) {
  .arow { min-height: var(--tap); }
  .hbar-link { padding: 6px 4px; }
}
@media (max-width: 767px) {
  .arow { grid-template-columns: 32px minmax(0, 1fr); }
  .arow .ar { grid-column: 2; }
  .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .result-figure .n { font-size: 28px; }
}

/* Console switches meet the 44 px touch rule under 1024 (R5 V06). The shared
   .switch is 38 x 22; a shared fix is requested in _generator/requests/14.md. */
@media (max-width: 1023px) {
  .shell:has(.side.console) .switch { width: 48px; height: 28px; border-radius: 14px; }
  .shell:has(.side.console) .switch::after { width: 22px; height: 22px; }
  .shell:has(.side.console) .switch.on::after { left: 23px; }
}

/* Console columns: cards keep their natural height instead of stretching to the taller column */
.shell:has(.side.console) .grid > .stack { align-content: start; }

/* Actions that live in a table column on desktop, repeated under the cards on phones */
.p14-phone-only { display: none; }
@media (max-width: 767px) { .p14-phone-only { display: block; } }
.result-figure > .stack { flex: 1 1 260px; min-width: 0; }
@media (max-width: 1279px) { .shell:has(.side.console) .grid > .c4.l-full { grid-column: span 12; } }
