/* HealthPass design system. Layout: persistent navy sidebar + light work surface, Linear/Stripe density. */
:root {
  --navy: #14243A; --navy-2: #1C3150; --teal: #0D9488; --teal-soft: #E6F4F2; --teal-ink: #0B7A70;
  --bg: #F7F9FC; --surface: #FFFFFF; --surface-2: #F2F5F9; --border: #E5EAF0; --border-2: #D6DEE8;
  --fg: #172338; --fg-2: #64748B; --fg-3: #94A3B8;
  --success: #16A34A; --success-soft: #E8F6EC; --warning: #D97706; --warning-soft: #FDF3E3; --danger: #DC2626; --danger-soft: #FDECEC;
  --info: #2563EB; --info-soft: #EAF1FE;
  --side-fg: #C9D4E3; --side-muted: #7F91AB; --side-active: rgba(255,255,255,.08);
  --shadow: 0 1px 2px rgba(20,36,58,.05), 0 1px 1px rgba(20,36,58,.03);
  --shadow-lg: 0 12px 32px rgba(20,36,58,.14), 0 2px 6px rgba(20,36,58,.06);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 8px; --r-lg: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --navy: #0A1422; --navy-2: #13223A; --teal: #14B8A6; --teal-soft: #0F2E2D; --teal-ink: #5EEAD4;
  --bg: #0C1422; --surface: #121C2C; --surface-2: #182436; --border: #223147; --border-2: #2C3E57;
  --fg: #E6ECF5; --fg-2: #96A5BA; --fg-3: #6B7C93;
  --success: #22C55E; --success-soft: #10291A; --warning: #F59E0B; --warning-soft: #2E2210; --danger: #F87171; --danger-soft: #2F1618;
  --info: #60A5FA; --info-soft: #132440; --side-fg: #C9D4E3; --side-muted: #6E819C; --side-active: rgba(255,255,255,.07);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 16px 40px rgba(0,0,0,.5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --navy: #0A1422; --navy-2: #13223A; --teal: #14B8A6; --teal-soft: #0F2E2D; --teal-ink: #5EEAD4;
  --bg: #0C1422; --surface: #121C2C; --surface-2: #182436; --border: #223147; --border-2: #2C3E57;
  --fg: #E6ECF5; --fg-2: #96A5BA; --fg-3: #6B7C93;
  --success: #22C55E; --success-soft: #10291A; --warning: #F59E0B; --warning-soft: #2E2210; --danger: #F87171; --danger-soft: #2F1618;
  --info: #60A5FA; --info-soft: #132440; --side-fg: #C9D4E3; --side-muted: #6E819C; --side-active: rgba(255,255,255,.07);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 16px 40px rgba(0,0,0,.5); color-scheme: dark; }

html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
* { box-sizing: border-box; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); } .faint { color: var(--fg-3); }
.small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 4px; }
.stack { display: flex; flex-direction: column; gap: 16px; } .stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--fg-2); }
.link { color: var(--teal-ink); cursor: pointer; background: none; border: 0; padding: 0; font-weight: 500; text-align: left; }
.link:hover { text-decoration: underline; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; box-shadow: var(--shadow); }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn.primary { background: var(--teal); border-color: var(--teal); color: #04201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--teal); border-color: var(--teal); color: #04201d; } }
.btn.primary:hover:not(:disabled) { filter: brightness(1.15); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.teal:hover:not(:disabled) { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn svg { width: 15px; height: 15px; flex: none; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); border: 1px solid transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.success { background: var(--success-soft); color: var(--success); }
.pill.warning { background: var(--warning-soft); color: var(--warning); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.teal { background: var(--teal-soft); color: var(--teal-ink); }
.pill.outline { background: transparent; border-color: var(--border-2); }
.pill svg { width: 12px; height: 12px; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 14px; font-weight: 600; }
.card-b { padding: 16px; }
.card-b.flush { padding: 0; }
/* KPIs read as one strip: a single card divided into cells, not a wall of boxes */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-align: left; border: 0 !important; border-radius: 0 !important; box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border) !important; background: transparent; min-width: 0; }
button.kpi { cursor: pointer; } button.kpi:hover { border-color: var(--border-2); background: var(--surface-2); }
.kpi .lbl { font-size: 12.5px; color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
.kpi .lbl svg { width: 14px; height: 14px; }
.kpi .val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--fg-3); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.grid2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } .grid2.even { grid-template-columns: minmax(0, 1fr); } }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--fg-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; } .t tbody tr.click:hover td { background: var(--surface-2); }
.t td.nowrap { white-space: nowrap; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--fg); }
.field .req { color: var(--danger); }
.field .err { font-size: 12px; color: var(--danger); }
.field .hint { font-size: 12px; color: var(--fg-3); }
.inp { height: 36px; border: 1px solid var(--border-2); border-radius: var(--r); padding: 0 10px; background: var(--surface); width: 100%; min-width: 0; }
textarea.inp { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; }
.inp:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.inp.bad { border-color: var(--danger); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--fg-3); pointer-events: none; }
.search .inp { padding-left: 32px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; }
.check input { margin-top: 3px; accent-color: var(--teal); width: 16px; height: 16px; flex: none; }
.toggle { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--border-2); border: 0; cursor: pointer; flex: none; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--teal); } .toggle.on::after { left: 18px; }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r); padding: 2px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--fg-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--teal); }

/* App shell */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--navy); color: var(--side-fg); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 14px 10px; padding-left: max(10px, env(safe-area-inset-left, 0px)); gap: 4px; z-index: 30; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: #fff; }
.side .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--side-muted); padding: 14px 10px 6px; font-weight: 600; }
.nav-i { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--side-fg); background: none; border: 0; cursor: pointer; width: 100%; text-align: left; font-size: 13.5px; }
.nav-i svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav-i:hover { background: var(--side-active); color: #fff; }
.nav-i.on { background: rgba(13,148,136,.22); color: #fff; }
.nav-i.on svg { color: #5EEAD4; opacity: 1; }
.nav-i .badge { margin-left: auto; font-size: 11px; background: var(--teal); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 6px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.side .who { display: flex; gap: 10px; align-items: center; padding: 4px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; height: 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top .gsearch { width: min(360px, 34vw); }
.content { padding-block: 20px 120px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); width: 100%; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ph h1 { font-size: 21px; font-weight: 600; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-2); flex-wrap: wrap; }
.crumbs svg { width: 12px; height: 12px; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--warning-soft); color: var(--warning); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.demo-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; max-height: 70vh; overflow: auto; }
.menu.left { right: auto; left: 0; }
.menu-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 13px; }
.menu-i:hover { background: var(--surface-2); }
.menu-i svg { width: 15px; height: 15px; color: var(--fg-2); flex: none; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }
.rel { position: relative; }
.mobile-only { display: none !important; }
.top > * { flex-shrink: 0; } .top .gsearch { flex-shrink: 1; min-width: 120px; }
@media (max-width: 1000px) { .top .role-lbl { display: none; } .top .org-sw { max-width: 190px !important; } }
@media (max-width: 1180px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .side .lbl-t, .side .grp, .side .who .meta, .nav-i .badge, .side .foot .btn span { display: none; }
  .side .brand { justify-content: center; padding-inline: 0; }
  .nav-i { justify-content: center; padding: 0; }
  .side .foot .btn { padding: 0; }
  .top .gsearch { width: min(280px, 30vw); }
}
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .side .lbl-t, .side .grp, .side .who .meta, .nav-i .badge, .side .foot .btn span { display: initial; }
  .nav-i { justify-content: flex-start; padding: 0 10px; } .side .brand { justify-content: flex-start; padding: 6px 8px 14px; }
  .mobile-only { display: inline-flex !important; } .desk-only { display: none !important; }
  .top .gsearch { flex: 1; width: auto; }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.scrim { position: fixed; inset: 0; background: rgba(10,20,34,.45); z-index: 70; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }

/* Drawer / modal */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--surface); z-index: 80; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease-out; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
.drawer-h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-b { padding: 18px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.drawer-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; background: var(--surface); }
.modal-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); padding: 16px; }
.modal { position: relative; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; animation: pop .16s ease-out; border: 1px solid var(--border); }
.modal.wide { width: min(820px, 100%); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-h { padding: 16px 20px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-h h3 { font-size: 16px; font-weight: 600; }
.modal-b { padding: 14px 20px; overflow-y: auto; display: flex; min-width: 0; flex-direction: column; gap: 14px; }
.modal-f { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Toasts */
.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; animation: pop .18s; width: 100%; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.success svg { color: #4ADE80; } .toast.warning svg { color: #FBBF24; } .toast.danger svg { color: #F87171; } .toast.info svg { color: #5EEAD4; }

/* Timeline */
.tl { display: flex; flex-direction: column; }
.tl-i { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; }
.tl-i::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border-2); }
.tl-i:last-child::before { display: none; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--border-2); }
.tl-dot svg { width: 11px; height: 11px; }
.tl-dot.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.tl-dot.warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.tl-dot.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tl-dot.teal { background: var(--teal-soft); color: var(--teal-ink); border-color: transparent; }

/* Stepper */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--fg-2); font-weight: 500; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 11.5px; font-weight: 600; }
.step.on { color: var(--fg); border-color: var(--teal); } .step.on .n { background: var(--teal); color: #fff; }
.step.done .n { background: var(--teal-soft); color: var(--teal-ink); }
.flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.flow .f { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--fg-3); font-weight: 500; }
.flow .f.done { background: var(--teal-soft); color: var(--teal-ink); }
.flow .f.cur { background: var(--navy); color: #fff; }
.flow .f.bad { background: var(--danger-soft); color: var(--danger); }
.flow svg { width: 11px; height: 11px; color: var(--fg-3); }

/* Alerts */
.alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r); font-size: 13px; border: 1px solid transparent; }
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.alert.critical { background: var(--danger-soft); color: var(--fg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); } .alert.critical svg { color: var(--danger); }
.alert.warning { background: var(--warning-soft); color: var(--fg); border-color: color-mix(in srgb, var(--warning) 30%, transparent); } .alert.warning svg { color: var(--warning); }
.alert.info { background: var(--info-soft); color: var(--fg); } .alert.info svg { color: var(--info); }
.alert.teal { background: var(--teal-soft); color: var(--fg); } .alert.teal svg { color: var(--teal-ink); }

/* Misc */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #fff; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--fg-2); }
.empty .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--fg-3); }
.empty h4 { color: var(--fg); font-size: 14px; font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--teal); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { display: grid; place-items: center; min-height: 50vh; gap: 12px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--fg-2); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }
.list-i { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-i:last-child { border-bottom: 0; }
button.list-i { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; text-align: left; }
button.list-i:hover { background: var(--surface-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--fg); cursor: pointer; }
.chip svg { width: 12px; height: 12px; color: var(--fg-2); }
.section-t { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Messaging */
.msg-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - 56px - 140px); min-height: 520px; }
.msg-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.msg-list .items { overflow-y: auto; flex: 1; }
.thread-i { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-left: 3px solid transparent; border-top: 0; border-right: 0; width: 100%; text-align: left; }
.thread-i:hover { background: var(--surface-2); }
.thread-i.on { background: var(--surface-2); border-left-color: var(--teal); }
.thread-i.unread .subj { font-weight: 650; }
.udot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; margin-top: 6px; }
.msg-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.bubble { max-width: min(560px, 85%); padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--navy); color: #fff; border-color: var(--navy); }
.bubble.mine .muted { color: #B9C6D8; }
.composer { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 860px) { .msg-layout { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; } .msg-list { border-right: 0; } .msg-layout.has-thread .msg-list { display: none; } .msg-layout:not(.has-thread) .msg-pane { display: none; } .msgs { min-height: 50vh; max-height: 60vh; } }

/* Prescription document */
.rxdoc { background: #fff; color: #172338; border: 1px solid #D6DEE8; border-radius: 6px; padding: 26px; position: relative; overflow: hidden; font-size: 13px; }
.rxdoc .wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rxdoc .wm span { transform: rotate(-24deg); font-size: clamp(18px, 4vw, 30px); font-weight: 700; color: rgba(220,38,38,.12); white-space: nowrap; letter-spacing: .04em; }
.rxdoc .rx-sym { font-family: Georgia, serif; font-size: 34px; font-style: italic; color: #0D9488; line-height: 1; }
.rxdoc hr { border: 0; border-top: 1px solid #E5EAF0; margin: 14px 0; }
.rxdoc .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748B; font-weight: 600; }

/* Landing */
.land { min-height: 100%; background: var(--bg); }
.land-nav { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); max-width: 1200px; margin: 0 auto; gap: 12px; }
.land-hero { max-width: 1200px; margin: 0 auto; padding-block: 48px 40px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.land-hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; }
.land-hero h1 em { font-style: normal; color: var(--teal); }
.land-hero .lede { font-size: 17px; color: var(--fg-2); max-width: 54ch; margin-top: 18px; }
.land-sec { max-width: 1200px; margin: 0 auto; padding-block: 24px 64px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.benefit { padding: 20px; }
.benefit .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; margin-bottom: 12px; }
.benefit .ic svg { width: 18px; height: 18px; }
.benefit h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-lg); transition: border-color .12s, transform .12s, box-shadow .12s; }
.role-card:hover { border-color: var(--teal); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.role-card .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--navy); color: #5EEAD4; }
.role-card .ic svg { width: 18px; height: 18px; }
@media (max-width: 1100px) { .roles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .land-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 24px; } .benefits { grid-template-columns: minmax(0, 1fr); } }
.flowcard { padding: 18px; display: flex; flex-direction: column; gap: 0; }
.fc-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.fc-row:last-child { border-bottom: 0; }
.fc-row .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--fg-2); }
.fc-row .ic svg { width: 16px; height: 16px; }
.fc-row.done .ic { background: var(--teal-soft); color: var(--teal-ink); }

/* Walkthrough */
.tour { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px)); z-index: 75; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.tour.shift { z-index: 85; right: calc(min(640px, 100vw) + 16px); }
@media (max-width: 1100px) { .tour.shift { display: none; } }
.tour-h { background: var(--navy); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.tour-prog { display: flex; gap: 3px; padding: 10px 14px 0; }
.tour-prog i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-2); }
.tour-prog i.done { background: var(--teal); } .tour-prog i.cur { background: var(--navy-2); }
:root[data-theme="dark"] .tour-prog i.cur { background: var(--teal-ink); }
.tour-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.tour-min { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 75; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Refinements */
@media (min-width: 721px) { .toasts { top: calc(66px + env(safe-area-inset-top, 0px)); bottom: auto; } }
.t td.med { min-width: 170px; }
.t td.med b, .t td.med .mname { white-space: nowrap; }
.land-foot { max-width: 1200px; margin: 0 auto; padding-block: 20px 32px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); border-top: 1px solid var(--border); }
.land-foot .muted { max-width: 70ch; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--fg-2); background: var(--surface); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 900px) { .search kbd { display: none; } }
.rxdoc .vcode { font-family: var(--mono); font-size: 11px; color: #64748B; letter-spacing: .06em; }
@media print {
  body * { visibility: hidden !important; }
  .rxdoc, .rxdoc * { visibility: visible !important; }
  .rxdoc { position: fixed; inset: 0; border: 0; margin: 0; padding: 32px; }
  body::before { display: none; }
}

.side-org { margin: 0 0 6px; }
.side-org-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--side-fg); cursor: pointer; text-align: left; }
.side-org-btn:hover { background: rgba(255,255,255,.08); }
.side-org .menu { color: var(--fg); }
.side-reset { color: var(--side-muted); height: 30px; font-size: 12.5px; }
@media (max-width: 1180px) and (min-width: 721px) { .side-org-btn { justify-content: center; padding: 8px 0; } }
.flag-ok { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); }
.cell2 { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cell2 .xs { color: var(--fg-2); }
.drawer-b > *, .modal-b > * { flex-shrink: 0; }
.drawer .tabs { margin: -4px 0 0; }

/* Sign-in */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); background: var(--bg); }
.login-side { background: var(--navy); color: #C9D4E3; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-block: 32px; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: 32px; position: sticky; top: 0; height: 100vh; height: 100dvh; }
.login-side h1 { color: #fff; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 650; max-width: 16ch; }
.login-side p { max-width: 46ch; font-size: 15px; color: #B9C6D8; }
.login-sync { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #B9C6D8; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); flex: none; }
.live-dot.off { background: #94A3B8; box-shadow: none; }
.login-main { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-block: 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font-size: 20px; font-weight: 650; }
.login-accounts { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; }
.acct-group { display: flex; flex-direction: column; gap: 4px; }
.acct-role { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg-2); padding: 4px 2px 0; }
.acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.acct:hover { border-color: var(--border-2); background: var(--surface-2); }
.acct.on { border-color: var(--teal); background: var(--teal-soft); }
@media (max-width: 860px) { .login { grid-template-columns: minmax(0, 1fr); } .login-side { position: static; height: auto; padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); gap: 18px; } .login-side h1 { font-size: 24px; } .login-side p { display: none; } .login-main { padding-block: 24px 40px; } }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--success-soft); color: var(--success); }
.sync-pill .live-dot { width: 7px; height: 7px; box-shadow: none; animation: pulse 2s infinite; }
.sync-pill.local { background: var(--surface-2); color: var(--fg-2); }
.sync-pill.warn { background: var(--warning-soft); color: var(--warning); }
.sync-pill.warn .live-dot, .sync-pill.local .live-dot { background: currentColor; animation: none; }
@media (max-width: 720px) { .sync-pill { font-size: 0; gap: 0; padding: 0; width: 26px; justify-content: center; } }
.eid-input { height: 44px; font-size: 18px; letter-spacing: .06em; }
.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 56px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--fg-2); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 5px; }
.pw-eye:hover { background: var(--surface-2); color: var(--fg); }
.side-help { font-size: 11px; color: var(--side-muted); padding: 2px 10px; }
/* Licence number + expiry */
.lic { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; vertical-align: middle; }
.lic .mono { font-size: 12px; }
.lic-exp { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; white-space: nowrap; background: var(--success-soft); color: var(--success); }
.lic-exp i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lic.expiring .lic-exp { background: var(--warning-soft); color: var(--warning); }
.lic.expired .lic-exp { background: var(--danger-soft); color: var(--danger); }
.rxdoc .lic-exp { background: #E8F6EC; color: #15803D; }
.rxdoc .lic.expiring .lic-exp { background: #FDF3E3; color: #B45309; }
.rxdoc .lic.expired .lic-exp { background: #FDECEC; color: #B91C1C; }
.eid-input.reading { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.reader-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--teal-soft); color: var(--fg); flex-wrap: wrap; }
.reader-status.warn { background: var(--warning-soft); }
.reader-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: pulse 1.2s infinite; flex: none; }
.chip .avatar { width: 18px; height: 18px; font-size: 8px; }
/* Patient portal */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 720px) { .pt-grid { grid-template-columns: minmax(0, 1fr); } }
.pt-rx { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pt-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.pt-step { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--fg-3); font-weight: 500; }
.pt-step i { height: 4px; border-radius: 99px; background: var(--surface-2); }
.pt-step.done { color: var(--fg-2); } .pt-step.done i { background: var(--teal); }
.pt-step.cur { color: var(--fg); font-weight: 600; } .pt-step.cur i { background: var(--navy-2); }
:root[data-theme="dark"] .pt-step.cur i { background: var(--teal-ink); }
.pt-show { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--teal-soft); color: var(--fg); }
.pt-show svg { color: var(--teal-ink); flex: none; }
.pt-code { font-size: 22px; font-weight: 650; letter-spacing: .18em; }
@media (max-width: 640px) { .roles-grid { grid-template-columns: minmax(0, 1fr) !important; } }
.login-card .seg { margin-bottom: 2px; }

