/* ── Brand typefaces, SELF-HOSTED ──────────────────────────────────────
   Plus Jakarta Sans + Instrument Serif, from the Gtwo design system.

   Served from our own origin on purpose. The marketing page and the pricing
   calculator load these from fonts.googleapis.com, which is fine — they carry
   no patient data. Every page behind the login does, and a stylesheet link to
   Google would hand a third party the IP address of a clinic viewing a
   referral, on every page load, with no BAA covering it. The same reasoning
   keeps this host grey-clouded in Cloudflare.

   214 KB across ten files, cached after the first load, unicode-range so a
   browser fetches only the subset it needs. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('../fonts/PlusJakartaSans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('../fonts/PlusJakartaSans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800;
  font-display: swap; src: url('../fonts/PlusJakartaSans-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800;
  font-display: swap; src: url('../fonts/PlusJakartaSans-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ══════════════════════════════════════════════════════════════════════
   VoxCare — "Front desk" visual system (adopted 2026-08-24)
   ══════════════════════════════════════════════════════════════════════

   Reskinned 2026-09-29 to the Gtwo design system (design/VoxCare logo
   concepts) — monochrome palette, Plus Jakarta Sans, and the 2a lockup.

   TYPE. The interface stays in Atkinson Hyperlegible, drawn by the Braille
   Institute to maximise how distinguishable each character is, and chosen as
   an argument rather than decoration: the readers are non-technical,
   bilingual, often mid-phone-call, on a cheap monitor at 4pm, reading dates,
   phone numbers and dates of birth all day. Plus Jakarta Sans was tried
   across the whole UI on 2026-09-29 and pulled back the same day — it is well
   drawn but does not disambiguate 1/l/I or 0/O the way Atkinson does, and
   that is the one thing this interface cannot trade away.

   Jakarta stays where brand type belongs: the lockup. Two weights, 400 and
   800, because that is exactly what "Vox" + "care" needs.

   SELF-HOSTED on purpose, both faces. Loading fonts from Google would make
   every page that displays a patient name issue a third-party request — the
   pattern healthcare organisations have been sued over. The marketing page and
   the pricing calculator DO use Google Fonts, and that is fine: no patient
   data passes through them.

   Three faults in the previous system this replaces:
     1. Card headings were 13px uppercase — SMALLER than the 14px body text,
        so the hierarchy was inverted.
     2. Seven font sizes with no ratio between them (11, 11.5, 12, 13, 18,
        22, 26), which is why nothing felt deliberately ranked.
     3. --ink-3 was #8a94a3 — 3.07:1 on white, under the 4.5:1 minimum — and
        it carried real data: referring practice, assignee, dates, DOB.
        Every colour below is verified at 4.5:1 or better on both grounds.
   ══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/atkinson-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/atkinson-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/atkinson-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/atkinson-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ── Type ──────────────────────────────────────────────────────────
     TWO FACES, EACH WITH A JOB. Atkinson Hyperlegible runs the interface —
     every patient name, phone number and date of birth. Plus Jakarta Sans runs
     the brand lockup and nothing else. That split is the point: the brand is
     seen, the interface is read, and they are not the same task.

     The design system's display sizes (48-96px) belong to the marketing page;
     a front desk reading a worklist needs a tight five-step scale, so those
     stay as they were. Instrument Serif is specified by the system as an
     accent but nothing here uses it, so its files are not shipped. */
  --font-sans:  "Atkinson Hyperlegible", system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-xs: 13px;   /* labels, table headers, fine print */
  --fs-sm: 15px;   /* secondary lines inside a cell     */
  --fs-md: 16px;   /* body                              */
  --fs-lg: 20px;   /* card and section headings         */
  --fs-xl: 26px;   /* page title, big numbers           */

  /* Spacing — one 4px step, so rhythm is decided once. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;

  /* Radii, from the design system: input 10, button/card 12-16, pill. */
  --r-sm: 10px; --r-md: 16px; --r-pill: 9999px;

  /* ── Neutrals ──────────────────────────────────────────────────────
     The system is monochrome: black, white, and a true-neutral gray ramp.
     This replaces the paper-warm browns — the brand mark is black or white
     only, and warm neutrals fought it. */
  --ink:    #000000;   /* --ink        */
  --ink-2:  #374151;   /* --gray-700, --ink-secondary  */
  --ink-3:  #6b7280;   /* --gray-500, --ink-muted      */
  /* CONTRAST NOTE: --ink-3 on --surface is 4.63:1. That passes AA (4.5) and it
     is the design system's own --ink-muted, but the palette this replaced
     documented 5.97:1 as a floor it would not go below, for readers on a cheap
     monitor at 4pm. Everything else improved (body 20:1, secondary 10.3:1,
     badges 6+:1); this one case got thinner. Set --ink-3 to #4b5563 for 7.0:1
     if the muted line ever reads faint in a real clinic — it costs nothing and
     only steps one shade along the same neutral ramp. */
  --surface:   #f9fafb;   /* --gray-50,  --canvas-soft  */
  --card:      #ffffff;   /* --surface-card             */
  --line:      #e5e7eb;   /* --gray-200, --hairline     */
  --line-soft: #f3f4f6;   /* --gray-100                 */

  /* ── Action ────────────────────────────────────────────────────────
     Primary IS black in this system. There is no brand colour to spend on
     buttons, which is what makes the sparse semantic colours below read. */
  --accent:      #000000;
  --accent-soft: #f3f4f6;
  --accent-line: #d1d5db;

  /* ── Semantic — sparse by design ───────────────────────────────────
     The system ships one green and one red. Both are tuned for indicators,
     not text: #22c55e on white is 2.3:1. So the badge text uses a darkened
     version of the same hue and the system value stays for fills and dots,
     which keeps the palette honest and the labels legible.
     'warn' has no token at all; urgency still has three levels a front desk
     must tell apart at a glance, so it is a restrained neutral amber. */
  --ok:        #22c55e;  /* --green-500, indicators only */
  --ok-text:   #15803d;
  --ok-bg:     #f0fdf4;
  --danger:    #b3202e;  /* readable sibling of --red-600 #dc3545 */
  --danger-bg: #fdf2f3;
  --danger-line: #f3c9ce;
  --warn:      #92400e;
  --warn-bg:   #fffbeb;
  --warn-line: #fde68a;

  --focus-ring: 0 0 0 3px rgba(0,0,0,.10);
  --btn-line:   #9ca3af;  /* --gray-400: a button edge you can see on white */
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--surface); color: var(--ink);
       font-family: var(--font-sans);
       font-size: var(--fs-md); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
                 box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* ── brand lockup — concept 2a ────────────────────────────────────────
   Five bars, one bar-width apart, heights 46/77/100/77/46% of cap height,
   pill caps; clear space either side is half the cap height. "Vox" at 800
   and "care" at 400 in the secondary ink — the spec is explicit that the
   weights are not equalised, and that the mark is black or white only,
   never green and never a gradient. Horizontal only; the mark is never
   stacked above the wordmark.

   The mark is inline SVG, not an <img>: it inherits currentColor, so the
   white-on-dark variant needs no second asset, and it costs no request. */
