:root{--primary:#0f766e;--primary-dark:#115e59;--primary-soft:#dbeafe;--mint:#16a34a;--blue:#38bdf8;--accent:#38bdf8;--bg:#f8fafc;--surface:#ffffff;--surface-2:#dbeafe;--text:#0f172a;--muted:#52627a;--border:#d9e2ef;--danger:#b91c1c;--danger-soft:#fee2e2;--warning:#b45309;--warning-soft:#fef3c7;--success:#16a34a;--success-soft:#dcfce7;--shadow:0 3px 14px rgba(15,23,42,.055);--radius:17px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #5eead4;outline-offset:2px}.app-shell{min-height:100vh}.sidebar{width:268px;background:var(--surface);border-right:1px solid var(--border);position:fixed;inset:0 auto 0 0;z-index:20;display:flex;flex-direction:column;padding:24px 15px 16px;overflow-y:auto}.brand{display:flex;align-items:center;gap:11px;padding:0 9px 23px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--primary);color:white;font-size:25px;font-weight:700;box-shadow:0 5px 12px #0d94882b}.brand strong{font:800 21px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.7px;display:block}.brand small{font-size:9px;letter-spacing:1.2px;color:var(--muted);font-weight:700;display:block;margin-top:3px}.profile-mini{display:flex;align-items:center;gap:10px;padding:12px;background:var(--surface-2);border-radius:13px;margin-bottom:20px}.avatar{width:37px;height:37px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;font-size:12px;font-weight:700}.profile-mini-copy{min-width:0;flex:1}.profile-mini-copy strong,.profile-mini-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-mini-copy strong{font-size:12px}.profile-mini-copy small{font-size:10px;color:var(--muted);margin-top:4px}.status-dot{display:inline-block;width:7px;height:7px;background:#10b981;border-radius:50%;flex:0 0 auto}.nav-list{display:flex;flex-direction:column;gap:4px}.nav-label{padding:0 12px 7px;font-size:9px;letter-spacing:1.3px;font-weight:800;color:#94a3b8}.nav-label-spaced{margin-top:18px}.nav-list a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:11px;color:#64748b;font-size:12px;font-weight:550;transition:background .15s,color .15s}.nav-list a:hover{background:var(--surface-2);color:var(--text)}.nav-list a.active{background:#e6f7f4;color:#087f75;font-weight:700}.nav-icon{width:18px;text-align:center;font-size:18px;line-height:1}.sidebar-footer{margin-top:auto;padding:17px 8px 0;display:flex;gap:10px;align-items:center}.shield{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#e6f7f4;color:var(--primary);font-size:20px}.sidebar-footer strong,.sidebar-footer small{display:block}.sidebar-footer strong{font-size:10px}.sidebar-footer small{font-size:9px;color:var(--muted);margin-top:4px}.main-area{margin-left:268px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:72px;position:sticky;top:0;z-index:10;background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid #e2e8f080;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,3vw,42px);gap:16px}.breadcrumb{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted)}.breadcrumb strong{color:var(--text);font-weight:650}.crumb-slash{color:#cbd5e1}.topbar-actions{display:flex;align-items:center;gap:13px}.demo-pill{font-size:9px;letter-spacing:.8px;font-weight:800;color:#0f766e;background:#d9f7ef;padding:8px 10px;border-radius:100px;display:flex;align-items:center;gap:7px}.icon-button{width:35px;height:35px;border:1px solid var(--border);background:var(--surface);border-radius:10px;color:var(--muted);display:inline-grid;place-items:center;font-size:17px}.icon-button:hover{color:var(--primary);border-color:#99f6e4}.user-button{display:flex;align-items:center;gap:8px;background:transparent;border:0;color:var(--text);font-size:11px;font-weight:650}.avatar-small{width:31px;height:31px;font-size:10px}.mobile-menu{display:none}.page-wrap{width:100%;max-width:1560px;margin:0 auto;padding:30px clamp(20px,3vw,42px) 34px;flex:1}.app-footer{margin-top:18px;background:#0b2147;color:#d7e4f7;padding:34px clamp(20px,4vw,56px) 18px;display:block;font-size:12px;letter-spacing:0;border-top:1px solid #233b60}.footer-grid{max-width:1500px;margin:0 auto 28px;display:grid;grid-template-columns:1.55fr 1fr 1fr 1fr;gap:clamp(20px,4vw,60px)}.footer-brand-mark{display:inline-flex;align-items:center;gap:10px;background:#fff;color:#0b2147;border-radius:9px;padding:10px 13px;font-weight:800;font-size:16px;letter-spacing:-.4px}.footer-brand-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#0f766e;color:#fff;font-size:18px}.footer-about{max-width:340px;color:#bdcce0;line-height:1.7;margin:16px 0 0}.footer-grid h3{margin:0 0 15px;color:#7dd3fc;font-size:10px;letter-spacing:1.5px;text-transform:uppercase}.footer-links{display:flex;flex-direction:column;gap:11px}.footer-links a{color:#c5d3e8;line-height:1.5;transition:color .15s}.footer-links a:hover{color:#67e8f9}.footer-bottom{max-width:1500px;margin:auto;padding-top:18px;border-top:1px solid #294064;display:flex;justify-content:space-between;gap:14px;color:#b8c8df;font-size:11px}.dark-mode .app-footer{background:#070e1c;border-color:#25344b}.dark-mode .footer-brand-mark{background:#f8fafc;color:#0b1220}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:25px}.eyebrow{font-size:9px;letter-spacing:1.4px;font-weight:800;color:var(--primary);margin:0 0 8px;text-transform:uppercase}.page-heading h1{font:700 clamp(23px,2vw,30px)/1.25 Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.8px;margin:0}.page-heading p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.7;max-width:680px}.heading-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.btn{border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:10px;font-size:11px;font-weight:700;transition:transform .15s,background .15s;white-space:nowrap}.btn:active{transform:scale(.985)}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-secondary{background:var(--surface);border-color:var(--border);color:var(--text)}.btn-secondary:hover{background:var(--surface-2)}.btn-ghost{background:transparent;color:var(--primary);padding-inline:8px}.btn-danger{background:var(--danger-soft);color:var(--danger)}.btn-sm{padding:7px 10px;font-size:10px}.grid{display:grid;gap:16px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.layout-main-side{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr);gap:17px;align-items:start}.stack{display:flex;flex-direction:column;gap:16px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:19px;box-shadow:var(--shadow);min-width:0}.card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.card-title{font:700 14px/1.4 Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.2px;margin:0}.card-subtitle{font-size:10px;color:var(--muted);margin:5px 0 0;line-height:1.6}.metric-card{padding:17px 18px}.metric-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.metric-label{font-size:10px;color:var(--muted);font-weight:600}.metric-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;font-size:16px;background:#e6f7f4;color:var(--primary)}.metric-value{font:750 26px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-1px;margin:15px 0 5px;font-variant-numeric:tabular-nums}.metric-note{font-size:10px;color:var(--muted)}.positive{color:var(--success)}.warning{color:var(--warning)}.danger{color:var(--danger)}.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:99px;font-size:9px;font-weight:750;white-space:nowrap}.badge::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.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:#e0f2fe;color:#075985}.badge-neutral{background:var(--surface-2);color:var(--muted)}.hero-card{background:linear-gradient(120deg,#e9faf6 0%,#f8fffd 65%,#e8f4ff 100%);border:1px solid #c6f1e7;border-radius:var(--radius);padding:24px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:17px}.hero-card h2{font:700 21px/1.35 Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.5px;margin:0 0 8px}.hero-card p{font-size:11px;line-height:1.7;color:#46636a;max-width:560px;margin:0 0 17px}.hero-symbol{width:92px;height:92px;border-radius:27px;background:#d1fae5;color:#0f766e;display:grid;place-items:center;font-size:42px;flex:0 0 auto}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:25px 0 13px}.section-heading h2{font:700 15px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:0}.section-heading p{font-size:10px;color:var(--muted);margin:5px 0 0}.list-row{display:flex;align-items:flex-start;gap:12px;padding:13px 0;border-bottom:1px solid var(--border)}.list-row:last-child{border-bottom:0;padding-bottom:0}.list-row:first-child{padding-top:0}.list-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--surface-2);color:var(--primary);flex:0 0 auto}.list-content{flex:1;min-width:0}.list-content strong{font-size:11px;display:block;line-height:1.5}.list-content p{font-size:10px;color:var(--muted);line-height:1.6;margin:4px 0 0}.list-meta{font-size:9px;color:var(--muted);white-space:nowrap}.ai-callout{background:#effcf9;border:1px solid #bceee3;border-radius:13px;padding:15px;display:flex;gap:11px}.ai-star{width:30px;height:30px;display:grid;place-items:center;background:#ccfbf1;border-radius:9px;color:#0f766e;flex:0 0 auto}.ai-callout strong{font-size:11px}.ai-callout p{font-size:10px;line-height:1.7;color:#42636a;margin:5px 0 0}.mini-chart{width:100%;height:130px;display:block}.chart-legend{display:flex;gap:16px;flex-wrap:wrap;color:var(--muted);font-size:9px}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:12px}table{border-collapse:collapse;width:100%;min-width:560px;text-align:left}th{background:var(--surface-2);font-size:9px;color:var(--muted);letter-spacing:.6px;text-transform:uppercase;padding:12px 14px;font-weight:800}td{font-size:10px;padding:13px 14px;border-top:1px solid var(--border);vertical-align:middle}td strong{font-size:10px}.table-input{width:100%;min-width:70px;border:1px solid var(--border);border-radius:7px;padding:7px;background:var(--surface);color:var(--text)}.search-input,.field input,.field textarea,.field select,.select-control{width:100%;padding:10px 12px;border:1px solid var(--border);background:var(--surface);border-radius:10px;color:var(--text);font-size:11px}.search-input::placeholder,.field input::placeholder,.field textarea::placeholder{color:#94a3b8}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}.field label{font-size:10px;font-weight:700;color:var(--text)}.field small,.help-text{font-size:9px;color:var(--muted);line-height:1.6}.field textarea{resize:vertical;min-height:95px;line-height:1.6}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 13px}.field-grid .field{min-width:0}.field.full{grid-column:1/-1}.search-row{display:flex;gap:10px;align-items:center;margin-bottom:15px}.search-row .search-input{max-width:350px}.tabs{display:flex;gap:4px;padding:4px;background:var(--surface-2);border-radius:11px;width:max-content;max-width:100%;overflow-x:auto}.tab{border:0;background:transparent;border-radius:8px;padding:8px 12px;color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}.tab.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px #0f172a0c}.timeline{position:relative;padding-left:20px}.timeline:before{content:"";position:absolute;left:5px;top:8px;bottom:10px;width:1px;background:var(--border)}.timeline-item{position:relative;padding:0 0 21px 15px}.timeline-item:last-child{padding-bottom:0}.timeline-item:before{content:"";position:absolute;left:-19px;top:4px;width:9px;height:9px;border-radius:50%;background:var(--primary);border:3px solid #ccfbf1}.timeline-date{font-size:9px;color:var(--muted);font-weight:700;margin-bottom:5px}.timeline-item h3{font-size:11px;margin:0}.timeline-item p{font-size:10px;color:var(--muted);line-height:1.65;margin:5px 0 0}.upload-zone{border:1.5px dashed #9bdcd2;background:#f6fffc;border-radius:15px;padding:27px 18px;text-align:center;transition:background .15s,border-color .15s}.upload-zone.dragover{background:#dffaf2;border-color:var(--primary)}.upload-icon{width:47px;height:47px;border-radius:15px;background:#d1fae5;color:#0f766e;display:grid;place-items:center;margin:0 auto 12px;font-size:22px}.upload-zone h3{font-size:12px;margin:0 0 6px}.upload-zone p{font-size:10px;color:var(--muted);margin:0 0 13px;line-height:1.6}.file-list{margin-top:14px}.file-item{display:flex;align-items:center;gap:10px;padding:11px;border:1px solid var(--border);border-radius:10px;margin-top:8px}.file-type{width:33px;height:35px;border-radius:8px;display:grid;place-items:center;background:#fee2e2;color:#b91c1c;font-size:9px;font-weight:800}.file-info{flex:1;min-width:0}.file-info strong,.file-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-info strong{font-size:10px}.file-info small{font-size:9px;color:var(--muted);margin-top:4px}.progress{height:5px;background:var(--surface-2);border-radius:99px;overflow:hidden;margin-top:8px}.progress span{height:100%;display:block;background:var(--primary);border-radius:99px}.symptom-chip-list{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0 15px}.symptom-chip{border:1px solid var(--border);border-radius:99px;padding:8px 11px;font-size:10px;background:var(--surface);color:var(--muted)}.symptom-chip.selected{background:#d9f7ef;border-color:#7dd3c7;color:#0f766e;font-weight:700}.range-row{display:flex;align-items:center;gap:12px}.range-row input{flex:1;accent-color:var(--primary)}.range-value{font-size:10px;font-weight:800;color:var(--primary);min-width:60px;text-align:right}.divider{height:1px;background:var(--border);margin:15px 0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid var(--border)}.setting-row:last-child{border-bottom:0}.setting-row strong{display:block;font-size:11px}.setting-row p{font-size:10px;color:var(--muted);line-height:1.6;margin:5px 0 0;max-width:520px}.switch{width:39px;height:22px;position:relative;display:inline-block;flex:0 0 auto}.switch input{opacity:0;width:0;height:0}.switch-track{position:absolute;inset:0;background:#cbd5e1;border-radius:99px;transition:.2s}.switch-track:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:white;transition:.2s;box-shadow:0 1px 3px #0002}.switch input:checked+.switch-track{background:var(--primary)}.switch input:checked+.switch-track:before{transform:translateX(17px)}.medicine-card{display:flex;align-items:center;gap:12px}.medicine-symbol{width:43px;height:43px;border-radius:13px;background:#e0f2fe;color:#0369a1;display:grid;place-items:center;font-size:20px;flex:0 0 auto}.medicine-copy{flex:1;min-width:0}.medicine-copy strong{display:block;font-size:11px}.medicine-copy p{font-size:10px;color:var(--muted);margin:4px 0 0}.medicine-actions{display:flex;gap:6px;flex-wrap:wrap}.heatmap{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.heat-cell{height:27px;border-radius:6px;background:#d1fae5;display:grid;place-items:center;color:#065f46;font-size:9px}.heat-cell.missed{background:#fee2e2;color:#991b1b}.heat-cell.partial{background:#fef3c7;color:#92400e}.heat-day-labels{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:7px;color:var(--muted);font-size:8px;text-align:center}.profile-summary{display:flex;align-items:center;gap:15px}.profile-avatar{width:65px;height:65px;border-radius:20px;background:#d9f7ef;color:#0f766e;display:grid;place-items:center;font:800 20px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.profile-summary h2{font:700 17px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:0}.profile-summary p{font-size:10px;color:var(--muted);margin:5px 0}.info-cell{padding:12px;border-radius:11px;background:var(--surface-2)}.info-cell small,.info-cell strong{display:block}.info-cell small{font-size:9px;color:var(--muted);margin-bottom:7px}.info-cell strong{font-size:11px}.alert-box{border-radius:12px;padding:13px 14px;display:flex;gap:10px;font-size:10px;line-height:1.65}.alert-box.warning-box{background:#fffbeb;border:1px solid #fde68a;color:#92400e}.alert-box.info-box{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af}.alert-box.danger-box{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239}.empty-state{text-align:center;padding:35px 18px;color:var(--muted)}.empty-state .empty-icon{font-size:30px;color:var(--primary);margin-bottom:10px}.empty-state h3{font-size:12px;color:var(--text);margin:0 0 6px}.empty-state p{font-size:10px;line-height:1.6;margin:0 auto 13px;max-width:320px}.print-sheet{max-width:900px;margin:auto;background:white;border:1px solid var(--border);border-radius:14px;padding:clamp(20px,4vw,40px)}.print-sheet h2{font:700 19px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.print-section{margin-top:22px}.print-section h3{font-size:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.print-section p,.print-section li{font-size:11px;line-height:1.8;color:#475569}.modal{border:1px solid var(--border);border-radius:18px;padding:22px;width:min(520px,calc(100vw - 28px));box-shadow:0 25px 70px #0f172a33;background:var(--surface);color:var(--text)}.modal::backdrop{background:#0f172a66;backdrop-filter:blur(3px)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.modal-head h2{font:700 19px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:0}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.toast-region{position:fixed;right:22px;bottom:22px;z-index:80;display:flex;flex-direction:column;gap:8px}.toast{background:#0f172a;color:white;border-radius:11px;padding:12px 15px;box-shadow:0 8px 25px #0f172a25;font-size:11px;max-width:min(360px,calc(100vw - 35px));animation:toast-in .2s ease}.toast.error-toast{background:#991b1b}@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sidebar-backdrop{display:none}.dark-mode{--primary:#22d3ee;--primary-dark:#67e8f9;--primary-soft:#164e63;--accent:#a78bfa;--mint:#22d3ee;--blue:#38bdf8;--bg:#0b1220;--surface:#172033;--surface-2:#164e63;--text:#f8fafc;--muted:#b2c0d4;--border:#29364d;--danger:#fca5a5;--danger-soft:#451a24;--warning:#fcd34d;--warning-soft:#422d13;--success:#4ade80;--success-soft:#123b2a;--shadow:0 4px 18px #0003}.dark-mode .hero-card{background:linear-gradient(120deg,#164e63 0%,#172033 72%);border-color:#27566b}.dark-mode .hero-card p,.dark-mode .ai-callout p{color:#a7c9c9}.dark-mode .ai-callout{background:#172b40;border-color:#164e63}.dark-mode .nav-list a.active{background:#164e63;color:#22d3ee}.dark-mode .demo-pill{background:#164e63;color:#a5f3fc}.dark-mode .upload-zone{background:#101b30;border-color:#164e63}.dark-mode .upload-zone.dragover{background:#164e63}.dark-mode .metric-icon,.dark-mode .list-icon{background:#164e63;color:#22d3ee}.dark-mode .profile-avatar,.dark-mode .shield{background:#164e63;color:#22d3ee}.dark-mode .hero-symbol{background:#164e63;color:#22d3ee}.dark-mode .avatar{background:#233b58;color:#bfdbfe}.dark-mode .print-sheet{background:var(--surface)}.dark-mode .print-section p,.dark-mode .print-section li{color:var(--muted)}
@media(max-width:1200px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.layout-main-side{grid-template-columns:minmax(0,1.2fr) minmax(250px,1fr)}.sidebar{width:245px}.main-area{margin-left:245px}.topbar{padding-inline:24px}.page-wrap{padding-inline:24px}}
@media(max-width:950px){.sidebar{transform:translateX(-105%);transition:transform .22s ease;box-shadow:12px 0 40px #0f172a14;width:270px}.sidebar.open{transform:translateX(0)}.sidebar-backdrop.show{display:block;position:fixed;inset:0;background:#0f172a66;z-index:19}.main-area{margin-left:0}.mobile-menu{display:inline-grid}.topbar{justify-content:flex-start}.breadcrumb{flex:1}.topbar-actions{gap:8px}.layout-main-side{grid-template-columns:1fr}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.footer-brand-column{grid-column:1/-1}}
@media(max-width:620px){.footer-grid{grid-template-columns:1fr 1fr;gap:24px 18px}.footer-brand-column{grid-column:1/-1}.footer-bottom{flex-direction:column;line-height:1.6}.app-footer{padding:26px 16px 16px}.topbar{height:62px;padding-inline:14px;gap:10px}.page-wrap{padding:22px 14px 26px}.breadcrumb{gap:6px;font-size:10px}.breadcrumb>span:first-child,.crumb-slash{display:none}.topbar-actions{gap:6px}.demo-pill{display:none}.user-name{display:none}.user-button{gap:4px}.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.page-heading{flex-direction:column;gap:14px;margin-bottom:20px}.heading-actions{width:100%}.heading-actions .btn{flex:1}.hero-card{padding:18px}.hero-symbol{display:none}.hero-card h2{font-size:18px}.card{padding:15px}.metric-card{padding:15px}.metric-value{font-size:24px}.app-footer{padding:14px;flex-direction:column;font-size:8px}.field-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.search-row{align-items:stretch;flex-direction:column}.search-row .search-input{max-width:none}.tabs{width:100%}.tab{flex:1;padding-inline:8px}.medicine-card{align-items:flex-start;flex-wrap:wrap}.medicine-actions{width:100%;padding-left:55px}.setting-row{align-items:flex-start}.toast-region{right:12px;bottom:12px}.profile-summary{align-items:flex-start}.profile-summary h2{font-size:15px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* Persistent, accessible Smaran helper — kept separate from page layouts */
.smaran-help{position:fixed;right:22px;bottom:22px;z-index:70;font-size:14px;color:var(--text)}
.help-launcher{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;padding:12px 17px 12px 12px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;box-shadow:0 9px 28px #0f766e40;font-size:13px;font-weight:750;transition:transform .18s,box-shadow .18s}
.help-launcher:hover{transform:translateY(-2px);box-shadow:0 12px 32px #0f766e55}.help-launcher:focus-visible,.help-close:focus-visible,.help-form button:focus-visible,.help-shortcuts button:focus-visible{outline:3px solid #5eead4;outline-offset:3px}
.launcher-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#ffffff26;font-size:19px}.launcher-dot{width:7px;height:7px;border-radius:50%;background:#a7f3d0;box-shadow:0 0 0 3px #ffffff22}
.help-panel{position:absolute;right:0;bottom:62px;width:min(390px,calc(100vw - 28px));max-height:min(650px,calc(100dvh - 110px));overflow:hidden;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 20px 65px #0f172a2b;color:var(--text)}
.help-panel[hidden]{display:none}.help-panel-head{display:flex;align-items:center;gap:10px;padding:15px 16px;border-bottom:1px solid var(--border);background:var(--surface)}.help-avatar{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;background:#d9f7ef;color:#0f766e;font-size:22px}.help-heading{flex:1;min-width:0}.help-heading strong,.help-heading span{display:block}.help-heading strong{font:750 14px Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.help-heading span{font-size:10px;color:var(--muted);margin-top:4px}.help-close{width:32px;height:32px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--muted);font-size:21px;line-height:1}
.help-intro{display:flex;gap:10px;padding:14px 15px 8px}.help-sparkle{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-size:17px}.help-intro strong{font-size:12px}.help-intro p{margin:5px 0 0;font-size:11px;line-height:1.55;color:var(--muted)}
.help-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px 15px 12px}.help-shortcuts button{border:1px solid var(--border);border-radius:11px;background:var(--surface-2);color:var(--text);text-align:left;padding:10px;font-size:10px;line-height:1.4;font-weight:650}.help-shortcuts button:hover{border-color:#99f6e4;background:var(--primary-soft)}
.help-messages{padding:4px 15px 12px;overflow-y:auto;min-height:65px;max-height:190px;display:flex;flex-direction:column;gap:8px}.help-message{max-width:95%;padding:10px 12px;border-radius:13px;font-size:11px;line-height:1.65;overflow-wrap:anywhere}.assistant-message{align-self:flex-start;background:var(--surface-2);border:1px solid var(--border)}.user-message{align-self:flex-end;background:var(--primary);color:white;border-bottom-right-radius:4px}.help-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid var(--border)}.help-form textarea{resize:vertical;min-height:42px;max-height:100px;flex:1;width:0;padding:10px 11px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font:inherit;font-size:11px;line-height:1.4}.help-form button{border:0;border-radius:10px;padding:12px 13px;background:var(--primary);color:white;font-size:11px;font-weight:750}.help-panel-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 14px;background:var(--surface-2);font-size:9px;color:var(--muted)}.help-panel-foot button{border:0;background:transparent;color:var(--primary);font-size:10px;font-weight:750;padding:4px 0}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.easy-read-mode{font-size:110%}.easy-read-mode .page-wrap{line-height:1.8}.easy-read-mode .page-wrap p,.easy-read-mode .page-wrap label,.easy-read-mode .page-wrap small,.easy-read-mode .page-wrap td,.easy-read-mode .page-wrap th{font-size: max(1em, 12px)!important;line-height:1.75}.easy-read-mode .page-wrap .card-title{font-size:16px}.easy-read-mode .page-wrap .nav-list a{font-size:14px}
.dark-mode .help-avatar{background:#164e63;color:#22d3ee}.dark-mode .help-shortcuts button:hover{background:#164e63}
@media(max-width:620px){.smaran-help{right:12px;bottom:12px}.help-launcher{padding:10px 13px 10px 10px}.launcher-label{font-size:12px}.help-panel{bottom:58px;right:0;width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 88px)}.help-shortcuts{gap:6px;padding-inline:12px}.help-shortcuts button{padding:9px;font-size:10px}.help-messages{max-height:150px}.help-panel-foot{align-items:flex-start;flex-direction:column;gap:4px}}
@media(prefers-reduced-motion:reduce){.help-launcher{transition:none}}


/* Smaran visual refresh — palette matched to the supplied light/dark references */
:root{--primary:#0f766e;--primary-dark:#115e59;--primary-soft:#dbeafe;--mint:#16a34a;--blue:#38bdf8;--accent:#38bdf8;--bg:#f8fafc;--surface:#ffffff;--surface-2:#dbeafe;--text:#0f172a;--muted:#52627a;--border:#d9e2ef;--success:#16a34a;--shadow:0 8px 28px rgba(15,23,42,.055);--radius:18px;scroll-behavior:smooth}
body{background:var(--bg);transition:background .25s,color .25s}
.card,.hero-card,.metric-card,.print-sheet{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.card:hover{box-shadow:0 12px 32px rgba(15,23,42,.08);border-color:#c4d6e8}
.btn,.icon-button,.tab,.symptom-chip,.nav-list a,.help-launcher,.language-toggle{transition:all .18s ease}
.btn:hover{transform:translateY(-1px)}
.nav-list a.active{background:#dbeafe;color:#0f766e}
.brand-mark,.footer-brand-icon{background:#0f766e;box-shadow:0 8px 20px rgba(15,118,110,.18)}
.hero-card{background:linear-gradient(120deg,#e0f2fe 0%,#f8fafc 58%,#dcfce7 100%);border-color:#cbdff3}
.hero-symbol{background:#dbeafe;color:#0f766e}
.ai-callout{background:#eff6ff;border-color:#bfdbfe}.ai-star{background:#dbeafe;color:#0f766e}
.metric-icon,.list-icon{background:#dbeafe;color:#0f766e}
.language-toggle{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:10px;padding:9px 11px;font-size:11px;font-weight:750;white-space:nowrap;box-shadow:0 2px 7px rgba(15,23,42,.04)}
.language-toggle:hover{border-color:var(--primary);color:var(--primary);transform:translateY(-1px)}
.app-footer{background:#0b1220;color:#dce7f7;border-top:1px solid #26364f;padding:42px clamp(20px,4vw,56px) 20px;position:relative;overflow:hidden}
.app-footer:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#22d3ee,#38bdf8,#a78bfa);opacity:.95}
.footer-grid{position:relative;z-index:1}.footer-grid h3{color:#22d3ee}.footer-brand-mark{box-shadow:0 8px 28px rgba(0,0,0,.16)}
.footer-links a:hover{color:#a78bfa;transform:translateX(2px)}.footer-bottom{border-color:#26364f;color:#a9b8ce}
.dark-mode{--primary:#22d3ee;--primary-dark:#67e8f9;--primary-soft:#164e63;--mint:#10b981;--blue:#38bdf8;--accent:#a78bfa;--bg:#0b1220;--surface:#172033;--surface-2:#164e63;--text:#f8fafc;--muted:#a7b5c9;--border:#2a3a51;--success:#4ade80;--shadow:0 8px 28px rgba(0,0,0,.22)}
.dark-mode .nav-list a.active{background:#164e63;color:#f8fafc}.dark-mode .nav-list a:hover{background:#172033;color:#f8fafc}.dark-mode .hero-card{background:linear-gradient(120deg,#164e63,#172033 70%,#24203f);border-color:#24546b}.dark-mode .hero-card p{color:#d2deed}.dark-mode .hero-symbol,.dark-mode .metric-icon,.dark-mode .list-icon,.dark-mode .ai-star{background:#164e63;color:#22d3ee}.dark-mode .ai-callout{background:#111c2d;border-color:#29475c}.dark-mode .ai-callout p{color:#c1d1e3}.dark-mode .language-toggle{background:#172033;color:#f8fafc;border-color:#34445c}.dark-mode .upload-zone{background:#101a2b;border-color:#31566b}.dark-mode .upload-zone.dragover{background:#164e63}.dark-mode .tab.active{background:#26364f;color:#f8fafc}.dark-mode .symptom-chip.selected{background:#164e63;border-color:#22d3ee;color:#f8fafc}.dark-mode .footer-brand-mark{background:#f8fafc;color:#0b1220}
.easy-read-mode{font-size:110%}.easy-read-mode p,.easy-read-mode label,.easy-read-mode input,.easy-read-mode textarea,.easy-read-mode select,.easy-read-mode .nav-list a,.easy-read-mode .list-content p{font-size:1.08em!important;line-height:1.8!important}
@media(max-width:620px){.language-toggle{padding:8px;font-size:10px}.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.footer-brand-column{grid-column:1/-1}.footer-bottom{flex-direction:column}.app-footer{padding:34px 18px 18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Sidebar icon refresh: simple outline icons, same spacing and layout. */
.nav-icon{width:18px;height:18px;flex:0 0 18px;display:inline-flex;align-items:center;justify-content:center;font-size:0;line-height:1;color:currentColor}
.nav-icon svg{display:block;width:17px;height:17px;overflow:visible;transition:transform .18s ease}
.nav-list a:hover .nav-icon svg{transform:translateY(-1px)}
.nav-list a.active .nav-icon svg{stroke-width:2}
.shield svg{width:18px;height:18px;display:block}
@media(prefers-reduced-motion:reduce){.nav-icon svg{transition:none!important}}

/* ==========================================================
   SMARAN THEME SYSTEM — strict Light / Dark palette separation
   Light: Soft Blue + White | Dark: Navy + White
   All shared UI surfaces consume these semantic tokens.
   ========================================================== */
:root,
body:not(.dark-mode) {
  color-scheme: light;
  --primary: #8DB4D6;
  --primary-dark: #7099bd;
  --primary-ink: #365D7D;
  --primary-soft: #D6E6F2;
  --mint: #8DB4D6;
  --blue: #8DB4D6;
  --accent: #8DB4D6;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F2F7FB;
  --text: #202938;
  --muted: #526173;
  --border: #D6E6F2;
  --button-text: #172638;
  --focus: #527fa7;
  --shadow: 0 8px 28px rgba(60, 91, 120, .08);
}
body.dark-mode {
  color-scheme: dark;
  --primary: #A7B6D0;
  --primary-dark: #c0cce0;
  --primary-ink: #D0D9E7;
  --primary-soft: #1E2F4F;
  --mint: #A7B6D0;
  --blue: #A7B6D0;
  --accent: #A7B6D0;
  --bg: #0F1E3A;
  --surface: #1E2F4F;
  --surface-2: #1E2F4F;
  --text: #FFFFFF;
  --muted: #D0D9E7;
  --border: #40516E;
  --button-text: #0F1E3A;
  --focus: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .22);
}
html { background: var(--bg); scroll-behavior: smooth; }
body, .app-shell, .main-area, .page-wrap { background: var(--bg); color: var(--text); }
body, .sidebar, .topbar, .card, .modal, .help-panel, .app-footer,
.btn, .icon-button, .language-toggle, input, textarea, select,
.nav-list a, .hero-card, .metric-card, .upload-zone, .tab, .symptom-chip {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sidebar, .card, .modal, .help-panel, .help-panel-head, .print-sheet,
.btn-secondary, .icon-button, .language-toggle, .help-close,
.help-form textarea, input, textarea, select, .table-wrap, table {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.topbar { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom-color: var(--border); }
.profile-mini, .info-cell, .badge-neutral, .help-shortcuts button,
.help-panel-foot, .upload-zone, .tab, .search-input, .filter-select,
.setting-row, .timeline-item, .medicine-card { background-color: var(--surface-2); }
.nav-label, .breadcrumb, .page-heading p, .card-subtitle, .metric-label,
.metric-note, .profile-mini-copy small, .sidebar-footer small,
.footer-about, .empty-state, .help-heading span, .help-intro p { color: var(--muted); }
.nav-list a { color: var(--muted); }
.nav-list a:hover, .btn-secondary:hover, .help-shortcuts button:hover,
.tab:hover, .icon-button:hover, .language-toggle:hover { background-color: var(--surface-2); color: var(--text); border-color: var(--primary); }
.nav-list a.active { background: var(--primary-soft); color: var(--button-text); }
.brand-mark, .footer-brand-icon, .metric-icon, .list-icon, .hero-symbol,
.ai-star, .help-avatar, .help-sparkle, .shield { background: var(--primary-soft); color: var(--button-text); box-shadow: none; }
.btn-primary, .help-form button { background: var(--primary); color: var(--button-text); }
.btn-primary:hover, .help-form button:hover { background: var(--primary-dark); color: var(--button-text); }
.btn-ghost, .eyebrow, .help-panel-foot button { color: var(--text); }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero-card { background: var(--surface-2); border-color: var(--border); }
.hero-card p, .ai-callout p { color: var(--muted); }
.ai-callout { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.metric-icon, .list-icon { background: var(--primary-soft); color: var(--button-text); }
.demo-pill { background: var(--primary-soft); color: var(--button-text); }
.topbar .crumb-slash { color: var(--muted); }
.app-footer { background: var(--surface-2); color: var(--text); border-top: 1px solid var(--border); }
.app-footer:before { background: var(--primary); }
.footer-brand-mark { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.footer-grid h3 { color: var(--text); }
.footer-links a, .footer-bottom { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top-color: var(--border); }
.modal::backdrop, .sidebar-backdrop.show { background: color-mix(in srgb, var(--bg) 68%, #000 32%); }
.help-launcher { background: var(--primary); color: var(--button-text); box-shadow: var(--shadow); }
.help-launcher:hover { box-shadow: var(--shadow); }
.launcher-icon { background: color-mix(in srgb, var(--button-text) 9%, transparent); }
.help-panel { background: var(--surface); border-color: var(--border); }
.help-shortcuts button { background: var(--surface-2); color: var(--text); }
.assistant-message { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.user-message { background: var(--primary); color: var(--button-text); }
.help-panel-foot { background: var(--surface-2); color: var(--muted); }
.dark-mode .app-footer { background: #1E2F4F; border-color: #40516E; }
.dark-mode .footer-brand-mark { background: #FFFFFF; color: #0F1E3A; }
.dark-mode .nav-list a.active { background: #1E2F4F; color: #FFFFFF; }
.dark-mode .nav-list a:hover { background: #1E2F4F; color: #FFFFFF; }
.dark-mode .hero-card { background: #1E2F4F; border-color: #40516E; }
.dark-mode .hero-card p, .dark-mode .ai-callout p { color: #D0D9E7; }
.dark-mode .upload-zone, .dark-mode .upload-zone.dragover,
.dark-mode .tab.active, .dark-mode .symptom-chip.selected { background: #1E2F4F; border-color: #A7B6D0; color: #FFFFFF; }
.dark-mode .help-avatar, .dark-mode .help-sparkle, .dark-mode .metric-icon,
.dark-mode .list-icon, .dark-mode .hero-symbol, .dark-mode .ai-star,
.dark-mode .shield { background: #1E2F4F; color: #A7B6D0; }
.dark-mode .print-sheet { background: #1E2F4F; color: #FFFFFF; }
.dark-mode .print-section p, .dark-mode .print-section li { color: #D0D9E7; }
.dark-mode .btn-primary, .dark-mode .help-launcher,
.dark-mode .help-form button, .dark-mode .user-message { background: #A7B6D0; color: #0F1E3A; }
.dark-mode .demo-pill { background: #1E2F4F; color: #FFFFFF; }
.dark-mode .toast { background: #1E2F4F; color: #FFFFFF; border: 1px solid #40516E; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* MediCore brand and visual atmosphere */
:root { --spot-x: 50vw; --spot-y: 35vh; --spotlight-rgb: 15,118,110; }
body.dark-mode { --spotlight-rgb: 167,182,208; }
html, body { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { position: relative; isolation: isolate; }
.brand { gap: 8px; align-items: center; }
.brand-logo { display:block; width:52px; height:48px; object-fit:contain; flex:0 0 auto; }
.brand-copy { min-width:0; display:block; }
.brand strong { font-family: Inter,system-ui,sans-serif; font-size:19px; font-weight:800; letter-spacing:-.7px; }
.brand small { font-size:8px; letter-spacing:1px; }
.footer-brand-mark { display:inline-flex; align-items:center; justify-content:center; background:#05070d; padding:8px 12px; border:1px solid rgba(34,211,238,.22); box-shadow:0 0 28px rgba(34,211,238,.08); }
.footer-brand-mark img { display:block; width:168px; height:88px; object-fit:contain; }
.footer-slogan { margin:10px 0 0; font-size:10px; font-weight:800; letter-spacing:2px; color:var(--primary-ink); }
.brand:hover .brand-logo { filter:drop-shadow(0 0 8px rgba(34,211,238,.25)); }
.app-shell { position:relative; z-index:1; }
body::before {
  content:""; position:fixed; inset:0; pointer-events:none; z-index:50;
  background:radial-gradient(480px circle at var(--spot-x) var(--spot-y), rgba(var(--spotlight-rgb),.1), transparent 70%);
}
body::after {
  content:""; position:fixed; width:360px; height:360px; right:-160px; top:18%;
  border-radius:50%; pointer-events:none; z-index:-1;
  border:1px solid rgba(141,180,214,.13);
  box-shadow:0 0 80px rgba(141,180,214,.045), inset 0 0 65px rgba(141,180,214,.025);
  animation:mediCoreDrift 24s ease-in-out infinite alternate;
}
.ambient-orbs { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.ambient-orbs span { position:absolute; display:block; width:190px; height:190px; border-radius:50%; filter:blur(70px); opacity:.09; background:#8DB4D6; animation:mediCoreFloat 22s ease-in-out infinite alternate; }
.ambient-orbs span:nth-child(1) { left:28%; top:12%; }
.ambient-orbs span:nth-child(2) { right:10%; top:58%; width:230px; height:230px; background:#A7B6D0; animation-delay:-8s; }
.ambient-orbs span:nth-child(3) { left:8%; bottom:4%; width:150px; height:150px; animation-delay:-14s; }
.dark-mode .ambient-orbs span { opacity:.12; background:#A7B6D0; }
body.dark-mode::before { background:radial-gradient(480px circle at var(--spot-x) var(--spot-y), rgba(var(--spotlight-rgb),.13), transparent 70%); }
@keyframes mediCoreFloat { from { transform:translate3d(-12px,-10px,0) scale(.94); } to { transform:translate3d(30px,24px,0) scale(1.12); } }
@keyframes mediCoreDrift { from { transform:translate3d(0,-10px,0) rotate(-8deg); } to { transform:translate3d(-45px,35px,0) rotate(14deg); } }
@media(max-width:620px) {
  .brand-logo { width:42px; height:40px; }
  .brand strong { font-size:17px; }
  .footer-brand-mark img { width:148px; height:76px; }
}
@media(prefers-reduced-motion:reduce) {
  .ambient-orbs span, body::after { animation:none!important; }
  body::before { transition:none!important; }
}


/* Synthetic-patient demo login */
.demo-login{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:auto;padding:28px 16px;background:var(--bg,#f8fafc);color:var(--text,#0f172a);isolation:isolate}
.demo-login::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;background:radial-gradient(480px circle at var(--spot-x) var(--spot-y),rgba(var(--spotlight-rgb),.1),transparent 70%)}
.dark-mode .demo-login::before{background:radial-gradient(480px circle at var(--spot-x) var(--spot-y),rgba(var(--spotlight-rgb),.13),transparent 70%)}
.demo-login[hidden]{display:none!important}
.login-glow{position:fixed;z-index:0;pointer-events:none;border-radius:50%;filter:blur(70px);opacity:.28;animation:loginFloat 12s ease-in-out infinite alternate}
.login-glow-one{width:340px;height:340px;top:4%;left:8%;background:#8DB4D6}
.login-glow-two{width:300px;height:300px;right:7%;bottom:4%;background:#A7B6D0;animation-delay:-4s}
.login-card{position:relative;z-index:1;width:min(100%,560px);max-height:calc(100vh - 56px);overflow:auto;padding:clamp(22px,4vw,38px);border:1px solid var(--border,#d9e2ef);border-radius:26px;background:var(--surface,#fff);box-shadow:0 24px 90px rgba(15,30,58,.15);backdrop-filter:blur(18px)}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:28px}
.login-brand img{width:62px;height:62px;object-fit:contain;border-radius:14px}
.login-brand span{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--muted,#52627a)}
.login-card .eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--primary-ink,#365D7D);margin:0 0 8px}
.login-card h1{font-size:clamp(27px,5vw,36px);line-height:1.12;letter-spacing:-.04em;margin:0 0 12px}
.login-subtitle{color:var(--muted,#52627a);font-size:14px;line-height:1.65;margin:0 0 22px}
.login-card label{display:block;font-size:12px;font-weight:700;margin:14px 0 7px}
.login-card input,.login-card select{width:100%;min-height:46px;padding:11px 13px;border:1px solid var(--border,#d9e2ef);border-radius:12px;background:var(--bg,#f8fafc);color:var(--text,#0f172a);outline-offset:3px}
.patient-preview{margin-top:16px;padding:16px;border:1px solid var(--border,#d9e2ef);border-radius:16px;background:var(--bg,#f8fafc);font-size:13px}
.patient-preview p{margin:0;color:var(--muted,#52627a);line-height:1.6}
.patient-preview h2{font-size:17px;margin:0 0 4px}
.patient-preview .patient-id{font-size:11px;letter-spacing:.08em;font-weight:800;color:var(--muted,#52627a)}
.patient-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.patient-detail{padding:10px;border-radius:10px;background:var(--surface,#fff);border:1px solid var(--border,#d9e2ef);min-width:0}
.patient-detail small{display:block;color:var(--muted,#52627a);font-size:10px;margin-bottom:4px}
.patient-detail strong{display:block;font-size:12px;overflow-wrap:anywhere}
.patient-data-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.patient-data-section{border:1px solid var(--border,#d9e2ef);border-radius:10px;padding:10px}
.patient-data-section strong{display:block;font-size:12px}
.patient-data-section span{display:block;font-size:11px;color:var(--muted,#52627a);margin-top:3px}
.synthetic-notice{padding:12px;border-radius:12px;background:var(--surface-2,#dbeafe);font-size:11px;line-height:1.55;color:var(--text,#202938)}
.login-submit{width:100%;justify-content:center;min-height:48px;margin-top:8px}
.login-submit:disabled{opacity:.45;cursor:not-allowed}
.login-secondary{display:block;margin:10px auto 0;padding:8px 12px;background:transparent;border:0;color:var(--text,#202938);font-size:12px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.dataset-details{margin-top:12px;padding:12px;border:1px solid var(--border,#d9e2ef);border-radius:12px;max-height:230px;overflow:auto;font-size:12px}
.dataset-details[hidden]{display:none}
.dataset-details ul{padding-left:18px}
.login-footnote{display:flex;align-items:center;gap:8px;margin:20px 0 0;color:var(--muted,#52627a);font-size:10px;line-height:1.5}
.privacy-dot{width:7px;height:7px;border-radius:50%;background:#16a34a;flex:0 0 auto}
@keyframes loginFloat{from{transform:translate3d(0,0,0)}to{transform:translate3d(24px,-18px,0)}}
body.demo-logged-out{overflow:hidden}
body.dark-mode .demo-login{background:#0F1E3A;color:#fff}
body.dark-mode .login-card{background:#1E2F4F;border-color:#40516E;box-shadow:0 24px 90px rgba(0,0,0,.35)}
body.dark-mode .login-card input,body.dark-mode .login-card select,body.dark-mode .patient-preview{background:#0F1E3A;color:#fff;border-color:#40516E}
body.dark-mode .patient-detail{background:#1E2F4F;border-color:#40516E}
body.dark-mode .synthetic-notice{background:#1E2F4F;color:#fff}
body.dark-mode .login-secondary{color:#fff}
@media(max-width:480px){.demo-login{padding:10px}.login-card{max-height:calc(100vh - 20px);padding:20px;border-radius:20px}.login-brand{margin-bottom:20px}.login-brand img{width:50px;height:50px}.patient-detail-grid,.patient-data-sections{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.login-glow{animation:none}}

/* Keep shared cards and controls inside narrow viewports. */
.grid,.layout-main-side,.stack,.card,.card-header,.file-item,.file-info,.timeline-item{min-width:0}
.tabs{max-width:100%;min-width:0;flex-wrap:wrap}
.tab{min-width:0;flex:1 1 auto;white-space:normal;overflow-wrap:anywhere}
.badge{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.timeline-item h3{min-width:0;overflow-wrap:anywhere}
.timeline-item h3 .badge{flex-shrink:1}
.file-info{overflow-wrap:anywhere}
.logout-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:35px;padding:0 11px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-size:11px;font-weight:650;white-space:nowrap}
.logout-button:hover{border-color:var(--primary);background:var(--surface-2);color:var(--primary)}
.logout-button>span:first-child{font-size:16px;line-height:1}
@media(max-width:620px){.logout-button{width:35px;padding:0}.logout-label{display:none}.topbar-actions{gap:5px}}
