/* AMC HMS design pack — the subset imported for Module 01 (HMS import, D-034; source: Design/amc-design-pack @ 8abfc00).
   Same order as the pack's amc-hms.css. Left out (see PROVENANCE.md): amc-chart, amc-phead, amc-organ, amc-christina, amc-signin. *//* AMC HMS design pack — self-hosted fonts (HMS import, D-034).
   Replaces the pack's remote Google Fonts @import (no runtime third-party requests, D-014).
   Same families and weight ranges as the pack's type file; files come (alias @hms-fonts) from exact-pinned OFL-1.1
   @fontsource-variable packages in the shell's package.json. Family names match amc-type.css. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/montserrat-latin-wght-normal-l_AIctKy.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/geist-latin-wght-normal-BgDaEnEv.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url('/assets/space-grotesk-latin-wght-normal-BhU9QXUp.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alexandria'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/alexandria-arabic-wght-normal-BMWQQIfH.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Alexandria'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/alexandria-latin-wght-normal-9GNYQ01K.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url('/assets/readex-pro-arabic-wght-normal-DiwT_uOQ.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url('/assets/readex-pro-latin-wght-normal--ekFhJJC.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* AMC HMS — locked glass material (tuned in Glass Lab, 24 Sept 2026).
   Use this class for every glass surface. Do not create other glass recipes. */

/* Edge refraction (locked): the live background bends the silk under every .amc-glass edge.
   Requires amc-live-background to be on the page. Works in all browsers.
   In Chrome, Edge and Android it also bends everything behind the glass (text, borders, other cards) through --amc-rf,
   which the live background sets on each glass piece. Any other backdrop-filter rule for glass must start with var(--amc-rf,) too. */
:root {
  --amc-refraction-bend: 60;    /* px — how far the background shifts at the rim */
  --amc-refraction-edge: 28;    /* px — how far in from the rim the bending reaches */
  --amc-refraction-split: 0.3;  /* colour split at the edge (0 = none) */
  --amc-glass-tint: linear-gradient(172deg, rgba(255,255,255,.16), rgba(255,255,255,.07));   /* tinted glass: same glass, a little whiter — open side bar, phone bar, dropdowns, menus */
  --amc-glass-soft-blur: 4px;   /* soft glass: a little more blur … */
  --amc-glass-grain: 0.07;       /* … and a fine grain — side bar, phone tab bar, dropdowns, menus */
  --amc-pop-blur: 16px;         /* pop-up glass (amc-glass-pop): blur behind it (Spine Lab, 26 Sept 2026 — stronger so pop-ups read over white) */
  --amc-pop-tint: 0.13;         /* pop-ups: how white the glass is */
  --amc-pop-bend: 0;            /* pop-ups: no edge bending — bending kept the text behind them sharp, so they didn't read as glass */
  --amc-refraction-content: on; /* also bend what's behind the glass — text, borders, other cards (Chrome, Edge, Android). off = silk only */
}

.amc-glass {
  position: relative;
  overflow: hidden;
  background: linear-gradient(172deg, rgba(255,255,255, 0.1), rgba(255,255,255, 0.03));
  backdrop-filter: var(--amc-rf,) blur(1.5px) saturate(118%) brightness(91%) contrast(97%);
  -webkit-backdrop-filter: blur(1.5px) saturate(118%) brightness(91%) contrast(97%);
  border: 0.25px solid rgba(255,255,255,0.21);
  border-bottom-color: rgba(255,255,255,0.073);
  border-right-color: rgba(255,255,255,0.101);
  border-radius: 30px;
  padding: 25px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.33),
    inset 0 0 3px rgba(255,255,255,0.6),
    0 0 11px rgba(255,255,255,0.08),
    0 0px 0px rgba(20,35,48,0);
  color: rgba(255,255,255, 0.96);
  text-shadow: 0 1px 10px rgba(20,35,50,0.11);
}

/* Specular sheen: 0.14, a radial highlight from the top-left */
.amc-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 15% 0%, rgba(255,255,255,0.14), transparent 55%);
}

/* Soft glass (add class amc-glass-soft next to amc-glass): the same glass with a little more blur and a fine grain.
   Used by the side bar, the phone tab bar and its sheet, dropdowns and menus. */
.amc-glass.amc-glass-soft {
  backdrop-filter: var(--amc-rf,) blur(var(--amc-glass-soft-blur)) saturate(118%) brightness(91%) contrast(97%);
  -webkit-backdrop-filter: blur(var(--amc-glass-soft-blur)) saturate(118%) brightness(91%) contrast(97%);
}
.amc-glass.amc-glass-soft::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: var(--amc-glass-grain); mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 2 -.5'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Pop-up glass (the one recipe for everything that opens over the page) ----------
   class="amc-glass amc-glass-soft amc-glass-pop" — dropdowns, calendars, the phone country list, menus, search, the phone "More" sheet,
   the notifications panel, tooltips. Settings: --amc-pop-blur, --amc-pop-tint, --amc-pop-bend above. Parts never set their own blur, tint or bending. */
.amc-glass.amc-glass-pop {
  --amc-refraction-boost: var(--amc-pop-bend);
  background: linear-gradient(172deg, rgba(255,255,255,var(--amc-pop-tint)), rgba(255,255,255,calc(var(--amc-pop-tint) * .45)));
  backdrop-filter: var(--amc-rf,) blur(var(--amc-pop-blur)) saturate(118%) brightness(91%) contrast(97%);
  -webkit-backdrop-filter: blur(var(--amc-pop-blur)) saturate(118%) brightness(91%) contrast(97%);
}
/* AMC HMS — locked typography (tuned in Font Lab, 24 Sept 2026).
   Golden half-step scale (√φ 1.272): English on 10px, Arabic on 10.8px. Spacing on Fibonacci steps.
   Use these classes for all text. Do not create other type styles.
   Arabic pages use Arabic numerals (٠١٢٣٤٥٦٧٨٩): format numbers with Intl.NumberFormat('ar-EG') — e.g. 1,248 → ١٬٢٤٨. */
/* [HMS import, D-034] Remote Google Fonts @import removed: no runtime third-party requests (D-014). The same families are self-hosted from pinned OFL-1.1 @fontsource-variable packages (see ../fonts.css). */

/* English */
:root {
  --amc-font-title: 'Montserrat', system-ui, sans-serif;
  --amc-font-body: 'Geist', system-ui, sans-serif;
  --amc-font-number: 'Space Grotesk', system-ui, sans-serif;
  --amc-space-tight: 12px;
  --amc-space-pair: 20px;
  --amc-space-block: 25px;
  --amc-space-section: 45px;
}
/* Arabic (Montserrat has no Arabic numerals, so they come from Readex Pro) */
[dir="rtl"] {
  --amc-font-title: 'Alexandria', 'Montserrat', system-ui, sans-serif;
  --amc-font-body: 'Readex Pro', 'Geist', system-ui, sans-serif;
  --amc-font-number: 'Montserrat', 'Readex Pro', 'Space Grotesk', system-ui, sans-serif;
  --amc-space-tight: 12px;
  --amc-space-pair: 13px;
  --amc-space-block: 28px;
  --amc-space-section: 42px;
}

/* Spacing lock: gaps measure from the letters, not the line box */
:is(.amc-display,.amc-heading,.amc-body,.amc-label,.amc-number) { text-box: trim-both cap alphabetic; }
[dir="rtl"] :is(.amc-display,.amc-heading,.amc-body,.amc-label,.amc-number) { text-box: trim-both text text; }

body, .amc-body, .amc-label, .amc-button { font-family: var(--amc-font-body); }
.amc-display, .amc-heading { font-family: var(--amc-font-title); }
.amc-number { font-family: var(--amc-font-number); }

/* English text styles */
.amc-display { font-size: 30px; font-weight: 300; letter-spacing: -0.046em; line-height: 1.1; color: rgba(255,255,255,1); }
.amc-heading { font-size: 17.7px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.236; color: rgba(255,255,255,1); }
.amc-body { font-size: 13px; font-weight: 100; letter-spacing: 0.019em; line-height: 1.4; color: rgba(255,255,255,0.8); }
.amc-label { font-size: 7.9px; font-weight: 175; letter-spacing: 0.15em; line-height: 1.25; color: rgba(255,255,255,0.8); text-transform: uppercase; }
.amc-number { font-size: 26.4px; font-weight: 300; letter-spacing: -0.011em; line-height: 1; color: rgba(255,255,255,0.96); font-feature-settings: "tnum" 1; }
.amc-button { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; line-height: 0.9; color: rgba(255,255,255,1); }

/* Arabic text styles */
[dir="rtl"] .amc-display { font-size: 30px; font-weight: 250; letter-spacing: 0em; line-height: 1.232; color: rgba(255,255,255,1); }
[dir="rtl"] .amc-heading { font-size: 20px; font-weight: 250; letter-spacing: 0em; line-height: 1.384; color: rgba(255,255,255,1); }
[dir="rtl"] .amc-body { font-size: 13px; font-weight: 282; letter-spacing: 0.036em; line-height: 1.7; color: rgba(255,255,255,0.7); }
[dir="rtl"] .amc-label { font-size: 9.3px; font-weight: 245; letter-spacing: 0.15em; line-height: 1.435; color: rgba(255,255,255,0.65); text-transform: none; }
[dir="rtl"] .amc-number { font-size: 26.4px; font-weight: 150; letter-spacing: 0em; line-height: 1.12; color: rgba(255,255,255,0.96); font-feature-settings: "tnum" 1; }
[dir="rtl"] .amc-button { font-size: 12px; font-weight: 500; letter-spacing: 0em; line-height: 1.12; color: rgba(255,255,255,0.96); }
/* AMC HMS — locked colour (tuned in Colour Lab, 24 Sept 2026).
   Accent is white only; text and links are white. Colour is reserved for status. Do not add other colours. */
:root {
  --amc-white-strong: rgba(255,255,255,1);     /* titles, primary actions */
  --amc-white-soft: rgba(255,255,255,0.8);     /* body text */
  --amc-white-muted: rgba(255,255,255,0.6);    /* labels, hints */
  --amc-white-faint: rgba(255,255,255,0.35);   /* disabled, dividers */
  --amc-critical: #ff6166;
  --amc-warning: #ffc875;
  --amc-stable: #3ddc97;
  --amc-status-glow: 2px;
}
a { color: var(--amc-white-strong); text-decoration: underline; text-decoration-color: var(--amc-white-strong); text-underline-offset: 3px; text-decoration-thickness: .5px; }

/* Status — two official looks: the soft glow dot, and the coloured number. The word next to them stays white.
   Usage: <span class="amc-status-dot amc-critical"></span> Critical   ·   <span class="amc-status-number amc-critical">142</span> */
.amc-critical { --amc-status: var(--amc-critical); }
.amc-warning  { --amc-status: var(--amc-warning); }
.amc-stable   { --amc-status: var(--amc-stable); }
.amc-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--amc-status);
  box-shadow: 0 0 calc(var(--amc-status-glow) * .5) var(--amc-status), 0 0 var(--amc-status-glow) var(--amc-status),
              0 0 calc(var(--amc-status-glow) * 2) color-mix(in srgb, var(--amc-status) 50%, transparent); }
.amc-status-dot.amc-critical { animation: amc-critical-pulse 2.4s ease-in-out infinite; }   /* critical dot pulses */
@keyframes amc-critical-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .amc-status-dot.amc-critical { animation: none; } }
.amc-status-number { color: var(--amc-status); }

/* Alert cards (Glass, sizes & alerts preview, 25 Sept 2026) — a card about a patient who needs attention:
   <section class="amc-glass amc-card amc-alert-critical"> — the red glow pulses.   <section class="amc-glass amc-card amc-alert-warning"> — a still amber edge. */
:root { --amc-alert-speed: 0.8s; --amc-alert-glow: 0.7; }
.amc-alert-critical { --amc-al: var(--amc-critical); animation: amc-alert var(--amc-alert-speed) ease-in-out infinite; }
.amc-alert-warning { --amc-al: var(--amc-warning); box-shadow: inset 0 1px 0 rgba(255,255,255,.33), inset 0 0 0 1.5px color-mix(in srgb, var(--amc-al) 85%, transparent), inset 0 0 26px color-mix(in srgb, var(--amc-al) 16%, transparent), 0 0 18px color-mix(in srgb, var(--amc-al) calc(var(--amc-alert-glow) * 40%), transparent) !important; }
@keyframes amc-alert {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.33), inset 0 0 3px rgba(255,255,255,.6), inset 0 0 0 1px color-mix(in srgb, var(--amc-al) 45%, transparent), 0 0 0 transparent; }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.33), inset 0 0 3px rgba(255,255,255,.6), inset 0 0 0 2px var(--amc-al), inset 0 0 44px color-mix(in srgb, var(--amc-al) calc(var(--amc-alert-glow) * 34%), transparent), 0 0 34px color-mix(in srgb, var(--amc-al) calc(var(--amc-alert-glow) * 80%), transparent); } }
.amc-alert-critical .amc-status-dot.amc-critical, .amc-alert-warning .amc-status-dot.amc-warning { animation: amc-alert-dot var(--amc-alert-speed) ease-out infinite; }
@keyframes amc-alert-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amc-status) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .amc-alert-critical { animation: none; box-shadow: inset 0 0 0 1.5px var(--amc-al), 0 0 18px color-mix(in srgb, var(--amc-al) 40%, transparent) !important; } .amc-alert-critical .amc-status-dot, .amc-alert-warning .amc-status-dot { animation: none; } }
/* AMC HMS — locked icons (picked in Icon Lab, 24 Sept 2026). Treatment: plain.
   Use only these icons. Do not add icons from other sets without approval.
   All sets free for commercial use (Solar is CC BY 4.0 — credit it in the app credits; Phosphor is MIT).
   Emergency, Consultation and Laboratory changed in the Navigation Lab, 25 Sept 2026.
   Icons (Iconify names — npm @iconify-json/<set>):
     Home: solar:home-2-linear
     Appointments: solar:calendar-line-duotone
     Patient: solar:user-linear
     Staff: solar:users-group-rounded-line-duotone
     Beds: material-symbols:bed-outline-rounded
     Vitals: solar:heart-pulse-linear
     Consultation: solar:stethoscope-linear
     Pharmacy: material-symbols:pill-outline-rounded
     Injection: material-symbols:syringe-outline-rounded
     Laboratory: ph:flask-light
     Radiology: solar:scanner-linear
     Emergency: ph:siren-light
     Notifications: solar:bell-line-duotone
     Search: solar:magnifer-linear
     Settings: solar:settings-linear
     Reports: mingcute:file-line
     Orders: solar:clipboard-list-linear
     Analytics: hugeicons:chart-line-data-01
     Messages: solar:chat-round-linear
     Alert: solar:danger-triangle-linear
     Done: solar:check-circle-line-duotone
     Add: solar:add-circle-line-duotone
     Waiting: solar:clock-circle-line-duotone
     Log out: material-symbols:logout-outline-rounded
     Dropdown arrow: solar:alt-arrow-down-linear
   Added in the Shell Lab, 7 Oct 2026:
     Registration: solar:user-plus-linear
     Patient Search: solar:card-search-linear
     Payments: solar:wallet-money-linear
     Tasks: solar:checklist-minimalistic-linear
     Branch: solar:buildings-2-linear
     Staff card (sign-in): solar:user-id-linear
     (Today uses Home; Admissions uses Beds.)
     Offline: solar:cloud-cross-linear  (States Lab, 25 Sept 2026)
     Page not found: solar:link-broken-linear  (States Lab)
     No access: solar:lock-keyhole-minimalistic-linear  (States Lab)
     Take photo: solar:camera-minimalistic-linear  (Upload Lab, 26 Sept 2026)
     Upload: solar:upload-minimalistic-linear  (Upload Lab)
     Photo / image file: solar:gallery-minimalistic-linear  (Upload Lab)
     More info (ⓘ): solar:info-circle-linear  (Tooltips Lab, 26 Sept 2026)
*/
:root {
  --amc-icon-size: 22px;
  --amc-icon-colour: rgba(255,255,255,0.9);
  --amc-icon-stroke: 1.5;
  --amc-icon-duotone: 0.5;
}
.amc-icon { width: var(--amc-icon-size); height: var(--amc-icon-size); color: var(--amc-icon-colour); flex: none; }
.amc-icon * { stroke-width: var(--amc-icon-stroke); }
.amc-icon [opacity] { opacity: var(--amc-icon-duotone); }
/* AMC HMS — locked buttons (tuned in Button Lab, 24 Sept 2026). Shape: pill.
   Load after amc-glass.css, amc-type.css, amc-colour.css and amc-icons.css (secondary buttons override the glass padding and corners).
   Types: primary, secondary (glass), ghost, critical, icon. Sizes: sm, md (default), lg. Do not create other button styles. */
.amc-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; cursor: pointer; border-radius: 999px;
  height: var(--amc-btn-h); padding: 0 var(--amc-btn-p); font: 500 var(--amc-btn-f)/1 var(--amc-font-body); letter-spacing: .04em; color: var(--amc-white-strong); }
:where(.amc-btn) { border: 0; background: none; margin: 0; }   /* zero-strength reset, so amc-glass still applies on secondary buttons */
[dir="rtl"] .amc-btn { letter-spacing: 0; }
.amc-btn .amc-icon { width: var(--amc-btn-i); height: var(--amc-btn-i); color: inherit; }
.amc-btn--sm { --amc-btn-h: 32px; --amc-btn-p: 14px; --amc-btn-f: 12px; --amc-btn-i: 16px; }
.amc-btn--md { --amc-btn-h: 40px; --amc-btn-p: 20px; --amc-btn-f: 12px; --amc-btn-i: 18px; }
.amc-btn--lg { --amc-btn-h: 48px; --amc-btn-p: 26px; --amc-btn-f: 12px; --amc-btn-i: 20px; }
.amc-btn:not(.amc-btn--sm):not(.amc-btn--lg) { --amc-btn-h: 40px; --amc-btn-p: 20px; --amc-btn-f: 12px; --amc-btn-i: 18px; }   /* medium is the default */
.amc-btn--primary { background: rgba(255,255,255,0.92); color: #2b3a47; box-shadow: 0 4px 18px rgba(20,35,50,0.23), inset 0 1px 0 rgba(255,255,255,.8); }
.amc-btn--secondary { /* add the amc-glass class too: <button class="amc-btn amc-btn--secondary amc-glass"> */ padding: 0 var(--amc-btn-p); border-radius: 999px; }
.amc-btn--ghost { border: 0.35px solid rgba(255,255,255,0.36); color: var(--amc-white-soft); }
.amc-btn--critical { background: color-mix(in srgb, var(--amc-critical) 64%, transparent); color: #fff; box-shadow: 0 4px 18px color-mix(in srgb, var(--amc-critical) 25%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.amc-btn--icon { width: var(--amc-btn-h); padding: 0; }
.amc-btn:disabled, .amc-btn[aria-disabled="true"] { opacity: 0.38; cursor: not-allowed; }
/* AMC HMS — locked hover & press (tuned in Hover & Press Lab, 24 Sept 2026).
   PC: hover + click. Phone: tap + haptic (amc-haptics.js). Buttons press the same on both; big panels (amc-press) press in much less. Load after amc-buttons.css.
   Add the class amc-press to anything clickable (buttons get it automatically below). */
.amc-btn, .amc-press, .amc-nav-item { transition: transform 220ms cubic-bezier(.2,.8,.2,1), filter 240ms cubic-bezier(.2,.8,.2,1), background-color 160ms cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:is(.amc-btn, .amc-press, .amc-nav-item):focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }

/* PC — mouse: hover + click */
@media (hover: hover) and (pointer: fine) {
  .amc-btn:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-1px); filter: brightness(1.08); }
  .amc-press:hover { transform: translateY(-2px); }
  .amc-nav-item:hover:not([aria-current="page"]) { background: rgba(255,255,255,0.08); color: var(--amc-white-strong); }
  .amc-btn:hover:not(:active), .amc-press:hover:not(:active) { transition-duration: 160ms, 240ms, 160ms; }
}

/* Phone — touch (no hover) */
@media (hover: none) {
  .amc-nav-item:active:not([aria-current="page"]) { background: rgba(255,255,255,0.08); }
}

/* Press (kept last so it beats hover) — the same on PC (click) and phone (tap). Big panels (amc-press) go in much less. */
:is(.amc-btn, .amc-press, .amc-nav-item):active:not(:disabled):not([aria-disabled="true"]) { transform: scale(0.96); filter: brightness(0.92); transition-duration: 80ms, 240ms, 80ms; }
.amc-press:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(0.994); }
/* AMC HMS — locked toggles & inputs (tuned in Toggles & Inputs Lab, 24 Sept 2026).
   Field: outline. Label: floating. Switch on: green (flat white knob). Segment selected: white. Dropdown opens into one tinted glass panel. Menus (tinted glass). All pop-ups open on the top layer.
   Load after amc-glass.css, amc-colour.css and amc-type.css. Behaviour (switch, dropdown, segmented): amc-controls.js.
   Colour only for errors (critical); all text is white. */
