.theme-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;white-space:nowrap;padding:8px 13px;border:1px solid #bdcad8;border-radius:9px;background:#f3f6fa;color:#183047;font:14px Tahoma,sans-serif;cursor:pointer}.theme-toggle:focus-visible{outline:3px solid #5269b5;outline-offset:3px}.audit-groups{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0}.audit-groups a{display:block;padding:10px 15px;border:1px solid var(--border);border-radius:9px;background:white;text-decoration:none;color:var(--ink)}.audit-groups a.selected{background:#bd222b;border-color:#bd222b;color:white}
@media screen{
html[data-theme=dark]{color-scheme:dark;--bg:#111923;--ink:#e4edf7;--muted:#a7b7ca;--border:#344456;--red:#f0808a;background:#111923}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] :is(.office-header,body>header,.menu-card,.login-card,.search,.table-wrap,.profile-editor,.site-settings-panel,.annual-archives,.case-panel,.case-list-embed,.person-card,.operations-toolbar,.operations-summary>div,.status-counts>div,.status-counts>a,.admin-dropdown,.renewal-closed-notice,.panel,.rescue-app,dialog){background:#1b2735;border-color:var(--border);color:var(--ink)}
html[data-theme=dark] :is(a,summary){color:#ffadb4}html[data-theme=dark] :is(.brand,h1,h2,h3,label){color:var(--ink)}
html[data-theme=dark] :is(input,select,textarea){background:#121e2b;color:var(--ink);border-color:#4b6077}
html[data-theme=dark] :is(th,.sub-header,.vbox,.timer-box,.gps-row,.person-placeholder,.vital-card,.injury-embed,.document-pick,.document-card img,.case-document-images img){background:#243345;color:var(--ink);border-color:var(--border)}
html[data-theme=dark] :is(td,.case-list-embed footer,.injury-facts){border-color:var(--border)}
html[data-theme=dark] :is(.secondary,.quiet,.theme-toggle,.admin-menu>summary,.banner-controls,.banner-controls button,.case-category-tabs a,.audit-groups a,.gps-btn,.chip,.ms-btn,.send-btn,.clr-btn,.document-pick,.nearby-hospital){background:#243345;color:#e4edf7;border-color:#4b6077}
html[data-theme=dark] :is(.primary,.save-btn,.session-login){background:#b62b3c;color:white}
html[data-theme=dark] :is(.case-category-tabs a.selected,.audit-groups a.selected){background:#b62b3c;color:white;border-color:#d06370}
html[data-theme=dark] .menu-grid>.renewal-hero{background:linear-gradient(120deg,#2a2330,#322730);border-color:#86505a}
html[data-theme=dark] .renewal-hero-content{background:none;color:var(--ink)}
html[data-theme=dark] .menu-banner::after{background:linear-gradient(90deg,#111923f7,#111923df 38%,#11192350)}
html[data-theme=dark] .banner-welcome :is(h1,.welcome-name){color:#edf4ff}
html[data-theme=dark] .rescue-app{--color-background-primary:#1b2735;--color-background-secondary:#243345;--color-border-tertiary:#344456;--color-border-secondary:#4b6077;--color-text-primary:#e4edf7;--color-text-secondary:#a7b7ca}
html[data-theme=dark] :is(.chip.cat-sel,.chip.sub-sel,.chip.det-sel,.chip.unit-sel,.ms-btn.done,.send-btn.sel,.nearby-hospital.picked){background:#234c47;color:#e6fff2;border-color:#64b99b}
html[data-theme=dark] :is(.record-tags span,.person-status,.tracking-badge,.case-type-label){background:#293e53;color:#dceaff}
html[data-theme=dark] :is(.muted,.hint,.case-list-time,.case-list-destination,.record-coordinate,.vital-card>span,.vital-card small,.timeline-step p,.injury-facts dt,.patient-identity-grid dt,.menu-card p,.person-nickname){color:#a7b7ca}
html[data-theme=dark] :is(.success,.site-switch,.badge,.person-status.working){background:#193f32;color:#b3f1ce}
html[data-theme=dark] .error{background:#4b2632;color:#ffd1d6}
html[data-theme=dark] .admin-dropdown a:hover{background:#344052}
html[data-theme=dark] .record-actions a{background:#e3ecf6;color:#183047}
html[data-theme=dark] :is(.case-record-banner h1,.case-record-banner h2){color:white}
html[data-theme=dark] :is(.paper,.paper img){background:white;color:#183047;color-scheme:light}
html[data-theme=dark] #sessionExpiredDialog{background:#1b2735;color:#e4edf7;border-color:#4b6077}
}
@media screen{html[data-theme=dark] :is(.office-links,.preview){background:#243345;border-color:#344456;color:#e4edf7}html[data-theme=dark] .office-links a{color:#ffadb4}html[data-theme=dark] :is(.section-title,.year){background:#422936;color:#ffc3ca}html[data-theme=dark] :is(.field-error,.field-note){color:#c3d1e1}}
@media screen{html[data-theme=dark] :is(.number,.choice:has(input:checked),.mode-btn.active-ems){background:#422936;color:#ffc3ca;border-color:#86505a}}

@media screen{
  /* Match the form's more-specific focus rules, including training text fields. */
  html[data-theme=dark] :is(input,select,textarea):is(:focus,:focus-visible,:active),
  html[data-theme=dark] :is(.field,.training) :is(input,select,textarea):is(:focus,:focus-visible,:active){
    background:#121e2b;color:#e4edf7;caret-color:#e4edf7;border-color:#91a7df;
  }
  html[data-theme=dark] :is(input,textarea)::placeholder{color:#94a8bd;opacity:1}
  html[data-theme=dark] select option{background:#121e2b;color:#e4edf7}
  html[data-theme=dark] input:-webkit-autofill,
  html[data-theme=dark] input:-webkit-autofill:hover,
  html[data-theme=dark] input:-webkit-autofill:focus,
  html[data-theme=dark] textarea:-webkit-autofill,
  html[data-theme=dark] select:-webkit-autofill{
    -webkit-box-shadow:0 0 0 1000px #121e2b inset;
    -webkit-text-fill-color:#e4edf7;caret-color:#e4edf7;
  }
}
