/* ==========================================================================
   Nanto Health Design System  ·  "Ward Light" v1.1 (Cerulean)
   Implements docs/DESIGN-SYSTEM.md. Loaded AFTER Tabler 1.6.1, which ships its
   own Bootstrap 5.3 build and is kept as reset + grid + utilities + components.
   This file owns colour, type, the clinical primitives Tabler has no component
   for, the flowsheet strip and print. No !important walls: Tabler is re-skinned
   through its own --tblr-* variables, and the few !important left are
   classified in tests/test_css_debt_policy.py. Bootstrap itself, and the --bs-* bridge
   that re-skinned it, were deleted in #246 with the last page that loaded it.
   Light mode only, by decision (bright wards, glossy tablets).
   ========================================================================== */

/* ---- Tokens: THE source, one file, read by nh.css and any future theme ----
   Values live in static/css/nh-tokens.css and are mirrored into
   docs/DESIGN-SYSTEM.md section 10.1 by scripts/build_design_tokens.py.
   Do not re-declare a --nh-* on :root here: it would win the cascade quietly
   and recreate the second copy this file used to carry.

   @import must stay ABOVE every rule in this file, including the @font-face:
   a browser ignores a stylesheet imported after the first rule, which loses the
   whole palette without an error. tests/test_design_tokens.py asserts the order.

   Known cost, accepted: the imported URL carries no content hash, unlike the
   static_url() one on nh.css itself, so a returning browser can serve a cached
   token file for its heuristic freshness window after a token change (colours
   only, self-healing on the next revalidation). Closing it belongs in a
   Cache-Control policy on /static, which fixes every unversioned asset at once,
   not in a second copy of the tokens here. */
@import url("nh-tokens.css");

/* ---- Inter (self-hosted, offline-safe, tabular figures) ---------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
}

/* ---- Base -------------------------------------------------------------- */
body {
  background:var(--nh-n50); color:var(--nh-n900);
  font-family:var(--nh-font-sans); font-size:15px; line-height:1.5;
  font-optical-sizing:auto; -webkit-font-smoothing:antialiased;
}
.nh-num, td.num, .running-total, .nh-flowsheet input,
.tabular { font-variant-numeric:tabular-nums; }

h1,.h1,h2,.h2,h3,.h3 { color:var(--nh-n800); letter-spacing:-.01em; font-weight:600; }
h1,.h1 { letter-spacing:-.015em; }
.text-muted { color:var(--nh-n500)!important; }
/* Screen-reader-only text that stays in NORMAL FLOW. Bootstrap's
   .visually-hidden is position:absolute, and an absolute box ignores the
   overflow of an unpositioned ancestor, so inside .table-responsive it
   escaped the scroll wrapper and stretched the document sideways at 320px
   (found by the #303 gate). Static, 1px, clipped: safe inside any table. */
.nh-sr-only { display:inline-block; width:1px; height:1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap; }
/* Tabler's .btn-link carries its own blue (#077cea, 4.13:1 on white at body
   size), which no token bridge reaches, so it sat off-palette and under AA
   (axe color-contrast, #303). It joins the link tokens the bridge already
   names in nh-tokens.css. */
.btn-link { color:var(--tblr-link-color); }
.btn-link:hover { color:var(--tblr-link-hover-color); }
/* Tabler 1.6 builds text-bg-* fills from --tblr-success / --tblr-warning with
   color-mix, so the fill now follows the Ward Light tokens (a dark green and a
   dark amber) and the vendor's own white ink is the AA pair: 5.6:1 and 5.7:1.
   Under 1.5 the fill was Tabler's own pale green and amber, which is why this
   file used to darken the ink to n900. That override is deleted with the upgrade
   (ui-tabler-alignment W2): keeping it would put dark ink on a dark fill. */
a { text-decoration:none; }
a:hover { text-decoration:underline; }

/* Section overline label */
.nh-overline, .text-uppercase.small, h2.text-uppercase {
  font-size:12px; line-height:16px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase; color:var(--nh-n600);
}

/* ---- Icons: the self-hosted Lucide sprite (DESIGN-SYSTEM 6) ------------ */
/* <svg class="nh-i"><use href="/static/icons/nh-sprite.svg#name"/></svg>
   Sized in em so existing font-size styling keeps working; colour follows
   currentColor like the icon font it replaces. */
.nh-i {
  width:1em; height:1em; flex:none;
  vertical-align:-0.125em; display:inline-block;
}

/* ---- Focus (all interactive) ------------------------------------------ */
:is(.btn,.nh-chip,a,input,select,textarea,summary,button):focus-visible {
  outline:2px solid var(--nh-cerulean-500); outline-offset:2px;
  box-shadow:var(--nh-focus-ring);
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  font-weight:600; letter-spacing:0;
  display:inline-flex; align-items:center; justify-content:center; gap:var(--nh-s2);
  transition:background-color var(--nh-dur-fast) var(--nh-ease),
             border-color var(--nh-dur-fast) var(--nh-ease),
             box-shadow var(--nh-dur-fast) var(--nh-ease);
}
/* .btn-primary, .btn-outline-primary, .btn-outline-secondary, .btn-danger and
   .btn-outline-danger carried a --bs-btn-* re-skin here until #246. Tabler
   derives every one of those states from --tblr-primary, --tblr-danger and
   --tblr-secondary, which nh-tokens.css bridges, so the rules were inert from
   the moment shell.html swapped and unreachable everywhere once the last
   template moved. Proved inert by computed style on five pages before deleting,
   rather than by reading the stylesheet and believing it. */