:root { --amc-field-h: 40px; --amc-field-r: 28px; --amc-field-p: 14px; --amc-field-f: 13px; --amc-control-speed: 460ms; }

/* Text fields */
.amc-input { box-sizing: border-box; width: 100%; height: var(--amc-field-h); padding: 0 var(--amc-field-p); font: 300 var(--amc-field-f)/1.2 var(--amc-font-body); letter-spacing: .02em; color: #fff; outline: none; border: .5px solid transparent; background: none;
  transition: border-color 460ms cubic-bezier(.2,.8,.2,1), box-shadow 460ms cubic-bezier(.2,.8,.2,1), background-color 460ms cubic-bezier(.2,.8,.2,1); }
[dir="rtl"] .amc-input { letter-spacing: 0; }
.amc-input::placeholder { color: rgba(255,255,255,0.45); }
textarea.amc-input { height: calc(var(--amc-field-h) * 2.4); min-height: calc(var(--amc-field-h) * 1.6); padding-top: 12px; resize: none; line-height: 1.5; }   /* no corner handle — drag the bottom edge to make it taller or shorter */
textarea.amc-input.is-edge { cursor: ns-resize; }
textarea.amc-input.is-edge, textarea.amc-input.is-resizing { box-shadow: inset 0 -1.5px 0 rgba(255,255,255,.7); }
.amc-input { border-radius: var(--amc-field-r); border-color: rgba(255,255,255,0.8); }
.amc-input:focus { border-color: rgba(255,255,255,1); box-shadow: 0 0 6px rgba(255,255,255,.25); }
.amc-input[aria-invalid="true"] { border-color: var(--amc-critical); }
.amc-input:disabled { opacity: .38; cursor: not-allowed; }
.amc-field-msg { display: flex; align-items: center; gap: 8px; margin-top: 8px; font: 400 11px/1.2 var(--amc-font-body); color: #fff; }   /* put <span class="amc-status-dot amc-critical"></span> before the text */
.amc-float { position: relative; }   /* <div class="amc-float"><input class="amc-input" placeholder=" " id="x"><label for="x">Phone number</label></div> */
.amc-float .amc-input { padding-top: 12px; }
.amc-float label { position: absolute; inset-inline-start: var(--amc-field-p); top: 50%; transform: translateY(-50%); pointer-events: none; font: 300 var(--amc-field-f)/1 var(--amc-font-body); color: rgba(255,255,255,0.45); transition: top 460ms cubic-bezier(.2,.8,.2,1), font-size 460ms cubic-bezier(.2,.8,.2,1), color 460ms cubic-bezier(.2,.8,.2,1); }
.amc-float .amc-input:focus + label, .amc-float .amc-input:not(:placeholder-shown) + label { top: 11px; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--amc-white-muted); }
[dir="rtl"] .amc-float .amc-input:focus + label, [dir="rtl"] .amc-float .amc-input:not(:placeholder-shown) + label { letter-spacing: 0; text-transform: none; font-size: 9.5px; }
.amc-search { position: relative; } .amc-search .amc-icon { position: absolute; top: 50%; inset-inline-start: var(--amc-field-p); transform: translateY(-50%); width: 18px; height: 18px; color: var(--amc-white-soft); pointer-events: none; }
.amc-search .amc-input { padding-inline-start: calc(var(--amc-field-p) + 26px); }

