/* ClickRx 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; }

/* ===================== ClickRx provider 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; }