.brand { display: inline-flex; align-items: center; gap: .52em; white-space: nowrap; }
/* Height is set against the reference render (design/.../uploads), where the
   tallest bar stands about 1.2x the cap height of the V rather than level with
   it. Cap height in Plus Jakarta Sans is ~0.73em, so 0.88em. Reading the spec's
   "100% of cap height" literally produced a mark that looked undersized beside
   an 800-weight wordmark. */
.brand-mark { display: block; height: .88em; width: auto; flex: none; }
.brand-mark rect { fill: currentColor; }

.wordmark { font-family: var(--font-brand); font-weight: 800;
            letter-spacing: -.02em; color: var(--ink);
            font-size: 25px; line-height: 1; white-space: nowrap; }
.wordmark em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.wordmark-lg { font-size: 34px; }
/* The login card sets the lockup larger by scaling the whole thing —
   the mark is sized in em, so bars and letters stay locked together. */
.brand-lg .wordmark { font-size: 34px; }

/* ── top bar — PLATFORM ADMIN CONSOLE ONLY ─────────────────────────────
   The clinic app moved to a left rail, but app/admin/ still renders
   header.app and shares this stylesheet. Deleting these rules with the
   clinic's top bar silently flattened the admin console; they stay until
   that console moves too. */
header.app { background: var(--card); border-bottom: 2px solid var(--line);
             padding: var(--sp-3) var(--sp-5); display: flex; align-items: center;
             gap: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
header.app h1 { margin: 0; font-size: var(--fs-lg); line-height: 1; }
header.app h1 a { color: var(--ink); text-decoration: none; }
header.app .tag { color: var(--ink-2); font-size: var(--fs-sm); }
header.app .spacer { flex: 1; }
header.app .who { color: var(--ink-2); font-size: var(--fs-sm); }

/* ── app shell ─────────────────────────────────────────────────────────
   One left rail instead of a top bar. The bar had grown to ten links and
   wrapped on a 1366px clinic screen, and splitting the configuration pages
   into a second rail made them feel like a different application. */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

.side { flex: 0 0 15rem; background: var(--card); border-right: 1px solid var(--line); }
.side-in { position: sticky; top: 0; display: flex; flex-direction: column;
           gap: var(--sp-4); padding: var(--sp-4) var(--sp-3); max-height: 100vh;
           overflow-y: auto; }
.side-brand { display: block; font-size: var(--fs-lg); line-height: 1;
              color: var(--ink); text-decoration: none; padding: 0 var(--sp-2); }
.side-brand:hover { text-decoration: none; }
.side-clinic { margin: calc(var(--sp-3) * -1) 0 0; padding: 0 var(--sp-2);
               font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }

.side-nav { display: flex; flex-direction: column; gap: var(--sp-4); }
.side-group { margin: 0 0 var(--sp-1); padding: 0 var(--sp-2); font-size: var(--fs-xs);
              text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.side-nav ul { margin: 0; padding: 0; list-style: none; }
.side-nav li { margin: 0 0 1px; }
.side-nav a { display: flex; align-items: center; gap: var(--sp-2);
              padding: var(--sp-2); border-radius: var(--r-sm);
              color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.3; }
.side-nav a:hover { background: var(--surface); color: var(--accent); text-decoration: none; }
.side-nav a.here { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.side-ico { width: 1.25rem; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.side-ico svg { display: block; }
.side-txt { flex: 1; min-width: 0; }
.side-count { flex: 0 0 auto; min-width: 1.35rem; padding: 0 var(--sp-1);
              border-radius: var(--r-pill); background: var(--accent); color: #fff;
              font-size: var(--fs-xs); font-weight: 700; text-align: center;
              font-variant-numeric: tabular-nums; }
.side-nav a.here .side-count { background: var(--accent); }

.side-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center;
             gap: var(--sp-2); padding: var(--sp-3) var(--sp-2) 0;
             border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.side-foot .who { color: var(--ink-3); font-size: var(--fs-xs); width: 100%; }

/* Narrow screens: the rail becomes a band above the content. No JavaScript is
   involved in the navigation, so it must stay usable without any. */
@media (max-width: 860px) {
  .shell { display: block; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .side-in { position: static; max-height: none; flex-direction: row; flex-wrap: wrap;
             align-items: center; gap: var(--sp-2) var(--sp-3); }
  .side-clinic { margin: 0; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); width: 100%; }
  .side-group { display: none; }
  .side-nav ul { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
  .side-foot { margin: 0; width: 100%; border-top: 0; padding-top: 0; }
  .side-foot .who { width: auto; }
}

main { flex: 1; min-width: 0; max-width: 1180px; margin: var(--sp-5) auto; padding: 0 var(--sp-4); }

/* ── tiles ─────────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
         gap: var(--sp-3); margin-bottom: var(--sp-5); }
.tile { background: var(--card); border: 1px solid var(--line);
        border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
.tile .label { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase;
               color: var(--ink-3); font-weight: 700; margin-bottom: var(--sp-1); }
.tile .value { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums;
               line-height: 1.15; }
.tile .muted { margin-top: var(--sp-1); }
/* Colour alone never carries meaning — the label turns too. */
.tile.alert .value, .tile.alert .label { color: var(--danger); }

/* ── filters ───────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
           background: var(--card); border: 1px solid var(--line);
           border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }

/* ── controls ──────────────────────────────────────────────────────── */
select, input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=time], input[type=datetime-local], input[type=date],
input[type=number], input[type=search], textarea, button, .btn {
  font: inherit; padding: 9px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--btn-line); background: var(--card); color: var(--ink); }
/* Every field the same height and edge as the buttons beside it. The search
   box was missing from the list above and rendered as a bare browser input.
   The edge colour lives IN that rule: a separate `input { border-color }`
   loses to `input[type=text]` on specificity, which is why typed fields kept
   the faint hairline while selects did not. */
select, input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=time], input[type=datetime-local], input[type=date],
input[type=number], input[type=search] { min-height: 44px; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
select:hover, input:hover, textarea:hover { border-color: var(--ink-2); }
select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type=datetime-local] { min-width: 210px; }
button, .btn { cursor: pointer; min-height: 44px; display: inline-flex;
               align-items: center; justify-content: center; gap: var(--sp-2);
               border-radius: var(--r-pill); padding: 9px 18px; }
/* Row actions: 36px is a compromise. Full 44px in a table row costs a visible
   row on a 768px-tall screen; 26px (the old value) is simply too small. */
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: var(--fs-sm); }
/* Four tiers, and a control uses exactly one of them. Before this every button
   was the same faint pill on a white card — a 1px #e5e7eb outline — so Approve,
   Assign and Delete looked identical and the eye could not find the next step. */
button, .btn { border-color: var(--btn-line); font-weight: 600; color: var(--ink); }
button:hover, .btn:hover { background: var(--line-soft); border-color: var(--ink-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.25); }
/* Navigation dressed as a button: "Open the fax →". No box, so it never
   competes with the actions beside it. */
.btn-quiet { border-color: transparent; background: transparent; padding-left: var(--sp-2);
             padding-right: var(--sp-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { background: var(--line-soft); border-color: transparent; }
/* Only ever inside a danger zone, and still behind a confirm(). */
.btn-danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.btn-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

/* A row of buttons. 12px between buttons, so each reads as its own target;
   the old 8px gap ran them together into one block of controls. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.actions form.inline { margin: 0; }
.actions .note { color: var(--ink-3); font-size: var(--fs-sm); flex-basis: 100%; margin: 0; }

/* ── page header ───────────────────────────────────────────────────────
   Every work page opens the same way: where you are on the left, what you can
   do here on the right. A record page (fax, appointment) puts its action bar
   UNDER the title instead — that is the thing you came to do, so it sits
   above every field rather than after them. */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
             gap: var(--sp-3) var(--sp-5); margin: 0 0 var(--sp-5);
             padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.page-head .page-title { margin: 0; }
.page-head .crumb { display: inline-block; font-size: var(--fs-sm); color: var(--ink-3);
                    margin-bottom: var(--sp-1); }
.page-head .page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
                        margin-top: var(--sp-2); color: var(--ink-2); font-size: var(--fs-sm); }
.page-head.record { display: block; }
.page-head.record .actions { margin-top: var(--sp-4); }

/* Tabs over a list: plain links, counts beside them, the current one marked. */
.tabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.tabs a { padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
          color: var(--ink-2); background: var(--card); font-size: var(--fs-sm); }
.tabs a:hover { text-decoration: none; border-color: var(--ink-3); }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.tabs .n { opacity: .75; margin-left: var(--sp-1); font-variant-numeric: tabular-nums; }

/* A one-line link from a record page to where that work is done. */
.pointer { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-4);
           padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
           background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); }
