:root {
  color-scheme: light;
  --ink: #2b1b1d;
  --muted: #756568;
  --surface: #ffffff;
  --surface-soft: #fbf7f7;
  --line: #eadfe1;
  --border: #eadfe1;
  --brand-950: #5f0d18;
  --brand-900: #7f1422;
  --brand-800: #981b2b;
  --brand-700: #b42332;
  --brand-600: #c93645;
  --brand-500: #dc5965;
  --brand-100: #fff0f2;
  --accent: #8f1d2c;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #9a6700;
  --warning-soft: #fff8df;
  --success: #137a4c;
  --success-soft: #eaf8f0;
  --info: #1d5fa7;
  --info-soft: #edf5ff;
  --shadow-sm: 0 4px 14px rgba(3, 47, 54, .08);
  --shadow-md: 0 16px 40px rgba(3, 47, 54, .12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-soft); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--ink); background: var(--surface-soft); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 3px solid rgba(180, 35, 50, .30); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: 8px; right: 8px; z-index: 1000; transform: translateY(-150%); background: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-md); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 18px; background: linear-gradient(180deg, var(--brand-950), var(--brand-900)); color: #fff; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #dc5965, #981b2b); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.brand-mark svg { width: 25px; height: 25px; }
.brand-title { font-weight: 800; letter-spacing: .02em; font-size: 1.2rem; }
.brand-subtitle { color: rgba(255,255,255,.65); font-size: .73rem; }
.nav-group-title { color: rgba(255,255,255,.48); font-size: .7rem; font-weight: 800; letter-spacing: .08em; padding: 15px 12px 7px; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; color: rgba(255,255,255,.78); transition: .18s ease; }
.nav-link svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 3px 0 0 #ffffff; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
.user-mini { display: flex; gap: 10px; align-items: center; padding: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.13); font-weight: 800; }
.user-mini strong { display: block; font-size: .86rem; }
.user-mini small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.58); }

.main-column { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 74px; background: rgba(251,247,247,.92); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(215,229,230,.8); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.mobile-menu { display: none; }
.page { padding: 30px; max-width: 1460px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-header h1 { margin: 0 0 5px; font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.025em; }
.page-header p { margin: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 20px; }
.card-empty { padding: 34px 20px; text-align: center; color: var(--muted); }

.metric { padding: 20px; position: relative; overflow: hidden; }
.metric::after { content: ""; width: 88px; height: 88px; position: absolute; left: -20px; bottom: -35px; border-radius: 50%; background: var(--brand-100); opacity: .7; }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-100); color: var(--brand-700); margin-bottom: 18px; }
.metric-icon svg { width: 22px; height: 22px; }
.metric-value { font-size: 1.8rem; line-height: 1; font-weight: 850; letter-spacing: -.04em; }
.metric-label { margin-top: 8px; color: var(--muted); font-size: .84rem; }

.btn { border: 0; border-radius: 10px; padding: 10px 15px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; font-weight: 750; transition: .16s ease; min-height: 42px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--brand-700); box-shadow: 0 5px 15px rgba(180,35,50,.22); }
.btn-primary:hover { background: var(--brand-800); transform: translateY(-1px); }
.btn-secondary { color: var(--brand-800); background: var(--brand-100); }
.btn-secondary:hover { background: #f9dce0; }
.btn-outline { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--brand-500); color: var(--brand-700); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: .8rem; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; position: relative; }
.icon-btn svg { width: 20px; height: 20px; }
.notification-dot { position: absolute; top: 6px; left: 7px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 800; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .83rem; font-weight: 750; }
.field-hint { color: var(--muted); font-size: .74rem; }
.input, .select, .textarea { width: 100%; border: 1px solid #c9dadd; border-radius: 10px; background: #fff; color: var(--ink); padding: 11px 12px; transition: .16s ease; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(180,35,50,.12); outline: 0; }
.textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-start; gap: 10px; margin-top: 18px; }
.checkbox-row, .radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-100); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: #eef3f3; color: #435b60; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-100); color: var(--brand-700); }