.btn-brand { background:var(--nh-cerulean-600); border-color:var(--nh-cerulean-600); color:#fff; }
.btn-brand:hover { background:var(--nh-cerulean-700); border-color:var(--nh-cerulean-700); color:#fff; }
/* commit actions on tablet get the tall control height */
@media (pointer:coarse) {
  .btn:not(.btn-sm) { min-height:48px; }
}

/* ---- Forms / inputs ---------------------------------------------------- */
.form-control, .form-select {
  border:1px solid var(--nh-n300); border-radius:var(--nh-r-control);
  color:var(--nh-n900); background:var(--nh-n0);
  min-height:var(--nh-control-h); font-size:16px;
}
.form-control-sm, .form-select-sm { min-height:calc(var(--nh-control-h) - 6px); font-size:15px; }
.form-control:focus, .form-select:focus {
  border-color:var(--nh-cerulean-600); box-shadow:var(--nh-focus-ring); outline:none;
}
.form-control::placeholder { color:var(--nh-n400); }
.form-label { color:var(--nh-n700); font-size:13px; font-weight:500; letter-spacing:.01em; margin-bottom:6px; }
.form-label.small, .form-label.mb-0 { margin-bottom:4px; }
/* iOS: never auto-zoom on focus. All entry fields >=16px. */
input, select, textarea { font-size:16px; }

/* ---- Cards: ONE canonical card (P0.3) ----------------------------------
   Tabler's .card and the section card .nh-sec share the exact same chrome, so
   the two render identically. Do not fork their look.

   `.nh-card` used to head this list and carry the "canonical" label, but no
   template ever rendered it: every card on every page is Tabler's `.card` or
   `.nh-sec`. It was deleted in #459 rather than left as a third name for a
   thing with two. DESIGN-DOCTRINE 5.4 gives Tabler the FORM of a component it
   ships, which is why the canonical card is now the vendor's, not ours. */
.card, .nh-sec {
  background:var(--nh-n0); border:var(--nh-border); border-radius:var(--nh-r-card);
  box-shadow:var(--nh-shadow-xs);
}
.card.shadow-sm { box-shadow:var(--nh-shadow-sm)!important; }
.nh-sec { padding:var(--nh-s5); }
.nh-sec { margin-bottom:var(--nh-s5); }

/* ---- Tables ------------------------------------------------------------ */
.table { margin-bottom:0; }
.table > thead, .table > thead th, .table-light, thead.table-light th {
  background:var(--nh-n50); color:var(--nh-n600);
  font-size:12px; font-weight:600; letter-spacing:.05em; text-transform:uppercase;
  border-bottom:1px solid var(--nh-n200);
}
.table > tbody > tr > td { border-bottom:1px solid var(--nh-n100); vertical-align:middle; }
.table > :not(caption) > * > * { padding:.6rem .75rem; }
.running-total { font-variant-numeric:tabular-nums; }

/* ---- Chips: the shared pill geometry for both chip families -------------
   The legacy .state-chip / .st-<State> family that used to live here is gone.
   app/templating.py's chip_class filter had already declared it retired, but
   the rules outlived the declaration and three templates were still reaching
   for them to colour things that are not session states at all: a payer's
   pre-auth decision, a static "Post-session" document label, and a "Saved"
   acknowledgement. Workflow state is .nh-chip--<slug> (below, one per
   SessionState); pre-auth is .pa-* ; neither is a general-purpose tint. */
.pa-chip, .nh-chip {
  display:inline-flex; align-items:center; gap:5px; height:24px;
  padding:0 10px; border-radius:var(--nh-r-pill);
  font-size:12.5px; font-weight:600; letter-spacing:.02em; white-space:nowrap;
  line-height:1;
}

.pa-valid { background:var(--nh-success-bg); color:var(--nh-success); }
.pa-warn  { background:var(--nh-warning-bg); color:var(--nh-warning); }
.pa-bad   { background:var(--nh-danger-bg);  color:var(--nh-danger); }
.pa-none  { background:var(--nh-n100);       color:var(--nh-n500); }

.role-chip {
  font-size:11px; text-transform:uppercase; letter-spacing:.04em;
  padding:.2rem .55rem; border-radius:var(--nh-r-pill);
  background:var(--nh-cerulean-50); color:var(--nh-cerulean-800); font-weight:600;
}

/* The canonical state chip: ONE variant per SessionState, all nine, together.
   app/templating.py maps every state through `chip_class`, so a state whose
   variant is missing here does not fall back to anything: it renders a
   transparent pill with body-grey text and no clinical signal at all.

   That is not hypothetical. `--awaitsign` and `--clinsigned` were never written,
   while the filter mapped both, so "Awaiting sign" and "Clinically signed" have
   rendered colourless since the family was introduced (#24), on the Today board
   and the floor board among others. They are the two sides of the doctor
   signature handoff, which is the pair a biller and a nephrologist most need to
   tell apart. Both tokens existed and DESIGN-SYSTEM 2.4 specified both rows;
   only these two rules were missing. Found by #248 while building the
   vocabulary, and tests/test_state_chips.py now enumerates SessionState so the
   tenth state cannot ship the same way.

   Two of these were also 180 lines further down the file, which is how the set
   came to look complete at a glance. One block now. */
.nh-chip .nh-i { width:14px; height:14px; }
.nh-chip--scheduled  { background:var(--nh-st-scheduled-bg);  color:var(--nh-st-scheduled); }
.nh-chip--checkedin  { background:var(--nh-st-checkedin-bg);  color:var(--nh-st-checkedin); }
/* In-session is the single FILLED chip in the system, by decision: it is the
   live clinical moment and must dominate a glance at the Today board
   (DESIGN-SYSTEM 2.4). Solid fill plus a pulsing dot, not a tint. */
.nh-chip--insession  { background:var(--nh-st-insession);     color:#fff; }
.nh-chip--insession::before {
  content:""; width:6px; height:6px; border-radius:50%;
  background:var(--nh-st-insession-dot); animation:nh-pulse 2s var(--nh-ease) infinite;
}
.nh-chip--discharged { background:var(--nh-st-discharged-bg); color:var(--nh-st-discharged); }
.nh-chip--awaitsign  { background:var(--nh-st-awaitsign-bg);  color:var(--nh-st-awaitsign); }
.nh-chip--clinsigned { background:var(--nh-st-clinsigned-bg); color:var(--nh-st-clinsigned); }
.nh-chip--claimready { background:var(--nh-st-claimready-bg); color:var(--nh-st-claimready); }
.nh-chip--submitted  { background:var(--nh-st-submitted-bg);  color:var(--nh-st-submitted); }
.nh-chip--blocked    { background:var(--nh-st-blocked-bg);    color:var(--nh-st-blocked); }
.nh-chip--notattended { background:var(--nh-st-notattended-bg); color:var(--nh-st-notattended); }
/* Not a workflow state: settings_dha_field_test.html uses this for statuses that need a person's attention (verification required, revoked, expired).
   It wore the chip family's class with no rule from the day that page shipped
   and rendered as a transparent pill, the exact defect #248 documents; found
   by the all-pages visual contract (#309). Semantic warning tokens, because
   "attention" is a meaning, not a SessionState. */
.nh-chip--attention  { background:var(--nh-warning-bg);       color:var(--nh-warning); }

/* ---- The clinical component vocabulary (#248) ---------------------------
   Rendered by app/templates/partials/_clinical.html. Four components built
   once, because this application had four patient headers and four chip
   families before it, none of which agreed with the others.
   Tabler ships no component for any of these: a patient identity banner, a
   clinical result with a reference range and an always-visible alert strip are
   clinical primitives, which is the half of DESIGN-DOCTRINE 5.4 that Ward Light
   owns. Everything they sit on (card chrome, alert, radius, type) is Tabler's.
   ------------------------------------------------------------------------ */

.nh-banner {
  display:grid; gap:var(--nh-s3);
  padding:var(--nh-s4); margin-bottom:var(--nh-s5);
  background:var(--nh-n0); border:var(--nh-border); border-radius:var(--nh-r-card);
  box-shadow:var(--nh-shadow-xs);
}
/* flex-wrap, because the row carries a back control, an avatar, a name and up
   to three actions. Without it the banner exceeds a 320px viewport and takes
   the whole document into horizontal scroll, which is the same regression the
   old console_patient header had already been patched for. */
.nh-banner__identity { display:flex; align-items:center; gap:var(--nh-s3); min-width:0; flex-wrap:wrap; }
.nh-banner__avatar {
  /* Built on Tabler .avatar (shape, centring, cover); this sets the banner size and fill. */
  width:44px; height:44px; border-radius:50%; flex:none; overflow:hidden;
  background:var(--nh-cerulean-100); color:var(--nh-cerulean-800);
  font-weight:700; font-size:16px;
}
.nh-banner__avatar img { width:100%; height:100%; object-fit:cover; }
.nh-banner__avatar .nh-i { width:22px; height:22px; }
/* The roster-row variant of the same avatar. A list row is not a banner, so it
   gets the smaller size and the neutral fill (a patient is not a role, so no
   role colour), but it is the SAME component rather than another hand-rolled
   circle: console_patients.html carried eight inline style declarations here,
   which is the habit partials/_clinical.html exists to end. */
.nh-banner__avatar--row {
  width:30px; height:30px; font-size:12.5px; font-weight:600;
  background:var(--nh-n200); color:var(--nh-n600);
}
.nh-banner__avatar--row .nh-i { width:16px; height:16px; }
/* The care-team variant. A staff member is not a patient, so the fill is their
   care role (CARE_ROLES in app/services/careteam.py) rather than a palette
   choice, so it is the one thing the template still supplies; the role LABEL is
   always shown beside it, so the colour is never the sole carrier of meaning.
   White on a solid fill is the same exception the in-session chip makes. The
   other eight declarations were inline on console_patient.html (#249). */
.nh-banner__avatar--staff {
  width:40px; height:40px; font-size:14px; font-weight:600;
  background:var(--nh-n500); color:#fff;
}

.nh-banner__who { min-width:0; }
.nh-banner__name {
  display:flex; align-items:center; gap:var(--nh-s2); flex-wrap:wrap;
  margin:0; font-size:18px; line-height:24px; font-weight:650;
  color:var(--nh-n900); letter-spacing:-.01em;
}
.nh-banner__ids {
  margin:2px 0 0; color:var(--nh-n500); font-size:12.5px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.nh-banner__actions { margin-left:auto; display:flex; gap:var(--nh-s2); flex-wrap:wrap; }

/* The facts band. auto-fit rather than a fixed column count: the registry in
   app/chart_sections.py contributes a different number of items per patient
   (a dialysis patient carries four more than a general one), so a fixed grid
   would leave holes on one chart and overflow another. */
.nh-banner__facts {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(104px, 1fr));
  gap:var(--nh-s2) var(--nh-s5); margin:0;
  padding-top:var(--nh-s3); border-top:1px solid var(--nh-n100);
}
.nh-banner__fact { min-width:0; }
.nh-banner__fact dt {
  margin:0; color:var(--nh-n500); font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em;
}
.nh-banner__fact dd {
  margin:2px 0 0; color:var(--nh-n800); font-size:12.5px; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* Tone rides on the VALUE, not the label, so scanning the row of values is
   what surfaces the abnormal one. */
.nh-banner__fact--ok dd     { color:var(--nh-success); }
.nh-banner__fact--warn dd   { color:var(--nh-warning); }
.nh-banner__fact--danger dd { color:var(--nh-danger); }

/* The alert strip stacks, which is Ward Light's one declared deviation from
   Tabler's alert (DESIGN-DOCTRINE 5.4); this rule only places the icon beside
   the content within that. */
/* The spacing here is not a fresh choice, it reproduces what the three call
   sites carried as utilities before the strip became a component: py-2, mb-3,
   and me-2 / mt-1 on the icon. An independent review caught that the first
   version dropped the padding and the bottom margin while the commit claimed
   the behaviour was unchanged, which on the live-session screen is a real
   layout shift. Measured equal to origin/main after this rule. */
.nh-alert-strip {
  display:flex; align-items:flex-start; gap:var(--nh-s2);
  padding-top:.5rem; padding-bottom:.5rem; margin-bottom:1rem;
}
.nh-alert-strip > .nh-i { width:17px; height:17px; flex:none; margin-top:.25rem; }

/* ---- Shared clinical workstation primitives -------------------------- */
.nh-icon-button {
  width:40px; height:40px; padding:0; border:1px solid transparent;
  border-radius:var(--nh-r-control); background:transparent; color:var(--nh-n700);
  display:inline-flex; align-items:center; justify-content:center; text-decoration:none;
}
.nh-icon-button:hover { background:var(--nh-n100); color:var(--nh-n900); }
.nh-icon-button:focus-visible { outline:0; box-shadow:var(--nh-focus-ring); }

/* The tone-based chip: a label that carries a tone but is NOT a SessionState
   (a claim queue's "Awaiting SHA", a consultation's "Ready to sign"). It is not
   folded into .nh-chip--* because its LABEL is a sentence about what to do
   next, not a state name, and because warning and danger carry their tone in
   the SHAPE of the mark (a dash and a rotated square) as well as its colour.
   Success, info and neutral all share the round dot, so on those three the
   label is the whole signal and the colour only reinforces it. That is a real
   gap, named here rather than left to be discovered: giving the other three
   marks their own shapes is a design decision about a component four claim and
   pre-auth pages already render, so it belongs to its own ticket, not to
   #249's adoption pass. Nothing renders tone by colour ALONE either way.
   12.5px, not the 11.5px it carried: DESIGN-SYSTEM 3 puts chips at 12.5px and
   12px is the smallest named role in the scale, so this rendered off-scale on
   every claim and pre-auth page. It was recorded as `type-floor:span:11.5px`
   debt against /claims, /console/preauth and /console/preauth/* in the visual
   contract baseline, and #249 pays those three down rather than adding a
   fourth by composing the chip on another page. */
.nh-status-chip {
  display:inline-flex; align-items:center; gap:6px;
  min-height:24px; padding:2px 8px; border:1px solid var(--nh-n300);
  border-radius:var(--nh-r-pill); background:var(--nh-n50); color:var(--nh-n700);
  font-size:12.5px; font-weight:700; line-height:1.2; white-space:nowrap;
}
.nh-status-mark { width:7px; height:7px; border-radius:50%; flex:none; background:var(--nh-n500); }
.nh-status-chip--success { border-color:var(--nh-success-border); background:var(--nh-success-bg); color:var(--nh-success); }
.nh-status-chip--success .nh-status-mark { background:var(--nh-success); }
.nh-status-chip--warning { border-color:var(--nh-warning-border); background:var(--nh-warning-bg); color:var(--nh-warning); }
.nh-status-chip--warning .nh-status-mark { width:8px; height:2px; border-radius:0; background:var(--nh-warning); }
.nh-status-chip--danger { border-color:var(--nh-danger-border); background:var(--nh-danger-bg); color:var(--nh-danger); }
.nh-status-chip--danger .nh-status-mark { width:8px; height:8px; border-radius:1px; background:var(--nh-danger); transform:rotate(45deg); }
.nh-status-chip--info { border-color:var(--nh-info-border); background:var(--nh-info-bg); color:var(--nh-info); }
.nh-status-chip--info .nh-status-mark { background:var(--nh-info); }

.nh-work-queue-frame { min-width:0; }
.nh-queue-tabs {
  display:flex; align-items:stretch; gap:0; overflow-x:auto;
  border-bottom:1px solid var(--nh-n200); scrollbar-width:thin;
}
.nh-queue-tabs a {
  min-height:42px; padding:0 13px; display:inline-flex; align-items:center; gap:7px;
  border-bottom:2px solid transparent; margin-bottom:-1px;
  color:var(--nh-n600); font-size:13px; font-weight:650; white-space:nowrap; text-decoration:none;
}
.nh-queue-tabs a[aria-current="page"] { border-bottom-color:var(--nh-cerulean-600); color:var(--nh-n900); }
.nh-filter-toolbar {
  min-height:52px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 0; border-bottom:1px solid var(--nh-n200);
}
.nh-filter-toolbar .form-control,
.nh-filter-toolbar .form-select { width:auto; min-width:150px; }
.nh-data-grid-wrap { width:100%; overflow:auto; overscroll-behavior:contain; }
.nh-data-grid { width:100%; min-width:760px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.nh-data-grid th {
  position:sticky; top:0; z-index:2; height:40px; padding:0 10px;
  border-bottom:1px solid var(--nh-n300); background:var(--nh-n50);
  color:var(--nh-n600); font-size:11px; text-transform:uppercase; letter-spacing:.04em;
}
.nh-data-grid td { height:44px; padding:6px 10px; border-bottom:1px solid var(--nh-n100); vertical-align:middle; }
.nh-data-grid tbody tr:hover { background:var(--nh-cerulean-50); }
.nh-data-grid tbody tr[aria-selected="true"] { background:var(--nh-cerulean-100); }
/* Cells wrap; they do not truncate. This grid used to ellipsis every cell on
   one line, which on the biller's worklist cut "Overdue since 03 Jun 2026"
   down to "Overdue sin..." on every overdue row: the date is the entire point
   of the column. A two-line cell is taller than the 44px rhythm and worth it.
   `height` on a td is a minimum, so short rows keep the rhythm.
   Numbers stay on one line so the tabular column still re-tallies visibly. */
/* Headers wrap rather than truncate, for the same reason the cells do: a
   column called "CHA..." is a column with no name. */
.nh-data-grid th { overflow-wrap:anywhere; }
.nh-data-grid td { overflow-wrap:anywhere; }
.nh-data-grid td.running-total, .nh-data-grid td.text-end { white-space:nowrap; }
/* The worklists (claims, preauthorizations) now sit on the Tabler table and keep
   the same decision: cells wrap, money does not. `.nh-worklist` is the hook the
   visual contract and this rule share. */
/* Positioned so a `.visually-hidden` header ("Open") has this table, not the
   page, as its containing block. Absolutely positioned and unclipped by the
   scroller, it otherwise sat at the table's far right edge and widened the
   whole page by the table's overflow (427px at 320px). */
.nh-worklist { position:relative; }
.nh-worklist th, .nh-worklist td { overflow-wrap:anywhere; }
.nh-worklist td.text-end { white-space:nowrap; }

.nh-error-summary {
  margin-bottom:var(--nh-s4); padding:14px 16px;
  border:1px solid var(--nh-danger-border); border-left:4px solid var(--nh-danger);
  border-radius:var(--nh-r-card); background:var(--nh-danger-bg);
}
.nh-error-summary:focus { outline:0; box-shadow:var(--nh-focus-ring); }
.nh-error-summary__head { display:flex; gap:10px; align-items:flex-start; }
.nh-error-summary__head .nh-i { color:var(--nh-danger); margin-top:2px; }
.nh-error-summary h2 { margin:0; color:var(--nh-danger); font-size:14px; }
.nh-error-summary p { margin:2px 0 0; color:var(--nh-n600); font-size:12.5px; }
.nh-error-summary ol { margin:10px 0 0 22px; padding:0; }
.nh-error-summary li { padding:3px 0 5px 3px; color:var(--nh-n800); font-size:12.5px; }
.nh-error-summary li strong { display:inline-block; min-width:140px; }
.nh-error-summary li small { display:block; margin-left:140px; color:var(--nh-n600); }

/* The inspector is a Tabler offcanvas; this only sets its width and keeps the
   iframe filling the body. The docked-beside-the-page behaviour at 1280px and
   up is the body.nh-inspector-open rule below, which the vendor does not have. */
.nh-record-inspector { --bs-offcanvas-width:clamp(440px,38vw,720px); }
.nh-record-inspector .offcanvas-header { border-bottom:1px solid var(--nh-n200); }
.nh-record-inspector .offcanvas-title { font-size:15px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nh-inspector-scrim[hidden] { display:none; }
.nh-document-viewer header {
  height:56px; display:flex; align-items:center; gap:12px; padding:0 12px 0 16px;
  border-bottom:1px solid var(--nh-n200); background:var(--nh-n0);
}
.nh-document-viewer h2 {
  margin:0; color:var(--nh-n900); font-size:15px; flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.nh-record-inspector iframe { width:100%; height:100%; border:0; background:var(--nh-n50); }
.nh-document-viewer iframe { width:100%; height:calc(100% - 56px); border:0; background:var(--nh-n50); }
.nh-inspector-scrim {
  position:fixed; inset:0; z-index:1040; border:0; background:rgba(15,32,31,.42);
}
@media (min-width:1280px) {
  body.nh-inspector-open .page-wrapper { margin-right:clamp(440px,38vw,720px); }
  body.nh-inspector-open .nh-inspector-scrim { display:none; }
}

.nh-document-viewer {
  width:min(1120px,calc(100vw - 48px)); height:min(860px,calc(100vh - 48px));
  max-width:none; max-height:none; padding:0; border:1px solid var(--nh-n300);
  border-radius:var(--nh-r-card); background:var(--nh-n0); box-shadow:var(--nh-shadow-lg);
}
.nh-document-viewer::backdrop { background:rgba(15,32,31,.62); }
.nh-document-viewer nav { display:flex; align-items:center; gap:2px; }

/* The prescribing allergy dialog (#508): a small modal on the viewer's tokens. */
.nh-dialog {
  width:min(560px,calc(100vw - 32px)); padding:0; border:1px solid var(--nh-n300);
  border-radius:var(--nh-r-card); background:var(--nh-n0); box-shadow:var(--nh-shadow-lg);
}
.nh-dialog::backdrop { background:rgba(15,32,31,.62); }

body.nh-embedded-surface #nh-sidebar,
body.nh-embedded-surface .nh-app-header,
body.nh-embedded-surface .nh-pilot-banner,
body.nh-embedded-surface .nh-record-inspector,
body.nh-embedded-surface .nh-inspector-scrim,
body.nh-embedded-surface .nh-document-viewer { display:none!important; }
body.nh-embedded-surface .page-wrapper { margin-left:0!important; }

@media (max-width:1279.98px) {
  .nh-record-inspector { --bs-offcanvas-width:min(70vw,720px); }
}
@media (max-width:1023.98px) {
  .nh-record-inspector { --bs-offcanvas-width:100vw; }
}
@media (max-width:767.98px) {
  .nh-error-summary li strong { min-width:0; display:block; }
  .nh-error-summary li small { margin-left:0; }
  .nh-document-viewer { width:100vw; height:100vh; border:0; border-radius:0; }
}
@keyframes nh-pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) {
  * { animation-duration:1ms!important; transition-duration:1ms!important; }
}

/* ---- Alerts ------------------------------------------------------------
   Ward Light's alert is Tabler's alert with two declarations changed. Both are
   deviations under DESIGN-DOCTRINE 5.4, and both have a reason.

   1. It STACKS. Tabler's alert is `display:flex; flex-direction:row`, which
      expects the Tabler anatomy of one icon beside one content block. This
      application writes alerts as several stacked children, which Bootstrap laid
      out as blocks, so the vendor swap silently turned 14 alerts across 11
      templates into horizontal rows: measured at 320px, a three-child alert put
      all three children on one line and took the page's scrollWidth to 426.
      Restoring `display:block` fixes the whole class at once and leaves the
      opt-in intact, because an alert that wants a row already says so with the
      `d-flex` utility, which wins on !important. The alternative, wrapping the
      content of all 14 by hand, stays available if we ever want alert icons.
   2. Its TEXT carries the semantic colour. Tabler leaves alert text at the body
      colour and tints only the background and border. That is the wrong default
      for a clinical surface, where the alert says "preauth expires at 17:00".

   Everything else is Tabler's: padding, radius, tint maths, border derivation.
   That last part is a visible change and not a bug. Tabler derives the fill from
   the SAME Ward Light token, as a 10% mix, so a warning alert is a paler amber
   than the solid --nh-warning-bg the design system names, and its border a 20%
   mix rather than --nh-warning-border. Measured, the text still reads at about
   7:1 on the paler fill. An independent review once read the then-surviving
   --bs-alert-* block and called the semantic colour lost; it was not, and the
   reason is kept here so the next reader does not re-file it.
   There was a var() fallback chain here while alerts rendered under two vendors
   at once. #246 moved the last of the second vendor's pages, so it collapsed to
   the one name, exactly as that comment said it would. */
.alert { border-radius:var(--nh-r-control); border-width:1px; }
.alert {
  display:block;
  color:var(--tblr-alert-color);
}
/* The colour-in-text rule above resolves --tblr-alert-color to near-white on
   the LIGHT variant, which rendered the hint alerts on ten templates as
   invisible text (measured 1.04:1 against a white card, axe color-contrast,
   #303). The four semantic tones keep their colour-in-text deviation
   (DESIGN-DOCTRINE 5.4); the non-semantic light hint reads in body ink. */
.alert-light { color:var(--nh-n600); }

/* ---- Session stepper: dot + hairline connector (design system 5.7) ---- */
.nh-stepper { display:flex; align-items:center; flex-wrap:wrap; min-height:48px; margin:.1rem 0 var(--nh-s4); }
.nh-step { display:inline-flex; align-items:center; gap:.4rem; font-size:13px; color:var(--nh-n500); }
.nh-step-label { line-height:1; }
.nh-step-dot {
  width:12px; height:12px; box-sizing:border-box; border-radius:50%; flex:0 0 auto;
  border:2px solid var(--nh-n300); background:var(--nh-n0);
  display:inline-flex; align-items:center; justify-content:center;
}
.nh-step-check { width:8px; height:8px; stroke:#fff; stroke-width:3; }
.nh-step.is-done { color:var(--nh-n600); }
.nh-step.is-done .nh-step-dot { background:var(--nh-cerulean-600); border-color:var(--nh-cerulean-600); }
.nh-step.is-now { color:var(--nh-n900); font-weight:600; }
.nh-step.is-now .nh-step-dot { background:var(--nh-cerulean-600); border-color:var(--nh-cerulean-600); box-shadow:0 0 0 4px var(--nh-cerulean-100); }
.nh-step-conn { width:24px; height:1px; background:var(--nh-n300); margin:0 .6rem; flex:0 0 auto; }

/* ---- App shell: Tabler navbar-vertical + page-wrapper (#245) ------------
   The sidebar, its collapse at narrow widths, the topbar and both header
   dropdowns are stock Tabler components. What remains here is only what Tabler
   has no component for: the Ward Light brand lockup, the navigation cluster
   heading, MFA state on the avatar, and notification severity. */

.nh-brand {
  display:flex; align-items:center; gap:9px; min-height:var(--nh-header-h);
  padding:12px 16px; color:var(--nh-cerulean-700);
  font-weight:650; font-size:15px; line-height:1.15; white-space:nowrap;
}
.nh-brand:hover { text-decoration:none; }
.nh-brand svg { flex:none; }
.nh-brand-text small {
  display:block; color:var(--nh-n500); font-weight:400; font-size:12px;
  line-height:1.2; overflow:hidden; text-overflow:ellipsis;
}

/* Tabler scopes its navbar palette to `.navbar`, not `:root`, so this half of
   the Ward Light bridge cannot live beside the rest of it in nh-tokens.css: a
   `:root` declaration would be overridden by Tabler's own local defaults. Same
   job, same tokens, and nh-tokens.css points here. */
.navbar {
  --tblr-navbar-bg:var(--nh-n0);
  --tblr-navbar-color:var(--nh-n700);
  --tblr-navbar-hover-color:var(--nh-n900);
  --tblr-navbar-active-color:var(--nh-cerulean-700);
  --tblr-navbar-active-bg:var(--nh-cerulean-50);
  --tblr-navbar-active-border-color:var(--nh-cerulean-600);
  --tblr-navbar-border-color:var(--nh-n200);
}
/* Tabler derives the section title from the navbar colour at 70% opacity, which
   lands at 4.33:1 on white. The Ward Light neutral that clears AA is n600. */
.navbar-vertical[class*=navbar-expand] .navbar-nav .nav-section-title { color:var(--nh-n600); }
/* Tabler hides the title below the expand breakpoint; on a phone the collapsed
   menu still needs its group labels. */
.navbar-vertical .navbar-nav .nav-section-title { display:block; }
/* Tabler marks the active destination only above its expand breakpoint, so on a
   phone every destination looked alike. "Where am I" has to survive the
   collapse, and the active fill is Ward Light's, not a left bar alone. */
.navbar-vertical .nav-item.active > .nav-link {
  color:var(--tblr-navbar-active-color);
  background:var(--tblr-navbar-active-bg);
  font-weight:600;
}

.navbar-folded #nh-sidebar-fold .nh-i { transform:rotate(180deg); }
.navbar-folded .nh-brand-text { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

/* The Lucide sprite fills the icon slots Tabler sizes. */
.nav-link-icon .nh-i { width:100%; height:100%; }
.nh-i-md { width:18px; height:18px; }
.nh-i-lg { width:20px; height:20px; }

.nh-app-header { min-height:var(--nh-header-h); }
.nh-workspace-name { color:var(--nh-n800); font-size:14px; font-weight:650; min-width:0; }
/* Name and role in the header trigger truncate rather than push the menu. */
.nh-account-line { max-width:190px; }
/* Fixed max-widths for truncated cells and filenames (were inline styles). */
.nh-trunc-140 { max-width:140px; }
.nh-trunc-150 { max-width:150px; }
.nh-trunc-180 { max-width:180px; }
.nh-trunc-16rem { max-width:16rem; }

/* Row action menu with forms in it (console_users): wider than a link menu. */
.nh-row-menu { width:300px; max-width:calc(100vw - 16px); }
.nh-account-menu { width:280px; max-width:calc(100vw - 16px); }
/* Not Tabler's .dropdown-header: that uppercases, and this block holds a
   person's name and a facility's name. */
.nh-account-identity {
  padding:10px 12px; margin-bottom:4px; border-bottom:1px solid var(--nh-n100);
}

/* MFA state in the shell (issue #196): "am I protected" is answerable from the
   account menu, and a dot on the avatar shows it before the menu is opened. */
.nh-account-avatar-wrap { position:relative; display:inline-flex; }
.nh-mfa-dot {
  width:8px; height:8px; border-radius:50%; display:inline-block; flex:0 0 auto;
  background:var(--nh-n400);
}
.nh-account-avatar-wrap .nh-mfa-dot {
  position:absolute; right:-1px; bottom:-1px; border:2px solid var(--nh-n0);
  width:12px; height:12px;
}
.nh-mfa-dot--ok   { background:var(--nh-success); }
.nh-mfa-dot--warn { background:var(--nh-warning); }
.nh-mfa-dot--off  { background:var(--nh-danger); }
.nh-account-mfa {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;
  margin:4px 8px; padding:8px 10px; border-radius:var(--nh-r-control);
  font-size:12.5px; font-weight:600; background:var(--nh-n50); color:var(--nh-n700);
}
.nh-account-mfa .nh-account-mfa-detail {
  flex-basis:100%; font-weight:400; color:var(--nh-n500); font-size:11.5px;
}
.nh-account-mfa--ok   { background:var(--nh-success-bg); color:var(--nh-success); }
.nh-account-mfa--warn { background:var(--nh-warning-bg); color:var(--nh-warning); }
.nh-account-mfa--off  { background:var(--nh-danger-bg);  color:var(--nh-danger); }

/* Notification severity on the Tabler list row. */
.nh-notif-item { border-left:3px solid transparent; }
.nh-notif-item--bad  { border-left-color:var(--nh-danger); }
.nh-notif-item--bad .nh-i { color:var(--nh-danger); }
.nh-notif-item--warn { border-left-color:var(--nh-warning); }
.nh-notif-item--warn .nh-i { color:var(--nh-warning); }
.nh-notif-item--info .nh-i { color:var(--nh-cerulean-600); }

/* Profile-page avatar. The shell uses the Tabler avatar; this pair migrates
   with the settings pages, which are a later ticket in the same epic. */
.nh-account-avatar {
  width:36px; height:36px; border-radius:50%; overflow:hidden; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--nh-cerulean-100); color:var(--nh-cerulean-800);
  font-size:12px; font-weight:750;
}
.nh-account-avatar img { width:100%; height:100%; object-fit:cover; }
.nh-account-avatar--profile { width:72px; height:72px; font-size:20px; }
/* Click-the-photo-to-edit affordance on the profile page. */
.nh-avatar-edit { position:relative; display:inline-flex; cursor:pointer; border-radius:50%; }
.nh-avatar-edit:focus-within { box-shadow:var(--nh-focus-ring); }
.nh-avatar-edit .nh-account-avatar { transition:filter .15s ease; }
.nh-avatar-edit:hover .nh-account-avatar { filter:brightness(.82); }
.nh-avatar-edit-badge {
  position:absolute; right:-2px; bottom:-2px; width:24px; height:24px;
  display:flex; align-items:center; justify-content:center;
  background:var(--nh-cerulean-600); color:#fff; border-radius:50%;
  border:2px solid var(--nh-n0);
}
.nh-avatar-edit-badge .nh-i { width:13px; height:13px; color:#fff; }

.nh-error-page {
  max-width:680px; margin:clamp(32px,8vh,96px) auto; padding:clamp(24px,5vw,48px);
  border:1px solid var(--nh-n200); border-radius:var(--nh-r-card);
  background:var(--nh-n0); box-shadow:var(--nh-shadow-sm);
}
.nh-error-code {
  color:var(--nh-cerulean-700); font-size:12px; font-weight:750;
  letter-spacing:.08em; margin-bottom:8px;
}
.nh-error-message { color:var(--nh-n600); max-width:56ch; }
.nh-error-reference { margin:28px 0 0; color:var(--nh-n500); font-size:12px; }
.nh-error-reference code { overflow-wrap:anywhere; }
.nh-error-fragment { scroll-margin-top:calc(var(--nh-header-h) + 12px); }

/* Narrow screens. Tabler collapses the vertical navbar into a top bar with a
   toggler, so the only thing left to hold here is the claim-lines grid. Its
   breakpoint is deliberately 900px, not the shell's 992px: it is about how much
   room four numeric columns need, and it kept that width before the shell
   moved. */
@media (max-width:899.98px) {
  /* Keep the four-column actuals grid inside its phone card. */
  #lines-block .table { table-layout:fixed; width:100%; font-size:.82rem; }
  #lines-block .table > :not(caption) > * > * { padding:.45rem .25rem; }
  #lines-block .table th:first-child { width:40%; }
  #lines-block .table th:nth-child(2) { width:20%; }
  #lines-block .table th:nth-child(3) { width:18%; }
  #lines-block .table th:nth-child(4) { width:22%; }
  #lines-block input[type="number"] { max-width:100%; min-width:0; }
  #lines-block td:first-child { overflow-wrap:anywhere; }
}

@media (max-width:360px) {
  .nh-workspace-name { font-size:13px; }
}

/* Tabler sets `.navbar .navbar-nav .nav-link { min-height: 2.5rem }`, so a
   two-class selector here loses the cascade however late it is loaded. Match its
   shape: 40px is under the 44px minimum target the design system requires on a
   coarse pointer. */
@media (pointer:coarse) {
  .navbar .navbar-nav .nav-link { min-height:44px; }
  /* Tabler sizes the toggler from its icon, which lands at 32px. It is the only
     way to reach navigation on a phone, so it takes the same minimum as the
     destinations it opens. */
  .navbar-toggler { min-width:44px; min-height:44px; }
}

/* ---- Hub tabs (underline style, per DESIGN-SYSTEM 5.7) ------------------ */
.nh-tabs {
  display:flex; gap:2px; flex-wrap:wrap;
  border-bottom:1px solid var(--nh-n200); margin-bottom:var(--nh-s5);
}
.nh-tabs a {
  display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 14px;
  font-size:14px; font-weight:600; color:var(--nh-n600); text-decoration:none;
  border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap;
}
.nh-tabs a:hover { color:var(--nh-n800); text-decoration:none; }
.nh-tabs a.active { color:var(--nh-n900); border-bottom-color:var(--nh-cerulean-600); }

/* ---- Legacy claims-page scaffolding (old shell classes, kept until those
        pages migrate fully to nh- components) --------------------------- */
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:var(--nh-s6); }
.page-title { font-size:1.3rem; font-weight:600; color:var(--nh-n800); margin:0; }
.badge-online   { background:var(--nh-success-bg); color:var(--nh-success); }
.badge-degraded { background:var(--nh-warning-bg); color:var(--nh-warning); }
.badge-offline  { background:var(--nh-danger-bg);  color:var(--nh-danger); }

/* ---- Money / status text helpers -------------------------------------- */
.ok-yes, .ok-no { position:relative; } /* contains its .visually-hidden label */
.ok-yes { color:var(--nh-success); } .ok-no { color:var(--nh-danger); } .ok-manual { color:var(--nh-warning); }
.cell-bad { background:var(--nh-cell-alert-bg); color:var(--nh-cell-alert); font-weight:600; }
.line-adjusted { color:var(--nh-warning); }
/* Expected but not recorded. Deliberately the muted neutral rather than the
   warning amber: on a session where little has been recorded yet this appears
   on most rows, and a screen of amber teaches people to ignore amber. It is
   information for the biller, not an alarm. See ADR 0008. */
.line-expected { color:var(--nh-n500); }

/* ---- The flowsheet: ONE grid (P0.1) ------------------------------------
   Header, charted rows and the entry ghost row all share --nh-fs-cols (set
   from the ServiceProfile column spec), so the nurse reads one layout to
   type and to verify. The print record keeps its bordered table. */
.nh-flowsheet { --nh-fs-cols:72px 96px 56px 72px 60px 60px 60px 88px minmax(150px,1fr) 56px; }
.nh-fs-head, .nh-fs-row, .nh-fs-entry {
  display:grid; grid-template-columns:var(--nh-fs-cols); align-items:stretch;
}
.nh-fs-head {
  font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  color:var(--nh-n600); background:var(--nh-n50);
  border:1px solid var(--nh-n200); border-radius:var(--nh-r-sm) var(--nh-r-sm) 0 0;
}
.nh-fs-head > * { padding:8px 6px; text-align:center; border-right:1px solid var(--nh-n100); }
.nh-fs-head > *:last-child { border-right:0; }

/* charted rows: hairline-separated grid rows continuing the header frame */
.nh-flowsheet #vitals-list {
  border:1px solid var(--nh-n200); border-top:0;
  border-radius:0 0 var(--nh-r-sm) var(--nh-r-sm);
  background:var(--nh-n0); overflow:hidden;
}
.nh-fs-row { border-bottom:1px solid var(--nh-n100); }
.nh-fs-row:last-child { border-bottom:0; }
.nh-fs-c {
  display:flex; align-items:center; justify-content:center; gap:3px;
  padding:6px; min-height:var(--nh-row-h); overflow:hidden;
  font-size:15px; font-weight:500; font-variant-numeric:tabular-nums;
  color:var(--nh-n900);
}
.nh-fs-c.is-text { justify-content:flex-start; text-align:left; font-weight:400; font-size:13px; }
.nh-fs-c.nh-fs-idx { color:var(--nh-n400); font-size:12px; }
.nh-fs-row .nh-i { width:14px; height:14px; flex:none; }
.nh-fs-entry {
  background:var(--nh-n0); border:1.5px solid var(--nh-cerulean-600);
  border-radius:10px; box-shadow:var(--nh-shadow-sm); margin-top:var(--nh-s2); overflow:hidden;
}
.nh-fs-entry > * { border-right:1px solid var(--nh-n100); display:flex; align-items:center; }
.nh-fs-entry > *:last-child { border-right:0; justify-content:center; }
.nh-fs-entry input, .nh-fs-entry select {
  border:0; background:transparent; width:100%; height:var(--nh-control-h);
  font-size:16px; font-weight:500; font-variant-numeric:tabular-nums;
  text-align:center; padding:0 4px; color:var(--nh-n900);
}
.nh-fs-entry input::placeholder { color:var(--nh-n300); font-weight:400; }
.nh-fs-entry input:focus, .nh-fs-entry select:focus {
  outline:none; box-shadow:inset 0 0 0 2px var(--nh-cerulean-500);
  background:var(--nh-cerulean-50); border-radius:var(--nh-r-sm);
}
.nh-fs-add {
  width:40px; height:40px; border:0; border-radius:var(--nh-r-control);
  background:var(--nh-cerulean-50); color:var(--nh-cerulean-800);
  display:inline-flex; align-items:center; justify-content:center; margin:0 auto;
}
.nh-fs-add:hover { background:var(--nh-cerulean-100); }
@media (pointer:coarse){ .nh-fs-add { width:48px; height:48px; } }

/* ---- htmx ------------------------------------------------------------- */
.htmx-indicator { display:none; } .htmx-request .htmx-indicator { display:inline-block; }
.htmx-swapping { opacity:0; transition:opacity 100ms var(--nh-ease-exit); }
.htmx-settling { opacity:1; transition:opacity 160ms var(--nh-ease); }

/* ---- Nurse floor board (Epic unit / chair board, Stage 3) -------------- */
/* Ported from docs/mockups/nh-epic.css; the mockup file is never linked by the
   app, so the classes the floor board needs live here in the real stylesheet. */
.nh-exp { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; border-radius:var(--nh-r-pill); padding:2px 9px; }
.nh-exp.fresh { background:var(--nh-success-bg); color:var(--nh-success); }
.nh-exp.soon  { background:var(--nh-warning-bg); color:var(--nh-warning); }
.nh-exp.stale { background:var(--nh-danger-bg);  color:var(--nh-danger); }

.nh-queue { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:var(--nh-s5, 20px); }
.nh-qtab { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border-radius:var(--nh-r-control);
  background:var(--nh-n0); border:1px solid var(--nh-n200); color:var(--nh-n700);
  font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none; }
.nh-qtab:hover { border-color:var(--nh-n300); }
.nh-qtab.active { background:var(--nh-cerulean-600); border-color:var(--nh-cerulean-600); color:#fff; }
.nh-qcount { font-size:12px; font-weight:700; background:var(--nh-n100); color:var(--nh-n700);
  border-radius:var(--nh-r-pill); padding:1px 8px; min-width:22px; text-align:center; }
/* Dark overlay, not white: white text over a white-lightened cerulean pill
   measured 3.82:1, under the WCAG AA 4.5:1 floor (found by the #307 floor
   journey's axe scan; e2e/floor-handover-journey.spec.ts holds the line). */
.nh-qtab.active .nh-qcount { background:rgba(0,0,0,.22); color:#fff; }
.nh-qtab.alert .nh-qcount { background:var(--nh-danger-bg); color:var(--nh-danger); }

.nh-floor { display:grid; grid-template-columns:repeat(auto-fill,minmax(212px,1fr)); gap:14px; }
.nh-chair { border:1px solid var(--nh-n200); border-radius:var(--nh-r-card); background:var(--nh-n0);
  box-shadow:var(--nh-shadow-xs); padding:13px 14px; position:relative;
  transition:box-shadow var(--nh-dur-fast) var(--nh-ease), border-color var(--nh-dur-fast) var(--nh-ease); }
.nh-chair:hover { box-shadow:var(--nh-shadow-sm); border-color:var(--nh-n300); }
.nh-chair.empty { background:var(--nh-n50); border-style:dashed; color:var(--nh-n400);
  display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:148px; font-weight:600; gap:4px; }
.nh-chair.cleaning { background:var(--nh-st-checkedin-bg); }
/* n600, not n500: muted card text on the checked-in tint is 4.47:1, just
   under the WCAG AA 4.5:1 floor (found by the #307 floor journey's axe scan,
   the same n500-on-tint family #306 fixed on the action-needed cards). */
.nh-chair.cleaning .ch-id, .nh-chair.cleaning .ch-sub,
.nh-chair.cleaning .ch-claim { color:var(--nh-n600); }
.nh-chair.alert { border-color:var(--nh-danger); box-shadow:0 0 0 3px var(--nh-danger-bg); }
.nh-chair .ch-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; gap:6px; }
.nh-chair .ch-id { font-size:11.5px; font-weight:700; color:var(--nh-n500); letter-spacing:.05em; }
.nh-chair .ch-pt { font-weight:650; color:var(--nh-n900); line-height:1.2; }
.nh-chair .ch-sub { font-size:12px; color:var(--nh-n500); }
.nh-chair .ch-bar { height:6px; border-radius:var(--nh-r-pill); background:var(--nh-n100); overflow:hidden; margin:11px 0 5px; }
.nh-chair .ch-bar .f { height:100%; background:var(--nh-cerulean-500); border-radius:var(--nh-r-pill); }
.nh-chair.alert .ch-bar .f { background:var(--nh-danger); }
.nh-chair .ch-foot { display:flex; align-items:center; justify-content:space-between; margin-top:6px; gap:6px; }
.nh-chair .ch-nurse { font-size:11.5px; color:var(--nh-cerulean-700); font-weight:600; display:inline-flex; align-items:center; gap:4px; }
.nh-chair .ch-claim { font-size:11.5px; color:var(--nh-n500); border:1px dashed var(--nh-n300); border-radius:var(--nh-r-pill);
  padding:1px 9px; cursor:pointer; background:none; display:inline-flex; align-items:center; gap:4px; }
.nh-chair .ch-claim:hover { border-color:var(--nh-cerulean-400); color:var(--nh-cerulean-700); }

/* ---- Machine register + fault log + renal cap meter (Stage 4) ---------- */
/* Ported from docs/mockups/nh-epic.css (machine-admin + biller-cockpit); the
   mockup file is never linked by the app, so the classes live here. */
.m-ok   { background:var(--nh-success-bg); color:var(--nh-success); }
.m-due  { background:var(--nh-warning-bg); color:var(--nh-warning); }
.m-down { background:var(--nh-danger-bg);  color:var(--nh-danger); }

.nh-fault { display:flex; align-items:flex-start; gap:11px; padding:10px 0; border-bottom:1px solid var(--nh-n100); }
.nh-fault:last-child { border-bottom:0; }
.nh-fault .fi { width:24px; height:24px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; }
.nh-fault.warn .fi { background:var(--nh-warning); }
.nh-fault.bad .fi  { background:var(--nh-danger); }
.nh-fault.info .fi { background:var(--nh-n400); }
.nh-fault .ft { font-weight:600; color:var(--nh-n800); font-size:13.5px; }
.nh-fault .fm { font-size:12.5px; color:var(--nh-n500); }

.nh-capbar { background:var(--nh-n50); border:1px solid var(--nh-n200); border-radius:var(--nh-r-card); padding:14px 16px; }
.nh-capbar .row1 { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:8px; }
.nh-capbar .amt { font-size:20px; font-weight:700; color:var(--nh-n900); font-variant-numeric:tabular-nums; }
.nh-capnote { font-size:12.5px; color:var(--nh-n600); margin-top:8px; }

/* ---- Bootstrap badge + text-colour re-skin (Ward Light soft tints) ----- */
/* Any Bootstrap semantic badge across the app inherits the Ward Light chip
   look (soft tint + readable ink) without touching each template. Keeps the
   legacy pages visually consistent with the new mockups. */
/* Badge at the 12px type floor, for badges that sit in small parents (Tabler's
   .badge size is relative and fell to 9.9px inside a chair card). */
.badge.nh-badge-md { font-size:12px; }
.badge { font-weight:600; border-radius:var(--nh-r-pill); letter-spacing:.01em; }
.badge.bg-success, .badge.bg-success-subtle { background:var(--nh-success-bg)!important; color:var(--nh-success)!important; }
.badge.bg-warning, .badge.bg-warning-subtle { background:var(--nh-warning-bg)!important; color:var(--nh-warning)!important; }
.badge.bg-danger,  .badge.bg-danger-subtle  { background:var(--nh-danger-bg)!important;  color:var(--nh-danger)!important; }
.badge.bg-info,    .badge.bg-info-subtle     { background:var(--nh-info-bg)!important;    color:var(--nh-info)!important; }
.badge.bg-secondary { background:var(--nh-n100)!important; color:var(--nh-n600)!important; }
.badge.bg-light     { background:var(--nh-n100)!important; color:var(--nh-n700)!important; border-color:var(--nh-n200)!important; }

/* Semantic text utilities aligned to the clinical (muted) palette */
.text-success { color:var(--nh-success)!important; }
.text-danger  { color:var(--nh-danger)!important; }
.text-warning { color:var(--nh-warning)!important; }
.text-info    { color:var(--nh-info)!important; }

/* Neutral dark button (facility admin + list filter chips) on Ward Light */
/* .btn-dark's n800 re-skin moved to --tblr-dark in nh-tokens.css (#246). Same
   values, reached through the vendor's own variable, and now actually applied:
   this rule went inert at #245 and the button had been rendering Tabler's own
   #1f2937 ever since, with nothing able to see it. */

/* ---- KPI hero + stat tiles + ageing buckets (dashboards / receivables) - */
/* Replaces the ad-hoc Material hexes that the older dashboards hand-coded. */
.nh-hero { border-left-width:4px!important; border-left-style:solid!important; }
.nh-hero--risk { border-left-color:var(--nh-danger)!important; }
.nh-hero--cash { border-left-color:var(--nh-warning)!important; }
.nh-hero-amt { font-weight:700; font-variant-numeric:tabular-nums; line-height:1.1; }
.nh-hero--risk .nh-hero-amt { color:var(--nh-danger); }
.nh-hero--cash .nh-hero-amt { color:var(--nh-warning); }

.nh-tile { border-radius:var(--nh-r-control); padding:var(--nh-s3); text-align:center;
  border:1px solid var(--nh-n200); background:var(--nh-n50); }
.nh-tile .t-k   { font-size:12px; color:var(--nh-n500); }
.nh-tile .t-v   { font-weight:650; font-variant-numeric:tabular-nums; color:var(--nh-n800); }
.nh-tile .t-sub { font-size:12px; color:var(--nh-n500); }
.nh-tile--fresh { background:var(--nh-success-bg); border-color:var(--nh-success-border); }
.nh-tile--fresh .t-v { color:var(--nh-success); }
.nh-tile--soon, .nh-tile--late { background:var(--nh-warning-bg); border-color:var(--nh-warning-border); }
.nh-tile--soon .t-v, .nh-tile--late .t-v { color:var(--nh-warning); }
.nh-tile--bad   { background:var(--nh-danger-bg); border-color:var(--nh-danger-border); }
.nh-tile--bad .t-v   { color:var(--nh-danger); }
.nh-tile--brand { background:var(--nh-cerulean-50); border-color:var(--nh-cerulean-200); }
.nh-tile--brand .t-v { color:var(--nh-cerulean-700); }
/* Sparkline stroke (#379). `.nh-spark` has been used by the patient-chart
   trend tiles since P2.1 with no rule anywhere in this stylesheet, and an SVG
   <polyline> defaults to stroke:none, so every one of those sparklines has
   rendered INVISIBLE. #379 needs a visible residual-volume trend, which is one
   of its acceptance criteria, and the honest fix is the missing rule rather
   than a fourth inline style. CONSEQUENCE, stated rather than slipped: this
   makes the four pre-existing adequacy tile sparklines visible for the first
   time as well. `.alt` is the paired series (pre-dialysis weight under the
   post-dialysis line), drawn lighter so the two read as primary and reference. */
.nh-spark polyline { stroke:var(--nh-cerulean-500); stroke-width:1.5; fill:none; }
.nh-spark polyline.alt { stroke:var(--nh-n300); }

.nh-trend-series { color:var(--nh-cerulean-500); stroke:var(--nh-n0); } /* trend chart (#360): tones no text-* bridge carries */
.nh-trend-grid { stroke:var(--nh-n200); }

/* Per-role landing hero accent (P5): cerulean rail, distinct from risk/cash. */
.nh-hero--role { border-left-color:var(--nh-cerulean-600)!important; }
.nh-hero--role .nh-hero-amt { color:var(--nh-cerulean-700); }

/* ---- Board overview collapse + "your turn" queue marker (P5) ------------ */
.nh-board-overview > summary.nh-board-sum { display:flex; align-items:center; gap:10px;
  cursor:pointer; list-style:none; margin:0; }
.nh-board-overview > summary.nh-board-sum::-webkit-details-marker { display:none; }
.nh-board-overview[open] > summary.nh-board-sum { margin-bottom:var(--nh-s3); }
.nh-board-sum .nh-i { color:var(--nh-cerulean-600); }
.nh-turn-row { background:var(--nh-cerulean-50); }
.nh-turn-row:hover { background:var(--nh-cerulean-50); }
.nh-turn-badge { display:inline-flex; align-items:center; gap:3px; font-size:11px;
  font-weight:600; padding:1px 7px; border-radius:999px;
  background:var(--nh-cerulean-100, var(--nh-cerulean-50)); color:var(--nh-cerulean-700); }

/* ---- Empty states (DESIGN-SYSTEM 5.11) ----------------------------------
   Centred icon + title + one sentence + one next-action button. Copy states
   the next act, not the absence. Never illustrations, never mascots. */
.nh-empty { text-align:center; padding:var(--nh-s10) var(--nh-s5); }
.nh-empty > .nh-i { width:40px; height:40px; color:var(--nh-n300); display:block; margin:0 auto var(--nh-s3); }
.nh-empty .nh-empty-title { font-size:16px; line-height:22px; font-weight:600; color:var(--nh-n800); margin:0 0 var(--nh-s1); }
.nh-empty p { font-size:13px; line-height:18px; color:var(--nh-n500); margin:0 0 var(--nh-s4); }

/* ---- Field-level errors (DESIGN-SYSTEM 5.2) ------------------------------
   Converge the vendored Bootstrap validation classes onto the Ward Light
   danger token: red border + a 13px help line with the circle-alert icon. */
.form-control.is-invalid, .form-select.is-invalid {
  border-color:var(--nh-danger); background-image:none;
}
.form-control.is-invalid:focus, .form-select.is-invalid:focus {
  border-color:var(--nh-danger);
}
.invalid-feedback { color:var(--nh-danger); font-size:13px; }
.invalid-feedback .nh-i { width:14px; height:14px; }

/* Synthetic clinic-pilot boundary: visible on every operational screen. */
.nh-pilot-banner {
  position:relative; z-index:1031;
  padding:6px 16px; background:var(--nh-warning); color:var(--nh-n0); text-align:center;
  font-size:12px; font-weight:650; letter-spacing:0;
  border-bottom:1px solid var(--nh-warning);
}
/* Clear the fixed sidebar once Tabler stops collapsing it. */
@media (min-width:992px) { .nh-pilot-banner { margin-left:var(--nh-sidebar-w); } body:has(.navbar-folded) .nh-pilot-banner { margin-left:4rem; } }

/* ---- Standalone pages (outside the shell) -------------------------------
   Sign-in, password reset, the MFA challenge, the consent gate, the
   master-admin app, the public status pages and the manual reader all extend
   `standalone.html` and are on Tabler as of #246.

   What survives here is only what Tabler ships no component for. Everything
   that WAS a component (the form field, the label row, the password reveal,
   the divider, the alert, the submit) went to Tabler in that ticket, under
   DESIGN-DOCTRINE 5.4, and this block lost about half its lines to the swap.
   ------------------------------------------------------------------------ */

/* The sign-in split screen. Tabler's sign-in variants are a centred card and a
   cover image; neither is this, a brand story panel beside the entry column,
   so it stays a Ward Light primitive. The ENTRY side is Tabler throughout. */
.nh-login-body { min-height:100vh; margin:0; background:var(--nh-n0); }
.nh-login-page {
  min-height:100vh; display:grid; grid-template-columns:minmax(380px, 41%) 1fr;
}
.nh-login-story {
  position:relative; overflow:hidden; color:#fff;
  background:
    radial-gradient(circle at 5% 92%, rgba(56,189,248,.18), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(2,132,199,.22), transparent 30%),
    linear-gradient(145deg, #15201f 0%, #182d2c 55%, #0c3544 100%);
}
.nh-login-story::after {
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.22;
  background-image:linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                   linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image:linear-gradient(to bottom, transparent, #000 28%, #000 74%, transparent);
}
.nh-login-story-inner {
  position:relative; z-index:1; width:100%; height:100%; min-height:100vh;
  display:flex; flex-direction:column; padding:clamp(36px, 5vw, 72px);
}
.nh-login-logo { display:block; width:auto; object-fit:contain; }
.nh-login-logo--inverse { height:30px; filter:brightness(0) invert(1); }
.nh-login-logo--mobile { display:none; height:26px; margin-bottom:56px; }
.nh-login-story-copy { margin:auto 0; max-width:520px; padding:48px 0; }
.nh-login-eyebrow { color:var(--nh-cerulean-600); margin:0 0 14px; }
.nh-login-story .nh-login-eyebrow { color:var(--nh-cerulean-300); }
.nh-login-story-title {
  margin:0; color:#fff; font-size:clamp(32px, 3.25vw, 52px); line-height:1.08;
  letter-spacing:-.035em; font-weight:600;
}
.nh-login-story-lede {
  max-width:475px; margin:24px 0 0; color:rgba(255,255,255,.7);
  font-size:16px; line-height:1.65;
}
.nh-login-assurances {
  display:grid; gap:18px; margin:38px 0 0; padding:0; list-style:none;
}
.nh-login-assurances li {
  display:grid; grid-template-columns:36px 1fr; align-items:center; gap:12px;
  color:rgba(255,255,255,.72); font-size:13px; line-height:1.45;
}
.nh-login-assurances strong { color:#fff; font-weight:600; }
.nh-login-assurance-icon {
  width:36px; height:36px; display:grid; place-items:center; border-radius:10px;
  color:var(--nh-cerulean-200); background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
}
.nh-login-assurance-icon .nh-i { width:17px; height:17px; }
.nh-login-story-footer {
  margin:0; color:rgba(255,255,255,.48); font-size:12px; letter-spacing:.02em;
}
.nh-login-entry {
  display:flex; align-items:center; justify-content:center; padding:48px 7vw;
  background:var(--nh-n0);
}
.nh-login-entry-inner { width:100%; max-width:430px; }
.nh-login-organization {
  display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:11px;
  margin:-4px 0 24px; padding:12px 14px; border:1px solid var(--nh-cerulean-200);
  border-radius:var(--nh-r-control); background:var(--nh-cerulean-50);
  color:var(--nh-n800); font-size:13px;
}
.nh-login-organization-icon {
  width:38px; height:38px; display:grid; place-items:center; border-radius:8px;
  background:var(--nh-n0); color:var(--nh-cerulean-700);
}
.nh-login-organization-icon .nh-i { width:18px; height:18px; }
.nh-login-organization-label { display:block; color:var(--nh-n500); font-size:11px; }
.nh-login-organization a { font-size:12px; font-weight:600; }
.nh-login-label-link { margin-bottom:6px; font-size:12px; font-weight:600; }
/* The submit is Tabler's .btn; only the sign-in page's taller target is ours. */
.nh-login-submit { min-height:48px; }
.nh-login-security-note {
  display:grid; grid-template-columns:20px 1fr; gap:10px; margin-top:26px;
  padding:13px 14px; border-radius:var(--nh-r-control); background:var(--nh-n50);
  color:var(--nh-n600);
}
.nh-login-security-note .nh-i { width:18px; height:18px; margin-top:1px; color:var(--nh-success); }
.nh-login-security-note p { margin:0; font-size:11.5px; line-height:1.5; }
.nh-login-security-note strong { color:var(--nh-n700); font-weight:650; }
.nh-login-legal { margin-top:40px; font-size:11px; }

@media (max-width: 900px) {
  .nh-login-page { display:block; }
  .nh-login-story { display:none; }
  .nh-login-entry { min-height:100vh; padding:42px 24px; align-items:flex-start; }
  .nh-login-entry-inner { max-width:440px; margin:auto; }
  .nh-login-logo--mobile { display:block; }
}
@media (max-width: 480px) {
  .nh-login-entry { padding:30px 20px 24px; }
  .nh-login-logo--mobile { height:24px; margin-bottom:48px; }
  .nh-login-legal { margin-top:32px; }
}

/* The password reveal sits inside Tabler's .input-group-flat, which owns the
   border and the shared focus ring. This is only the button inside it. */
.nh-password-toggle {
  display:grid; width:24px; height:24px; padding:0; border:0; border-radius:4px;
  place-items:center; color:var(--nh-n500); background:transparent;
}
.nh-password-toggle:hover { color:var(--nh-n800); }
.nh-password-toggle .nh-i { grid-area:1 / 1; width:18px; height:18px; }
/* Which icon shows is keyed on the button's aria-pressed state, which the
   toggle script already maintains. The old mechanism was an html `hidden`
   attribute on the <svg> elements, but `hidden` is not valid on svg and
   SVGElement has no `hidden` IDL property, so the JS toggle never actually
   swapped the icons. Found by the html-validity gate (#304). */
.nh-password-toggle [data-password-hide] { display:none; }
.nh-password-toggle[aria-pressed="true"] [data-password-show] { display:none; }
.nh-password-toggle[aria-pressed="true"] [data-password-hide] { display:block; }
/* A finger needs the 44px the design system asks for. The visual stays 24px;
   only the hit area grows, inside a field that is already 48px tall on a coarse
   pointer. The rule this replaces was 40px, so it was under the minimum too,
   and moving the control into Tabler's input-group-flat had taken it to 24. */
@media (pointer:coarse) {
  .nh-password-toggle { width:44px; height:44px; }
}

/* The wordmark above a centred auth card (reset, MFA challenge). */
.nh-auth-logo { display:inline-block; height:23px; width:auto; }

/* Consent gate: a shield mark and the statute box. Tabler has no component for
   either, and the page used to carry its own :root redefining --nh-brand,
   --nh-brand-fill and --nh-brand-deep, none of which exist in nh-tokens.css. */
.nh-consent-mark {
  width:48px; height:48px; margin-bottom:20px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--nh-cerulean-50); color:var(--nh-cerulean-600);
}
.nh-consent-mark .nh-i { width:24px; height:24px; }
.nh-legal-note {
  margin:24px 0; padding:14px 16px; border-left:3px solid var(--nh-cerulean-500);
  border-radius:0 var(--nh-r-sm) var(--nh-r-sm) 0;
  background:var(--nh-n50); color:var(--nh-n600); font-size:13px; line-height:1.6;
}

/* Public status. The four states were four hand-picked hexes in two separate
   :root blocks (#1a9c58, #d98c00, #d13b3b, #8a8f98) that agreed with each other
   and with nothing else. One mapping onto the semantic palette, both pages. */
.nh-status-banner { padding:20px 24px; border-radius:var(--nh-r-card); color:#fff; }
.nh-status-banner.nh-status-ok { background:var(--nh-success); }
.nh-status-banner.nh-status-degraded { background:var(--nh-warning); }
.nh-status-banner.nh-status-failed { background:var(--nh-danger); }
.nh-status-banner.nh-status-unknown { background:var(--nh-n500); }
.nh-status-pill {
  display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600;
}
.nh-status-pill.nh-status-ok { color:var(--nh-success); }
.nh-status-pill.nh-status-degraded { color:var(--nh-warning); }
.nh-status-pill.nh-status-failed { color:var(--nh-danger); }
.nh-status-pill.nh-status-unknown { color:var(--nh-n500); }
.nh-status-dot { width:10px; height:10px; border-radius:50%; background:currentColor; }
.nh-status-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0; border-bottom:1px solid var(--nh-n100);
}
.nh-status-row:last-child { border-bottom:0; }

/* Manual reader: a sticky contents column beside the page. Tabler's sidebar is
   the application shell's, which this page deliberately does not load. */
.nh-manual-layout { display:grid; grid-template-columns:240px 1fr; gap:var(--nh-s8); }
.nh-manual-nav { position:sticky; top:var(--nh-s4); align-self:start; }
.nh-manual-nav a {
  display:block; padding:7px 10px; border-radius:var(--nh-r-sm);
  color:var(--nh-n700); font-size:14px;
}
.nh-manual-nav a:hover { background:var(--nh-n100); text-decoration:none; }
.nh-manual-nav a.active { background:var(--nh-cerulean-600); color:#fff; font-weight:600; }
.nh-manual-nav a .when { display:block; font-size:11px; color:var(--nh-n400); margin-top:2px; }
.nh-manual-nav a.active .when { color:var(--nh-cerulean-100); }
.nh-manual-tools {
  margin-top:var(--nh-s4); padding-top:var(--nh-s3); border-top:var(--nh-border);
}
.nh-manual-updated {
  padding-bottom:var(--nh-s3); margin-bottom:var(--nh-s5);
  border-bottom:var(--nh-border); font-size:13px;
}
.nh-manual-content img { max-width:100%; border:var(--nh-border); border-radius:var(--nh-r-sm); margin:var(--nh-s3) 0; }
.nh-manual-content table { width:100%; margin:var(--nh-s4) 0; }
.nh-manual-content th, .nh-manual-content td { border:var(--nh-border); padding:8px 10px; text-align:left; }
@media (max-width: 800px) {
  .nh-manual-layout { grid-template-columns:1fr; }
  .nh-manual-nav { position:static; }
}

@media (prefers-reduced-motion: reduce) {
  .nh-login-page * { scroll-behavior:auto; transition:none!important; }
}

/* ---- Print ------------------------------------------------------------- */
@media print {
  .nh-tabs, .no-print { display:none!important; }
  .page-wrapper { margin-left:0!important; }
  .page-body { margin:0; }
  body { background:#fff; }
  .pa-chip, .nh-chip {
    border:.75pt solid #000!important; background:#fff!important; color:#000!important;
  }
  /* Both halves of this line moved in the same pass, from opposite directions:
     #459 dropped .nh-card, which had no renderer anywhere, and #464 dropped
     .st-In-session, whose whole family is retired. What is left is the chip
     that exists and the two cards that do. */
  .nh-chip--insession::before { display:none!important; }
  .card, .nh-sec { box-shadow:none!important; border:1px solid #999; }
  /* On-screen flowsheet grid, if printed directly: full cell rules so it
     photocopies legibly. The legal record still prints its bordered table. */
  .nh-flowsheet { overflow:visible!important; }
  .nh-fs-head, .nh-fs-head > *, .nh-fs-c { border:.5pt solid #000!important; }
  .nh-flowsheet #vitals-list { border:0; border-radius:0; }
  .nh-fs-row { border-bottom:0; }
}
/* ---- Named deviation: this shell is vertical nav AND a top app header ----
   DESIGN-DOCTRINE 5.4 allows a deviation from Tabler's form when it is a named
   declaration with a written reason. This is the second one, after the alert.

   Tabler 1.5 models navigation as a choice of exactly two layouts, horizontal
   or vertical, and its demo ships the markup for both on every page and hides
   the one you did not pick:

     html:not([data-bs-navbar-position="vertical"])
       .page:has(> [class*="navbar-expand"]:not(.navbar-vertical)) > .navbar-vertical
     html[data-bs-navbar-position="vertical"]
       .page:has(> .navbar-vertical) > [class*="navbar-expand"]:not(.navbar-vertical)

   This application is neither. It runs a vertical sidebar for navigation and a
   slim top header for the things that are not navigation: the facility, the
   notification tray, the MFA state and the account menu. 1.4 allowed that only
   because these two rules did not exist yet, so the upgrade forces the choice.

   The reason for keeping both: the header carries the MFA dot and the
   notification tray, which have to be visible from every page without opening
   a menu, and Tabler's vertical layout has nowhere for them that is not inside
   the sidebar's own scroll. Moving them into the sidebar the way Tabler's
   vertical demo does is the real adoption and it is a shell redesign, filed
   rather than smuggled into a vendor bump (#459).

   Specificity is matched to the vendor rule, not raised, and nh.css loads after
   tabler.min.css, so this wins on order. Written that way deliberately: an
   !important here would also override the print rule that hides the header. */
html[data-bs-navbar-position="vertical"] .page:has(> .navbar-vertical) > .nh-app-header:not(.navbar-vertical) {
  display: flex;
}

/* Settings workspace ----------------------------------------------------- */
/* Still used by settings_dha_field_test.html: long opaque references (bundle
   ids, correlation ids) must wrap rather than push the page sideways. Kept when
   the rest of the private settings layer was deleted for Tabler (#247). */
.nh-safe-ref {
  color: inherit;
  overflow-wrap: anywhere;
}
.nh-signature-preview {
  display: block;
  width: 100%;
  max-width: 20rem;
  max-height: 8.75rem;
  margin-inline: auto;
  padding-bottom: var(--nh-s1);
  object-fit: contain;
  border-bottom: 2px solid var(--nh-n900);
}

@media (max-width: 767.98px) {
  .nh-assembly-package { width: 100%; white-space: normal; }
  .claim-workbench :is(button, input, select) { min-height: 44px; }
}

/* I-PASS handover severity badge (Wave 2). */
.nh-ho-sev {
  display:inline-block; padding:1px 8px; border-radius:var(--nh-r-pill);
  font-size:11px; font-weight:700; vertical-align:middle;
}
.nh-ho-sev--stable { background:var(--nh-success-bg); color:var(--nh-success); }
.nh-ho-sev--watcher { background:var(--nh-warning-bg); color:var(--nh-warning); }
.nh-ho-sev--unstable { background:var(--nh-danger-bg); color:var(--nh-danger); }
[data-settings-sidebar] .list-group { --tblr-list-group-item-padding-y: .75rem; } /* sidebar row height; e2e account-view.spec.ts pins it (W13) */
