/* Light is the explicit default. A saved setting is the only dark-mode trigger. */
:root { color-scheme:light; --theme-surface:#fff; --theme-input:#fcfdf9; --theme-text:#25392e; --theme-soft:#657265; --theme-accent:#234c3d; }
.care-appearance-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:18px 0 0; padding:0; border:0; }
.care-appearance-options legend { padding:0; font-size:13px; color:var(--care-muted); }
.care-account label.care-appearance-option { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:64px; margin:0; padding:14px; border:1px solid var(--care-border); border-radius:12px; background:var(--theme-input); color:var(--theme-text); cursor:pointer; font-size:14px; }
.care-appearance-option:has(input:checked) { border-color:var(--theme-accent); box-shadow:inset 0 0 0 1px var(--theme-accent); }
.care-main .care-appearance-option input { width:18px; min-height:18px; height:18px; margin:0; flex:none; accent-color:var(--theme-accent); }
.care-appearance-option .icon { width:20px; height:20px; flex:none; }
#appearance-status { margin:12px 0 0; color:var(--care-muted); font-size:12px; }
:root[data-theme="dark"] {
 color-scheme:dark;
 --theme-surface:#192620; --theme-input:#131f19; --theme-text:#e5eee7; --theme-soft:#a6b9ac; --theme-accent:#a0d5b4;
 --theme-raised:#22342b; --theme-tint:#263d30; --theme-message:#254232; --theme-warning:#f1cb89; --theme-warning-bg:#392f20; --theme-error:#f2afab; --theme-error-bg:#3c2526;
 --care-canvas:#111b18; --care-border:#3a4b40; --care-muted:var(--theme-soft); --care-forest:var(--theme-accent); --care-sage:var(--theme-tint);
 --canvas:var(--care-canvas); --paper:var(--theme-surface); --ink:var(--theme-text); --muted:var(--theme-soft); --line:var(--care-border); --forest:var(--theme-accent); --forest-dark:#bce5c9; --sage:var(--theme-tint);
 --amber:var(--theme-warning); --amber-bg:var(--theme-warning-bg); --rose:var(--theme-error); --rose-bg:var(--theme-error-bg); --blue:#aad0f0; --blue-bg:#223647;
 background:var(--care-canvas); color:var(--theme-text);
}
:root[data-theme="dark"] body { background:var(--care-canvas); color:var(--theme-text); }
:root[data-theme="dark"] .care-shell { color:var(--theme-text); }
:root[data-theme="dark"] .care-shell * { border-color:var(--care-border); }
:root[data-theme="dark"] :is(.care-sidebar,.care-top,.care-shell .panel,.care-visit-header,.care-compact-header,.care-visit-actions,.care-composer,.care-final,.care-capture-final,.care-completed-footer,.care-options[open] > div,.care-attachments,.care-note,.care-duty,.care-duty-popover,.care-route-rail,.care-route-stage,.care-route-day-controls,.care-route-detail,.care-route-map-status,.care-route-mobile-select,.care-schedule-dialog,.review-section,.review-note,.review-gaps,.care-native-photo,.login-card,dialog) {
 background:var(--theme-surface); color:var(--theme-text); border-color:var(--care-border); box-shadow:none;
}
:root[data-theme="dark"] :is(.care-main,.care-visit,.care-thread,.care-chat,.care-analysis-body,.care-route-view,.care-boot) { background:var(--care-canvas); color:var(--theme-text); }
:root[data-theme="dark"] .care-shell :is(h1,h2,h3,h4,.care-brand,.care-profile strong,.care-row-patient strong,.care-empty h2,.care-resume strong,.care-compact-patient h1,.care-patient-heading h1,.finding-value,.care-schedule-person strong,.care-schedule-time strong,.care-route-nurse strong,.care-route-select,.review-section h3,.care-chat-empty h2,.care-scheduled-list-heading h2) { color:var(--theme-text); }
:root[data-theme="dark"] .care-shell :is(.care-nav-link,.care-profile small,.care-disclosure,.care-top-role,.care-filter,.care-table-head,.care-row-nurse,.care-row-time,.care-visit-row small,.care-row-duration,.care-empty p,.care-resume small,.care-account label,.care-account summary,.care-compact-status,.care-chat-empty,.care-message-loading,.care-message-state,.care-message-state time,.care-message > small,.care-message summary,.care-consent,.care-completed-footer,.care-note > p,.care-attachments h2,.care-attachments p,.review-overview,.review-overview #note-state,.review-section > header p,.finding-label,.finding-source,.finding-source dd,.finding-source dt,.finding-source blockquote,.finding-empty-hint,.finding-readonly-context,.review-group > summary > span,.review-note-preview,.review-note-content > p,.review-gaps,.review-gaps > summary,.care-fact-context > summary,.care-schedule-meta,.care-schedule-empty,.care-schedule-person small,.care-schedule-time small,.care-schedule-assigned,.care-schedule-date-summary,.care-schedule-date,.care-route-nurse-meta,.care-route-privacy,.care-route-zone,.care-route-empty,.care-route-time-labels,.care-route-playback-actions span,.care-route-map-caption,.care-route-status,.care-duty-health,.care-reply-composer small) { color:var(--theme-soft); }
:root[data-theme="dark"] .care-shell :is(a.text-link,.care-back,.care-options summary,.care-note .panel-head h2,.care-scheduled-more,.finding-related-photos a,.finding-reply-context) { color:var(--theme-accent); }
:root[data-theme="dark"] .care-shell :is(input:not([type="radio"]):not([type="checkbox"]),select,textarea),
:root[data-theme="dark"] :is(.login-card input,.care-schedule-dialog input,.care-schedule-dialog select,.care-native-photo button) {
 background:var(--theme-input); color:var(--theme-text); border-color:var(--care-border);
}
:root[data-theme="dark"] :is(input,textarea)::placeholder { color:#98ad9f; opacity:1; }
:root[data-theme="dark"] .care-shell :is(input,select,textarea):focus { border-color:var(--theme-accent); box-shadow:0 0 0 3px #a0d5b422; }
:root[data-theme="dark"] :is(.care-shell,.login-card) :focus-visible { outline-color:#c4a566; }
:root[data-theme="dark"] .care-shell .btn.primary,
:root[data-theme="dark"] .login-card button[type="submit"] { background:#a0d5b4; border-color:#a0d5b4; color:#11291b; box-shadow:none; }
:root[data-theme="dark"] .care-shell .btn.primary:hover,
:root[data-theme="dark"] .login-card button[type="submit"]:hover { background:#b9e4c8; }
:root[data-theme="dark"] .care-shell .btn.secondary { background:var(--theme-surface); color:var(--theme-accent); border-color:#58705e; }
:root[data-theme="dark"] .care-shell .btn.quiet { color:var(--theme-accent); background:transparent; border-color:transparent; }
:root[data-theme="dark"] .care-shell :is(.btn.secondary,.btn.quiet):hover { background:var(--theme-raised); }
:root[data-theme="dark"] .care-capture-final > .quiet { background:var(--theme-surface) !important; }
:root[data-theme="dark"] :is(.care-spinner,.care-shell [aria-busy="true"]::after) { border-color:#a0d5b433; border-top-color:var(--theme-accent); }
:root[data-theme="dark"] .care-shell .primary[aria-busy="true"]::after { border-color:#11291b33; border-top-color:#11291b; }
:root[data-theme="dark"] .care-shell :is(.care-nav-link.active,.care-nav-link:hover,.care-avatar,.care-empty-icon,.care-chat-empty > span,.care-resume,.care-resume-icon,.care-selected,.care-patient-choice:hover,.care-reply-composer,.care-reply-quote,.finding-editor,.finding-source-body,.care-route-nurse.is-selected,.care-route-select:hover,.care-route-source-label,.care-route-map-tools .btn,.care-duty-pill.is-on,.care-schedule-tabs,.care-schedule-loading) { background:var(--theme-tint); color:var(--theme-accent); }
:root[data-theme="dark"] .care-shell :is(.care-message) { background:var(--theme-message); color:var(--theme-text); border-color:#476450; box-shadow:none; }
:root[data-theme="dark"] .care-message > strong { color:var(--theme-text); }
:root[data-theme="dark"] .care-message :is(.care-saved,.care-saved .icon) { color:#bad9b8; }
:root[data-theme="dark"] .care-reply-quote { background:var(--theme-raised); color:var(--theme-text); }
:root[data-theme="dark"] .care-attachment-anchor > .btn { background:var(--theme-tint) !important; color:var(--theme-accent) !important; }
:root[data-theme="dark"] .care-shell :is(.care-table-head,.care-schedule-filter,.care-schedule-section-title,.care-upcoming-day h3,.care-schedule-tabs button[aria-pressed="true"],.care-duty-pill,.care-route-map-caption,.care-route-map-loading,.care-route-day-loading) { background:var(--theme-raised); color:var(--theme-text); }
:root[data-theme="dark"] .care-shell :is(.care-upcoming-day h3 span,.care-upcoming-empty,.care-schedule-tabs button,.care-duty-popover,.care-route-map-caption span) { color:var(--theme-soft); }
:root[data-theme="dark"] .care-duty-health.shared { color:#b8ddb6; }
:root[data-theme="dark"] .care-shell :is(.care-duty-health.attention,.care-schedule-person .care-schedule-needs-review,.review-attention-count,.care-route-status-dot.stale) { color:var(--theme-warning); }
:root[data-theme="dark"] .care-shell :is(.review-attention,.care-recording,.care-recording-status,.care-upload-error) { color:var(--theme-warning); background:var(--theme-warning-bg); border-color:#75603a; }
:root[data-theme="dark"] .care-shell :is(.review-attention .btn,.care-recording-time,.care-recording strong,.care-recording small) { color:var(--theme-warning); }
:root[data-theme="dark"] .care-shell .care-error,
:root[data-theme="dark"] .login-error { color:var(--theme-error); background:var(--theme-error-bg); border-color:#805254; }
:root[data-theme="dark"] .care-shell .badge { background:var(--theme-raised); color:var(--theme-text); }
:root[data-theme="dark"] .care-shell :is(.badge.green,.badge.sage) { background:var(--theme-tint); color:#c0dfb6; }
:root[data-theme="dark"] .care-shell .badge.amber { background:var(--theme-warning-bg); color:var(--theme-warning); }
:root[data-theme="dark"] .care-shell .badge.blue { background:#223647; color:#aad0f0; }
:root[data-theme="dark"] .care-shell .badge.rose { background:var(--theme-error-bg); color:var(--theme-error); }
:root[data-theme="dark"] .finding-history { background:#223647; color:#aad0f0; }
:root[data-theme="dark"] .care-drop-overlay { background:#192620f5; color:var(--theme-accent); border-color:var(--theme-accent); }
:root[data-theme="dark"] :is(.toast,.care-route-popup .maplibregl-popup-content) { background:var(--theme-raised); color:var(--theme-text); border-color:var(--care-border); }
:root[data-theme="dark"] .care-route-popup .maplibregl-popup-close-button { color:var(--theme-text); }
:root[data-theme="dark"] .care-route-popup .maplibregl-popup-tip { border-top-color:var(--theme-raised); border-bottom-color:var(--theme-raised); }
:root[data-theme="dark"] .care-shell .care-route-nurse-meta .btn { color:var(--theme-accent); }
:root[data-theme="dark"] .login-card :is(h1,.brand,.password-toggle) { color:var(--theme-accent); }
:root[data-theme="dark"] .login-card .password-toggle:hover { background:var(--theme-tint); }
:root[data-theme="dark"] :is(.care-brand img,.brand img) { background:#edf3e7; border-radius:8px; padding:3px; }
/* These controls have explicit light-mode colors in the clinical review CSS. */
:root[data-theme="dark"] .care-shell .finding-edit-button,
:root[data-theme="dark"] .analysis-review .finding-source > summary { color:var(--theme-accent) !important; }
:root[data-theme="dark"] .analysis-review .finding-unavailable { color:var(--theme-soft) !important; }
:root[data-theme="dark"] .care-capture-final > .btn { background:var(--theme-tint) !important; color:var(--theme-accent) !important; border-color:var(--care-border) !important; }
:root[data-theme="dark"] .care-route-progress { background:var(--theme-surface); border-color:var(--care-border); }
:root[data-theme="dark"] .care-chat-date { color:var(--theme-soft); }
:root[data-theme="dark"] .care-chat-date::before,
:root[data-theme="dark"] .care-chat-date::after { background:var(--care-border); }
/* The custom voice scrubber owns its track; theme input fills must not paint a box. */
:root[data-theme="dark"] .care-shell .care-voice-track input[type=range] { background:transparent; border:0; box-shadow:none; }