.alert { border-radius: 12px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 11px; margin-bottom: 16px; border: 1px solid transparent; }
.alert svg { width: 21px; height: 21px; flex: 0 0 auto; margin-top: 1px; }
.alert-danger { background: var(--danger-soft); color: #7d1911; border-color: #f4c6c1; }
.alert-warning { background: var(--warning-soft); color: #765100; border-color: #f1dda2; }
.alert-info { background: var(--info-soft); color: #174d86; border-color: #c8def8; }
.alert-success { background: var(--success-soft); color: #0c663d; border-color: #bee5ce; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { text-align: right; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .025em; background: #f8fbfb; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #fbfdfd; }
.row-actions { display: flex; gap: 6px; }

.list { display: grid; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-main { min-width: 0; }
.list-main strong { display: block; }
.list-main small { display: block; color: var(--muted); margin-top: 3px; }
.list-side { flex: 0 0 auto; text-align: left; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .95fr) minmax(460px, 1.05fr); background: #fff; }
.auth-panel { padding: clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.auth-visual { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 15% 15%, rgba(34,210,194,.28), transparent 34%), linear-gradient(140deg, var(--brand-950), var(--brand-700)); padding: 72px; display: flex; align-items: end; }
.auth-visual::before, .auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.auth-visual::before { width: 430px; height: 430px; top: -150px; left: -110px; }
.auth-visual::after { width: 260px; height: 260px; bottom: -100px; right: -70px; }
.auth-copy { position: relative; z-index: 1; max-width: 560px; }
.auth-copy h1 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.1; margin: 0 0 20px; letter-spacing: -.045em; }
.auth-copy p { color: rgba(255,255,255,.72); font-size: 1.05rem; }
.auth-benefits { display: grid; gap: 12px; margin-top: 30px; }
.auth-benefit { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.86); }
.auth-benefit svg { width: 20px; height: 20px; color: #48dfd1; }
.auth-card { width: min(100%, 480px); margin: auto; }
.auth-card .brand { color: var(--ink); padding-right: 0; }
.auth-card .brand-subtitle { color: var(--muted); }
.auth-card h2 { margin: 24px 0 5px; font-size: 1.7rem; }
.auth-card > p { color: var(--muted); margin: 0 0 26px; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: .86rem; }
.auth-switch a { color: var(--brand-700); font-weight: 800; }

.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.chat-card { min-height: 680px; display: flex; flex-direction: column; }
.chat-header { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-messages { padding: 22px; flex: 1; min-height: 380px; max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg,#fff,#fbfdfd); }
.bubble { max-width: 82%; padding: 12px 14px; border-radius: 15px; font-size: .9rem; box-shadow: 0 2px 7px rgba(3,47,54,.06); }
.bubble.patient { align-self: flex-start; background: var(--brand-700); color: #fff; border-bottom-right-radius: 4px; }
.bubble.system { align-self: flex-end; background: #edf4f4; color: var(--ink); border-bottom-left-radius: 4px; }
.bubble-meta { display: block; opacity: .62; font-size: .65rem; margin-top: 5px; }
.question-panel { border-top: 1px solid var(--line); padding: 16px 20px; background: #fff; }
.question-title { font-weight: 800; margin-bottom: 11px; }
.question-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.option-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 13px; color: var(--ink); }
.option-btn:hover, .option-btn.selected { background: var(--brand-100); border-color: var(--brand-500); color: var(--brand-800); }
.chat-compose { border-top: 1px solid var(--line); padding: 14px; display: flex; align-items: end; gap: 10px; }
.chat-compose textarea { min-height: 46px; max-height: 120px; resize: vertical; }

.timeline { position: relative; padding-right: 22px; }
.timeline::before { content: ""; position: absolute; right: 6px; top: 7px; bottom: 7px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 0 15px 18px 0; }
.timeline-item::before { content: ""; position: absolute; right: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline-item strong { font-size: .85rem; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }

.esi { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; font-weight: 900; font-size: 1.2rem; color: #fff; }
.esi-1 { background: #a31212; }
.esi-2 { background: #db5b24; }
.esi-3 { background: #d49b11; }
.esi-4 { background: #2d7ebc; }
.esi-5 { background: #23825a; }
.esi-null { background: #8b9ca0; }

.clinical-header { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 20px; background: linear-gradient(140deg, #fff, #f1fbfa); border-bottom: 1px solid var(--line); }
.patient-id-line { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.patient-name { font-size: 1.2rem; font-weight: 850; }
.section-stack { display: grid; gap: 18px; }
.data-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.data-pill { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfd; font-size: .8rem; }
.data-pill strong { display: block; font-size: .7rem; color: var(--muted); }

.skeleton { position: relative; overflow: hidden; background: #e9f0f0; border-radius: 8px; min-height: 18px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(-100%); } }

.toast-region { position: fixed; z-index: 1000; left: 22px; bottom: 22px; display: grid; gap: 9px; width: min(390px, calc(100vw - 44px)); }
.toast { padding: 13px 15px; border-radius: 12px; color: #fff; background: #263f44; box-shadow: var(--shadow-md); animation: toastIn .2s ease; }
.toast.error { background: #8f2119; }
.toast.success { background: #116d47; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(1, 25, 30, .56); display: grid; place-items: center; padding: 20px; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-md); }
.modal-header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; display: flex; gap: 9px; border-top: 1px solid var(--line); }

.emergency-banner { background: linear-gradient(135deg, #841710, #b52a1f); color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 12px 30px rgba(180,35,24,.22); }
.emergency-banner h2 { margin: 0 0 6px; }
.emergency-banner p { margin: 0 0 16px; color: rgba(255,255,255,.82); }

.mobile-overlay { display: none; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.ltr { direction: ltr; text-align: left; }
.code { direction: ltr; display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; right: 0; transform: translateX(105%); width: 270px; transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-overlay { position: fixed; display: block; inset: 0; z-index: 25; background: rgba(1,25,30,.45); opacity: 0; pointer-events: none; transition: .2s; }
  body.menu-open .mobile-overlay { opacity: 1; pointer-events: auto; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 18px; }
  .page { padding: 22px 18px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-header { flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .topbar-title { display: none; }
  .auth-panel { padding: 25px 18px; }
  .chat-messages { padding: 15px; }
  .bubble { max-width: 93%; }
  .clinical-header { grid-template-columns: 1fr; }
}

.wearable-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wearable-reading{border:1px solid var(--border);border-radius:14px;padding:12px;background:var(--surface-soft)}.wearable-reading>span{display:block;color:var(--muted);font-size:.78rem}.wearable-reading>strong{display:block;font-size:1.35rem;margin-top:4px}.wearable-reading>strong small{font-size:.72rem;color:var(--muted)}.wearable-reading>em{display:block;font-style:normal;font-size:.68rem;margin-top:5px}.wearable-reading>em.fresh{color:var(--success)}.wearable-reading>em.stale{color:var(--warning)}
@media(max-width:640px){.wearable-grid{grid-template-columns:1fr}}


/* v0.10 — Figma-informed patient experience. */
.patient-mode { background: #f6f8fd; }
.patient-mode .sidebar { background: linear-gradient(180deg, #17264a, #111b35); }
.patient-mode .brand-mark { background: linear-gradient(135deg, #6d8ffc, #4f6fe8); }
.patient-topbar { background: rgba(246,248,253,.92); }
.patient-topbar-brand { display:none; font-weight:900; color:var(--brand-800); letter-spacing:.02em; }
.patient-page { max-width: 1180px; }
.patient-bottom-nav { display:none; }
.btn-large { min-height:50px; padding:13px 20px; border-radius:13px; }
.full { width:100%; }
.eyebrow { display:block; color:var(--brand-700); font-size:.74rem; font-weight:900; letter-spacing:.03em; margin-bottom:7px; }
.patient-welcome { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:20px; }
.patient-welcome span { font-weight:800; color:var(--brand-700); }
.patient-welcome h1 { margin:4px 0 6px; font-size:clamp(1.55rem,3vw,2.2rem); letter-spacing:-.035em; }
.patient-welcome p { margin:0; color:var(--muted); }
.patient-welcome-badge { display:flex; align-items:center; gap:8px; background:#fff; color:var(--success); border:1px solid #cfe9dc; border-radius:999px; padding:9px 13px; font-size:.78rem; font-weight:850; }
.care-start-card { position:relative; overflow:hidden; min-height:230px; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(230px,.7fr); align-items:center; gap:20px; padding:34px; border-radius:25px; color:#fff; background:radial-gradient(circle at 85% 25%,rgba(255,255,255,.2),transparent 27%),linear-gradient(135deg,#415fd3,#6b7ff0 56%,#7b5ad8); box-shadow:0 22px 52px rgba(65,95,211,.22); }
.care-start-card h2 { margin:0 0 8px; font-size:clamp(1.5rem,3vw,2.25rem); }
.care-start-card p { margin:0 0 22px; max-width:580px; color:rgba(255,255,255,.8); }
.care-start-card .eyebrow { color:#dfe6ff; }
.care-start-card .btn-primary { background:#fff; color:#3454c3; box-shadow:none; }
.care-start-card .btn-primary:hover { background:#f2f5ff; }
.care-start-visual { min-height:170px; display:grid; place-items:center; position:relative; }
.pulse-line { position:absolute; width:88%; height:42px; opacity:.38; background:linear-gradient(90deg,transparent 0 8%,#fff 8% 12%,transparent 12% 27%,#fff 27% 31%,transparent 31% 46%,#fff 46% 50%,transparent 50% 65%,#fff 65% 69%,transparent 69%); clip-path:polygon(0 48%,18% 48%,23% 18%,28% 82%,34% 48%,100% 48%,100% 55%,35% 55%,28% 100%,22% 36%,19% 55%,0 55%); }
.assistant-orb { position:relative; display:grid; place-items:center; border-radius:42% 42% 48% 48%; background:linear-gradient(145deg,#fff,#dbe3f5); box-shadow:0 18px 38px rgba(19,32,63,.22),inset 0 0 0 1px rgba(255,255,255,.8); z-index:1; }
.assistant-orb.large { width:118px; height:102px; }
.assistant-orb.small { width:52px; height:46px; flex:0 0 auto; }
.assistant-orb::before { content:""; width:70%; height:48%; border-radius:50%; background:#17203a; box-shadow:inset 0 0 18px rgba(76,191,255,.28); }
.assistant-orb span::before,.assistant-orb span::after { content:""; position:absolute; top:41%; width:15%; height:8%; border-bottom:3px solid #63dcff; border-radius:50%; }
.assistant-orb span::before { right:27%; }
.assistant-orb span::after { left:27%; }
.assistant-orb i { position:absolute; bottom:-14px; width:30%; height:23px; border-radius:0 0 50% 50%; background:linear-gradient(#dce4f2,#fff); }
.patient-dashboard-grid { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
.patient-checklist-card,.patient-vitals-card,.active-care-card { border-radius:20px; }
.setup-step { display:grid; grid-template-columns:42px minmax(0,1fr) 20px; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.setup-step:last-child { border-bottom:0; }
.setup-step>span { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--brand-100); color:var(--brand-700); }
.setup-step.done>span { background:var(--success-soft); color:var(--success); }
.setup-step strong,.setup-step small { display:block; }
.setup-step small { color:var(--muted); margin-top:2px; }
.dashboard-vitals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.dashboard-vital { padding:13px; border:1px solid var(--line); border-radius:14px; background:#fbfcff; }
.dashboard-vital span,.dashboard-vital em { display:block; font-size:.7rem; color:var(--muted); font-style:normal; }
.dashboard-vital strong { display:block; margin:5px 0; font-size:1.25rem; }
.dashboard-vital strong small { font-size:.67rem; color:var(--muted); }
.dashboard-vital em.fresh { color:var(--success); }
.dashboard-vital em.stale { color:var(--warning); }
.dashboard-empty-vitals { text-align:center; color:var(--muted); padding:12px; }
.dashboard-empty-vitals>div { width:48px; height:48px; margin:auto; display:grid; place-items:center; border-radius:14px; background:var(--brand-100); color:var(--brand-700); }
.dashboard-empty-vitals a { color:var(--brand-700); font-weight:850; }
.care-journey { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin:5px 0 18px; }
.care-journey-step { position:relative; text-align:center; color:#9ba6b8; }
.care-journey-step::before { content:""; position:absolute; top:17px; right:50%; width:100%; height:2px; background:#dfe5f0; z-index:0; }
.care-journey-step:first-child::before { width:50%; }
.care-journey-step:last-child::before { right:0; width:50%; }
.care-journey-step span { position:relative; z-index:1; width:34px; height:34px; margin:0 auto 7px; display:grid; place-items:center; border-radius:50%; background:#eef1f6; border:3px solid #fff; box-shadow:0 0 0 1px #dfe5f0; font-size:.75rem; font-weight:900; }
.care-journey-step small { font-weight:750; }
.care-journey-step.active span { background:#7551cf; color:#fff; box-shadow:0 0 0 4px #eee8ff; }
.care-journey-step.active small { color:#5e3db7; }
.care-journey-step.done span { background:var(--success); color:#fff; }
.care-journey-step.done::before,.care-journey-step.done+ .care-journey-step::before { background:#97d8b6; }
.active-care-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; padding-top:16px; border-top:1px solid var(--line); }
.active-care-actions p { margin:4px 0 0; color:var(--muted); }
.triage-intro-page,.triage-session-page,.device-onboarding-page { max-width:860px; margin:0 auto; }
.triage-mobile-header { display:none; align-items:center; justify-content:space-between; margin-bottom:18px; }
.triage-intro-card { display:flex; align-items:center; gap:22px; text-align:right; padding:24px 28px; }
.triage-intro-card h1 { margin:0 0 7px; font-size:clamp(1.5rem,4vw,2.2rem); }
.triage-intro-card p { margin:0; color:var(--muted); }
.triage-start-form { border-radius:22px; }
.triage-textarea { min-height:130px; font-size:1rem; }
.common-complaints { margin:20px 0; }
.common-complaints>strong { display:block; margin-bottom:11px; }
.complaint-chips { display:flex; flex-wrap:wrap; gap:9px; }
.complaint-chip { border:1px solid var(--line); border-radius:999px; padding:9px 13px; background:#fff; color:var(--ink); display:flex; align-items:center; gap:7px; }
.complaint-chip:hover,.complaint-chip.selected { border-color:var(--brand-500); background:var(--brand-100); color:var(--brand-800); }
.triage-disclaimer { display:flex; gap:11px; align-items:flex-start; margin:18px auto 0; max-width:700px; padding:15px; color:var(--muted); font-size:.82rem; }
.triage-disclaimer svg { color:var(--brand-700); flex:0 0 auto; }
.triage-disclaimer p { margin:3px 0 0; }
.triage-progress-wrap { margin:16px 0; padding:0 4px; }
.triage-progress-wrap>div:first-child { display:flex; justify-content:space-between; font-size:.78rem; color:var(--muted); }
.triage-progress { height:7px; background:#e8ecf4; border-radius:99px; overflow:hidden; margin-top:8px; }
.triage-progress span { display:block; height:100%; background:linear-gradient(90deg,#6c8df5,#7452d1); border-radius:inherit; transition:width .25s ease; }
.triage-question-card,.triage-result-card,.review-status-card,.red-flag-screen { border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:var(--shadow-sm); }
.triage-question-card { overflow:hidden; }
.assistant-row { display:flex; align-items:center; gap:12px; padding:18px 20px; border-bottom:1px solid var(--line); }
.assistant-row strong,.assistant-row small { display:block; }
.assistant-row small { color:var(--muted); margin-top:2px; }
.mobile-question-panel { border-top:0; padding:24px; }
.mobile-question-panel .question-title { text-align:center; font-size:1.1rem; margin-bottom:18px; }
.vertical-options { display:grid; gap:10px; }
.vertical-options .option-btn { width:100%; min-height:52px; border-radius:13px; display:flex; justify-content:space-between; align-items:center; padding:12px 16px; font-weight:750; text-align:right; }
.free-text-answer { border-top:1px solid var(--line); padding:14px 20px; }
.free-text-answer summary { cursor:pointer; color:var(--brand-700); font-weight:800; }
.free-text-answer .chat-compose { border:0; padding:13px 0 0; }
.review-status-card { display:flex; align-items:center; gap:18px; padding:24px; background:linear-gradient(135deg,#fff,#f5f2ff); }
.review-status-card h2 { margin:0 0 5px; }
.review-status-card p { margin:0; color:var(--muted); }
.triage-result-card { text-align:center; padding:30px; }
.result-check { width:68px; height:68px; margin:0 auto 14px; display:grid; place-items:center; border-radius:50%; background:var(--success-soft); color:var(--success); }
.triage-result-card h1 { margin:2px 0 8px; }
.triage-result-card>p { color:var(--muted); }
.triage-result-card .data-pills { justify-content:center; }
.result-actions { display:flex; justify-content:center; gap:9px; margin-top:20px; }
.red-flag-screen { text-align:center; padding:34px 24px; background:#fff4f3; border-color:#f1c6c2; }
.red-flag-icon { width:78px; height:78px; display:grid; place-items:center; margin:0 auto 14px; border-radius:50%; background:#e92b24; color:#fff; box-shadow:0 10px 28px rgba(233,43,36,.24); }
.red-flag-screen .eyebrow { color:var(--danger); }
.red-flag-screen h1 { margin:0 0 9px; }
.red-flag-screen p { max-width:620px; margin:0 auto 20px; color:#6c2b27; }
.red-flag-actions { display:grid; gap:10px; max-width:440px; margin:0 auto 18px; }
.red-flag-screen small { color:#7e5a57; }
.triage-support-grid { margin-top:18px; }
.chat-history-modal { display:grid; gap:10px; max-height:55vh; overflow:auto; }
.summary-sheet { line-height:1.8; }
.device-progress { display:flex; align-items:center; gap:6px; margin-bottom:22px; position:relative; }
.device-progress span { height:5px; flex:1; border-radius:99px; background:#e1e6ef; }
.device-progress span.done,.device-progress span.active { background:var(--brand-600); }
.device-progress small { position:absolute; top:12px; right:0; color:var(--muted); }
.device-hero-card { display:grid; grid-template-columns:190px minmax(0,1fr); align-items:center; gap:28px; padding:28px; margin-top:30px; border-radius:24px; border:1px solid var(--line); background:radial-gradient(circle at 12% 50%,#e6f9ff,transparent 30%),#fff; box-shadow:var(--shadow-sm); }
.device-hero-card h1 { margin:0 0 7px; }
.device-hero-card p { margin:0; color:var(--muted); }
.watch-illustration { position:relative; height:180px; display:grid; place-items:center; }
.watch-face { position:relative; z-index:2; width:96px; height:112px; display:grid; place-items:center; border-radius:28px; color:#63dcff; background:linear-gradient(145deg,#1b243a,#05070d); border:8px solid #4a5262; box-shadow:0 0 0 20px rgba(94,218,255,.11),0 0 0 38px rgba(94,218,255,.06); }
.watch-strap { position:absolute; width:55px; height:64px; background:#252d3c; }
.watch-strap.top { top:0; border-radius:18px 18px 7px 7px; }
.watch-strap.bottom { bottom:0; border-radius:7px 7px 18px 18px; }
.device-content-grid { margin-top:18px; }
.permission-list { display:grid; gap:12px; margin-bottom:18px; }
.permission-list>div { display:grid; grid-template-columns:28px 1fr auto; gap:10px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.permission-list>div:last-child { border-bottom:0; }
.permission-list svg { color:var(--brand-700); }
.permission-list b { color:var(--success); font-size:.78rem; }

@media (max-width: 860px) {
  .patient-mode .sidebar { display:none; }
  .patient-mode .mobile-menu { display:none; }
  .patient-mode .topbar-title { display:none; }
  .patient-topbar-brand { display:inline; }
  .patient-bottom-nav { position:fixed; z-index:45; display:grid; grid-template-columns:repeat(5,1fr); right:10px; left:10px; bottom:10px; min-height:64px; padding:7px 6px max(7px,env(safe-area-inset-bottom)); border:1px solid rgba(207,216,234,.9); border-radius:20px; background:rgba(255,255,255,.96); backdrop-filter:blur(18px); box-shadow:0 12px 38px rgba(24,39,79,.18); }
  .patient-bottom-link { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:#8190aa; font-size:.67rem; font-weight:750; border-radius:13px; }
  .patient-bottom-link svg { width:20px; height:20px; }
  .patient-bottom-link.active { color:var(--brand-700); background:var(--brand-100); }
  .patient-mode .page { padding-bottom:100px; }
  .patient-dashboard-grid { grid-template-columns:1fr; }
  .dashboard-vitals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .triage-mobile-header { display:flex; }
  .care-start-card { grid-template-columns:1fr 160px; padding:26px; }
  .device-hero-card { grid-template-columns:150px minmax(0,1fr); }
}
@media (max-width: 620px) {
  .patient-page { padding:16px 14px 100px; }
  .patient-topbar { height:58px; padding:0 14px; }
  .patient-welcome { margin-top:4px; }
  .patient-welcome-badge { display:none; }
  .patient-welcome h1 { font-size:1.45rem; }
  .care-start-card { min-height:270px; grid-template-columns:1fr; padding:24px; }
  .care-start-visual { position:absolute; left:-5px; top:20px; opacity:.3; transform:scale(.72); }
  .care-start-copy { position:relative; z-index:2; }
  .care-start-card p { max-width:82%; }
  .dashboard-vitals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .care-journey-step small { font-size:.62rem; }
  .care-journey-step span { width:30px; height:30px; }
  .care-journey-step::before { top:15px; }
  .active-care-actions { align-items:flex-start; flex-direction:column; }
  .active-care-actions .btn { width:100%; }
  .triage-intro-card { flex-direction:column; text-align:center; padding:18px 10px; }
  .triage-start-form .card-body { padding:18px; }
  .complaint-chips { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .complaint-chip { justify-content:center; border-radius:12px; }
  .triage-result-card,.red-flag-screen { padding:26px 18px; }
  .result-actions { flex-direction:column; }
  .review-status-card { align-items:flex-start; }
  .triage-support-grid { grid-template-columns:1fr; }
  .device-hero-card { grid-template-columns:1fr; text-align:center; padding:22px; }
  .watch-illustration { height:150px; }
  .device-content-grid { grid-template-columns:1fr; }
}


/* Clinician summary pattern selected from the supplied Doctor Summary mockup. */
.clinical-summary-card { overflow:hidden; }
.clinical-esi-block { display:grid; justify-items:center; gap:4px; min-width:82px; }
.clinical-esi-block small,.clinical-esi-block em { color:var(--muted); font-size:.68rem; font-style:normal; }
.doctor-summary-sheet { max-width:1050px; margin:0 auto; }
.doctor-summary-primary { padding:16px 18px; border:1px solid #dbe4f5; border-radius:15px; background:#f8faff; }
.doctor-summary-primary span { display:block; color:var(--brand-700); font-size:.75rem; font-weight:850; margin-bottom:5px; }
.doctor-summary-primary strong { font-size:1.05rem; }
.doctor-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.doctor-summary-grid>section { padding:16px 18px; border:1px solid var(--line); border-radius:15px; background:#fff; }
.doctor-summary-grid h3 { margin:0 0 9px; color:var(--brand-800); font-size:.86rem; }
.doctor-summary-grid ul { margin:0; padding-right:18px; color:#34434f; font-size:.82rem; line-height:1.8; }
.doctor-summary-grid .summary-danger { background:var(--danger-soft); border-color:#f1c7c3; }
.doctor-summary-grid .summary-danger h3,.doctor-summary-grid .summary-danger li { color:#8b2018; }
.doctor-history-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:14px; padding:16px 18px; border:1px solid var(--line); border-radius:15px; background:#fbfcff; }
.summary-disclaimer { margin-top:14px; padding:12px 14px; border-radius:12px; background:#f5f6fa; color:var(--muted); font-size:.76rem; }
@media(max-width:760px){.doctor-summary-grid,.doctor-history-grid{grid-template-columns:1fr}.clinical-esi-block{justify-items:start}}

/* v0.11 — operational orders, result upload and slot-based booking. */
.appointment-admin-grid { align-items:start; }
.availability-list,.availability-grid,.order-list { display:grid; gap:12px; }
.availability-grid { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.availability-slot { display:flex; justify-content:space-between; gap:14px; align-items:center; border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; }
.availability-slot.disabled { opacity:.68; background:var(--surface-soft); }
.availability-slot strong,.availability-slot small,.slot-date { display:block; }
.slot-date { font-size:.82rem; color:var(--brand-700); font-weight:850; margin-bottom:4px; }
.availability-slot small { color:var(--muted); margin-top:4px; }
.slot-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.booking-encounter { border:1px solid var(--line); border-radius:18px; padding:16px; margin-bottom:16px; background:#fbfcff; }
.booking-encounter:last-child { margin-bottom:0; }
.booking-encounter-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.booking-encounter-head strong,.booking-encounter-head small { display:block; }
.booking-encounter-head small { color:var(--muted); margin-top:4px; }
.order-workspace { margin-top:18px; }
.order-card { border:1px solid var(--line); border-radius:16px; padding:15px; background:#fbfcff; }
.order-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.order-card-head strong,.order-card-head small { display:block; }
.order-card-head small { color:var(--muted); margin-top:4px; }
.order-card ul { margin:12px 0; padding-right:20px; }
.order-card-actions { display:flex; gap:8px; flex-wrap:wrap; }
.upload-orders-card { border-color:#d6defa; background:linear-gradient(180deg,#fff,#f8faff); }
.result-item-form { border:1px solid var(--line); border-radius:16px; padding:16px; background:var(--surface-soft); }
@media (max-width:720px) {
  .appointment-admin-grid { grid-template-columns:1fr; }
  .availability-slot,.booking-encounter-head,.order-card-head { align-items:flex-start; flex-direction:column; }
  .slot-actions { width:100%; justify-content:flex-start; }
}

/* v0.12 — medication safety, formulary search and electronic prescriptions. */
.medication-profile-grid .card-body { min-height: 340px; }
.medication-catalog-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 12px; border:1px dashed var(--line); border-radius:12px; background:#fbfdfd; }
.inline-form { display:flex; gap:9px; align-items:center; }
.inline-form .input { flex:1; }
.safety-issue-list { display:grid; gap:10px; margin:14px 0 18px; }
.safety-issue { border:1px solid var(--line); border-radius:13px; padding:13px 14px; background:#fff; }
.safety-issue>div { display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.safety-issue p { margin:0; color:var(--ink); line-height:1.75; }
.safety-issue small { display:block; margin-top:8px; color:var(--muted); }
.safety-issue.block,.safety-issue.contraindicated { border-color:#efb8b3; background:var(--danger-soft); }
.safety-issue.warning,.safety-issue.major,.safety-issue.moderate { border-color:#ead38e; background:var(--warning-soft); }
.medication-safety-summary { margin-bottom:16px; }
.prescription-card { overflow:hidden; }
.prescription-sheet { display:grid; gap:14px; }
.prescription-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.prescription-head h3 { margin:5px 0 0; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; direction:ltr; text-align:left; }
.prescription-item { padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:#fbfcff; }
.prescription-item p { margin:6px 0; line-height:1.75; }

@media (max-width: 720px) {
  .inline-form { align-items:stretch; flex-direction:column; }
  .medication-profile-grid { grid-template-columns:1fr; }
  .prescription-head { flex-direction:column; }
}

/* v0.13 internal pilot UAT */
.pilot-scenario-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:16px}.pilot-scenario-card .card-body{display:flex;flex-direction:column;gap:14px}.pilot-scenario-card details{border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:var(--surface-soft)}.pilot-scenario-card summary{cursor:pointer;font-weight:700}.pilot-scenario-card li{margin:7px 0;line-height:1.8}.pilot-objective{padding:12px;border-radius:12px;background:rgba(13,120,135,.08);line-height:1.9}.pilot-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.pilot-metrics .metric-value{font-size:1.55rem}.btn-success{background:#14805e;color:#fff;border-color:#14805e}.btn-success:hover{background:#0e6c4f}@media(max-width:700px){.pilot-scenario-grid{grid-template-columns:1fr}.pilot-actions .btn{flex:1 1 42%}}

/* v0.15 clinical workflow snapshot */
.workflow-snapshot{border:1px solid var(--border,#d9e4e7);border-radius:18px;padding:18px;margin-bottom:18px;background:linear-gradient(145deg,rgba(231,248,250,.75),rgba(255,255,255,.98))}
.workflow-snapshot-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.workflow-snapshot-head h3{margin:4px 0}.workflow-snapshot-head p{margin:0;color:var(--muted,#64748b)}
.workflow-progress-ring{--progress:0;width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#0b7d87 calc(var(--progress)*1%),#dce9eb 0);position:relative;flex:0 0 auto}
.workflow-progress-ring:after{content:"";position:absolute;inset:7px;border-radius:50%;background:white}.workflow-progress-ring strong{position:relative;z-index:1;font-size:14px}
.workflow-progress-track{height:8px;background:#dce9eb;border-radius:999px;overflow:hidden;margin:14px 0}.workflow-progress-track span{height:100%;display:block;background:#0b7d87;border-radius:999px}
.workflow-kpis{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.workflow-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:18px}.workflow-columns h4{margin:0 0 10px}.workflow-columns ol{margin:0 0 14px;padding-inline-start:22px}
.workflow-timeline{display:grid;gap:11px}.workflow-event{display:grid;grid-template-columns:12px 1fr;gap:10px;align-items:start}.workflow-event>span{width:10px;height:10px;margin-top:5px;border-radius:50%;background:#0b7d87;box-shadow:0 0 0 4px rgba(11,125,135,.12)}.workflow-event strong,.workflow-event small{display:block}.workflow-event small{color:var(--muted,#64748b);margin-top:2px}.workflow-event p{margin:3px 0 0;color:var(--muted,#64748b);font-size:13px}
@media(max-width:760px){.workflow-columns{grid-template-columns:1fr}.workflow-snapshot-head{align-items:flex-start}}

/* v0.16 internal test release */
.test-release-card { border: 1px solid rgba(27, 122, 93, .28); }
.release-check { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.release-check.passed { background: rgba(27, 122, 93, .07); border-color: rgba(27, 122, 93, .25); }
.release-check.failed { background: rgba(190, 61, 61, .07); border-color: rgba(190, 61, 61, .25); }
.release-check small { color: var(--muted); line-height: 1.6; }

/* v0.17 hospital visual system: white, clinical red, neutral graphite */
:root {
  --ink: #20242a;
  --muted: #68717d;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --line: #e5e7eb;
  --border: #e5e7eb;
  --brand-950: #5f1018;
  --brand-900: #7a1722;
  --brand-800: #971f2c;
  --brand-700: #b42332;
  --brand-600: #c93644;
  --brand-500: #dc4b57;
  --brand-100: #fff0f1;
  --accent: #b42332;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --shadow-sm: 0 4px 16px rgba(32, 36, 42, .06);
  --shadow-md: 0 18px 48px rgba(32, 36, 42, .12);
}
html, body { background: #f7f8fa; }
:focus-visible { outline-color: rgba(180,35,50,.35); }
.sidebar { background: linear-gradient(180deg, #74151f 0%, #4d0d14 100%); box-shadow: 8px 0 28px rgba(95,16,24,.12); }
.brand-mark { background: #fff; color: var(--brand-700); box-shadow: 0 8px 24px rgba(45,6,12,.22); }
.nav-link.active { background: rgba(255,255,255,.16); box-shadow: inset 3px 0 0 #fff; }
.topbar { background: rgba(255,255,255,.9); border-bottom-color: rgba(229,231,235,.9); }
.btn-primary { background: var(--brand-700); box-shadow: 0 6px 18px rgba(180,35,50,.22); }
.btn-primary:hover { background: var(--brand-800); }
.btn-secondary { color: var(--brand-800); background: var(--brand-100); }
.btn-secondary:hover { background: #ffe2e5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(180,35,50,.11); }
.auth-visual { background: radial-gradient(circle at 16% 14%, rgba(255,255,255,.16), transparent 34%), linear-gradient(145deg, #831825, #4d0d14); }
.auth-benefit svg { color: #fff; }
.patient-welcome, .care-start-card, .clinical-header { background: linear-gradient(135deg, #fff 0%, #fff5f6 100%); }
.card { border-color: #e7e9ed; }
th { text-align: left; background: #fafafa; }
.timeline { padding-right: 0; padding-left: 22px; }
.timeline::before { right: auto; left: 6px; }
.timeline-item { padding-right: 0; padding-left: 15px; }
.timeline-item::before { right: auto; left: -21px; }
.notification-dot { left: auto; right: 7px; }
.skip-link { right: auto; left: 8px; }
.auth-card .brand { padding-right: 8px; padding-left: 0; }
.toast-region { left: auto; right: 22px; }
.bubble.patient { align-self: flex-end; border-bottom-right-radius: 4px; border-bottom-left-radius: 15px; }
.bubble.system { align-self: flex-start; border-bottom-left-radius: 4px; border-bottom-right-radius: 15px; }
.list-side { text-align: right; }
.wearable-test-card { margin-top: 18px; border-color: #f2c7cc; background: linear-gradient(135deg,#fff,#fff7f8); }
.wearable-test-card .card-header { border-bottom-color: #f4d7da; }
@media (max-width: 860px) {
  .sidebar { box-shadow: 8px 0 30px rgba(20,0,3,.22); }
}

/* v0.18 hospital visual refinement */
body{background:linear-gradient(180deg,#fff 0,#fbf7f7 100%)}
.sidebar{background:linear-gradient(180deg,#68101c 0%,#8d1726 56%,#55101a 100%)}
.topbar{box-shadow:0 6px 22px rgba(86,14,25,.05)}
.card{box-shadow:0 7px 24px rgba(83,24,32,.07)}
.auth-visual{background:radial-gradient(circle at 18% 12%,rgba(255,255,255,.16),transparent 34%),linear-gradient(145deg,#5f0d18,#b42332)}
.patient-mode{background:#fbf7f7}.patient-mode .sidebar{background:linear-gradient(180deg,#68101c,#8d1726)}
.patient-mode .brand-mark{background:linear-gradient(135deg,#dc5965,#981b2b)}
.patient-topbar{background:rgba(251,247,247,.94)}
.metric::after{background:#fff0f2}
th{text-align:left;background:#fcf8f8}
.list-side{text-align:right}