.pointer a { color: var(--warn); font-weight: 700; text-decoration: underline; }

/* Rare and irreversible things live at the bottom of a record, together. */
.danger-zone { border-color: var(--danger-line); }
.danger-zone h2 { color: var(--danger); font-size: var(--fs-md); }

.empty { text-align: center; padding: var(--sp-6) var(--sp-4); }
.empty strong { display: block; font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.empty .actions { justify-content: center; margin-top: var(--sp-3); }

.slot-grid { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 420px; }
.slot-grid label { display: flex; align-items: center; gap: var(--sp-3); }
.slot-grid .slot-n { color: var(--ink-3); font-size: var(--fs-sm); width: 74px; }
.slot-grid input[type=datetime-local] { flex: 1; }
.slot-grid + button, .slot-actions { margin-top: var(--sp-3); }

/* ── tables ────────────────────────────────────────────────────────── */
table.list { width: 100%; border-collapse: collapse; background: var(--card);
             border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
table.list th { text-align: left; font-size: var(--fs-xs); color: var(--ink-3);
                font-weight: 700; padding: var(--sp-3) var(--sp-4);
                border-bottom: 1px solid var(--line); }
table.list td { padding: var(--sp-4); border-bottom: 1px solid var(--line-soft);
                vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.row:hover { background: var(--surface); }
.sender .practice { font-weight: 700; }
.muted { color: var(--ink-3); font-size: var(--fs-sm); }

/* ── badges ────────────────────────────────────────────────────────────
   Urgency owns amber and red. Anything that is not urgency — a source, a
   type, a state — uses the neutral treatment, because amber previously
   meant both "urgent" and "this was a phone call". */
.badge { display: inline-block; padding: 3px 11px; border-radius: var(--r-pill);
         font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
         border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.badge-type    { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.badge-routine { background: var(--surface); border-color: var(--line); color: var(--ink-3); }
.badge-urgent  { background: var(--warn-bg);   border-color: var(--warn-line);   color: var(--warn); }
.badge-stat    { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.badge-status  { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.status-new       { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.status-completed { color: var(--ink-3); }
.flag { color: var(--warn); font-size: var(--fs-sm); font-weight: 700; }

/* ── alerts ────────────────────────────────────────────────────────── */
.alert { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
         margin-bottom: var(--sp-4); border: 1px solid transparent; font-weight: 700; }
.alert-success { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger); border-color: #eebfb8; }
.alert-warning { background: var(--warn-bg);    color: var(--warn);   border-color: #e8cf9e; }

/* ── cards & detail ────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 400px 1fr; gap: var(--sp-4);
               align-items: start; }
.detail-grid.even { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--line);
        border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); }
/* A heading is now LARGER than body text. It used to be 13px uppercase grey
   against 14px body — the hierarchy was upside down. */
.card h2 { font-size: var(--fs-lg); font-weight: 700; color: var(--ink);
           letter-spacing: -.01em; margin: 0 0 var(--sp-3); }

dl.kv { margin: 0; display: grid; grid-template-columns: 150px 1fr; row-gap: var(--sp-2); }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; }
dl.kv.wide { grid-template-columns: 260px 1fr; }
dl.kv dt.sub { padding-left: var(--sp-3); }

iframe.pdf { width: 100%; height: 720px; border: 1px solid var(--line);
             border-radius: var(--r-md); background: #fff; }
ul.events { list-style: none; margin: 0; padding: 0; }
ul.events li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-soft);
               font-size: var(--fs-sm); }
ul.events li:last-child { border-bottom: 0; }
ul.events .when { color: var(--ink-3); font-size: var(--fs-xs); }
form.inline { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap;
              margin-top: var(--sp-1); }

.office-days { display: inline-flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-1) 0; }
.office-days label { font-weight: 400; }

/* ── login ─────────────────────────────────────────────────────────── */
.login-wrap { max-width: 420px; margin: 8vh auto; }
.login-wrap .card { padding: var(--sp-6); }
.login-wrap h1 { margin: 0 0 var(--sp-1); font-size: var(--fs-xl); }
.login-wrap p.sub { color: var(--ink-3); margin: 0 0 var(--sp-5); }
.login-wrap label { display: block; font-size: var(--fs-sm); color: var(--ink-2);
                    font-weight: 700; margin: var(--sp-3) 0 var(--sp-1); }
.login-wrap input { width: 100%; }
.login-wrap button { width: 100%; margin-top: var(--sp-4); }

/* ── responsive ────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .detail-grid, .detail-grid.even { grid-template-columns: 1fr; }
  dl.kv.wide { grid-template-columns: 1fr; row-gap: var(--sp-1); }
}
/* Wide tables scroll inside themselves rather than pushing the page sideways. */
@media (max-width: 900px) {
  table.list { display: block; overflow-x: auto; white-space: nowrap; }
  iframe.pdf { height: 420px; }
  main { padding: 0 var(--sp-3); }
}

/* ── the queue: list beside detail ─────────────────────────────────────
   Selection lives in the URL, so this needs no JavaScript and every state
   is linkable. Below 1000px the panes stack, list first. */
.page-title { font-size: var(--fs-xl); margin: 0 0 var(--sp-4); font-weight: 700; }
.page-title .count { color: var(--ink-3); font-weight: 400; }
.queue { display: grid; grid-template-columns: 340px minmax(0, 1fr);
         gap: var(--sp-4); align-items: start; }
.qlist { display: flex; flex-direction: column; gap: var(--sp-2);
         max-height: calc(100vh - 260px); overflow-y: auto; padding-right: var(--sp-1); }
.qitem { display: block; background: var(--card); border: 1px solid var(--line);
         border-left: 3px solid transparent; border-radius: var(--r-sm);
         padding: var(--sp-3); color: var(--ink); text-decoration: none; }
.qitem:hover { border-color: var(--ink-3); text-decoration: none; }
.qitem.sel { border-color: var(--accent); border-left-color: var(--accent);
             background: var(--accent-soft); }
.qtop { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.qkind { font-size: var(--fs-sm); }
.qname { font-weight: 700; }
.qage.stale { color: var(--warn); font-weight: 700; }
.qage { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs);
        font-variant-numeric: tabular-nums; white-space: nowrap; }
.qsub { color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.qassignee { color: var(--ink-3); }
.qdetail .card { margin-bottom: var(--sp-3); }
/* Under the item's name, above its details: the panel answers "what do I do"
   before "what is this". Spacing comes from .actions. */
.qactions { margin: var(--sp-3) 0 var(--sp-4); padding-bottom: var(--sp-4);
            border-bottom: 1px solid var(--line-soft); }
.qsub-head { font-size: var(--fs-lg); font-weight: 700; margin: var(--sp-5) 0 var(--sp-2); }
@media (max-width: 1000px) {
  .queue { grid-template-columns: 1fr; }
  .qlist { max-height: 320px; }
}

/* ── help centre ───────────────────────────────────────────────────────
   One long page with a sticky contents rail. The rail is a nav, not a
   sidebar of controls, so it collapses above the content on narrow screens
   rather than squeezing the prose it exists to point at. */
.help-lede { margin: calc(var(--sp-2) * -1) 0 var(--sp-5); font-size: var(--fs-lg); }

.help { display: grid; grid-template-columns: 15rem 1fr; gap: var(--sp-5); align-items: start; }
@media (max-width: 900px) { .help { grid-template-columns: 1fr; } }

.help-toc { position: sticky; top: var(--sp-4); background: var(--card);
            border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); }
@media (max-width: 900px) { .help-toc { position: static; } }
.help-toc-h { margin: 0 0 var(--sp-2); font-size: var(--fs-xs); text-transform: uppercase;
              letter-spacing: .06em; color: var(--ink-3); }
.help-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.help-toc li { margin: 0 0 var(--sp-1); }
.help-toc a { display: block; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm);
              color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.35; }
.help-toc a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.help-toc li.here > a { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.help-print { margin: var(--sp-4) 0 0; font-size: var(--fs-xs); line-height: 1.4; }

.help-body { display: grid; gap: var(--sp-4); }
.help-section { scroll-margin-top: var(--sp-4); }
.help-section h2 { margin: 0 0 var(--sp-1); }
/* The section you arrived at from a page's "?" gets a rail, so it is obvious
   which one answered your question when the whole guide is one page. */
.help-section.target { border-left: 3px solid var(--accent); }
.help-lede-s { margin: 0 0 var(--sp-4); color: var(--ink-3); font-size: var(--fs-sm); }
.help-section p { margin: 0 0 var(--sp-3); max-width: 62ch; }

.help-steps, .help-list { margin: 0 0 var(--sp-3); padding-left: var(--sp-5); max-width: 62ch; }
.help-steps li, .help-list li { margin: 0 0 var(--sp-2); }
.help-steps { counter-reset: step; list-style: none; padding-left: 0; }
.help-steps li { position: relative; padding-left: var(--sp-6); counter-increment: step; }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: .1em;
    width: 1.5rem; height: 1.5rem; border-radius: var(--r-pill); background: var(--accent-soft);
    color: var(--accent); font-size: var(--fs-xs); font-weight: 700;
    display: flex; align-items: center; justify-content: center; }

.help-defs { margin: 0 0 var(--sp-3); display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr;
             gap: var(--sp-2) var(--sp-4); align-items: baseline; }
@media (max-width: 620px) { .help-defs { grid-template-columns: 1fr; gap: 0 0; }
                            .help-defs dd { margin: 0 0 var(--sp-3); } }
.help-defs dt { font-weight: 700; font-size: var(--fs-sm); }
.help-defs dd { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }

.help-note, .help-warn { padding: var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.help-note { background: var(--accent-soft); border-left: 3px solid var(--accent-line); }
.help-warn { background: var(--warn-bg); border-left: 3px solid var(--warn); color: var(--warn); }

.help-back { margin: var(--sp-4) 0 0; font-size: var(--fs-xs); }

/* Header "?" — an icon on a crowded nav, the word as well when there is room. */
.help-link { display: inline-flex; align-items: center; gap: var(--sp-1); }
.help-link span[aria-hidden] { display: inline-flex; align-items: center; justify-content: center;
    width: 1.35rem; height: 1.35rem; border-radius: var(--r-pill);
    border: 1px solid var(--accent-line); font-size: var(--fs-xs); font-weight: 700; }
@media (max-width: 1100px) { .help-word { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Printing the guide is a real workflow: it is what a new starter reads on
   their first shift, away from the screen. */
@media print {
  .side, .help-toc, .help-back, .alert { display: none; }
  .shell { display: block; }
  .help { display: block; }
  .help-section { border: 0; break-inside: avoid; padding: 0; margin: 0 0 var(--sp-5); }
  a { color: inherit; text-decoration: underline; }
}

/* ── guided tour ───────────────────────────────────────────────────────
   The dimming is done by ONE element's box-shadow rather than four panels
   around the target: a single spread shadow cannot leave a seam between
   panels, and it animates as one rectangle when the step moves. */
.tour { position: fixed; inset: 0; z-index: 900; }
.tour-spot { position: fixed; border-radius: var(--r-sm);
  box-shadow: 0 0 0 9999px rgba(35, 31, 28, .55);
  outline: 2px solid var(--accent); outline-offset: 0;
  transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }

.tour-tip { position: fixed; z-index: 901; width: min(23rem, calc(100vw - 16px));
  background: var(--card); color: var(--ink);
  border-radius: var(--r-md); padding: var(--sp-4);
  box-shadow: 0 12px 32px rgba(35, 31, 28, .28);
  transition: top .2s ease, left .2s ease; }
.tour-tip-h { margin: 0 0 var(--sp-2); font-size: var(--fs-lg); line-height: 1.25; }
.tour-tip-b { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); }

.tour-foot { display: flex; align-items: center; justify-content: space-between;
             gap: var(--sp-3); flex-wrap: wrap; }
.tour-dots { display: flex; gap: var(--sp-1); }
.tour-dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--line);
            transition: background .2s ease; }
.tour-dot.on { background: var(--accent); }

.tour-acts { display: flex; gap: var(--sp-2); margin-left: auto; }
.tour-btn { font: inherit; font-size: var(--fs-sm); cursor: pointer;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.tour-btn:hover { background: var(--surface); }
.tour-btn-go { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.tour-btn-go:hover { background: #0a4d41; }
.tour-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
                 box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* Screen readers get the position; sighted users get the dots. */
.tour-count { position: absolute; width: 1px; height: 1px; overflow: hidden;
              clip: rect(0 0 0 0); white-space: nowrap; }

.tour-still .tour-spot, .tour-still .tour-tip, .tour-still .tour-dot { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-tip, .tour-dot { transition: none; }
}
@media print { .tour { display: none; } }

/* "Take the tour" sits under a help section's lede, not in its heading: it is
   an offer, not the title of the thing. */
.help-tour { display: inline-block; margin: 0 0 var(--sp-4); }

/* ── simulated fax ─────────────────────────────────────────────────────
   Neutral slate, deliberately NOT amber or red: those mean urgency here,
   and a simulated routine fax is not urgent. It only needs to be unmistakable. */
/* Simulated rows read as a dashed outline rather than a colour: the system
   has no lilac, and "this is not real" is a property of the row, not a state. */
.badge-sim { background: var(--card); color: var(--ink-3);
             border: 1px dashed var(--accent-line); }

.sim-form h2 { font-size: var(--fs-lg); margin: var(--sp-5) 0 var(--sp-3); }
.sim-form h2:first-of-type { margin-top: 0; }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
            gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.sim-grid label { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-sm); }
.sim-grid label .muted { font-size: var(--fs-xs); }
.sim-grid input, .sim-grid select { width: 100%; }

/* ── edit details (record pages) ───────────────────────────────────────
   Fields read as plain values; corrections live in one disclosure under them.
   Four inline forms with four Save buttons inside the field list were what
   made a record look disordered. <details> needs no JavaScript. */
.edit-details { margin-top: var(--sp-4); border-top: 1px solid var(--line-soft); padding-top: var(--sp-3); }
.edit-details summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: var(--sp-1) 0; }
.edit-details[open] summary { margin-bottom: var(--sp-3); }
.edit-row { display: grid; gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-soft); }
.edit-row:last-child { border-bottom: 0; }
.edit-label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.edit-row form.inline { margin: 0; gap: var(--sp-3); }
.edit-row .note { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }

/* ── history on record pages: day bar, day headings, pager ──────────────── */
.daybar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
          margin: 0 0 var(--sp-4); }
.daybar-day { font-size: var(--fs-lg); min-width: 12ch; text-align: center; }
.daybar-note { color: var(--ink-2); }
.daybar-pick { margin: 0 0 0 auto; }
.ranges { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ranges a { padding: 4px 12px; border-radius: var(--r-pill); color: var(--ink-2);
            font-size: var(--fs-sm); border: 1px solid transparent; }
.ranges a:hover { border-color: var(--line); text-decoration: none; }
.ranges a.on { border-color: var(--ink-3); color: var(--ink); font-weight: 700; background: var(--card); }
tr.day-head td { background: var(--line-soft); font-weight: 700; font-size: var(--fs-sm);
                 color: var(--ink-2); padding: var(--sp-2) var(--sp-3); }
.pager { justify-content: center; margin: var(--sp-4) 0; }
.filters input[type=search] { min-width: 16rem; }

/* ── live refresh (live.js) ──────────────────────────────────────────
   Bottom-centre and out of the way: it reports, it never covers the list. */
.live-banner { position: fixed; left: 50%; bottom: var(--sp-4); transform: translateX(-50%);
               z-index: 800; display: flex; align-items: center; gap: var(--sp-3);
               max-width: calc(100vw - 32px); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
               background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill);
               box-shadow: 0 6px 24px rgba(0, 0, 0, .12); font-weight: 700; }
.live-note { padding: var(--sp-2) var(--sp-4); color: var(--ink-2); font-weight: 400; }
@media print { .live-banner { display: none; } }

/* Calendar (calendar.php): day / week / month; each staff member has a colour
   (--c, set inline), overlapping appointments share their hours side by side. */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
           gap: var(--sp-3); margin-bottom: var(--sp-3); }
.cal-bar .tabs { margin: 0; }
.cal-nav { gap: .5rem; }
.cal-wrap { overflow-x: auto; }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.cal-legend a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill);
                border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: var(--fs-sm); }
.cal-legend a:hover { text-decoration: none; border-color: var(--ink-3); }
.cal-legend a.on { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-3)); flex: 0 0 auto; display: inline-block; }

