@layer base,components,responsive;
@layer base{
:root{color-scheme:light;--navy:#14263D;--bg:#F7F9FC;--red:#E5484D;--green:#267b58;--amber:#996413;--ink:#192c46;--muted:#64738a;--line:#dfe5ef;--shadow:0 5px 22px #14263d06;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink);padding:11px 16px;min-height:44px;font-weight:600;transition:background .15s,box-shadow .15s}button:hover{background:#edf1f8}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #678bd6;outline-offset:3px}a{color:#245cb3;text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.65rem,2.8vw,2.3rem);line-height:1.2;letter-spacing:-.04em}h2{font-size:1.06rem;letter-spacing:-.02em}h3{font-size:1rem}p{line-height:1.6}small,.fine{font-size:.78rem;line-height:1.55;color:var(--muted)}label{display:grid;gap:8px;font-weight:600;font-size:.88rem}input,textarea,select{width:100%;min-width:0;border:1px solid var(--line);background:#fafbfd;color:var(--ink);border-radius:11px;min-height:46px;padding:12px;font-size:16px}textarea{resize:vertical;max-height:240px}form{display:grid;gap:16px}[hidden]{display:none!important}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}img{max-width:100%}dialog{border:1px solid var(--line);border-radius:22px;max-width:540px;width:calc(100% - 32px);padding:26px;color:var(--ink);box-shadow:0 24px 100px #14263d30}dialog::backdrop{background:#14263d77;backdrop-filter:blur(3px)}dialog p,dialog ol,dialog h3{margin:16px 0}dialog li{margin:12px 0;line-height:1.5}.sr-only{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.skip{position:absolute;top:-100px;background:white;z-index:50;padding:12px}.skip:focus{top:0}.muted{color:var(--muted)}.eyebrow{font-size:.68rem;letter-spacing:.13em;font-weight:700;color:var(--muted);margin-bottom:9px}.primary{background:var(--red);color:white;border-color:var(--red);box-shadow:0 4px 10px #e5484d15}.primary:hover{background:#c92f39}.danger{color:#c92f39}.link-button{border:0;color:#245cb3;background:transparent;padding:8px}.actions{display:flex;gap:10px;flex-wrap:wrap}.actions>*{flex:1}.stack{display:grid;gap:12px}.badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:7px;font-size:.72rem;font-weight:650;background:#edf1f8;color:#52647e}.badge.green{background:#e9f5ee;color:var(--green)}.badge.amber{background:#fff3dc;color:var(--amber)}.badge.red{background:#fff0f1;color:#b63e46}.fine{margin-top:12px}.empty{padding:28px 20px;color:var(--muted);line-height:1.6;text-align:center}.empty svg{width:38px;height:38px;margin:0 auto 12px;display:block;color:#93a1b8}.empty strong{display:block;color:var(--ink);margin-bottom:8px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-heading button{font-size:24px;padding:3px 12px}
}
@layer components{
.topbar{height:84px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:14px 28px;position:sticky;top:0;z-index:20}.logo{display:flex;align-items:center;gap:10px;color:var(--navy);font-size:1.35rem;letter-spacing:-.045em;font-weight:800;flex:none}.logo small{display:block;letter-spacing:.04em;font-weight:500;font-size:.65rem;margin-top:2px}.department-name{border-left:1px solid var(--line);padding-left:22px;font-size:.85rem;max-width:205px;line-height:1.4;color:var(--muted)}.search{margin-left:auto;display:flex;gap:0;max-width:340px;flex:1;position:relative}.search input{padding-right:44px}.search button{position:absolute;right:2px;top:2px;border:0;background:none;font-size:24px;padding:4px 12px;min-height:40px}.topbar time{font-size:.78rem;white-space:nowrap;color:var(--muted)}.icon-button{border-radius:50%;width:42px;height:42px;min-height:42px;display:grid;place-items:center;padding:0;flex:none;background:#f2f5fa}.topbar #help{margin-left:auto}.sidebar{position:fixed;left:0;top:84px;bottom:0;width:226px;padding:24px 14px;background:#f1f4f9;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:10}.sidebar nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:13px;min-height:48px;border:0;background:transparent;text-align:left;font-size:.87rem;white-space:nowrap;padding:12px}.nav-item svg{width:21px;height:21px}.nav-item.active{background:var(--navy);color:white;box-shadow:0 4px 14px #14263d15}.sidebar-foot{margin-top:auto;padding:20px 10px 4px;font-size:.7rem;color:var(--muted);line-height:1.8}.sidebar-foot small{display:block;font-size:.67rem}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:5px}main{max-width:1660px;margin:auto;padding:20px 28px 40px}body.signed-in main{margin-left:226px}.test-notice{font-size:.62rem;letter-spacing:.07em;color:#946329;background:#fff7e9;border:1px solid #f3e8d4;border-radius:8px;padding:8px 12px;margin-bottom:24px;text-align:center;font-weight:650}#connection,#error{border-radius:10px;padding:12px 16px;margin:12px 0;line-height:1.5;background:#fff0f1;color:#a82f38;font-size:.85rem;overflow-wrap:anywhere}#connection{background:#fff3db;color:#8b5f16}.auth-panel{background:white;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:24px;padding:40px;max-width:500px;margin:5vh auto}.auth-panel h1{font-size:1.9rem}.auth-panel form{margin-top:24px}.auth-panel .muted{margin-top:16px}.auth-mark{margin-bottom:24px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:4px 0 24px}.page-heading p.muted{font-size:.84rem;margin-top:7px}.page-heading .actions{flex:none}.outline-voice{display:flex;align-items:center;gap:8px;background:white;border-color:#b7c8e2;color:var(--navy)}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.metric{text-align:left;display:flex;gap:14px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:19px;background:white;box-shadow:var(--shadow);min-width:0}.metric-icon{display:grid;place-items:center;flex:none;background:#edf2ff;border-radius:13px;width:43px;height:43px;color:#3d609b}.metric.green .metric-icon{background:#eaf7ee;color:var(--green)}.metric.amber .metric-icon{background:#fff3dc;color:var(--amber)}.metric.red .metric-icon{background:#fff0f1;color:var(--red)}.metric-label{display:block;font-size:.75rem;font-weight:550;color:var(--muted);line-height:1.4}.metric-value{display:block;font-size:2rem;line-height:1.25;letter-spacing:-.04em;margin-top:4px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(270px,1fr);gap:20px}.main-column,.side-column{display:grid;align-content:start;gap:20px}.panel{background:white;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow);min-width:0}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.panel-title{display:flex;align-items:center;gap:9px}.panel-title svg{width:21px;height:21px}.alert-panel{border-color:#f2cdd0;background:linear-gradient(120deg,#fff5f6,white);padding:18px 20px}.alert-panel h2{color:#b83742}.alert-row{display:flex;gap:14px;align-items:center;width:100%;border:0;border-top:1px solid #f3dfe2;border-radius:0;padding:12px 0;text-align:left;font-weight:400;font-size:.8rem;background:transparent}.alert-row strong{white-space:nowrap}.alert-row span:last-child{margin-left:auto}.case-list{display:grid;gap:10px}.case-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;text-align:left;gap:14px;border-radius:13px;background:#fcfdff;padding:15px;min-width:0}.case-row strong{display:block;font-size:.9rem}.case-row small{display:block;margin-top:6px;overflow-wrap:anywhere}.case-row .badge{margin-top:8px;width:fit-content}.case-row svg{color:#4d6c99}.table-wrap{overflow:auto;max-width:100%}table{width:100%;border-collapse:collapse;text-align:left;font-size:.8rem}th{font-size:.66rem;letter-spacing:.025em;color:var(--muted);font-weight:600;background:#f5f7fb;padding:11px 10px}td{padding:13px 10px;border-bottom:1px solid #edf0f5;line-height:1.5}td .link-button{padding:0;min-height:32px;font-size:.8rem}.desktop-cases td:last-child{max-width:180px}.mobile-cases{display:none}.mini-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:20px}.chart{width:100%;height:180px;margin-top:8px;stroke:none}.chart text{fill:var(--muted);font-size:10px;stroke:none}.chart .grid{stroke:#e9edf4;stroke-width:1}.chart .admission-bar{fill:#8fabe0}.chart .discharge-bar{fill:#e5484d}.chart .last{fill:var(--navy)}.legend{display:flex;gap:15px;flex-wrap:wrap;font-size:.7rem;color:var(--muted);margin-top:8px}.legend span:before{content:'';display:inline-block;width:8px;height:8px;background:#8fabe0;margin-right:5px;border-radius:2px}.legend span:last-child:before{background:var(--red)}.dark-panel{background:var(--navy);color:white;border:0}.dark-panel .muted,.dark-panel .fine{color:#c3d0e2}.dark-panel .panel-title{margin-bottom:15px}.dark-panel button{width:100%;margin-top:16px}.stat-line{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid #edf0f5;font-size:.82rem}.stat-line:last-child{border-bottom:0}.stat-line strong{font-size:1.1rem;white-space:nowrap}.stat-line span{color:var(--muted)}.quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.quick-grid button{display:flex;text-align:left;align-items:center;gap:12px;padding:18px 14px;font-size:.82rem;line-height:1.4;background:#fcfdff}.quick-grid svg{color:var(--red);width:27px;height:27px}.welcome{border-radius:16px;padding:18px 20px;background:linear-gradient(110deg,#eaf0fa,#f9fafc);display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.welcome strong{font-size:1.12rem;display:block;margin-top:5px}.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:20px}.filters label{flex:1;min-width:140px}.filters button{flex:none}.tabs{display:flex;gap:6px;background:#eaf0f7;border-radius:12px;padding:5px;width:fit-content;max-width:100%;margin-bottom:20px;flex-wrap:wrap}.tabs button{background:none;border:0;font-size:.78rem;padding:9px 14px;min-height:38px}.tabs button.active{background:white;box-shadow:0 2px 7px #14263d10}.stepper{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:22px 0}.stepper button{display:grid;gap:6px;justify-items:start;text-align:left;font-size:.72rem;padding:12px}.stepper button.active{border-color:var(--red);background:#fff6f6}.step-num{width:24px;height:24px;display:grid;place-items:center;background:#eaf0f7;border-radius:50%;font-size:.72rem}.stepper button.active .step-num{background:var(--red);color:white}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field-block{background:#f6f8fc;border-radius:12px;padding:15px}.field-block small{display:block;margin-bottom:6px}.field-block strong{font-size:.95rem;overflow-wrap:anywhere}.history-item{border-left:2px solid #dbe4f1;padding:0 0 20px 18px;line-height:1.5}.history-item small{display:block}.timeline{margin-top:20px}.section-space{margin-top:22px}.account{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:15px 0;border-bottom:1px solid var(--line)}.account span{flex:1;min-width:180px}.account select{width:auto}#account-form{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}#account-form button{grid-column:1/-1}#access-history{white-space:pre-wrap;line-height:1.8;font-size:.85rem}#admin>.panel{margin-bottom:20px}.voice-hero{background:radial-gradient(ellipse at 50% 70%,#38415e,var(--navy) 70%);border-radius:22px 22px 0 0;padding:24px 30px;text-align:center;color:white}.voice-heading{display:flex;align-items:center;gap:14px}.voice-heading h1{font-size:1.15rem;letter-spacing:-.02em}.on-dark{color:white;background:transparent;border-color:#ffffff40}.on-dark:hover{background:#ffffff18}.local-badge{margin-left:auto;font-size:.65rem;color:#cfdaeb;border:1px solid #ffffff30;padding:6px 9px;border-radius:6px}.voice-context{font-size:.78rem;color:#c5d1e2;margin-top:20px}.recorder-art{position:relative;display:grid;place-items:center;height:142px;margin:0 auto;max-width:480px}.ecg{position:absolute;width:100%;height:80px;color:#e9676c;opacity:.4;stroke-width:2}.record-button{z-index:1;width:94px;height:94px;border-radius:50%;border:2px solid #ee8c91;background:#cf3e4f;display:grid;place-items:center;color:white;box-shadow:0 0 35px #e5484d55}.record-button:hover{background:#e5484d}.record-button svg{width:36px;height:36px;stroke-width:1.8}.voice-hero p{font-size:.71rem;color:#bcc9dc;margin-top:8px}.voice-hero.is-recording .ecg{opacity:1;animation:pulse 1.2s ease-in-out infinite}.voice-hero.is-recording .record-button{animation:halo 1.2s ease-in-out infinite}#recording{margin-top:15px;display:flex;justify-content:center;align-items:center;gap:16px;font-size:.8rem}.conversation-body{background:white;border:1px solid var(--line);border-top:0;border-radius:0 0 22px 22px;padding:24px;margin:auto}#conversation{max-width:900px;margin:auto}.bubble{padding:15px 18px;margin-bottom:12px;border-radius:14px;background:#f2f5fa;white-space:pre-wrap;line-height:1.6;font-size:.87rem;overflow-wrap:anywhere}.bubble.mine{background:#fff2f3;margin-left:12%;color:#8c3741}.bubble .buttons{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.bubble button{font-size:.78rem;min-height:42px;padding:9px 12px;white-space:normal}.bubble .buttons .confirm{background:var(--red);border-color:var(--red);color:white}#feed:empty{display:none}#audio-preview{margin-bottom:20px}audio{width:100%;margin:15px 0}#compose{display:flex;gap:10px;align-items:stretch;margin-top:20px}#compose textarea{flex:1}#compose button{font-size:1.5rem;width:52px;flex:none}#draft-review{border-color:#bacce6;margin:20px 0;box-shadow:0 6px 20px #14263d08}#draft-review form{margin-top:16px}#draft-review .actions{margin-top:16px}.draft-banner{display:flex;gap:12px;align-items:center;background:#fff4df;padding:14px 18px;border-radius:12px;margin-bottom:20px;font-size:.82rem}.draft-banner button{margin-left:auto}.bottom-nav{display:none}.unavailable{padding:16px;border:1px dashed #c9d2df;border-radius:12px;color:var(--muted);font-size:.82rem;line-height:1.6}
@keyframes pulse{50%{opacity:.4}}@keyframes halo{50%{box-shadow:0 0 50px #e5484d88}}
}
@layer responsive{
@media(max-width:1200px){.topbar{gap:15px;padding:14px 20px}.department-name{display:none}.sidebar{width:196px;padding:20px 10px}body.signed-in main{margin-left:196px;padding:20px}.metrics{gap:10px}.metric{padding:15px;gap:10px}.metric-icon{width:34px;height:34px}.metric-label{font-size:.7rem}.metric-value{font-size:1.8rem}.dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(245px,.6fr);gap:16px}.panel{padding:18px}.mini-grid{grid-template-columns:1fr}.quick-grid{grid-template-columns:1fr 1fr}.stepper{grid-template-columns:repeat(3,1fr)}.topbar time{display:none}}
@media(max-width:900px){.dashboard-grid{grid-template-columns:1fr}.side-column{grid-template-columns:1fr 1fr}.side-column .dark-panel{grid-column:1/-1}.desktop-cases{display:none}.mobile-cases{display:grid}.metric{display:block}.metric-icon{margin-bottom:10px}.mini-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.topbar{height:auto;min-height:76px;padding:calc(10px + env(safe-area-inset-top)) 18px 10px;background:var(--navy);color:white;gap:12px;border:0;position:relative}.logo{color:white;font-size:1.18rem}.logo small{color:#c0cbdb}.logo img{width:36px;height:36px}.topbar .icon-button{background:#ffffff0d;color:white;border-color:#ffffff25;width:36px;height:36px;min-height:36px}.topbar #help{margin-left:auto}.search,.sidebar{display:none!important}main,body.signed-in main{margin:0;padding:16px 16px calc(110px + env(safe-area-inset-bottom))}.test-notice{font-size:.55rem;letter-spacing:.02em;padding:7px 8px;margin-bottom:18px}.page-heading{gap:10px;margin:0 0 20px}.page-heading h1{font-size:1.65rem}.page-heading .actions{display:none}.page-heading .muted{font-size:.77rem}.page-heading .eyebrow{font-size:.6rem}.welcome{padding:16px;margin-bottom:17px}.welcome strong{font-size:1rem}.welcome .fine{margin:0;font-size:.7rem}.metrics{gap:8px;margin-bottom:18px}.metric{padding:12px 9px;border-radius:14px;display:flex;flex-direction:column;align-items:flex-start;gap:0;min-height:116px}.metric-icon{width:30px;height:30px;margin-bottom:9px;border-radius:9px}.metric-icon svg{width:20px;height:20px}.metric-label{font-size:.62rem;min-height:28px;line-height:1.3}.metric-value{font-size:1.6rem;line-height:1.2;margin-top:6px}.dashboard-grid,.main-column,.side-column{display:grid;grid-template-columns:1fr;gap:16px}.panel{padding:17px;border-radius:16px}.panel-header{margin-bottom:14px;gap:8px}.panel-header h2{font-size:.96rem}.panel-header .link-button{font-size:.72rem;padding:4px}.mini-grid{grid-template-columns:1fr;gap:16px}.quick-grid{gap:9px}.quick-grid button{padding:14px 12px;font-size:.75rem;gap:9px;min-height:78px}.quick-grid svg{width:25px;height:25px}.alert-panel{padding:16px}.alert-row{gap:8px;font-size:.72rem;flex-wrap:wrap}.alert-row .badge{font-size:.6rem}.alert-row span:last-child{margin-left:0;flex:1}.case-row{gap:10px;padding:13px 11px}.case-row strong{font-size:.84rem}.case-row small{font-size:.73rem}.case-row svg{width:23px}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:25;background:#fffffffa;backdrop-filter:blur(14px);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px #14263d05}.bottom-nav button{display:grid;justify-items:center;align-content:center;gap:5px;border:0;border-radius:10px;padding:6px 2px;min-height:55px;background:transparent;font-size:.57rem;font-weight:550;color:#67758a}.bottom-nav button svg{width:22px;height:22px}.bottom-nav button.active{color:var(--red)}.bottom-nav .mobile-mic{position:relative;transform:translateY(-12px);border:4px solid white;background:var(--red);color:white;border-radius:50%;width:62px;height:62px;justify-self:center;box-shadow:0 5px 14px #e5484d38}.bottom-nav .mobile-mic svg{width:26px;height:26px}.bottom-nav .mobile-mic span{display:none}.voice-hero{border-radius:18px 18px 0 0;padding:18px 16px}.voice-heading h1{font-size:1rem}.local-badge{display:none}.voice-heading button{min-height:38px;padding:4px 10px}.recorder-art{height:142px}.conversation-body{padding:15px;border-radius:0 0 18px 18px}.bubble{padding:12px;font-size:.82rem}.bubble .buttons{gap:6px}.bubble button{flex:1;font-size:.73rem}.voice-hero p{font-size:.63rem}.field-grid{gap:10px}.field-block{padding:13px}.field-block strong{font-size:.85rem}.field-block small{font-size:.7rem}.stepper{gap:6px;margin:18px 0}.stepper button{padding:9px;font-size:.63rem;min-height:68px}.auth-panel{padding:25px 20px;margin:10px auto}.auth-panel h1{font-size:1.7rem}.auth-mark{margin-bottom:15px}.auth-mark img{width:52px;height:52px}.auth-panel .muted{font-size:.88rem}.filters{gap:9px}.filters label{font-size:.72rem;min-width:100px}.filters button{width:100%}.tabs{width:100%}.tabs button{flex:1;padding:8px;font-size:.74rem}.chart{height:160px}.draft-banner{padding:12px;font-size:.75rem;align-items:flex-start;flex-wrap:wrap}.draft-banner button{margin:0;padding:7px 10px;font-size:.75rem}.account select{width:100%}#account-form{grid-template-columns:1fr}#recording{flex-direction:column;gap:10px}dialog{padding:21px}.section-space{margin-top:18px}}
@media(max-width:360px){main,body.signed-in main{padding-left:10px;padding-right:10px}.metrics{grid-template-columns:repeat(2,1fr)}.metric{min-height:90px;display:block}.metric-icon{float:right}.metric-label{min-height:0}.field-grid{grid-template-columns:1fr}}
@media(max-width:700px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-label{font-size:.875rem;min-height:0}.metric-value{font-size:1.9rem}.metric{min-height:118px}.quick-grid button{font-size:.875rem}.case-row strong{font-size:.95rem}.case-row small,.bubble button,.alert-row,.field-block small{font-size:.875rem}.bottom-nav button{font-size:.72rem}.test-notice{font-size:.68rem}.stepper button{font-size:.8rem}.voice-hero p{font-size:.8rem}.page-heading .muted{font-size:.875rem}.fine{font-size:.8rem}.stat-line{overflow-wrap:anywhere}.stat-line strong{white-space:normal;text-align:right}.field-grid{grid-template-columns:1fr}.filters input{max-width:100%}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.topbar,.sidebar,.bottom-nav,.test-notice,.filters,.actions,button,#connection,#error{display:none!important}body.signed-in main{margin:0;padding:0}.panel{break-inside:avoid;box-shadow:none}}
}
