:root{color-scheme:light;--theme-bg:#f3f6fb;--theme-card:#fff;--theme-text:#172033;--theme-muted:#667085;--theme-line:#dbe3ef;--theme-input:#fff;--theme-safe-top:env(safe-area-inset-top,0px);--theme-safe-right:env(safe-area-inset-right,0px);--theme-safe-bottom:env(safe-area-inset-bottom,0px);--theme-safe-left:env(safe-area-inset-left,0px)}
html[data-theme="dark"]{color-scheme:dark;--theme-bg:#101722;--theme-card:#192230;--theme-text:#edf3fb;--theme-muted:#b8c4d4;--theme-line:#3a4658;--theme-input:#111a27}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme="dark"] :is(.card,.panel,.modal-box,.modalBox,.modal-dialog,.modal-content,.dialog,.dialog-box,.shareBox,.shareHead,.shareBody,.shareActions,.action-sheet,.actionSheet,.confirm-dialog,.confirmDialog,.dynamic-form,.dynamicForm,.form,.form-container,.formContainer,.modalHead,.modalBody,.modalActions,.modal-head,.modal-body,.modal-actions,.footer-actions,.footerActions,.action-bar,.actionBar,.record,.case,.c,.item,.details,.detail,.attachment-interface,.binding-panel,.unlocated,.fieldMemoryList,.detector-select-box,.dropdown,.dropdown-menu,.menu,.list-item,.result,.search-result,.fullscreen-head,.fullscreen-tools,table,thead,tbody,tr,td,th,[role="dialog"]){background:var(--theme-card)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :is(.modal,.overlay,.modal-overlay,.dialog-overlay,.shareModal,.share-modal,.action-sheet-overlay,.backdrop,[data-overlay]){color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :is(input,textarea,select,.fieldMemoryOption,.detector-select-button,.detector-select-box button,.dropdown button,.dropdown-menu button,.secondary,.close,.map-tools button,button:not(.primary):not(.danger):not(.complete):not(.share-action)){background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :is(.unlocated-list span,.binding-list button,.binding-list span,.badge,.count-link,.message-filter span){background:#263449!important;color:#f8fafc!important;border-color:#64748b!important}
html[data-theme="dark"] :is(.search-marker,.marker){color:#fff!important}
html[data-theme="dark"] :is(option,optgroup){background:#111a27;color:#f8fafc}
html[data-theme="dark"] :is(h1,h2,h3,h4,strong,b,.label,.value,.meta,.badge,.location,.empty,.row,.record,.case,.c,.item,.result,.search-result){color:var(--theme-text)!important}
html[data-theme="dark"] :is(p,.note,.hint,.muted,.status,.mode-note,label,.field>span,.detail b,.row b){color:var(--theme-muted)!important}
html[data-theme="dark"] :is([role="dialog"],.modal,.overlay,.shareModal,.shareBox,.action-sheet,.confirm-dialog,.dynamic-form) :is(label,span,p,legend,.shareField,.sharePhoto,.shareStatus){color:var(--theme-text)!important}
html[data-theme="dark"] :is([role="dialog"],.modal,.overlay,.shareModal) :is(.secondary,.shareSecondary,.shareControl:not(.share-action)){background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :is([role="dialog"],.modal,.overlay,.shareModal) input[type="checkbox"]{accent-color:#22c55e;background:var(--theme-input);color-scheme:dark}
html[data-theme="dark"] ::placeholder{color:#94a3b8!important;opacity:1}
html[data-theme="dark"] :disabled,html[data-theme="dark"] [aria-disabled="true"]{opacity:.58!important}
html[data-theme="dark"] :is(a,.back,.accountLink){color:#93c5fd}
html[data-theme="dark"] .map-stage,html[data-theme="dark"] .map-image,html[data-theme="dark"] img{filter:none!important}
.theme-toggle{position:fixed;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:2147483000;border:1px solid var(--theme-line);border-radius:999px;padding:9px 12px;background:var(--theme-card);color:var(--theme-text);font:inherit;font-weight:700;box-shadow:0 4px 16px #0003;touch-action:none;user-select:none}.theme-toggle.theme-dragging{opacity:.88;box-shadow:0 7px 22px #0006}