.cal-grid { display: grid; grid-template-columns: 3.5rem repeat(var(--cols), minmax(0, 1fr));
            background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); }
.cal-grid.week { min-width: 760px; }
.cal-corner, .cal-dayhead { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.cal-dayhead { padding: .5rem; text-align: center; border-left: 1px solid var(--line); font-size: var(--fs-sm); }
.cal-dayhead a { color: var(--ink-2); }
.cal-dayhead strong { font-size: var(--fs-md); color: var(--ink); margin-left: 2px; }
.cal-dayhead.today strong { background: var(--accent); color: #fff; border-radius: var(--r-pill); padding: 1px 7px; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .75rem; color: var(--ink-3); }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line);
           background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px),
                             linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
           background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.cal-col.today { background-color: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.cal-off { position: absolute; left: 0; right: 0;
           background: repeating-linear-gradient(45deg, var(--line) 0 1px, transparent 1px 7px); opacity: .7; }
.cal-gbusy { position: absolute; left: 0; right: 0; border-left: 3px solid color-mix(in srgb, var(--c) 45%, var(--ink-3));
             background: color-mix(in srgb, var(--ink) 9%, transparent); font-size: .68rem; color: var(--ink-2);
             padding: 1px 4px; overflow: hidden; pointer-events: auto; }
/* Empty, bookable slots: under the busy blocks and appointments drawn after them. */
.cal-slot { position: absolute; left: 0; right: 0; display: block; border-radius: 4px; }
.cal-slot:hover, .cal-slot:focus-visible { background: var(--accent-soft); text-decoration: none; outline-offset: -2px; }
.cal-slot:hover::after, .cal-slot:focus-visible::after { content: "+"; position: absolute; left: 6px; top: 2px;
  font-weight: 700; color: var(--ink-3); font-size: .8rem; }
.cal-ev { position: absolute; z-index: 1; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
          padding: 3px 6px; border-radius: 6px; border-left: 4px solid var(--c);
          background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--ink);
          font-size: .78rem; line-height: 1.25; box-shadow: 0 0 0 1px var(--card); }
.cal-ev:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 24%, var(--card)); z-index: 3; }
.cal-ev strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-time { color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 700; font-size: .72rem; }
.cal-ev-sub { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.short .cal-ev-sub { display: none; }
.cal-ev.narrow { padding: 2px 4px; border-left-width: 3px; font-size: .72rem; }
.cal-ev.narrow .cal-ev-sub { display: none; }
.cal-ev-time { white-space: nowrap; }
.cal-ai { font-size: .68rem; font-weight: 700; padding: 0 4px; border-radius: 4px;
          background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }

table.cal-month { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; background: var(--card); }
table.cal-month th { padding: .4rem; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--line); }
table.cal-month td { height: 7.5rem; vertical-align: top; padding: 4px; border: 1px solid var(--line); }
table.cal-month td.out { background: var(--surface); }
table.cal-month td.out .cal-daynum { color: var(--ink-3); }
.cal-daynum { display: inline-block; font-weight: 700; color: var(--ink); margin-bottom: 2px; padding: 0 6px; border-radius: var(--r-pill); }
td.today .cal-daynum { background: var(--accent); color: #fff; }
.cal-chip { display: flex; align-items: center; gap: 5px; padding: 1px 4px; border-radius: 4px; font-size: .75rem;
            color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            background: color-mix(in srgb, var(--c) 12%, transparent); margin-bottom: 2px; }
.cal-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 22%, transparent); }
.cal-chip-txt { overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .72rem; color: var(--ink-2); }

