/* The staff pages' finish (22 Oct): one layer loaded after console.css / scribe.css / case.css on every staff page.
   Same layout, sharper surface: a typeface that carries Hindi, deeper accent, buttons that read as buttons, inputs with
   a clear edge and focus ring, panels that lift off the page. Colours stay tokens, so the Sarvodaya brand still swaps. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap");

:root {
  --ink: #10252b;
  --muted: #586b6e;
  --line: #dde5e4;
  --line-strong: #c4d0cf;
  --paper: #eef3f2;
  --paper-2: #f6f9f8;
  --white: #ffffff;
  --navy: #0f4f57;
  --navy-hover: #0a3d44;
  --mint: #0b7666;
  --mint-soft: #e0f1ec;
  --amber: #a5680b;
  --amber-soft: #fdf0d8;
  --red: #bf3a2f;
  --red-soft: #fdece9;
  --blue-soft: #e8effc;
  --ring: 0 0 0 3px rgba(11, 118, 102, .18);
  --shadow: 0 1px 2px rgba(16, 37, 43, .05), 0 2px 10px -2px rgba(16, 37, 43, .06);
  --shadow-lift: 0 1px 2px rgba(16, 37, 43, .06), 0 12px 32px -14px rgba(16, 37, 43, .22);
  font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.brand-sarvodaya { --mint: #0a7fae; --mint-soft: #e0f1f8; --navy: #0d3b52; --navy-hover: #082b3d; --ring: 0 0 0 3px rgba(10, 127, 174, .2); }

body { font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar { padding: 10px 24px; min-height: 64px; box-shadow: 0 1px 0 var(--line), 0 6px 18px -16px rgba(16, 37, 43, .4); border-bottom: 0; }
.brand strong { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brand small { font-size: 11.5px; }
.brand-logo { width: 32px; height: 32px; }
.mode-nav { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.mode-nav a { color: #45595c; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 9px; transition: background .12s, color .12s; }
.mode-nav a:hover:not(.on) { background: rgba(255, 255, 255, .7); color: var(--ink); }
.mode-nav a.on { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(16, 37, 43, .1), 0 0 0 1px var(--line); }
.staff-who b { font-size: 13.5px; }
.staff-who small { font-size: 11.5px; }

/* ---------- buttons: every button has an edge, a hover and a focus ring ---------- */
.btn, a.btn, button.link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.2;
  color: var(--ink); background: var(--white); border: 1px solid var(--line-strong);
  box-shadow: 0 1px 1px rgba(16, 37, 43, .05); text-decoration: none; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}
