:root{font-family:'DM Sans',sans-serif;color:#172d28;background:#f6f8f7;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9ed8c7;outline-offset:2px}.app-shell{display:flex;min-height:100vh}.sidebar{width:236px;flex:none;background:#fff;border-right:1px solid #e7edea;padding:30px 17px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand,.mobile-brand{font-family:Manrope,sans-serif;font-weight:800;font-size:26px;letter-spacing:-1.6px;display:flex;align-items:center;gap:8px;padding-left:17px}.brand-icon{background:#176e58;color:#fff;border-radius:11px;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;font-size:22px;letter-spacing:0}.brand-dot,.heading-dot{color:#58b794}.workspace-label{font-size:10px;letter-spacing:1.7px;font-weight:700;color:#9eaaa5;margin:62px 0 16px 17px}.side-nav{display:grid;gap:6px}.nav-item{border:0;background:transparent;color:#74817c;text-align:left;border-radius:10px;padding:13px 17px;font-weight:700;font-size:13px;display:flex;align-items:center;gap:14px}.nav-item:hover,.nav-item.active{background:#eaf5f0;color:#176e58}.nav-icon{font-size:20px;line-height:1;width:22px;text-align:center;font-weight:400}.sidebar-bottom{margin-top:auto;background:#f1f8f4;padding:18px;border-radius:14px}.privacy-icon{font-size:22px;color:#2d9875;margin-bottom:12px}.sidebar-bottom strong{font-size:12px}.sidebar-bottom p{font-size:11px;color:#84928c;line-height:1.55;margin:7px 0 0}.main-content{flex:1;min-width:0;max-width:1680px;margin:auto;padding:0 42px 70px}.topbar{height:86px;border-bottom:1px solid #e9eeeb;display:flex;justify-content:flex-end;align-items:center}.mobile-brand{display:none}.topbar-right{display:flex;align-items:center;gap:19px;color:#8b9992;font-size:12px;font-weight:600}.avatar{width:32px;height:32px;border-radius:50%;background:#e2f1e9;color:#277e60;display:grid;place-items:center;font-size:11px;font-weight:800}.view{display:none}.view.active{display:block}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:36px 0 27px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.8px;color:#4ea887}.page-heading h1{font:800 34px/1.2 Manrope,sans-serif;letter-spacing:-1.5px;margin:7px 0 7px}.page-heading p{color:#8c9993;font-size:13px;margin:0}.primary-btn{background:#176e58;border:1px solid #176e58;color:white;padding:12px 18px;border-radius:9px;font-size:12px;font-weight:700;white-space:nowrap;box-shadow:0 6px 12px #176e5814}.primary-btn:hover{background:#105a48}.hero-card{min-height:234px;border-radius:16px;background:#e7f3ed;position:relative;overflow:hidden;display:flex;align-items:center;padding:29px 42px}.hero-copy{position:relative;z-index:1;max-width:420px}.hero-kicker{font-size:10px;letter-spacing:1.7px;font-weight:800;color:#268467;display:flex;align-items:center;gap:7px}.status-dot{width:7px;height:7px;border-radius:50%;background:#3cba8b}.hero-card h2{font:800 25px/1.2 Manrope,sans-serif;letter-spacing:-1px;margin:16px 0 10px}.hero-card p{font-size:12px;color:#678478;line-height:1.6;margin:0;max-width:360px}.hero-link{padding:0;border:0;background:none;color:#147057;font-size:12px;font-weight:800;margin-top:18px}.hero-link span{margin-left:5px}.hero-art{position:absolute;right:9%;top:0;width:310px;height:100%;display:grid;place-items:center;color:#73c6a6}.orbit{position:absolute;border:1px solid #aedcc9;border-radius:50%;aspect-ratio:1}.orbit-one{width:205px}.orbit-two{width:280px;opacity:.7}.hero-heart{font-size:110px;color:#80cdae;transform:rotate(-12deg);text-shadow:0 10px 30px #4caa8533}.hero-pulse{position:absolute;font-size:70px;color:#e9fff2;transform:translate(42px,-2px)}.section-title-row{display:flex;justify-content:space-between;align-items:center;margin:29px 0 15px}.section-title-row h2,.panel h2{font:800 16px Manrope,sans-serif;letter-spacing:-.4px;margin:0}.section-title-row p,.panel-heading p{font-size:11px;color:#9ba8a1;margin:4px 0 0}.subtle-pill{border:1px solid #e5ebe7;border-radius:50px;padding:7px 11px;font-size:10px;color:#89978f;background:#fff;white-space:nowrap}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.metric-card,.panel{background:#fff;border:1px solid #e8eeea;border-radius:13px}.metric-card{padding:18px 19px;min-height:149px;display:flex;flex-direction:column}.metric-top{display:flex;align-items:center;gap:9px}.metric-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-size:20px}.bp-icon{color:#e48b75;background:#fdf0ec}.pulse-icon{color:#e5a15c;background:#fff3e8}.oxygen-icon{color:#68a7bf;background:#edf7fa}.sugar-icon{color:#a489c6;background:#f5effb}.metric-label{font-size:9px;color:#91a099;letter-spacing:1px;font-weight:800}.metric-value{font:800 26px Manrope,sans-serif;letter-spacing:-1px;margin:13px 0 8px;white-space:nowrap}.metric-value span{font:600 10px 'DM Sans',sans-serif;color:#9aa8a1;letter-spacing:0;margin-left:5px}.metric-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:auto;min-height:17px}.metric-status{background:#e9f6ed;color:#39866b;border-radius:20px;font-size:9px;font-weight:700;padding:4px 8px}.metric-status.elevated{background:#fff2e6;color:#ac6d39}.muted-text{font-size:10px;color:#a6b1ab}.mini-bars{font-size:19px;color:#69b893;letter-spacing:2px}.metric-decoration{font-size:17px}.pulse-color{color:#e6b27a}.oxygen-color{color:#87c3d4}.sugar-color{color:#baa2d6}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:15px;margin-top:15px}.panel{min-width:0;padding:21px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.chart-legend{display:flex;align-items:center;gap:6px;font-size:9px;color:#9ea9a3;white-space:nowrap}.chart-legend i{width:7px;height:7px;border-radius:50%;display:inline-block;margin-left:8px}.sys-dot{background:#238a6c}.dia-dot{background:#c6dfd3}.chart-wrap{height:206px;margin-top:14px}.chart-wrap svg{width:100%;height:100%;overflow:visible}.chart-empty,.empty-state{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#9daaa3;font-size:12px;line-height:1.5}.chart-empty span,.empty-state span{font-size:28px;color:#84c7a9;margin-bottom:7px}.text-button{border:0;background:none;color:#288d6c;font-size:11px;font-weight:700;white-space:nowrap}.med-summary{margin-top:18px}.med-summary-row,.med-row{display:flex;align-items:center;gap:11px;padding:12px 0;border-top:1px solid #f0f3f0}.med-summary-row:first-child{border-top:0}.med-circle{width:33px;height:33px;border-radius:10px;background:#f2eefa;color:#a28aca;display:grid;place-items:center;font-size:18px;flex:none}.med-details{flex:1;min-width:0}.med-details strong{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.med-details small{display:block;font-size:10px;color:#a0aca5;margin-top:3px}.taken-chip{font-size:9px;font-weight:700;color:#348267;background:#eaf7ef;padding:6px 8px;border-radius:20px}.due-chip{font-size:9px;font-weight:700;color:#9b8262;background:#fbf4e9;padding:6px 8px;border-radius:20px}.lower-grid{margin-top:15px}.small-chart{height:180px}.activity-panel #activityList{margin-top:15px}.activity-row{display:flex;align-items:flex-start;gap:11px;border-top:1px solid #f0f3f0;padding:10px 0}.activity-row:first-child{border:0}.activity-mark{width:28px;height:28px;border-radius:9px;background:#f1f8f3;color:#46a77d;display:grid;place-items:center;flex:none}.activity-row strong{font-size:11px;display:block}.activity-row small{font-size:10px;color:#a2ada6;display:block;margin-top:3px}.list-panel{min-height:330px}.reading-row{display:grid;grid-template-columns:150px 1fr auto;gap:20px;align-items:center;padding:17px 0;border-top:1px solid #edf1ee}.reading-row:first-child{margin-top:18px}.reading-date strong,.reading-date small{display:block}.reading-date strong{font-size:12px}.reading-date small{font-size:10px;color:#9fa9a4;margin-top:4px}.reading-vitals{display:flex;flex-wrap:wrap;gap:7px}.vital-chip{background:#f3f7f4;border-radius:7px;padding:7px 9px;font-size:10px;color:#6d8278}.vital-chip b{color:#213e32}.reading-context{font-size:10px;color:#8c9a92;max-width:190px;text-align:right}.reading-context strong{display:block;color:#448d6c;font-weight:700;margin-bottom:3px}.med-page-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(240px,1fr);gap:15px}.med-row{padding:17px 0}.med-row:first-child{margin-top:15px}.med-row .med-circle{width:40px;height:40px}.med-row .med-details strong{font-size:13px}.med-row .med-details small{font-size:11px}.med-actions{display:flex;gap:6px;align-items:center}.small-btn{border:1px solid #d7e8dc;background:#f6fbf7;color:#247959;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:700}.small-btn.done{background:#e5f5ea}.icon-btn{border:0;background:transparent;color:#aab5ad;font-size:19px;padding:4px 8px}.guidance-panel{background:#eef7f1;border-color:#e5f1e7;padding:26px;align-self:start}.guidance-icon{width:38px;height:38px;border-radius:12px;background:#d7eddd;color:#38976b;display:grid;place-items:center;font-size:24px;margin-bottom:24px}.guidance-panel h2{font-size:19px}.guidance-panel p{color:#718b7c;font-size:12px;line-height:1.7}.guidance-note{border-top:1px solid #d5e8d9;margin-top:30px;padding-top:18px;color:#8da698;font-size:10px;line-height:1.6}.mobile-nav{display:none}.entry-dialog{border:0;border-radius:16px;padding:0;width:min(510px,calc(100vw - 24px));max-height:min(90vh,780px);box-shadow:0 20px 80px #163b2a38}.entry-dialog::backdrop{background:#12392c7a}.dialog-content{display:flex;flex-direction:column;max-height:min(90vh,780px)}.dialog-head{padding:24px 26px 16px;display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #edf1ee}.dialog-head h2{font:800 22px Manrope,sans-serif;margin:7px 0 0}.close-btn{background:transparent;border:0;color:#90a199;font-size:25px;line-height:1}.dialog-scroll{padding:20px 26px 5px;overflow:auto}.field{display:block;font-size:11px;font-weight:700;color:#5a6d62;margin-bottom:15px}.field span{float:right;color:#a3b0a8;font-weight:500}.field input,.field select,.field textarea{display:block;width:100%;border:1px solid #dfe8e1;border-radius:8px;background:#fff;color:#244137;padding:11px 12px;margin-top:7px;resize:vertical;font-size:13px}.field input::placeholder,.field textarea::placeholder{color:#b8c4bd}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-section{font-size:10px;color:#419675;font-weight:800;letter-spacing:1.2px;margin:6px 0 14px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 26px 22px;border-top:1px solid #edf1ee}.secondary-btn{border:1px solid #dfe9e2;border-radius:9px;background:white;color:#648074;padding:11px 16px;font-size:12px;font-weight:700}
@media(max-width:1150px){.main-content{padding:0 26px 60px}.sidebar{width:205px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr 1fr}}@media(max-width:800px){.sidebar{display:none}.main-content{padding:0 20px 100px}.topbar{height:68px;justify-content:space-between}.mobile-brand{display:flex;padding:0;font-size:21px}.mobile-brand .brand-icon{width:29px;height:29px;font-size:18px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:5;background:#fff;border-top:1px solid #e6eee8;padding:8px 8px calc(8px + env(safe-area-inset-bottom));justify-content:space-around;box-shadow:0 -5px 25px #193a2410}.mobile-nav-item{border:0;background:none;color:#9aa8a0;font-size:10px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:75px}.mobile-nav-item span{font-size:21px}.mobile-nav-item.active{color:#16745a}.dashboard-grid,.med-page-grid{grid-template-columns:1fr}.hero-art{right:0}.reading-row{grid-template-columns:130px 1fr}.reading-context{grid-column:2;text-align:left;max-width:none}}@media(max-width:520px){.main-content{padding:0 15px 95px}.today-label{display:none}.page-heading{align-items:flex-start;padding:26px 0 20px}.page-heading h1{font-size:29px}.page-heading .primary-btn{font-size:0;padding:10px 11px}.page-heading .primary-btn::first-letter{font-size:20px}.hero-card{padding:24px;min-height:221px}.hero-card h2{font-size:21px}.hero-card p{max-width:245px}.hero-art{opacity:.25;right:-105px}.metric-grid{gap:9px}.metric-card{padding:13px;min-height:137px}.metric-label{font-size:8px;letter-spacing:.5px}.metric-value{font-size:23px}.metric-value span{font-size:9px}.section-title-row{margin-top:24px}.panel{padding:16px}.chart-legend{font-size:8px;gap:4px}.chart-legend i{margin-left:2px}.reading-row{grid-template-columns:1fr;gap:9px}.reading-context{grid-column:1}.form-grid{gap:9px}.dialog-head{padding:18px 20px 14px}.dialog-scroll{padding:18px 20px 5px}.dialog-actions{padding:14px 20px 18px}}
.brand{font-size:20px;letter-spacing:-1px}.mobile-brand{font-size:20px;letter-spacing:-1px}.doctor-note{grid-column:1/-1;background:#f7faf8;border:1px solid #eaf0eb;border-radius:9px;padding:12px 14px}.doctor-note span{font-size:9px;letter-spacing:1.1px;font-weight:800;color:#4b9c77}.doctor-note p{font-size:12px;color:#587064;line-height:1.5;white-space:pre-wrap;margin:5px 0 8px}.doctor-note .text-button{padding:0}.dialog-hint{font-size:12px;color:#809187;margin:0 0 18px}
[hidden]{display:none!important}.locked .app-shell,.locked .mobile-nav{display:none}.auth-screen{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at 85% 10%,#ddf3e8,transparent 40%),#f6f8f7}.auth-card{width:min(100%,430px);background:#fff;border:1px solid #e3ece5;border-radius:17px;padding:35px;box-shadow:0 18px 50px #143f2914}.auth-brand{display:flex;align-items:center;gap:9px;font:800 22px Manrope,sans-serif;letter-spacing:-1px;margin-bottom:45px}.auth-card h1{font:800 26px Manrope,sans-serif;letter-spacing:-1px;margin:9px 0}.auth-card>p{font-size:13px;line-height:1.6;color:#819188}.auth-card form{margin-top:25px}.auth-card .field{font-size:12px}.auth-card input{font-size:16px}.auth-submit{width:100%;margin-top:5px;font-size:13px}.auth-submit:disabled{opacity:.65;cursor:wait}.auth-error{color:#bd4d45;background:#fff1ee;border-radius:7px;padding:9px 10px;font-size:12px;line-height:1.5}.auth-card .auth-footnote{font-size:11px;color:#a1afa6;margin:22px 0 0}body:not(.locked) .auth-screen{display:none}.lock-btn{border:1px solid #dcebe1;background:#fff;color:#388765;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:700}.heading-actions{display:flex;gap:8px;align-items:center}.print-report{display:none}@media(max-width:520px){.auth-card{padding:26px}.heading-actions{flex-wrap:wrap;justify-content:flex-end}.heading-actions .secondary-btn{font-size:11px;padding:10px}.lock-btn span{display:none}}
@media print{*{box-shadow:none!important}html,body{background:#fff!important;color:#172d28!important}.app-shell,.mobile-nav,.auth-screen,dialog{display:none!important}.print-report{display:block!important;padding:0;font:10pt Arial,sans-serif;color:#172d28}.report-header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #287d60;padding-bottom:14px;margin-bottom:20px}.report-brand{color:#287d60;font-weight:700}.report-header h1{font-size:20pt;margin:12px 0 4px}.report-header p,.report-count{color:#66776e;font-size:9pt}.report-section{margin-bottom:24px}.report-section h2{font-size:12pt;color:#267357;border-bottom:1px solid #dce8df;padding-bottom:6px}.report-section p{line-height:1.5}.print-report table{border-collapse:collapse;width:100%;table-layout:fixed}.print-report th,.print-report td{border-bottom:1px solid #e4eae5;padding:7px 5px;text-align:left;vertical-align:top;font-size:8pt;overflow-wrap:anywhere}.print-report th{background:#eef6f0;color:#315746}.report-notes td{background:#f8fbf9;line-height:1.5;white-space:pre-wrap}.print-report tr{break-inside:avoid}.print-report footer{font-size:8pt;color:#8b9a90;border-top:1px solid #e3eae4;padding-top:10px}@page{size:A4;margin:16mm}}
.patient-switch-label{display:flex;align-items:center;gap:7px;font-size:11px;color:#87978e;font-weight:700}.patient-switch-label select{border:1px solid #dce9e0;background:#fff;color:#225a43;border-radius:8px;padding:7px 9px;max-width:200px;font-size:11px;font-weight:700}.patients-list{margin-top:14px}.patient-card{display:flex;gap:14px;align-items:flex-start;padding:17px 2px;border-top:1px solid #eaf0eb}.patient-card.selected{background:#f7fbf8}.patient-avatar{width:40px;height:40px;flex:none;border-radius:12px;background:#e4f2e8;color:#2b8262;display:grid;place-items:center;font-weight:800}.patient-info{flex:1;min-width:0}.patient-info strong{font-size:13px}.patient-info p{font-size:11px;color:#809188;margin:5px 0;line-height:1.5;overflow-wrap:anywhere}.patient-info small{font-size:10px;color:#a2aea6}.patient-actions{display:flex;flex-direction:column;gap:8px;align-items:flex-end}.patient-actions .text-button{padding:2px}.auth-card .field input{margin-top:7px}@media(max-width:800px){.patient-switch-label select{max-width:170px}.mobile-nav-item{min-width:60px}}@media(max-width:520px){.topbar{height:auto;min-height:90px;display:flex;flex-wrap:wrap;padding:12px 0}.mobile-brand{width:100%;font-size:18px}.topbar-right{width:100%;justify-content:space-between;margin-top:7px;gap:7px}.patient-switch-label select{max-width:165px}.patient-card{flex-wrap:wrap}.patient-info{flex-basis:calc(100% - 60px)}.patient-actions{width:100%;flex-direction:row;justify-content:flex-end}.mobile-nav-item{min-width:50px}}
.backup-restore{border-top:1px solid #e6eee8;margin-top:20px;padding-top:15px;display:flex;justify-content:space-between;align-items:center;gap:10px}.backup-restore span{font-size:11px;color:#889990}.backup-restore .text-button{font-size:11px;text-align:right}@media(max-width:520px){.backup-restore{align-items:flex-start;flex-direction:column}.heading-actions{max-width:58%}.heading-actions .secondary-btn{white-space:normal;line-height:1.2}}

/* Appearance controls and dashboard refinement */
:root{--surface:#fff;--chart-grid:#e4ebe7;--chart-text:#84978c;--chart-sys:#238a6c;--chart-dia:#a7cfbc;--chart-pulse:#d9914d;--chart-oxygen:#4e9db6}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.auth-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:37px}.auth-card-top .auth-brand{margin-bottom:0;min-width:0}
.theme-picker{position:relative;display:inline-flex;align-items:center;flex:none;color:#496b5d;background:#fff;border:1px solid #dce8e0;border-radius:9px;min-height:36px;padding-left:9px}.theme-picker::before{content:'◐';font-size:16px;line-height:1;color:#39866b}.theme-picker select{appearance:none;border:0;background:transparent;color:inherit;font-weight:700;font-size:11px;padding:8px 22px 8px 6px;cursor:pointer;max-width:112px}.theme-picker::after{content:'⌄';position:absolute;right:8px;pointer-events:none;color:inherit}.auth-theme-picker{margin-top:1px}
.metric-card,.panel{box-shadow:0 7px 24px #183e2b08}.metric-card{border-top:3px solid var(--metric-accent,#70bb99);transition:transform .2s ease,box-shadow .2s ease}.metric-card:nth-child(1){--metric-accent:#dc8b75}.metric-card:nth-child(2){--metric-accent:#e3a15d}.metric-card:nth-child(3){--metric-accent:#6fb2c4}.metric-card:nth-child(4){--metric-accent:#ad91c9}@media(hover:hover){.metric-card:hover{transform:translateY(-3px);box-shadow:0 13px 30px #183e2b14}}
.metric-status{white-space:nowrap;flex:none}.mini-bars{font-size:14px;letter-spacing:0;white-space:nowrap;overflow:hidden;max-width:53%}
.hero-card{background:linear-gradient(115deg,#e5f2eb 0%,#e7f4ee 60%,#d6eee2 100%)}.page-heading h1{max-width:100%;overflow-wrap:anywhere}.topbar-right{gap:12px}.primary-btn,.secondary-btn,.lock-btn{min-height:38px}
@media(max-width:800px){.theme-picker{min-height:38px}.mobile-nav-item{min-height:44px;justify-content:center}}
@media(max-width:520px){.topbar-right{flex-wrap:wrap}.patient-switch-label{flex:1;min-width:145px}.patient-switch-label select{max-width:min(42vw,165px)}.theme-picker select{max-width:100px}.page-heading{flex-wrap:wrap}.page-heading .primary-btn{font-size:12px;padding:10px 12px}.page-heading .primary-btn::first-letter{font-size:inherit}.metric-card{min-width:0}.metric-value{white-space:normal}.auth-card-top{margin-bottom:30px}.auth-card-top .auth-brand{font-size:19px}}
@media(prefers-reduced-motion:reduce){.metric-card{transition:none}.metric-card:hover{transform:none}}

/* Dark palettes share the same surfaces and contrast rules. */
:root[data-theme="midnight"]{--bg:#0c1727;--surface:#17263a;--surface-raised:#1d3048;--text:#edf5fa;--muted:#b4c6d2;--subtle:#93aaba;--border:#30465e;--accent:#80d9c5;--accent-soft:#1b3b42;--hero-start:#1b394c;--hero-end:#203049;--button-bg:#2b806f;--button-hover:#368f7e;--chart-grid:#385169;--chart-text:#a0b8c8;--chart-sys:#80d9c5;--chart-dia:#c5a8ec;--chart-pulse:#f4bc83;--chart-oxygen:#83c7e8}
:root[data-theme="forest"]{--bg:#0d1b18;--surface:#172a24;--surface-raised:#20382f;--text:#eff7ec;--muted:#bad0bf;--subtle:#99b5a2;--border:#345246;--accent:#a8df91;--accent-soft:#294934;--hero-start:#244736;--hero-end:#1b342b;--button-bg:#497d4c;--button-hover:#579157;--chart-grid:#3c5b4a;--chart-text:#acc6ae;--chart-sys:#a8df91;--chart-dia:#cbdcaa;--chart-pulse:#efc17f;--chart-oxygen:#91d4c4}
:root[data-theme="plum"]{--bg:#1b1425;--surface:#2b2137;--surface-raised:#392b46;--text:#f8f0f8;--muted:#dbc9dd;--subtle:#baa7c2;--border:#503e5c;--accent:#f0b6d1;--accent-soft:#53364d;--hero-start:#53364f;--hero-end:#382c4c;--button-bg:#9a577f;--button-hover:#ae688f;--chart-grid:#604b69;--chart-text:#d0b8d4;--chart-sys:#f0b6d1;--chart-dia:#b9b1f0;--chart-pulse:#f0bf91;--chart-oxygen:#a8c7ef}
.theme-dark{color-scheme:dark;background:var(--bg);color:var(--text)}.theme-dark body{background:var(--bg);color:var(--text)}
.theme-dark .sidebar,.theme-dark .mobile-nav,.theme-dark .metric-card,.theme-dark .panel,.theme-dark .auth-card,.theme-dark .entry-dialog{background:var(--surface);border-color:var(--border);color:var(--text)}
.theme-dark .sidebar{box-shadow:9px 0 32px #0002}.theme-dark .topbar,.theme-dark .mobile-nav,.theme-dark .dialog-head,.theme-dark .dialog-actions{border-color:var(--border)}
.theme-dark .auth-screen{background:radial-gradient(circle at 83% 12%,var(--accent-soft),transparent 42%),var(--bg)}.theme-dark .auth-card{box-shadow:0 25px 70px #0005}
.theme-dark .brand-icon{background:var(--button-bg)}.theme-dark .brand-dot,.theme-dark .heading-dot,.theme-dark .eyebrow,.theme-dark .workspace-label,.theme-dark .form-section{color:var(--accent)}
.theme-dark .nav-item{color:var(--muted)}.theme-dark .nav-item:hover,.theme-dark .nav-item.active{background:var(--accent-soft);color:var(--accent)}.theme-dark .mobile-nav-item{color:var(--subtle)}.theme-dark .mobile-nav-item.active{color:var(--accent)}
.theme-dark .sidebar-bottom,.theme-dark .guidance-panel,.theme-dark .doctor-note,.theme-dark .patient-card.selected{background:var(--surface-raised);border-color:var(--border)}
.theme-dark .privacy-icon,.theme-dark .doctor-note span,.theme-dark .activity-mark,.theme-dark .text-button,.theme-dark .hero-link{color:var(--accent)}
.theme-dark .sidebar-bottom p,.theme-dark .page-heading p,.theme-dark .panel-heading p,.theme-dark .section-title-row p,.theme-dark .auth-card>p,.theme-dark .auth-card .auth-footnote,.theme-dark .dialog-hint,.theme-dark .guidance-panel p,.theme-dark .guidance-note,.theme-dark .patient-info p,.theme-dark .patient-info small,.theme-dark .med-details small,.theme-dark .activity-row small,.theme-dark .reading-date small,.theme-dark .reading-context,.theme-dark .doctor-note p,.theme-dark .backup-restore span{color:var(--muted)}
.theme-dark .metric-label,.theme-dark .muted-text,.theme-dark .metric-value span,.theme-dark .chart-legend,.theme-dark .empty-state,.theme-dark .chart-empty,.theme-dark .topbar-right,.theme-dark .patient-switch-label,.theme-dark .field span{color:var(--subtle)}
.theme-dark .hero-card{background:linear-gradient(115deg,var(--hero-start),var(--hero-end));border:1px solid var(--border)}.theme-dark .hero-card p{color:var(--muted)}.theme-dark .hero-kicker{color:var(--accent)}.theme-dark .orbit{border-color:var(--accent);opacity:.38}.theme-dark .hero-heart{color:var(--accent);opacity:.53}.theme-dark .hero-pulse{color:var(--text)}
.theme-dark .primary-btn{background:var(--button-bg);border-color:var(--button-bg);color:#fff;box-shadow:0 6px 16px #0003}.theme-dark .primary-btn:hover{background:var(--button-hover)}.theme-dark .secondary-btn,.theme-dark .small-btn,.theme-dark .lock-btn,.theme-dark .theme-picker,.theme-dark .patient-switch-label select,.theme-dark .subtle-pill{background:var(--surface-raised);border-color:var(--border);color:var(--text)}
.theme-dark .theme-picker::before,.theme-dark .theme-picker::after{color:var(--accent)}.theme-dark .theme-picker select option,.theme-dark .patient-switch-label select option{background:var(--surface);color:var(--text)}
.theme-dark .field{color:var(--muted)}.theme-dark .field input,.theme-dark .field select,.theme-dark .field textarea,.theme-dark .auth-card input{background:var(--bg);border-color:var(--border);color:var(--text)}.theme-dark .field input::placeholder,.theme-dark .field textarea::placeholder,.theme-dark .auth-card input::placeholder{color:var(--subtle)}
.theme-dark .metric-status,.theme-dark .taken-chip{background:var(--accent-soft);color:var(--accent)}.theme-dark .metric-status.elevated,.theme-dark .due-chip{background:#59422e;color:#ffcf94}.theme-dark .vital-chip,.theme-dark .activity-mark,.theme-dark .patient-avatar,.theme-dark .avatar,.theme-dark .med-circle,.theme-dark .metric-icon{background:var(--surface-raised);color:var(--accent)}.theme-dark .vital-chip{color:var(--muted)}.theme-dark .vital-chip b,.theme-dark .reading-context strong{color:var(--text)}
.theme-dark .med-summary-row,.theme-dark .med-row,.theme-dark .activity-row,.theme-dark .reading-row,.theme-dark .patient-card,.theme-dark .guidance-note,.theme-dark .backup-restore{border-color:var(--border)}.theme-dark .doctor-note{border-color:var(--border)}.theme-dark .chart-legend .sys-dot{background:var(--chart-sys)}.theme-dark .chart-legend .dia-dot{background:var(--chart-dia)}
.theme-dark .auth-error{background:#4b2b33;color:#ffd8d4}.theme-dark .entry-dialog::backdrop{background:#03080cb8}.theme-dark button:focus-visible,.theme-dark input:focus-visible,.theme-dark select:focus-visible,.theme-dark textarea:focus-visible{outline-color:var(--accent)}
@media print{.theme-dark,.theme-dark body{color:#172d28!important;background:#fff!important}.theme-dark .print-report{color:#172d28!important;background:#fff!important}}

/* Record management controls */
.reading-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:-2px}
.reading-actions .small-btn,.reading-actions .text-button,.med-actions .small-btn{min-height:34px;padding:8px 11px}
.danger-text{color:#b4534f}.danger-text:hover{color:#8f3935;text-decoration:underline}
.theme-dark .danger-text{color:#ffaaa5}.theme-dark .danger-text:hover{color:#ffd2cf}
@media(max-width:520px){.reading-actions{grid-column:1;justify-content:flex-start;flex-wrap:wrap;margin-top:0}.med-row{flex-wrap:wrap}.med-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.med-actions .small-btn{min-height:38px}}