/* Switch — <button class="amc-switch" role="switch" aria-checked="true"> */
.amc-switch { all: unset; box-sizing: border-box; position: relative; flex: none; width: 50px; height: 28px; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,0.4); box-shadow: inset 0 1px 2px rgba(20,35,50,.18), inset 0 0 0 .5px rgba(255,255,255,.3); transition: background-color 460ms cubic-bezier(.2,.8,.2,1); }
.amc-switch::after { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 28px; height: 28px; border-radius: 50%; background: #fff; transform: translateX(var(--amc-knob-x, 0px)); transition: transform 460ms cubic-bezier(.2,.8,.2,1); }   /* flat white knob, full height */
.amc-switch[aria-checked="true"] { --amc-knob-x: 22px; }
[dir="rtl"] .amc-switch[aria-checked="true"] { --amc-knob-x: -22px; }
.amc-switch[aria-checked="true"] { background: var(--amc-stable); }
.amc-switch:disabled { opacity: .38; cursor: not-allowed; }

/* Checkbox & radio — <input type="checkbox" class="amc-check">, <input type="radio" class="amc-radio"> */
.amc-check, .amc-radio { appearance: none; margin: 0; flex: none; width: 18px; height: 18px; cursor: pointer; box-sizing: border-box; display: grid; place-items: center; background: rgba(255,255,255,0.4); border: .5px solid rgba(255,255,255,.45); transition: background-color 460ms cubic-bezier(.2,.8,.2,1), border-color 460ms cubic-bezier(.2,.8,.2,1); }
.amc-check { border-radius: 5px; } .amc-radio { border-radius: 50%; }
.amc-check::after { content: ""; width: 38%; height: 20%; border: solid #2b3a47; border-width: 0 0 1.6px 1.6px; transform: translateY(-15%) rotate(-45deg) scale(0); transition: transform 460ms cubic-bezier(.2,.8,.2,1); }
.amc-check:checked, .amc-radio:checked { background: rgba(255,255,255,.92); border-color: #fff; }   /* radio: selected = solid white, no dot */
.amc-check:checked::after { transform: translateY(-15%) rotate(-45deg) scale(1); }
.amc-check:disabled, .amc-radio:disabled { opacity: .38; cursor: not-allowed; }

/* Dropdown — closed: a normal field. Open: the field and its list become ONE locked glass panel (amc-glass, edge bend 3×).
   The open panel is drawn on the top layer (amc-layer, added by amc-controls.js) above the page, placed exactly over the field,
   so its glass always blurs what is behind it — even when the dropdown sits inside a glass card. Icon: solar:alt-arrow-down-linear.
   Markup: <div class="amc-select"><button class="amc-input amc-select-trigger" aria-haspopup="listbox" aria-expanded="false"><span>Choose…</span><svg class="amc-icon">…</svg></button>
             <ul class="amc-select-list" role="listbox"><li class="amc-select-option" role="option" aria-selected="false">Emergency</li>…</ul></div> */
.amc-select { position: relative; }
.amc-select-trigger { display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: start; }
.amc-select-trigger .amc-icon, .amc-select-head .amc-icon { width: 18px; height: 18px; transition: transform 460ms cubic-bezier(.2,.8,.2,1); }
.amc-select.is-open .amc-select-trigger { opacity: 0; }   /* the top-layer panel sits exactly on top of it */
.amc-select > .amc-select-list { display: none; }                  /* the list only shows inside the open panel */

/* Top layer: every pop-up (dropdown panel, menus, notification panel) opens here, above the page */
.amc-layer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.amc-layer > * { pointer-events: auto; }

/* The open dropdown panel */
.amc-select-pop { position: fixed; --amc-select-r: min(var(--amc-field-r), calc(var(--amc-field-h) / 2)); }
.amc-select-pop > .amc-select-glass {   /* glass: amc-glass-pop (amc-glass.css) */
  position: absolute; inset: 0 0 auto 0; height: var(--amc-field-h); padding: 0; box-sizing: border-box; border-radius: var(--amc-select-r);
  opacity: 0; transition: height 460ms cubic-bezier(.2,.8,.2,1), opacity 460ms cubic-bezier(.2,.8,.2,1); }
.amc-select-pop[data-open] > .amc-select-glass { height: calc(var(--amc-field-h) + var(--amc-select-list-h, 0px)); opacity: 1; }
.amc-select-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-color: transparent !important; background: none !important; box-shadow: none !important; border-radius: var(--amc-select-r); }
.amc-select-pop[data-open] .amc-select-head .amc-icon { transform: rotate(180deg); }
.amc-select-pop > .amc-select-list { position: absolute; top: var(--amc-field-h); inset-inline: 0; margin: 0; padding: 0 6px 6px; box-sizing: border-box; list-style: none; z-index: 2;
  clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; transition: clip-path 460ms cubic-bezier(.2,.8,.2,1), opacity 460ms cubic-bezier(.2,.8,.2,1); }
.amc-select-pop[data-open] > .amc-select-list { clip-path: inset(0); opacity: 1; pointer-events: auto; }
.amc-select-option { padding: 10px 12px; border-radius: calc(var(--amc-field-r) - 4px); font: 400 13px/1 var(--amc-font-body); color: var(--amc-white-soft); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.amc-select-option:hover, .amc-select-option.is-active { background: rgba(255,255,255,.12); color: #fff; }
.amc-select-option[aria-selected="true"] { color: #fff; } .amc-select-option[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* Date picker — the field opens into the dropdown's glass panel with a calendar (amc-controls.js builds it) */
.amc-date { position: relative; }
.amc-date .amc-select-trigger > span, .amc-select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amc-date .amc-select-trigger:not(.has-value) > span, .amc-date-pop .amc-select-head:not(.has-value) > span { color: rgba(255,255,255,0.45); }
.amc-date.is-open .amc-select-trigger { opacity: 0; }
.amc-date-pop .amc-select-head .amc-icon, .amc-date-pop[data-open] .amc-select-head .amc-icon { transform: none; }
.amc-date-pop > .amc-cal { padding: 2px 10px 12px; }
.amc-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.amc-cal-title { all: unset; cursor: pointer; padding: 8px 12px; border-radius: 999px; font: 500 13px/1 var(--amc-font-body); color: #fff; transition: background-color 200ms; }
.amc-cal-nav { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--amc-white-soft); transition: background-color 200ms, color 200ms; }
.amc-cal-nav .amc-icon { width: 16px; height: 16px; }
.amc-cal-title:hover, .amc-cal-nav:hover { background: rgba(255,255,255,.12); color: #fff; }
.amc-cal-title:focus-visible, .amc-cal-nav:focus-visible, .amc-cal-cell:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 1px; }
.amc-cal-body { position: relative; }
.amc-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; min-height: 238px; align-content: start; }
.amc-cal-grid.is-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 56px; gap: 4px; }
.amc-cal-wd { display: grid; place-items: center; height: 26px; font: 400 10px/1 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-cal-cell { all: unset; box-sizing: border-box; height: 34px; display: grid; place-items: center; border-radius: 999px; cursor: pointer; font: 400 12px/1 var(--amc-font-number); color: var(--amc-white-soft);
  transition: background-color 200ms, color 200ms; }
.is-wide .amc-cal-cell { height: auto; font-family: var(--amc-font-body); font-size: 12px; }
.amc-cal-cell.is-out { color: var(--amc-white-faint); }
.amc-cal-cell.is-today { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.8); color: #fff; }
.amc-cal-cell.is-focus { background: rgba(255,255,255,.12); color: #fff; }
@media (hover: hover) { .amc-cal-cell:not(:disabled):not(.is-sel):hover { background: rgba(255,255,255,.12); color: #fff; } }
.amc-cal-cell.is-sel { background: rgba(255,255,255,.92); color: #2b3a47; box-shadow: none; }
.amc-cal-cell:disabled { opacity: .3; cursor: not-allowed; }

/* Long dropdown lists scroll inside the panel (no scrollbar shown) */
.amc-select-pop > .amc-select-list { max-height: 300px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.amc-select-pop > .amc-select-list::-webkit-scrollbar { display: none; }
/* Phone number — country code + number side by side */
.amc-phone { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; }
.amc-phone-num { transition: opacity var(--amc-dur-short, 300ms) cubic-bezier(.25,.1,.25,1); } .amc-phone:has(.amc-phone-code.is-open) .amc-phone-num { opacity: 0; }   /* the list opens over the whole field */
.amc-phone-num .amc-input { font-family: var(--amc-font-number); letter-spacing: .04em; direction: ltr; unicode-bidi: bidi-override; }   /* Arabic digits keep the number's order */
[dir="rtl"] .amc-phone-num .amc-input { text-align: right; letter-spacing: 0; }
.amc-phone-code .amc-select-trigger > span, .amc-phone-cc { font-family: var(--amc-font-number); direction: ltr; unicode-bidi: bidi-override; }
.amc-phone-cc { font: 400 12px/1 var(--amc-font-number); color: var(--amc-white-muted); }
.amc-select-option[aria-selected="true"] .amc-phone-cc { color: #fff; }
.amc-phone-list .amc-select-option { justify-content: flex-start; gap: 10px; } .amc-phone-list .amc-select-option > span:first-child { margin-inline-end: auto; }
.amc-phone-list .amc-select-option::after { content: ""; width: 6px; height: 6px; flex: none; }   /* same space on every row, so the codes line up */

/* Menu — a list of actions opened from any button. Same glass as the dropdown (amc-glass, edge bend 3×), opens on the top layer under its button.
   Markup: <button class="amc-btn …" data-amc-menu="patient-actions">Actions</button>
           <div class="amc-menu" id="patient-actions" role="menu"><button class="amc-menu-item" role="menuitem">Transfer patient</button>…</div> */
.amc-menu { position: fixed; min-width: 200px; padding: 6px; border-radius: 20px; box-sizing: border-box;
  display: grid; gap: 2px; opacity: 0; transform: translateY(-7px) scale(.98); transform-origin: top; pointer-events: none;
  transition: opacity var(--amc-dur-short, 300ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)), transform var(--amc-dur-short, 300ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)); }
.amc-menu:not(.amc-glass) { visibility: hidden; }   /* until amc-controls.js moves it to the top layer */
.amc-menu.is-up { transform-origin: bottom; transform: translateY(7px) scale(.98); }
.amc-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.amc-menu-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  font: 400 13px/1 var(--amc-font-body); color: var(--amc-white-soft); }
.amc-menu-item .amc-icon { width: 18px; height: 18px; }
.amc-menu-item:hover, .amc-menu-item:focus-visible { background: rgba(255,255,255,.12); color: #fff; outline: none; }
.amc-menu-item[aria-disabled="true"] { opacity: .38; pointer-events: none; }

/* The open dropdown, calendar and menus use the pop-up glass: amc-glass amc-glass-soft amc-glass-pop (amc-glass.css) */

/* Segmented control — thumb slides under the selected option */
.amc-seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 2px rgba(20,35,50,.15), inset 0 0 0 .5px rgba(255,255,255,.25); }
.amc-seg-thumb { position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px; border-radius: 999px; transition: transform 460ms cubic-bezier(.2,.8,.2,1), width 460ms cubic-bezier(.2,.8,.2,1); background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(20,35,50,.15); }
.amc-seg-option { all: unset; position: relative; z-index: 1; padding: 0 22px; height: 32px; display: grid; place-items: center; font: 500 12px/1 var(--amc-font-body); letter-spacing: .04em; color: var(--amc-white-soft); cursor: pointer; border-radius: 999px; transition: color 460ms cubic-bezier(.2,.8,.2,1); }
[dir="rtl"] .amc-seg-option { letter-spacing: 0; }
.amc-seg-option[aria-checked="true"] { color: #2b3a47; }

:is(.amc-switch, .amc-check, .amc-radio, .amc-seg-option):focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }

/* AMC HMS — locked notifications (tuned in Notifications Lab, 24 Sept 2026).
   Toasts: top centre, above the pop-up layer. Critical alert above everything. Pop-up glass: more frosted. Badge: number (red while a critical item is unread).
   Critical alert: middle of the screen, page dimmed; red pulse, sound repeats, strong haptic, must be acknowledged.
   The bell's panel opens on the top layer (like dropdowns and menus) so its glass blurs the page.
   Load after amc-glass.css, amc-type.css, amc-colour.css, amc-icons.css, amc-buttons.css and amc-controls.css. Behaviour: amc-notify.js. */
:root {
  --amc-toast-duration: 3s;
  --amc-toast-w: 380px;
  --amc-toast-r: 40px;
  --amc-toast-top: 46px;
  --amc-popup-glass: frost;
  --amc-badge-style: number;
  --amc-crit-position: middle;
  --amc-crit-pulse: 0.7s;
  --amc-crit-glow: 32px;
  --amc-crit-sound: repeat;
  --amc-crit-repeat: 3s;
  --amc-crit-volume: 1;
  --amc-crit-vibrate: 300ms;
}

/* Toasts and the critical alert: a more frosted glass so they read over anything. The notifications panel uses the pop-up glass (amc-glass-pop). */
:is(.amc-toast, .amc-crit).amc-glass { backdrop-filter: var(--amc-rf,) blur(22px) saturate(130%) brightness(92%); -webkit-backdrop-filter: blur(22px) saturate(130%) brightness(92%);
  background: var(--amc-glass-tint); }

/* Toasts — added by amcNotify.toast() */
.amc-toasts { position: fixed; top: var(--amc-toast-top); left: 50%; transform: translateX(-50%); z-index: 1050; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.amc-toast { pointer-events: auto; width: var(--amc-toast-w); max-width: calc(100vw - 24px); box-sizing: border-box; padding: 12px 16px; border-radius: var(--amc-toast-r); display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; cursor: pointer;
  font: 400 12px/1.35 var(--amc-font-body); color: var(--amc-white-soft); opacity: 0; transform: translateY(-14px) scale(.98); transition: opacity .35s cubic-bezier(.2,.8,.2,1), transform .35s cubic-bezier(.2,.8,.2,1); }
.amc-toast.is-in { opacity: 1; transform: none; } .amc-toast.is-out { opacity: 0; transform: translateY(-10px) scale(.98); }
.amc-toast-title { display: block; color: #fff; font-weight: 500; font-size: 13px; }
.amc-toast-lead { display: grid; place-items: center; } .amc-toast-lead .amc-icon { width: 22px; height: 22px; }

/* Critical alert — added by amcNotify.critical(); stays until Acknowledge */
.amc-crit-dim { position: fixed; inset: 0; z-index: 1100; background: rgba(20,35,50,.25); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.amc-crit-dim.is-on { opacity: 1; pointer-events: auto; }
.amc-crit-wrap { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1110; }
.amc-crit { width: 440px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 20px 22px; border-radius: 28px; color: var(--amc-white-soft);
  border-color: color-mix(in srgb, var(--amc-critical) 70%, white); opacity: 0; transform: translateY(-16px) scale(.97); transition: opacity .4s cubic-bezier(.2,.8,.2,1), transform .4s cubic-bezier(.2,.8,.2,1); }
.amc-crit.is-in { opacity: 1; transform: none; animation: amc-crit-glow var(--amc-crit-pulse) ease-in-out infinite; }
.amc-crit.is-out { opacity: 0; transform: translateY(-10px) scale(.97); animation: none; }
@keyframes amc-crit-glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.33), 0 0 0 .5px color-mix(in srgb, var(--amc-critical) 60%, transparent), 0 0 calc(var(--amc-crit-glow) * .4) color-mix(in srgb, var(--amc-critical) 35%, transparent); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.33), 0 0 0 1px var(--amc-critical), 0 0 var(--amc-crit-glow) color-mix(in srgb, var(--amc-critical) 75%, transparent); } }
@media (prefers-reduced-motion: reduce) { .amc-crit.is-in { animation: none; box-shadow: 0 0 0 1px var(--amc-critical), 0 0 var(--amc-crit-glow) color-mix(in srgb, var(--amc-critical) 60%, transparent); } }
.amc-crit-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .amc-crit-top .amc-label { color: #fff; }
.amc-crit-who { font: 300 17px/1.3 var(--amc-font-title); color: #fff; margin-bottom: 14px; }
.amc-crit-vital { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font: 400 12px var(--amc-font-body); }
.amc-crit-vital .amc-status-number { font: 300 34px/1 var(--amc-font-number); }
.amc-crit-actions { display: flex; gap: 10px; }

/* Bell, badge and notification panel
   <div class="amc-bell-wrap"><button class="amc-btn amc-btn--secondary amc-btn--icon amc-glass amc-bell" aria-expanded="false">…bell icon…</button><span class="amc-badge"></span>
     <div class="amc-npanel amc-glass" role="dialog"><div class="amc-nhead"><span>Notifications</span><button class="amc-btn amc-btn--ghost amc-btn--sm amc-markall">Mark all read</button></div>
       <div class="amc-nlist"><div class="amc-nitem" data-critical tabindex="0"><span class="amc-nunread"></span><span class="amc-status-dot amc-critical"></span><span><span class="amc-ntitle">…</span>…</span><span class="amc-nwhen">2 min</span></div>…</div></div></div> */
.amc-bell-wrap { position: relative; }
.amc-badge { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 17px; height: 17px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center; pointer-events: none;
  background: #fff; color: #2b3a47; font: 600 10px/1 var(--amc-font-body); box-shadow: 0 2px 6px rgba(20,35,50,.2); transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s; }
.amc-badge.is-critical { background: var(--amc-critical); color: #fff; }
.amc-badge.is-empty { transform: scale(0); }
.amc-badge.is-bump { animation: amc-bump .4s cubic-bezier(.34,1.56,.64,1); } @keyframes amc-bump { 50% { transform: scale(1.35); } }
.amc-npanel { position: fixed; top: 0; left: 0; width: 380px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 24px; box-sizing: border-box;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s cubic-bezier(.2,.8,.2,1), transform .3s cubic-bezier(.2,.8,.2,1); }
.amc-npanel:not(.amc-glass) { visibility: hidden; }   /* amc-notify.js moves the panel to the top layer and makes it glass while open */
.amc-npanel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.amc-nhead { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; } .amc-nhead > span { font: 300 17px/1 var(--amc-font-title); color: #fff; }
.amc-nitem { display: grid; grid-template-columns: 10px 22px 1fr auto; gap: 10px; align-items: center; padding: 11px 10px; border-radius: 16px; cursor: pointer; font: 400 12px/1.35 var(--amc-font-body); color: var(--amc-white-soft); }
.amc-nitem:hover { background: rgba(255,255,255,.08); }
.amc-nitem .amc-icon { width: 20px; height: 20px; } .amc-nitem .amc-status-dot { justify-self: center; }
.amc-nunread { width: 7px; height: 7px; border-radius: 50%; background: #fff; transition: opacity .25s; }
.amc-nitem.is-read .amc-nunread { opacity: 0; } .amc-nitem.is-read { color: var(--amc-white-muted); }
.amc-ntitle { display: block; color: #fff; font-weight: 500; font-size: 13px; } .amc-nitem.is-read .amc-ntitle { color: var(--amc-white-soft); }
.amc-nwhen { font-size: 11px; color: var(--amc-white-muted); white-space: nowrap; }
/* AMC HMS — locked loading (tuned in Loading Lab, 24 Sept 2026).
   Spinner: minimal ring (rotation only, stays smooth). Full-page loader: page fades away, the silk speeds up, ring in the middle.
   Buttons show the ring while working. Skeleton placeholders with a light sweep. Glass progress bars.
   Load after amc-glass.css, amc-type.css and amc-buttons.css. Behaviour: amc-loading.js. */
:root {
  --amc-spinner: ring;
  --amc-page-loader: silk;
  --amc-spinner-speed: 0.45;
  --amc-spinner-size: 20px;
  --amc-skeleton-sweep: 1.3s;
  --amc-skeleton-fill: 0.12;
  --amc-progress-h: 4px;
}

/* Spinner — <span class="amc-spinner"><svg viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" class="amc-spinner-track"/><circle cx="25" cy="25" r="20" class="amc-spinner-arc"/></svg></span> */
.amc-spinner { display: inline-block; width: var(--amc-spinner-size); height: var(--amc-spinner-size); flex: none; color: #fff; }
.amc-spinner svg { display: block; width: 100%; height: 100%; animation: amc-spin calc(1s / var(--amc-spinner-speed)) linear infinite; will-change: transform; }
.amc-spinner circle { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; }
.amc-spinner-track { opacity: .18; } .amc-spinner-arc { stroke-dasharray: 34 200; }
.amc-spinner--lg { --amc-spinner-size: 56px; }
@keyframes amc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .amc-spinner svg { animation-duration: 3s; } }

/* Buttons while working — amcLoading.button(btn, true/false). The ring replaces the text; the button keeps its size. */
.amc-btn.is-loading { position: relative; pointer-events: none; }
.amc-btn.is-loading > :not(.amc-btn-spinner) { opacity: 0; }
.amc-btn-spinner { position: absolute; inset: 0; display: grid; place-items: center; --amc-spinner-size: 18px; }
.amc-btn--primary .amc-btn-spinner .amc-spinner { color: #2b3a47; }

/* Skeleton — <div class="amc-skeleton" style="width:60%"></div>; add .amc-skeleton--title / --block for other shapes */
.amc-skeleton { display: block; height: 12px; border-radius: 999px; background: rgba(255,255,255,var(--amc-skeleton-fill)); position: relative; overflow: hidden; }
.amc-skeleton--title { height: 20px; } .amc-skeleton--block { height: 34px; border-radius: 12px; }
.amc-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); will-change: transform;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: amc-sweep var(--amc-skeleton-sweep) ease-in-out infinite; }
[dir="rtl"] .amc-skeleton::after { animation-direction: reverse; }
@keyframes amc-sweep { to { transform: translateX(100%); } }

/* Progress bar — <div class="amc-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100"><i></i></div>
   amcLoading.progress(el, 0–100). Unknown length: add .amc-progress--busy */
.amc-progress { height: var(--amc-progress-h); border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 1px rgba(20,35,50,.12), inset 0 0 0 .5px rgba(255,255,255,.2); overflow: hidden; position: relative; }
.amc-progress > i { position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.92); box-shadow: 0 0 10px rgba(255,255,255,.5);
  transform-origin: left center; transform: scaleX(var(--amc-progress, 0)); transition: transform .35s cubic-bezier(.2,.8,.2,1); will-change: transform; }
[dir="rtl"] .amc-progress > i { transform-origin: right center; }
.amc-progress--busy > i { inset: 0 auto 0 0; width: 35%; transition: none; animation: amc-busy calc(1.5s / var(--amc-spinner-speed) * .45) cubic-bezier(.4,0,.2,1) infinite; }
[dir="rtl"] .amc-progress--busy > i { inset: 0 0 0 auto; animation-direction: reverse; }
@keyframes amc-busy { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }

/* Full-page loader — amcLoading.page(true/false): the page fades away, the silk speeds up (amc-live-background), ring + text in the middle */
.amc-page-loader { position: fixed; inset: 0; z-index: 990; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .5s; }
.amc-page-loader.is-on { opacity: 1; pointer-events: auto; }
.amc-page-loader-box { display: grid; justify-items: center; gap: 18px; }
.amc-page-loader-text { font: 300 15px/1 var(--amc-font-title); letter-spacing: .06em; color: #fff; text-shadow: 0 1px 10px rgba(20,35,50,.2); }
[dir="rtl"] .amc-page-loader-text { letter-spacing: 0; }
.amc-page-fading { transition: opacity .5s; }
body.amc-is-loading .amc-page-fading { opacity: 0; }
/* AMC HMS — locked motion (tuned in Motion Lab, 24 Sept 2026). Feel: springy. Page change: slide sideways. Numbers: digits roll.
   Typing: text types itself (no blinking cursor); "is typing" = three dots only; soft glow on each key press.
   Every animation in the app uses these speeds and this curve. Behaviour: amc-motion.js. */
:root {
  --amc-motion-feel: springy;
  --amc-dur-short: 300ms;   /* hovers, menus, small changes */
  --amc-dur-medium: 460ms;  /* pages, cards, dialogs */
  --amc-dur-long: 700ms;    /* numbers, big moves */
  --amc-ease: cubic-bezier(.34,1.56,.64,1);
  --amc-stagger: 60ms;
  --amc-rise: 14px;
  --amc-page-change: slide;
  --amc-numbers: roll;
  --amc-type-speed: 120;   /* letters per second */
  --amc-type-glow: on;
}

/* Page change — amcMotion.page(oldPage, newPage, direction). The old page slides out, the new page's items slide in one after another. */
.amc-page-leave { opacity: 0; transform: translateX(calc(var(--amc-rise) * -2 * var(--amc-dir, 1))); transition: opacity var(--amc-dur-medium) var(--amc-ease), transform var(--amc-dur-medium) var(--amc-ease); }
[dir="rtl"] .amc-page-leave { transform: translateX(calc(var(--amc-rise) * 2 * var(--amc-dir, 1))); }
.amc-stagger > * { transition: opacity var(--amc-dur-medium) var(--amc-ease), transform var(--amc-dur-medium) var(--amc-ease); transition-delay: calc(var(--i, 0) * var(--amc-stagger)); }
.amc-stagger.is-pre > * { opacity: 0; transform: translateX(calc(var(--amc-rise) * 2 * var(--amc-dir, 1))); transition: none; }
[dir="rtl"] .amc-stagger.is-pre > * { transform: translateX(calc(var(--amc-rise) * -2 * var(--amc-dir, 1))); }
/* Cards appearing on first load — amcMotion.enter(container): children rise in one after another */
.amc-stagger.is-pre.amc-rise-in > * { transform: translateY(var(--amc-rise)) scale(.97); }

/* Pop-ups (dialogs, menus, notification panel, dropdown) — toggle .is-open */
.amc-pop { opacity: 0; transform: translateY(calc(var(--amc-rise) * -.5)) scale(.98); pointer-events: none; transition: opacity var(--amc-dur-short) var(--amc-ease), transform var(--amc-dur-short) var(--amc-ease); }
.amc-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.amc-pop--dialog { transform: translateY(calc(var(--amc-rise) * .6)) scale(.96); transition-duration: var(--amc-dur-medium); }

/* Numbers roll like an odometer — amcMotion.number(el, value) */
.amc-odometer { direction: ltr; unicode-bidi: isolate; display: inline-flex; height: 1em; line-height: 1; overflow: hidden; font-feature-settings: "tnum" 1; vertical-align: bottom; }
.amc-odometer-digit { display: inline-block; height: 1em; overflow: hidden; }
.amc-odometer-digit > span { display: flex; flex-direction: column; align-items: center; transition: transform var(--amc-dur-long) var(--amc-ease); will-change: transform; }
.amc-odometer-digit > span > i { font-style: normal; height: 1em; line-height: 1; }

/* Text types itself — amcMotion.type(el, text). English letter by letter, Arabic word by word (keeps letters joined). No cursor. */
.amc-type-part { opacity: 0; transition: opacity var(--amc-dur-short) linear; }
.amc-type-part.is-on { opacity: 1; }

/* "Is typing" — three dots only: <span class="amc-typing-dots"><i></i><i></i><i></i></span> */
.amc-typing-dots { display: inline-flex; gap: 5px; align-items: center; height: 20px; }
.amc-typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .45; animation: amc-typing calc(var(--amc-dur-long) * 1.4) var(--amc-ease) infinite; will-change: transform; }
.amc-typing-dots i:nth-child(2) { animation-delay: calc(var(--amc-stagger) * 1.6); } .amc-typing-dots i:nth-child(3) { animation-delay: calc(var(--amc-stagger) * 3.2); }
@keyframes amc-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Typing in a field: white cursor + soft glow on each key press (added automatically by amc-motion.js) */
.amc-input { caret-color: #fff; }
.amc-input.is-keyglow { box-shadow: 0 0 14px rgba(255,255,255,.35); transition-duration: 60ms; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* AMC HMS — locked page spacing (Page Spacing Lab, 24 Sept 2026; widths: Squares Lab, 25 Sept 2026; rows: Spacing Preview, 26 Sept 2026). Behaviour: amc-spacing.js.
   Widths: the page is a grid of equal squares (49px, 8px apart). Number card 3 wide, card 4, amc-span-2 8, amc-span-all 16. Cards never grow with the page; extra width stays empty.
   Heights: panels sit in rows. Every panel in a row is the same height, exactly as tall as its content — no dead space in any panel.
   A row only takes panels of about the same height; charts and empty messages stretch or shrink to the row (never below --amc-chart-min) and take the row's spare width.
   Different groups (e.g. the number cards and the panels under them) are --amc-group-gap apart; panels in one group are 8px apart.
   Phone: the squares shrink so 6 fill the width — a card is 6 wide, a number card 3.
   Load after amc-glass.css (amc-card sets the padding inside glass cards). Loaded last by amc-hms.css.
   <div class="amc-page"> <div class="amc-page-head">title … buttons</div> <div class="amc-grid"> <section class="amc-glass amc-card">…</section> … </div> </div>
   Wide cards: add amc-span-2 or amc-span-all. A row of number cards goes in its own <div class="amc-grid amc-grid--small"> — they are all the same height. */
:root {
  --amc-page-edge: 45px;   /* screen edge → content */
  --amc-gap: 15px;         /* between cards */
  --amc-card-pad: 25px;    /* inside cards */
  --amc-cols: 4;
  --amc-page-max: none;
  --amc-card-min: 260px;        /* cards never get narrower than this — a row holds fewer cards instead (Navigation Lab) */
  --amc-card-min-small: 150px;  /* same for number cards (inside amc-grid--small) */
  --amc-cell: 49px;             /* one square (Squares Lab) */
  --amc-cell-gap: 8px;          /* between squares — and so between cards */
  --amc-w-small: 3;             /* number card: squares wide */
  --amc-w-card: 4;              /* card: squares wide (amc-span-2 = 2×, amc-span-all = 4×) */
  --amc-group-gap: 24px;        /* between different groups of panels */
  --amc-chart-min: 120px;       /* smallest a chart gets when it shrinks to fit its row */
}
.amc-page { box-sizing: border-box; width: 100%; max-width: none; margin: 0 auto; padding: var(--amc-page-edge); }
.amc-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--amc-gap); margin-bottom: var(--amc-space-block); }
.amc-grid { display: grid; grid-template-columns: repeat(auto-fill, var(--amc-cell)); grid-auto-rows: auto; gap: var(--amc-cell-gap);
  grid-auto-flow: row; justify-content: start; }   /* square columns; rows are placed by amc-spacing.js */
.amc-grid > * { --amc-w: var(--amc-w-card); grid-column: span min(var(--amc-w), var(--amc-cols-now, 99)); min-width: 0; box-sizing: border-box; }
.amc-grid > .amc-small, .amc-grid--small > * { --amc-w: var(--amc-w-small); }
.amc-grid > .amc-span-2 { --amc-w: calc(var(--amc-w-card) * 2); } .amc-grid > .amc-span-all { --amc-w: calc(var(--amc-w-card) * 4); }
.amc-grid > .amc-is-measuring { align-self: start !important; min-height: 0 !important; }   /* amc-spacing.js measures what's inside, then sets the rows */
.amc-grid + .amc-grid { margin-top: var(--amc-group-gap); }
.amc-grid > .amc-fit { display: flex; flex-direction: column; }   /* a panel holding only an empty message: the message sits in the middle */
.amc-grid > .amc-fit > .amc-fit-grow { flex: 1; display: grid; align-content: center; }
.amc-card { padding: var(--amc-card-pad); box-sizing: border-box; min-width: 0; }
@media (max-width: 700px) {   /* phone — amc-spacing.js makes the squares fill the width (6 across) */
  :root { --amc-page-edge: 16px; --amc-gap: 12px; --amc-card-pad: 20px; --amc-cols: 2; --amc-card-min: 0px; --amc-card-min-small: 0px; }
}
/* AMC HMS — locked navigation (tuned in Navigation Lab, 25 Sept 2026).
   PC: side bar that folds in & out and goes OVER the page when opened (the page never moves). Phone: bottom tab bar (first 4 pages + "More").
   Pages: all 16. Current page: white pill. Bars: floating glass. Open side bar, phone tab bar, sheets: tinted glass (the normal glass, a little whiter). Side bar, tab bar, sheets: soft glass (a little more blur + grain).
   Built by amc-nav.js — a page only calls amcNav({ current: 'patients' }). Load after amc-glass.css, amc-type.css, amc-icons.css, amc-interactions.css. */
:root {
  --amc-nav-w: 240px;          /* side bar open */
  --amc-nav-w-icons: 72px;     /* side bar folded (icons only) */
  --amc-nav-inset: 15px;       /* space around floating bars */
  --amc-nav-item-h: 40px;      /* page button height */
  --amc-nav-gap: 4px;          /* between page buttons */
  --amc-nav-tab-h: 64px;       /* phone tab bar */
  --amc-nav-speed: 460ms;
  --amc-nav-ease: cubic-bezier(.2,.8,.2,1);
}

/* The page makes room for the folded side bar only; opening it slides over the page */
body.amc-has-nav { padding-inline-start: calc(var(--amc-nav-w-icons) + var(--amc-nav-inset)); }

/* Tinted glass (same glass as everything else, a little whiter): the open side bar, the phone tab bar. The "More" sheet and the name tooltip use the pop-up glass (amc-glass-pop). */
.amc-side.is-open.amc-glass, .amc-tabs.amc-glass { background: var(--amc-glass-tint); }

/* Less colour split at the edges of the bars: side bar 0.15, phone tab bar 0.05 (the rest of the glass keeps 0.3) */
.amc-side { --amc-refraction-split: 0.15; }
.amc-tabs { --amc-refraction-split: 0.05; }

/* Page button */
.amc-nav-item { appearance: none; border: 0; background: none; margin: 0; text-align: start; text-decoration: none; box-sizing: border-box; display: flex; align-items: center; gap: 12px; height: var(--amc-nav-item-h); padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  min-width: 0; overflow: hidden; font: 400 13px/1 var(--amc-font-body); letter-spacing: .01em; color: var(--amc-white-soft); position: relative; }
[dir="rtl"] .amc-nav-item { letter-spacing: 0; }
.amc-nav-item .amc-icon, .amc-tab .amc-icon { width: 20px; height: 20px; flex: none; color: inherit; }
.amc-nav-item .amc-nav-lbl { overflow: hidden; text-overflow: ellipsis; transition: opacity calc(var(--amc-nav-speed) * .6) var(--amc-nav-ease); }
.amc-nav-item[aria-current="page"], .amc-tab[aria-current="page"] { background: rgba(255,255,255,.92); color: #2b3a47; box-shadow: 0 2px 10px rgba(20,35,50,.15); }   /* white pill */

/* PC: side bar */
.amc-side { position: fixed; z-index: 900; top: var(--amc-nav-inset); inset-inline-start: var(--amc-nav-inset); height: calc(100vh - var(--amc-nav-inset) * 2); width: var(--amc-nav-w-icons);
  box-sizing: border-box; padding: 18px 12px; display: flex; flex-direction: column; gap: 14px; transition: width var(--amc-nav-speed) var(--amc-nav-ease); }
.amc-side.is-open { width: var(--amc-nav-w); }
.amc-side-head { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; }
.amc-side.is-open .amc-side-head { justify-content: space-between; padding: 0 6px 0 10px; }
.amc-logo { font: 500 17px/1 var(--amc-font-title); letter-spacing: .14em; color: #fff; white-space: nowrap; display: none; }
.amc-side.is-open .amc-logo { display: block; }
.amc-fold { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--amc-white-soft); flex: none; }
.amc-fold:hover { background: rgba(255,255,255,.1); color: #fff; } .amc-fold:focus-visible { outline: 2px solid rgba(255,255,255,.9); }
.amc-fold .amc-icon { width: 18px; height: 18px; transform: rotate(-90deg); transition: transform var(--amc-nav-speed) var(--amc-nav-ease); }   /* points into the page = "open" */
.amc-side.is-open .amc-fold .amc-icon { transform: rotate(90deg); }                                                                           /* points back = "fold" */
[dir="rtl"] .amc-fold .amc-icon, [dir="rtl"].amc-side .amc-fold .amc-icon { transform: rotate(90deg); }
[dir="rtl"] .amc-side.is-open .amc-fold .amc-icon, [dir="rtl"].amc-side.is-open .amc-fold .amc-icon { transform: rotate(-90deg); }
.amc-side-list { display: grid; gap: var(--amc-nav-gap); overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 2px 4px; scrollbar-width: none; flex: 1; align-content: start; }
.amc-side-foot { display: grid; gap: var(--amc-nav-gap); padding-top: 12px; box-shadow: 0 -.5px 0 rgba(255,255,255,.2); }
.amc-side:not(.is-open) .amc-nav-item { padding: 0 calc((var(--amc-nav-w-icons) - 24px - 20px) / 2); }
.amc-side:not(.is-open) .amc-nav-lbl, .amc-side:not(.is-open) .amc-who-name { opacity: 0; pointer-events: none; }
.amc-who { display: flex; align-items: center; gap: 10px; padding: 4px 8px; min-height: 40px; white-space: nowrap; overflow: hidden; }
.amc-side:not(.is-open) .amc-who { padding: 4px calc((var(--amc-nav-w-icons) - 24px - 34px) / 2); }
.amc-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #2b3a47; font: 600 11px/1 var(--amc-font-body); letter-spacing: .04em; }
.amc-who-name { display: grid; gap: 4px; transition: opacity calc(var(--amc-nav-speed) * .6) var(--amc-nav-ease); }
.amc-who-name b { font: 500 12px/1 var(--amc-font-body); color: #fff; } .amc-who-name span { font: 400 11px/1 var(--amc-font-body); color: var(--amc-white-muted); }

/* Name tooltip for the folded side bar (on the top layer) */
.amc-nav-tip { position: fixed; padding: 8px 12px; border-radius: 999px; font: 400 12px/1 var(--amc-font-body); color: #fff; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateX(-4px); transition: opacity 200ms, transform 200ms; }
[dir="rtl"].amc-nav-tip { transform: translateX(4px); }
.amc-nav-tip.is-on { opacity: 1; transform: none; }

/* Phone: bottom tab bar + "More" sheet */
.amc-tabs { display: none; }
.amc-tab { all: unset; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 999px; font: 400 10px/1 var(--amc-font-body); color: var(--amc-white-soft); -webkit-tap-highlight-color: transparent; }
.amc-tab .amc-icon { width: 20px; height: 20px; }
.amc-sheet { position: fixed; box-sizing: border-box; padding: 8px; border-radius: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--amc-nav-gap);
  opacity: 0; transform: translateY(8px) scale(.98); transform-origin: bottom; pointer-events: none;
  transition: opacity var(--amc-dur-short, 300ms) var(--amc-nav-ease), transform var(--amc-dur-short, 300ms) var(--amc-nav-ease); }
.amc-sheet.is-open { opacity: 1; transform: none; pointer-events: auto; }
.amc-sheet .amc-nav-item { padding: 0 12px; }

@media (max-width: 700px) {
  body.amc-has-nav { padding-inline-start: 0; padding-bottom: calc(var(--amc-nav-tab-h) + 24px); }
  .amc-side { display: none; }
  .amc-tabs { position: fixed; z-index: 900; left: 12px; right: 12px; bottom: 12px; height: var(--amc-nav-tab-h); box-sizing: border-box; padding: 6px; border-radius: 999px;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
}

/* AMC HMS — locked dialogs (tuned in Dialog Lab, 25 Sept 2026).
   Confirm, danger confirm (type the patient's name), form dialog, side panel. Tinted soft glass, like every pop-up.
   Page behind: dim + blur. Main button last. Clicking outside does nothing (Esc or Cancel closes). Phone (≤ 700px): dialogs open from the bottom.
   Built by amc-dialog.js on the top layer — pages call amcDialog.confirm / danger / form / panel. Load after amc-glass.css, amc-type.css, amc-buttons.css, amc-controls.css, amc-motion.css. */
:root {
  --amc-dialog-w: 530px;
  --amc-dialog-panel-w: 410px;
  --amc-dialog-r: 28px;
  --amc-dialog-pad: 25px;
  --amc-dialog-dim: 0.55;
  --amc-dialog-blur: 10px;
}

/* Page behind */
.amc-dialog-back { position: fixed; inset: 0; background: rgba(20,35,50,var(--amc-dialog-dim)); backdrop-filter: blur(var(--amc-dialog-blur)); -webkit-backdrop-filter: blur(var(--amc-dialog-blur));
  opacity: 0; transition: opacity var(--amc-dur-medium, 460ms) cubic-bezier(.2,.8,.2,1); }
.amc-dialog-back.is-on { opacity: 1; }

/* Dialog */
.amc-dialog { position: fixed; left: 50%; top: 50%; box-sizing: border-box; width: min(var(--amc-dialog-w), calc(100vw - 24px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: var(--amc-dialog-pad); border-radius: var(--amc-dialog-r); color: var(--amc-white-soft);
  opacity: 0; transform: translate(-50%, calc(-50% + var(--amc-rise, 14px) * .6)) scale(.96);
  transition: opacity var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)), transform var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)); }
.amc-dialog.amc-glass, .amc-panel.amc-glass { background: var(--amc-glass-tint); }
.amc-dialog.is-open { opacity: 1; transform: translate(-50%, -50%); }
.amc-dialog-title { margin: 0 0 var(--amc-space-tight); display: flex; align-items: center; gap: 10px; }
.amc-dialog-text { margin: 0 0 var(--amc-space-block); }
.amc-dialog-fields { display: grid; gap: var(--amc-space-tight); margin-bottom: var(--amc-space-block); }
.amc-dialog-typed { margin-bottom: var(--amc-space-block); } .amc-dialog-typed .amc-label { display: block; margin-bottom: 10px; }
.amc-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }   /* main button last (right in English, left in Arabic) */
.amc-dialog-actions .amc-btn { min-width: 110px; }

/* Handle — only on the phone, where dialogs open from the bottom */
.amc-dialog-handle { display: none; }

/* Side panel — slides in from the end side (right in English, left in Arabic) */
.amc-panel { position: fixed; top: 15px; inset-inline-end: 15px; height: calc(100vh - 30px); width: min(var(--amc-dialog-panel-w), calc(100vw - 30px)); box-sizing: border-box; overflow: auto;
  padding: var(--amc-dialog-pad); border-radius: var(--amc-dialog-r); color: var(--amc-white-soft);
  opacity: 0; transform: translateX(40px); transition: opacity var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)), transform var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)); }
[dir="rtl"].amc-panel { transform: translateX(-40px); }
.amc-panel.is-open { opacity: 1; transform: none; }
.amc-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: var(--amc-space-block); }
.amc-panel-head .amc-heading { margin: 0 0 8px; }
.amc-panel-sec { padding: var(--amc-space-pair) 0; box-shadow: 0 -.5px 0 rgba(255,255,255,.2); }   /* optional sections inside the panel body */
.amc-panel-sec > .amc-label { display: block; margin-bottom: 14px; }

/* Phone: dialogs and the side panel open from the bottom, with a handle */
@media (max-width: 700px) {
  .amc-dialog, .amc-panel { left: 0; right: 0; top: auto; bottom: 0; inset-inline-end: auto; width: 100%; transform: translateY(100%);
    border-radius: var(--amc-dialog-r) var(--amc-dialog-r) 0 0; padding-top: calc(var(--amc-dialog-pad) + 12px); padding-bottom: calc(var(--amc-dialog-pad) + env(safe-area-inset-bottom, 0px)); }
  .amc-dialog { max-height: 90vh; } .amc-panel { height: 88vh; }
  [dir="rtl"].amc-panel { transform: translateY(100%); }
  .amc-dialog.is-open, .amc-panel.is-open { transform: none; }
  .amc-dialog-handle { display: block; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.55); }
  .amc-dialog-actions { flex-direction: column-reverse; } .amc-dialog-actions .amc-btn { width: 100%; }
}
/* AMC HMS — locked tables & lists (tuned in Tables Lab, 25 Sept 2026).
   Rows: zebra stripes, comfortable (59px). Phone (≤ 700px): each patient stacks into a small block. Many rows: pages (4 per page).
   Selected rows: actions in a floating glass bar. Every change is smooth: old rows leave one after another, new rows arrive one after another,
   the card height glides, the page pill slides, counts roll.
   Built by amc-table.js — pages call amcTable(host, { columns, rows, … }). Simple lists: amc-list / amc-list-item (markup below).
   Load after amc-glass.css, amc-type.css, amc-colour.css, amc-controls.css, amc-loading.css, amc-motion.css. */
:root {
  --amc-table-row-h: 59px;
  --amc-table-zebra: 0.15;      /* stripe strength */
  --amc-table-per-page: 4;
  --amc-table-gap-x: 14px;
}

/* Rows */
.amc-table { position: relative; }
.amc-table-anim { overflow: clip; }
.amc-tr { display: grid; grid-template-columns: var(--amc-table-cols); gap: var(--amc-table-gap-x); align-items: center; min-height: var(--amc-table-row-h); padding: 0 12px; box-sizing: border-box;
  border-radius: 14px; font: 400 12px/1.3 var(--amc-font-body); color: var(--amc-white-soft);
  transition: opacity var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)), transform var(--amc-dur-medium, 460ms) var(--amc-ease, cubic-bezier(.34,1.56,.64,1)), background-color 300ms cubic-bezier(.2,.8,.2,1); }
.amc-tr > * { min-width: 0; }
.amc-table-rows > .amc-tr:nth-child(even) { background: rgba(255,255,255,var(--amc-table-zebra)); }   /* zebra stripes */
.amc-tr-body { cursor: pointer; }
@media (hover: hover) { .amc-table-rows > .amc-tr-body:hover { background: rgba(255,255,255,.08); } .amc-table-rows > .amc-tr-body:nth-child(even):hover { background: rgba(255,255,255,calc(var(--amc-table-zebra) + .06)); } }
.amc-table-rows > .amc-tr-body.is-sel { background: rgba(255,255,255,.22); }
.amc-tr-head { min-height: 34px; padding-bottom: 6px; background: none !important; cursor: default; transition: opacity var(--amc-dur-short, 300ms) cubic-bezier(.2,.8,.2,1); }
.amc-tr-head.is-hidden { opacity: 0; pointer-events: none; }
.amc-th { all: unset; display: inline-flex; align-items: center; gap: 4px; font: 400 9px/1 var(--amc-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--amc-white-muted); white-space: nowrap; }
[dir="rtl"] .amc-th { letter-spacing: 0; text-transform: none; font-size: 10px; }
button.amc-th { cursor: pointer; } button.amc-th:hover, .amc-th[aria-sort] { color: #fff; }
.amc-th:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; border-radius: 4px; }
.amc-th .amc-icon { width: 12px; height: 12px; opacity: 0; transition: transform 300ms cubic-bezier(.2,.8,.2,1), opacity 300ms; }
.amc-th[aria-sort="ascending"] .amc-icon { opacity: 1; transform: rotate(180deg); } .amc-th[aria-sort="descending"] .amc-icon { opacity: 1; }
.amc-td-num, .amc-th-num { justify-self: end; text-align: end; }
.amc-td-num { font: 300 18px/1 var(--amc-font-number); color: #fff; }
.amc-td-main b { display: block; font-weight: 500; font-size: 13px; color: #fff; } .amc-td-main span { font-size: 11px; color: var(--amc-white-muted); }
.amc-td-status { display: flex; align-items: center; gap: 8px; }
.amc-td-sub { display: none; }

/* Smooth changes (amc-table.js / amcSwap) */
.amc-row-in { opacity: 0; transform: translateY(10px); }
.amc-row-out { pointer-events: none; }

/* Empty + loading */
.amc-table-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 12px 40px; transition: opacity var(--amc-dur-medium, 460ms) var(--amc-ease), transform var(--amc-dur-medium, 460ms) var(--amc-ease); }
.amc-table-empty .amc-icon { width: 34px; height: 34px; opacity: .8; } .amc-table-empty p { margin: 0 0 8px; max-width: 320px; }
.amc-table-sk .amc-skeleton { height: 10px; } .amc-table-sk .amc-sk-two { display: grid; gap: 6px; } .amc-table-sk .amc-sk-small { height: 8px; }
.amc-table-sk .amc-sk-box { width: 18px; height: 18px; border-radius: 5px; } .amc-table-sk .amc-td-num .amc-skeleton { width: 34px; height: 16px; }

/* Footer: pages */
.amc-table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: var(--amc-space-pair); font: 400 11px/1 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-table-foot:empty { display: none; }
.amc-pager { position: relative; display: flex; gap: 4px; }
.amc-pg-thumb { position: absolute; top: 0; left: 0; height: 32px; border-radius: 999px; background: rgba(255,255,255,.92); pointer-events: none;
  transition: transform var(--amc-dur-medium, 460ms) var(--amc-ease), width var(--amc-dur-medium, 460ms) var(--amc-ease); }
.amc-pg { all: unset; box-sizing: border-box; position: relative; z-index: 1; cursor: pointer; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  font: 400 12px/1 var(--amc-font-number); color: var(--amc-white-soft); transition: color var(--amc-dur-short, 300ms) cubic-bezier(.2,.8,.2,1), opacity 300ms; }
.amc-pg:hover:not([aria-current]):not(:disabled) { color: #fff; } .amc-pg[aria-current="page"] { color: #2b3a47; } .amc-pg:disabled { opacity: .35; cursor: default; }
.amc-pg:focus-visible { outline: 2px solid rgba(255,255,255,.9); }
.amc-pg .amc-icon { width: 16px; height: 16px; } .amc-pg-prev .amc-icon { transform: rotate(90deg); } .amc-pg-next .amc-icon { transform: rotate(-90deg); }
[dir="rtl"] .amc-pg-prev .amc-icon { transform: rotate(-90deg); } [dir="rtl"] .amc-pg-next .amc-icon { transform: rotate(90deg); }
.amc-fade { transition: opacity 180ms cubic-bezier(.2,.8,.2,1); } .amc-fade.is-out { opacity: 0; }

/* Floating selection bar (on the top layer) */
.amc-selbar { position: fixed; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 10px 10px 10px 22px; border-radius: 999px;
  font: 400 12px/1 var(--amc-font-body); color: #fff; opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
  transition: opacity var(--amc-dur-short, 300ms) var(--amc-ease), transform var(--amc-dur-short, 300ms) var(--amc-ease); }
[dir="rtl"].amc-selbar { padding: 10px 22px 10px 10px; }
.amc-selbar.amc-glass { background: var(--amc-glass-tint); }
.amc-selbar.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.amc-selbar b { font: 300 18px/1 var(--amc-font-number); margin-inline-end: 4px; }
.amc-selbar-gap { width: 6px; }

/* Simple list — <div class="amc-list"><div class="amc-list-item"><span class="amc-status-dot amc-critical"></span><span><b>Bed 12 — SpO₂ 86%</b>Sara Mahmoud</span><span class="amc-list-meta">2 min</span></div>…</div> */
.amc-list-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; min-height: var(--amc-table-row-h); padding: 8px 12px; box-sizing: border-box; border-radius: 14px;
  font: 400 12px/1.35 var(--amc-font-body); color: var(--amc-white-soft); transition: opacity var(--amc-dur-medium, 460ms) var(--amc-ease), transform var(--amc-dur-medium, 460ms) var(--amc-ease), background-color 300ms; }
.amc-list > .amc-list-item:nth-child(even) { background: rgba(255,255,255,var(--amc-table-zebra)); }
.amc-list-item b { display: block; font-weight: 500; font-size: 13px; color: #fff; } .amc-list-meta { font-size: 11px; color: var(--amc-white-muted); white-space: nowrap; }
@media (hover: hover) { a.amc-list-item:hover, .amc-list-item[tabindex]:hover { background: rgba(255,255,255,.08); } }

/* Phone: each row stacks — main text on top, the other details under it, the number and status on the side */
@media (max-width: 700px) {
  .amc-tr-head { display: none; }
  .amc-tr-body, .amc-table-sk { grid-template-columns: auto 1fr auto; grid-template-areas: "sel main side" "sel sub status"; row-gap: 6px; padding: 12px; min-height: 0; }
  .amc-table.no-select .amc-tr-body, .amc-table.no-select .amc-table-sk { grid-template-columns: 1fr auto; grid-template-areas: "main side" "sub status"; }
  .amc-td-sel { grid-area: sel; } [data-phone="main"] { grid-area: main; } [data-phone="side"] { grid-area: side; } [data-phone="status"] { grid-area: status; justify-self: end; }
  .amc-tr [data-phone="sub"], .amc-tr [data-phone="hide"] { display: none; }
  .amc-td-sub { display: block; grid-area: sub; font-size: 11px; color: var(--amc-white-muted); }
  .amc-table-sk [data-phone="status"] { width: 64px; }
  body.amc-has-nav .amc-selbar { bottom: calc(var(--amc-nav-tab-h, 64px) + 24px); }
  .amc-selbar { max-width: calc(100vw - 24px); padding-inline-start: 16px; } .amc-selbar .amc-btn { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .amc-row-in { transform: none; } }
/* AMC HMS — forms (locked 2026-09-25, Forms Lab). Fields are the locked controls (floating labels, outline fields, dropdowns, switches, checkboxes, segmented).
   Built by amc-form.js — amcForm(formEl, { onSubmit }). */
:root {
  --amc-form-ease: cubic-bezier(.25,.1,.25,1);   /* forms move smoothly — no bounce */
  --amc-form-layout: steps;   /* sections | steps | accordion — how a long form is split */
  --amc-form-validate: leave;    /* type | leave | save — when a mistake shows */
  --amc-form-actions: sticky;    /* end | sticky — where Save / Cancel sit */
  --amc-form-cols: 2;            /* fields per row on PC */
  --amc-form-gap: 12px;          /* between fields */
  --amc-form-sec-gap: 45px;      /* between sections — clearly apart */
  --amc-form-head-gap: 14px;     /* section title → its fields — close, so the title belongs to them */
  --amc-form-title-gap: 25px;    /* title → its small line under it */
  --amc-form-err-f: 9px;         /* error messages: red, smaller than the text */
}
.amc-form [hidden] { display: none !important; }   /* steps hide sections and buttons */
.amc-form { display: grid; gap: var(--amc-form-sec-gap); }
.amc-form-sec { display: grid; gap: var(--amc-form-head-gap); min-width: 0; }
.amc-form-sec-h { display: grid; gap: var(--amc-form-title-gap); }
.amc-form-sec-h .amc-heading { margin: 0; }
.amc-form-grid { display: grid; grid-template-columns: repeat(var(--amc-form-cols), minmax(0, 1fr)); column-gap: var(--amc-form-gap); row-gap: 0; align-items: start; }
.amc-form-wide { grid-column: 1 / -1; }
/* Every field is 4 rows shared with its neighbours (subgrid): label · control · message · space.
   So fields side by side always line up — their boxes sit on the same line even when only one has a label, a hint or an error. */
.amc-form-field { display: grid; min-width: 0; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
.amc-form-field > * { grid-row: 2; align-self: center; }
.amc-form-field > .amc-label { grid-row: 1; align-self: end; }
.amc-form-field > .amc-form-hint, .amc-form-field > .amc-form-err, .amc-form-field > .amc-form-reveal { grid-row: 3; align-self: start; }
.amc-form-field::after { content: ""; grid-row: 4; height: var(--amc-form-gap); }
.amc-form-field > .amc-label { display: block; margin: 0 0 10px; }            /* label above groups (sex, conditions, time) */
.amc-form-hint { margin-top: 7px; padding-inline-start: var(--amc-field-p); font: 400 11px/1.3 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-form-opt { font: 400 10px/1 var(--amc-font-body); color: var(--amc-white-muted); margin-inline-start: 6px; letter-spacing: 0; text-transform: none; }
/* error message: glides open under the field */
.amc-form-err { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--amc-dur-short, 300ms) var(--amc-form-ease), opacity var(--amc-dur-short, 300ms) var(--amc-form-ease); }
.amc-form-err > div { overflow: hidden; }
.amc-form-err .amc-field-msg { padding-inline-start: var(--amc-field-p); gap: .6em; font-size: var(--amc-form-err-f, 9px); color: var(--amc-critical); }
.amc-form-err .amc-status-dot { width: max(3px, .75em); height: max(3px, .75em); }
.amc-form-field.has-error .amc-form-err { grid-template-rows: 1fr; opacity: 1; }
.amc-form-field.has-error .amc-form-hint { display: none; }
.amc-form-field.has-error .amc-seg, .amc-form-field.has-error .amc-chips { box-shadow: 0 0 0 .5px var(--amc-critical); border-radius: 999px; }
/* check / radio rows */
.amc-form-checks { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.amc-form-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font: 400 13px/1 var(--amc-font-body); color: var(--amc-white-soft); }
.amc-form-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--amc-field-h); font: 400 13px/1 var(--amc-font-body); color: var(--amc-white-soft); }
/* reveal: fields that appear when a switch turns on */
.amc-form-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--amc-dur-medium, 460ms) var(--amc-form-ease), opacity var(--amc-dur-medium, 460ms) var(--amc-form-ease); }
.amc-form-reveal > div { overflow: hidden; min-height: 0; } .amc-form-reveal > div > * { margin-top: var(--amc-form-gap); }
.amc-form-reveal.is-on { grid-template-rows: 1fr; opacity: 1; }
/* chips — choose one of many (time slots) */
.amc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amc-chip { position: relative; }
.amc-chip input { position: absolute; opacity: 0; pointer-events: none; }
.amc-chip span { display: inline-grid; place-items: center; min-width: 64px; height: 34px; padding: 0 14px; box-sizing: border-box; border-radius: 999px; cursor: pointer;
  font: 400 12px/1 var(--amc-font-number); color: var(--amc-white-soft); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6); transition: background-color 300ms, color 300ms, box-shadow 300ms; }
.amc-chip input:checked + span { background: rgba(255,255,255,.92); color: #2b3a47; box-shadow: none; }
.amc-chip input:disabled + span { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.amc-chip input:focus-visible + span { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }
@media (hover: hover) { .amc-chip input:not(:checked):not(:disabled) + span:hover { background: rgba(255,255,255,.1); color: #fff; } }
/* actions */
.amc-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.amc-form-actions .amc-form-note { margin-inline-end: auto; font: 400 var(--amc-form-err-f, 9px)/1.3 var(--amc-font-body); color: var(--amc-critical); }
.amc-form-actions.is-sticky { position: sticky; bottom: 16px; z-index: 5; padding: 10px 10px 10px 22px; border-radius: 999px; }
[dir="rtl"] .amc-form-actions.is-sticky { padding: 10px 22px 10px 10px; }
.amc-form-actions.is-sticky.amc-glass { background: var(--amc-glass-tint); }
/* steps */
.amc-form-steps { display: grid; gap: 14px; }
.amc-form-steps ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.amc-form-step { all: unset; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 6px; border-radius: 999px; cursor: pointer; font: 400 12px/1 var(--amc-font-body); color: var(--amc-white-muted); transition: color 300ms, background-color 300ms; }
[dir="rtl"] .amc-form-step { padding: 0 6px 0 14px; }
.amc-form-step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 500 11px/1 var(--amc-font-number); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6); transition: background-color 300ms, color 300ms; }
.amc-form-step[aria-current="step"] { color: #fff; background: rgba(255,255,255,.12); }
.amc-form-step[aria-current="step"] i, .amc-form-step.is-done i { background: rgba(255,255,255,.92); color: #2b3a47; box-shadow: none; }
.amc-form-step.has-error i { background: var(--amc-critical); color: #fff; box-shadow: none; }
.amc-form-step:focus-visible { outline: 2px solid rgba(255,255,255,.9); }
.amc-form-body { position: relative; display: grid; gap: var(--amc-form-sec-gap); }
.is-accordion .amc-form-body { gap: 0; }
.amc-form-field .amc-seg { width: 100%; box-sizing: border-box; }
.amc-form-body.is-gliding { overflow-x: visible; overflow-y: clip; transition: height var(--amc-dur-medium, 460ms) var(--amc-form-ease); }
.amc-form-sec.is-leaving { opacity: 0; transform: translateX(calc(-10px * var(--amc-form-dir, 1))); transition: opacity var(--amc-dur-short, 300ms) var(--amc-form-ease), transform var(--amc-dur-short, 300ms) var(--amc-form-ease); }
.amc-form-sec.is-entering { opacity: 0; transform: translateX(calc(10px * var(--amc-form-dir, 1))); }
.amc-form-sec.is-in { transition: opacity var(--amc-dur-medium, 460ms) var(--amc-form-ease), transform var(--amc-dur-medium, 460ms) var(--amc-form-ease); }
[dir="rtl"] .amc-form-sec.is-leaving { transform: translateX(calc(10px * var(--amc-form-dir, 1))); }
[dir="rtl"] .amc-form-sec.is-entering { transform: translateX(calc(-10px * var(--amc-form-dir, 1))); }
/* accordion */
.amc-form-acc-h { all: unset; box-sizing: border-box; width: 100%; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; border-radius: 16px; }
.amc-form-acc-h:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 4px; }
.amc-form-acc-h .amc-icon { width: 18px; height: 18px; transition: transform var(--amc-dur-medium, 460ms) var(--amc-form-ease); }
.amc-form-sec.is-open .amc-form-acc-h .amc-icon { transform: rotate(180deg); }
.amc-form-acc-state { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; font: 400 11px/1 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-form-acc-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--amc-dur-medium, 460ms) var(--amc-form-ease); }
.amc-form-acc-b > div { overflow: hidden; min-height: 0; }
.amc-form-acc-b > div > .amc-form-grid { padding: 4px 0 var(--amc-space-block); transition: opacity var(--amc-dur-medium, 460ms) var(--amc-form-ease); opacity: 0; }
.amc-form-sec.is-open .amc-form-acc-b { grid-template-rows: 1fr; } .amc-form-sec.is-open .amc-form-acc-b > div > .amc-form-grid { opacity: 1; }
.amc-form-acc-sep { height: .5px; background: rgba(255,255,255,.2); }
input[type="date"].amc-input { color-scheme: dark; }
@media (max-width: 700px) {
  .amc-form-grid { grid-template-columns: 1fr; }
  .amc-form-step span { display: none; } .amc-form-step { padding: 0 5px; } .amc-form-step[aria-current="step"] span { display: inline; } .amc-form-step[aria-current="step"] { padding: 0 14px 0 6px; }
  .amc-form-actions.is-sticky { bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .amc-form-sec.is-leaving, .amc-form-sec.is-entering { transform: none; } }
/* AMC HMS — search (locked 2026-09-25, Search Lab; moved into the top bar: Shell Lab, locked 7 Oct 2026). On PC: the field in the middle of the top bar; phone: a search button in the top bar. Finds patients, doctors & staff, appointments & rooms, pages & actions.
   Behaviour: amc-search.js — amcSearch({ items, onPick }). Opens on the top layer, same glass as the dropdowns. Ctrl K (or /) opens it from anywhere. */
:root {
  --amc-search-place: top;       /* popup | top | side — where search lives on PC (top = the field in the top bar) */
  --amc-search-results: grouped;  /* grouped | mixed — how results show */
  --amc-search-empty: recent-actions;   /* recent | nothing | recent-actions — what shows before typing */
  --amc-search-w: 600px;          /* width of the pop-up (popup + side) */
  --amc-search-per-group: 4;      /* results per group (mixed: 3× this) */
  --amc-search-max-h: 460px;      /* results scroll inside after this */
  --amc-search-curve: cubic-bezier(.2,.8,.2,1);   /* no bounce */
}

/* ---- the field in the page head (top) and the buttons that open search ---- */
.amc-search-slot { min-width: 0; }
.amc-search-field { position: relative; width: 100%; max-width: 520px; min-height: var(--amc-field-h); }   /* keeps its height while its input is in the pop-up, so nothing drops */
.amc-search-field .amc-input { padding-inline-start: calc(var(--amc-field-p) + 28px); padding-inline-end: 72px; }
.amc-search-field > .amc-icon, .amc-search-head > .amc-icon { position: absolute; top: 50%; inset-inline-start: var(--amc-field-p); transform: translateY(-50%); width: 18px; height: 18px; color: var(--amc-white-soft); pointer-events: none; }
.amc-search-field.is-away > :not(.amc-kbd) { visibility: hidden; }   /* the field is inside the pop-up while it is open */
.amc-search-field .amc-kbd { transition: opacity 300ms var(--amc-search-curve); } .amc-search-field.is-away > .amc-kbd { opacity: 0; }   /* the Ctrl K hint fades */
[dir="rtl"] .amc-search-field .amc-kbd { inset-inline-end: auto; left: 12px; }   /* the hint is drawn left-to-right, so in Arabic it is placed on the left by hand */
.amc-kbd { position: absolute; top: 50%; inset-inline-end: 12px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 3px; pointer-events: none;
  font: 400 10px/1 var(--amc-font-body); letter-spacing: .04em; color: var(--amc-white-muted); direction: ltr; }
.amc-kbd b { font-weight: 400; padding: 3px 5px; border-radius: 5px; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45); }
.amc-search-open { display: inline-flex; align-items: center; gap: 10px; }
.amc-search-open .amc-kbd { position: static; transform: none; margin-inline-start: 6px; }
.amc-nav-item.amc-nav-search .amc-kbd { position: static; transform: none; margin-inline-start: auto; transition: opacity 280ms var(--amc-search-curve); }
.amc-side:not(.is-open) .amc-nav-search .amc-kbd { opacity: 0; }

/* ---- the pop-up (top layer) ---- */
.amc-search-back { position: fixed; inset: 0; background: rgba(20,35,50,.16); opacity: 0; transition: opacity 360ms var(--amc-search-curve); }
.amc-search-back.is-on { opacity: 1; }
.amc-search-pop { position: fixed; --amc-search-r: min(var(--amc-field-r), calc(var(--amc-field-h) / 2)); }
.amc-search-pop > .amc-search-glass { position: absolute; inset: 0 0 auto 0; height: var(--amc-field-h); box-sizing: border-box; border-radius: var(--amc-search-r);
  opacity: 0; transition: height 460ms var(--amc-search-curve), opacity 460ms var(--amc-search-curve); }
/* glass: amc-glass-pop (amc-glass.css) */
.amc-search-pop[data-open] > .amc-search-glass { height: calc(var(--amc-field-h) + var(--amc-search-list-h, 0px)); opacity: 1; }
.amc-search-pop.is-center > .amc-search-glass, .amc-search-pop.is-center .amc-search-head { transform: translateY(-6px); transition: height 460ms var(--amc-search-curve), opacity 460ms var(--amc-search-curve), transform 460ms var(--amc-search-curve); }
.amc-search-pop.is-center[data-open] > .amc-search-glass, .amc-search-pop.is-center[data-open] .amc-search-head { transform: none; }
.amc-search-head { position: relative; z-index: 2; height: var(--amc-field-h); }
.amc-search-head .amc-input { height: var(--amc-field-h); padding-inline-start: calc(var(--amc-field-p) + 28px); padding-inline-end: 44px; }
.amc-search-pop:not(.is-top) .amc-search-head .amc-input, .amc-search-pop.is-top[data-open] .amc-search-head .amc-input { border-color: transparent !important; background: none !important; box-shadow: none !important; }
/* top bar: the pop-up grows out of the field (width glides) and the field's outline fades into the glass, both ways */
.amc-search-pop.is-top { transition: width 460ms var(--amc-search-curve), left 460ms var(--amc-search-curve); }
.amc-search-head .amc-input::-webkit-search-cancel-button { display: none; }
.amc-search-clear { all: unset; position: absolute; top: 50%; inset-inline-end: 8px; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--amc-white-muted); opacity: 0; pointer-events: none; transition: opacity 300ms var(--amc-search-curve), background-color 300ms var(--amc-search-curve); }
.amc-search-clear.is-on { opacity: 1; pointer-events: auto; } .amc-search-clear:hover { background: rgba(255,255,255,.12); color: #fff; }
.amc-search-clear:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 1px; }
.amc-search-clear svg { width: 14px; height: 14px; }
.amc-search-busy { position: absolute; top: 50%; inset-inline-end: 40px; transform: translateY(-50%); display: none; } .amc-search-busy.is-on { display: block; }
.amc-search-busy .amc-spinner { --amc-spinner-size: 14px; }

/* results */
.amc-search-list { position: absolute; top: var(--amc-field-h); inset-inline: 0; z-index: 2; height: var(--amc-search-list-h, 0px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  box-sizing: border-box; padding: 0 6px; clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
  transition: height 460ms var(--amc-search-curve), clip-path 460ms var(--amc-search-curve), opacity 460ms var(--amc-search-curve); }
.amc-search-list::-webkit-scrollbar { display: none; }
.amc-search-pop[data-open] > .amc-search-list { clip-path: inset(0); opacity: 1; pointer-events: auto; }
.amc-search-in { padding: 2px 0 6px; }
.amc-search-in::before { content: ""; display: block; height: .5px; margin: 0 8px 6px; background: rgba(255,255,255,.28); }
.amc-search-group + .amc-search-group { margin-top: 6px; }
.amc-search-group-h { padding: 8px 12px 4px; font: 400 9px/1 var(--amc-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--amc-white-muted); }
[dir="rtl"] .amc-search-group-h { letter-spacing: 0; font-size: 10.5px; text-transform: none; }
.amc-search-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: calc(var(--amc-field-r) - 8px); cursor: pointer; color: var(--amc-white-soft); }
.amc-search-item.is-active { background: rgba(255,255,255,.12); color: #fff; }
.amc-search-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45); color: var(--amc-white-soft); }
.amc-search-ic .amc-icon { width: 16px; height: 16px; }
.amc-search-ic.is-person { background: rgba(255,255,255,.92); box-shadow: none; color: #2b3a47; font: 600 10.5px/1 var(--amc-font-body); letter-spacing: .04em; }
[dir="rtl"] .amc-search-ic.is-person { letter-spacing: 0; font-size: 12px; }
.amc-search-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.amc-search-t { font: 400 13px/1.2 var(--amc-font-body); color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.amc-search-t .amc-status-dot { width: 7px; height: 7px; }
.amc-search-s { font: 400 11px/1.2 var(--amc-font-body); color: var(--amc-white-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amc-search-s bdi, .amc-search-t bdi { unicode-bidi: isolate; }
.amc-search-hit { background: none; color: #fff; font-weight: 600; }
.amc-search-tag { flex: none; padding: 4px 8px; border-radius: 999px; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.4); font: 400 10px/1 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-search-go { flex: none; width: 14px; height: 14px; color: var(--amc-white-muted); opacity: 0; transition: opacity 200ms var(--amc-search-curve); }
.amc-search-item.is-active .amc-search-go { opacity: 1; }
[dir="rtl"] .amc-search-go { transform: scaleX(-1); }
.amc-search-none { padding: 18px 14px 16px; display: grid; gap: 6px; text-align: center; }
.amc-search-none b { font: 400 13px/1.3 var(--amc-font-body); color: #fff; } .amc-search-none span { font: 400 11px/1.4 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-search-foot { display: flex; gap: 14px; justify-content: flex-end; padding: 8px 12px 4px; font: 400 10px/1 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-search-foot span { display: inline-flex; align-items: center; gap: 5px; } .amc-search-foot .amc-kbd { position: static; transform: none; }
/* results arrive one after another (fade + small rise), never jump */
.amc-search-item, .amc-search-group-h, .amc-search-none, .amc-search-foot { animation: amc-search-in 320ms var(--amc-search-curve) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes amc-search-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .amc-search-item, .amc-search-group-h, .amc-search-none, .amc-search-foot { animation: none; } .amc-search-pop *, .amc-search-back { transition-duration: 1ms !important; } }
@media (max-width: 700px) { .amc-search-foot { display: none; } .amc-search-field { max-width: none; } .amc-kbd { display: none; } }
/* AMC HMS — tabs, tags and chips (locked 2026-09-25, Tabs Lab). Tabs: white pill that slides; content slides sideways; tabs that don't fit scroll sideways. Behaviour: amc-tabs.js.
   Tabs inside a page:
     <div class="amc-tabset" data-amc-tabs>
       <div class="amc-tabset-list" role="tablist"><button class="amc-tabset-tab" role="tab" aria-selected="true">Overview</button><button class="amc-tabset-tab" role="tab">Labs <span class="amc-count">3</span></button>…</div>
       <div class="amc-tabset-panels"><section class="amc-tabset-panel" role="tabpanel">…</section>…</div>
     </div>
   Status tag:    <span class="amc-tag"><span class="amc-status-dot amc-critical"></span>Critical</span>   (amc-stable / amc-warning / amc-critical; no class = plain white dot)
   Filter chips:  <div class="amc-fchips"><button class="amc-fchip" aria-pressed="false">ICU <span class="amc-count">4</span></button>…</div>
   Removable:     <div class="amc-rchips" data-name="allergies" data-placeholder="Add an allergy"><span class="amc-rchip">Penicillin</span>…</div>   (× and typing are added by the script) */
:root {
  --amc-tabset-style: pill;      /* pill | line | bar */
  --amc-tabset-change: slide;    /* slide | fade — how the content changes */
  --amc-tabset-narrow: scroll;   /* scroll | dropdown — when the tabs don't fit (phone, narrow cards) */
  --amc-tab-h: 41px;
  --amc-tag-h: 28px;
  --amc-chip-h: 36px;
  --amc-tabset-shift: 24px;      /* how far content slides */
  --amc-tabset-gap: 20px;        /* tabs → content */
  --amc-tabs-curve: cubic-bezier(.2,.8,.2,1);   /* no bounce */
}

/* ---------- tabs ---------- */
.amc-tabset { display: grid; gap: var(--amc-tabset-gap); min-width: 0; }
.amc-tabset-bar { position: relative; min-width: 0; }
.amc-tabset-list { position: relative; display: flex; align-items: center; gap: 2px; width: max-content; max-width: 100%; box-sizing: border-box; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; }
.amc-tabset-list::-webkit-scrollbar { display: none; }
.amc-tabset-list.is-cut-end { -webkit-mask-image: linear-gradient(to var(--amc-tabs-end, right), #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to var(--amc-tabs-end, right), #000 calc(100% - 36px), transparent); }
.amc-tabset-list.is-cut-start { -webkit-mask-image: linear-gradient(to var(--amc-tabs-end, right), transparent, #000 36px); mask-image: linear-gradient(to var(--amc-tabs-end, right), transparent, #000 36px); }
.amc-tabset-list.is-cut-start.is-cut-end { -webkit-mask-image: linear-gradient(to var(--amc-tabs-end, right), transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to var(--amc-tabs-end, right), transparent, #000 36px, #000 calc(100% - 36px), transparent); }
[dir="rtl"] .amc-tabset-list { --amc-tabs-end: left; }
.amc-tabset-tab { all: unset; position: relative; z-index: 1; flex: none; box-sizing: border-box; height: var(--amc-tab-h); padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
  border-radius: 999px; font: 400 13px/1 var(--amc-font-body); letter-spacing: .01em; color: var(--amc-white-soft); transition: color 460ms var(--amc-tabs-curve); }
[dir="rtl"] .amc-tabset-tab { letter-spacing: 0; }
.amc-tabset-tab:hover { color: #fff; }
.amc-tabset-tab:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: -2px; }
.amc-tabset-mark { position: absolute; z-index: 0; left: 0; top: 0; width: 0; pointer-events: none; transition: transform 460ms var(--amc-tabs-curve), width 460ms var(--amc-tabs-curve); }
.amc-tabset.no-anim .amc-tabset-mark { transition: none; }
/* pill — white pill slides under the chosen tab (like the segmented control) */
.amc-tabset.is-pill .amc-tabset-list { padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 2px rgba(20,35,50,.15), inset 0 0 0 .5px rgba(255,255,255,.25); }
.amc-tabset.is-pill .amc-tabset-tab { height: calc(var(--amc-tab-h) - 8px); padding: 0 16px; }
.amc-tabset.is-pill .amc-tabset-mark { top: 4px; height: calc(var(--amc-tab-h) - 8px); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(20,35,50,.15); }
.amc-tabset.is-pill .amc-tabset-tab[aria-selected="true"] { color: #2b3a47; }
/* line — plain words, a thin white line slides under the chosen one */
.amc-tabset.is-line .amc-tabset-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .5px; background: rgba(255,255,255,.3); }
.amc-tabset.is-line .amc-tabset-list { gap: 6px; }
.amc-tabset.is-line .amc-tabset-tab { padding: 0 6px; border-radius: 6px; color: var(--amc-white-muted); }
.amc-tabset.is-line .amc-tabset-tab:hover, .amc-tabset.is-line .amc-tabset-tab[aria-selected="true"] { color: #fff; }
.amc-tabset.is-line .amc-tabset-mark { top: auto; bottom: 0; height: 1.5px; border-radius: 2px; background: #fff; }
/* bar — tabs sit in a glass strip, the chosen one is lighter */
.amc-tabset.is-bar .amc-tabset-list { padding: 4px; border-radius: 999px; }
.amc-tabset.is-bar .amc-tabset-tab { height: calc(var(--amc-tab-h) - 8px); padding: 0 16px; }
.amc-tabset.is-bar .amc-tabset-mark { top: 4px; height: calc(var(--amc-tab-h) - 8px); border-radius: 999px; background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.55), inset 0 1px 0 rgba(255,255,255,.35); }
.amc-tabset.is-bar .amc-tabset-tab[aria-selected="true"] { color: #fff; }
/* when the tabs don't fit and the page chose a dropdown */
.amc-tabset-drop { display: none; max-width: 320px; }
.amc-tabset.is-drop .amc-tabset-list { visibility: hidden; position: absolute; inset-inline-start: 0; top: 0; pointer-events: none; }
.amc-tabset.is-drop .amc-tabset-drop { display: block; }
.amc-tabset.is-line.is-drop .amc-tabset-bar::after { display: none; }
/* content */
.amc-tabset-panels { position: relative; min-width: 0; }
.amc-tabset-panels.is-gliding { overflow: clip; overflow-clip-margin: 24px; transition: height 460ms var(--amc-tabs-curve); }
.amc-tabset-panel { min-width: 0; }
.amc-tabset-panel[hidden] { display: none !important; }
.amc-tabset-panel.is-out { opacity: 0; transform: translateX(calc(var(--amc-tabset-shift) * var(--amc-tab-dir, 1) * -1)); transition: opacity 180ms var(--amc-tabs-curve), transform 180ms var(--amc-tabs-curve); }
.amc-tabset-panel.is-in-start { opacity: 0; transform: translateX(calc(var(--amc-tabset-shift) * var(--amc-tab-dir, 1))); }
.amc-tabset-panel.is-in { opacity: 1; transform: none; transition: opacity 320ms var(--amc-tabs-curve), transform 360ms var(--amc-tabs-curve); }
.amc-tabset.is-fade .amc-tabset-panel.is-out, .amc-tabset.is-fade .amc-tabset-panel.is-in-start { transform: none; }

/* ---------- counts (on tabs, chips) ---------- */
.amc-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: rgba(255,255,255,.18);
  font: 400 10.5px/1 var(--amc-font-number); color: #fff; transition: background-color 460ms var(--amc-tabs-curve), color 460ms var(--amc-tabs-curve); }
.amc-count.amc-odometer { display: inline-flex; justify-content: center; align-items: center; height: 18px; line-height: 18px; }   /* a count that rolls (amcMotion.number) stays on one line */
.amc-count.amc-critical, .amc-count.amc-warning { background: var(--amc-status); color: #fff; }
.amc-tabset.is-pill .amc-tabset-tab[aria-selected="true"] .amc-count:not(.amc-critical):not(.amc-warning), .amc-fchip[aria-pressed="true"] .amc-count:not(.amc-critical):not(.amc-warning) { background: rgba(43,58,71,.12); color: #2b3a47; }

/* ---------- status tag: dot + white word ---------- */
.amc-tag { display: inline-flex; align-items: center; gap: 7px; height: var(--amc-tag-h); padding: 0 10px; box-sizing: border-box; border-radius: 999px; white-space: nowrap; vertical-align: middle;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45); font: 400 11px/1 var(--amc-font-body); letter-spacing: .02em; color: #fff; }
[dir="rtl"] .amc-tag { letter-spacing: 0; font-size: 12px; }
.amc-tag .amc-status-dot { width: 7px; height: 7px; }
.amc-tag .amc-status-dot:not([class*="amc-critical"]):not([class*="amc-warning"]):not([class*="amc-stable"]) { background: rgba(255,255,255,.7); }
.amc-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- filter chips: on / off ---------- */
.amc-fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.amc-fchip { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; height: var(--amc-chip-h); padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6); font: 400 12px/1 var(--amc-font-body); color: var(--amc-white-soft);
  transition: background-color 460ms var(--amc-tabs-curve), color 460ms var(--amc-tabs-curve), box-shadow 460ms var(--amc-tabs-curve); }
.amc-fchip[aria-pressed="true"] { background: rgba(255,255,255,.92); color: #2b3a47; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.92); }
@media (hover: hover) { .amc-fchip[aria-pressed="false"]:hover { background: rgba(255,255,255,.1); color: #fff; } }
.amc-fchip:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }

/* ---------- removable chips (+ type to add) ---------- */
.amc-rchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: var(--amc-field-h, 40px); padding: 5px; box-sizing: border-box; border-radius: calc(var(--amc-chip-h) / 2 + 5px);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.8); transition: box-shadow 460ms var(--amc-tabs-curve); cursor: text; }
.amc-rchips:focus-within { box-shadow: inset 0 0 0 .5px #fff, 0 0 6px rgba(255,255,255,.25); }
.amc-rchip { display: inline-flex; align-items: center; gap: 4px; height: calc(var(--amc-chip-h) - 4px); padding-inline: 12px 4px; box-sizing: border-box; border-radius: 999px; white-space: nowrap; overflow: hidden;
  background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.4); font: 400 12px/1 var(--amc-font-body); color: #fff; }
.amc-rchip-x { all: unset; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--amc-white-muted); transition: background-color 300ms var(--amc-tabs-curve), color 300ms var(--amc-tabs-curve); }
.amc-rchip-x:hover, .amc-rchip-x:focus-visible { background: rgba(255,255,255,.18); color: #fff; outline: none; }
.amc-rchip-x svg { width: 12px; height: 12px; }
.amc-rchips-input { all: unset; flex: 1 1 120px; min-width: 100px; height: calc(var(--amc-chip-h) - 4px); padding: 0 8px; font: 300 var(--amc-field-f, 13px)/1 var(--amc-font-body); color: #fff; }
.amc-rchips-input::placeholder { color: rgba(255,255,255,.45); }
.amc-rchip.is-new { animation: amc-chip-in 360ms var(--amc-tabs-curve) both; }
@keyframes amc-chip-in { from { opacity: 0; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { .amc-tabset-mark, .amc-tabset-panels.is-gliding, .amc-tabset-panel.is-out, .amc-tabset-panel.is-in { transition: none !important; } .amc-rchip.is-new { animation: none; } }
/* AMC HMS — empty & error states (locked 2026-09-25, States Lab). Icon + words; offline shows a bar at the top. Behaviour: amc-states.js.
   amcState(host, { kind, title, text, action, onRetry })   kind: 'empty' | 'none' | 'error' | 'offline' | 'notfound' | 'denied'
     empty  = nothing here yet        none = a search / filter found nothing        error = couldn't load (Try again)
     notfound / denied = a whole page (wrong link / not allowed) — host is the page's .amc-page
   Offline: handled by amcOffline by itself — a bar at the top and/or a note inside each card that has data-amc-net. */
:root {
  --amc-state-look: icon;        /* icon | words */
  --amc-offline: bar;            /* bar | card | both */
  --amc-state-ic: 56px;          /* icon circle */
  --amc-state-gap: 2px;          /* between title and line */
  --amc-state-pad: 34px;         /* space above and below a state inside a card */
  --amc-states-curve: cubic-bezier(.2,.8,.2,1);
}

/* ---------- a state inside a card (empty, no results, couldn't load, offline) ---------- */
.amc-state { display: grid; justify-items: center; text-align: center; padding: var(--amc-state-pad) 16px; box-sizing: border-box; }
.amc-state-ic { width: var(--amc-state-ic); height: var(--amc-state-ic); border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.5); background: rgba(255,255,255,.08); color: var(--amc-white-soft); }
.amc-state-ic .amc-icon { width: calc(var(--amc-state-ic) * .43); height: calc(var(--amc-state-ic) * .43); }
.amc-state.is-words .amc-state-ic { display: none; }
.amc-state-t { font: 300 17.7px/1.25 var(--amc-font-title); letter-spacing: -.02em; color: #fff; margin: 0; }
[dir="rtl"] .amc-state-t { letter-spacing: 0; font-size: 19px; font-weight: 250; }
.amc-state-s { font: 400 12.5px/1.5 var(--amc-font-body); color: var(--amc-white-muted); margin: var(--amc-state-gap) 0 0; max-width: 42ch; }
.amc-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.amc-state-actions:empty { display: none; }
.amc-state .amc-status-dot { width: 7px; height: 7px; }
.amc-state-s .amc-status-dot { display: inline-block; margin-inline-end: 7px; vertical-align: 1px; }

/* ---------- whole page: not found / no access ---------- */
.amc-state.is-page { min-height: min(70vh, 620px); align-content: center; padding-block: 48px; }
.amc-state.is-page { --amc-state-ic: calc(var(--amc-state-ic-page, 76px)); }
.amc-state.is-page .amc-state-t { font-size: 30px; font-weight: 300; letter-spacing: -.046em; }
[dir="rtl"] .amc-state.is-page .amc-state-t { letter-spacing: 0; font-weight: 250; }
.amc-state.is-page .amc-state-s { font-size: 13.5px; }
.amc-state-code { font: 400 11px/1 var(--amc-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--amc-white-muted); margin-bottom: 14px; }
[dir="rtl"] .amc-state-code { letter-spacing: 0; text-transform: none; font-size: 12px; }

/* states arrive softly */
.amc-state > * { animation: amc-state-in 460ms var(--amc-states-curve) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes amc-state-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- offline bar (top of the screen) ---------- */
.amc-netbar { position: fixed; top: 14px; left: 50%; z-index: 1060; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 10px 16px; border-radius: 999px; font: 400 12.5px/1.3 var(--amc-font-body); color: #fff; pointer-events: none;
  opacity: 0; transform: translate(-50%, -14px); transition: opacity 460ms var(--amc-states-curve), transform 460ms var(--amc-states-curve); }
.amc-netbar.amc-glass { background: var(--amc-glass-tint); }
.amc-netbar.is-on { opacity: 1; transform: translate(-50%, 0); }
.amc-netbar .amc-icon { width: 18px; height: 18px; flex: none; }
.amc-netbar span { min-width: 0; }
.amc-netbar-t { transition: opacity 240ms var(--amc-states-curve); }

/* ---------- offline note inside a card (cards with data-amc-net) ---------- */
.amc-netnote { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 460ms var(--amc-states-curve), opacity 460ms var(--amc-states-curve), margin 460ms var(--amc-states-curve); opacity: 0; }
.amc-netnote > div { overflow: hidden; }
.amc-netnote-in { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45); background: rgba(255,255,255,.08);
  font: 400 12px/1.35 var(--amc-font-body); color: #fff; }
.amc-netnote-in .amc-icon { width: 16px; height: 16px; flex: none; color: var(--amc-white-soft); }
.amc-netnote-in small { margin-inline-start: auto; font-size: 11px; color: var(--amc-white-muted); white-space: nowrap; }
.amc-netnote.is-on { grid-template-rows: 1fr; opacity: 1; margin-bottom: 14px; }
[data-amc-net] .amc-net-dim { transition: opacity 460ms var(--amc-states-curve); }
[data-amc-net].is-offline .amc-net-dim { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .amc-state > * { animation: none; } .amc-netbar, .amc-netnote { transition-duration: 1ms; } }
@media (max-width: 700px) { .amc-netbar { top: 10px; font-size: 12px; } .amc-state.is-page .amc-state-t { font-size: 24px; } }
/* AMC HMS — file upload (locked 2026-09-26, Upload Lab). Big drop box; files as a list with progress; phone: Take photo + Choose file. Behaviour: amc-upload.js — amcUpload(host, { name, accept, maxMB, upload }).
   Scans & X-rays (images, DICOM .dcm), lab PDFs & reports, ID / insurance photos, any document. */
:root {
  --amc-upload-look: box;        /* box | button — a big drop box, or just an "Add file" button (dropping on the card still works) */
  --amc-upload-list: rows;       /* rows | grid — a list with progress, or square previews */
  --amc-upload-phone: two;       /* two | one — phone: "Take photo" + "Choose file", or one button */
  --amc-upload-thumb: 96px;      /* square preview (grid) */
  --amc-upload-curve: cubic-bezier(.2,.8,.2,1);
}
.amc-upload { display: grid; gap: 14px; min-width: 0; position: relative; }
.amc-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* drop box */
.amc-upload-drop { position: relative; display: grid; justify-items: center; gap: 8px; padding: 26px 16px; border-radius: 22px; text-align: center; cursor: pointer;
  border: 1px dashed rgba(255,255,255,.55); background: rgba(255,255,255,.05);
  transition: border-color 300ms var(--amc-upload-curve), background-color 300ms var(--amc-upload-curve), transform 300ms var(--amc-upload-curve); }
.amc-upload-drop:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.8); }
.amc-upload-drop:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
.amc-upload-drop .amc-icon { width: 26px; height: 26px; color: var(--amc-white-soft); }
.amc-upload-drop b { font: 400 13.5px/1.3 var(--amc-font-body); color: #fff; }
.amc-upload-drop span { font: 400 11.5px/1.4 var(--amc-font-body); color: var(--amc-white-muted); }
.amc-upload-drop u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: .5px; }
.amc-upload-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.amc-upload-btns .amc-icon { width: 16px; height: 16px; }
.amc-upload-hint { font: 400 11px/1.4 var(--amc-font-body); color: var(--amc-white-muted); }
/* dragging files over the card / box */
.amc-upload.is-over .amc-upload-drop { border-style: solid; border-color: #fff; background: rgba(255,255,255,.14); transform: scale(1.01); }
.amc-upload-over { position: absolute; inset: -8px; z-index: 5; border-radius: 22px; display: grid; place-items: center; pointer-events: none; opacity: 0;
  border: 1px solid #fff; background: rgba(255,255,255,.14); font: 400 13px/1 var(--amc-font-body); color: #fff; transition: opacity 300ms var(--amc-upload-curve); }
.amc-upload.is-button.is-over .amc-upload-over { opacity: 1; }

/* the files — rows */
.amc-upload-files { display: grid; gap: 6px; }
.amc-upload-files:empty { display: none; }
.amc-upload-file { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 16px; background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.25); overflow: hidden; }
.amc-upload-file.is-new { animation: amc-up-in 420ms var(--amc-upload-curve) both; }
@keyframes amc-up-in { from { opacity: 0; transform: translateY(6px); } }
.amc-upload-th { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.1); color: var(--amc-white-soft); position: relative; }
.amc-upload-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amc-upload-th .amc-icon { width: 20px; height: 20px; }
.amc-upload-badge { position: absolute; inset-inline-end: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,35,50,.55); color: #fff; }
.amc-upload-badge .amc-icon { width: 10px !important; height: 10px !important; }
.amc-upload.is-grid .amc-upload-badge { width: 24px; height: 24px; inset-inline-end: 6px; bottom: 6px; } .amc-upload.is-grid .amc-upload-badge .amc-icon { width: 14px !important; height: 14px !important; }
.amc-upload-th small { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font: 600 7.5px/1 var(--amc-font-body); letter-spacing: .06em; color: #fff; }
.amc-upload-tx { min-width: 0; display: grid; gap: 5px; }
.amc-upload-name { font: 400 12.5px/1.2 var(--amc-font-body); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amc-upload-meta { display: flex; align-items: center; gap: 8px; font: 400 11px/1.2 var(--amc-font-body); color: var(--amc-white-muted); min-width: 0; }
.amc-upload-meta .amc-progress { flex: 1; max-width: 220px; }
.amc-upload-meta .amc-icon { width: 14px; height: 14px; flex: none; }
.amc-upload-meta .amc-status-dot { width: 7px; height: 7px; }
.amc-upload-act { display: flex; gap: 4px; align-items: center; }
.amc-upload-x, .amc-upload-retry { all: unset; box-sizing: border-box; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  font: 400 11.5px/1 var(--amc-font-body); color: var(--amc-white-soft); transition: background-color 300ms var(--amc-upload-curve), color 300ms var(--amc-upload-curve); }
.amc-upload-x:hover, .amc-upload-retry:hover, .amc-upload-x:focus-visible, .amc-upload-retry:focus-visible { background: rgba(255,255,255,.14); color: #fff; outline: none; }
.amc-upload-x svg { width: 12px; height: 12px; }
.amc-upload-retry { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.5); }
.amc-upload-file.is-leaving { animation: amc-up-out 320ms var(--amc-upload-curve) forwards; }
@keyframes amc-up-out { to { opacity: 0; transform: translateX(calc(12px * var(--amc-dir, 1))); } }

/* the files — square previews */
.amc-upload.is-grid .amc-upload-files { grid-template-columns: repeat(auto-fill, var(--amc-upload-thumb)); gap: 10px; }
.amc-upload.is-grid .amc-upload-file { grid-template-columns: 1fr; grid-template-rows: var(--amc-upload-thumb) auto; padding: 0; gap: 6px; background: none; box-shadow: none; overflow: visible; position: relative; }
.amc-upload.is-grid .amc-upload-th { width: var(--amc-upload-thumb); height: var(--amc-upload-thumb); border-radius: 16px; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3); }
.amc-upload.is-grid .amc-upload-th .amc-icon { width: 28px; height: 28px; }
.amc-upload.is-grid .amc-upload-th small { bottom: 10px; font-size: 9px; }
.amc-upload.is-grid .amc-upload-meta .amc-progress, .amc-upload.is-grid .amc-upload-meta > span:not(.amc-status-dot):not(.amc-upload-err) { display: none; }
.amc-upload.is-grid .amc-upload-name { font-size: 11px; }
.amc-upload.is-grid .amc-upload-act { position: absolute; top: 4px; inset-inline-end: 4px; }
.amc-upload.is-grid .amc-upload-x { background: rgba(20,35,50,.35); color: #fff; height: 26px; min-width: 26px; padding: 0; }
.amc-upload.is-grid .amc-upload-retry { position: absolute; top: 34px; inset-inline-end: 0; background: rgba(20,35,50,.35); }
.amc-upload-ring { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,35,50,.28); transition: opacity 400ms var(--amc-upload-curve); }
.amc-upload-ring svg { width: 40%; height: 40%; transform: rotate(-90deg); }
[dir="rtl"] .amc-upload-ring svg { transform: rotate(-90deg) scaleY(-1); }
.amc-upload-ring circle { fill: none; stroke-width: 3; }
.amc-upload-ring .t { stroke: rgba(255,255,255,.25); } .amc-upload-ring .a { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .35s var(--amc-upload-curve); }
.amc-upload-file.is-done .amc-upload-ring, .amc-upload-file.is-error .amc-upload-ring { opacity: 0; }
.amc-upload:not(.is-grid) .amc-upload-ring { display: none; }
.amc-upload-err { color: #fff; }
@media (prefers-reduced-motion: reduce) { .amc-upload-file.is-new, .amc-upload-file.is-leaving { animation-duration: 1ms; } }
/* AMC HMS — tooltips (locked 2026-09-26, Tooltips Lab). Hover anything with help (PC), tap ⓘ (phone); 0.3s wait; title / number / link when there is one. Behaviour: amc-tip.js — nothing to call.
   Any element:   data-amc-tip="Beds ready for a new patient now"
   Richer help:   data-amc-tip="Beds in use across all wards" data-amc-tip-title="Occupancy" data-amc-tip-value="212 of 244 beds" data-amc-tip-link="See beds|#beds"
   Help icon:     <button class="amc-info" data-amc-tip="…"></button>   (the ⓘ is drawn by the script; tap it on the phone)
   Glass: the pop-up glass pack (amc-glass-pop). */
:root {
  --amc-tip-trigger: hover;    /* hover | info — hover anything with help (PC) + tap ⓘ (phone), or help only behind ⓘ */
  --amc-tip-delay: 300ms;      /* wait before it shows on hover */
  --amc-tip-content: rich;     /* short | rich — text only, or title + text + a number / link */
  --amc-tip-w: 220px;          /* widest a tooltip gets */
  --amc-tip-curve: cubic-bezier(.2,.8,.2,1);
}
.amc-tip { position: fixed; z-index: 1040; top: 0; left: 0; max-width: min(var(--amc-tip-w), calc(100vw - 24px)); box-sizing: border-box; padding: 9px 12px; border-radius: 14px;
  display: grid; gap: 5px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 220ms var(--amc-tip-curve), transform 220ms var(--amc-tip-curve);
  font: 400 12px/1.4 var(--amc-font-body); color: #fff; }
.amc-tip.is-below { transform: translateY(-4px); }
.amc-tip.is-on { opacity: 1; transform: none; }
.amc-tip.has-link { pointer-events: auto; }
.amc-tip-t { font: 500 12.5px/1.25 var(--amc-font-body); color: #fff; }
.amc-tip-s { color: var(--amc-white-soft); }
.amc-tip-v { font: 300 18px/1.1 var(--amc-font-number); color: #fff; }
.amc-tip-a { justify-self: start; font-size: 11.5px; }
.amc-tip.is-short .amc-tip-t, .amc-tip.is-short .amc-tip-v, .amc-tip.is-short .amc-tip-a { display: none; }
.amc-tip.is-short .amc-tip-s { color: #fff; }
/* the ⓘ */
.amc-info { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; cursor: help;
  color: var(--amc-white-muted); transition: color 300ms var(--amc-tip-curve), background-color 300ms var(--amc-tip-curve); }
.amc-info:hover, .amc-info:focus-visible, .amc-info[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.14); outline: none; }
.amc-info .amc-icon { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .amc-tip { transition-duration: 1ms; } }
/* AMC HMS — locked top bar (Shell Lab, locked 7 Oct 2026). Behaviour: amc-topbar.js — amcTopbar({ … }).
   One glass bar across the top on every page, next to the side bar. Start: AMC HMS · branch code · language. Middle: search. End: system status (only while something is not working),
   tasks, notifications, Christina, the signed-in person.
   Glass, type, buttons, badge, avatar, menus and search all come from their packs — this file only places them. */
:root {
  --amc-topbar-h: 60px;           /* bar height */
  --amc-topbar-r: 36px;           /* corners (anything over half the height = full pill) */
  --amc-topbar-pad: 8px;          /* inside the bar, start and end */
  --amc-topbar-gap: 10px;         /* between things in the bar */
  --amc-topbar-search-w: 420px;   /* search field */
  --amc-topbar-glass: normal;     /* normal | tinted (whiter, like the open side bar) */
  --amc-topbar-brand: on;         /* on | off — "AMC HMS" at the start of the bar */
}

/* Place: beside the folded side bar, the same distance from the screen edge as the side bar */
.amc-topbar { position: fixed; z-index: 850; top: var(--amc-nav-inset); inset-inline-start: calc(var(--amc-nav-w-icons) + var(--amc-nav-inset) * 2); inset-inline-end: var(--amc-nav-inset);
  height: var(--amc-topbar-h); box-sizing: border-box; padding: 0 var(--amc-topbar-pad); border-radius: var(--amc-topbar-r);
  display: flex; align-items: center; gap: var(--amc-topbar-gap); overflow: visible; }
.amc-topbar.amc-glass { overflow: visible; }
.amc-topbar.is-tinted.amc-glass { background: var(--amc-glass-tint); }
.amc-topbar { --amc-refraction-split: 0.15; }   /* same edge as the side bar */
body.amc-has-topbar { padding-top: calc(var(--amc-topbar-h) + var(--amc-nav-inset)); }

.amc-topbar-start, .amc-topbar-end { display: flex; align-items: center; gap: var(--amc-topbar-gap); min-width: 0; }
.amc-topbar-start { flex: 0 0 auto; }                 /* start and end keep their size; search gives way */
.amc-topbar-end { flex: 0 0 auto; justify-content: flex-end; }   /* the buttons never get squeezed */
.amc-topbar-end > *, .amc-topbar-start > .amc-topbar-brand { flex: none; }
.amc-topbar-mid { flex: 1 1 var(--amc-topbar-search-w); max-width: var(--amc-topbar-search-w); min-width: 140px; margin-inline: auto; }   /* search sits in the middle and gives way when room runs out */
.amc-topbar-mid .amc-search-field { max-width: none; }

/* AMC HMS — words only, the same title font as the side bar logo */
.amc-topbar-brand { display: inline-flex; align-items: baseline; gap: 6px; padding-inline: 10px 4px; white-space: nowrap; font: 500 15px/1 var(--amc-font-title); letter-spacing: .14em; color: #fff; }
.amc-topbar-brand span { font-weight: 300; color: var(--amc-white-muted); }
.amc-topbar.no-brand .amc-topbar-brand { display: none; }
[dir="rtl"] .amc-topbar-brand { letter-spacing: .14em; }   /* Latin letters, kept as they are */

/* Branch — a ghost button when the person may switch, plain words when not */
.amc-topbar-branch { min-width: 0; } .amc-topbar-branch span { overflow: hidden; text-overflow: ellipsis; }
.amc-topbar-branch .amc-icon:last-child { width: 14px; height: 14px; opacity: .7; }
.amc-topbar-branch-slot { min-width: 0; display: flex; }
.amc-topbar-place { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding-inline: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--amc-white-soft); font: 400 12px/1 var(--amc-font-body); }
.amc-topbar-place .amc-icon { width: 18px; height: 18px; flex: none; }

/* System status — only while something is wrong; it stays until it is fixed. It opens and closes smoothly (the motion pack):
   its width glides, so the search beside it narrows and widens with it — nothing jumps. */
.amc-topbar-status-wrap { flex: none; display: flex; overflow: hidden; width: 0; opacity: 0; margin-inline-end: calc(var(--amc-topbar-gap) * -1);
  transition: width var(--amc-dur-medium) var(--amc-ease), opacity var(--amc-dur-medium) var(--amc-ease), margin var(--amc-dur-medium) var(--amc-ease); }
.amc-topbar-status-wrap.is-on { opacity: 1; margin-inline-end: 0; }
.amc-topbar-status { flex: none; white-space: nowrap; max-width: 280px; } .amc-topbar-status > span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* Language: one button beside the branch, in the other language's own words */
.amc-topbar-lang { flex: none; } .amc-topbar-lang-short { display: none; }

/* Tasks: the same round button and badge as the bell */
.amc-topbar-tasks { position: relative; }

/* The signed-in person: avatar + name (the side bar's avatar and name styles) */
.amc-topbar-user { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 40px; padding-block: 3px; padding-inline: 3px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-width: 0; }
.amc-topbar-user .amc-who-name { opacity: 1; }
.amc-topbar-user.is-static { cursor: default; }
.amc-topbar-user:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .amc-topbar-user:not(.is-static):hover { background: rgba(255,255,255,.08); } }

/* Christina sits in its own slot when she lives in the bar */
.amc-topbar-christina { display: contents; }

/* Compact desktop: the middle gives way first, the name next */
@media (max-width: 1100px) { .amc-topbar-status { max-width: 200px; } .amc-topbar-user .amc-who-name { display: none; } .amc-topbar-user { padding-inline: 3px; } }

/* Phone: full width at the top; the side bar becomes the bottom tab bar */
@media (max-width: 700px) {
  .amc-topbar { top: 12px; inset-inline: 12px; --amc-topbar-pad: 6px; gap: 6px; }
  .amc-topbar-mid { min-width: 0; } .amc-topbar-start { flex: none; }
  body.amc-has-topbar { padding-top: calc(var(--amc-topbar-h) + 12px); }
  .amc-topbar-brand, .amc-topbar-branch .amc-icon, .amc-topbar-place .amc-icon, .amc-topbar-tasks { display: none; }   /* phone: the branch is just its code */
  .amc-topbar-branch { padding: 0 12px; }
  .amc-topbar-status > span:last-child { display: none; }   /* phone: the status shows as its dot; tap it for the words */
  .amc-menu-item.is-phone-only { display: flex; }
  .amc-topbar-lang { width: 40px; padding: 0; } .amc-topbar-lang-long { display: none; } .amc-topbar-lang-short { display: inline; }   /* phone: ع / EN */
}
.amc-menu-item.is-phone-only { display: none; }   /* Log out lives in the side bar on PC; the phone has no side bar, so it stays in this menu there */   /* AMC HMS — scrolling (Spine Lab, 26 Sept 2026). No scroll bars anywhere — the page and every scrolling panel.
   When there is more below, a chevron bounces softly at the bottom; tap it to move down. It fades when the bottom is reached. No chevron at the top.
   The chevron is the dropdown arrow (solar:alt-arrow-down-linear) on its own — no pill, no glass. Behaviour: amc-scroll.js — nothing to call. */
:root {
  --amc-scroll-more-size: 34px;   /* tap area around the chevron */
  --amc-scroll-icon: 22px;        /* the chevron itself */
  --amc-scroll-bounce: 6px;       /* how far it bounces */
  --amc-scroll-bounce-speed: 1.6s;
  --amc-scroll-gap: 14px;         /* from the bottom edge */
}
html, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
.amc-scroll-more { all: unset; position: fixed; z-index: 1035; width: var(--amc-scroll-more-size); height: var(--amc-scroll-more-size); box-sizing: border-box; filter: drop-shadow(0 1px 6px rgba(20,35,50,.35));
  display: grid; place-items: center; cursor: pointer; color: #fff; pointer-events: none; opacity: 0; transform: translate(-50%, 6px);
  transition: opacity var(--amc-dur-medium) cubic-bezier(.2,.8,.2,1), transform var(--amc-dur-medium) cubic-bezier(.2,.8,.2,1); }
.amc-scroll-more.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.amc-scroll-more .amc-icon { width: var(--amc-scroll-icon); height: var(--amc-scroll-icon); animation: amc-scroll-bounce var(--amc-scroll-bounce-speed) ease-in-out infinite; }
@keyframes amc-scroll-bounce { 0%, 100% { transform: translateY(calc(var(--amc-scroll-bounce) * -.3)); } 50% { transform: translateY(calc(var(--amc-scroll-bounce) * .7)); } }
@media (prefers-reduced-motion: reduce) { .amc-scroll-more .amc-icon { animation: none; } }
/* Approved component refinements of 14 Oct 2026 (Reception developer package 2026-10-14): shared 3px row-edge
   separation, panel-body scrolling, paired cards and the scoped rx- Reception recipes. Last, as in the pack. */
.rx-navigation{display:flex;flex-wrap:nowrap;flex:0 0 auto;justify-content:flex-end;align-items:center;gap:8px;direction:ltr;margin-left:auto;margin-right:0;align-self:start}.amc-panel-head.rx-panel-heading{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:start;direction:ltr}.rx-panel-heading>div:first-child{min-width:0;overflow-wrap:anywhere}.rx-navigation>button,#view-patient #back,#view-patient #patient-close{width:40px;height:40px;min-width:40px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px}#view-patient>.amc-page-head{display:flex;justify-content:flex-end;gap:8px;direction:ltr}

#patient-body{display:grid;gap:var(--amc-cell-gap,8px);min-width:0}

.rx-completion-copy{min-width:0}.rx-completion-actions{display:flex;flex-wrap:wrap;gap:8px}.rx-completion-checklist .rx-completion-row{grid-template-columns:10px minmax(0,1fr) auto}.rx-completion-checklist .rx-completion-actions{grid-column:3;flex-direction:column;align-items:flex-end}.rx-completion-note{margin-top:var(--amc-space-pair)}

[data-rx-missing]{gap:var(--amc-space-tight)}.rx-missing-header{position:relative;top:var(--amc-cell-gap,8px);display:flex;align-items:center;justify-content:space-between;gap:var(--amc-space-tight)}.page-title>.amc-display,.page-title>.amc-heading,.panel-head .amc-heading,.panel>.amc-heading{margin:0}.amc-panel-head .amc-heading{margin-top:0}.rx-completion-checklist .rx-completion-actions>.amc-btn{white-space:nowrap}

.amc-tag{justify-self:start;width:fit-content;max-width:100%}

.rx-document-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:var(--amc-space-pair);align-items:start}.rx-document-grid>[data-rx-document-type]{gap:var(--amc-space-tight)}.rx-document-grid .amc-upload-drop{padding:14px 12px;gap:6px}.rx-document-grid .amc-upload-drop .amc-icon{width:20px;height:20px}.rx-document-grid .amc-upload{gap:8px}.rx-document-grid .amc-upload-drop>span{font-size:11px}

.rx-document-grid>[data-rx-document-type]>h3:not([hidden]){min-block-size:2lh;align-content:start;margin:0}.rx-document-grid>[data-rx-document-type]>h3[hidden]{display:none}

.amc-phead-row .amc-phead-item>b,.amc-phead-row .amc-phead-none{min-height:var(--amc-tag-h);display:flex;align-items:center;margin:0}.amc-phead-row .amc-phead-item>.amc-tags{min-height:var(--amc-tag-h);align-items:center}

.amc-form-actions.is-sticky.amc-glass-pop{--amc-rf:initial;background:linear-gradient(172deg,rgba(255,255,255,var(--amc-pop-tint)),rgba(255,255,255,calc(var(--amc-pop-tint)*.45)))}.amc-phead-row .amc-phead-item>b{font:400 11px/1 var(--amc-font-body);letter-spacing:.02em}[dir=rtl] .amc-phead-row .amc-phead-item>b{font-size:12px;letter-spacing:0}

.amc-form-actions.is-sticky.rx-form-overlay{position:fixed;z-index:1050;box-sizing:border-box;--amc-rf:initial}

body>.amc-side.amc-glass{transition:width var(--amc-nav-speed,460ms) var(--amc-nav-ease,cubic-bezier(.2,.8,.2,1)),opacity var(--amc-dur-medium,460ms) var(--amc-ease);will-change:width}.amc-side .amc-nav-item{transition:padding var(--amc-nav-speed,460ms) var(--amc-nav-ease),transform 220ms var(--amc-nav-ease),background-color 160ms var(--amc-nav-ease)}

.amc-cpanel-body{min-height:0;overscroll-behavior-y:contain}.amc-cpanel{overscroll-behavior:contain}

#find-card .find .amc-input{height:var(--amc-field-h);min-height:var(--amc-field-h);padding-block:0;font-size:var(--amc-field-f);line-height:1.2}#find-card .find .amc-float label{font-size:var(--amc-field-f);top:50%;transform:translateY(-50%)}#find-card .find .amc-input:focus+label,#find-card .find .amc-input:not(:placeholder-shown)+label{opacity:0}#find-card #results .amc-state{--amc-state-pad:var(--amc-space-tight)}

#find-card .find{grid-template-columns:minmax(0,1fr)}

.amc-form-field.has-error .amc-chips{box-shadow:none;border-radius:0}

.amc-form-field.has-error .amc-chips .amc-chip>span{box-shadow:inset 0 0 0 1px var(--amc-critical)}

.amc-dialog-title{margin:0 0 var(--amc-space-tight)}.amc-panel-head>div:first-child{display:grid;gap:var(--amc-space-tight)}.amc-panel-head>div:first-child>.amc-heading{margin:0}

.amc-panel{display:flex;flex-direction:column;overflow:hidden}.amc-panel>.amc-panel-head{flex:0 0 auto}.amc-panel>.amc-panel-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}

.amc-panel>.amc-panel-body{clip-path:inset(0 0 var(--rx-footer-clip,0px) 0);scrollbar-width:none}.amc-panel>.amc-panel-body::-webkit-scrollbar{display:none}

.amc-float textarea.amc-input{padding-top:26px}.amc-float textarea.amc-input+label{top:8px;transform:none;font-size:8.5px;line-height:1.2}[dir=rtl] .amc-float textarea.amc-input+label{font-size:9.5px}

.amc-date-pop>.amc-cal{max-height:var(--rx-calendar-room,calc(100vh - 80px));overflow-y:auto;overscroll-behavior:contain}

#no-appts .amc-state,#no-visits .amc-state{--amc-state-pad:var(--amc-space-tight);justify-items:start;text-align:start;padding-inline:0}#no-appts .amc-state-actions{margin-top:var(--amc-space-tight);justify-content:flex-start}

.rx-document-statuses{display:grid;gap:var(--amc-cell-gap,8px)}.rx-document-statuses>.amc-upload-hint{display:block;min-height:1lh;overflow-wrap:anywhere;text-box:normal}

.fact{display:grid;gap:8px;min-width:0}.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--amc-space-pair)}.fact>.amc-body{overflow-wrap:anywhere}.rx-request-section{display:grid;gap:var(--amc-form-head-gap)}.rx-request-section>.amc-heading{margin:0}.rx-transport-intake{gap:var(--amc-space-block)}.rx-transport-intake .amc-form-sec-h{gap:var(--amc-space-tight)}.rx-provider-summary{display:flex;flex-wrap:wrap;gap:var(--amc-space-tight);align-items:center;margin-bottom:var(--amc-space-pair)}.rx-people .amc-input{padding-inline-end:60px}.rx-people-steps{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);display:flex;gap:2px}.rx-people-steps .amc-btn{width:24px;height:24px;min-width:24px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center}.rx-people-steps .amc-icon{width:16px;height:16px}.rx-time-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rx-transport-form .has-error .amc-input{border-color:var(--amc-critical)}

.panel-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.amc-select-pop>.amc-select-list{overscroll-behavior:contain}

.rx-paired-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--amc-cell-gap);align-items:start;margin-top:var(--amc-group-gap)}.rx-paired-panels--appointments{grid-template-columns:repeat(2,minmax(0,calc(var(--rx-cell,49px)*8 + var(--amc-cell-gap)*7)))}.rx-paired-panels>.amc-card{min-width:0;display:flex;flex-direction:column;gap:var(--amc-space-pair);height:var(--rx-paired-height,auto);overflow:hidden}.rx-paired-panels>.amc-card>.panel-head{flex:0 0 auto}.rx-paired-panels>.amc-card>:is(.amc-list,.meters){flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}.rx-paired-panels>.amc-card>:is(.amc-list,.meters)::-webkit-scrollbar{display:none}.rx-paired-panels+.amc-grid{margin-top:var(--amc-group-gap)}

/* Separate adjacent zebra/hover/selection fills without adding row margins.
   Keep clipping when the pack's hover background shorthand resets it. */
.amc-table-rows > .amc-tr-body,
.amc-list > .amc-list-item,
.amc-chart-table > div:not(:first-child) {
  box-sizing: border-box;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  background-clip: padding-box !important;
}
/* The 3px transparent edge replaces 3px of the original 8px padding. */
.amc-list > .amc-list-item,
.amc-chart-table > div:not(:first-child) {
  padding-top: 5px;
  padding-bottom: 5px;
}
/* HMS layout (D-034). Every look — glass, type, colour, buttons, controls, dialogs, tables, tabs, states — comes from
   Adham's design pack (@design/amc-m01.css). This file only places things (pack rule §3: a part's own CSS may only set
   layout), plus three structural needs the pack leaves to the page: the static background used when the live background
   is off, the skip link, and visually hidden text. Logical properties only, so RTL flips by itself. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
#root { min-height: 100vh; }

/* Static background — only when the live silk is off (automated browsers, no WebGL). Reduced motion keeps the live
   silk: the pack script draws one still frame itself. The colour is the pack's own page background behind the silk
   (amc-background.js `html { background: #aebfce }`); the earlier gradient used the pre-2026-10-14 pale palette. */
.hms-bg-static { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: #aebfce; }
html.hms-live-bg .hms-bg-static { display: none; }

.hms-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hms-skip-link { position: fixed; z-index: 2000; inset-inline-start: 16px; top: -80px; }
.hms-skip-link:focus { top: 16px; }

/* Shell frame: side bar (amc-side) + top bar (amc-topbar) are fixed by the pack; the body padding is set by the
   pack classes amc-has-nav / amc-has-topbar. Main content uses amc-page. */
.hms-main { outline: none; }
.hms-main .amc-page { padding-top: 24px; }
.hms-foot { padding: 0 var(--amc-page-edge) 24px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hms-side-section { display: grid; gap: var(--amc-nav-gap); }
.hms-side-section + .hms-side-section { margin-top: 10px; }
/* Module frame (registry.registerFrame): the module's other workspaces below its design pages, after a hairline. */
.hms-side-more { margin-top: 18px !important; padding-top: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.hms-topbar-ctx { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hms-env { position: fixed; z-index: 1040; bottom: 12px; inset-inline-end: 16px; pointer-events: none; }
@media (max-width: 700px) { .hms-env { bottom: calc(var(--amc-nav-tab-h) + 24px); } .hms-topbar-ctx { display: none; } }

/* Generic layout helpers */
.hms-stack { display: grid; gap: var(--amc-space-tight); min-width: 0; }
.hms-stack--lg { gap: var(--amc-space-block); }
.hms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.hms-row--between { justify-content: space-between; }
.hms-row--end { justify-content: flex-end; }
.hms-grow { flex: 1 1 auto; min-width: 0; }
.hms-mt { margin-top: var(--amc-space-tight); }
.hms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--amc-cell-gap); align-items: start; }
.hms-cards--wide { grid-template-columns: minmax(0, 1fr); }
.hms-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: var(--amc-space-tight); }
.hms-card-head > h2, .hms-card-head > h3 { margin: 0; }
.hms-kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 10px 18px; margin: 0; align-items: baseline; }
.hms-kv > dt { margin: 0; } .hms-kv > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .hms-kv { grid-template-columns: minmax(0, 1fr); gap: 4px; } .hms-kv > dd { margin-bottom: 8px; } }
.hms-note { display: flex; align-items: flex-start; gap: 10px; }
.hms-note > .amc-status-dot { margin-top: 4px; }
.hms-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hms-action { display: grid; gap: 4px; justify-items: start; }
.hms-ref { font-family: var(--amc-font-number); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.hms-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.hms-nested { padding-inline-start: 14px; box-shadow: inset 2px 0 0 rgba(255,255,255,.25); }
[dir="rtl"] .hms-nested { box-shadow: inset -2px 0 0 rgba(255,255,255,.25); }
.hms-list-reset { list-style: none; margin: 0; padding: 0; }
.hms-table-cols-2 { --amc-table-cols: minmax(0, 2fr) minmax(0, 1fr); }
.hms-table-cols-3 { --amc-table-cols: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.hms-table-cols-4 { --amc-table-cols: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.hms-table-cols-5 { --amc-table-cols: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); }
.hms-table-cols-6 { --amc-table-cols: minmax(0, 2fr) repeat(5, minmax(0, 1fr)); }
/* Accounts (owner 2026-10-24): column widths for the pack's grid rows; on narrow windows (the pack's 700px phone width)
   each row's cells stack, so the actions wrap below the account instead of being squeezed or clipped (layout only). */
.hms-acc-table { --amc-table-cols: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(140px, 1fr) minmax(0, 2fr); }
@media (max-width: 700px) {
  .hms-acc-table .amc-tr:not(.amc-tr-head) { grid-template-columns: minmax(0, 1fr); row-gap: var(--amc-space-tight); padding-block: var(--amc-space-tight); }
}
.hms-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.hms-filters > * { min-width: 160px; }
.hms-dialog-group { display: grid; gap: var(--amc-space-tight); padding: 12px; border-radius: 18px; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.35); }
.hms-search-pop { position: fixed; z-index: 1001; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; border-radius: 24px; }
.hms-npanel { position: fixed; z-index: 1001; max-height: min(70vh, 560px); overflow-y: auto; }
.hms-menu { position: fixed; z-index: 1001; }
.hms-signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.hms-signin > .amc-glass { width: min(520px, 100%); }
/* Local module entry page: the chip + small Open row takes the slot of the design's instruction sentence
   (amc-signin-words > p: 13px margins around a 9px trimmed line = 35px), so the card keeps the reference geometry. A
   minimum, not a fixed height: the row wraps and grows on narrow screens or with longer labels. */
.hms-entry-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-height: 35px; }
.hms-tabset-panel:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 4px; border-radius: 12px; }
.hms-btn-reset { appearance: none; border: 0; margin: 0; width: 100%; text-align: start; cursor: pointer; background-color: transparent; }
.amc-list > .hms-btn-reset:nth-child(even) { background-color: rgba(255,255,255,var(--amc-table-zebra)); }
/* Pack form fields are subgrids in rows; give them one full-width column so controls fill the field (layout only). */
.amc-form-field { grid-template-columns: minmax(0, 1fr); }
.amc-form-field > .amc-input, .amc-form-field > select, .amc-form-field > textarea { width: 100%; justify-self: stretch; }
/* Native dropdown lists: the pack's .amc-input text colour (white) is inherited by <option>, but the browser draws the
   open list on its own light background — white on white. Give the open list readable dark text (presentation only;
   the closed field keeps the pack look). For Adham's review (ADHAM_UI_HANDOFF §4 item 3). */
select.amc-input option, select.amc-input optgroup { color: #1f2a33; background-color: #ffffff; }
select.amc-input option:disabled { color: #6b7780; }
/* Sticky record header (M01-RC-07): placement only; its look is the pack's soft glass. */
.hms-sticky-head { position: sticky; top: calc(var(--amc-topbar-h) + var(--amc-nav-inset) + 8px); z-index: 30; padding: 14px 22px; border-radius: 26px; }
@media (max-width: 700px) { .hms-sticky-head { top: calc(var(--amc-topbar-h) + 18px); padding: 10px 14px; } }

/* 2026-10-20 first-login setup: the delivered sign-in page's show / hide control (login.css .lg-reveal) on every password field */
.hms-reveal-wrap { position: relative; }
.hms-reveal-wrap > .amc-input { padding-inline-end: 44px; }
/* owner 2026-10-20: one eye per field - Edge's own small reveal / clear buttons are hidden where our button exists */
.hms-reveal-wrap > input::-ms-reveal, .hms-reveal-wrap > input::-ms-clear { display: none; }
.hms-reveal { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); }
.hms-reveal .hms-reveal-slash { display: none; }
.hms-reveal[aria-pressed="true"] .hms-reveal-slash { display: inline; }
.hms-setup-account { margin: 0; }
/* Owner 2026-10-25: a form page (own password change) keeps form width under its page head instead of spanning the page. */
.hms-form-narrow { max-width: 640px; }
/* AMC HMS — locked Christina (Shell Lab, locked 7 Oct 2026). Behaviour: amc-christina.js — amcChristina({ place, lang, … }).
   One identity everywhere: a small frosted white orb that is always there, and a side panel that opens beside the work (it never dims or covers the page).
   States: resting · listening · thinking · speaking · attention (small amber dot) · receded (a critical alert is on screen) · unavailable (no motion; everything else keeps working).
   White only; colour only for status. Panel: the pop-up glass pack. Speeds and curve: the motion pack. */
:root {
  --amc-christina-size: 37px;          /* resting */
  --amc-christina-size-listen: 47px;   /* listening */
  --amc-christina-size-busy: 42px;     /* thinking / speaking */
  --amc-christina-size-recede: 26px;   /* while a critical alert is on screen */
  --amc-christina-glow: 10px;          /* soft white glow around the orb */
  --amc-christina-speed: 9s;           /* one turn of the shimmer inside (resting) */
  --amc-christina-place: topbar;       /* topbar | corner */
  --amc-christina-w: 400px;      /* side panel */
}

/* ---------- the orb ---------- */
.amc-ch-orb { all: unset; box-sizing: border-box; position: relative; flex: none; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent;
  --s: var(--amc-christina-size); width: var(--s); height: var(--s); margin: calc((40px - var(--s)) / 2) 0;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.96), rgba(255,255,255,.62) 26%, rgba(255,255,255,.2) 62%, rgba(255,255,255,.1));
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.75), inset 0 -3px 8px rgba(255,255,255,.28), 0 0 var(--amc-christina-glow) rgba(255,255,255,.38);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: width var(--amc-dur-medium) var(--amc-ease), height var(--amc-dur-medium) var(--amc-ease), margin var(--amc-dur-medium) var(--amc-ease),
              opacity var(--amc-dur-medium) var(--amc-ease), box-shadow var(--amc-dur-medium) var(--amc-ease), border-radius var(--amc-dur-medium) var(--amc-ease); }
.amc-ch-orb:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
.amc-ch-in { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.amc-ch-silk, .amc-ch-silk2 { position: absolute; inset: 8%; border-radius: 50%; filter: blur(2.5px); opacity: .85;
  background: conic-gradient(from 0deg, transparent 0 8%, rgba(255,255,255,.85) 18%, transparent 34%, rgba(255,255,255,.5) 52%, transparent 66%, rgba(255,255,255,.7) 82%, transparent 94%);
  animation: amc-ch-turn var(--amc-christina-speed) linear infinite; }
.amc-ch-silk2 { inset: 22%; opacity: .55; animation-direction: reverse; animation-duration: calc(var(--amc-christina-speed) * 1.6); }
.amc-ch-core { position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 72%);
  animation: amc-ch-breathe calc(var(--amc-christina-speed) * .55) ease-in-out infinite; }
.amc-ch-cue { position: absolute; top: -1px; inset-inline-end: -1px; opacity: 0; transform: scale(.4); transition: opacity var(--amc-dur-short) var(--amc-ease), transform var(--amc-dur-short) var(--amc-ease); }
@keyframes amc-ch-turn { to { transform: rotate(1turn); } }
@keyframes amc-ch-breathe { 0%, 100% { transform: scale(.82); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes amc-ch-speak { 0%, 100% { border-radius: 50%; } 25% { border-radius: 47% 53% 51% 49% / 53% 47% 53% 47%; } 50% { border-radius: 53% 47% 48% 52% / 48% 52% 47% 53%; } 75% { border-radius: 49% 51% 53% 47% / 51% 49% 50% 50%; } }

/* states */
.amc-ch-orb[data-state="listening"] { --s: var(--amc-christina-size-listen); box-shadow: inset 0 0 0 1px rgba(255,255,255,.95), inset 0 -3px 8px rgba(255,255,255,.3), 0 0 calc(var(--amc-christina-glow) * 1.6) rgba(255,255,255,.5); }
.amc-ch-orb[data-state="listening"] .amc-ch-core { animation-duration: calc(var(--amc-christina-speed) * .3); }
.amc-ch-orb[data-state="thinking"] { --s: var(--amc-christina-size-busy); }
.amc-ch-orb[data-state="thinking"] :is(.amc-ch-silk, .amc-ch-silk2) { animation-duration: calc(var(--amc-christina-speed) * .22); }
.amc-ch-orb[data-state="speaking"] { --s: var(--amc-christina-size-busy); animation: amc-ch-speak calc(var(--amc-christina-speed) * .14) ease-in-out infinite; }
.amc-ch-orb[data-state="attention"] .amc-ch-cue { opacity: 1; transform: none; }
.amc-ch-orb[data-state="receded"] { --s: var(--amc-christina-size-recede); opacity: .45; }
.amc-ch-orb[data-state="receded"] *, .amc-ch-orb[data-state="unavailable"] * { animation-play-state: paused; }
.amc-ch-orb[data-state="unavailable"] { opacity: .4; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.55), rgba(255,255,255,.18) 60%, rgba(255,255,255,.08)); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.5); }
.amc-ch-orb[data-state="unavailable"] :is(.amc-ch-silk, .amc-ch-silk2, .amc-ch-core) { opacity: .25; }
@media (prefers-reduced-motion: reduce) { .amc-ch-orb, .amc-ch-orb * { animation: none !important; } }

/* in the corner (when not in the top bar) */
.amc-ch-corner { position: fixed; z-index: 860; bottom: var(--amc-nav-inset); inset-inline-end: var(--amc-nav-inset); display: grid; place-items: center; width: 56px; height: 56px; }
@media (max-width: 700px) { .amc-ch-corner { bottom: calc(var(--amc-nav-tab-h) + 24px); } }

/* ---------- the side panel (on the top layer; never dims the page) ---------- */
.amc-cpanel { position: fixed; top: calc(var(--amc-nav-inset) * 2 + var(--amc-topbar-h, 0px)); bottom: var(--amc-nav-inset); inset-inline-end: var(--amc-nav-inset);
  width: min(var(--amc-christina-w), calc(100vw - 30px)); box-sizing: border-box; padding: var(--amc-dialog-pad); border-radius: var(--amc-dialog-r); color: var(--amc-white-soft);
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--amc-space-pair);
  opacity: 0; transform: translateX(40px); pointer-events: none; transition: opacity var(--amc-dur-medium) var(--amc-ease), transform var(--amc-dur-medium) var(--amc-ease); }
body:not(.amc-has-topbar) .amc-cpanel { top: var(--amc-nav-inset); }
[dir="rtl"].amc-cpanel { transform: translateX(-40px); }
.amc-cpanel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.amc-cpanel-head { display: flex; align-items: center; gap: 12px; }
.amc-cpanel-head .amc-ch-orb { --s: 32px; margin: 0; pointer-events: none; }
.amc-cpanel-head > div { display: grid; gap: 8px; flex: 1; min-width: 0; }
.amc-cpanel-body { overflow: auto; display: grid; align-content: start; gap: var(--amc-space-pair); margin: 0 calc(var(--amc-dialog-pad) * -1); padding: 0 var(--amc-dialog-pad); }
.amc-cpanel-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.amc-cpanel-starters .amc-btn { white-space: normal; height: auto; min-height: 32px; padding-block: 8px; text-align: start; }
.amc-cpanel-q { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 18px; background: rgba(255,255,255,.12); }
[dir="rtl"] .amc-cpanel-q { justify-self: end; }
.amc-canswer { display: grid; gap: var(--amc-space-tight); padding-top: var(--amc-space-tight); }
.amc-canswer > * { transition: opacity var(--amc-dur-medium) var(--amc-ease); } .amc-canswer > .is-wait { opacity: 0; }   /* why / based on / missing / actions arrive after the answer has typed */
.amc-canswer-sec { display: grid; gap: 8px; }
.amc-canswer-sec .amc-list-item { display: flex; align-items: center; gap: 10px; }
.amc-canswer-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.amc-cpanel-foot { display: grid; gap: 10px; }
.amc-cpanel-ask { display: flex; gap: 8px; align-items: center; }
.amc-cpanel-ask .amc-input { flex: 1; }
@media (max-width: 700px) {
  .amc-cpanel { top: auto; inset-inline: 0; bottom: 0; width: 100%; height: 88vh; border-radius: var(--amc-dialog-r) var(--amc-dialog-r) 0 0; transform: translateY(100%); }
  [dir="rtl"].amc-cpanel { transform: translateY(100%); }
  .amc-cpanel.is-open { transform: none; }
}
/* Reception design pages — layout only; the design pack owns every look (Design/screens/reception/view-*.js css blocks:
   .page-title .page-actions .count .panel .panel-head .panel-tools .cell .facts .fact .find, prefixed m02- here so
   nothing leaks into Module 01 or the shared shell). */
.m02-title { display: grid; gap: var(--amc-space-tight); }
.m02-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.m02-count { display: grid; gap: var(--amc-space-tight); }
.m02-panel { display: grid; gap: var(--amc-space-pair); align-content: start; }
.m02-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m02-panel-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m02-panel-tools .amc-select, .m02-panel-tools select { min-width: 200px; }
.m02-cell { display: grid; gap: 4px; min-width: 0; }
/* A reference is LTR-isolated text; as a grid item it would stretch and sit at the cell's left edge in Arabic. It keeps
   the reading-start edge of its cell (right in RTL), under the name, as the design's second line. */
.m02-cell > .hms-ref, .m02-fact .hms-ref { justify-self: start; }
/* Reception frame side bar: the pack's own 4px list gap only (amc-nav.css .amc-side-list), as the design's six entries
   (44px pitch); the shell's extra spacing between Module 01's grouped entries does not apply inside the frame. */
[data-testid="module-frame-nav"] > .hms-side-section + .hms-side-section { margin-top: 0; }
/* Side panel body (design: body.className = 'panel', .facts, .fact, .panel-actions). */
.m02-panel-body { display: grid; gap: var(--amc-space-pair); align-content: start; }
.m02-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--amc-space-pair); }
.m02-fact { display: grid; gap: 8px; min-width: 0; }
.m02-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.m02-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.m02-item { width: 100%; text-align: start; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* The design page is the document's own <main class="amc-page"> with the pack's page edge on every side; inside the HMS
   shell the page sits in <main class="hms-main">, whose rule shortens the top edge to 24px. Restore it for these pages. */
.hms-main .amc-page.m02-page { padding-top: var(--amc-page-edge); }
/* Full width (design reception-shell.js): the page's squares grow; variables are measured by useFullWidth (rx.tsx). */
.m02-page { --rx-cell: 49px; --rx-cell-small: 49px; }
.m02-page .amc-grid { --amc-cell: var(--rx-cell); }
.m02-page .amc-grid--small { --amc-cell: var(--rx-cell-small); }
/* Pack rule (amc-spacing.js snap, package 2026-10-14): number cards are all the same height - every card takes the
   tallest card's height, across wrapped rows too. Equal implicit rows give the same result without the DOM script. */
.m02-page .amc-grid--small, .m02-today .amc-grid--small { grid-auto-rows: 1fr; }
/* Package registration form (registration.tsx): its wrappers take no box, so the package's #form-grid is a page block. */
.m02-contents, .m02-pkg-form { display: contents; }
/* Owner instruction 2026-10-15: when the form opens or a step changes, it lands below the fixed top bar, never under it. */
.m02-pkg-form #form-grid, .m02-pkg-form .amc-form-steps { scroll-margin-top: calc(var(--amc-topbar-h, 60px) + 40px); }
/* "Awaiting integration" in a number card: occupies the figure's own 1em line so the card keeps the design's height. */
.m02-na { display: inline-flex; align-items: center; height: 1em; line-height: 1; }
/* "—" in a number card: the odometer's own 1em line box, so an unsourced card is exactly as tall as a figure card (EN/AR). */
.m02-dash { display: inline-flex; align-items: center; height: 1em; line-height: 1; }
.m02-na .amc-tag { --amc-tag-h: 24px; }
/* Registration find row (design .find): the approved search keys as floating-label fields, then Search / Register new. */
.m02-find-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .m02-find-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .m02-find { grid-template-columns: minmax(0, 1fr); } .m02-find-keys { grid-template-columns: minmax(0, 1fr); } }
/* Single search field (design .find): the field, then chips (Search) or "Not found — register new" (Registration). A date
   of birth field joins the search field only when a name is typed (D-044 6A: a name is searched with its date of birth). */
.m02-find--reg { gap: 10px; }
.m02-find-q { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.m02-find-q.has-dob { grid-template-columns: minmax(0, 1fr) minmax(150px, 200px); }
/* The patient file (design view-search.js .facts / .tab-body). */
.m02-facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--amc-space-pair) 24px; }
.m02-tab-body { display: grid; gap: var(--amc-space-block); padding-top: var(--amc-space-pair); }
@media (max-width: 700px) { .m02-facts--3 { grid-template-columns: minmax(0, 1fr); } .m02-find-q.has-dob { grid-template-columns: minmax(0, 1fr); } }
/* A panel standing in for design content that has no source (e.g. "Clinics today"): its empty state must not make the
   row taller than the design's; the row height comes from its neighbour, as in the design. */
.amc-grid > .m02-follow-row { contain: size; min-height: 100%; }
/* AMC HMS — patient header (locked 2026-09-25, Patient Header Lab). One glass card; shrinks into a slim bar on scroll; buttons + More menu. Top of every patient page. Behaviour: amc-phead.js — amcPatient(host, patient).
   Shows photo (or initials), name + status, age · sex · file number, ward · bed, doctor, allergies (always visible; a serious one has a red dot).
   When you scroll down it can shrink into a slim bar that stays at the top (name + status + allergies). */
:root {
  --amc-phead-look: card;        /* card | plain */
  --amc-phead-scroll: shrink;    /* shrink | away */
  --amc-phead-actions: buttons;  /* buttons | menu | none */
  --amc-phead-av: 72px;          /* photo / initials */
  --amc-phead-gap: 27px;         /* name block → details row */
  --amc-phead-curve: cubic-bezier(.2,.8,.2,1);
}
.amc-phead { display: grid; gap: var(--amc-phead-gap); min-width: 0; margin-bottom: var(--amc-gap, 15px); }
.amc-phead.is-plain { padding: 4px 0 6px; }
.amc-phead-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.amc-phead-av { flex: none; width: var(--amc-phead-av); height: var(--amc-phead-av); border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #2b3a47; font: 500 calc(var(--amc-phead-av) * .3)/1 var(--amc-font-title); letter-spacing: .02em;
  box-shadow: 0 0 0 .5px rgba(255,255,255,.8), 0 4px 18px rgba(20,35,50,.18); }
.amc-phead-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
[dir="rtl"] .amc-phead-av { letter-spacing: 0; }
.amc-phead-id { flex: 1; min-width: 0; display: grid; gap: 8px; }
.amc-phead-name { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.amc-phead-name h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.amc-phead-facts { font: 400 13px/1.3 var(--amc-font-body); color: var(--amc-white-soft); }
.amc-phead-facts bdi { unicode-bidi: isolate; }
.amc-phead-acts { flex: none; display: flex; align-items: center; gap: 10px; }
.amc-phead-acts .amc-icon { width: 16px; height: 16px; }
.amc-phead-row { display: grid; grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, 1fr); gap: 12px 36px; align-items: start; }
.amc-phead.is-card .amc-phead-row { padding-top: var(--amc-phead-gap); border-top: .5px solid rgba(255,255,255,.28); }
.amc-phead-item { display: grid; gap: 7px; min-width: 0; }
.amc-phead-item b { font: 400 13px/1.3 var(--amc-font-body); color: #fff; }
.amc-phead-item .amc-tags { gap: 6px; }
.amc-tag.is-serious { box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--amc-critical) 80%, transparent); }
.amc-phead-none { font: 400 13px/1.3 var(--amc-font-body); color: var(--amc-white-muted); }

/* the slim bar that stays at the top while you scroll */
.amc-phead-mini { position: fixed; top: 12px; z-index: 880; display: flex; align-items: center; gap: 12px; min-width: 0; box-sizing: border-box; padding: 7px 16px 7px 7px; border-radius: 999px;
  opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity 460ms var(--amc-phead-curve), transform 460ms var(--amc-phead-curve); }
[dir="rtl"] .amc-phead-mini { padding: 7px 7px 7px 16px; }
.amc-phead-mini.amc-glass { background: var(--amc-glass-tint); }
.amc-phead-mini.is-on { opacity: 1; transform: none; pointer-events: auto; }
.amc-phead-mini .amc-phead-av { --amc-phead-av: 34px; font-size: 11.5px; box-shadow: none; }
.amc-phead-mini-name { font: 400 14px/1.2 var(--amc-font-title); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amc-phead-mini-facts { font: 400 11px/1.2 var(--amc-font-body); color: var(--amc-white-muted); white-space: nowrap; }
.amc-phead-mini .amc-tags { flex-wrap: nowrap; overflow: hidden; margin-inline-start: auto; }
.amc-phead-mini .amc-tag { --amc-tag-h: 24px; }

@media (max-width: 700px) {
  .amc-phead-main { flex-wrap: wrap; gap: 14px; }
  .amc-phead-acts { width: 100%; } .amc-phead-acts > .amc-btn:not(.amc-btn--icon) { flex: 1; }
  .amc-phead-row { grid-template-columns: 1fr 1fr; } .amc-phead-item.is-allergy { grid-column: 1 / -1; }
  .amc-phead-mini-facts { display: none; }
}
@container amcphead (max-width: 560px) {
  .amc-phead-main { flex-wrap: wrap; gap: 14px; }
  .amc-phead-acts { width: 100%; } .amc-phead-acts > .amc-btn:not(.amc-btn--icon) { flex: 1; }
  .amc-phead-row { grid-template-columns: 1fr 1fr; } .amc-phead-item.is-allergy { grid-column: 1 / -1; }
}
.amc-phead-wrap { container: amcphead / inline-size; }
@media (prefers-reduced-motion: reduce) { .amc-phead-mini { transition-duration: 1ms; } }
/* Reception "Today" layout — layout only; the design pack owns every look (Design/screens/reception/view-today.js css block:
   .page-title .page-actions .count .panel .panel-head .cell .facts .fact .panel-actions, prefixed m02-today- here so nothing
   leaks into Module 01 or the shared shell). */
.m02-today-title { display: grid; gap: var(--amc-space-tight); }
.m02-today-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.m02-today-panel { display: grid; gap: var(--amc-space-pair); align-content: start; }
.m02-today-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* The design page is the document's own <main class="amc-page"> with the pack's page edge on every side; inside the HMS
   shell the page sits in <main class="hms-main">, whose rule shortens the top edge to 24px. Restore the design's edge for
   this page only. */
.hms-main .amc-page.m02-today { padding-top: var(--amc-page-edge); }
/* Full width (design reception-shell.js): the page's squares grow; variables are measured by useFullWidth in Today.tsx */
.m02-today { --rx-cell: 49px; --rx-cell-small: 49px; }
.m02-today .amc-grid { --amc-cell: var(--rx-cell); }
.m02-today .amc-grid--small { --amc-cell: var(--rx-cell-small); }
.m02-today-meta { vertical-align: baseline; }