.btn:hover:not(:disabled), a.btn:hover, button.link:hover:not(:disabled) { background: var(--paper-2); border-color: #a9baba; box-shadow: 0 1px 3px rgba(16, 37, 43, .1); }
.btn:active:not(:disabled), button.link:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible, button.link:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--mint); }
.btn:disabled, button.link:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.primary, a.btn.primary {
  background: var(--navy); border-color: var(--navy); color: #fff;
  box-shadow: 0 1px 2px rgba(18, 54, 62, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.btn.primary:hover:not(:disabled), a.btn.primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.btn.primary:focus-visible { box-shadow: 0 0 0 3px rgba(18, 54, 62, .25); }
.btn.ghost { background: var(--white); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-ghost, button.link.danger { background: var(--white); color: var(--red); border-color: #ebbcb6; }
.btn.danger-ghost:hover:not(:disabled), button.link.danger:hover:not(:disabled) { background: var(--red-soft); border-color: var(--red); }
.btn.small, button.link { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn.big { min-height: 46px; padding: 12px 28px; font-size: 15px; border-radius: 12px; }
.row-actions .btn { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
.link { color: var(--mint); }

/* ---------- panels ---------- */
.panel { border-radius: 16px; border-color: var(--line); box-shadow: var(--shadow); }
.panel-head { padding: 16px 18px 13px; gap: 10px 12px; flex-wrap: wrap; }
.panel-head h2 { white-space: nowrap; }
.panel-head small { color: var(--mint); font-size: 10.5px; letter-spacing: 1.1px; font-weight: 700; text-transform: uppercase; }
.panel-head h2 { font-size: 16.5px; font-weight: 700; margin-top: 3px; }
.panel-head > small, .panel-head small.muted { color: var(--muted); font-size: 12px; letter-spacing: 0; font-weight: 500; text-transform: none; }
.card { border-radius: 12px; border-color: var(--line); }
.board { gap: 16px; padding: 16px 24px 24px; height: calc(100vh - 64px); }

/* ---------- form fields: one look everywhere ---------- */
.field { gap: 5px; }
.field span, .login-card label, .settings-form label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .1px; }
.field select, .dept-filter select, .setup input, .setup select, .setup textarea, .rx-input, .note-editor textarea,
.settings-form input, .login-card input, .type-row input, .fwd-hours input[type=time], .eye-table input, .glasses-table input, .walkin select {
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--white); color: var(--ink);
  font: inherit; font-size: 14px; transition: border-color .12s, box-shadow .12s;
}
.field select, .dept-filter select, .setup input, .setup select, .rx-input, .settings-form input, .type-row input, .walkin select { min-height: 38px; padding: 7px 11px; }
.login-card input { min-height: 44px; padding: 10px 12px; font-size: 15px; }
.field select:hover, .setup input:hover, .setup select:hover, .rx-input:hover, .settings-form input:hover, .login-card input:hover { border-color: #a9baba; }
.field select:focus, .dept-filter select:focus, .setup input:focus, .setup select:focus, .setup textarea:focus, .rx-input:focus,
.note-editor textarea:focus, .settings-form input:focus, .login-card input:focus, .type-row input:focus, .fwd-hours input[type=time]:focus,
.eye-table input:focus, .glasses-table input:focus, .walkin select:focus {
  outline: none; border-color: var(--mint); box-shadow: var(--ring);
}
::placeholder { color: #8a9b9c; }
input[type=checkbox], input[type=radio] { accent-color: var(--mint); }

/* type-ahead boxes (static/combo.js, 30 Oct): the field looks like the dropdown it replaces; the list drops under it */
.combo { position: relative; display: block; min-width: 0; }
.combo[hidden], .combo-list[hidden], select.combo-native { display: none !important; }
.combo .combo-input {
  width: 100%; min-width: 0; min-height: 38px; padding: 7px 30px 7px 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--white); color: var(--ink); font: inherit; font-size: 14px; text-overflow: ellipsis; transition: border-color .12s, box-shadow .12s;
}
.combo .combo-input:hover:not(:disabled) { border-color: #a9baba; }
.combo .combo-input:focus { outline: none; border-color: var(--mint); box-shadow: var(--ring); }
.combo .combo-input:disabled { background: var(--paper-2); color: var(--muted); cursor: not-allowed; }
.field.compact .combo { display: inline-block; vertical-align: middle; }
.field.compact .combo .combo-input { width: auto; max-width: 290px; }
.combo-chev { position: absolute; top: 50%; right: 9px; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: transform .15s; }
.combo.open .combo-chev { transform: rotate(180deg); }
.combo-list {
  position: fixed; z-index: 1000; width: max-content; margin: 0; padding: 4px; list-style: none; overflow-y: auto; overscroll-behavior: contain;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lift); color: var(--ink); font-size: 14px;
}
.combo-list [role=option] { display: flex; align-items: baseline; gap: 14px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.combo-list [role=option].on { background: var(--mint-soft); }
.combo-list [role=option][aria-disabled=true] { opacity: .45; cursor: default; }
.combo-list .combo-label { min-width: 0; overflow-wrap: anywhere; }
.combo-list .cur .combo-label { font-weight: 600; }
.combo-list .cur .combo-label::after { content: "\2713"; margin-left: 6px; color: var(--navy); font-weight: 700; }
.combo-list .blank .combo-label { color: var(--muted); }
.combo-list b { font-weight: 700; color: var(--navy); }
.combo-list .combo-hint { flex: none; max-width: 55%; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.combo-list .combo-head { padding: 9px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.combo-list .combo-empty, .combo-list .combo-more { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.med .combo .combo-input { min-height: 0; padding: 6px 24px 6px 8px; border-color: var(--line); border-radius: 7px; font-size: 13px; }
.med .combo-chev { right: 6px; width: 14px; height: 14px; margin-top: -7px; }
@media (pointer: coarse) { .combo .combo-input, .med .combo .combo-input { font-size: 16px; } }   /* no zoom on a phone's tap */
@media (prefers-reduced-motion: reduce) { .combo-chev { transition: none; } }

/* ---------- pills, chips, segmented controls ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  line-height: 1.2; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
/* status pills: a colour and a dot that mean the same thing on every page */
.pill.ok { background: #e7f5ee; color: #17774a; border-color: #c6e7d4; }
.pill.warn { background: var(--amber-soft); color: var(--amber); border-color: #f1d6a8; }
.pill.bad { background: var(--red-soft); color: var(--red); border-color: #f3c9c4; }
.pill.info { background: var(--blue-soft); color: #22579f; border-color: #cddcf3; }
.pill.neutral { background: var(--paper-2); color: #4b5b62; border-color: var(--line); }
.pill.ok::before, .pill.warn::before, .pill.bad::before, .pill.info::before, .pill.live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.live { background: var(--mint-soft); color: var(--mint); border-color: #c4e5dc; }
.pill.ended, .pill.soft { background: var(--paper); color: var(--muted); border-color: var(--line); }
.pill.sample { border-color: #f1d9ad; }
.seg { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { font-size: 12.5px; font-weight: 600; color: #45595c; padding: 6px 12px; border-radius: 7px; }
.seg button.on { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(16, 37, 43, .1), 0 0 0 1px var(--line); }
.seg button:hover:not(.on) { color: var(--ink); }

/* day pickers: the chosen day is filled, the rest are clear buttons */
.desk-days { gap: 8px; }
.desk-days .chip, .days button {
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--white); color: var(--ink); box-shadow: 0 1px 1px rgba(16, 37, 43, .04); cursor: pointer;
}
.desk-days .chip:hover, .days button:hover { border-color: #a9baba; background: var(--paper-2); }
.desk-days .chip.offered, .days button.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(18, 54, 62, .3); }

/* ---------- calendars ---------- */
.doctor { border-radius: 12px; padding: 12px 14px; border-color: var(--line); background: var(--white); }
.doctor-head strong { font-size: 14.5px; }
.doctor-head small { font-size: 12px; }
.window { border-radius: 10px; padding: 8px 10px; border-color: var(--line); background: var(--paper-2); }
.window-head { font-size: 13px; font-variant-numeric: tabular-nums; }
.window .bar { height: 7px; background: #dfe8e6; border-radius: 4px; margin-top: 6px; }
.window .bar i { background: linear-gradient(90deg, var(--mint), #13937f); border-radius: 4px; }
.wait-est { font-size: 12px; margin-top: 5px; }
.window.past { background: transparent; color: var(--muted); }
.window.past .bar i { background: #b9c7c5; }
.chip { font-size: 11.5px; border-radius: 7px; padding: 3px 7px; }

/* ---------- tables ---------- */
.logins-table { font-size: 14px; }
.logins-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); background: var(--paper-2); padding: 10px 16px; }
.logins-table td { padding: 12px 16px; border-color: var(--line); }
.logins-table tbody tr { transition: background .1s; }
.logins-table tbody tr:hover { background: #f8fbfa; }
.logins-table td small { font-size: 12px; margin-top: 1px; }
.logins-table code, .logins-table .mono { font-size: 13.5px; }
.table-wrap { overflow-x: auto; }

/* ---------- front desk ---------- */
.desk { padding: 20px 24px; gap: 16px; }
.desk-grid { gap: 16px; }
.desk-doctors { gap: 12px; padding: 14px; }
.desk-callbacks { gap: 10px; font-size: 14px; }
.desk-callbacks li { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--paper-2); }
.desk-callbacks li.muted { border: 0; background: none; padding: 0; }
.walkin { gap: 12px; padding: 16px 18px 18px; background: var(--paper-2); }
.walkin .w-msg.good { color: var(--mint); }

/* ---------- settings, logins ---------- */
.settings { padding: 20px 24px; gap: 16px; }
.settings-body { padding: 6px 18px 18px; }
.settings-list { font-size: 14px; gap: 10px 18px; }
.chips span { font-size: 12.5px; background: var(--paper-2); border-color: var(--line); }
.meter { height: 10px; background: #e3ebe9; border: 0; }
.meter i { background: linear-gradient(90deg, var(--mint), #13937f); }
.reception-new { padding: 14px 18px 18px; gap: 10px; }

/* ---------- doctor's room ---------- */
.sline { border-radius: 10px; }
.who { font-size: 11.5px; padding: 3px 10px; }
.vital { border-radius: 9px; }
.facts dd.fresh[data-v="—"], .facts dd.fresh:empty { animation: none; }   /* an empty field has nothing new to flash */

/* ---------- sign in ---------- */
.login-body { background: radial-gradient(1200px 600px at 50% -10%, #e2efec 0%, var(--paper) 60%); }
.login-card { max-width: 400px; border-radius: 20px; padding: 30px; box-shadow: var(--shadow-lift); border-color: var(--line); }
.login-card h1 { font-size: 22px; font-weight: 800; }
.login-card .btn.primary { min-height: 44px; font-size: 15px; }

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; }
  .board, .desk, .settings { padding: 14px 16px 20px; }
  .btn, .seg button, .days button, .desk-days .chip { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
.logins-intro, .settings-body > p.muted { font-size: 13.5px; line-height: 1.6; max-width: 78ch; color: var(--muted); }
.staff-nav, .desk-days, .days { scrollbar-width: none; }
.staff-nav::-webkit-scrollbar, .desk-days::-webkit-scrollbar, .days::-webkit-scrollbar { display: none; }

/* Front desk: today's column (22 Oct) */
.logins-table td.when b { white-space: nowrap; }
.logins-table td.nowrap { white-space: nowrap; }
.logins-table small.booked { margin-top: 3px; color: var(--muted); white-space: nowrap; }
.row-actions.stack { flex-direction: column; align-items: stretch; gap: 6px; }
.row-actions.stack .btn { justify-content: center; }
.q-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.q-undo { all: unset; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.q-undo:hover { color: var(--ink); }
.q-undo:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 3px; }
.desk-note { margin: -4px 0 6px; padding: 0 16px; }
.desk .logins-table th, .desk .logins-table td { padding-left: 12px; padding-right: 12px; }
.desk .logins-table td.today { width: 1%; white-space: nowrap; }

/* Doctors' leave */
.facts-page { max-width: 860px; }
.facts-intro { margin: 0 0 12px; max-width: 65ch; }
.facts-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.facts-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.facts-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.facts-tabs button { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.facts-tabs button b { margin-left: 3px; font-variant-numeric: tabular-nums; }
.facts-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink, #1c2b30); box-shadow: 0 1px 2px rgba(20, 40, 50, .1); }
.facts-find { flex: 1 1 200px; max-width: 280px; }
.facts-page .facts-msg { min-height: 0; margin: 6px 0 8px; font-size: 13px; }
.facts-page .facts-msg.good { color: var(--mint); }
.facts-page .facts-msg.bad { color: var(--red); }
.fact-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fact { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.fact-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fact-topic { color: var(--muted); font-size: 12px; font-weight: 600; }
.fact-q { margin: 4px 0 10px; line-height: 1.5; overflow-wrap: anywhere; }
.fact.done .fact-q { margin-bottom: 6px; color: var(--muted); font-size: 13.5px; }
.fact-a { margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.fact-say { margin: 0 0 4px; font-size: 14px; }
.fact-from { margin: -4px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.fact-from b { color: var(--ink, #1c2b30); font-weight: 600; }
.fact-from a { color: var(--mint); font-weight: 600; text-decoration: none; }
.fact-from a:hover, .fact-from a:focus-visible { text-decoration: underline; }
.fact.done .fact-from { margin: -2px 0 6px; }
.fact-calls { list-style: none; margin: 2px 0 0; padding: 0; }
.fact-calls li { margin: 1px 0; }
.fact-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact-opt { min-height: 34px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; }
.fact-opt:hover, .fact-opt:focus-visible { border-color: var(--mint); color: var(--mint); }
.fact-opt.write { border-style: dashed; }
.fact-opt.quiet { border-color: transparent; color: var(--muted); }
.fact-edit { display: flex; flex-direction: column; gap: 8px; }
.fact-edit .field { display: flex; flex-direction: column; gap: 4px; }
.fact-edit textarea { width: 100%; resize: vertical; }
.fact-edit p { margin: 0; }
.fact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
@media (max-width: 560px) { .facts-find { max-width: none; } }
/* Facts & flows (13 Nov): each question says its kind; a filter shows one kind; a flow says what she does now and how
   its answer takes effect. */
.facts-kinds button[aria-pressed="true"] { background: var(--white); color: var(--ink, #1c2b30); box-shadow: 0 1px 2px rgba(20, 40, 50, .1); }
.facts-kinds button b:empty { display: none; }
.fact-kind { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase; background: color-mix(in srgb, var(--navy) 9%, var(--white)); color: var(--navy); }
.fact-kind.flow { background: var(--amber-soft); color: var(--amber); }
.fact-now { margin: -4px 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.fact-now b { color: var(--ink, #1c2b30); font-weight: 600; }
.fact-effect { margin: 2px 0 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fact-effect code { font-size: 12px; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav-count { display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.leave-page { max-width: 980px; }
.leave-page .walkin { margin: 0; }
.leave-summary { margin: 0 0 10px; }
.leave-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.leave-done { margin-top: 12px; padding: 12px 14px; border: 1px solid #c4e5dc; border-radius: 12px; background: var(--mint-soft); }
.leave-done p { margin: 4px 0; }
.desk-callbacks li.cb-done { opacity: .6; }
.moved-tag { margin-left: 6px; font-size: 11px; padding: 2px 8px; }
.leave-patients { margin-top: 8px; font-size: 13px; }
.w-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.wa-tag { display: block; width: max-content; margin-top: 4px; font-size: 11px; padding: 2px 8px; }

/* What's new */
.whatsnew { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(400px, calc(100vw - 32px)); max-height: min(70vh, 560px);
  overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(16, 37, 43, .18); padding: 16px 18px; }
.whatsnew small { font-size: 11px; letter-spacing: .6px; color: var(--mint); font-weight: 700; }
.whatsnew h2 { margin: 2px 0 8px; font-size: 18px; }
.whatsnew ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.whatsnew li { border-top: 1px solid var(--line); padding-top: 10px; }
.whatsnew li p { margin: 4px 0; font-size: 14px; color: var(--ink); line-height: 1.45; }
.whatsnew li a { font-size: 13px; color: var(--mint); }
.wn-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 600px) { .whatsnew { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* Help */
.help-page { max-width: 900px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.help-toc a { font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--white); }
.help-toc a:hover { border-color: var(--mint); color: var(--mint); }
.help-section h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.help-section .who { font-size: 12px; font-weight: 600; color: var(--muted); }
.help-body { padding: 4px 20px 18px; line-height: 1.55; font-size: 15px; max-width: 72ch; }
.help-body ol, .help-body ul { padding-left: 20px; margin: 6px 0 10px; }
.help-body li { margin: 4px 0; }
.help-body p { margin: 8px 0; }
.help-section:target { outline: 2px solid var(--mint); outline-offset: 2px; }
.late-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 8px; }
.reg-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.reg-row label { flex: 1; min-width: 220px; }

/* Report */
.report-page { max-width: 1000px; }
.report-range { display: flex; gap: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--white); }
.kpi small { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 26px; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi span { font-size: 12px; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: grid; grid-template-columns: 200px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.bars i { display: block; height: 10px; border-radius: 6px; background: var(--mint); min-width: 4px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .bars li { grid-template-columns: 120px 1fr 32px; } }
.settings-form.upi-form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 560px; }
.upi-form label.w-consent { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.upi-form label.w-consent input { width: auto; }
.upi-form button { align-self: flex-start; }

/* Calls today (desk) */
.desk-calls { list-style: none; margin: 0; padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.call-item { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: var(--white); display: flex; flex-direction: column; gap: 4px; }
.call-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-row small { color: var(--muted); font-variant-numeric: tabular-nums; }
.call-row .q-undo { margin-left: auto; }
.call-booked { color: var(--mint); }
.call-last { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-lines { max-height: 260px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.call-lines p { margin: 0; line-height: 1.45; }
.call-lines p.agent b { color: var(--mint); }
.call-lines p.caller b { color: var(--navy); }
.pill.pulse { animation: callpulse 1.6s ease-in-out infinite; }
@keyframes callpulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .pill.pulse { animation: none; } }

/* Top bar on one line: the page tabs scroll sideways when there is no room, the user and Sign out stay put (28 Oct) */
.staff-bar { flex-wrap: nowrap; }
.staff-bar .staff-nav { flex: 0 1 auto; min-width: 0; overflow-x: auto; }
.staff-bar .staff-me { margin-left: auto; flex: none; display: flex; align-items: center; gap: 12px; }
.staff-bar .staff-brand { flex: none; }
@media (max-width: 640px) { .staff-bar .staff-brand div, .staff-bar .staff-who { display: none; } }

/* ======================================================================================================
   Top bar actions (28 Oct): notifications, messages and the account menu, all from static/staff.js.
   ====================================================================================================== */
.staff-me { gap: 6px; }
.tb-icon {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  border: 1px solid transparent; background: transparent; color: #3f5157; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.tb-icon svg, .cp-x svg, .cp-back svg, .cp-search svg, .cp-send svg, .np-ico svg, .tb-chev, .cp-intro svg, .np-done svg, .tb-avatar svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.tb-icon svg { width: 21px; height: 21px; }
.tb-icon:hover, .tb-icon.on { background: var(--paper); color: var(--ink); border-color: var(--line); }
.tb-icon:focus-visible { outline: none; box-shadow: var(--ring); }
.tb-badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #d92d20; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--white); font-variant-numeric: tabular-nums;
}
/* Calls on the AI line now (11 Nov): a red pill on every page reception and admins use; it opens the live transcript,
   where the call can be taken over. */
.tb-live {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; flex: none;
  background: var(--red-soft); color: var(--red); border: 1px solid #f3c9c4; font-size: 12.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap; max-width: 230px; overflow: hidden; text-overflow: ellipsis;
}
.tb-live:hover { background: #fbdcd7; border-color: var(--red); }
.tb-live:focus-visible { outline: none; box-shadow: var(--ring); }
.tb-live > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tb-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; animation: callpulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tb-live-dot { animation: none; } }
@media (max-width: 640px) { .tb-live { max-width: 132px; padding: 0 10px 0 9px; } }
/* a big hospital's band on a phone: its logo leaves the pill less room (18 Nov: 390 px ran 39 px wide with a call on) */
@media (max-width: 420px) { .hui .tb-live { max-width: 92px; gap: 5px; padding: 0 9px 0 8px; font-size: 12px; } }
@media (max-width: 374px) {                    /* the narrowest: its dot alone; the words stay for a screen reader */
  .hui .tb-live { padding: 0 11px; }
  .hui .tb-live > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* A live alert (18 Nov): the pill becomes the alert, red for an emergency or an upset caller, amber for a person asked
   for or her line said again; its card under the bar has the reason and Take over (static/staff.js). */
.tb-live.alert { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 2px #fff; }   /* (a ring: clear on a coloured band) */
.tb-live.alert:hover { background: #a3302a; border-color: #a3302a; }
.tb-live.alert .tb-live-dot { background: #fff; }
.tb-live.alert[data-kind="person"], .tb-live.alert[data-kind="loop"] { background: #8a4b00; border-color: #8a4b00; }
.tb-live.alert[data-kind="person"]:hover, .tb-live.alert[data-kind="loop"]:hover { background: #6f3c00; border-color: #6f3c00; }
/* (under the bell's and messages' panels, 64-65: opening one shows it whole; the card is back once it closes) */
.tb-alert {
  position: fixed; right: 16px; top: 64px; z-index: 60; width: min(420px, calc(100vw - 32px)); box-sizing: border-box;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; align-items: start;
  padding: 14px 12px 14px 12px; border-radius: 14px; background: var(--white); color: var(--ink);
  border: 1px solid #f3c9c4; border-left: 5px solid var(--red); box-shadow: 0 18px 40px -14px rgba(14, 27, 34, .38);
  animation: tb-pop .16s ease-out;
}
.tb-alert[data-kind="person"], .tb-alert[data-kind="loop"] { border-color: #f1d6a8; border-left-color: #8a4b00; }
.tb-alert-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.tb-alert[data-kind="person"] .tb-alert-ico, .tb-alert[data-kind="loop"] .tb-alert-ico { background: var(--amber-soft); color: #8a4b00; }
.tb-alert-ico svg, .tb-alert-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-alert-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tb-alert-txt b { font-size: 15px; font-weight: 750; line-height: 1.3; }
.tb-alert-txt span { font-size: 13px; color: #4c5c63; line-height: 1.45; }
.tb-alert-txt small { font-size: 12px; color: var(--muted); }
.tb-alert-txt small:empty, .tb-alert-txt span:empty { display: none; }
.tb-alert-x { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); }
.tb-alert-x:hover { background: var(--paper); color: var(--ink); }
.tb-alert-x:focus-visible { box-shadow: var(--ring); }
.tb-alert-do { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tb-alert { animation: none; } }
@media (max-width: 640px) { .tb-alert { left: 8px; right: 8px; width: auto; } }
.np-ico.k-alert { background: var(--amber-soft); color: #8a4b00; }
.fd-drawer-head p.fd-alerts { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; line-height: 1.4; color: var(--red); }
.fd-takeover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
.fd-takeover:not(:disabled):hover { filter: brightness(.94); }
.tb-avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #dde9ec; color: #1d4a52; font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.tb-avatar.big { width: 44px; height: 44px; font-size: 15px; }
.tb-avatar svg { width: 18px; height: 18px; }
.tb-avatar.big svg { width: 22px; height: 22px; }
.tb-avatar.r-doctor { background: #d9efe9; color: #0b6656; }
.tb-avatar.r-reception { background: #e3e7fb; color: #3646a3; }
.tb-avatar.r-admin { background: #ece8f6; color: #5b3f99; }
.tb-avatar.r-pharmacy { background: #fdecd8; color: #9a4a0b; }
.tb-avatar.r-team { background: var(--navy); color: #fff; }
.tb-user { position: relative; margin-left: 6px; }
.tb-user > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.tb-user > summary::-webkit-details-marker { display: none; }
.tb-user > summary:hover { border-color: var(--line-strong); }
.tb-user > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.tb-user .staff-who { display: flex; flex-direction: column; line-height: 1.2; }
.tb-user .staff-who b { font-size: 13px; }
.tb-user .staff-who small { font-size: 11.5px; color: var(--muted); }
.tb-chev { width: 16px; height: 16px; color: var(--muted); }
.tb-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 260px; padding: 6px; background: var(--white);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(14, 27, 34, .28);
}
.tb-menu-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tb-menu-head b { display: block; font-size: 14px; }
.tb-menu-head small { display: block; font-size: 12px; color: var(--muted); word-break: break-all; }
.tb-menu a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.tb-menu a:hover, .tb-menu a:focus-visible { background: var(--paper); outline: none; }
.tb-menu a.danger { color: var(--red); }
.tb-menu a.danger:hover { background: var(--red-soft); }
.tb-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* ---------- notification centre ---------- */
.np {
  position: fixed; top: 64px; right: 16px; z-index: 65; width: min(420px, calc(100vw - 24px)); max-height: min(78vh, 720px);
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -18px rgba(14, 27, 34, .35); overflow: hidden; animation: tb-pop .14s ease-out;
}
@keyframes tb-pop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.np-head h2 { font-size: 17px; font-weight: 750; }
.np-link { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); padding: 4px 6px; border-radius: 6px; }
.np-link:hover:not(:disabled) { background: var(--paper); }
.np-link:disabled { color: #9aa7ad; cursor: default; }
.np-link:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.np-tabs { display: flex; gap: 4px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.np-tabs button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.np-tabs button.on { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.np-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px; }
.np-body h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; margin: 0; }
.np-item {
  all: unset; box-sizing: border-box; display: grid; grid-template-columns: 36px minmax(0, 1fr) 10px; gap: 12px; align-items: start; width: 100%;
  padding: 10px; border-radius: 12px; cursor: pointer; transition: background .1s;
}
.np-item:hover, .np-item:focus-visible { background: var(--paper-2); }
.np-item:focus-visible { box-shadow: inset 0 0 0 2px rgba(11, 122, 106, .35); }
.np-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mint-soft); color: var(--mint); }
.np-ico svg { width: 18px; height: 18px; }
.np-ico.k-callback { background: var(--amber-soft); color: var(--amber); }
.np-ico.k-booking { background: #e7f5ee; color: #17774a; }
.np-ico.k-arrival { background: var(--blue-soft); color: #22579f; }
.np-ico.k-order { background: #fdecd8; color: #9a4a0b; }
.np-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-txt b { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.np-item.unread .np-txt b { font-weight: 750; }
.np-txt > span { font-size: 13px; color: #4c5c63; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-txt small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: #2563eb; margin-top: 6px; }
.np-empty { color: var(--muted); font-size: 13.5px; padding: 18px; margin: 0; text-align: center; }
.np-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 24px 40px; }
.np-done svg { width: 40px; height: 40px; color: var(--mint); stroke-width: 1.5; }
.np-done b { font-size: 15px; }
.np-done p { margin: 0; font-size: 13px; color: var(--muted); max-width: 30ch; }

/* ---------- messages ---------- */
.cp {
  position: fixed; top: 64px; right: 0; bottom: 0; z-index: 64; width: min(820px, 100vw); display: grid; grid-template-columns: 300px minmax(0, 1fr);
  background: var(--white); border-left: 1px solid var(--line); box-shadow: -24px 0 60px -30px rgba(14, 27, 34, .4); animation: cp-in .18s ease-out;
}
@keyframes cp-in { from { transform: translateX(28px); opacity: 0; } }
.cp-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--paper-2); }
.cp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.cp-head h2 { font-size: 18px; font-weight: 750; }
.cp-x, .cp-back { all: unset; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; color: #4c5c63; flex: none; }
.cp-x:hover, .cp-back:hover { background: var(--paper); color: var(--ink); }
.cp-x:focus-visible, .cp-back:focus-visible { box-shadow: var(--ring); }
.cp-x svg, .cp-back svg { width: 19px; height: 19px; }
.cp-head .cp-x { display: none; }
.cp-search { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 0 10px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--white); }
.cp-search:focus-within { border-color: var(--mint); box-shadow: var(--ring); }
.cp-search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.cp-search input { border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; width: 100%; color: var(--ink); }
.cp-threads { overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px; flex: 1; }
.cp-threads h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; margin: 0; }
.cp-row {
  all: unset; box-sizing: border-box; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  padding: 9px 8px; border-radius: 11px; cursor: pointer; transition: background .1s;
}
.cp-row .tb-avatar { width: 36px; height: 36px; }
.cp-row:hover { background: rgba(14, 27, 34, .04); }
.cp-row.on { background: var(--white); box-shadow: 0 1px 2px rgba(14, 27, 34, .08), 0 0 0 1px var(--line); }
.cp-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(11, 122, 106, .4); }
.cp-row-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cp-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cp-row-top b { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row-top small { font-size: 11.5px; color: var(--muted); flex: none; }
.cp-row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row.unread .cp-row-top b, .cp-row.unread .cp-row-sub { color: var(--ink); font-weight: 700; }
.cp-unread { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.cp-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.cp-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 64px; }
.cp-thread-head .cp-back { display: none; }
.cp-t-who { min-width: 0; flex: 1; }
.cp-t-who b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-t-who small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 2px; background: #fbfcfc; }
.cp-msgs:focus-visible { outline: none; box-shadow: inset var(--ring); }
.cp-intro { margin: auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px; max-width: 340px; }
.cp-intro > svg { width: 42px; height: 42px; color: var(--mint); stroke-width: 1.5; }
.cp-intro b { font-size: 16px; }
.cp-intro p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.cp-day { display: flex; justify-content: center; margin: 14px 0 8px; }
.cp-day span { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.cp-msg { display: flex; flex-direction: column; max-width: 76%; margin-top: 10px; }
.cp-msg.cont { margin-top: 3px; }
.cp-msg.theirs { align-self: flex-start; align-items: flex-start; }
.cp-msg.mine { align-self: flex-end; align-items: flex-end; }
.cp-from { font-size: 12px; font-weight: 700; color: var(--ink); margin: 0 0 3px 2px; }
.cp-from em { font-style: normal; font-weight: 600; color: var(--muted); margin-left: 6px; }
.cp-msg p { margin: 0; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.cp-msg.theirs p { background: var(--white); border: 1px solid var(--line); color: var(--ink); border-top-left-radius: 6px; }
.cp-msg.mine p { background: var(--navy); color: #fff; border-top-right-radius: 6px; }
.cp-msg.cont.theirs p { border-top-left-radius: 16px; }
.cp-msg.cont.mine p { border-top-right-radius: 16px; }
.cp-msg time { font-size: 11px; color: #8a979d; margin: 3px 4px 0; opacity: 0; transition: opacity .12s; font-variant-numeric: tabular-nums; }
.cp-msg:hover time, .cp-msg:last-child time, .cp-msg:has(+ .cp-day) time, .cp-msg:has(+ .cp-msg:not(.cont)) time { opacity: 1; }
.cp-more { all: unset; align-self: center; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--navy); padding: 6px 10px; border-radius: 8px; margin-bottom: 4px; }
.cp-more:hover { background: var(--paper); }
.cp-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--line); background: var(--white); }
.cp-compose textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 12px;
  font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--ink); background: var(--white); outline: none; transition: border-color .12s, box-shadow .12s;
}
.cp-compose textarea:focus { border-color: var(--mint); box-shadow: var(--ring); }
.cp-send { all: unset; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: #fff; cursor: pointer; flex: none; transition: background .12s, opacity .12s; }
.cp-send:hover:not(:disabled) { background: var(--navy-hover); }
.cp-send:disabled { opacity: .35; cursor: default; }
.cp-send:focus-visible { box-shadow: 0 0 0 3px rgba(15, 79, 87, .3); }
.cp-send svg { width: 19px; height: 19px; }
.cp-hint { margin: 0; padding: 0 16px 10px; font-size: 11.5px; color: #8a979d; background: var(--white); }

/* A patient card in Messages (13 Nov): a referral to a doctor or a shared prescription, one block with its actions.
   Its patient is read from the record each time; the card says what the recipient may open and where it stands. */
.cp-msg.has-card { max-width: min(380px, 88%); width: 100%; }
.cp-card { box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 37, 43, .05); }
.cp-msg.mine .cp-card { border-top-right-radius: 6px; }
.cp-msg.theirs .cp-card { border-top-left-radius: 6px; }
.cp-card.urgent { border-color: rgba(194, 74, 65, .45); }
.cp-card-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cp-card-top svg { width: 16px; height: 16px; flex: none; color: var(--mint); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp-card.k-rx .cp-card-top svg { color: var(--navy); }
.cp-card-chip { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: 0; text-transform: none; background: var(--red-soft); color: var(--red); }
.cp-msg.has-card .cp-card p { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-size: 13.5px; line-height: 1.45; }
.cp-msg.has-card .cp-card .cp-card-pt { font-size: 15.5px; font-weight: 700; }
.cp-msg.has-card .cp-card .cp-card-pt small { font-size: 13px; font-weight: 600; color: var(--muted); }
.cp-msg.has-card .cp-card .cp-card-meta { color: var(--muted); font-size: 12.5px; }
.cp-msg.has-card .cp-card .cp-card-reason { padding: 8px 10px; border-radius: 10px; background: var(--paper-2); white-space: pre-line; }
.cp-msg.has-card .cp-card .cp-card-state { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.cp-card-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.cp-msg.has-card .cp-card .cp-card-state.ok { color: var(--mint); }
.cp-msg.has-card .cp-card .cp-card-state.off { color: #8a979d; }
.cp-card.off { background: var(--paper-2); }
.cp-card.off .cp-card-pt { color: var(--muted); }
.cp-card-do { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cp-card-do .btn { min-height: 32px; }

/* Sending one: who to, why, and what they will see. */
dialog.cc-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: var(--white); color: var(--ink); box-shadow: var(--shadow-lift); }
dialog.cc-dialog::backdrop { background: rgba(14, 27, 34, .42); }
.cc-dialog form { display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 16px; }
.cc-dialog h2 { margin: 0; font-size: 18px; font-weight: 750; }
.cc-dialog .cc-lede { margin: -4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.cc-dialog .field { display: flex; flex-direction: column; gap: 5px; }
.cc-dialog .field > span { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.cc-dialog textarea { resize: vertical; min-height: 74px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--white); outline: none; }
.cc-dialog textarea:focus { border-color: var(--mint); box-shadow: var(--ring); }
.cc-dialog .cc-sees { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.cc-dialog .cc-sees b { color: var(--ink); }
.cc-dialog .cc-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cc-dialog .cc-msg { margin: 0; min-height: 18px; font-size: 13px; color: var(--red); }
.cc-dialog .cc-do { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- toast ---------- */
.tb-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 14px; background: #10232a; color: #fff; box-shadow: 0 18px 40px -12px rgba(14, 27, 34, .5); animation: tb-pop .16s ease-out;
}
.tb-toast b { font-size: 13.5px; }
.tb-toast span { font-size: 13px; color: rgba(255, 255, 255, .8); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tb-toast.clickable { cursor: pointer; }

@media (max-width: 760px) {
  .cp { grid-template-columns: minmax(0, 1fr); width: 100vw; top: 0; z-index: 90; }
  .cp-head .cp-x { display: inline-grid; }
  .cp .cp-thread { display: none; }
  .cp.in-thread .cp-list { display: none; }
  .cp.in-thread .cp-thread { display: flex; }
  .cp-thread-head .cp-back { display: inline-grid; }
  .np { top: 60px; right: 8px; left: 8px; width: auto; }
  .tb-icon { width: 38px; height: 38px; }
  .cp-msg { max-width: 86%; }
}
@media (max-width: 1100px) { .tb-user .staff-who, .tb-chev { display: none; } .tb-user > summary { padding: 3px; } }
@media (prefers-reduced-motion: reduce) { .np, .cp, .tb-toast { animation: none; } }
@media (max-width: 760px) {
  .staff-bar { flex-wrap: wrap; row-gap: 8px; }
  .staff-bar .staff-nav { order: 9; flex: 1 1 100%; }
}

/* A red pill and button for emergencies (29 Oct) */
.pill.sos { background: #d92d20; color: #fff; border-color: #d92d20; text-transform: uppercase; letter-spacing: .04em; }
.btn.danger, a.btn.danger { background: #d92d20; border-color: #d92d20; color: #fff; }
.btn.danger:hover:not(:disabled), a.btn.danger:hover { background: #b42318; border-color: #b42318; }
.np-ico.k-emergency { background: #fee4e2; color: #b42318; }
.np-item.k-emergency .np-txt b { color: #b42318; }

/* ---------- every hospital on a phone: the pages in a tab bar at the thumb (8 Nov) ----------
   RHL and Sarvodaya have had it since 4 Nov (static/hospital-ui.css, which this never reaches: body.hui); here the same
   for the clinic look, in its own colours. On a computer the tabs stay words: the icons show only in the tab bar. */
.staff-nav a svg, .staff-nav .nav-more { display: none; }
@media (max-width: 760px) {
  body:not(.hui) .topbar.staff-bar { position: static; flex-wrap: nowrap; }
  body:not(.hui) .staff-bar .staff-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; order: 0; flex: none; width: auto; display: grid; grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr); gap: 2px; overflow: visible; margin: 0; padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: var(--white); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: 0 -8px 20px -16px rgba(16, 37, 43, .5);
  }
  body:not(.hui) .staff-nav a, body:not(.hui) .staff-nav .nav-more > summary {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 5px 0 4px; border-radius: 9px;
    color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.15; text-align: center; list-style: none; cursor: pointer; background: none; box-shadow: none;
  }
  body:not(.hui) .staff-nav .nav-more > summary::-webkit-details-marker { display: none; }
  body:not(.hui) .staff-nav a span, body:not(.hui) .staff-nav .nav-more > summary span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body:not(.hui) .staff-nav a svg, body:not(.hui) .staff-nav .nav-more > summary svg {
    display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  body:not(.hui) .staff-nav a.on, body:not(.hui) .staff-nav .nav-more > summary.on { color: var(--navy); background: var(--mint-soft); font-weight: 600; box-shadow: none; }
  body:not(.hui) .staff-nav a:hover:not(.on) { background: none; color: var(--muted); }
  body:not(.hui) .staff-nav > a[data-more] { display: none; }
  body:not(.hui) .staff-nav a .nav-count { position: absolute; top: 2px; right: 8px; margin: 0; }
  body:not(.hui) .staff-nav .nav-more { display: block; min-width: 0; }
  body:not(.hui) .staff-nav .nav-sheet {
    position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 31; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lift); animation: tb-pop .14s ease-out;
  }
  body:not(.hui) .staff-nav .nav-sheet a { padding: 10px 2px 8px; }
  body:not(.hui):has(.staff-nav) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:not(.hui) .tb-toast { right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:not(.hui) .whatsnew { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- Settings and Help: the sections in a list, one panel at a time (static/staff.js sections(); RHL and Sarvodaya
   since 4 Nov, every hospital since 8 Nov: Agarwal's Help ran to about twenty phone screens) ---------- */
main.hui-tabbed { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; gap: 12px 20px; }
.hui-sections { position: sticky; top: 70px; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 1px; max-height: calc(100dvh - 88px); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
.hui-sections a { padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.hui-sections a:hover { background: var(--white); }
.hui-sections a.on { background: var(--white); color: var(--navy); font-weight: 600; box-shadow: var(--shadow); }
main.hui-tabbed > [data-nav]:not(.hui-shown) { display: none; }
main.hui-tabbed > .panel { grid-column: 2; border-radius: 14px; }
main.hui-tabbed .help-section:target { outline: none; }
main.hui-tabbed > .hui-help-top { display: none; }
body:not(.hui) main.settings.hui-tabbed { max-width: 1120px; }            /* the clinic look: under its taller top bar */
body:not(.hui) .hui-sections { top: 80px; max-height: calc(100dvh - 96px); }
@media (max-width: 860px) {
  main.hui-tabbed { display: block; }
  .hui-sections { position: sticky; top: 0; z-index: 6; flex-direction: row; gap: 4px; max-height: none; margin: 0 -12px 10px; padding: 6px 12px; overflow-x: auto; scrollbar-width: none; background: var(--paper); }
  .hui-sections::-webkit-scrollbar { display: none; }
  .hui-sections a { flex: none; white-space: nowrap; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
  .hui-sections a.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: none; }
  body:not(.hui) .hui-sections { top: 0; margin: 0 -16px 10px; padding: 6px 16px; }
}

/* ---------- a strip that scrolls sideways: a soft edge where more is hidden (static/staff.js edgeFade, 8 Nov) ---------- */
.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
/* the tab bar on a narrow phone: "Doctor's room" needs 77 px and had 74, so it read "Doctor's roo…" (8 Nov, RHL too) */
@media (max-width: 420px) {
  .staff-bar .staff-nav a span, .staff-bar .staff-nav .nav-more > summary span { font-size: 10.5px; letter-spacing: -.01em; }
}

/* =====================================================================================================================
   Finish 2 (11 Nov; the user: "make the UI even more aesthetic and more better looking buttons and more clarity
   everywhere"). One button system on every staff page: three tiers (a filled main action, an outlined second, a ghost
   for the least), one size scale (38 / 32 / 46 px), a press you can feel, the focus ring in the hospital's colour, and an
   icon on the actions reception uses most. Colours stay each hospital's tokens; nothing here names a hospital.
   ===================================================================================================================== */
.btn, a.btn, button.link {
  min-height: 38px; padding: 7px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; letter-spacing: .005em;
  color: var(--ink); background: var(--white); border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(16, 37, 43, .06), inset 0 -1px 0 rgba(16, 37, 43, .04);
}
.btn:hover:not(:disabled), a.btn:hover, button.link:hover:not(:disabled) {
  background: var(--paper-2); border-color: #9fb2b1; border-color: color-mix(in srgb, var(--navy) 38%, var(--line-strong));
  box-shadow: 0 2px 6px -2px rgba(16, 37, 43, .16);
}
.btn:active:not(:disabled), a.btn:active, button.link:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(16, 37, 43, .12); }
.btn:focus-visible, a.btn:focus-visible, button.link:focus-visible { outline: none; border-color: var(--mint); box-shadow: var(--ring); }
.btn.primary, a.btn.primary {
  color: #fff; background: var(--navy); border-color: var(--navy);
  box-shadow: 0 1px 2px rgba(16, 37, 43, .2), 0 6px 14px -8px rgba(16, 37, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn.primary:hover:not(:disabled), a.btn.primary:hover {
  background: var(--navy-hover); border-color: var(--navy-hover);
  box-shadow: 0 2px 4px rgba(16, 37, 43, .22), 0 10px 20px -10px rgba(16, 37, 43, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn.primary:active:not(:disabled), a.btn.primary:active { box-shadow: inset 0 2px 5px rgba(0, 0, 0, .25); }
.btn.primary:focus-visible, a.btn.primary:focus-visible { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--navy); }
.btn.ghost, a.btn.ghost { color: var(--navy); background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover:not(:disabled), a.btn.ghost:hover { background: var(--mint-soft); border-color: transparent; box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.small, button.link { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn.big { min-height: 46px; padding: 11px 26px; font-size: 15px; border-radius: 12px; }

/* an icon on the actions used all day, drawn in the button's own colour */
#walkin-open::before, .btn[data-late]::before, #late-btn::before, .btn[data-state="arrived"]::before, .btn[data-to="done"]::before,
a.btn[href^="tel:"]::before, .btn[data-call]::before, a.btn[href*="/desk/qr"]::before, a.btn[href*="/desk/checkin-qr"]::before,
.btn.fd-takeover::before, .call-controls .btn#start::before, .consult-controls .btn#start::before {
  content: ""; flex: none; width: 15px; height: 15px; margin-left: -2px; background: currentColor;
  -webkit-mask: var(--btn-i) center / contain no-repeat; mask: var(--btn-i) center / contain no-repeat;
}
.btn.big::before { width: 17px; height: 17px; }
#walkin-open { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.btn[data-late], #late-btn { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.btn[data-state="arrived"] { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='8.5' cy='7' r='4'/%3E%3Cpath d='m16 11 2 2 4-4'/%3E%3C/svg%3E"); }
.btn[data-to="done"] { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
a.btn[href^="tel:"], .call-controls .btn#start { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E"); }
.btn[data-call] { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
a.btn[href*="/desk/qr"], a.btn[href*="/desk/checkin-qr"] { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M14 14h3v3M21 14v.01M17 21h4v-4M14 21v-3'/%3E%3C/svg%3E"); }
.btn.fd-takeover { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14v-3a9 9 0 0 1 18 0v3'/%3E%3Cpath d='M21 15a2 2 0 0 1-2 2h-1v-6h1a2 2 0 0 1 2 2zM3 15a2 2 0 0 0 2 2h1v-6H5a2 2 0 0 0-2 2z'/%3E%3Cpath d='M19 17v1a3 3 0 0 1-3 3h-3'/%3E%3C/svg%3E"); }

/* the pages' tabs on a computer: when they do not fit, they tighten, and Settings and Help (both in the account menu)
   step out of the bar first, unless one of them is the page open (static/staff.js fitNav) */
.staff-nav.nav-tight > a { padding-left: 10px; padding-right: 10px; }
.staff-nav.nav-tight > a[href="/settings"]:not(.on), .staff-nav.nav-tight > a[href="/help"]:not(.on) { display: none; }

/* a button that opens a menu says so: a small arrow after "More" */
details.fd-menu > summary.btn::after {
  content: ""; flex: none; width: 13px; height: 13px; margin-right: -3px; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s ease;
}
details.fd-menu[open] > summary.btn::after { transform: rotate(180deg); }
/* the narrow side pane of a big hospital's desk keeps its compact words: with icons, three buttons ran onto two lines */
.fd-many .fd-item-side .btn::before { display: none; }
.consult-controls .btn#start { --btn-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M19 10v1a7 7 0 0 1-14 0v-1M12 18v4'/%3E%3C/svg%3E"); }
@media (max-width: 760px) { .btn, a.btn { min-height: 40px; } }        /* a thumb's size on a phone, as before */

/* =====================================================================================================================
   Finish 3 (11 Nov; the user: "do the next round too, tiles and empty states"). An empty list says what is empty and
   what will appear there, under a quiet icon of its kind, good news in green ("All called back", "Nothing to answer").
   Loading is a small spinner, never a list that looks empty. Every hospital, in its own colours.
   ===================================================================================================================== */
.fd-none {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0; padding: 20px 20px 22px;
  list-style: none; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.45;
}
.fd-none::before { content: ""; flex: none; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 11px; background: var(--paper); }
.fd-none::after {
  content: ""; position: absolute; top: 29px; left: 50%; width: 18px; height: 18px; margin-left: -9px; background: var(--muted);
  -webkit-mask: var(--none-i) center / contain no-repeat; mask: var(--none-i) center / contain no-repeat;
}
.fd-none b { font-size: 14px; font-weight: 650; color: var(--ink); letter-spacing: -.005em; }
.fd-none span { max-width: 46ch; text-wrap: pretty; }
.fd-none[data-none="callbacks"]::before, .fd-none[data-none="done"]::before { background: var(--mint-soft); }
.fd-none[data-none="callbacks"]::after, .fd-none[data-none="done"]::after { background: var(--mint); }
.fd-none { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.fd-none[data-none="appts"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2.5'/%3E%3Cpath d='M16 2.5v4M8 2.5v4M3 10h18M8 14.5h.01M12 14.5h.01M16 14.5h.01M8 18h.01M12 18h.01'/%3E%3C/svg%3E"); }
.fd-none[data-none="callbacks"], .fd-none[data-none="done"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 4.5-5'/%3E%3C/svg%3E"); }
.fd-none[data-none="orders"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l1 13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M9 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E"); }
.fd-none[data-none="calls"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14v-3a9 9 0 0 1 18 0v3'/%3E%3Cpath d='M21 15a2 2 0 0 1-2 2h-1v-6h1a2 2 0 0 1 2 2zM3 15a2 2 0 0 0 2 2h1v-6H5a2 2 0 0 0-2 2z'/%3E%3Cpath d='M19 17v1a3 3 0 0 1-3 3h-3'/%3E%3C/svg%3E"); }
.fd-none[data-none="reminders"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.9 1.9 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.fd-none[data-none="waitlist"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12M6 22h12M7 2c0 5 10 5 10 10S7 17 7 22M17 2c0 5-10 5-10 10s10 5 10 10'/%3E%3C/svg%3E"); }
.fd-none[data-none="doctors"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3H5a2 2 0 0 0-2 2v5a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1'/%3E%3Cpath d='M9 16v1a5 5 0 0 0 10 0v-2'/%3E%3Ccircle cx='19' cy='13' r='2'/%3E%3C/svg%3E"); }
.fd-none[data-none="thread"] { --none-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E"); }
td.fd-empty.fd-none-cell { padding: 0; }

.fd-loading { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.fd-loading::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--navy);
  animation: fd-spin .75s linear infinite;
}
@keyframes fd-spin { to { transform: rotate(360deg); } }
/* the Report's numbers read like the desk's tiles: what it counts, the number large and calm, one line on what it means */
.kpi:not(.hero) { gap: 0; padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow); }
.kpi:not(.hero) small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi:not(.hero) b { margin-top: 6px; font-size: 28px; line-height: 1.1; font-weight: 750; letter-spacing: -.025em; }
.kpi:not(.hero) span { margin-top: 3px; font-size: 12.5px; }

/* =====================================================================================================================
   Finish 4 (11 Nov; the user: "this still doesnt look like the apple experienced desiger i mentioned"). Surfaces, type
   and the everyday buttons the way Apple's own apps do them: the device's typeface, a soft neutral page, white panels
   with no outline and only depth, a translucent top bar, and second buttons as a tint of the hospital's colour, not a
   box of lines. Rajasthan keeps its typefaces, band and warm page; every colour is still each hospital's token.
   ===================================================================================================================== */
:root { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Devanagari", system-ui, sans-serif; }
body { letter-spacing: -.006em; }
.brand-drmate, .brand-sarvodaya {
  --paper: #f5f5f7; --paper-2: #fafafc; --line: rgba(0, 0, 0, .08); --line-strong: rgba(0, 0, 0, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -14px rgba(0, 0, 0, .16);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .05), 0 22px 44px -18px rgba(0, 0, 0, .28);
}
/* frosted only where the bar holds no tab bar: a backdrop filter makes the bar the box its fixed children sit in, and the
   phone's tab bar (fixed to the screen's foot) rose to the top with it */
@media (min-width: 761px) {
  body:not(.brand-rajasthan) .topbar {
    background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  }
}
.panel, .kpi:not(.hero) { border-color: transparent; border-radius: 18px; box-shadow: var(--shadow); }
.panel-head { border-bottom-color: var(--line); }
.panel-head h2 { font-size: 17.5px; font-weight: 700; letter-spacing: -.015em; }

/* the second button: a tint of the hospital's colour; the main one stays filled, the least stays text */
.btn, a.btn, button.link {
  color: var(--navy); background: color-mix(in srgb, var(--navy) 9%, var(--white)); border-color: transparent; box-shadow: none;
}
.btn:hover:not(:disabled), a.btn:hover, button.link:hover:not(:disabled) {
  background: color-mix(in srgb, var(--navy) 15%, var(--white)); border-color: transparent; box-shadow: none;
}
.btn:active:not(:disabled), a.btn:active, button.link:active:not(:disabled) { background: color-mix(in srgb, var(--navy) 20%, var(--white)); box-shadow: none; }
.btn:focus-visible, a.btn:focus-visible, button.link:focus-visible { box-shadow: var(--ring); }

/* =====================================================================================================================
   Finish 5 (11 Nov; the user: "this is still no where near apple as i said"). Not more polish on the same layout: the
   layout of Apple's own apps. A clinic's pages (the DrMate look; RHL and Sarvodaya keep their band) get a frosted
   sidebar with the pages as icons and words, the account at its foot, and the page's name large above its content.
   ===================================================================================================================== */
.page-title { max-width: 1440px; margin: 0 auto; padding: 28px 24px 0; }
.page-title h1 { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.028em; color: var(--ink); }
@media (max-width: 760px) { .page-title { padding: 18px 16px 0; } .page-title h1 { font-size: 30px; } }
/* the title stands over the page's own column: a page narrower than the window keeps its column centred, so the title
   takes that column's width and padding (each page's own max-width, above in this sheet and in scribe.css) */
body:has(> main.facts-page) > .page-title { max-width: 860px; }
body:has(> main.leave-page) > .page-title { max-width: 980px; }
body:has(> main.report-page) > .page-title { max-width: 1000px; }
body:has(> main.settings.hui-tabbed) > .page-title { max-width: 1120px; }
body:has(> main.logins) > .page-title { max-width: 980px; padding-left: 16px; padding-right: 16px; }
body.hui:has(> main.settings) > .page-title { max-width: 1120px; padding-left: 20px; padding-right: 20px; }
body.hui:has(> main.leave-page) > .page-title, body.hui:has(> main.report-page) > .page-title, body.hui:has(> main.logins) > .page-title { max-width: 1240px; padding-left: 20px; padding-right: 20px; }

/* a big hospital's pages show their name large only beside its sidebar (below); under its band, as before */
body.hui .page-title { display: none; }
/* Under the sidebar (1300 px) the admin's eleven tabs, the bell and the user share one band: closer tabs, and the user
   as the avatar alone, as under 1100 px. Measured 16 Nov with the longest labels ("Facts & flows"): every tab fits
   from 1101 px (it was 292 px over) to 1299, at least 40 px clear of the bell on a local render. */
@media (min-width: 1101px) and (max-width: 1299.98px) {
  body.brand-drmate:not(:has(.staff-bar.many)) .topbar.staff-bar { padding-left: 16px; padding-right: 16px; gap: 10px; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .mode-nav { gap: 0; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .mode-nav a { padding: 6px 6px; }
  body.brand-drmate:not(:has(.staff-bar.many)) .tb-user .staff-who, body.brand-drmate:not(:has(.staff-bar.many)) .tb-chev { display: none; }
  body.brand-drmate:not(:has(.staff-bar.many)) .tb-user > summary { padding: 3px; }
}
@media (min-width: 1101px) and (max-width: 1199.98px) {
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .mode-nav a { padding: 6px 4px; font-size: 12px; }
}
@media (min-width: 1300px) {
  body.brand-drmate:not(:has(.staff-bar.many)):has(.staff-bar) { padding-left: 248px; }
  body.brand-drmate:not(:has(.staff-bar.many)) .topbar.staff-bar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: 248px; min-height: 0; overflow-y: auto;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px; padding: 16px 12px 14px;
    background: rgba(242, 242, 245, .8); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border-right: 1px solid rgba(0, 0, 0, .08); box-shadow: none;
  }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-brand { padding: 6px 10px 20px; margin: 0; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: auto; flex: none; order: 0; margin: 0; padding: 0;
    background: none; border: 0; border-radius: 0; overflow: visible; -webkit-mask-image: none; mask-image: none;
  }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav > a, body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav.nav-tight > a {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--ink);
    font-size: 14px; font-weight: 500; background: none; box-shadow: none;
  }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav > a svg {
    display: block; flex: none; width: 19px; height: 19px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav > a:hover:not(.on) { background: rgba(0, 0, 0, .05); color: var(--ink); }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav > a.on { background: color-mix(in srgb, var(--navy) 13%, transparent); color: var(--navy); font-weight: 600; box-shadow: none; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav > a .nav-count { margin-left: auto; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-nav .nav-more { display: none; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-me { margin: auto 0 0; padding: 12px 4px 0; border-top: 1px solid rgba(0, 0, 0, .08); justify-content: space-between; gap: 6px; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-who, body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .tb-chev { display: none; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .tb-user { margin-left: auto; }
  /* the account menu opens upward over the foot, as wide as the sidebar's own column: anchored to the avatar's right
     edge it ran 28 px off the screen's left side, and the sidebar (it scrolls) clips whatever leaves it (user, 11 Nov) */
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .staff-me { position: relative; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .tb-user { position: static; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .tb-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; }
  body.brand-drmate:not(:has(.staff-bar.many)) .staff-bar .tb-menu-head small { word-break: normal; overflow-wrap: anywhere; }   /* "Reception ·" / "agarwal.reception" */
  /* the Rx pad's signing bar and its toasts are fixed to the window: they start at the sidebar's edge and centre on the
     content, or the safety checks at the bar's left sit under the sidebar (found opening each popover, 11 Nov) */
  body.brand-drmate:not(:has(.staff-bar.many)):has(.staff-bar) .action-bar { left: 248px; padding-left: max(24px, calc((100vw - 248px - 1440px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 248px - 1440px) / 2 + 24px)); }
  body.brand-drmate:not(:has(.staff-bar.many)):has(.staff-bar) .toasts { left: calc(50% + 124px); }
  body.brand-drmate:not(:has(.staff-bar.many)) .np { top: auto; bottom: 16px; left: 260px; right: auto; }
  body.brand-drmate:not(:has(.staff-bar.many)) .cp { top: 0; }
  body.brand-drmate:not(:has(.staff-bar.many)) .fd-sos { top: 16px; }
  body.brand-drmate:not(:has(.staff-bar.many)) .page-title { padding-top: 34px; }
}

/* Rajasthan and Sarvodaya get the same sidebar (11 Nov; the user: "give rhl and sarvodaya the sidebar too") from 1500 px,
   and so does any hospital whose desk is the one-screen kind (more than 6 doctors: Sunrise, 12 Nov):
   their one-screen desk needs the room (at 1366 px beside a sidebar the patients' names and numbers were cut); below
   1500 px their band as before. The rules are the clinic's above with body.hui for body.brand-drmate
   (tests/test_ui_11nov_apple.py keeps the two the same), then what their band sets is undone. */
@media (min-width: 1500px) {
  body:is(.hui, :has(.staff-bar.many)):has(.staff-bar) { padding-left: 248px; }
  body:is(.hui, :has(.staff-bar.many)) .topbar.staff-bar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: 248px; min-height: 0; overflow-y: auto;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px; padding: 16px 12px 14px;
    background: rgba(242, 242, 245, .8); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border-right: 1px solid rgba(0, 0, 0, .08); box-shadow: none;
  }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-brand { padding: 6px 10px 20px; margin: 0; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: auto; flex: none; order: 0; margin: 0; padding: 0;
    background: none; border: 0; border-radius: 0; overflow: visible; -webkit-mask-image: none; mask-image: none;
  }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav > a, body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav.nav-tight > a {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--ink);
    font-size: 14px; font-weight: 500; background: none; box-shadow: none;
  }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav > a svg {
    display: block; flex: none; width: 19px; height: 19px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav > a:hover:not(.on) { background: rgba(0, 0, 0, .05); color: var(--ink); }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav > a.on { background: color-mix(in srgb, var(--navy) 13%, transparent); color: var(--navy); font-weight: 600; box-shadow: none; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav > a .nav-count { margin-left: auto; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-nav .nav-more { display: none; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-me { margin: auto 0 0; padding: 12px 4px 0; border-top: 1px solid rgba(0, 0, 0, .08); justify-content: space-between; gap: 6px; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-who, body:is(.hui, :has(.staff-bar.many)) .staff-bar .tb-chev { display: none; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .tb-user { margin-left: auto; }
  /* the account menu opens upward over the foot, as wide as the sidebar's own column: anchored to the avatar's right
     edge it ran 28 px off the screen's left side, and the sidebar (it scrolls) clips whatever leaves it (user, 11 Nov) */
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .staff-me { position: relative; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .tb-user { position: static; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .tb-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; }
  body:is(.hui, :has(.staff-bar.many)) .staff-bar .tb-menu-head small { word-break: normal; overflow-wrap: anywhere; }   /* "Reception ·" / "agarwal.reception" */
  /* the Rx pad's signing bar and its toasts are fixed to the window: they start at the sidebar's edge and centre on the
     content, or the safety checks at the bar's left sit under the sidebar (found opening each popover, 11 Nov) */
  body:is(.hui, :has(.staff-bar.many)):has(.staff-bar) .action-bar { left: 248px; padding-left: max(24px, calc((100vw - 248px - 1440px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 248px - 1440px) / 2 + 24px)); }
  body:is(.hui, :has(.staff-bar.many)):has(.staff-bar) .toasts { left: calc(50% + 124px); }
  body:is(.hui, :has(.staff-bar.many)) .np { top: auto; bottom: 16px; left: 260px; right: auto; }
  body:is(.hui, :has(.staff-bar.many)) .cp { top: 0; }
  body:is(.hui, :has(.staff-bar.many)) .fd-sos { top: 16px; }
  body:is(.hui, :has(.staff-bar.many)) .page-title { padding-top: 34px; }
  body.hui .page-title { display: block; }
  body.fd-many:has(.staff-bar) .fd-grid { grid-template-columns: clamp(200px, 17%, 280px) minmax(0, 1fr) clamp(280px, 24%, 360px); }
  /* Rajasthan: its white logo on a plate of its red, DrMate under it; the band's white text, tabs and badges undone */
  body.brand-rajasthan .topbar.staff-bar { color: var(--ink); }
  body.brand-rajasthan .staff-bar .staff-brand { flex-direction: column; align-items: flex-start; gap: 10px; color: var(--ink); }
  body.brand-rajasthan .staff-bar .brand-hosp { box-sizing: border-box; height: 52px; width: auto; padding: 9px 13px; border-radius: 12px;
    background: var(--rh-band); box-shadow: 0 6px 14px -8px rgba(160, 40, 15, .55); }
  body.brand-rajasthan .staff-bar .brand-by { display: flex; flex-direction: row; align-items: baseline; gap: 6px; padding-left: 2px; border-left: 0; }
  body.brand-rajasthan .staff-bar .brand-by strong { color: var(--ink); font-size: 12.5px; }
  body.brand-rajasthan .staff-bar .brand-by small { color: var(--muted); font-size: 10px; }
  body.brand-rajasthan .staff-bar .tb-icon { color: #3f5157; }
  body.brand-rajasthan .staff-bar .tb-icon:hover, body.brand-rajasthan .staff-bar .tb-icon.on { background: rgba(0, 0, 0, .05); border-color: transparent; color: var(--ink); }
  body.brand-rajasthan .staff-bar .tb-icon:focus-visible, body.brand-rajasthan .staff-bar .tb-user > summary:focus-visible { box-shadow: var(--ring); }
  body.brand-rajasthan .staff-bar .tb-badge { background: #d92d20; color: #fff; box-shadow: 0 0 0 2px var(--white); }
  body.brand-rajasthan .staff-bar .tb-user > summary { background: var(--white); border-color: var(--line); }
  body.brand-rajasthan .staff-bar .tb-user > summary .tb-avatar { background: color-mix(in srgb, var(--navy) 14%, var(--white)); color: var(--navy); }
  /* Sarvodaya: its logo heads the sidebar, DrMate's line under it */
  body.brand-sarvodaya .staff-bar .staff-brand { flex-wrap: wrap; row-gap: 14px; }
  body.brand-sarvodaya .staff-bar .cobrand-x { display: none; }
  body.brand-sarvodaya .staff-bar .staff-brand .partner-logo { order: -1; flex: 0 0 100%; height: 34px; width: 100%; object-fit: contain; object-position: left center; }
}

/* Finish 5, the details (11 Nov): status pills are soft capsules with a dot, no outline (the colour and the dot carry it) */
.pill[class] { border-color: transparent; }
/* Facts: the questions as soft grouped blocks, the answers as tinted capsules, the search filled (no outlines, no dashes) */
.facts-tabs { border-color: transparent; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.facts-find { border-color: transparent; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.facts-find:focus { background: var(--white); }
.fact { border-color: transparent; border-radius: 14px; background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.fact-opt, .fact-opt.write { border-color: transparent; border-style: solid; background: color-mix(in srgb, var(--navy) 9%, var(--white)); color: var(--navy); font-weight: 600; }
.fact-opt:hover, .fact-opt:focus-visible { border-color: transparent; background: color-mix(in srgb, var(--navy) 15%, var(--white)); color: var(--navy); }
.fact-opt.quiet, .fact-opt.quiet:hover { background: transparent; color: var(--muted); font-weight: 500; }

/* The day picker (static/daypick.js, 11 Nov; the user: Safari's own was "very small and not aesthetic" and stayed open):
   a month as in Calendar, large round days, the chosen one filled in the hospital's colour, today ringed */
.dp {
  position: fixed; z-index: 90; width: 308px; padding: 14px 14px 12px; border-radius: 18px; background: var(--white); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 22px 54px -14px rgba(15, 30, 40, .34); font-size: 14px; transform-origin: top left;
  animation: dp-in .14s ease-out;
}
.dp.up { transform-origin: bottom left; }
@keyframes dp-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.dp-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 10px 6px; }
.dp-title { flex: 1; font-size: 16px; font-weight: 700; letter-spacing: -.012em; }
.dp-nav { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; }
.dp-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dp-nav:hover:not([disabled]) { background: color-mix(in srgb, var(--navy) 10%, transparent); }
.dp-nav[disabled] { color: var(--muted); opacity: .35; cursor: default; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dp-wd { padding: 0 0 6px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.dp-day {
  justify-self: center; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background .12s ease, color .12s ease;
}
.dp-day:hover:not([disabled]):not(.on) { background: color-mix(in srgb, var(--navy) 10%, transparent); }
.dp-day.today { color: var(--navy); font-weight: 700; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--navy) 50%, transparent); }
.dp-day.on { background: var(--navy); color: #fff; font-weight: 700; box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--navy) 70%, transparent); }
.dp-day[disabled] { color: color-mix(in srgb, var(--muted) 50%, transparent); cursor: default; }
.dp-day:focus-visible, .dp-nav:focus-visible, .dp-today:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 35%, transparent); }
.dp-day.on:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 35%, transparent), inset 0 0 0 2px #fff; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 4px 0 6px; border-top: 1px solid var(--line); }
.dp-foot small { color: var(--muted); font-size: 12.5px; }
.dp-today {
  border: 0; border-radius: 999px; padding: 7px 15px; background: color-mix(in srgb, var(--navy) 10%, var(--white)); color: var(--navy);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.dp-today:hover { background: color-mix(in srgb, var(--navy) 16%, var(--white)); }
@media (max-width: 760px) { .dp { width: min(340px, calc(100vw - 24px)); } .dp-day { width: 42px; height: 42px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .dp { animation: none; } .dp-day { transition: none; } }
/* the chip that opens it is a button now: its own icon, no native field inside */
button.fd-past { font: inherit; color: inherit; cursor: pointer; }
.fd-past-i { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--navy); }
.fd-past[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 22%, transparent); }