/* Text only screen readers hear (column headers for icon/button columns). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Services list (procedures.php): one calm row per service, actions side by side. */
table.svc-list td { vertical-align: middle; padding: var(--sp-3) var(--sp-3); }
table.svc-list th { padding: var(--sp-3); }
table.svc-list td:first-child, table.svc-list th:first-child { padding-left: var(--sp-4); }
table.svc-list .num { text-align: right; font-variant-numeric: tabular-nums; }
.svc-name { min-width: 8rem; }
.svc-name strong, .svc-name .muted { display: block; }
.svc-name .muted { margin-top: 2px; }
.svc-len { white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-len > * { display: block; }
.svc-len strong { margin-top: 2px; }
.svc-desc { min-width: 12rem; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; }
/* Fixed-content columns shrink to fit; the description takes the rest. */
table.svc-list .svc-len, table.svc-list .svc-prep, table.svc-list .num,
table.svc-list .svc-status, table.svc-list .row-actions { width: 1%; white-space: nowrap; }
.svc-prep { white-space: nowrap; }
.chip { display: inline-block; min-width: 2.1rem; padding: 2px 8px; margin-right: 4px; border-radius: var(--r-pill);
        font-size: var(--fs-xs); font-weight: 700; text-align: center;
        border: 1px dashed var(--line); color: var(--ink-3); }
.chip.on { border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { display: inline-flex; vertical-align: middle; margin: 0 0 0 var(--sp-1); }
.btn-soft { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn-soft:hover { background: var(--line-soft); color: var(--ink); }
tr.is-off .svc-name strong, tr.is-off .svc-len, tr.is-off .svc-desc { color: var(--ink-3); }

/* Staff schedule (staff-schedule.php) and the Staff list summaries. */
.staff-sched fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
.staff-sched legend { font-weight: 700; margin-bottom: var(--sp-2); }
.staff-sched .opt { display: block; margin: var(--sp-1) 0; font-weight: 400; }
.svc-picks { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-2) 0 0 1.6rem; }
.svc-picks label { font-weight: 400; }
.hours-grid { border-collapse: collapse; margin: var(--sp-3) 0; }
.hours-grid th, .hours-grid td { padding: 6px 12px 6px 0; text-align: left; font-weight: 400; white-space: nowrap; }
.hours-grid thead th { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; }
.hours-grid tbody th label { font-weight: 600; }
.hours-grid input[type=time] { width: 9.5rem; }
.staff-sum { white-space: nowrap; }
.staff-sum span { display: block; }
.office-hours { border: 0; padding: 0; margin: 0 0 var(--sp-4); }
.office-hours legend { margin-bottom: var(--sp-1); }

/* Staff booking (appointment-new.php) and the free-time move picker. */
.sb-pickers { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); align-items: flex-end; }
.sb-pickers p { margin: 0 0 var(--sp-3); }
.sb-times { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-4); }
.sb-times legend { font-weight: 700; padding: 0 6px; }
.sb-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--sp-2); }
.sb-group-label { width: 6.5rem; font-size: var(--fs-sm); color: var(--ink-3); }
.sb-time { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line);
           border-radius: var(--r-pill); background: var(--card); cursor: pointer; font-size: var(--fs-sm); }
.sb-time:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.field-error { display: block; color: var(--danger); font-size: var(--fs-sm); margin-top: 2px; }