/* HealthPass brand (patients): Future Dusk */
:root[data-brand="hp"] { --navy: #0C2347; --navy-2: #123461; --teal: #2C62B0; --teal-soft: #E8F0FA; --teal-ink: #1D4E94; --side-active: rgba(255,255,255,.09); }
@media (prefers-color-scheme: dark) { :root[data-brand="hp"]:not([data-theme="light"]) { --navy: #071629; --navy-2: #10284A; --teal: #6E9EE6; --teal-soft: #13294A; --teal-ink: #BFD6F8; } }
:root[data-brand="hp"][data-theme="dark"] { --navy: #071629; --navy-2: #10284A; --teal: #6E9EE6; --teal-soft: #13294A; --teal-ink: #BFD6F8; }
:root[data-brand="hp"] .nav-i.on { background: rgba(110,158,230,.22); }
:root[data-brand="hp"] .nav-i.on svg { color: #BFD6F8; }

/* Booking */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); font-weight: 600; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.svc { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.date-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.date-chip { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.date-chip b { font-size: 17px; }
.date-chip.on { border-color: var(--teal); background: var(--teal-soft); }
.date-chip:disabled { opacity: .45; cursor: not-allowed; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.slot { height: 34px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-variant-numeric: tabular-nums; font-size: 13px; }
.slot:hover { border-color: var(--teal); }
.slot.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.cal-badge { width: 52px; height: 56px; border-radius: 10px; border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.cal-badge span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-ink); font-weight: 600; }
.cal-badge b { font-size: 20px; line-height: 1.1; }
.appt-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.appt-row:last-child { border-bottom: 0; }
.appt-time { width: 92px; display: flex; flex-direction: column; flex: none; }
.sched-row { border-bottom: 1px solid var(--border); }
.sched-row .appt-row { border-bottom: 0; padding-bottom: 4px; }
.sched-pt { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px 122px; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; flex-wrap: wrap; }
.sched-pt:hover b { text-decoration: underline; }
@media (max-width: 720px) { .sched-pt { padding-left: 16px; } .appt-time { width: auto; flex-direction: row; gap: 8px; flex-basis: 100%; align-items: baseline; } .appt-row { gap: 6px 14px; } .appt-row > .grow { flex-basis: 100%; } }
.vital-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.vital { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; }
.vital b { font-size: 22px; letter-spacing: -0.02em; }
.vital:hover { border-color: var(--border-2); background: var(--surface-2); }
/* Video */
.video-room { position: fixed; inset: 0; z-index: 95; background: #0E0D1C; color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.vr-main { position: relative; display: flex; flex-direction: column; min-height: 0; }
.vr-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.vr-secure { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: #B9B5E8; }
.vr-remote { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #C9C6EE; }
.vr-remote .avatar.lg { width: 120px; height: 120px; font-size: 40px; }
.vr-self { position: absolute; right: 20px; bottom: 96px; width: 180px; height: 120px; border-radius: 12px; background: #24223D; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.vr-self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vr-ctl { display: flex; justify-content: center; gap: 14px; padding: 18px; }
.vr-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.vr-btn svg { width: 22px; height: 22px; }
.vr-btn.off { background: rgba(255,255,255,.3); }
.vr-btn.end { background: #DC2626; }
.vr-side { width: min(440px, 42vw); background: var(--surface); color: var(--fg); overflow-y: auto; padding: 16px; border-left: 1px solid var(--border); }
@media (max-width: 860px) { .video-room { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .vr-side { width: auto; max-height: 45vh; } .vr-self { width: 110px; height: 80px; bottom: 90px; right: 12px; } }
/* Records */
.enc { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.enc-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: none; border: 0; cursor: pointer; text-align: left; flex-wrap: wrap; }
.enc-b { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.fhir { max-height: 55vh; overflow: auto; font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 0; white-space: pre; }
.enc-form .fgrid.vit { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.check-list { display: flex; flex-direction: column; }
.check-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: 0; }

.login.hp .login-side { background: #0C2347; }
/* attachments and lab entry */
.att-view { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.att-view.pdf { width: 100%; height: 70vh; }
.reply-box { margin-top: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.reply-box textarea { resize: vertical; min-height: 56px; }
.lab-mini { padding: 10px 12px; background: var(--surface-2, var(--bg)); }
.lab-entry td { vertical-align: middle; }
.lab-entry .inp { height: 34px; }
.lab-entry .lab-val { width: 110px; font-weight: 600; }
.lab-pick input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal); }
.pdf-wrap { max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.pdf-page { display: block; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.12); border-radius: 4px; }
@media (max-width: 640px) {
  .lab-entry thead { display: none; }
  .lab-entry tr { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .lab-entry td { border: 0 !important; padding: 0 !important; }
  .lab-entry td:nth-child(2) { grid-row: span 2; align-self: center; }
  .lab-entry td:nth-child(3), .lab-entry td:nth-child(4) { grid-column: 1; font-size: 12px; }
  .lab-entry td:nth-child(4)::before { content: 'Ref '; color: var(--faint, #94a3b8); }
}

/* ===================== HealthPass app ===================== */
/* Dusk palette: Future Dusk violet, an evening-sky home screen, an afterglow apricot for anything that needs attention. */
:root[data-brand="hp"] {
  --dusk-ink: #0A1D3A; --dusk: #163E75; --dusk-2: #2456A0; --haze: #EEF2F8; --glow: #3D7BD9; --glow-soft: #E6EEF9; --sage: #1D4E94;
  --hp-display: 'Bricolage Grotesque', 'Instrument Sans', var(--font); --hp-text: 'Instrument Sans', var(--font);
}
:root[data-brand="hp"][data-theme="dark"] { --haze: #07111F; --dusk-ink: #E9E7FA; --glow-soft: #13294A; }
@media (prefers-color-scheme: dark) { :root[data-brand="hp"]:not([data-theme="light"]) { --haze: #07111F; --dusk-ink: #E9E7FA; --glow-soft: #13294A; } }

.hpx-stage { min-height: 100dvh; background: var(--haze); }
.hpx { position: relative; height: 100dvh; display: flex; flex-direction: column; background: var(--haze); font-family: var(--hp-text); color: var(--fg); overflow: hidden; transform: translateZ(0); }
@media (min-width: 720px) {
  .hpx-stage { display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 0%, #12305C 0%, #081A33 70%); }
  .hpx { width: 410px; height: min(880px, calc(100dvh - 48px)); border-radius: 40px; box-shadow: 0 0 0 10px #050E1C, 0 30px 80px rgba(0,0,0,.45); }
}
.hpx-content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 96px; scroll-behavior: smooth; }

/* top bar */
.hpx-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 8px 18px; background: color-mix(in srgb, var(--haze) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hpx-bar.on-dusk { background: transparent; backdrop-filter: none; }
.hpx-bar.on-dusk .btn.ghost { color: #fff; }
.hpx-bar.on-dusk .btn.ghost:hover { background: rgba(255,255,255,.12); }
.hpx-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--hp-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--dusk-ink); }
.hpx-me { position: relative; background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; }
.hpx-me .avatar { width: 34px; height: 34px; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.hpx-dot { position: absolute; top: 1px; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 2px var(--haze); }
.hpx .menu { right: -40px; width: min(340px, calc(100vw - 24px)); border-radius: 18px; }

/* tab bar: four quiet tabs and a raised Book button */
.hpx-tabs { position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: 64px; padding: 0 6px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(8,26,51,.16), 0 0 0 1px rgba(8,26,51,.06); }
.hpx-tab { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; color: var(--fg-3); font: 600 11px/1 var(--hp-text); }
.hpx-tab .ic svg { width: 22px; height: 22px; stroke-width: 1.8; }
.hpx-tab.on { color: var(--dusk); }
.hpx-tab.on .ic svg { stroke-width: 2.3; }
.hpx-tab.book .ic { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 18px; color: #fff; background: linear-gradient(160deg, var(--dusk-2), var(--dusk-ink)); box-shadow: 0 8px 20px rgba(22,62,117,.45); transition: transform .15s; }
.hpx-tab.book .ic svg { width: 26px; height: 26px; stroke-width: 2.4; }
.hpx-tab.book:active .ic { transform: scale(.94); }
.hpx-tab.book.on { color: var(--dusk); }
.hpx-tab:focus-visible { outline: 2px solid var(--dusk); outline-offset: -4px; border-radius: 14px; }
:root[data-theme="dark"] .hpx-tab.on, :root[data-theme="dark"] .hpx-tab.book.on { color: #A9C8F5; }

/* home: the dusk sky */
.dusk { position: relative; padding: calc(64px + env(safe-area-inset-top)) 20px 44px; color: #fff; background: linear-gradient(178deg, #06142B 0%, #0C2347 38%, #163E75 72%, #1C4682 92%, #2A5C9E 100%); border-radius: 0 0 34px 34px; overflow: hidden; }
.dusk::after { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 90%; background: radial-gradient(closest-side, rgba(127,176,245,.35), transparent); pointer-events: none; }
.dusk > * { position: relative; z-index: 1; }
.dusk-hi span { font-size: 14px; color: rgba(255,255,255,.72); }
.dusk-hi h1 { font-family: var(--hp-display); font-weight: 700; font-size: 38px; line-height: 1.02; letter-spacing: -.03em; margin-top: 2px; }
.dusk-gauge { display: block; width: 100%; margin: 10px 0 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.horizon { width: 100%; height: auto; display: block; overflow: visible; }
.horizon-sun { animation: rise 1.1s cubic-bezier(.2,.8,.2,1) both; transform-origin: 150px 146px; }
.horizon-trail { stroke-dasharray: 420; animation: trail 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: rotate(-60deg); } to { opacity: 1; transform: none; } }
@keyframes trail { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .horizon-sun, .horizon-trail { animation: none; } }
.dusk-score { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dusk-score b { font-family: var(--hp-display); font-size: 64px; font-weight: 800; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dusk-score span { font-size: 13px; font-weight: 500; color: #FFFFFF; }
.dusk-reads { display: flex; gap: 8px; overflow-x: auto; margin: 18px -20px 0; padding: 0 20px 2px; scrollbar-width: none; }
.dusk-reads::-webkit-scrollbar { display: none; }
.dusk-read { flex: none; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 14px 10px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; text-align: left; }
.dusk-read svg { grid-row: span 2; width: 18px; height: 18px; color: #FFFFFF; }
.dusk-read b { font-family: var(--hp-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dusk-read span { font-size: 11px; color: rgba(255,255,255,.66); }
.dusk-sync { margin-top: 10px; font-size: 11.5px; color: rgba(255,255,255,.55); }

.hp-body { padding: 0 16px; margin-top: -22px; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 22px; }
.hp-sec h2 { font-family: var(--hp-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--dusk-ink); margin: 0 4px 10px; }
.hp-sec-h { display: flex; justify-content: space-between; align-items: baseline; }
.hp-link { background: none; border: 0; padding: 0; color: var(--dusk); font: 600 13.5px var(--hp-text); cursor: pointer; }
:root[data-theme="dark"] .hp-link { color: #A9C8F5; }

.glow-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 18px; border: 0; background: var(--glow-soft); color: var(--fg); font: 500 13.5px/1.4 var(--hp-text); cursor: pointer; box-shadow: 0 6px 18px rgba(61,123,217,.18); }
.glow-note svg { flex: none; width: 18px; height: 18px; color: #1D4E94; margin-top: 1px; }
.hp-body > .glow-note:first-child { margin-top: 0; }

.next-visit { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: 0 1px 0 rgba(8,26,51,.04), 0 8px 24px rgba(8,26,51,.06); width: 100%; border: 0; text-align: left; font: inherit; color: inherit; }
.next-visit.empty { cursor: pointer; padding: 18px; }
.nv-date { flex: none; width: 54px; height: 60px; border-radius: 16px; background: var(--dusk); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nv-date span { font-size: 11px; font-weight: 600; color: #FFFFFF; }
.nv-date b { font-family: var(--hp-display); font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.hp-cta { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--dusk); color: #fff; font: 600 14px var(--hp-text); cursor: pointer; }
.hp-cta svg { width: 16px; height: 16px; }

.quick { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; width: 82px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font: 500 12px/1.2 var(--hp-text); color: var(--fg); text-align: center; }
.quick button span { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); color: var(--dusk); box-shadow: 0 6px 18px rgba(8,26,51,.07); }
.quick button svg { width: 24px; height: 24px; }
:root[data-theme="dark"] .quick button span { color: #A9C8F5; }

.hp-list { border-radius: 22px; background: var(--surface); overflow: hidden; box-shadow: 0 8px 24px rgba(8,26,51,.05); }
.hp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hp-row + .hp-row { box-shadow: inset 0 1px 0 var(--border); }
.hp-row:active { background: var(--surface-2); }
.hp-ic { flex: none; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: #E6EEF9; color: var(--dusk); }
.hp-ic.warm { background: var(--glow-soft); color: #1D4E94; }
.hp-ic svg { width: 19px; height: 19px; }
:root[data-theme="dark"] .hp-ic { background: #13294A; color: #A9C8F5; }
.plus-band { display: flex; align-items: center; gap: 12px; padding: 16px; border: 0; border-radius: 22px; background: var(--dusk-ink); color: #fff; text-align: left; font: inherit; cursor: pointer; }
.plus-band > svg:first-child { color: #FFFFFF; width: 22px; height: 22px; }
.plus-band .small { color: rgba(255,255,255,.7); }

/* every other screen inside the app */
.hpx-page { padding: calc(64px + env(safe-area-inset-top)) 16px 8px; display: flex; flex-direction: column; gap: 16px; }
.hpx-page .ph { flex-direction: column; align-items: stretch; gap: 12px; margin: 4px 4px 0; }
.hpx-page .ph .crumbs { display: none; }
.hpx-page .ph h1 { font-family: var(--hp-display); font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; color: var(--dusk-ink); }
.hpx-page .ph > .row { gap: 8px; }
.hpx-page .grid2, .hpx-page .grid2.even, .hpx-page .grid3 { grid-template-columns: minmax(0, 1fr) !important; }
.hpx-page .card { border: 0; border-radius: 22px; box-shadow: 0 8px 24px rgba(8,26,51,.05); }
.hpx-page .card .card { box-shadow: none; border: 1px solid var(--border); border-radius: 16px; }
.hpx-page .card-h h3 { font-family: var(--hp-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.hpx-page .btn { border-radius: 999px; font-family: var(--hp-text); }
.hpx-page .btn.primary, .hpx .modal .btn.primary { background: var(--dusk); border-color: var(--dusk); }
.hpx-page .chip { border-radius: 999px; }
.hpx-page .chip.on { background: var(--dusk); color: #fff; border-color: var(--dusk); }
.hpx-page .chip-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.hpx-page .chip-row::-webkit-scrollbar { display: none; }
.hpx-page .chip-row .chip { flex: none; }
.hpx-page .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.hpx-page .tabs button { flex: none; }
.hpx-page .kpis, .hpx-page .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.hpx-page h1 + div .mono { font-family: var(--hp-text); }
.hpx-page .search { border-radius: 999px; }
.hpx-page .table-wrap { margin: 0 -2px; }

/* sheets and dialogs slide up from the bottom of the app */
.hpx .modal-wrap, .hpx-overlay .modal-wrap { place-items: end center; padding: 0; }
.hpx .modal, .hpx-overlay .modal { width: 100% !important; max-width: 520px; border-radius: 28px 28px 0 0; max-height: 92%; border: 0; animation: sheet .24s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.hpx .modal-h h3 { font-family: var(--hp-display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.hpx .modal .btn { border-radius: 999px; }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hpx .modal, .hpx-sheet { animation: none; } }
@media (min-width: 720px) { .hpx-overlay .modal-wrap { place-items: center; padding: 24px; } .hpx-overlay .modal { width: 410px !important; border-radius: 28px; } }

.hpx-sheet-wrap { position: absolute; inset: 0; z-index: 60; background: rgba(6,16,33,.42); display: flex; align-items: flex-end; }
.hpx-sheet { width: 100%; background: var(--haze); border-radius: 28px 28px 0 0; padding: 8px 14px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: sheet .24s cubic-bezier(.2,.8,.2,1); max-height: 90%; overflow-y: auto; }
.hpx-sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 2px auto 0; }
.hpx-who { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.hpx-who b { font-family: var(--hp-display); font-size: 19px; letter-spacing: -.02em; }
.hpx-x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg-2); }
.hpx-x svg { width: 18px; height: 18px; }
.hpx-group { background: var(--surface); border-radius: 20px; overflow: hidden; }
.hpx-li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; cursor: pointer; font: 500 15px var(--hp-text); color: var(--fg); text-align: left; }
.hpx-li + .hpx-li { box-shadow: inset 0 1px 0 var(--border); }
.hpx-li .ic { width: 32px; height: 32px; border-radius: 10px; background: #E6EEF9; color: var(--dusk); display: grid; place-items: center; flex: none; }
.hpx-li .ic svg { width: 17px; height: 17px; }
:root[data-theme="dark"] .hpx-li .ic { background: #13294A; color: #A9C8F5; }
.hpx-li .chev { width: 16px; height: 16px; color: var(--fg-3); }
.hpx-li.danger { color: var(--danger); }
.hpx-li.danger .ic { background: var(--danger-soft); color: var(--danger); }
.hpx-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #E6EEF9; color: var(--dusk); font: 700 12px/22px var(--hp-text); text-align: center; }
.hpx-count.hot { background: var(--glow); color: #fff; }
.hpx-bar { transition: background .2s; }
.hpx-page .eyebrow { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--dusk); }
:root[data-theme="dark"] .hpx-page .eyebrow { color: #A9C8F5; }

/* Home v2: shorter sky, readable readings, one list of what to do today */
.dusk { padding-bottom: 30px; }
.dusk-gauge { max-width: 268px; margin: 2px auto 0; }
.dusk-score b { font-size: 56px; }
.dusk-score span { color: rgba(255,255,255,.7); font-size: 12px; }
.dusk-why { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 10px; background: none; border: 0; color: #FFFFFF; font: 600 14px var(--hp-text); cursor: pointer; }
.dusk-why svg { width: 16px; height: 16px; }
.dusk-reads { display: grid; gap: 8px; overflow: visible; margin: 18px 0 0; padding: 0; }
.dusk-read { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; min-width: 0; }
.dusk-read .lbl { display: flex; align-items: center; gap: 4px; font-size: 11px; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dusk-read .lbl svg { width: 13px; height: 13px; grid-row: auto; flex: none; }
.dusk-read b { font-size: 20px; line-height: 1.1; }
.dusk-read .unit { font-size: 10.5px; color: rgba(255,255,255,.55); }
.dusk-read.hot { border-color: rgba(127,176,245,.7); background: rgba(127,176,245,.16); }
.dusk-read.hot .unit { color: #FFFFFF; font-weight: 600; }

.todo { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; }
.todo + .todo { box-shadow: inset 0 1px 0 var(--border); }
.todo-t { gap: 2px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.todo-t b { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--fg); }
.todo-t span { font-size: 12.5px; color: var(--fg-2); line-height: 1.35; }
.todo-a { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--dusk); color: #fff; font: 600 13px var(--hp-text); cursor: pointer; white-space: nowrap; }
.todo-a.warm { background: var(--glow-soft); color: #0C2347; }
.todo-a:focus-visible, .todo-t:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }
.hp-ic.sage { background: #E6EEF9; color: var(--sage); }
.hp-ic.glow { background: var(--glow-soft); color: #1D4E94; }
:root[data-theme="dark"] .hp-ic.sage { background: #13294A; }
:root[data-theme="dark"] .todo-a.warm { color: #FFFFFF; }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; overflow: visible; }
.quick button { width: auto; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: 0 6px 18px rgba(8,26,51,.05); text-align: left; font-size: 13px; font-weight: 600; min-height: 56px; }
.quick button span { width: 34px; height: 34px; border-radius: 11px; background: #E6EEF9; box-shadow: none; flex: none; }
.quick button svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .quick button span { background: #13294A; }
@media (max-width: 360px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nv-date.sm { width: 42px; height: 46px; border-radius: 13px; }
.nv-date.sm b { font-size: 19px; }
.nv-date.sm span { font-size: 10px; }
.hp-row .chev { width: 16px; height: 16px; color: var(--fg-3); flex: none; }
button.hp-list.hp-row { width: 100%; }
.hp-body { margin-top: 20px; }
.dusk-read .lbl { font-size: 11.5px; font-weight: 500; }
.hot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 3px rgba(127,176,245,.25); margin-left: 3px; }
.dusk-read.hot .unit { font-weight: 400; }
.hot-dot { display: inline-block; flex: none; }
.dusk-gauge { max-width: 240px; }
.dusk-hi h1 { font-size: 34px; }

/* ---------- Artwork ---------- */
.avatar.pic { background: none; overflow: hidden; }
.avatar.pic svg { width: 100%; height: 100%; }
.empty.has-art .empty-art { width: 168px; max-width: 70%; margin: 0 auto 6px; }
.empty-art svg { width: 100%; height: auto; display: block; border-radius: 20px; }
.svc-art { display: block; width: calc(100% + 32px); height: 108px; margin: -16px -16px 4px; border-radius: 12px 12px 0 0; }
.hpx-page .svc { overflow: hidden; }
.hpx-page .svc-art { border-radius: 22px 22px 0 0; height: 124px; }

.quick.art button { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; min-height: 0; border-radius: 18px; }
.quick.art .q-art { display: block; width: 100%; height: 64px; }
.quick.art .q-lb { width: auto; height: auto; background: none; display: block; padding: 8px 10px 10px; border-radius: 0; font-size: 12.5px; font-weight: 600; color: var(--fg); text-align: left; }

.feat { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.feat::-webkit-scrollbar { display: none; }
.feat-c { flex: none; width: 236px; scroll-snap-align: start; border: 0; padding: 0; border-radius: 22px; overflow: hidden; background: var(--surface); text-align: left; cursor: pointer; color: inherit; font: inherit; box-shadow: 0 8px 24px rgba(8,26,51,.07); display: flex; flex-direction: column; }
.feat-art { display: block; width: 100%; height: 128px; }
.feat-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.feat-b b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.feat-b span { font-size: 12.5px; color: var(--fg-2); line-height: 1.4; }
.feat-b .feat-p { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 14px; color: var(--dusk); display: flex; gap: 8px; align-items: baseline; }
.feat-p s { font-weight: 400; font-size: 12px; color: var(--fg-3); }
:root[data-theme="dark"] .feat-b .feat-p { color: #A9C8F5; }
.feat-c:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }

.empty-art.hp-list, .empty-art { }
button.empty-art { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 10px; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
button.empty-art .ea-art { width: 92px; height: 68px; border-radius: 14px; flex: none; }
.todo .avatar.lg { width: 38px; height: 38px; }
.login-art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; max-width: 420px; }
.login-art svg { width: 100%; height: auto; border-radius: 16px; display: block; }
.login-art svg:nth-child(2) { transform: translateY(14px); }
@media (max-width: 860px) { .login-art { display: none; } }

/* ---------- Motion ---------- */
/* One orchestrated moment on Home (sun rises, score climbs, readings arrive), living illustrations, and feedback on every tap. */
/* Opacity only: a transform here would trap sheets and dialogs inside the scroll area. */
.hpx-content { animation: fade-in .28s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dusk-hi { animation: hi-in .6s .05s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hi-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dusk-read { animation: read-in .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes read-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.dusk-why { animation: hi-in .5s .9s both; }
.horizon-sun circle:first-child { animation: glow 3.6s 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.18); opacity: .55; } }
.dusk-read.hot { animation: read-in .5s cubic-bezier(.2,.8,.2,1) both, hot 2.4s 1.4s ease-in-out 3; }
@keyframes hot { 50% { box-shadow: 0 0 0 4px rgba(127,176,245,.22); } }

/* illustrations breathe gently */
.art-halo { transform-box: fill-box; transform-origin: center; animation: halo 4s ease-in-out infinite; }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .18; } 50% { transform: scale(1.22); opacity: .3; } }
.art-wave { animation: wave 1.8s ease-in-out infinite; }
.art-wave.w2 { animation-delay: .3s; }
@keyframes wave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.art-bubble { animation: bubble 2.6s ease-in infinite; transform-box: fill-box; }
.art-bubble.b2 { animation-delay: 1.1s; }
@keyframes bubble { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.art-pulse { stroke-dasharray: 90; animation: ecg 2.8s ease-in-out infinite; }
@keyframes ecg { 0% { stroke-dashoffset: 90; } 45%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -90; } }

/* tap feedback */
.quick button, .feat-c, .todo-a, .hp-row, .next-visit, .plus-band, .dusk-read, .hpx-li, .svc .btn, .hp-cta { transition: transform .14s ease, box-shadow .2s ease; }
.quick button:active, .feat-c:active, .hp-row:active, .plus-band:active, .dusk-read:active, .next-visit:active { transform: scale(.97); }
.todo-a:active, .hp-cta:active { transform: scale(.93); }
@media (hover: hover) { .quick button:hover, .feat-c:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(8,26,51,.12); } }
.hpx-tab .ic { transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.hpx-tab.on:not(.book) .ic { transform: translateY(-2px) scale(1.08); }
.hpx-tab.on:not(.book)::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-top: 1px; animation: dot-in .25s cubic-bezier(.3,1.6,.5,1); }
.hpx-tab:not(.on) .lb { margin-bottom: 6px; }
@keyframes dot-in { from { transform: scale(0); } to { transform: scale(1); } }
.hpx-tab.book .ic { transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.hpx-tab.book:hover .ic { transform: rotate(90deg); }

/* booking confirmed */
.done-mark { display: grid; place-items: center; margin: 4px 0 2px; }
.done-mark svg { width: 64px; height: 64px; }
.done-mark circle { fill: none; stroke: var(--sage); stroke-width: 3; stroke-dasharray: 145; stroke-dashoffset: 145; animation: draw .5s ease-out forwards; }
.done-mark path { fill: none; stroke: var(--sage); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .45s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hpx-content, .dusk-hi, .dusk-read, .dusk-why, .horizon-sun circle, .art-halo, .art-wave, .art-bubble, .art-pulse, .hpx-tab::after { animation: none !important; }
  .done-mark circle, .done-mark path { animation: none; stroke-dashoffset: 0; }
  .quick button, .feat-c, .todo-a, .hp-row, .hpx-tab .ic { transition: none; }
}

/* ---------- App sign-in (phones, and the installed HealthPass app) ---------- */
.alog-stage { min-height: 100dvh; font-family: 'Instrument Sans', var(--font); }
.alog { position: relative; min-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow: hidden; transform: translateZ(0); }
.alog-stage.hp .alog { background: linear-gradient(178deg, #06142B 0%, #0C2347 45%, #163E75 78%, #1F4F8F 100%); }
.alog-stage.cr .alog { background: linear-gradient(178deg, #0B1524 0%, #14243A 50%, #123461 85%, #1D4E94 100%); }
@media (min-width: 761px) {
  .alog-stage { display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 0%, #12305C 0%, #081A33 70%); }
  .alog-stage.cr { background: radial-gradient(120% 80% at 50% 0%, #1C3150 0%, #0A1422 70%); }
  .alog { width: 410px; min-height: 0; height: min(880px, calc(100dvh - 48px)); border-radius: 40px; box-shadow: 0 0 0 10px #050E1C, 0 30px 80px rgba(0,0,0,.45); }
}
.alog-welcome { flex: 1; display: flex; flex-direction: column; padding: calc(22px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); gap: 18px; animation: page-in .4s cubic-bezier(.2,.8,.2,1); }
.alog-brand { display: flex; }
.alog-art { position: relative; flex: 1; min-height: 230px; }
.alog-art svg { position: absolute; width: 46%; height: auto; border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.alog-art .a1 { left: 2%; top: 14%; transform: rotate(-7deg); animation: float 6s ease-in-out infinite; }
.alog-art .a2 { right: 2%; top: 4%; transform: rotate(6deg); animation: float 6s 1.5s ease-in-out infinite; }
.alog-art .a3 { left: 27%; top: 48%; width: 50%; transform: rotate(-2deg); animation: float 6s 3s ease-in-out infinite; z-index: 1; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.alog-copy h1 { font-family: 'Bricolage Grotesque', var(--font); font-size: 36px; font-weight: 700; line-height: 1.04; letter-spacing: -.035em; max-width: 12ch; }
.alog-copy p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.72); max-width: 34ch; }
.alog-cta { display: flex; flex-direction: column; gap: 10px; }
.alog-primary { height: 54px; border: 0; border-radius: 18px; background: #fff; font: 700 16px 'Instrument Sans', var(--font); cursor: pointer; transition: transform .14s; }
.alog-stage.hp .alog-primary { color: #0C2347; }
.alog-stage.cr .alog-primary { color: #14243A; }
.alog-primary:active { transform: scale(.97); }
.alog-switch { height: 46px; border-radius: 16px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; font: 600 14px 'Instrument Sans', var(--font); cursor: pointer; }
.alog-primary:focus-visible, .alog-switch:focus-visible, .alog-back:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

.alog-form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.alog-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; justify-items: center; padding: calc(12px + env(safe-area-inset-top)) 14px 18px; }
.alog-back { width: 40px; height: 40px; border-radius: 14px; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.alog-back svg { width: 20px; height: 20px; }
.alog-sheet { flex: 1; overflow-y: auto; background: var(--surface); color: var(--fg); border-radius: 30px 30px 0 0; padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; animation: sheet .34s cubic-bezier(.2,.8,.2,1); }
.alog-sheet .login-card { width: 100%; border: 0; box-shadow: none; padding: 0; gap: 14px; }
.alog-sheet .login-card .seg { display: none; }
.alog-sheet .login-card h2 { font-family: 'Bricolage Grotesque', var(--font); font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.alog-sheet .inp { height: 48px; border-radius: 14px; font-size: 16px; }
.alog-sheet .btn.primary { height: 52px !important; border-radius: 16px; font-size: 16px; }
.alog-stage.hp .alog-sheet .btn.primary { background: #163E75; border-color: #163E75; }
.alog-demo { border-top: 1px solid var(--border); padding-top: 12px; }
.alog-demo summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--fg-2); list-style: none; display: flex; justify-content: space-between; }
.alog-demo summary::after { content: '▾'; color: var(--fg-3); }
.alog-demo[open] summary::after { content: '▴'; }
.alog-demo .login-accounts { width: 100%; margin-top: 10px; }
.alog-demo .login-accounts .eyebrow { display: none; }
@media (prefers-reduced-motion: reduce) { .alog-art svg, .alog-welcome, .alog-sheet { animation: none; } }
.hpx .modal-wrap, .hpx-overlay .modal-wrap { display: flex; align-items: flex-end; justify-content: center; }
.hpx .modal, .hpx-overlay .modal { max-height: calc(100% - 56px); }
@media (min-width: 720px) { .hpx-overlay .modal-wrap { align-items: center; } }

/* ---------- Rewards, tiers, profile ---------- */
.tier-bronze { --t1: #8C5A3C; --t2: #C98C5E; --t3: #F2C9A0; }
.tier-silver { --t1: #5E6576; --t2: #9AA3B5; --t3: #E3E7EF; }
.tier-gold { --t1: #8A6417; --t2: #D3A23C; --t3: #FBE3A8; }
.tier-platinum, .tier-plat { --t1: #0C2347; --t2: #2C62B0; --t3: #D3E2F6; }
.tier-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 24px; border: 0; text-align: left; color: #fff; font: inherit; background: linear-gradient(135deg, var(--t1), var(--t2) 70%, var(--t3)); box-shadow: 0 14px 34px rgba(8,26,51,.18); }
button.tier-card { cursor: pointer; }
.tc-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.tc-tier { display: inline-flex; align-items: center; gap: 6px; font-family: var(--hp-display, inherit); font-weight: 700; font-size: 18px; }
.tc-tier svg { width: 16px; height: 16px; fill: currentColor; }
.tc-plan { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); }
.tc-pts { display: flex; align-items: baseline; gap: 6px; position: relative; z-index: 1; margin-top: 6px; }
.tc-pts b { font-family: var(--hp-display, inherit); font-size: 42px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-pts span { font-size: 14px; opacity: .8; }
.tc-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; position: relative; z-index: 1; margin-top: 6px; }
.tc-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; animation: grow 1s .2s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tc-next { font-size: 12.5px; opacity: .88; position: relative; z-index: 1; }
.tc-orbit { position: absolute; right: -70px; top: -60px; width: 220px; height: 220px; fill: none; stroke: rgba(255,255,255,.18); stroke-width: 1.5; animation: spin 40s linear infinite; }
.tc-orbit .tc-sun { fill: rgba(255,255,255,.65); stroke: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.tier-card.compact .tc-pts b { font-size: 30px; }

.rw-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.rw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rw-stats > div { background: var(--surface); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; border: 1px solid var(--border); }
.rw-stats b { font-family: var(--hp-display, inherit); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.rw-stats span { font-size: 12px; color: var(--fg-2); }
.hpx-page .rw-top { grid-template-columns: minmax(0, 1fr); }
.hpx-page .rw-stats > div { border: 0; }
.rw-h { font-family: var(--hp-display, inherit); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.hpx-page .reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reward { background: var(--surface); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); }
.hpx-page .reward { border: 0; box-shadow: 0 8px 22px rgba(8,26,51,.06); }
.reward .rw-art { display: block; width: 100%; height: 88px; }
.reward.locked .rw-art { filter: grayscale(.55) opacity(.75); }
.rw-b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rw-b b { font-size: 13.5px; line-height: 1.25; }
.rw-b > span { font-size: 11.5px; color: var(--fg-2); }
.rw-cost { font-weight: 700; font-size: 13px; color: var(--dusk, var(--teal-ink)); white-space: nowrap; }
.voucher { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--dusk, #163E75) 45%, transparent); }
.voucher > svg { width: 22px; height: 22px; color: var(--glow, #3D7BD9); flex: none; }
.v-code { font-family: var(--mono); font-weight: 600; font-size: 13px; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); letter-spacing: .04em; }
.v-code.lg { font-size: 20px; padding: 8px 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hpx-page .plan-grid { grid-template-columns: minmax(0, 1fr); }
.plan { background: var(--surface); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); }
.plan.cur { border: 2px solid var(--dusk, var(--teal)); }
.plan-premium { background: linear-gradient(160deg, #0C2347, #163E75); color: #fff; border: 0; }
.plan-premium ul li svg { color: #FFFFFF !important; }
.plan-premium .plan-p span { color: rgba(255,255,255,.7); }
.plan-n { font-family: var(--hp-display, inherit); font-size: 20px; font-weight: 700; }
.plan-p { display: flex; align-items: baseline; gap: 6px; }
.plan-p b { font-family: var(--hp-display, inherit); font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.plan-p span { font-size: 13px; color: var(--fg-2); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0; flex: 1; }
.plan li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.35; }
.plan li svg { width: 16px; height: 16px; color: var(--sage, var(--success)); flex: none; margin-top: 1px; }
.tier-table { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.tier-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); }
.tier-row.on { box-shadow: inset 0 0 0 2px var(--dusk, var(--teal)); }
.tier-dot { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--t1), var(--t2), var(--t3)); flex: none; }
.pts { font-variant-numeric: tabular-nums; color: var(--sage, var(--success)); }
.pts.neg { color: var(--fg-2); }
.earn-list .hp-row { cursor: default; }
@media (max-width: 860px) { .rw-top { grid-template-columns: minmax(0, 1fr); } .plan-grid { grid-template-columns: minmax(0, 1fr); } }

.dusk-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.dusk-tier { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: linear-gradient(135deg, color-mix(in srgb, var(--t2) 55%, transparent), rgba(255,255,255,.06)); color: #fff; cursor: pointer; font: 500 12px var(--hp-text); animation: hi-in .6s .3s both; }
.dusk-tier svg { width: 15px; height: 15px; fill: var(--t3); color: var(--t3); }
.dusk-tier span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.dusk-tier b { font-size: 13px; }

/* HealthPass card */
.hp-card { position: relative; overflow: hidden; border-radius: 26px; padding: 18px 20px 16px; color: #fff; background: linear-gradient(150deg, #06142B 0%, #0C2347 45%, #163E75 85%, #1F4F8F 120%); box-shadow: 0 16px 40px rgba(8,26,51,.25); display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.hc-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.hc-brand { font-family: var(--hp-display, inherit); font-weight: 700; font-size: 16px; color: #FFFFFF; }
.hc-tier { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.hc-tier svg { width: 13px; height: 13px; fill: currentColor; }
.hc-name { font-family: var(--hp-display, inherit); font-size: 26px; font-weight: 700; letter-spacing: -.03em; position: relative; z-index: 1; }
.hc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; position: relative; z-index: 1; }
.hc-grid .wide { grid-column: 1 / -1; }
.hc-grid span { display: block; font-size: 11px; color: rgba(255,255,255,.62); }
.hc-grid b { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-eid { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); letter-spacing: .03em; }
.hc-eid button { border: 0; background: rgba(255,255,255,.14); color: #fff; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.hc-eid svg { width: 15px; height: 15px; }
.hc-allergy { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; padding: 8px 10px; border-radius: 12px; background: rgba(61,123,217,.2); color: #FFFFFF; position: relative; z-index: 1; }
.hc-allergy svg { width: 15px; height: 15px; }
.hc-orbit { position: absolute; right: -80px; bottom: -90px; width: 240px; height: 240px; fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1.5; animation: spin 50s linear infinite; }
.hc-orbit .tc-sun { fill: #7FB0F5; stroke: none; }

.pf-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hpx-page .pf-cols { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .pf-cols { grid-template-columns: minmax(0, 1fr); } }
.pf-sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 8px; }
.pf-sec h2 { font-family: var(--hp-display, inherit); font-size: 17px; font-weight: 700; letter-spacing: -.015em; color: var(--dusk-ink, var(--fg)); }
.pf-group { background: var(--surface); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.hpx-page .pf-group { border: 0; box-shadow: 0 8px 22px rgba(8,26,51,.05); }
.pf-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 14px; font-size: 14px; }
.pf-row + .pf-row, .pf-person + .pf-row, .pf-person + .pf-person, .pf-link + .pf-link { box-shadow: inset 0 1px 0 var(--border); }
.pf-k { color: var(--fg-2); font-size: 13px; }
.pf-v { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.pf-hint { font-size: 12px; color: var(--fg-2); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pf-person .todo-a { padding: 0; width: 36px; height: 36px; display: grid; place-items: center; }
.pf-tag { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--dusk, var(--teal-ink)); background: #E6EEF9; padding: 2px 7px; border-radius: 999px; }
.pf-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; font-size: 14px; color: inherit; }
.pf-link > svg:first-child { width: 18px; height: 18px; color: var(--dusk, var(--teal)); flex: none; }
.pf-link .chev { width: 16px; height: 16px; color: var(--fg-3); }
@media (prefers-reduced-motion: reduce) { .tc-orbit, .hc-orbit, .tc-bar i { animation: none; } }
.pf-v { align-items: flex-start; }
.rw-stats b { font-size: 17px; line-height: 1.15; }
.hpx-page .rw-stats > div { padding: 12px; }

/* ===================== HealthPass Pro app (phones) ===================== */
.crx { position: relative; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; transform: translateZ(0); }
.crx-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px 14px; background: var(--navy); color: #fff; z-index: 20; }
.crx-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crx-id b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.crx-id span { font-size: 11.5px; color: var(--side-fg); max-width: 46vw; }
.crx-bar .btn.ghost, .crx-bar .btn { color: #fff; background: transparent; border-color: transparent; box-shadow: none; }
.crx-bar .btn:hover { background: rgba(255,255,255,.1); }
.crx-eid .btn { width: 38px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
.crx-eid .btn svg { width: 19px; height: 19px; }
.crx-me { background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; }
.crx-me .avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.crx .menu { right: -40px; width: min(340px, calc(100vw - 24px)); border-radius: 16px; }
.crx-content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 96px; animation: fade-in .24s ease-out; }
.crx-page { padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 14px; }
.crx-page .ph { flex-direction: column; align-items: stretch; gap: 10px; margin: 2px 2px 0; }
.crx-page .ph .crumbs { display: none; }
.crx-page .ph h1 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.crx-page .ph > .row { gap: 8px; }
.crx-page .grid2, .crx-page .grid2.even, .crx-page .grid3 { grid-template-columns: minmax(0, 1fr) !important; }
.crx-page .card { border-radius: 16px; }
.crx-page .kpis, .crx-page .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.crx-page .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.crx-page .seg, .crx-page .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; max-width: 100%; }
.crx-page .seg button, .crx-page .tabs button { flex: none; }
.crx-page .btn { min-height: 38px; }

.crx-tabs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
.crx-tab { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--fg-3); font: 600 10.5px/1 var(--font); }
.crx-tab .ic { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 14px; transition: background .2s; }
.crx-tab .ic svg { width: 21px; height: 21px; stroke-width: 1.9; }
.crx-tab.on { color: var(--teal-ink); }
.crx-tab.on:not(.act) .ic { background: var(--teal-soft); }
.crx-tab.act .ic { width: 52px; height: 52px; margin-top: -24px; border-radius: 17px; color: #fff; background: linear-gradient(160deg, #14B8A6, #0B7A70); box-shadow: 0 8px 20px rgba(13,148,136,.4); transition: transform .15s; }
.crx-tab.act .ic svg { width: 24px; height: 24px; }
.crx-tab.act:active .ic { transform: scale(.93); }
.crx-badge { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font: 700 10px/17px var(--font); font-style: normal; text-align: center; }
.crx-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: 12px; }

.crx-sheet-wrap { position: absolute; inset: 0; z-index: 60; background: rgba(10,20,34,.45); display: flex; align-items: flex-end; }
.crx-sheet { width: 100%; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 88%; overflow-y: auto; animation: sheet .24s cubic-bezier(.2,.8,.2,1); }
.crx-sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 2px auto 0; }
.crx-who { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.crx-who b { font-size: 17px; }
.crx-x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg-2); flex: none; }
.crx-x svg { width: 18px; height: 18px; }
.crx-group { background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.crx-li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; cursor: pointer; font: 500 15px var(--font); color: var(--fg); text-align: left; }
.crx-li + .crx-li { box-shadow: inset 0 1px 0 var(--border); }
.crx-li.on { background: var(--teal-soft); }
.crx-li .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; flex: none; }
.crx-li .ic svg { width: 17px; height: 17px; }
.crx-li .chev { width: 16px; height: 16px; color: var(--fg-3); }
.crx-li.danger { color: var(--danger); }
.crx-li.danger .ic { background: var(--danger-soft); color: var(--danger); }
.crx-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--danger); color: #fff; font: 700 12px/22px var(--font); text-align: center; }

/* drawers and dialogs on phones become full-height sheets */
@media (max-width: 760px) {
  .drawer { width: 100% !important; max-width: 100% !important; border-radius: 22px 22px 0 0; top: 24px !important; height: calc(100dvh - 24px) !important; }
  .modal-wrap { place-items: end center; padding: 0 !important; }
  .modal { width: 100% !important; border-radius: 24px 24px 0 0; max-height: calc(100dvh - 40px); animation: sheet .24s cubic-bezier(.2,.8,.2,1); }
}
.time-select { height: 46px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hpx .time-select { border-radius: 14px; }

/* ---------- Visit tracker ---------- */
.trk { background: var(--surface); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 8px 24px rgba(8,26,51,.07); border: 1px solid var(--border); }
.hpx .trk { border: 0; }
.trk.moving { box-shadow: 0 0 0 2px color-mix(in srgb, var(--dusk, var(--teal)) 30%, transparent), 0 10px 28px rgba(8,26,51,.12); }
.trk-h { display: flex; align-items: center; gap: 12px; }
.trk-h b { font-size: 15px; font-weight: 650; line-height: 1.25; }
.trk-eta { font-size: 13px; font-weight: 600; color: var(--dusk, var(--teal-ink)); }
:root[data-theme="dark"] .trk-eta { color: #A9C8F5; }
.trk-btn { width: 36px; height: 36px; border-radius: 12px; border: 0; display: grid; place-items: center; background: #E6EEF9; color: var(--dusk, var(--teal-ink)); cursor: pointer; flex: none; }
:root[data-theme="dark"] .trk-btn { background: #13294A; color: #A9C8F5; }
.trk-btn svg { width: 17px; height: 17px; }
.trk-road { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.trk-from { width: 10px; height: 10px; border-radius: 50%; background: var(--dusk, var(--teal)); flex: none; }
.trk-to { color: var(--glow, var(--warning)); display: grid; flex: none; }
.trk-to svg { width: 20px; height: 20px; }
.trk-line { position: relative; flex: 1; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--border-2) 0 8px, transparent 8px 14px); }
.trk-line i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--dusk-2, var(--teal)), var(--dusk, var(--teal))); transition: width 1s ease; }
.trk-car { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--dusk, var(--teal)); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px color-mix(in srgb, var(--dusk, var(--teal)) 22%, transparent); transition: left 1s ease; animation: car-bob 1.2s ease-in-out infinite; }
.trk-car svg { width: 16px; height: 16px; }
@keyframes car-bob { 50% { transform: translate(-50%, calc(-50% - 2px)); } }
.trk-steps { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 4px; }
.trk-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; min-width: 0; }
.trk-steps .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-2); }
.trk-steps li.done .dot { background: var(--dusk, var(--teal)); }
.trk-steps li.cur .dot { background: var(--glow, var(--teal)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--glow, var(--teal)) 30%, transparent); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--glow, var(--teal)) 12%, transparent); } }
.trk-steps .lb { font-size: 10.5px; color: var(--fg-3); font-weight: 500; line-height: 1.2; }
.trk-steps li.done .lb, .trk-steps li.cur .lb { color: var(--fg); font-weight: 600; }
.trk-bar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; margin-top: -4px; }
.trk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--dusk, var(--teal)), var(--glow, var(--teal))); border-radius: 2px; transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { .trk-car, .trk-steps li.cur .dot { animation: none; } }
.crx-page .seg, .hpx-page .seg { min-width: 0; max-width: 100%; flex-shrink: 1; }
.crx-page .row.wrap > .seg, .hpx-page .row.wrap > .seg { flex-basis: 100%; }
.crx-page .card-h, .hpx-page .card-h { flex-wrap: wrap; }
.crx-page .card-h > *, .hpx-page .card-h > * { min-width: 0; max-width: 100%; }

/* ---------- HealthPass blue theme: text is black or white; buttons are blue, never green or yellow ---------- */
:root[data-brand="hp"] { --dusk-ink: #0A1D3A; --dusk: #163E75; --dusk-2: #2456A0; --haze: #EEF2F8; --glow: #2456A0; --glow-soft: #E6EEF9; --sage: #163E75; }
.dusk { background: linear-gradient(178deg, #050F22 0%, #0A1F42 40%, #123766 75%, #1C4E8E 100%); }
.dusk::after { background: radial-gradient(closest-side, rgba(127,176,245,.28), transparent); }
.dusk-hi span, .dusk-score span, .dusk-sync, .dusk-read .lbl, .dusk-read .unit { color: #fff; opacity: .78; }
.dusk-why, .dusk-read.hot .unit { color: #fff; }
.dusk-read.hot { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.14); }
.hot-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.hp-link, .trk-eta, .rw-cost, .pf-tag, .hpx-count, .feat-b .feat-p, .hpx-page .eyebrow, .hc-brand, .nv-date span { color: inherit; }
.hp-link, .trk-eta, .rw-cost, .feat-b .feat-p, .hpx-page .eyebrow, .pf-tag, .hpx-count { color: var(--fg) !important; }
.hp-link { text-decoration: underline; text-underline-offset: 3px; }
.hc-brand, .nv-date span { color: #fff; }
.hpx .pill, .hpx-overlay .pill, .alog .pill { color: var(--fg) !important; background: var(--surface-2) !important; border-color: transparent !important; }
.todo-a, .todo-a.warm, .hp-cta { background: var(--dusk); color: #fff; }
.glow-note { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1.5px #2456A0 inset, 0 6px 18px rgba(8,26,51,.08); }
.glow-note svg { color: #2456A0; }
.hp-ic, .hp-ic.warm, .hp-ic.glow, .hp-ic.sage, .hpx-li .ic, .quick button span, .trk-btn { background: #E6EEF9; color: #163E75; }
:root[data-theme="dark"] .hp-ic, :root[data-theme="dark"] .hpx-li .ic, :root[data-theme="dark"] .trk-btn, :root[data-theme="dark"] .quick button span { background: #13294A; color: #fff; }
.hpx-tab.on { color: var(--fg); }
.hpx-tab.on .ic { color: #163E75; }
:root[data-theme="dark"] .hpx-tab.on .ic { color: #fff; }
.hpx .avatar:not(.pic), .alog .avatar:not(.pic) { background: #2456A0 !important; color: #fff; }
.done-mark circle, .done-mark path { stroke: #2456A0; }
.trk-steps li.cur .dot { background: #2456A0; box-shadow: 0 0 0 4px rgba(36,86,160,.25); }
.trk-to { color: #2456A0; }
.trk-bar i { background: linear-gradient(90deg, #163E75, #2456A0); }
.plan li svg { color: #2456A0; }
.plan-premium { background: linear-gradient(160deg, #0A1F42, #163E75); }
.plan-premium ul li svg { color: #fff !important; }
.voucher { border-color: rgba(36,86,160,.5); }
.voucher > svg { color: #2456A0; }
.pts { color: var(--fg); font-weight: 700; }
.hc-allergy { background: rgba(255,255,255,.14); color: #fff; }
.hp-card { background: linear-gradient(150deg, #050F22 0%, #0C2347 45%, #163E75 85%, #2456A0 120%); }
.alog-stage.hp .alog { background: linear-gradient(178deg, #050F22 0%, #0A1F42 45%, #123766 80%, #1C4E8E 100%); }
.alog-stage.hp .alog-primary { color: #0A1D3A; }
.alog-stage.hp .alog-sheet .btn.primary { background: #163E75; border-color: #163E75; }
.hpx-page .btn.primary, .hpx .modal .btn.primary { background: #163E75; border-color: #163E75; color: #fff; }
.hpx-page .chip.on { background: #163E75; border-color: #163E75; color: #fff; }
.hpx-tab.book .ic { background: linear-gradient(160deg, #2456A0, #0A1D3A); box-shadow: 0 8px 20px rgba(22,62,117,.45); }
.dusk-tier svg { fill: #fff; color: #fff; }
.hpx-tab.book .ic, .hpx-tab.book.on .ic { color: #fff !important; }

/* ---------- Visit tracker v2: one navy card, a single journey, call and chat ---------- */
.trk2 { position: relative; overflow: hidden; border-radius: 24px; padding: 18px 18px 16px; color: #fff; background: linear-gradient(160deg, #050F22 0%, #0C2347 55%, #163E75 100%); box-shadow: 0 14px 34px rgba(8,26,51,.22); display: flex; flex-direction: column; gap: 14px; }
.trk2::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 28px rgba(255,255,255,.025); pointer-events: none; }
.trk2.done { padding-bottom: 18px; opacity: .92; }
.trk2-h { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.trk2-h .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.trk2-h b { font-size: 16px; font-weight: 650; line-height: 1.25; }
.trk2-h span { font-size: 12.5px; color: #fff; opacity: .7; }
.trk2-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.trk2-big { display: flex; align-items: baseline; gap: 8px; position: relative; z-index: 1; }
.trk2-big b { font-family: var(--hp-display, inherit); font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.trk2-big span { font-size: 15px; opacity: .75; }
.trk2-road { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.trk2-line { position: relative; flex: 1; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px); }
.trk2-line i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: #fff; transition: width 1s ease; }
.trk2-car { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #0C2347; display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(255,255,255,.14); transition: left 1s ease; animation: car-bob 1.2s ease-in-out infinite; }
.trk2-car svg { width: 17px; height: 17px; }
.trk2-pin { width: 20px; height: 20px; color: #fff; flex: none; }
.trk2-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.trk2-btn { height: 46px; border-radius: 15px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: rgba(255,255,255,.12); color: #fff; font: 600 14.5px var(--hp-text, inherit); text-decoration: none; cursor: pointer; transition: background .15s, transform .12s; }
.trk2-btn svg { width: 18px; height: 18px; }
.trk2-btn:hover { background: rgba(255,255,255,.2); }
.trk2-btn:active { transform: scale(.97); }
.trk2-btn.pri { background: #fff; color: #0A1D3A; }
.trk2-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.trk2-note { font-size: 13px; opacity: .75; position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .trk2-car { animation: none; } }

/* ---------- Medical ID ---------- */
.hpx-mid { width: 36px; height: 36px; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; background: #C62828; color: #fff; box-shadow: 0 4px 12px rgba(198,40,40,.35); }
.hpx-mid svg { width: 19px; height: 19px; stroke-width: 2.6; }
.hpx-mid-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 20px; border: 0; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--fg); }
.hpx-mid-row .ic { width: 36px; height: 36px; border-radius: 11px; background: #C62828; color: #fff; display: grid; place-items: center; flex: none; }
.hpx-mid-row .ic svg { width: 19px; height: 19px; stroke-width: 2.6; }
.hpx-mid-row b { font-size: 15px; }
.hpx-mid-row span span { font-size: 12px; color: var(--fg-2); }
.hpx-mid-row .chev { width: 16px; height: 16px; color: var(--fg-3); }
.hc-mid { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 11px; border: 0; background: #fff; color: #0A1D3A; font: 600 13px var(--hp-text, inherit); cursor: pointer; }
.hc-mid svg { width: 15px; height: 15px; color: #C62828; stroke-width: 2.6; }
.alog-brand { justify-content: space-between; align-items: center; }
.alog-mid { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 11px; border: 0; background: #C62828; color: #fff; font: 600 13px 'Instrument Sans', var(--font); cursor: pointer; }
.alog-mid svg { width: 15px; height: 15px; stroke-width: 2.6; }

.mid-wrap { position: absolute; inset: 0; z-index: 80; background: rgba(5,15,34,.5); display: flex; align-items: flex-end; animation: fade-in .2s; }
.alog .mid-wrap { position: absolute; }
.mid { width: 100%; max-height: 96%; overflow-y: auto; background: var(--haze, #EEF2F8); border-radius: 26px 26px 0 0; animation: sheet .28s cubic-bezier(.2,.8,.2,1); font-family: var(--hp-text, inherit); color: var(--fg); }
.mid-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; background: linear-gradient(160deg, #050F22, #0C2347); color: #fff; }
.mid-badge { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; }
.mid-badge svg { width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: #C62828; stroke-width: 2.8; }
.mid-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mid-x svg { width: 18px; height: 18px; }
.mid-who { display: flex; align-items: center; gap: 12px; padding: 4px 18px 16px; background: linear-gradient(160deg, #0C2347, #163E75); color: #fff; }
.mid-who .avatar { width: 52px; height: 52px; font-size: 17px; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.mid-who b { font-family: var(--hp-display, inherit); font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.mid-who span { font-size: 13px; opacity: .8; }
.mid-vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.1); }
.mid-vitals > div { background: #163E75; color: #fff; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.mid-vitals span { font-size: 11px; opacity: .75; }
.mid-vitals b { font-family: var(--hp-display, inherit); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.mid-vitals > div:first-child b { font-size: 22px; }
.mid-sos { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 16px 0; height: 50px; border-radius: 16px; background: #C62828; color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 0 8px 20px rgba(198,40,40,.3); }
.mid-sos svg { width: 20px; height: 20px; }
.mid-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.mid-sec { background: var(--surface); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.mid-sec.alert { box-shadow: inset 0 0 0 2px #C62828; }
.mid-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--fg); }
.mid-sec h3 svg { width: 16px; height: 16px; color: #163E75; }
.mid-sec.alert h3 svg { color: #C62828; }
:root[data-theme="dark"] .mid-sec h3 svg { color: #fff; }
.mid-sec p, .mid-sec li { font-size: 15px; }
.mid-sec ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.mid-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; align-items: baseline; }
.mid-row span { color: var(--fg-2); text-align: right; display: inline-flex; align-items: center; gap: 6px; }
.mid-sec.alert .mid-row b { font-size: 17px; }
.mid-flag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.mid-call { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.mid-call span { font-size: 13px; color: var(--fg-2); }
.mid-call a { width: 40px; height: 40px; border-radius: 13px; background: #163E75; color: #fff; display: grid; place-items: center; flex: none; }
.mid-call a svg { width: 18px; height: 18px; }
.mid-eye { border: 0; background: var(--surface-2); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.mid-eye svg { width: 14px; height: 14px; }
.mid-toggle { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); cursor: pointer; }
.mid-toggle > svg { width: 20px; height: 20px; color: #163E75; flex: none; }
.mid-toggle span span { display: block; font-size: 12px; color: var(--fg-2); margin-top: 2px; }
.mid-toggle input { width: 20px; height: 20px; accent-color: #163E75; }
.mid-foot { font-size: 12px; color: var(--fg-2); text-align: center; }
@media (min-width: 761px) { .alog-stage .mid-wrap, body > #root > .mid-wrap { align-items: center; } }
.pick-ph.on { box-shadow: inset 0 0 0 2px #163E75; }
.pick-ph input { accent-color: #163E75; width: 18px; height: 18px; }
.todo .hp-ic { align-self: center; height: 38px; }

/* =====================================================================
   App type scale (HealthPass and HealthPass Pro phone apps)
   Based on Apple's iOS text styles and Material 3's type scale, sized for phones:
   Large title 28 · Title 22 · Section 20 · Headline 17 · Body 16 · Subhead 15 · Footnote 13 · Caption 12 · Tab label 11
   Nothing smaller than 11px; inputs at 16px so iOS never zooms; one display size per screen for the key number.
   ===================================================================== */
:is(.hpx, .crx, .alog) {
  --fs-large: 28px; --fs-title: 22px; --fs-section: 20px; --fs-headline: 17px; --fs-body: 16px; --fs-sub: 15px; --fs-foot: 13px; --fs-cap: 12px; --fs-tab: 11px;
  font-size: var(--fs-body); line-height: 1.4; -webkit-text-size-adjust: 100%;
}
/* utility sizes inherited from the web version are desktop-dense; lift them on phones */
:is(.hpx, .crx, .alog, .hpx-overlay, .mid) .small { font-size: var(--fs-sub, 15px); }
:is(.hpx, .crx, .alog, .hpx-overlay, .mid) .xs { font-size: var(--fs-foot, 13px); }
:is(.hpx, .crx, .hpx-overlay) b.small, :is(.hpx, .crx, .hpx-overlay) .list-i b, :is(.hpx, .crx) .sched-row b.small { font-size: var(--fs-body, 16px); font-weight: 600; }
:is(.hpx, .crx, .hpx-overlay) p.small { font-size: var(--fs-sub, 15px); line-height: 1.45; }
:is(.hpx, .crx, .hpx-overlay, .alog) .pill { height: 26px; padding: 0 10px; font-size: var(--fs-foot, 13px); }
:is(.hpx, .crx, .hpx-overlay) .chip { font-size: 14px; padding: 5px 12px; }
:is(.hpx, .crx, .hpx-overlay, .alog) .btn { height: 44px; padding: 0 16px; font-size: var(--fs-sub, 15px); font-weight: 600; }
:is(.hpx, .crx, .hpx-overlay) .btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
:is(.hpx, .crx, .hpx-overlay, .alog) .inp { height: 46px; font-size: 16px; padding: 0 12px; }
:is(.hpx, .crx, .hpx-overlay, .alog) textarea.inp { height: auto; padding: 10px 12px; }
:is(.hpx, .crx, .hpx-overlay, .alog) .field > label { font-size: 14px; font-weight: 600; }
:is(.hpx, .crx, .hpx-overlay) .t th { font-size: var(--fs-foot, 13px); }
:is(.hpx, .crx, .hpx-overlay) .t td { font-size: 15px; }
:is(.hpx, .crx) .kpi .lbl { font-size: 14px; }
:is(.hpx, .crx) .kpi .val { font-size: 26px; font-weight: 700; }
:is(.hpx, .crx) .kpi .sub { font-size: var(--fs-foot); }
:is(.hpx, .crx, .hpx-overlay) .card-h h3 { font-size: var(--fs-headline); font-weight: 700; }
:is(.hpx, .crx, .hpx-overlay) .modal-h h3 { font-size: var(--fs-title, 22px); }
:is(.hpx, .crx, .hpx-overlay) .modal-h .muted, :is(.hpx, .crx, .hpx-overlay) .modal-h p { font-size: 14px; }
:is(.hpx, .crx, .hpx-overlay) .tabs button, :is(.hpx, .crx, .hpx-overlay) .seg button { font-size: 15px; }
:is(.hpx, .crx) .avatar { font-size: 13px; }

/* page titles: one line on a phone */
.hpx-page .ph h1, .crx-page .ph h1 { font-size: var(--fs-large); line-height: 1.12; letter-spacing: -.03em; }
.hpx-page .ph h1 { text-wrap: balance; }
.hp-sec h2, .pf-sec h2, .rw-h { font-size: var(--fs-section); }

/* HealthPass home */
.dusk-hi span { font-size: var(--fs-sub); }
.dusk-hi h1 { font-size: 34px; }
.dusk-score b { font-size: 60px; }
.dusk-score span { font-size: 14px; }
.dusk-why { font-size: var(--fs-sub); }
.dusk-read .lbl { font-size: 13px; }
.dusk-read b { font-size: 22px; }
.dusk-read .unit { font-size: 12px; }
.dusk-tier { font-size: 13px; } .dusk-tier b { font-size: 14px; }
.todo-t b { font-size: 16px; } .todo-t span { font-size: 14px; }
.todo-a { height: 38px; font-size: 14px; padding: 0 16px; }
.quick.art .q-lb { font-size: 14px; }
.feat-b b { font-size: 17px; } .feat-b span { font-size: 14px; } .feat-b .feat-p { font-size: 16px; }
.hp-row b.small { font-size: 16px; } .hp-row .xs { font-size: 14px; }
.nv-date span, .nv-date.sm span { font-size: 11px; }
.hpx-tab { font-size: var(--fs-tab); } .crx-tab { font-size: var(--fs-tab); }
.crx-badge { font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; }

/* tracker */
.trk2-h b { font-size: 17px; } .trk2-h span { font-size: 14px; }
.trk2-big b { font-size: 36px; } .trk2-big span { font-size: 16px; }
.trk2-btn { font-size: 16px; height: 48px; }

/* rewards and profile */
.tc-pts b { font-size: 38px; } .tc-tier { font-size: 18px; } .tc-plan, .tc-next { font-size: 13px; }
.rw-stats b { font-size: 20px; } .rw-stats span { font-size: 13px; }
.rw-b b { font-size: 15px; } .rw-b > span { font-size: 13px; } .rw-cost { font-size: 14px; }
.plan li { font-size: 15px; } .plan-n { font-size: 20px; }
.tier-row b.small { font-size: 16px; } .tier-row .xs { font-size: 13px; }
.voucher b.small { font-size: 16px; }
.hc-name { font-size: 26px; } .hc-grid span { font-size: 12px; } .hc-grid b { font-size: 16px; } .hc-tier { font-size: 13px; } .hc-allergy { font-size: 14px; }
.pf-row { font-size: 16px; grid-template-columns: 112px minmax(0, 1fr); } .pf-k { font-size: 14px; } .pf-hint { font-size: 13px; }
.pf-link { font-size: 15px; } .pf-person b.small { font-size: 16px; }
.hpx-li, .crx-li { font-size: 16px; }
.hpx-who b, .crx-who b { font-size: 20px; }

/* sign-in */
.alog-copy h1 { font-size: 34px; } .alog-copy p { font-size: 16px; }
.alog-sheet .login-card h2 { font-size: var(--fs-large); }
.alog-sheet .login-card .small { font-size: 15px; }
.alog-demo summary { font-size: 15px; }
.alog .acct b.small { font-size: 15px; } .alog .acct .xs { font-size: 13px; }

/* medical ID */
.mid-who b { font-size: 24px; } .mid-who span { font-size: 14px; }
.mid-vitals span { font-size: 12px; } .mid-vitals b { font-size: 18px; }
.mid-sec h3 { font-size: 14px; } .mid-row, .mid-sec p, .mid-sec li { font-size: 16px; } .mid-row span { font-size: 15px; }
.crx-id span { font-size: 12px; }
:is(.hpx, .crx, .hpx-overlay, .mid) .lic-exp { font-size: 13px; }
:is(.hpx, .crx) .top .badge, :is(.hpx, .crx) button[aria-label^="Notifications"] span { font-size: 11px; }
.dusk-read b { font-size: 20px; letter-spacing: -.035em; }
.dusk-read { padding: 10px 8px 9px 10px; }
:is(.hpx, .crx, .hpx-overlay) .search .inp { padding-left: 38px; }
:is(.hpx, .crx, .hpx-overlay) .search svg { left: 13px; width: 17px; height: 17px; }
.dusk-read b { font-size: 18px; }
.dusk-read .lbl { overflow: visible; }
.hpx-page .row.wrap > div[style*="width: 280"] { width: 100% !important; }

/* ---------- Quiet luxury pass: lighter weights, smaller display numbers, calmer surfaces ---------- */
.trk2 { padding: 16px; gap: 14px; border-radius: 22px; background: linear-gradient(165deg, #081833 0%, #0D2648 100%); box-shadow: 0 10px 28px rgba(8,26,51,.16); }
.trk2::after { display: none; }
.trk2-h { gap: 12px; align-items: center; }
.trk2-h .avatar, .trk2-ic { width: 42px; height: 42px; }
.trk2-h .avatar { box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); }
.trk2-h b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.trk2-h span { font-size: 13.5px; opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk2-when { flex: none; align-self: flex-start; font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); opacity: 1 !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trk2-eta { display: flex; align-items: baseline; justify-content: space-between; }
.trk2-eta span { font-size: 13px; opacity: .62; }
.trk2-eta b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.trk2-line { height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 4px, transparent 4px 9px); }
.trk2-car { width: 26px; height: 26px; box-shadow: 0 0 0 4px rgba(255,255,255,.1); }
.trk2-car svg { width: 14px; height: 14px; }
.trk2-pin { width: 17px; height: 17px; opacity: .8; }
.trk2-act { gap: 8px; }
.trk2-btn { height: 40px; border-radius: 12px; font-size: 14px; font-weight: 500; background: transparent; border: 1px solid rgba(255,255,255,.18); }
.trk2-btn svg { width: 16px; height: 16px; }
.trk2-btn:hover { background: rgba(255,255,255,.07); }
.trk2-btn.pri { background: #fff; border-color: #fff; color: #0A1D3A; }
.trk2-note { font-size: 13px; }

/* calmer display type across the app */
.dusk-hi h1 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; }
.dusk-score b { font-size: 52px; font-weight: 600; letter-spacing: -.035em; }
.dusk-read b { font-weight: 600; }
.hpx-page .ph h1, .crx-page .ph h1 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.hp-sec h2, .pf-sec h2, .rw-h { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tc-pts b { font-size: 32px; font-weight: 600; }
.tc-tier { font-size: 16px; font-weight: 600; }
.rw-stats b { font-size: 18px; font-weight: 600; }
.plan-p b { font-size: 24px; font-weight: 600; } .plan-n { font-weight: 600; }
.hc-name { font-size: 22px; font-weight: 600; }
.mid-who b { font-size: 22px; font-weight: 600; }
.mid-vitals b { font-weight: 600; }
:is(.hpx, .crx) .kpi .val { font-size: 24px; font-weight: 600; }
.alog-copy h1 { font-size: 30px; font-weight: 600; }
.alog-sheet .login-card h2 { font-size: 24px; font-weight: 600; }
.nv-date b { font-weight: 600; }
.feat-b b, .todo-t b { font-weight: 600; }
.hpx-mid { background: rgba(255,255,255,.1); box-shadow: none; border: 1px solid rgba(255,255,255,.16); color: #FF8A8A; }
.hpx-bar:not(.on-dusk) .hpx-mid { background: var(--surface); border-color: var(--border); color: #C62828; }
.hpx-mid svg { width: 17px; height: 17px; stroke-width: 2.4; }
.dusk-why { font-weight: 500; }

/* ---------- Less blue: neutral surfaces and ink controls; navy kept for the hero, visit cards, HealthPass card and Medical ID ---------- */
:root[data-brand="hp"] { --haze: #F5F5F6; --teal: #1F2430; --teal-soft: #F0F0F2; --teal-ink: #111318; --dusk-2: #1F2430; --glow: #1F2430; --glow-soft: #F0F0F2; --sage: #1F2430; }
:root[data-brand="hp"][data-theme="dark"] { --haze: #0B0D12; --teal: #E8E8EC; --teal-soft: #1B1E26; --teal-ink: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root[data-brand="hp"]:not([data-theme="light"]) { --haze: #0B0D12; --teal: #E8E8EC; --teal-soft: #1B1E26; --teal-ink: #FFFFFF; } }
.hpx-page .btn.primary, .hpx .modal .btn.primary, .hpx-overlay .btn.primary, .alog-stage.hp .alog-sheet .btn.primary, .todo-a, .todo-a.warm, .hp-cta, .hpx-page .chip.on { background: #14161C; border-color: #14161C; color: #fff; }
:root[data-theme="dark"] :is(.hpx-page .btn.primary, .hpx .modal .btn.primary, .todo-a, .hp-cta, .hpx-page .chip.on) { background: #fff; border-color: #fff; color: #0B0D12; }
.hp-ic, .hp-ic.warm, .hp-ic.glow, .hp-ic.sage, .hpx-li .ic, .quick button span, .pf-tag, .hpx-count { background: #F0F0F2; color: #1F2430; }
.hpx-tab.on, .hpx-tab.on .ic { color: #111318; }
.hpx-tab.book .ic { background: #14161C; box-shadow: 0 8px 18px rgba(20,22,28,.28); }
.hpx .avatar:not(.pic), .alog .avatar:not(.pic) { background: #2A2F3A !important; }
.glow-note { box-shadow: 0 0 0 1px var(--border) inset, 0 4px 14px rgba(20,22,28,.05); }
.glow-note svg, .mid-sec h3 svg, .pf-link > svg:first-child, .mid-toggle > svg, .voucher > svg, .plan li svg { color: #1F2430; }
.done-mark circle, .done-mark path { stroke: #14161C; }
.pick-ph.on { box-shadow: inset 0 0 0 2px #14161C; } .pick-ph input, .mid-toggle input { accent-color: #14161C; }
.mid-call a { background: #14161C; }
.date-chip.on { border-color: #14161C; background: #F0F0F2; }
.tier-row.on { box-shadow: inset 0 0 0 2px #14161C; }
.plan.cur { border-color: #14161C; }
.voucher { border-color: #C9CBD1; }
.hp-card, .trk2, .dusk, .mid-top, .mid-who, .mid-vitals > div, .plan-premium { /* navy stays here only */ }

/* Menus and dialogs opened from the provider app bar keep normal colours (the bar itself is white-on-navy). */
.crx-bar .menu, .crx-bar .modal-wrap { color: var(--fg); }
.crx-bar .menu .btn, .crx-bar .modal-wrap .btn { color: var(--fg); background: var(--surface); border-color: var(--border-2); }
.crx-bar .modal-wrap .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.crx-bar .modal-wrap .btn.ghost, .crx-bar .menu .btn.ghost { background: transparent; border-color: transparent; }
.crx-bar .modal-wrap .btn:hover, .crx-bar .menu .btn:hover { background: var(--surface-2); }
.crx-bar .menu .link, .crx-bar .modal-wrap .link { color: var(--teal-ink); }
.crx-eid .modal-wrap .btn { width: auto; font-size: 15px; padding: 0 16px; gap: 6px; }
.crx-eid .modal-wrap .btn svg { width: 16px; height: 16px; }
.hpx-bar .menu, .hpx-bar .modal-wrap { color: var(--fg); }
.hpx-bar.on-dusk .menu .btn.ghost { color: var(--fg); }
.crx-bar, .hpx-bar { z-index: 30; }

/* ---------- Accessibility: WCAG 2.2 AA contrast (4.5:1 text) and target size (24px minimum, 44px on phones) ---------- */
:root { --fg-3: #687385; }
:root[data-theme="dark"] { --fg-3: #8B9AB0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fg-3: #8B9AB0; } }
.pill.success, .lic-exp { color: #146C35; }
.pill.warning, .lic.expiring .lic-exp { color: #8F4A00; }
.pill.danger { color: #B42318; }
.pill.info { color: #1D4ED8; }
.pill.teal { color: #0B6158; }
:root[data-theme="dark"] .pill.success, :root[data-theme="dark"] .lic-exp { color: #4ADE80; }
:root[data-theme="dark"] .pill.warning { color: #FBBF24; }
:root[data-theme="dark"] .pill.danger { color: #FCA5A5; }
.kpi .val[style*="warning"], .kpi.warning .val { color: #B45309; }
.toggle { width: 46px; height: 28px; }
.toggle::after { top: 3px; left: 3px; width: 22px; height: 22px; }
.toggle.on::after { left: 21px; }
.hp-link, .link { min-height: 32px; display: inline-flex; align-items: center; }
.btn.sm.icon { width: 36px; height: 36px; }
:root { --fg-2: #566275; --warning: #B45309; }
:root[data-theme="dark"] { --fg-2: #A3B0C2; --warning: #F59E0B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fg-2: #A3B0C2; --warning: #F59E0B; } }
.hpx-tab, .crx-tab { color: var(--fg-2); }
.hpx-tab.book .lb { color: var(--fg-2); } .hpx-tab.book.on .lb { color: var(--fg); }

/* ---------- Family & sharing ---------- */
.fam-switch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.fam-switch::-webkit-scrollbar { display: none; }
.fam-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-1); color: var(--fg); flex: none; min-height: 44px; cursor: pointer; text-align: left; }
.fam-chip span { display: flex; flex-direction: column; line-height: 1.2; }
.fam-chip b { font-size: var(--fs-sub, 13px); font-weight: 600; }
.fam-chip small { font-size: var(--fs-cap, 11px); color: var(--fg-2); }
.fam-chip.on { border-color: #14161C; box-shadow: inset 0 0 0 1px #14161C; }
[data-theme="dark"] .fam-chip.on { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.fam-row { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; }
.acting { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #14161C; color: #fff; font-size: var(--fs-sub, 13px); position: relative; z-index: 5; }
.acting b { font-weight: 600; }
.acting .avatar { width: 26px; height: 26px; font-size: 11px; }
.acting button { background: #fff; color: #14161C; border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 12px; min-height: 32px; cursor: pointer; }
.content > .acting { border-radius: 12px; margin-bottom: 16px; }
.hpx > .acting { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 25; border-radius: 999px; padding: 6px 6px 6px 8px; box-shadow: 0 10px 30px rgba(10,14,24,.28); width: max-content; max-width: calc(100% - 32px); animation: fade-in .25s ease-out; }
.hpx-sheet, .crx-sheet { overflow-y: auto; overscroll-behavior: contain; }
.hpx-sheet > *, .crx-sheet > * { flex-shrink: 0; }
.fam-switch { padding: 4px 2px 12px; align-items: stretch; }
.fam-chip .avatar { width: 32px; height: 32px; min-width: 32px; font-size: 12px; display: grid; place-items: center; line-height: 1; }

/* ---------- Payments, insurance check, receipts, insurance card ---------- */
.pay-who { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.pay-who button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--fg-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.pay-who button svg { width: 16px; height: 16px; }
.pay-who button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(10,14,24,.12); }
.pay-who button:disabled { opacity: .45; cursor: not-allowed; }
.elig { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 10px; }
.elig.checking { align-items: center; }
.elig-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--fg); }
.elig-ic svg { width: 18px; height: 18px; }
.elig.ok .elig-ic { background: #14161C; color: #fff; }
.elig.no .elig-ic { color: var(--danger); }
.elig-split { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--fg-2); }
.elig-split b { color: var(--fg); font-weight: 600; }
.pay-methods { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.pay-m { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--fg); text-align: left; cursor: pointer; min-height: 56px; }
.pay-m:first-child { border-top: 0; }
.pay-m b { font-size: 14px; font-weight: 600; }
.pay-m span span, .pay-m .col > span { font-size: 12.5px; color: var(--fg-2); }
.pm-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.pm-ic svg { width: 17px; height: 17px; }
.pm-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong, #C5CBD6); display: grid; place-items: center; flex: none; }
.pay-m.on .pm-dot { background: #14161C; border-color: #14161C; color: #fff; }
.pm-dot svg { width: 13px; height: 13px; }
[data-theme="dark"] .pay-m.on .pm-dot { background: #fff; border-color: #fff; color: #14161C; }
.bk-total b { font-size: 15px; }
.done-pay { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.done-pay span { display: flex; gap: 8px; align-items: flex-start; }
.done-pay svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.paysheet-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(8,10,16,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade-in .2s ease-out; }
.paysheet { width: min(440px, 100%); background: var(--surface); color: var(--fg); border-radius: 26px 26px 0 0; padding: 18px 20px calc(26px + env(safe-area-inset-bottom)); animation: sheet .26s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 761px) { .paysheet-wrap { align-items: center; } .paysheet { border-radius: 24px; } }
.paysheet.ap { background: #0B0C10; color: #fff; }
.ps-top { display: flex; justify-content: space-between; align-items: center; }
.ps-top b { font-size: 17px; font-weight: 600; }
.ps-cancel { background: none; border: 0; color: inherit; opacity: .75; font-size: 15px; cursor: pointer; min-height: 32px; }
.ps-rows { display: flex; flex-direction: column; border-top: 1px solid rgba(127,127,127,.25); }
.ps-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(127,127,127,.25); font-size: 14px; }
.ps-rows span { opacity: .7; }
.ps-amt { font-size: 32px; font-weight: 600; letter-spacing: -.02em; text-align: center; font-variant-numeric: tabular-nums; }
.ps-state { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; min-height: 92px; justify-content: center; }
.ps-face svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: pulse-soft 1.1s ease-in-out infinite; }
.ps-ok { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: currentColor; }
.ps-ok svg { width: 28px; height: 28px; color: var(--surface); stroke-width: 3; }
.paysheet.ap .ps-ok svg { color: #0B0C10; }
@keyframes pulse-soft { 50% { opacity: .45; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .ps-face svg { animation: none; } .paysheet, .paysheet-wrap { animation: none; } }

.receipt { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rc-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; }
.rc-row > span:first-child { color: var(--fg-2); }
.rc-row.total { font-size: 16px; padding-top: 8px; border-top: 1px solid var(--border); }
.rc-row.muted { opacity: .75; }
.receipt hr { border: 0; border-top: 1px dashed var(--border); margin: 4px 0; width: 100%; }
.rc-inst { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
@media print { body.print-receipt * { visibility: hidden !important; } body.print-receipt #receipt, body.print-receipt #receipt * { visibility: visible !important; } body.print-receipt #receipt { position: fixed; inset: 24px; } }

.ins-card { position: relative; overflow: hidden; border-radius: 20px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #1B1E26 0%, #2B303B 100%); aspect-ratio: 1.586; max-width: 420px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 30px rgba(10,14,24,.22); }
.ic-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; position: relative; z-index: 1; }
.ic-ins { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.ic-plan { font-size: 12px; opacity: .75; }
.ic-no { font-family: var(--mono, ui-monospace, monospace); font-size: 19px; letter-spacing: .06em; margin-top: auto; position: relative; z-index: 1; }
.ic-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px 14px; position: relative; z-index: 1; }
.ic-grid span { display: block; font-size: 10.5px; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.ic-grid b { font-size: 13px; font-weight: 600; }
.ic-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45%; fill: rgba(255,255,255,.05); }
.wallet-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: #000; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.wallet-btn svg { width: 18px; height: 18px; }
.wallet-btn .spinner { width: 16px; height: 16px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
[data-theme="dark"] .wallet-btn { background: #fff; color: #000; }
.wallet-added { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg); min-height: 44px; }
.wallet-added svg { width: 16px; height: 16px; }
.pf-inscard { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); }
.wal-top { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 20px; align-items: start; margin-bottom: 8px; }
@media (max-width: 860px) { .wal-top { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .modal-f .bk-total { flex-basis: 100%; order: -1; font-size: 13px; } .modal-f:has(.bk-total) { flex-wrap: wrap; } .modal-f:has(.bk-total) .btn { flex: 1; } }

/* ---------- Doctor search ---------- */
.book-switch { margin-bottom: 14px; max-width: 320px; }
.book-switch .seg { width: 100%; } .book-switch .seg button { flex: 1; }
.doc-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.doc-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-height: 44px; max-width: 520px; }
.doc-search svg { width: 17px; height: 17px; color: var(--fg-2); flex: none; }
.doc-search input { border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 15px; flex: 1; min-width: 0; min-height: 42px; }
.doc-search:focus-within { border-color: var(--fg); }
.doc-selects { display: grid; grid-template-columns: repeat(4, minmax(0, 200px)); gap: 8px; }
@media (max-width: 760px) { .doc-selects { grid-template-columns: 1fr 1fr; } }
.chip svg { vertical-align: -2px; margin-right: 4px; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
@media (max-width: 760px) { .doc-list { grid-template-columns: 1fr; } }
.doc-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.doc-card:hover { border-color: var(--fg-3); box-shadow: 0 4px 16px rgba(10,14,24,.06); }
.doc-card:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.doc-n { font-size: 15px; font-weight: 600; }
.doc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; align-items: center; }
.doc-meta svg { vertical-align: -2px; margin-right: 3px; }
.doc-next { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.doc-next svg { width: 12px; height: 12px; }
.doc-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font-weight: 500; }
.stars { display: inline-flex; gap: 1px; color: var(--border-2, #CBD2DC); }
.stars svg { fill: currentColor; stroke: none; }
.stars svg.on { color: #14161C; }
[data-theme="dark"] .stars svg.on { color: #fff; }
.fav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg-2); flex: none; }
.fav svg { width: 18px; height: 18px; }
.fav.on { color: #C62828; border-color: transparent; background: #FDECEC; }
.fav.on svg { fill: currentColor; }
.dp-head { display: flex; gap: 14px; align-items: center; }
.dp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.dp-facts .wide { grid-column: 1 / -1; }
.dp-facts span { display: block; font-size: 12px; color: var(--fg-2); }
.dp-facts b { font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .dp-facts { grid-template-columns: 1fr 1fr; } }
.dp-svcs { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.dp-svc { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.dp-svc:first-child { border-top: 0; }
.dp-dist { display: flex; flex-direction: column; gap: 4px; max-width: 320px; }
.dp-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.dp-bar i { display: block; height: 100%; background: #14161C; border-radius: 3px; }
[data-theme="dark"] .dp-bar i { background: #fff; }
.review { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.rate { display: flex; gap: 6px; justify-content: center; padding: 6px 0 4px; }
.rate button { width: 48px; height: 48px; border: 0; background: none; cursor: pointer; color: var(--border-2, #CBD2DC); display: grid; place-items: center; }
.rate button svg { width: 34px; height: 34px; fill: currentColor; stroke: none; transition: transform .12s; }
.rate button.on { color: #14161C; }
.rate button:active svg { transform: scale(.88); }
[data-theme="dark"] .rate button.on { color: #fff; }

/* ---------- Medicines: doses, reminders, refills ---------- */
.doses { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.hp-body .doses { margin-bottom: 0; }
.doses-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.doses-h h3 { font-size: var(--fs-title3, 17px); font-weight: 600; margin: 0; letter-spacing: -.01em; }
.doses-ring svg { width: 36px; height: 36px; transform: rotate(-90deg); }
.doses-ring circle { fill: none; stroke: var(--surface-2); stroke-width: 4; }
.doses-ring circle.on { stroke: #14161C; stroke-linecap: round; transition: stroke-dasharray .4s; }
[data-theme="dark"] .doses-ring circle.on { stroke: #fff; }
.dose-list { display: flex; flex-direction: column; }
.dose { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); min-height: 56px; }
.dose:first-child { border-top: 0; }
.dose-t { width: 66px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg); flex: none; }
.dose.later .dose-t, .dose.later b { color: var(--fg-2); }
.dose.missed .dose-t { color: var(--danger); }
.dose-take { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--fg-3); background: transparent; color: var(--fg-2); display: grid; place-items: center; cursor: pointer; }
.dose-take svg { width: 18px; height: 18px; }
.dose-take.due, .dose-take.missed { border-color: #14161C; color: #14161C; }
.dose-take:hover { background: #14161C; color: #fff; }
[data-theme="dark"] .dose-take.due { border-color: #fff; color: #fff; }
.dose-skip { background: none; border: 0; color: var(--fg-2); font-size: 13px; cursor: pointer; min-height: 40px; padding: 0 6px; }
.dose-undo { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; min-height: 32px; border-radius: 999px; border: 0; background: #14161C; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dose.skipped .dose-undo { background: var(--surface-2); color: var(--fg-2); }
.dose-undo svg { width: 14px; height: 14px; }
.dose.taken b { text-decoration: line-through; text-decoration-color: var(--fg-3); }
.med-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--border); }
.med-row:first-child { border-top: 0; }
.med-low { color: var(--danger); font-weight: 600; }
.supply { display: block; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; max-width: 220px; margin-top: 4px; }
.supply i { display: block; height: 100%; background: #14161C; border-radius: 2px; }
.supply i.low { background: var(--danger); }
[data-theme="dark"] .supply i { background: #fff; }
.med-refills { padding: 10px 16px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.pref-row { padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.refill-i { align-items: flex-start; flex-wrap: wrap; }
.refill-i .grow { flex: 1 1 220px; }
@media (max-width: 760px) { .refill-i > .row:last-child { width: 100%; padding-left: 42px; } }

/* ---------- Feeling unwell: symptom checker, video GP queue, lab explainer ---------- */
.unwell { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: #14161C; color: #fff; margin-bottom: 16px; }
.hp-body .unwell { margin-bottom: 0; }
.unwell b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.unwell .xs { color: rgba(255,255,255,.75); }
.unwell-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.unwell-a button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.unwell-a button.pri { background: #fff; color: #14161C; border-color: #fff; }
.unwell-a button span { font-weight: 500; font-size: 12px; opacity: .65; }
.unwell-a svg { width: 17px; height: 17px; }
@media (min-width: 761px) { .content .unwell { flex-direction: row; align-items: center; justify-content: space-between; } .content .unwell-a { min-width: 360px; } }
.queue-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: #14161C; color: #fff; margin-bottom: 16px; }
.hp-body .queue-card { margin-bottom: 0; }
.queue-card .small, .queue-card .xs { color: rgba(255,255,255,.8); }
.qc-top { display: flex; align-items: center; gap: 12px; }
.qc-top b { font-size: 17px; }
.qc-pulse { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: qpulse 1.6s infinite; flex: none; margin: 0 6px; }
@keyframes qpulse { 70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .qc-pulse { animation: none; } }
.qc-leave { align-self: flex-start; background: none; border: 0; color: #fff; text-decoration: underline; font-size: 13px; cursor: pointer; min-height: 32px; padding: 0; }
.queue-card .btn.primary { background: #fff; color: #14161C; border-color: #fff; }
.oncall { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sc { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.sc-q { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.sc-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--fg-2); cursor: pointer; padding: 0; min-height: 32px; font-size: 14px; align-self: flex-start; }
.sc-back svg { width: 16px; height: 16px; }
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .sc-grid { grid-template-columns: 1fr; } }
.sc-list { display: flex; flex-direction: column; gap: 8px; }
.sc-opt, .sc-chk { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.sc-opt svg { width: 16px; height: 16px; color: var(--fg-3); flex: none; }
.sc-opt:hover, .sc-chk:hover { border-color: var(--fg-3); }
.sc-opt.on, .sc-chk.on { border-color: #14161C; box-shadow: inset 0 0 0 1px #14161C; }
.sc-chk { justify-content: flex-start; }
.sc-chk .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--fg-3); display: grid; place-items: center; flex: none; }
.sc-chk.on .box { background: #14161C; border-color: #14161C; color: #fff; }
.sc-chk .box svg { width: 14px; height: 14px; }
.sc-res { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); }
.sc-res h2 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.sc-lv { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.sc-lv svg { width: 22px; height: 22px; }
.sc-res.lv-emergency { border-color: var(--danger); }
.sc-res.lv-emergency .sc-lv { background: #C62828; color: #fff; }
.sc-res.lv-urgent .sc-lv { background: #14161C; color: #fff; }
.sc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-acts a.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.sc-acts a.btn svg { width: 16px; height: 16px; }
.sc-self { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.sc-self ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.lx { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.lx p { margin: 0; }
.lx-btn { margin-right: 8px; }

/* ---------- Pregnancy and child health ---------- */
.preg-hero { padding: 20px; border-radius: 22px; background: #14161C; color: #fff; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.ph-k { font-size: 13px; opacity: .7; }
.ph-w { font-size: 52px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.ph-w small { font-size: 20px; opacity: .6; margin-left: 4px; font-weight: 500; }
.ph-sub { font-size: 14px; opacity: .8; }
.ph-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); }
.ph-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: #fff; }
.ph-bar span { position: absolute; top: -3px; width: 2px; height: 14px; background: rgba(255,255,255,.35); }
.ph-tri { display: grid; grid-template-columns: 35% 35% 30%; font-size: 11.5px; opacity: .65; }
.anc { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.anc:first-child { border-top: 0; }
.anc-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--fg-3); display: grid; place-items: center; flex: none; }
.anc-dot svg { width: 13px; height: 13px; }
.anc.done .anc-dot { background: #14161C; border-color: #14161C; color: #fff; }
.anc.done b { color: var(--fg-2); }
.anc.now .anc-dot { border-color: #14161C; border-width: 6px; }
[data-theme="dark"] .anc.done .anc-dot { background: #fff; border-color: #fff; color: #14161C; }
[data-theme="dark"] .anc.now .anc-dot { border-color: #fff; }
.growth-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .growth-pair { grid-template-columns: 1fr; } }
.growth { width: 100%; height: auto; }
.g-band { fill: var(--surface-2); }
.g-med { fill: none; stroke: var(--fg-3); stroke-width: 1.5; stroke-dasharray: 4 3; }
.g-pts { fill: none; stroke: var(--fg); stroke-width: 2; }
.g-dot { fill: var(--surface); stroke: var(--fg); stroke-width: 2; }
.g-ax { font-size: 9px; fill: var(--fg-2); }
.receipt.school .rc-row b { text-align: right; max-width: 60%; }
@media (max-width: 420px) { .unwell-a { grid-template-columns: 1fr; } }

/* ---------- Arabic, right to left ---------- */
.hpx[dir="rtl"], .hpx[dir="rtl"] h1, .hpx[dir="rtl"] h2, .hpx[dir="rtl"] h3, .hpx[dir="rtl"] button, .hpx[dir="rtl"] input, .hpx[dir="rtl"] select, .hpx[dir="rtl"] textarea { font-family: 'IBM Plex Sans Arabic', var(--hp-text); letter-spacing: 0 !important; }
.hpx[dir="rtl"] .chev, .hpx[dir="rtl"] .sc-opt svg, .hpx[dir="rtl"] .crumbs svg, .hpx[dir="rtl"] .sc-back svg, .hpx[dir="rtl"] .dusk-cta svg { transform: scaleX(-1); }
.hpx[dir="rtl"] .mono, .hpx[dir="rtl"] .hc-eid, .hpx[dir="rtl"] .ic-no, .hpx[dir="rtl"] .v-code, .hpx[dir="rtl"] input[inputmode="numeric"], .hpx[dir="rtl"] input[type="tel"] { direction: ltr; unicode-bidi: isolate; }
.hpx[dir="rtl"] :is(.todo-t, .hpx-li, .fam-chip, .pay-m, .sc-opt, .sc-chk, .doc-card, .fam-row, .pf-link, .pf-person, .hpx-mid-row, .acct, .dose) { text-align: right; }
.hpx[dir="rtl"] .pf-v, .hpx[dir="rtl"] .rc-row > :last-child { text-align: left; }
.hpx[dir="rtl"] .hpx-dot { right: auto; left: 0; }
.hpx[dir="rtl"] :is(p, b, h1, h2, h3, h4, .xs, .small, .lb, .lbl, .todo-t span) { unicode-bidi: plaintext; }

/* ---------- HealthPass Pro web refresh: calmer palette and the shared type scale on desktop ---------- */
:root:not([data-brand="hp"]) .side { background: #111318; }
:root:not([data-brand="hp"]) .nav-i.on { background: rgba(255,255,255,.09); color: #fff; }
:root:not([data-brand="hp"]) .nav-i.on svg { color: #fff; }
:root:not([data-brand="hp"]) .nav-i:hover:not(.on) { background: rgba(255,255,255,.05); }
.nav-i .badge { background: #fff; color: #111318; }
.side-org-btn { border-color: rgba(255,255,255,.08); }
.bar > i { background: #14161C; }
[data-theme="dark"] .bar > i { background: #E7E9EE; }
.app .ph h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.app .crumbs { font-size: 12.5px; }
.app .card-h h3 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.app .kpi .lbl { font-size: 12.5px; color: var(--fg-2); }
.app .kpi .val { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.app .kpi .sub { font-size: 12px; }
.app table.t th { font-size: 12px; font-weight: 500; color: var(--fg-2); letter-spacing: .01em; }
.app table.t td { font-size: 13.5px; }
.app .card { border-radius: 14px; }
.app .btn { border-radius: 10px; }
.app .content { max-width: 1440px; }

/* ---------- MediCase ---------- */
.mc-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; width: 100%; }
.mc-brand { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.mc-card b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.mc-card .xs { color: var(--fg-2); }
.mc-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; margin-top: 4px; }
.mc-cta svg { width: 16px; height: 16px; }
.mc-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 4px; }
.mc-steps i { height: 4px; border-radius: 2px; background: var(--surface-2); }
.mc-steps i.on { background: #14161C; }
[data-theme="dark"] .mc-steps i.on { background: #fff; }
.mc-hero { padding: 22px; border-radius: 22px; background: #14161C; color: #fff; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.mc-hero .mc-brand { color: rgba(255,255,255,.65); }
.mc-hero h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
.mc-hero .xs { color: rgba(255,255,255,.72); }
.mc-hero .btn.primary { background: #fff; color: #14161C; border-color: #fff; align-self: flex-start; }
.mc-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .mc-how { grid-template-columns: 1fr; } }
.mc-how > div { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 4px; }
.mc-how span { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #14161C; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.mc-how p { margin: 0; color: rgba(255,255,255,.75); }
.mc-case { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; width: 100%; }
.mc-case b { font-size: 16px; font-weight: 600; }
.mc-case svg { vertical-align: -2px; }
.mc-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mc-track span { position: relative; display: flex; flex-direction: column; gap: 4px; }
.mc-track i { height: 4px; border-radius: 2px; background: var(--surface-2); }
.mc-track span.done i, .mc-track span.now i { background: #14161C; }
[data-theme="dark"] .mc-track span.done i, [data-theme="dark"] .mc-track span.now i { background: #fff; }
.mc-track em { font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mc-contact { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); margin-top: 16px; }
.mc-contact a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.mc-contact a.btn svg { width: 15px; height: 15px; }
.mc-types { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-steplist { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.mc-saved { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #14161C; color: #fff; }
.mc-saved b { font-size: 18px; }
.mc-saved span { font-size: 13px; opacity: .75; }
.mc-thread { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; padding: 2px; }
.mc-msg { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); }
.mc-msg.me { align-self: flex-end; background: #14161C; color: #fff; }
.mc-msg.me .muted { color: rgba(255,255,255,.65); }
.mc-msg.int { background: #F9EEDA; color: #14161C; border: 1px dashed #B45309; }
.mc-msg.int .muted { color: #5b4a2e; }
.mc-msg p { margin: 2px 0 0; }
.mc-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); text-align: left; cursor: pointer; color: inherit; }
.mc-pipe { display: grid; grid-template-columns: repeat(5, 1fr); }
.mc-col { padding: 16px; border: 0; border-left: 1px solid var(--border); background: none; text-align: left; cursor: pointer; color: var(--fg); display: flex; flex-direction: column; gap: 2px; }
.mc-col:first-child { border-left: 0; }
.mc-col b { font-size: 24px; font-weight: 600; }
.mc-col span { font-size: 12.5px; color: var(--fg-2); }
@media (max-width: 760px) { .mc-pipe { grid-template-columns: repeat(3, 1fr); } }
.mc-steps-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mc-steps-row span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); }
.mc-steps-row span.done { color: var(--fg); }
.mc-steps-row span.now { background: #14161C; color: #fff; }

/* ---------- Symptom checker v2 ---------- */
.sc-progress { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.sc-progress i { display: block; height: 100%; background: #14161C; border-radius: 2px; transition: width .25s; }
[data-theme="dark"] .sc-progress i { background: #fff; }
.sc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-pills .chip { min-height: 40px; padding: 0 14px; }
.sc-pain input[type=range] { width: 100%; accent-color: #14161C; height: 32px; }
.sc-pain-v { font-size: 22px; color: var(--fg); }
.sc-when { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--fg-2); }
.sc-sec { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.sc-sec h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sc-why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sc-why li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.sc-why .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--fg-3); }
.sc-why .dot.lv-emergency { background: #C62828; } .sc-why .dot.lv-urgent { background: #14161C; } .sc-why .dot.lv-soon { background: var(--fg-2); }
[data-theme="dark"] .sc-why .dot.lv-urgent { background: #fff; }
.sc-cause { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.sc-cause p { margin: 0; }
.sc-tests { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-tests .chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.sc-list-plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.sc-sum { background: var(--surface-2); border-style: dashed; }
.sc-sum p { margin: 0; }
.sc .sc-res + .sc-sec, .sc .sc-sec + .sc-sec { margin-top: 0; }

/* ---------- HealthPass "aura" look: dark first, atmospheric artwork ---------- */
:root[data-brand="hp"][data-theme="dark"] { --bg: #0B0C0F; --haze: #0B0C0F; --surface: #17181C; --surface-2: #212227; --border: #2A2C32; --border-2: #34363D; --fg: #F2F2F4; --fg-2: #A9ABB3; --fg-3: #80838C; --shadow: none; }
:root[data-brand="hp"][data-theme="dark"] .hpx-bar:not(.on-dusk) { background: color-mix(in srgb, #0B0C0F 86%, transparent); }
:root[data-brand="hp"][data-theme="dark"] .hpx-tabs { background: color-mix(in srgb, #141519 92%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
:root[data-brand="hp"][data-theme="dark"] .btn.primary, :root[data-brand="hp"][data-theme="dark"] .hpx-tab.book .ic { background: #F2F2F4; color: #0B0C0F; border-color: #F2F2F4; }
:root[data-brand="hp"][data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.aura-top { position: relative; padding: calc(64px + env(safe-area-inset-top)) 18px 18px; background: radial-gradient(120% 90% at 50% -10%, #2A3A55 0%, #141A26 45%, var(--haze) 100%); color: #fff; }
:root[data-theme="light"] .aura-top, :root:not([data-theme]) .aura-top { background: radial-gradient(120% 90% at 50% -10%, #3A4D6C 0%, #1B2232 55%, #12151C 100%); }
.aura-top .dusk-top { margin-bottom: 18px; }
.rings { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 4px; }
.rings::-webkit-scrollbar { display: none; }
.ring { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; min-width: 64px; }
.ring-c { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.ring-c svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-c .rb { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2.5; stroke-dasharray: 122.5 163.4; transform: rotate(135deg); transform-origin: 32px 32px; }
.ring-c .rf { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }
.ring.hot .rf { stroke: #F4B183; }
.ring-c b { font-size: 19px; font-weight: 500; line-height: 1; margin-top: -6px; font-variant-numeric: tabular-nums; }
.ring-c > svg + b + svg, .ring-c > svg:last-child { position: absolute; inset: auto auto 7px; width: 13px; height: 13px; opacity: .75; }
.ring-l { font-size: 12px; color: rgba(255,255,255,.72); white-space: nowrap; }
.ring.main .ring-c { width: 72px; height: 72px; }
.ring.main .ring-c b { font-size: 22px; }

.spot { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 22px 20px 22px; border: 0; border-radius: 22px; color: #fff; cursor: pointer; text-align: center; min-height: 360px; background: #111; isolation: isolate; }
.spot .scene { z-index: -2; }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 40%, rgba(12,13,16,.86) 72%, rgba(12,13,16,.96) 100%); }
.spot-k { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.spot-go { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: rgba(255,255,255,.14); }
.spot-arc { position: relative; width: 230px; height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.spot-arc .arc { position: absolute; inset: 0 0 auto; width: 100%; }
.arc-bg { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 4; }
.arc-fg { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .9s cubic-bezier(.2,.8,.2,1); }
.spot-arc b { font-size: 56px; font-weight: 400; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.spot-arc em, .spot-row em { font-style: normal; font-size: 15px; font-weight: 500; }
.spot-h { font-size: 20px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.spot-t { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.82); max-width: 320px; }
.spot.sm { min-height: 190px; justify-content: flex-end; align-items: flex-start; text-align: left; margin-top: 10px; }
.spot.sm .spot-k { position: absolute; top: 20px; left: 20px; }
.spot-row { display: flex; align-items: baseline; gap: 8px; }
.spot-row b { font-size: 40px; font-weight: 400; line-height: 1; }

.vitals { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
@media (min-width: 900px) { .vitals { display: grid; grid-template-columns: repeat(2, 1fr); } }
.vt { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; width: 100%; }
.vt.on { border-color: var(--fg-3); }
.vt-art { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; }
.vt-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vt-k { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.vt-v { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.vt-v b { font-size: 30px; font-weight: 400; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.vt-v em { font-style: normal; font-size: 13px; color: var(--fg-2); }
.vt-v i { font-style: normal; font-size: 14px; font-weight: 600; margin-left: 4px; }
.vt-v i.off { color: #E7A06B; }
:root[data-theme="light"] .vt-v i.off { color: #B45309; }
.vt-bar { position: relative; height: 3px; border-radius: 2px; background: var(--surface-2); margin-top: 8px; }
.vb-ok { position: absolute; top: -1px; height: 5px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--fg-2) 0 2px, transparent 2px 4px); opacity: .7; }
.vb-pin { position: absolute; top: -6px; width: 3px; height: 15px; margin-left: -1.5px; border-radius: 2px; background: var(--fg); }
.vt-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-3); }
.vt-go { width: 18px; height: 18px; color: var(--fg-3); flex: none; }
@media (prefers-reduced-motion: reduce) { .arc-fg { transition: none; } }

:root[data-brand="hp"][data-theme="dark"] .hpx-tab.book .ic svg { color: #0B0C0F; stroke: #0B0C0F; }
:root[data-brand="hp"][data-theme="dark"] .trk2 { background: linear-gradient(160deg, #1F2533 0%, #161A23 100%); }
:root[data-brand="hp"][data-theme="dark"] .hpx .ph h1, :root[data-brand="hp"][data-theme="dark"] .hpx h2 { color: var(--fg); }
:root[data-brand="hp"][data-theme="dark"] .hpx-tab.on { color: #fff; }
:root[data-brand="hp"][data-theme="dark"] .hpx-tab.on .ic svg { color: #fff; }

/* ---------- HealthPass signature: Horizon hero over desert dunes, glance bars, reading cards ---------- */
.hz-hero { position: relative; overflow: hidden; isolation: isolate; padding: calc(64px + env(safe-area-inset-top)) 20px 22px; color: #fff; border-radius: 0 0 28px 28px; }
.hz-hero .hz-scene { z-index: -2; }
.hz-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,18,.55) 0%, rgba(10,12,18,.15) 45%, rgba(10,12,18,.65) 100%); }
.hz-hero .dusk-why { color: #fff; }
.glance { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: none; }
.glance::-webkit-scrollbar { display: none; }
.gl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; }
.gl-bar { position: relative; width: 10px; height: 64px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.gl-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; background: var(--fg); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.gl.low .gl-bar i { background: #E7A06B; }
.gl b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.gl-l { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--fg-2); text-align: center; line-height: 1.2; }
.gl-l svg { width: 14px; height: 14px; }
.readings { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .readings { grid-template-columns: repeat(2, 1fr); } }
.rd { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; width: 100%; }
.rd.on { border-color: var(--fg-3); }
.rd-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rd-k { font-size: 14px; font-weight: 600; }
.rd-s { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); white-space: nowrap; }
.rd.off .rd-s { color: #E7A06B; }
:root[data-theme="light"] .rd.off .rd-s { color: #9A4A0B; }
.rd-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.rd-v { display: flex; align-items: baseline; gap: 6px; }
.rd-v b { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.rd-v em { font-style: normal; font-size: 13px; color: var(--fg-2); }
.rd-spark { width: 96px; height: 32px; flex: none; overflow: visible; }
.rd-spark polyline { fill: none; stroke: var(--fg-2); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rd-spark circle { fill: var(--fg); }
.rd-zones { display: grid; gap: 4px; }
.rd-zones.z3 { grid-template-columns: 1fr 1.4fr 1fr; } .rd-zones.z2 { grid-template-columns: 1fr 1fr; }
.rd-zones span { font-size: 11px; text-align: center; padding: 4px 0; border-radius: 6px; background: var(--surface-2); color: var(--fg-3); }
.rd-zones span.on { background: var(--fg); color: var(--surface); font-weight: 600; }
.rd.off .rd-zones span.on { background: #E7A06B; color: #1A0F06; }
.hz-scene circle { display: none; }
.gl-bar { display: flex; flex-direction: column; justify-content: flex-end; }
.gl-bar i { position: static; display: block; width: 100%; flex: none; }
.rd-zones span { color: var(--fg-2); }
:root[data-brand="hp"][data-theme="dark"] .quick.art button { background: var(--surface); border: 1px solid var(--border); color: var(--fg); }
:root[data-brand="hp"][data-theme="dark"] .quick.art .q-lb { background: none; color: var(--fg); }
:root[data-brand="hp"][data-theme="dark"] .feat-c { background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
:root[data-brand="hp"][data-theme="dark"] .feat-b .feat-p { color: var(--fg); }

/* ---------- App sign-in: desert dusk welcome ---------- */
.alog-stage .alog { background: #0C0D11 !important; isolation: isolate; }
.alog-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.alog-scene circle { animation: sunrise 2.6s cubic-bezier(.2,.8,.2,1) both; }
.alog-scene path { animation: drift 30s ease-in-out infinite alternate; }
@keyframes sunrise { from { transform: translateY(46px); opacity: 0; } to { transform: none; opacity: .95; } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-12px); } }
.alog-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,11,15,.35) 0%, rgba(10,11,15,0) 30%, rgba(10,11,15,.15) 55%, rgba(10,11,15,.88) 78%, #0C0D11 100%); }
.alog-stage .alog-form .alog-veil { background: rgba(10,11,15,.55); }
.alog-art { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 12px 0; }
.alog-art svg { position: static; width: auto; border-radius: 0; box-shadow: none; transform: none; animation: none; }
.alog-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(20,22,28,.42); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); max-width: 300px; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: chipin .7s cubic-bezier(.2,.8,.2,1) both, float 7s ease-in-out infinite; }
.alog-chip.c1 { align-self: flex-start; animation-delay: .5s, 1.2s; }
.alog-chip.c2 { align-self: flex-end; animation-delay: .7s, 2.4s; }
.alog-chip.c3 { align-self: flex-start; margin-left: 18px; animation-delay: .9s, 3.6s; }
.alog-chip .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); flex: none; }
.alog-chip .ic svg { width: 18px; height: 18px; }
.alog-chip b { font-size: 14px; font-weight: 600; }
.alog-chip small { font-size: 12px; color: rgba(255,255,255,.72); }
@keyframes chipin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.alog-copy h1 { font-weight: 650; letter-spacing: -.03em; }
.alog-stage .alog-primary { color: #0C0D11 !important; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.alog-switch { background: rgba(255,255,255,.08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.alog-stage.hp .alog-sheet .btn.primary, .alog-stage .alog-sheet .btn.primary { background: #14161C; border-color: #14161C; color: #fff; }
:root[data-theme="dark"] .alog-stage .alog-sheet .btn.primary { background: #F2F2F4; border-color: #F2F2F4; color: #0C0D11; }
@media (prefers-reduced-motion: reduce) { .alog-scene circle, .alog-scene path, .alog-chip { animation: none; } }
@media (min-width: 761px) { .alog { max-width: 440px; margin: 0 auto; } .alog-stage { background: #0C0D11; } }

/* ---------- App sign-in: swipeable intro ---------- */
.alog-welcome { padding-left: 0 !important; padding-right: 0 !important; }
.alog-welcome > .alog-brand, .alog-welcome > .alog-cta { padding: 0 24px; position: relative; z-index: 2; }
.alog-welcome > .alog-brand { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 0; right: 0; justify-content: space-between; }
.intro { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.intro-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.intro-track::-webkit-scrollbar { display: none; }
.intro-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; position: relative; }
.intro-art { position: relative; flex: 1; min-height: 300px; overflow: hidden; }
.intro-art .scene { transform: scale(1.08); transition: transform 6s ease-out; }
.intro-slide.on .intro-art .scene { transform: scale(1); }
.intro-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,13,17,.55) 0%, rgba(12,13,17,0) 28%, rgba(12,13,17,0) 62%, #0C0D11 100%); }
.intro-copy { padding: 8px 24px 0; }
.intro-copy h1 { font-family: 'Bricolage Grotesque', var(--font); font-size: 34px; font-weight: 650; line-height: 1.05; letter-spacing: -.03em; max-width: 14ch; }
.intro-copy p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.74); max-width: 34ch; }
.intro-slide .intro-copy > * { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.intro-slide.on .intro-copy > * { opacity: 1; transform: none; }
.intro-slide.on .intro-copy p { transition-delay: .12s; }
.intro-dots { display: flex; gap: 2px; padding: 18px 20px 18px; }
.intro-dots button { width: 32px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.intro-dots i { display: block; width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); transition: width .3s, background .3s; }
.intro-dots button.on i { width: 24px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .intro-art .scene, .intro-slide .intro-copy > * { transition: none; transform: none; } }
.intro-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s ease-out; }
.intro-slide.on .intro-photo { transform: scale(1); }
.intro-credit { position: absolute; right: 10px; bottom: 8px; z-index: 1; font-size: 10px; color: rgba(255,255,255,.6); }
.intro-art::after { z-index: 0; }
@media (prefers-reduced-motion: reduce) { .intro-photo { transition: none; transform: none; } }

/* Phone apps: an open conversation fills the space between the app bar and the tab bar, with the reply box always visible. */
@media (max-width: 760px) {
  .crx .msg-layout.has-thread, .hpx .msg-layout.has-thread { position: fixed; left: 0; right: 0; top: calc(58px + env(safe-area-inset-top)); bottom: calc(86px + env(safe-area-inset-bottom)); height: auto; min-height: 0; z-index: 12; border-radius: 0; border-left: 0; border-right: 0; margin: 0; }
  .crx .msg-layout:not(.has-thread), .hpx .msg-layout:not(.has-thread) { height: auto; min-height: 0; }
  .msg-layout.has-thread .msgs { flex: 1; min-height: 0; overflow-y: auto; }
  .msg-layout.has-thread .composer { flex: none; }
}

/* ---------- HealthPass welcome with photography: light, warm, full-bleed ---------- */
.alog-stage.hp.photo.at-welcome .alog { background: #EAE2D7 !important; color: #17181C; }
.alog-stage.hp.photo .intro-slide { justify-content: flex-end; }
.alog-stage.hp.photo .intro-art { position: absolute; inset: 0; min-height: 0; }
.alog-stage.hp.photo .intro-photo { object-position: center top; }
.alog-stage.hp.photo .intro-art::after { background: linear-gradient(180deg, rgba(234,226,215,.55) 0%, rgba(234,226,215,0) 14%, rgba(234,226,215,0) 56%, rgba(234,226,215,.92) 74%, #EAE2D7 100%); }
.alog-stage.hp.photo .intro-copy { position: relative; z-index: 1; padding-bottom: 4px; }
.alog-stage.hp.photo .intro-copy h1 { color: #17181C; }
.alog-stage.hp.photo .intro-copy p { color: #3E3B37; }
.alog-stage.hp.photo .intro-dots i { background: rgba(23,24,28,.25); }
.alog-stage.hp.photo .intro-dots button.on i { background: #17181C; }
.alog-stage.hp.photo .intro { position: relative; }
.alog-stage.hp.photo .intro-dots { position: relative; z-index: 1; }
.alog-stage.hp.photo.at-welcome .alog-primary { background: #17181C; color: #fff !important; box-shadow: 0 10px 24px rgba(23,24,28,.22); }
.alog-stage.hp.photo.at-welcome .alog-switch { background: rgba(255,255,255,.55); border-color: rgba(23,24,28,.14); color: #17181C; }
.alog-stage.hp.photo.at-welcome .alog-cta { background: #EAE2D7; padding-top: 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
.alog-stage.hp.photo .alog-brand .hp-word, .alog-stage.hp.photo .alog-brand b { color: #17181C; }
.alog-stage.hp.photo .alog-mid { background: rgba(255,255,255,.7); color: #17181C; }
.alog-stage.hp.photo .alog-primary:focus-visible, .alog-stage.hp.photo .alog-switch:focus-visible { outline-color: #17181C; }
/* HealthPass Pro: charcoal app bar to match the Pro mark */
.crx-bar { background: #17181C !important; }

/* MediCase six-step process */
.mc-pipe { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 760px) { .mc-pipe { grid-template-columns: repeat(3, 1fr); } .mc-col:nth-child(4) { border-left: 0; } .mc-col:nth-child(n+4) { border-top: 1px solid var(--border); } }
.mc-card.act, .mc-case.act { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.mc-offer-mini { font-size: 13px; color: var(--fg); }
.mc-offer-mini s, .mc-offer s { color: var(--fg-2); font-weight: 400; }
.mc-offer, .mc-report { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); margin: 12px 0; }
.mc-offer-h { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.mc-offer p, .mc-report p { margin: 0; }
.mc-alt summary { cursor: pointer; color: var(--fg-2); }
.mc-alt > div { padding: 6px 0; border-top: 1px solid var(--border); }
.mc-dec { color: var(--fg-2); }
.mc-dec.ok { color: var(--fg); font-weight: 600; }
.mc-sched { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface-2); margin: 12px 0; }
.mc-sched .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--fg); color: var(--bg); flex-shrink: 0; }
.mc-sched .ic svg { width: 18px; height: 18px; }
.mc-sched b { font-size: 16px; }
.mc-person { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); margin-bottom: 12px; }
.mc-consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--border); margin-top: 12px; cursor: pointer; }
.mc-consent input { margin-top: 3px; }
.mc-steps-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mc-steps-row span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); }
.mc-steps-row span.done { color: var(--fg); }
.mc-steps-row span.now { background: var(--fg); color: var(--bg); font-weight: 600; }
.mc-nextbox { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border-left: 3px solid var(--fg); background: var(--surface-2); margin-bottom: 12px; }
.mc-sec { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.mc-sec > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.mc-sec[open] > summary { margin-bottom: 10px; }
.mc-sec p { margin: 0 0 8px; }
.mc-sec-b { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.mc-quotes { display: flex; flex-direction: column; gap: 6px; }
.mc-q { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; }
.mc-q.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.mc-qform { padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.mc-next { color: var(--fg); font-weight: 500; }
[data-theme="dark"] .mc-msg.me { background: #fff; color: #14161C; }
[data-theme="dark"] .mc-msg.me .muted { color: #555; }
[data-theme="dark"] .mc-saved { background: #fff; color: #14161C; }
.vo-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--fg); white-space: nowrap; }
.pay-warn { color: var(--fg); font-weight: 600; }
.mc-promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .mc-promise { grid-template-columns: repeat(2, 1fr); } }
.mc-promise > div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 2px; }
.mc-promise b { font-size: 17px; }
.mc-promise span { font-size: 12px; color: rgba(255,255,255,.72); }
.mc-late { color: var(--danger); font-weight: 600; }
.safe-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
/* Glance: three across, real readings */
.glance { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
.gl b { font-size: 16px; white-space: nowrap; }
.gl-w { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--fg); }
.gl-w.warn { background: var(--fg); color: var(--bg); }
.gl .gl-bar { display: none; }
.hpx-tab .ic { position: relative; }
.tab-n { position: absolute; top: -4px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #E5484D; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.hpx-count { background: var(--surface-2) !important; color: var(--fg) !important; } .hpx-count.hot { background: #E5484D !important; color: #fff !important; }
.past-rx-i { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); text-align: left; color: inherit; cursor: pointer; } .past-rx-i:first-child { border-top: 0; }
/* Phone: compact service list (no artwork, two-line description) */
.hpx .svc-grid .svc-art { display: none; }
.hpx .svc-grid .svc p.small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hpx .svc-grid { gap: 10px; }
.date-chip.on, .date-chip.on * { color: var(--bg) !important; }
.date-chip.on { background: var(--fg) !important; border-color: var(--fg) !important; }
/* View-only family access: hide every control that would change the record */
.hpx.vo .appt-row .btn, .hpx.vo .dose-take, .hpx.vo .dose-skip, .hpx.vo .med-row .btn, .hpx.vo .todo-a, .hpx.vo .mc-offer .btn, .hpx.vo .svc .btn, .hpx.vo .hpx-tab.book, .hpx.vo .pt-card .btn, .hpx.vo .unwell-a, .hpx.vo .mc-card, .hpx.vo .trk-acts { display: none !important; }
/* Onboarding and clinic setup */
.join-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.join-steps span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); }
.join-steps span.now { background: var(--fg); color: var(--bg); font-weight: 600; }
.join-steps span.done { color: var(--fg); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cat { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; }
.cat span { font-size: 12px; color: var(--fg-2); }
.cat.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.sp-groups { display: flex; flex-direction: column; gap: 10px; }
.sp-groups > div { display: flex; flex-direction: column; gap: 4px; }
.qr-fake { display: grid; grid-template-columns: repeat(9, 1fr); width: 126px; height: 126px; gap: 2px; padding: 8px; background: #fff; border-radius: 8px; align-self: center; }
.qr-fake i { background: #fff; } .qr-fake i.on { background: #14161C; }
.setup-prog { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--fg); border-radius: 3px; }
.setup-list { display: flex; flex-direction: column; gap: 8px; }
.setup-i { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.setup-i.open { border-color: var(--fg-3); }
.setup-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; color: var(--fg); text-align: left; cursor: pointer; }
.setup-h .chev { width: 16px; height: 16px; color: var(--fg-3); transition: transform .15s; } .setup-i.open .chev { transform: rotate(90deg); }
.setup-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--border); flex-shrink: 0; }
.setup-i.done .setup-n { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.setup-b { padding: 0 16px 16px 54px; }
@media (max-width: 700px) { .setup-b { padding: 0 14px 14px; } }
.hours { display: flex; flex-direction: column; gap: 6px; }
.hours-r { display: grid; grid-template-columns: 44px auto 110px auto 110px; align-items: center; gap: 8px; }
.hours-r .inp { height: 34px; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; }
.tpl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.tpl.on { border-color: var(--fg-3); }
.tpl-price { width: 90px; height: 34px; text-align: right; }
.perm-t th.c, .perm-t td.c { text-align: center; }
.perm-t input[type=checkbox] { width: 16px; height: 16px; }
.perm-lock { color: var(--fg-3); }
.app-i { align-items: flex-start; }
.setup-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: 16px; border: 1px solid var(--fg); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; margin-bottom: 14px; }
.setup-banner svg { width: 18px; height: 18px; }
/* Clinic insights */
.ins-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ins-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.ins-tile b { font-size: 22px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ins-tile.warn { border-color: var(--fg); }
.ins-chart { position: relative; padding-left: 64px; }
.ins-chart svg { width: 100%; height: 200px; display: block; overflow: visible; }
.ins-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ins-bar { fill: var(--fg-2); } .ins-bar.on { fill: var(--fg); }
.ins-ax { font-size: 11px; fill: var(--fg-3); }
.ins-y { position: absolute; left: 0; top: 0; height: 180px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--fg-3); }
.ins-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--fg); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12px; display: flex; flex-direction: column; pointer-events: none; white-space: nowrap; margin-left: 32px; }
.ins-split { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.ins-split i { display: block; } .ins-split i.p0, .ins-legend i.p0 { background: var(--fg); } .ins-split i.p1, .ins-legend i.p1 { background: var(--fg-3); } .ins-split i.p2, .ins-legend i.p2 { background: var(--border); }
.ins-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; }
.ins-legend span { display: inline-flex; align-items: center; gap: 6px; } .ins-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.join-cta { display: flex; justify-content: center; gap: 6px; align-items: center; padding-top: 4px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.perm-t input[type=checkbox], .tpl input[type=checkbox], .mc-consent input[type=checkbox] { accent-color: var(--fg); }
.hours-r { grid-template-columns: 40px auto minmax(0, 1fr) auto minmax(0, 1fr); }
.hours-r .inp { min-width: 0; width: 100%; padding: 0 6px; }
@media (max-width: 700px) { .hours-r { gap: 6px; } .hours-r .inp { font-size: 13px; } }
.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 760px) { .today { grid-template-columns: repeat(2, 1fr); } }
.today-s { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.today-s b { font-size: 24px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ov-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); text-align: left; color: inherit; cursor: pointer; }
.ov-row:first-child { border-top: 0; }
.ov-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex-shrink: 0; }
.ins-tile.click { cursor: pointer; text-align: left; color: var(--fg); }
.rx-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.rx-strip > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-left: 1px solid var(--border); } .rx-strip > div:first-child { border-left: 0; }
.rx-strip b { font-size: 20px; } .rx-strip span { font-size: 12px; color: var(--fg-2); }
@media (max-width: 760px) { .rx-strip { grid-template-columns: repeat(2, 1fr); } .rx-strip > div:nth-child(3) { border-left: 0; } .rx-strip > div:nth-child(n+3) { border-top: 1px solid var(--border); } }
.ins-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* Patient chart (EMR) */
.chart-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10,12,16,.45); display: flex; justify-content: flex-end; }
.chart { width: min(1100px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
.chart-h { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chart-name { font-size: 20px; letter-spacing: -.01em; }
.chip.allergy { border-color: var(--danger); color: var(--danger); display: inline-flex; gap: 4px; align-items: center; }
.chart-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chart-tabs { display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.chart-tabs button { padding: 10px 12px; border: 0; background: none; color: var(--fg-2); font-size: 13.5px; font-weight: 500; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.chart-tabs button.on { color: var(--fg); border-bottom-color: var(--fg); }
.chart-b { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }
@media (max-width: 700px) { .chart-h, .chart-acts, .chart-b { padding-left: 14px; padding-right: 14px; } }
.vit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.vit-grid > div { display: flex; flex-direction: column; gap: 2px; } .vit-grid b { font-size: 17px; }
.tfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.tfields .wide { grid-column: 1 / -1; }
.scale { display: flex; gap: 4px; flex-wrap: wrap; } .scale button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 12px; } .scale button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.teeth { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; } .teeth > div { display: flex; gap: 3px; } .teeth > div:first-child { border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.teeth button { min-width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font-size: 11px; cursor: pointer; } .teeth button.on { background: var(--fg); color: var(--bg); }
.score { display: flex; flex-direction: column; gap: 6px; } .score-r { display: flex; flex-direction: column; gap: 3px; } .score-r .seg { flex-wrap: wrap; }
.doc-b { padding: 0 16px 14px 44px; display: flex; flex-direction: column; gap: 8px; }

/* More-actions menu */
.more-m { position: relative; display: inline-flex; }
.more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 6px; display: flex; flex-direction: column; }
.more-pop button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--fg); cursor: pointer; }
.more-pop button:hover, .more-pop button:focus-visible { background: var(--surface-2, rgba(0,0,0,.05)); }
.more-pop button.danger { color: var(--danger); }
[dir=rtl] .more-pop { right: auto; left: 0; }
/* Schedule rows: status line, then actions */
.appt-state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.appt-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
@media (max-width: 720px) { .appt-acts { justify-content: flex-start; flex-basis: 100%; } }
/* Patient replies to the clinic */
.reply { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.reply-t { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); }
.reply-t svg { width: 14px; height: 14px; }
.reply-t.ask { color: var(--fg); font-weight: 600; }
.reply-acts, .reply-late { display: flex; flex-wrap: wrap; gap: 8px; }
.reply.dark { position: relative; z-index: 1; margin: 2px 0 4px; }
.reply.dark .reply-t { color: rgba(255,255,255,.78); }
.reply.dark .reply-t.ask { color: #fff; }
.reply.dark .reply-acts, .reply.dark .reply-late { display: grid; grid-template-columns: 1fr 1fr; }
.reply.dark .reply-late { grid-template-columns: repeat(4, 1fr); }
/* Laboratory */
.tube { display: inline-flex; align-items: center; gap: 5px; }
.tube i { width: 9px; height: 14px; border-radius: 3px 3px 5px 5px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.lab-find { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; height: 38px; background: var(--surface); min-width: 0; }
.lab-find input { border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--fg); min-width: 0; width: 100%; }
.lab-bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.lab-row { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.lab-row:last-child { border-bottom: 0; }
.lab-row-h { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.lab-row-h > input { margin-top: 4px; }
.lab-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lab-tests { display: flex; flex-direction: column; gap: 8px; padding-left: 2px; }
.lab-t { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.lab-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.lab-row-f { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.warn-t { color: var(--fg); font-weight: 600; }
.crit-t { color: var(--danger); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.crit-box { border: 1px solid var(--danger); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.crit-box b { display: inline-flex; gap: 6px; align-items: center; color: var(--danger); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 6px 0; cursor: pointer; }
.check-row input { margin-top: 3px; }
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lab-label { border: 1px dashed var(--border-2); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 3px; background: #fff; color: #111; }
.lab-label .bars { height: 30px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 12px); margin: 4px 0; }
.lab-tl { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.lab-tl li { display: flex; flex-direction: column; position: relative; opacity: .55; }
.lab-tl li.on, .lab-tl li.rej { opacity: 1; }
.lab-tl li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-2); }
.lab-tl li.on::before { background: var(--fg); border-color: var(--fg); }
.lab-tl li.rej::before { background: var(--danger); border-color: var(--danger); }
.lo-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.lo-t { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; font: inherit; color: inherit; }
.lo-t:hover { background: var(--surface-2); }
.lo-t.on { border-color: var(--fg); background: var(--surface-2); }
.lo-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lo-t.on .lo-check { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.lo-sum { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.lab-note { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pl-st { display: flex; flex-direction: column; gap: 6px; }
.pl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pl-steps span { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--fg-2); }
.pl-steps span i { height: 4px; border-radius: 4px; background: var(--border); }
.pl-steps span.on { color: var(--fg); }
.pl-steps span.on i { background: var(--fg); }
.pl-prep { display: inline-flex; gap: 6px; align-items: flex-start; color: var(--fg); }
@media (max-width: 720px) { .lab-row-f .btn { width: 100%; justify-content: center; } }
/* Quality, rota, payments */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { padding: 7px 12px; font-size: 13.5px; border-radius: 999px; cursor: pointer; background: var(--surface); }
.chips .chip.on { background: var(--fg); border-color: var(--fg); color: var(--surface); font-weight: 600; }
.q-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.q-row.static { cursor: default; }
.q-row:last-child { border-bottom: 0; }
.q-row:not(.static):hover { background: var(--surface-2); }
.q-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { font-size: 12.5px; color: var(--fg-2); } .dl dd { margin: 0; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dt { margin-top: 4px; } }
.rota th.today { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.rota-c { display: flex; flex-direction: column; font-size: 12.5px; white-space: nowrap; }
.rota-c i { font-style: normal; font-size: 11.5px; color: var(--fg-2); }
.rota-c.off { color: var(--fg-3); }
.rota-c.leave { background: var(--surface-2); border-radius: 6px; padding: 3px 6px; font-weight: 600; }
.rota-c.leave.req { border: 1px dashed var(--border-2); background: none; font-weight: 500; }
.rota-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 38px; }
.receipt { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--border-2); border-radius: 12px; padding: 16px; }

/* Owner style rules for HealthPass Pro: quiet neutral accent, text in black or white, colour kept to small status dots. */
:root:not([data-brand="hp"]) { --teal: #1F2430; --teal-soft: #F0F1F3; --teal-ink: #111318; }
:root:not([data-brand="hp"])[data-theme="dark"] { --teal: #E8E8EC; --teal-soft: #1B1E26; --teal-ink: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-brand="hp"]):not([data-theme="light"]) { --teal: #E8E8EC; --teal-soft: #1B1E26; --teal-ink: #FFFFFF; } }
.btn.teal { color: var(--surface); }
.pill.success, .pill.warning, .pill.info, .pill.teal, .pill.neutral { color: var(--fg); background: var(--surface-2); }
.pill.success .dot { background: var(--success); } .pill.warning .dot { background: var(--warning); } .pill.info .dot { background: var(--info); } .pill.teal .dot { background: var(--fg); }
.pill.danger { background: var(--danger-soft); color: #9F1D14; }
[data-theme="dark"] .pill.danger { color: #FFB4AB; }
.kpi .val[style*="warning"], .kpi.warning .val, .kpi.danger .val, .kpi .val { color: var(--fg); }
.btn.ghost.danger, .btn.danger:not(.solid) { color: var(--fg); }
.btn.ghost.danger:hover { background: var(--danger-soft); }
a, .link { color: var(--fg); }
@media (min-width: 721px) { .toasts { top: auto; bottom: 20px; left: auto; right: 20px; transform: none; align-items: flex-end; } }
/* Modules picker */
.mod-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mod-preset { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.mod-preset.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.mod-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; }
.mod-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mod-row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .mod-presets { grid-template-columns: 1fr; } .mod-row .seg { width: 100%; } .mod-row .seg button { flex: 1; } }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--fg-3); font-size: 12px; } .or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.uaepass { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; border-radius: 10px; border: 1px solid var(--fg); background: var(--surface); color: var(--fg); font: 600 14px inherit; cursor: pointer; }
.uaepass-mark { font-size: 10px; font-weight: 800; letter-spacing: .04em; border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 4px; }
.uaepass-box { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
/* Phone: tables become stacked rows (labels come from the column headings) */
@media (max-width: 720px) {
  table.t.stackable thead { display: none; }
  table.t.stackable, table.t.stackable tbody, table.t.stackable tr, table.t.stackable td { display: block; width: 100%; }
  table.t.stackable tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  table.t.stackable td { border: 0 !important; padding: 3px 0 !important; white-space: normal !important; text-align: left !important; display: flex; gap: 10px; align-items: flex-start; min-height: 0; }
  table.t.stackable td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: 0 0 38%; font-size: 12px; color: var(--fg-2); padding-top: 2px; }
  table.t.stackable td:empty { display: none; }
  table.t.stackable td > * { min-width: 0; }
  .table-wrap:has(table.t.stackable) { overflow-x: visible; }
}
/* Patient app fixes */
[data-theme="dark"] .dose-take.missed { border-color: #fff; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dose-take.due, :root:not([data-theme="light"]) .dose-take.missed { border-color: #fff; color: #fff; } }
.dose-take.missed { background: var(--fg); color: var(--surface) !important; }
.past-rx-i { flex-wrap: wrap; row-gap: 6px; }
.past-rx-i > .grow { flex: 1 1 180px; }
.past-rx-i .pill, .pt-card .pill { white-space: normal; height: auto; min-height: 22px; padding: 3px 9px; max-width: 100%; line-height: 1.3; }
.dose-time.missed, .med-left.low { color: var(--fg) !important; font-weight: 600; }
.card > .stack > .card { overflow: hidden; }
.hpx .t td, .hpx .t th { word-break: break-word; }
.side { overflow-y: auto; overscroll-behavior: contain; }
.kpi .val { display: inline-flex; align-items: center; gap: 8px; }
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); display: inline-block; }
.kpi-dot.danger { background: var(--danger); }
/* Phone: the "more actions" menu opens as a sheet above the tab bar, never off-screen */
@media (max-width: 720px) {
  .more-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); min-width: 0; z-index: 300; border-radius: 16px; padding: 8px; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
  .more-pop button { padding: 14px 12px; font-size: 16px; }
}
.crx-tab.act .ic { background: #14161C; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
[data-theme="dark"] .crx-tab.act .ic { background: #fff; color: #14161C; }
.crx-tab.act .lb { color: var(--fg); }
/* Brand wordmark: purple on light, white on dark */
:root[data-theme="dark"] .hp-logo img.pur { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp-logo img.pur { filter: brightness(0) invert(1); } }
.hpx .hp-logo img.pur, .hpx-top .hp-logo img.pur { }

/* ICD-10 diagnosis search */
.dx { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dx-in { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--r-md, 10px); padding: 0 10px; background: var(--surface); min-height: 42px; }
.dx-in:focus-within { border-color: var(--fg); }
.dx-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; padding: 10px 0; color: var(--fg); }
.dx-in svg { color: var(--fg-2); flex: none; }
.dx-browse { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.dx-pan { border: 1px solid var(--border); border-radius: var(--r-lg, 12px); background: var(--surface); max-height: min(440px, 60vh); overflow: auto; padding: 6px; box-shadow: var(--shadow-lg); }
.dx-float { position: absolute; top: calc(100% - 2px); left: 0; right: 0; z-index: 60; }
.dx-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-2); padding: 8px 8px 4px; }
.dx-i { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--fg); font-size: 13px; line-height: 1.35; }
.dx-i.cur, .dx-i:hover { background: var(--surface-2); }
.dx-i:disabled { opacity: .5; cursor: default; }
.dx-i b { font-weight: 700; }
.dx-code { flex: none; min-width: 72px; font-weight: 600; font-size: 12.5px; padding-top: 1px; }
.dx-i.hd .dx-code { color: var(--fg-2); }
.dx-txt { flex: 1; min-width: 0; }
.dx-inc { color: var(--fg-2); font-size: 12px; }
.dx-more { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--fg-2); white-space: nowrap; }
.dx-note { font-size: 12px; color: var(--fg-2); padding: 8px; line-height: 1.45; }
.dx-ref { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dx-crumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.dx-crumbs .link { display: inline-flex; align-items: center; gap: 2px; }
.dx-here { padding: 8px; font-size: 13px; }
.dx-chosen { display: flex; flex-direction: column; gap: 6px; }
.dx-chosen:empty { display: none; }
.dx-c { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: var(--surface); }
.dx-c .mono { min-width: 64px; }
.dx-prim { border: 1px solid var(--fg); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
@media (max-width: 640px) { .dx-code { min-width: 62px; } .dx-pan { max-height: 55vh; } .dx-browse span { display: none; } }

/* Lab ordering: rows with details, packages, departments */
.lo-t { flex-wrap: wrap; cursor: default; padding: 4px 6px; }
.lo-main { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; padding: 4px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.lo-info { flex: none; padding: 4px 6px; }
.lo-det { flex-basis: 100%; display: flex; flex-direction: column; gap: 3px; padding: 4px 4px 8px 34px; color: var(--fg-2); line-height: 1.45; }
.lo-det b { color: var(--fg); font-weight: 600; }
.lo-list { max-height: 340px; }
.lo-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.lo-groups .chip .muted { font-weight: 400; }
.lo-pkgs { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.lo-pkg { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.lo-pkg:hover { background: var(--surface-2); }
.lo-pkg.on { border-color: var(--fg); background: var(--surface-2); }
.lo-pkg.on .lo-check { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.chip.on .muted { color: var(--surface); opacity: .7; }

/* Lab report */
.lab-report { display: flex; flex-direction: column; gap: 14px; color: var(--fg); }
.lr-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--fg); }
.lr-lab { font-size: 16px; }
.lr-grid, .lr-custody { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lr-grid > div, .lr-custody > div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; min-width: 0; }
.lr-custody { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.lr-k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-2); margin-bottom: 2px; }
.lr-t tr.abn td { font-weight: 600; }
.lr-t tr.abn td.muted { font-weight: 400; }
.lr-flag { white-space: nowrap; font-size: 12px; }
.lr-int { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.lr-int ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.lr-foot { border-top: 1px solid var(--border); padding-top: 8px; line-height: 1.5; }
@media (max-width: 760px) { .lr-grid, .lr-custody { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .lr-grid, .lr-custody { grid-template-columns: 1fr; } }
@media print {
  body.print-lab * { visibility: hidden !important; }
  body.print-lab .lab-report, body.print-lab .lab-report * { visibility: visible !important; }
  body.print-lab .lab-report { position: absolute; left: 0; top: 0; width: 100%; padding: 16px; background: #fff; color: #000; }
  body.print-lab .modal, body.print-lab .modal-body { overflow: visible !important; max-height: none !important; }
}
@media (max-width: 640px) {
  .dx-ref { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dx-ref .chip { flex: none; }
  .lo-pkg { flex-wrap: wrap; }
  .lo-pkg > .nowrap { flex-basis: 100%; padding-left: 30px; }
  .lo-t .lo-main > .nowrap { align-self: flex-start; }
}
.lab-cust { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border); }
/* Arabic: clinician-written text is shown exactly as written, with a quiet note. */
.hpx[lang="ar"] [data-clin]:not(:empty)::after { content: " · كما كتبه فريق رعايتك"; font-size: 11px; color: var(--fg-2); font-weight: 400; }
.hpx[lang="ar"] [data-no-tr] { unicode-bidi: plaintext; }
/* MediCase quick button on Home */
.mc-quick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; text-align: start; }
.mc-quick:hover { background: var(--surface-2); }
.mc-quick b { font-size: 14px; } .mc-quick .xs { color: var(--fg-2); }
.mc-q-ic { width: 36px; height: 36px; border-radius: 11px; background: #14161C; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mc-q-ic svg { width: 18px; height: 18px; }
.mc-quick > svg { width: 16px; height: 16px; color: var(--fg-2); flex: none; }
.mc-quick.act { border-color: var(--fg); }
.mc-q-dot { width: 8px; height: 8px; border-radius: 50%; background: #14161C; flex: none; }
.hpx[dir="rtl"] .mc-quick > svg { transform: scaleX(-1); }

/* ---------- Motion: small, purposeful, and off when the phone asks for reduced motion ---------- */
@keyframes m-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes m-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes m-bump { 0% { transform: translateY(0); } 40% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
@keyframes m-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes m-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes m-toast { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes m-stroke { to { stroke-dashoffset: 0; } }
@keyframes m-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
/* Content eases in when a screen opens, the first items one after another. */
.hp-body > *, .hpx-content > .hp-page > *, .page > .card, .page > .kpis, .page > .grid > * { animation: m-up .32s cubic-bezier(.2,.8,.2,1) both; }
.hp-body > *:nth-child(2), .page > *:nth-child(2) { animation-delay: .04s; } .hp-body > *:nth-child(3), .page > *:nth-child(3) { animation-delay: .08s; }
.hp-body > *:nth-child(4), .page > *:nth-child(4) { animation-delay: .12s; } .hp-body > *:nth-child(5), .page > *:nth-child(5) { animation-delay: .16s; }
.hp-body > *:nth-child(n+6), .page > *:nth-child(n+6) { animation-delay: .2s; }
.hp-list > *, .stack-sm > .card, .lo-list > *, .dx-pan > .dx-i { animation: m-up .24s ease-out both; }
.hp-list > *:nth-child(2), .lo-list > *:nth-child(2) { animation-delay: .03s; } .hp-list > *:nth-child(3), .lo-list > *:nth-child(3) { animation-delay: .06s; } .hp-list > *:nth-child(n+4), .lo-list > *:nth-child(n+4) { animation-delay: .09s; }
.dx-pan > .dx-i { animation-duration: .16s; }
/* Press feedback: things you tap give a little. */
.btn, .hp-row, .todo, .mc-quick, .mc-card, .hpx-li, .gl, .lo-main, .lo-pkg, .dx-i, .chip, .hpx-tab, .card.click, tr.click { transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:active, .hp-row:active, .todo:active, .mc-quick:active, .mc-card:active, .hpx-li:active, .gl:active, .lo-pkg:active, .chip:active, .card.click:active { transform: scale(.97); }
.hpx-tab:active .ic { transform: scale(.9); }
/* The selected tab's icon lifts once; ticks and chosen items pop in. */
.hpx-tab.on .ic { animation: m-bump .35s ease-out; }
.lo-t.on .lo-check svg, .lo-pkg.on .lo-check svg, .dx-c, .lo-sum .chip { animation: m-pop .22s ease-out both; }
.mc-quick:hover > svg { animation: m-nudge .6s ease-in-out; }
/* Lab progress fills step by step. */
.pl-steps span.on i { transform-origin: left; animation: m-fill .45s cubic-bezier(.2,.8,.2,1) both; }
.pl-steps span.on:nth-child(2) i { animation-delay: .12s; } .pl-steps span.on:nth-child(3) i { animation-delay: .24s; } .pl-steps span.on:nth-child(4) i { animation-delay: .36s; }
[dir="rtl"] .pl-steps span.on i { transform-origin: right; }
/* Critical values draw the eye three times, then stay still. */
.crit-t svg, .lr-flag .crit-t { animation: m-pulse 1s ease-in-out 3; }
/* Toasts and confirmations. */
.toast { animation: m-toast .26s cubic-bezier(.2,.8,.2,1); }
.ok-mark { display: flex; justify-content: center; margin: 2px 0 6px; }
.ok-mark svg { width: 56px; height: 56px; }
.ok-mark .ok-c { fill: none; stroke: var(--fg); stroke-width: 2.5; stroke-dasharray: 146; stroke-dashoffset: 146; animation: m-stroke .5s cubic-bezier(.65,0,.45,1) forwards; }
.ok-mark .ok-t { fill: none; stroke: var(--fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: m-stroke .35s cubic-bezier(.65,0,.45,1) .4s forwards; }
.ok-mark { animation: m-pop .3s ease-out both; }
/* Values that count or fill: KPI numbers rise in. */
.kpi b, .kpi .kpi-v, .dusk-score b { animation: m-up .4s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ok-mark .ok-c, .ok-mark .ok-t { stroke-dashoffset: 0; }
}
/* Employee one-tap MediCase buttons */
.mc-qrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-qb { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; text-align: start; min-height: 112px; }
.mc-qb b { font-size: 15px; } .mc-qb .xs { color: var(--fg-2); line-height: 1.35; }
.mc-qb:hover { background: var(--surface-2); }
.mc-qb:active { transform: scale(.97); }
.mc-qlink { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--fg-2); cursor: pointer; font: inherit; padding: 2px; }
.mc-qlink svg { width: 13px; height: 13px; } .hpx[dir="rtl"] .mc-qlink svg { transform: scaleX(-1); }
.qa-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qa-docs li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); animation: m-up .25s ease-out both; }
.qa-docs li:nth-child(2) { animation-delay: .06s; } .qa-docs li:nth-child(3) { animation-delay: .12s; } .qa-docs li:nth-child(4) { animation-delay: .18s; }
.qa-docs svg { flex: none; margin-top: 2px; }
.qa-add { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border-2, var(--border)); border-radius: 12px; cursor: pointer; }
.qa-add input { width: 0; height: 0; opacity: 0; position: absolute; }
/* MediCase: how it works, as a connected journey of horizontal steps */
.mc-hero { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 100% 0%, rgba(140,120,200,.28) 0%, rgba(20,22,28,0) 55%), radial-gradient(90% 70% at 0% 100%, rgba(255,255,255,.07) 0%, rgba(20,22,28,0) 60%), #14161C; }
.mc-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.mc-step { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); animation: m-up .4s cubic-bezier(.2,.8,.2,1) both; }
.mc-step + .mc-step { margin-top: 18px; }
.mc-step:nth-child(2) { animation-delay: .1s; } .mc-step:nth-child(3) { animation-delay: .2s; }
/* the line that joins the steps */
.mc-step + .mc-step::before { content: ""; position: absolute; inset-inline-start: 35px; top: -19px; width: 2px; height: 20px; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.1)); }
.mc-step-ic { position: relative; flex: none; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: #14161C; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.mc-step-ic svg { width: 20px; height: 20px; }
.mc-step-ic i { position: absolute; top: -6px; inset-inline-end: -6px; width: 20px; height: 20px; border-radius: 50%; background: #14161C; color: #fff; border: 2px solid #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mc-step-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.mc-step-t b { font-size: 15px; line-height: 1.3; }
.mc-step-t p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.45; }
@media (min-width: 900px) { .hpx-page .mc-steps { flex-direction: row; gap: 14px; } .hpx-page .mc-step + .mc-step { margin-top: 0; } .hpx-page .mc-step + .mc-step::before { display: none; } .hpx-page .mc-step { flex: 1; } }
/* MediCase on Home: designed panel with the MediCase glow */
.mc-quick, .mc-qpanel { position: relative; overflow: hidden; color: #fff; border: 0; border-radius: 22px;
  background: radial-gradient(120% 120% at 100% 0%, rgba(150,128,214,.42) 0%, rgba(20,22,28,0) 55%), radial-gradient(80% 90% at 0% 100%, rgba(255,255,255,.08) 0%, rgba(20,22,28,0) 60%), #14161C;
  box-shadow: 0 10px 30px rgba(20,22,28,.18); }
.mc-quick { padding: 16px; align-items: flex-start; }
.mc-quick:hover { background: radial-gradient(120% 120% at 100% 0%, rgba(150,128,214,.5) 0%, rgba(20,22,28,0) 55%), #14161C; }
.mc-quick::after, .mc-qpanel::after { content: ""; position: absolute; width: 180px; height: 180px; inset-inline-end: -60px; top: -70px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 26px rgba(255,255,255,.03), 0 0 0 27px rgba(255,255,255,.08); pointer-events: none; }
.mc-quick b { font-size: 16px; line-height: 1.3; color: #fff; } .mc-quick .xs { color: rgba(255,255,255,.72); }
.mc-quick > svg { color: rgba(255,255,255,.7); align-self: center; position: relative; z-index: 1; }
.mc-quick .mc-q-ic, .mc-qb .mc-q-ic { background: #fff; color: #14161C; width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 6px 16px rgba(0,0,0,.35); position: relative; z-index: 1; }
.mc-quick .grow { position: relative; z-index: 1; }
.mc-q-brand { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.mc-q-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mc-q-tags i { font-style: normal; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.mc-q-dot { background: #fff; }
.mc-qpanel { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mc-qhead { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 0; background: none; color: #fff; padding: 2px 2px 0; cursor: pointer; font: inherit; text-align: start; }
.mc-qhead .mc-q-tags { margin: 0; flex: 1; } .mc-qhead > svg { width: 16px; height: 16px; color: rgba(255,255,255,.7); }
.hpx[dir="rtl"] .mc-qhead > svg { transform: scaleX(-1); }
.mc-qpanel .mc-qrow { position: relative; z-index: 1; }
.mc-qpanel .mc-qb { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(6px); min-height: 118px; }
.mc-qpanel .mc-qb:hover { background: rgba(255,255,255,.11); }
.mc-qpanel .mc-qb .xs { color: rgba(255,255,255,.7); }
/* Profile photos and the patient's files */
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.pp-pic { position: relative; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--surface-2); overflow: visible; display: grid; place-items: center; }
.pp-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pp-ini { font-weight: 700; color: var(--fg); }
.pp-cam { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 26px; height: 26px; border-radius: 50%; background: #14161C; color: #fff; border: 2px solid var(--surface); display: grid; place-items: center; }
.pp-cam svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pp-cam .spinner { width: 12px; height: 12px; }
.pf-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.myf-add { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--border); border-radius: 14px; }
.myf-list { display: flex; flex-direction: column; gap: 8px; }
.myf { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 14px; animation: m-up .25s ease-out both; }
.myf-th { width: 52px; height: 52px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--fg-2); }
.myf-th img { width: 100%; height: 100%; object-fit: cover; }
.mc-qhead { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; align-items: center; }
.mc-qhead .mc-q-brand { grid-column: 1; } .mc-qhead > svg { grid-column: 2; grid-row: 1; }
.mc-qhead .mc-q-tags { grid-column: 1 / -1; flex-wrap: nowrap; overflow: hidden; }
.mc-q-tags i { white-space: nowrap; }
.mc-q-brand[data-no-tr] { direction: ltr; unicode-bidi: isolate; }
.mc-qhead .mc-q-brand { justify-self: start; }

/* ---------- Live sign-in (gohealthpass.app) ---------- */
.lv-loading { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 22px; background: var(--bg); }
.login.lv .login-side { background: #491153; }
.login.lv .login-side h1 { color: #fff; }
.lv-trust { display: flex; gap: 10px; align-items: flex-start; max-width: 44ch; font-size: 13px; color: #E9DDEF; line-height: 1.45; }
.lv-trust svg { flex: none; margin-top: 2px; }
.login.lv .login-main { justify-content: center; }
.login-card.lv-wide { width: min(520px, 100%); }
.lv-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, #491153 10%, var(--surface)); color: #491153; }
.lv-icon svg { width: 22px; height: 22px; }
.lv-back { display: inline-flex; align-items: center; gap: 4px; align-self: center; }
.lv-code { font-size: 26px; letter-spacing: .5em; text-align: center; height: 56px; padding-left: .5em; }
.lv-choice { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; font: inherit; }
.lv-choice:hover { border-color: #491153; box-shadow: var(--shadow); transform: translateY(-1px); }
.lv-choice > svg { flex: none; width: 22px; height: 22px; color: #491153; }
.lv-choice span { display: flex; flex-direction: column; gap: 2px; }
.lv-choice small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.lv-uaepass { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px dashed var(--border); background: transparent; color: var(--muted); font: inherit; cursor: not-allowed; }
.lv-uaepass b { color: var(--text); font-weight: 600; letter-spacing: .02em; }
.lv-uaepass span { font-size: 12px; }
.lv-agree { gap: 10px; align-items: flex-start; }
.lv-agree input { margin-top: 3px; flex: none; }
@media (max-width: 860px) { .login.lv .login-side .lv-trust { display: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lv-icon, :root:not([data-theme="light"]) .lv-choice > svg { color: #D9B8E2; } }
:root[data-theme="dark"] .lv-icon, :root[data-theme="dark"] .lv-choice > svg { color: #D9B8E2; }
.lv-ribbon { position: fixed; z-index: 400; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); transform: translateX(-50%); pointer-events: none; padding: 3px 10px; border-radius: 999px; background: rgba(23, 24, 28, .78); color: #fff; font-size: 10.5px; letter-spacing: .01em; white-space: nowrap; backdrop-filter: blur(6px); }
@media (max-width: 760px) { .lv-ribbon { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 2px); font-size: 10px; } }

/* ---------- Specimen labels ---------- */
.sp-labels { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-label { width: 60mm; height: 32mm; box-sizing: border-box; padding: 2mm 2.5mm; background: #fff; color: #000; border: 1px dashed #B8B8C2; border-radius: 6px; display: flex; flex-direction: column; gap: .4mm; font: 500 7.6pt/1.15 'Inter', system-ui, sans-serif; overflow: hidden; }
.sp-top { display: flex; justify-content: space-between; gap: 2mm; align-items: center; }
.sp-name { font-size: 9pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tube { flex: none; width: 3.2mm; height: 3.2mm; border-radius: 50%; border: .2mm solid #000; }
.sp-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-test { font-weight: 700; }
.sp-label .bc { width: 100%; height: 8.5mm; display: block; }
.sp-row { display: flex; justify-content: space-between; font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.sp-no { font-size: 8.5pt; letter-spacing: .04em; }
#sp-print { display: none; }
@media print {
  body.print-labels > *:not(#sp-print) { display: none !important; }
  body.print-labels #sp-print, body.print-labels #sp-print * { visibility: visible !important; }
  body.print-labels { background: #fff !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; height: auto !important; }
  body.print-labels::before { display: none !important; }
  body.print-labels #sp-print { display: flex; gap: 2mm; padding: 0; margin: 0; }
  body.print-labels #sp-print .sp-label { border: 0; border-radius: 0; }
  body.print-roll #sp-print { display: block; }
  body.print-roll #sp-print .sp-label { break-after: page; page-break-after: always; }
  body.print-roll #sp-print .sp-label:last-child { break-after: auto; page-break-after: auto; }
  body.print-sheet #sp-print { flex-wrap: wrap; width: 190mm; }
  body.print-sheet #sp-print .sp-label { border: .2mm dashed #999; }
}
.lv-foot { color: #E9DDEF; } .lv-foot a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.alog-secondary { height: 52px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 18px; background: transparent; color: #fff; font: 650 16px 'Instrument Sans', var(--font); cursor: pointer; transition: transform .14s, background .14s; }
.alog-secondary:active { transform: scale(.98); background: rgba(255,255,255,.12); }
.lv-legal { align-self: center; font-size: 12px; color: rgba(255,255,255,.75); }
.lv-legal a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.alog-sheet .login-card .seg[role="radiogroup"] { display: inline-flex; align-self: flex-start; }
.alog-stage.hp.photo.at-welcome .alog-secondary { border-color: rgba(23,24,28,.55); color: #17181C; }
.alog-stage.hp.photo.at-welcome .alog-secondary:active { background: rgba(23,24,28,.06); }
.alog-stage.hp.photo.at-welcome .lv-legal, .alog-stage.hp.photo.at-welcome .lv-legal a { color: #3E3B37; }

/* Connect hub */
.cx-card .card-b, .cx-card > div:last-child { min-width: 0; }
.cx-sec { padding: 12px 0; border-top: 1px solid var(--border); }
.cx-sec:first-child { border-top: 0; padding-top: 0; }
.cx-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.cx-row > :first-child { flex: 1 1 260px; min-width: 0; }
.cx-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 12px; align-items: center; margin-top: 8px; }
.cx-code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--fg); overflow-wrap: anywhere; min-width: 0; }
.cx-key { font-size: 13px; padding: 10px 12px; user-select: all; }
.cx-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 0; }
.cx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); flex: none; display: inline-block; margin-top: 5px; }
.cx-dot.ok { background: var(--success, #2f9e6b); } .cx-dot.bad { background: var(--danger); } .cx-dot.mid { background: var(--info, #6b7a90); }
.cx-map { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.cx-pre { margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; color: var(--fg); }
.cx-ta { width: 100%; min-height: 220px; font-size: 12px; line-height: 1.5; white-space: pre; resize: vertical; }
.cx-res { margin-top: 12px; }
.cx-sim { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.cx-pick.on { background: var(--surface-2); }
.cx-filters { gap: 8px; justify-content: flex-end; }
.cx-search { width: 240px; max-width: 100%; }
.cx-chips { margin: 4px 0 12px; }
.cx-in { align-items: flex-start; }
.cx-in-ic { margin-top: 2px; flex: none; }
.cx-in-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.cx-ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.cx-li { align-items: center; }
@media (max-width: 1100px) { .cx-sim { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cx-kv { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cx-kv > .muted { margin-top: 6px; }
  .cx-map { grid-template-columns: minmax(0, 1fr) auto; }
  .cx-map .cx-map-arrow { display: none; }
  .cx-map select { grid-column: 1 / 2; }
  .cx-in { flex-wrap: wrap; }
  .cx-in-act { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .cx-filters { justify-content: flex-start; width: 100%; }
  .cx-search { width: 100%; }
  .cx-li { flex-wrap: wrap; }
}
/* Wide tables become stacked rows on phones (platform screens and Connect hub). */
@media (max-width: 720px) {
  table.cx-stack, table.cx-stack tbody, table.cx-stack tr, table.cx-stack td { display: block; width: 100%; }
  table.cx-stack thead { display: none; }
  table.cx-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  table.cx-stack tr:last-child { border-bottom: 0; }
  table.cx-stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: center; white-space: normal !important; min-width: 0 !important; }
  table.cx-stack td::before { content: attr(data-label); color: var(--fg-2); font-size: 12px; }
  table.cx-stack td:not([data-label])::before, table.cx-stack td[data-label=""]::before { content: none; }
  table.cx-stack td:not([data-label]), table.cx-stack td[data-label=""] { grid-template-columns: minmax(0, 1fr); padding-top: 8px; }
  table.cx-stack td > * { min-width: 0; }
  .table-wrap:has(> table.cx-stack) { overflow-x: visible; }
  table.cx-stack select.inp { width: 100% !important; }
}
/* Platform screens (src/screens/platform.tsx) */
.pf-search { width: 230px; max-width: 100%; }
.inp.pf-role { height: 30px; width: auto; max-width: 220px; }
@media (max-width: 720px) { .pf-search { width: 100%; } .inp.pf-role { max-width: none; } .app-i { flex-wrap: wrap; } .app-i > .col:last-child { flex-direction: row; } }

/* MediCase for employers and Enterprise portal (corporate module). Text stays black or white; colour only in small dots. */
.cp-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg); }
.cp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); flex: none; }
.cp-dot.ok { background: var(--success); } .cp-dot.wait { background: var(--warning); } .cp-dot.late { background: var(--danger); } .cp-dot.info { background: var(--info); }
.cp-late { color: var(--danger); font-weight: 600; }
.cp-h { font-size: 13px; font-weight: 600; margin: 12px 0 2px; color: var(--fg); }
.cp-sec .link { color: var(--fg-2); }
.cp-unlinked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px dashed var(--border-2); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.cp-unlinked select { width: auto; max-width: 100%; }
.cp-consent { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cp-appr { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.cp-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cp-form .inp { flex: 1 1 140px; min-width: 0; width: auto; }
.cp-form .inp:first-child { flex: 2 1 220px; }
.cp-reqs { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cp-req { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); }
.cp-req:first-child { border-top: 0; }
.cp-req.done .small { color: var(--fg-3); text-decoration: line-through; }
.cp-req input[type=checkbox] { flex: none; width: 16px; height: 16px; }
.cp-upd { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); margin: 0; }
.cp-pt { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; margin: 10px 0; }
.cp-meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cp-meter i { display: block; height: 100%; background: var(--fg); border-radius: 99px; }
.cp-meter i.over { background: var(--danger); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.cp-acc { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; cursor: pointer; color: var(--fg); }
.cp-acc > b { font-size: 16px; }
.cp-acc:hover { border-color: var(--border-2); }
.cp-facts { margin-top: 2px; }
.cp-ref { align-items: flex-start; }
.cp-bars { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.card-b.flush > .cp-bars { padding: 14px 16px; }
.cp-bar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 54px; gap: 10px; align-items: center; font-size: 13px; }
.cp-bar-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cp-bar-t { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.cp-bar-t i { display: block; height: 100%; background: var(--fg); border-radius: 99px; }
.cp-bar-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); }
.cp-prog { display: flex; flex-direction: column; gap: 2px; }
.cp-trend { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 140px; padding-top: 8px; }
.cp-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cp-col i { display: block; width: 100%; max-width: 34px; background: var(--fg); border-radius: 6px 6px 2px 2px; }
.cp-case { align-items: flex-start; }
.cp-apr { flex-wrap: wrap; }
.cp-fac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.cp-fac { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.cp-fac-h b { font-size: 15px; }
.cp-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.cp-dl dt { color: var(--fg-2); }
.cp-dl dd { margin: 0; text-align: right; color: var(--fg); overflow-wrap: anywhere; }
.cp-spark { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-bottom: 6px; }
.cp-spark i { flex: 1; background: var(--fg); opacity: .85; border-radius: 2px 2px 0 0; min-width: 2px; }
@media (max-width: 640px) {
  .cp-grid, .cp-fac-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-bar { grid-template-columns: minmax(0, 1fr) 54px; }
  .cp-bar-t { grid-column: 1 / -1; grid-row: 2; }
  .cp-form .inp, .cp-form .inp:first-child { flex: 1 1 100%; }
  .cp-req { flex-wrap: wrap; }
  .q-row.cp-apr, .q-row.cp-ref { flex-direction: column; align-items: stretch; gap: 10px; }
  .cp-apr > .row, .cp-ref > .col { justify-content: flex-start !important; align-items: flex-start !important; flex-direction: row; flex-wrap: wrap; }
  .cp-req .grow { flex: 1 1 calc(100% - 30px); }
  /* Comparison tables become one card per facility on phones. */
  .cp-cmp thead { display: none; }
  .cp-cmp, .cp-cmp tbody, .cp-cmp tr, .cp-cmp td { display: block; width: 100%; }
  .cp-cmp tr { border-top: 1px solid var(--border); padding: 10px 14px; }
  .cp-cmp td { border: 0 !important; padding: 3px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .cp-cmp td[data-label]::before { content: attr(data-label); color: var(--fg-2); text-align: left; flex: none; max-width: 45%; }
  .cp-cmp td:first-child { text-align: left; font-size: 14px; }
}

/* ---------- Home care module (hcm-) ---------- */
.hcm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--fg-3); }
.hcm-dot.l0 { background: var(--fg); }
.hcm-dot.l1 { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg-3); }
.hcm-dot.l2 { background: var(--fg-2); }
.hcm-dot.l3 { background: var(--danger); }
.hcm-dot.live { animation: hcm-pulse 1.8s ease-in-out infinite; }
@keyframes hcm-pulse { 50% { opacity: .35; } }
.hcm-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.hcm-st.crit { color: var(--danger); font-weight: 600; }
.hcm-st svg { width: 14px; height: 14px; }
.hcm-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--border-2); border-radius: 99px; font-size: 10.5px; font-weight: 600; color: var(--fg-2); vertical-align: 1px; }
.hcm-sub { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
.hcm-grid { margin-bottom: 16px; }
.hcm-grid > .card { margin: 0; }
.hcm-tabs { margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.hcm-tabs .tabs { flex-wrap: nowrap; }
.hcm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hcm-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hcm-list li svg { width: 14px; height: 14px; flex: none; }
.hcm-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); margin-bottom: 14px; }
.hcm-note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.hcm-crit { background: var(--danger-soft); }
.hcm-crit:hover { background: var(--danger-soft) !important; }

/* Mono selection chips (no teal) */
.hcm-q .chip.on, .hcm-rule .chip.on, .modal .hcm-pick .chip.on, .hcm-q .chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.hcm-q { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.hcm-q:last-of-type { border-bottom: 0; }
.hcm-scale .chip { min-width: 34px; justify-content: center; }

/* Patient list and assessments */
.hcm-prow-r, .hcm-arow-r { align-items: flex-end; text-align: right; flex: none; max-width: 46%; }
@media (max-width: 640px) {
  .hcm-prow, .hcm-arow { flex-direction: column; align-items: stretch; }
  .hcm-prow-r, .hcm-arow-r { align-items: flex-start; text-align: left; max-width: none; }
}

/* Day list */
.hcm-drive { display: flex; align-items: center; gap: 6px; padding: 6px 16px 0; }
.hcm-drive svg { width: 13px; height: 13px; }
.hcm-visit { align-items: center; cursor: default; }
.hcm-visit:hover { background: none !important; }
.hcm-time { display: flex; flex-direction: column; min-width: 64px; }
.hcm-vbody { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; align-items: flex-start; }
.hcm-vact { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .hcm-visit { flex-wrap: wrap; }
  .hcm-vbody { flex: 1 1 calc(100% - 80px); }
  .hcm-vact { width: 100%; justify-content: flex-start; }
}
.hcm-lone { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 12px; }
.hcm-vit { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.hcm-step { padding: 6px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.hcm-step:last-child { border-bottom: 0; }
.hcm-safety { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hcm-safety li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.hcm-safety li svg { flex: none; margin-top: 2px; color: var(--fg-2); }
.hcm-safety li.crit { background: var(--danger-soft); }
.hcm-safety li.crit svg { color: var(--danger); }

/* Medicines */
.hcm-dose { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hcm-dose:last-child { border-bottom: 0; }
.hcm-dose-t { min-width: 56px; font-size: 12px; color: var(--fg-2); }
.hcm-check { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--fg); border-radius: 12px; }
.hcm-check b svg { width: 14px; height: 14px; vertical-align: -2px; }
.hcm-mar td.hcm-mcell { text-align: center; padding: 8px 6px; }
.hcm-mar th { text-align: center; }
.hcm-mar th:first-child { text-align: left; }

/* Handovers */
.hcm-h { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.hcm-h:last-child { border-bottom: 0; }
.hcm-sbar { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; margin: 0; font-size: 13px; }
.hcm-sbar dt { color: var(--fg-3); font-weight: 600; font-size: 12px; }
.hcm-sbar dd { margin: 0; overflow-wrap: anywhere; }
.hcm-erow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hcm-erow > .inp.grow { flex: 1 1 200px; min-width: 0; }
.hcm-erow > select.inp { width: auto; }
.hcm-rule { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.hcm-2 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Admin board */
.hcm-board { align-items: flex-start; cursor: default; }
.hcm-board:hover { background: none !important; }
.hcm-board-who { display: flex; flex-direction: column; min-width: 150px; }
.hcm-board-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: flex-start; }
.hcm-chipv { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: left; }
@media (max-width: 640px) { .hcm-board { flex-direction: column; } .hcm-board-list { justify-content: flex-start; } }

/* Roster week */
.hcm-week { min-width: 860px; }
.hcm-week th.on, .hcm-week td.on { background: var(--surface-2); }
.hcm-week td { vertical-align: top; padding: 6px; }
.hcm-cell { display: flex; flex-direction: column; gap: 0; width: 100%; padding: 4px 6px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 11.5px; line-height: 1.3; color: var(--fg); text-align: left; cursor: pointer; }
.hcm-cell.done { opacity: .6; }
.hcm-cell.unc { border-color: var(--danger); color: var(--danger); font-weight: 600; }
.hcm-reg select.inp { width: auto; max-width: 190px; }
@media (max-width: 640px) { .hcm-reg { flex-wrap: wrap; } .hcm-reg select.inp { max-width: none; width: 100%; } }

/* Referrals */
.hcm-ref { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.hcm-ref:last-child { border-bottom: 0; }

/* Wound trend */
.hcm-wound { display: flex; gap: 10px; align-items: flex-end; height: 120px; margin-bottom: 8px; }
.hcm-wbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.hcm-wfill { width: 100%; max-width: 44px; background: var(--fg); border-radius: 6px 6px 2px 2px; opacity: .85; }

/* Billing */
.hcm-bill { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hcm-bill-i { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }

/* Caregiver */
.hcm-cg { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.hcm-cg > .card { margin: 0; }
.hcm-cg-h h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.hcm-cg-name { margin: 2px 0; font-size: 22px; letter-spacing: -.02em; }
.hcm-cg-shift .card-b { display: flex; flex-direction: column; gap: 12px; }
.hcm-cg-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hcm-cg-acts .btn { min-height: 44px; }
.hcm-cg-task { padding: 6px 0; font-size: 14px; }
.hcm-cg-task input { width: 20px; height: 20px; }
.hcm-reply { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.hcm-reply svg { flex: none; margin-top: 3px; color: var(--fg-2); }
.hcm-cg a.link svg { width: 13px; height: 13px; vertical-align: -2px; }

/* HealthPass family card */
.hcm-fam-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.hcm-fam-now { display: flex; gap: 10px; align-items: flex-start; }
.hcm-fam-now > svg { flex: none; margin-top: 2px; }
.hcm-fam-sum { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.hcm-fam-sum p { margin: 4px 0 0; }
.hcm-fam-plan { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg); cursor: pointer; text-align: left; }
.hcm-fam-goals { margin: 0; padding-left: 18px; }
.hcm-fam-log { display: flex; flex-direction: column; gap: 3px; }
a.hcm-a, a.hcm-a:hover { text-decoration: none; }
.hcm-tel { display: inline-flex; align-items: center; gap: 5px; color: var(--fg); font-weight: 500; }
.hcm-alert { cursor: default; flex-wrap: wrap; }
@media (max-width: 640px) { .hcm-alert > .row.wrap { width: 100%; padding-left: 16px; } }

/* Pharmacy system (CNS Click) */
.ph-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); vertical-align: middle; margin-right: 2px; flex: none; }
.ph-dot.ok { background: #3f9d6b; } .ph-dot.warn { background: #c98a1b; } .ph-dot.bad { background: var(--danger); } .ph-dot.off { background: var(--border-2); }
.ph-branch { width: auto; min-width: 150px; max-width: 100%; }
.ph-search { width: 240px; max-width: 100%; }
.ph-pad { padding: 10px 14px; margin: 0; }
.ph-right { gap: 2px; align-items: flex-end; text-align: right; flex: none; }
.ph-list .q-row { width: 100%; text-align: left; }
.ph-med + .ph-med { border-top: 1px solid var(--border); }
.ph-med .q-row { border-bottom: 0; }
.ph-batches { padding: 4px 14px 14px 38px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ph-batches .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ph-count { width: 90px; }
.ph-grn-line { display: grid; grid-template-columns: minmax(0, 2fr) 90px minmax(0, 1.3fr) 150px auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.ph-grn-line .field { margin: 0; }
.ph-grn-med { align-self: center; }
.ph-grn-note { grid-column: 1 / -1; }
.ph-po-line { gap: 8px; }
.ph-scan { gap: 8px; }
.ph-bline { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ph-amt { min-width: 64px; text-align: right; }
.ph-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 4px 0 0; font-size: 14px; }
.ph-tot dt { color: var(--fg-2); } .ph-tot dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ph-receipt { display: flex; flex-direction: column; gap: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; max-width: 380px; margin: 0 auto; }
.ph-receipt hr { width: 100%; border: 0; border-top: 1px dashed var(--border-2); margin: 6px 0; }
.ph-plain { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.ph-reg td { vertical-align: top; }
@media (max-width: 720px) {
  .ph-grn-line { grid-template-columns: 1fr 1fr; }
  .ph-grn-line .ph-grn-med { grid-column: 1 / -1; }
  .ph-search { width: 100%; }
  .ph-batches { padding-left: 14px; }
  .ph-branch { min-width: 0; width: 100%; }
}
