/* LWHub 7.5.1 — optional dark appearance. Light appearance stays byte-for-byte in app.css.
   Theme follows html[data-theme]; each authenticated user keeps their local selection. */
:root{color-scheme:light}
html[data-theme="dark"]{
 color-scheme:dark;
 --bg:#101725;--surface:#1b2638;--surface-2:#222f44;
 --ink:#ecf2fc;--muted:#b2c0d5;--line:#354359;
 --violet:#aa96ff;--violet-2:#a996ff;--cyan:#65d6dd;--blue:#88b2ff;
 --green:#57d4a8;--amber:#ffd087;--rose:#ff92ae;
 --nav:#0a1220;--nav-2:#101b2a;--danger:#ff94a7;
 --shadow:0 18px 48px rgba(0,0,0,.27);
 --shadow-soft:0 8px 24px rgba(0,0,0,.19);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .topbar{background:rgba(16,23,37,.95);border-bottom-color:var(--line)}
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#0b1320,#0d1728 60%,#0a111e)}
html[data-theme="dark"] :focus-visible{outline-color:rgba(170,150,255,.85)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{color-scheme:dark}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9cabc3;opacity:1}
html[data-theme="dark"] ::selection{background:#6159b0;color:#fff}
/* BEGIN generated contrast mappings: tools/build-dark-theme.py */
/* Generated color remapping from app.css. Edit generator, not this file. */
html[data-theme="dark"] .eyebrow{color:#9aa4b6}
html[data-theme="dark"] .logo-orbit i{background:#1b222d}
html[data-theme="dark"] .side-link>span{color:#9aa4b6}
html[data-theme="dark"] .scanner-health small{color:#9aa4b6}
html[data-theme="dark"] .account-chip{background:#1b222d}
html[data-theme="dark"] .floating-chip{color:#a5b4d5}
html[data-theme="dark"] .metric{background:#1b222d}
html[data-theme="dark"] .metric-icon.purple{background:#1f1358}
html[data-theme="dark"] .metric-icon.cyan{background:#184d53;color:#96dae3}
html[data-theme="dark"] .metric-icon.amber{background:#584213;color:#e6ca94}
html[data-theme="dark"] .metric-icon.green{background:#1d4e3a;color:#98e1ca}
html[data-theme="dark"] .metric small{color:#9aa4b6}
html[data-theme="dark"] .section-heading>p{color:#9aa4b6}
html[data-theme="dark"] .service-card{background:#1b222d}
html[data-theme="dark"] .service-card:hover{border-color:#374258}
html[data-theme="dark"] .service-symbol{background:color-mix(in srgb,var(--accent) 10%,#1f293c)}
html[data-theme="dark"] .service-badge.live{background:#1d4f3b;color:#9bdfc8}
html[data-theme="dark"] .service-badge.beta{background:#1c1358}
html[data-theme="dark"] .service-card p{color:#9aa4b6}
html[data-theme="dark"] .service-card>button b{background:#283343}
html[data-theme="dark"] .panel{background:#1b222d}
html[data-theme="dark"] .recent-item{border-top:1px solid #374258}
html[data-theme="dark"] .recent-item:hover{background:#182753}
html[data-theme="dark"] .recent-icon{background:#1d1358}
html[data-theme="dark"] .recent-main small{color:#9aa4b6}
html[data-theme="dark"] .tips-panel{background:linear-gradient(145deg,#261358,#133058)}
html[data-theme="dark"] .tips-panel p{color:#9aa4b6}
html[data-theme="dark"] .copy-demo{border:1px dashed #374258;background:#1b222d}
html[data-theme="dark"] .page-intro p{color:#9aa4b6}
html[data-theme="dark"] .btn-secondary{background:#1b222d;border-color:#374258;color:#b5bcc9}
html[data-theme="dark"] .btn-secondary:hover{border-color:#374258;background:#283643}
html[data-theme="dark"] .filter-chip{border:1px solid #374258;background:#1b222d;color:#9aa4b6}
html[data-theme="dark"] .search-row{background:#1b222d}
html[data-theme="dark"] .search-row:hover{border-color:#374258}
html[data-theme="dark"] .search-row-icon{background:#1c1358}
html[data-theme="dark"] .search-row-sub{color:#9aa4b6}
html[data-theme="dark"] .progress-track{background:#283343}
html[data-theme="dark"] .status-pill.done{background:#1f4c39;color:#9adfc8}
html[data-theme="dark"] .status-pill.running{background:#132e58;color:#9eb8db}
html[data-theme="dark"] .status-pill.queued{background:#282f43;color:#9aa4b6}
html[data-theme="dark"] .status-pill.failed{background:#58131c;color:#d6a3ab}
html[data-theme="dark"] .status-pill.cancelled{background:#212936;color:#9aa4b6}
html[data-theme="dark"] .empty-state{border:1px dashed #374258;color:#9aa4b6}
html[data-theme="dark"] .empty-state>b{color:#b5bcc9}
html[data-theme="dark"] .scanner-form label,html[data-theme="dark"] .modal-form label{color:#9aa4b6}
html[data-theme="dark"] .scanner-form input,html[data-theme="dark"] .modal-form input,html[data-theme="dark"] .modal-form select,html[data-theme="dark"] .atlas-toolbar input,html[data-theme="dark"] .atlas-toolbar select{border:1px solid #374258;background:#1b222d}
html[data-theme="dark"] .scanner-form input:focus,html[data-theme="dark"] .modal-form input:focus,html[data-theme="dark"] .modal-form select:focus,html[data-theme="dark"] .atlas-toolbar input:focus,html[data-theme="dark"] .atlas-toolbar select:focus{border-color:#374258}
html[data-theme="dark"] .scope-card{background:#282f43;border:1px solid #374258}
html[data-theme="dark"] .scope-card small{color:#9aa4b6}
html[data-theme="dark"] .scan-item{border-top:1px solid #374258}
html[data-theme="dark"] .scan-item p{color:#9aa4b6}
html[data-theme="dark"] th{background:#283643;border-bottom:1px solid #374258}
html[data-theme="dark"] td{border-bottom:1px solid #374258;color:#9aa4b6}
html[data-theme="dark"] tbody tr.clickable:hover{background:#182753}
html[data-theme="dark"] .table-service i{background:#1c1358}
html[data-theme="dark"] .table-service b{color:#a5b7d5}
html[data-theme="dark"] .atlas-count{color:#9aa4b6}
html[data-theme="dark"] .map-card{background:#1b222d}
html[data-theme="dark"] .map-hud button{border:1px solid #374258}
html[data-theme="dark"] .detail-card{background:#1b222d}
html[data-theme="dark"] .detail-head{border-bottom:1px solid #374258}
html[data-theme="dark"] .kv dt,html[data-theme="dark"] .kv dd{border-bottom:1px solid #374258}
html[data-theme="dark"] .kv dd{color:#b5bcc9}
html[data-theme="dark"] .raw-details{border:1px solid #374258}
html[data-theme="dark"] .raw-details pre{border-top:1px solid #374258;background:#283143}
html[data-theme="dark"] .admin-note{border:1px solid #374258;background:#201358}
html[data-theme="dark"] .admin-note p{color:#9aa4b6}
html[data-theme="dark"] .user-card{background:#1b222d}
html[data-theme="dark"] .role-badge.admin{background:#1f1358}
html[data-theme="dark"] .role-badge.user{background:#283643;color:#9aa4b6}
html[data-theme="dark"] .active-badge{background:#1e4d39;color:#9adfc9}
html[data-theme="dark"] .inactive-badge{background:#212936;color:#9aa4b6}
html[data-theme="dark"] .user-stats{border-top:1px solid #374258;border-bottom:1px solid #374258}
html[data-theme="dark"] .danger-link{color:#d6a4ad}
html[data-theme="dark"] .switch i{background:#283243}
html[data-theme="dark"] .switch i:after{background:#1b222d}
html[data-theme="dark"] .modal-dialog{background:#1b222d}
html[data-theme="dark"] .modal-close{background:#283343;color:#9aa4b6}
html[data-theme="dark"] .modal-close:hover{background:#283443;color:#a5b5d5}
html[data-theme="dark"] .modal-heading{border-bottom:1px solid #374258}
html[data-theme="dark"] .modal-symbol{background:#1c1358}
html[data-theme="dark"] .modal-heading p{color:#9aa4b6}
html[data-theme="dark"] .modal-actions{border-top:1px solid #374258}
html[data-theme="dark"] .checkrow{border:1px solid #374258;background:#283643}
html[data-theme="dark"] .level-picker-head label{color:#9aa4b6}
html[data-theme="dark"] .level-range::-webkit-slider-runnable-track{background:linear-gradient(90deg,#7657f7 0%,#7657f7 var(--range-progress,0%),#283243 var(--range-progress,0%),#283243 100%)}
html[data-theme="dark"] .level-range::-webkit-slider-thumb{background:#1b222d;border:5px solid #374258}
html[data-theme="dark"] .level-range::-moz-range-track{background:linear-gradient(90deg,#7657f7 0%,#7657f7 var(--range-progress,0%),#283243 var(--range-progress,0%),#283243 100%)}
html[data-theme="dark"] .level-range::-moz-range-thumb{background:#1b222d;border:5px solid #374258}
html[data-theme="dark"] .server-chip{background:#1c1358}
html[data-theme="dark"] .rule-chips span{background:#283143;color:#9aa4b6;border:1px solid #374258}
html[data-theme="dark"] .result-modal-head{border-bottom:1px solid #374258}
html[data-theme="dark"] .result-head-symbol{background:#1c1358}
html[data-theme="dark"] .result-modal-head p{color:#9aa4b6}
html[data-theme="dark"] .scan-animation{border:1px solid #374258}
html[data-theme="dark"] .scan-animation:before,html[data-theme="dark"] .scan-animation:after{border:1px solid #374258}
html[data-theme="dark"] .scan-animation span{border-top:2px solid #374258}
html[data-theme="dark"] .running-result p{color:#9aa4b6}
html[data-theme="dark"] .result-note{background:#272e44;color:#9aa4b6}
html[data-theme="dark"] .result-card{border:1px solid #374258;background:#1b222d}
html[data-theme="dark"] .result-card.urgent{border-color:#374258}
html[data-theme="dark"] .urgent-badge{background:#581321;color:#d9a1ac}
html[data-theme="dark"] .result-card-body{color:#9aa4b6}
html[data-theme="dark"] .result-card-body b{color:#a5b6d5}
html[data-theme="dark"] .tag{background:#1f1358}
html[data-theme="dark"] .shield-alert{color:#d6a3ad!important}
html[data-theme="dark"] .shield-state-active{color:#9dddcc!important}
html[data-theme="dark"] .shield-state-none{color:#dec99c!important}
html[data-theme="dark"] .available-now{color:#99e0cb}
html[data-theme="dark"] .coord-copy{border:1px solid #374258;background:#283143}
html[data-theme="dark"] .coord-copy:hover{background:#1c1358;border-color:#374258}
html[data-theme="dark"] .coord-copy>strong{color:#a5b8d5}
html[data-theme="dark"] .coord-copy.copied{background:#1f4c39;border-color:#374258}
html[data-theme="dark"] .coord-copy.copied>b{color:#9ae0c9}
html[data-theme="dark"] .result-section,html[data-theme="dark"] .shield-section{border:1px solid #374258}
html[data-theme="dark"] .result-section-head,html[data-theme="dark"] .shield-section-head{background:#283643;border-bottom:1px solid #374258}
html[data-theme="dark"] .result-section-head>b,html[data-theme="dark"] .shield-section-head>b{background:#283443}
html[data-theme="dark"] .shield-summary>div{border:1px solid #374258;background:#283643}
html[data-theme="dark"] .shield-summary span{color:#9aa4b6}
html[data-theme="dark"] .shield-summary .danger{border-color:#374258;background:#58131d}
html[data-theme="dark"] .shield-summary .open{border-color:#374258;background:#584313}
html[data-theme="dark"] .shield-summary .open b{color:#e3ca96}
html[data-theme="dark"] .shield-summary .safe{border-color:#374258;background:#1f4c3d}
html[data-theme="dark"] .shield-summary .safe b{color:#9bdfc8}
html[data-theme="dark"] .shield-section.soon{border-color:#374258}
html[data-theme="dark"] .shield-section-icon{background:#283443}
html[data-theme="dark"] .shield-section.soon .shield-section-icon{background:#581321;color:#d9a1ab}
html[data-theme="dark"] .shield-section.none .shield-section-icon{background:#584313;color:#e8cb91}
html[data-theme="dark"] .shield-section.active .shield-section-icon{background:#1f4c39;color:#9adfc9}
html[data-theme="dark"] .error-panel{border:1px solid #374258;background:#581321;color:#d5a4ae}
html[data-theme="dark"] .form-error{color:#d6a4ad}
html[data-theme="dark"] .auth-page{background:#283243}
html[data-theme="dark"] .auth-panel{background:#1b222d}
html[data-theme="dark"] .auth-lead{color:#9aa4b6}
html[data-theme="dark"] .auth-form label{color:#b5bcc9}
html[data-theme="dark"] .auth-form input{border:1px solid #374258}
html[data-theme="dark"] .auth-form input:focus{border-color:#374258}
html[data-theme="dark"] .password-field button{background:#283343;color:#9aa4b6}
html[data-theme="dark"] .password-note{border:1px solid #374258;background:#211358;color:#9aa4b6}
html[data-theme="dark"] .auth-footer{border-top:1px solid #374258}
html[data-theme="dark"] .language-switch{background:#1b222d}
html[data-theme="dark"] .language-switch button,html[data-theme="dark"] .language-switch a{color:#9aa4b6}
html[data-theme="dark"] .language-switch button:hover,html[data-theme="dark"] .language-switch a:hover{background:#283143}
html[data-theme="dark"] .language-switch .active{background:#1d1358}
html[data-theme="dark"] .language-badge{background:#1a2f51;color:#a5b9d5}
html[data-theme="dark"] .account-chip:hover{border-color:#374258}
html[data-theme="dark"] .profile-badge{background:#273144;color:#9aa4b6}
html[data-theme="dark"] .profile-context{border:1px solid #374258;background:linear-gradient(135deg,#1f1358,#132d58)}
html[data-theme="dark"] .profile-context-icon{background:#201358}
html[data-theme="dark"] .profile-context p{color:#9aa4b6}
html[data-theme="dark"] .profile-context small{color:#9aa4b6}
html[data-theme="dark"] .profile-context strong{color:#a5b5d5}
html[data-theme="dark"] .atlas-live-pill{border:1px solid #374258;background:#1b222d;color:#9aa4b6}
html[data-theme="dark"] .atlas-command{background:#1b222d}
html[data-theme="dark"] .atlas-field{color:#9aa4b6}
html[data-theme="dark"] .atlas-field input,html[data-theme="dark"] .atlas-field select{border:1px solid #374258;background:#1b2d50;color:#a5b7d5}
html[data-theme="dark"] .atlas-field input:focus,html[data-theme="dark"] .atlas-field select:focus{background:#1b222d;border-color:#374258}
html[data-theme="dark"] .atlas-summary article{border:1px solid #374258;background:linear-gradient(180deg,#1b222d,#182753)}
html[data-theme="dark"] .atlas-summary article>span{background:#1f1358}
html[data-theme="dark"] .atlas-summary article:nth-child(2)>span{background:#1e4d44}
html[data-theme="dark"] .atlas-summary article:nth-child(3)>span{background:#133658}
html[data-theme="dark"] .atlas-summary article:nth-child(4)>span{background:#581322}
html[data-theme="dark"] .atlas-summary article:nth-child(4).known{border-color:#374258;background:#58131d}
html[data-theme="dark"] .atlas-summary b{color:#a5b5d5}
html[data-theme="dark"] .atlas-summary small{color:#9aa4b6}
html[data-theme="dark"] .atlas-layer-row{border-top:1px solid #374258}
html[data-theme="dark"] .atlas-layer-row strong{color:#9aa4b6}
html[data-theme="dark"] .atlas-layer-chip{border:1px solid #374258;background:#1b222d;color:#9aa4b6}
html[data-theme="dark"] .atlas-layer-chip small{background:#283143;color:#9aa4b6}
html[data-theme="dark"] .atlas-layer-chip.active{border-color:color-mix(in srgb,var(--layer-color) 44%,#374258);background:color-mix(in srgb,var(--layer-color) 7%,#1b222d);color:#a5b8d5}
html[data-theme="dark"] .map-legend{color:#9aa4b6}
html[data-theme="dark"] .legend-dot.player{background:#1f1358}
html[data-theme="dark"] .legend-dot.event{background:#581322}
html[data-theme="dark"] .mud-legend>i{border:1px solid #374258}
html[data-theme="dark"] .user-search-history{border-top:1px solid #374258}
html[data-theme="dark"] .user-history-head>span{color:#9aa4b6}
html[data-theme="dark"] .user-history-item{border:1px solid #374258;background:#283643}
html[data-theme="dark"] .user-history-icon{background:#1f1358}
html[data-theme="dark"] .user-history-empty{border:1px dashed #374258}
html[data-theme="dark"] .user-history-empty.error{color:#d5a5ae;border-color:#374258;background:#58131d}
html[data-theme="dark"] .messenger-toggle{border:1px solid #374258;background:#283643}
html[data-theme="dark"] .messenger-badge{background:#1d4e3a!important;color:#9cddc9!important}
html[data-theme="dark"] .modal-form input[readonly]{background:#283343;color:#9aa4b6;border-color:#374258}
html[data-theme="dark"] .service-badge.watch-active{background:#1d4f3b;color:#9bdfc8}
html[data-theme="dark"] .service-badge.watch-inactive{background:#283143;color:#9aa4b6}
html[data-theme="dark"] .watch-card-meta{color:#9aa4b6}
html[data-theme="dark"] .watch-card-meta span{color:#b5bcc9}
html[data-theme="dark"] .watch-card-meta small.error{color:#d5a5ab}
html[data-theme="dark"] .treasure-watch-card>button.watch-stop{color:#d5a5ab}
html[data-theme="dark"] .treasure-watch-card>button.watch-stop b{background:#58131c;color:#d5a4ab}
html[data-theme="dark"] .service-card.placeholder-card:hover>button b{background:#283343}
html[data-theme="dark"] .watch-card-meta .watch-monitor-state.active{color:#9bdfc8}
html[data-theme="dark"] .watch-card-meta .watch-monitor-state.inactive{color:#9aa4b6}
html[data-theme="dark"] .recent-choice-chip{border:1px solid #374258;background:#272e44;color:#9aa4b6}
html[data-theme="dark"] .recent-choice-chip:hover{border-color:#374258;background:#1c1358}
html[data-theme="dark"] .app-version{color:#9aa4b6}
html[data-theme="dark"] .truck-owner-filter{border-top:1px solid #374258}
html[data-theme="dark"] .truck-owner-target>label{color:#9aa4b6}
html[data-theme="dark"] .repeat-last-button:disabled{background:#283143}
html[data-theme="dark"] .search-repeat-btn{border:1px solid #374258;background:#1f1358;color:#aba4d6}
html[data-theme="dark"] .search-repeat-btn:hover{background:#1f1358;border-color:#374258}
html[data-theme="dark"] .result-repeat-btn{border:1px solid #374258;background:#1f1358;color:#aba4d6}
html[data-theme="dark"] .result-repeat-btn:hover{background:#1f1358;border-color:#374258}
html[data-theme="dark"] .history-repeat-btn{border:1px solid #374258;background:#1f1358;color:#aba4d6}
html[data-theme="dark"] .history-repeat-btn:hover{background:#1f1358}
html[data-theme="dark"] .result-count-pill{border:1px solid #374258;background:#283143;color:#a5b6d5}
html[data-theme="dark"] .result-head-side .result-count-pill{border:1px solid #374258;background:#283143;color:#a5b6d5}
html[data-theme="dark"] .result-head-side .result-repeat-btn{border:1px solid #374258;background:#1f1358;color:#aba4d6}
html[data-theme="dark"] #historyTable .history-repeat-btn{border:1px solid #374258;background:#211358;color:#aba4d6}
html[data-theme="dark"] #historyTable .history-repeat-btn:hover{background:#201358;border-color:#374258}
html[data-theme="dark"] .service-setting-card{background:#1b222d}
html[data-theme="dark"] .service-setting-head{border-bottom:1px solid #374258}
html[data-theme="dark"] .service-setting-preview{background:#1c1358}
html[data-theme="dark"] .service-setting-identity b{color:#a5b7d5}
html[data-theme="dark"] .service-setting-grid label{color:#9aa4b6}
html[data-theme="dark"] .service-setting-grid input,html[data-theme="dark"] .service-setting-grid select,html[data-theme="dark"] .service-setting-grid textarea{border:1px solid #374258;background:#1b222d;color:#a5b5d5}
html[data-theme="dark"] .service-setting-grid input:focus,html[data-theme="dark"] .service-setting-grid select:focus,html[data-theme="dark"] .service-setting-grid textarea:focus{border-color:#374258}
html[data-theme="dark"] .profile-password-box{border:1px solid #374258;background:#283643}
html[data-theme="dark"] .profile-password-head>span{background:#1f1358}
html[data-theme="dark"] .profile-password-head b{color:#b5bcc9}
html[data-theme="dark"] .admin-observe-controls input,html[data-theme="dark"] .admin-observe-controls select,html[data-theme="dark"] .admin-discovery-edit select{background:#1b222d;border:1px solid #374258;color:#a5b5d5}
html[data-theme="dark"] .admin-observe-controls input:hover,html[data-theme="dark"] .admin-observe-controls select:hover,html[data-theme="dark"] .admin-discovery-edit select:hover{border-color:#374258;background:#132a58}
html[data-theme="dark"] .admin-observe-controls input:focus,html[data-theme="dark"] .admin-observe-controls select:focus,html[data-theme="dark"] .admin-discovery-edit select:focus{border-color:#374258;background:#1b222d}
html[data-theme="dark"] .admin-delivery-table td{color:#a5b4d5}
html[data-theme="dark"] .admin-delivery-owner{color:#a5b4d5}
html[data-theme="dark"] .admin-delivery-expand{color:#a5b5d5}
html[data-theme="dark"] .admin-delivery-server{color:#a5acd5}
html[data-theme="dark"] .admin-delivery-reward{color:#a5b5d5}
html[data-theme="dark"] .admin-delivery-coord{background:#1d1853;border:1px solid #374258;color:#aaa4d5}
html[data-theme="dark"] .admin-delivery-coord:hover{background:#201358}
html[data-theme="dark"] .admin-delivery-status.accepted{background:#1a5138;color:#9adfc7}
html[data-theme="dark"] .admin-delivery-status.failed,html[data-theme="dark"] .admin-delivery-status.config{background:#581313;color:#d7a2aa}
html[data-theme="dark"] .admin-delivery-status.deferred,html[data-theme="dark"] .admin-delivery-status.unconfirmed{background:#584213;color:#e7ca93}
html[data-theme="dark"] .admin-delivery-detail-row>td{background:#141457;border-bottom:1px solid #374258}
html[data-theme="dark"] .admin-delivery-detail{border-left:3px solid #374258}
html[data-theme="dark"] .admin-delivery-detail-heading{color:#a5b0d5}
html[data-theme="dark"] .admin-delivery-fact strong{color:#a5b7d5}
html[data-theme="dark"] .admin-delivery-note{color:#9aa4b6}
html[data-theme="dark"] .explorer-guide{border:1px solid #374258;background:linear-gradient(105deg,#131358 0%,#133e58 100%)}
html[data-theme="dark"] .explorer-guide-icon{background:#1a1358}
html[data-theme="dark"] .explorer-guide strong{color:#a5a6d5}
html[data-theme="dark"] .explorer-guide p{color:#9aa4b6}
html[data-theme="dark"] .explorer-readonly{background:#1b222d;border:1px solid #374258}
html[data-theme="dark"] .explorer-toolbar label,html[data-theme="dark"] .explorer-record-filters label,html[data-theme="dark"] .explorer-compare-label{color:#a5b7d5}
html[data-theme="dark"] .explorer-view input,html[data-theme="dark"] .explorer-view select{border:1px solid #374258;background:#1b222d;color:#a5b5d5}
html[data-theme="dark"] .explorer-view input:focus,html[data-theme="dark"] .explorer-view select:focus{border-color:#374258}
html[data-theme="dark"] .explorer-source-pill.is-partial{background:#583d13;color:#e0c699}
html[data-theme="dark"] .explorer-source-pill.is-full{background:#1c4f37;color:#9cddc8}
html[data-theme="dark"] .explorer-metric{background:#1b222d;border:1px solid #374258}
html[data-theme="dark"] .explorer-metric>span{background:#1c1358}
html[data-theme="dark"] .explorer-metric b{color:#a5b4d5}
html[data-theme="dark"] .explorer-type-row>span{color:#a5b6d5}
html[data-theme="dark"] .explorer-type-row>b{color:#a5b4d5}
html[data-theme="dark"] .explorer-type-row:after{background:#242c47}
html[data-theme="dark"] .explorer-object-count{color:#9aa4b6}
html[data-theme="dark"] .explorer-table th{background:#142a57;border-bottom:1px solid #374258}
html[data-theme="dark"] .explorer-table td{border-bottom:1px solid #374258;color:#9aa4b6}
html[data-theme="dark"] .explorer-table td:first-child>b{color:#a5b5d5}
html[data-theme="dark"] .explorer-coord{background:#1c1358}
html[data-theme="dark"] .explorer-pagination{color:#9aa4b6}
html[data-theme="dark"] .explorer-pagination button{background:#252a46;border:1px solid #374258}
html[data-theme="dark"] .explorer-history-item{border-bottom:1px solid #374258}
html[data-theme="dark"] .explorer-history-item b{color:#a5b4d5}
html[data-theme="dark"] .explorer-history-item button{background:#181358}
html[data-theme="dark"] .explorer-empty{border:1px dashed #374258}
html[data-theme="dark"] .explorer-inspector,html[data-theme="dark"] .explorer-logs{border:1px solid #374258;background:#182753}
html[data-theme="dark"] .explorer-inspector-head button{background:#152156;color:#a5acd5}
html[data-theme="dark"] .explorer-inspector-properties>span{background:#1b222d;border:1px solid #374258}
html[data-theme="dark"] .explorer-inspector-properties b{color:#a5b5d5}
html[data-theme="dark"] .explorer-inspector details summary{color:#a5b6d5}
html[data-theme="dark"] .explorer-log-list>div{border-bottom:1px solid #374258}
html[data-theme="dark"] .explorer-compare-metrics>div{background:#131d58;border:1px solid #374258}
html[data-theme="dark"] .explorer-compare-metrics strong{color:#a5b4d5}
html[data-theme="dark"] .explorer-compare-group>b{color:#a5b6d5}
html[data-theme="dark"] .explorer-compare-group>div{border-bottom:1px solid #374258}
html[data-theme="dark"] .explorer-compare-caution{background:#584313;color:#dac29f}
html[data-theme="dark"] .explorer-advanced{color:#9aa4b6}
html[data-theme="dark"] .explorer-danger{border:1px solid #374258;background:#582713}
html[data-theme="dark"] .explorer-danger p{color:#d5b7a5}
html[data-theme="dark"] .explorer-danger-actions button{background:#582a13;border-color:#374258;color:#d7b5a2}
html[data-theme="dark"] .explorer-profile-option{border:1px solid #374258;background:#1b222d;color:#a5b7d5}
html[data-theme="dark"] .scan-cancel-btn{border:1px solid #374258;background:#582813;color:#d6aea4}
html[data-theme="dark"] .scan-cancel-btn:hover{background:#582713;border-color:#374258}
html[data-theme="dark"] .scan-phase-note{color:#d5b7a5}
html[data-theme="dark"] #view-atlas .atlas-toolbar .atlas-field > input,html[data-theme="dark"] #view-atlas .atlas-toolbar .atlas-field > select{border:1px solid #374258;background:#1b222d}
html[data-theme="dark"] #view-atlas .atlas-toolbar .atlas-field > input:focus,html[data-theme="dark"] #view-atlas .atlas-toolbar .atlas-field > select:focus{border-color:#374258}
html[data-theme="dark"] .atlas-danger-button{border:1px solid #374258;background:#58131d;color:#d5a5ab}
html[data-theme="dark"] .atlas-danger-button:hover{background:#581321;border-color:#374258}
html[data-theme="dark"] .atlas-catalog-head p{color:#9aa4b6}
html[data-theme="dark"] .atlas-kind-card{background:#182753;border:1px solid #374258}
html[data-theme="dark"] .atlas-kind-head strong{color:#a5b5d5}
html[data-theme="dark"] .atlas-kind-head span{color:#9aa4b6;background:#223049}
html[data-theme="dark"] .atlas-kind-confirmed{color:#9adfc8}
html[data-theme="dark"] .atlas-kind-fields label{color:#9aa4b6}
html[data-theme="dark"] .atlas-kind-fields input,html[data-theme="dark"] .atlas-kind-fields select{border:1px solid #374258;background:#1f293c;color:#a5b6d5}
html[data-theme="dark"] .atlas-kind-fields input:focus,html[data-theme="dark"] .atlas-kind-fields select:focus{border-color:#374258}
html[data-theme="dark"] .atlas-kind-sample button{color:#aca3d6}
html[data-theme="dark"] .shiny-availability{color:#a5b5d5!important}
html[data-theme="dark"] #serviceModal .checkrow{color:#a5b5d5!important}
html[data-theme="dark"] .admin-discovery-hide{border:1px solid #374258;background:#58131b;color:#d5a5ad}
html[data-theme="dark"] .admin-discovery-hide:hover{background:#58131e;border-color:#374258}
html[data-theme="dark"] .result-modal-head .mp-inline{color:#9aa4b6}
html[data-theme="dark"] .result-modal-head .mp-inline i{background:#283243;color:#9aa4b6}
html[data-theme="dark"] .result-modal-head .mp-inline.mp-sent{color:#a3d6c3}
html[data-theme="dark"] .result-modal-head .mp-inline.mp-sent i{color:#a2d8c2;background:#204b34}
html[data-theme="dark"] .result-modal-head .mp-inline.mp-failed,html[data-theme="dark"] .result-modal-head .mp-inline.mp-uncertain{color:#d5b2a5}
html[data-theme="dark"] .result-modal-head .mp-inline.mp-failed i,html[data-theme="dark"] .result-modal-head .mp-inline.mp-uncertain i{color:#d7b4a3;background:#582f13}
html[data-theme="dark"] #view-users .users-directory-toolbar{background:#1b222d;border:1px solid #374258}
html[data-theme="dark"] #view-users .users-directory-summary{color:#9aa4b6}
html[data-theme="dark"] #view-users .users-directory-summary strong{color:#a5b5d5}
html[data-theme="dark"] #view-users .users-directory-summary-sep{background:#283243}
html[data-theme="dark"] #view-users .users-directory-search{background:#242d47;border:1px solid #374258}
html[data-theme="dark"] #view-users .users-directory-search:focus-within{border-color:#374258}
html[data-theme="dark"] #view-users .users-directory-search input{color:#a5b5d5}
html[data-theme="dark"] #view-users .user-directory-card{background:#1b222d;border:1px solid #374258}
html[data-theme="dark"] #view-users .user-directory-card:hover,html[data-theme="dark"] #view-users .user-directory-card:focus-within{border-color:#374258}
html[data-theme="dark"] #view-users .user-directory-card:has(.user-directory-open:focus-visible){border-color:#374258}
html[data-theme="dark"] #view-users .user-directory-card.is-inactive{background:#282843}
html[data-theme="dark"] #view-users .user-directory-avatar{background:#172d54;color:#a5b5d5}
html[data-theme="dark"] #view-users .user-directory-avatar.is-admin{background:#1d1358}
html[data-theme="dark"] #view-users .user-directory-identity h3{color:#a5b4d5}
html[data-theme="dark"] #view-users .user-directory-state{color:#d5a5af}
html[data-theme="dark"] #view-users .user-directory-state.is-active{color:#a5d5c4}
html[data-theme="dark"] #view-users .user-directory-details{border-top:1px solid #374258;border-bottom:1px solid #374258}
html[data-theme="dark"] #view-users .user-directory-details dd{color:#a5b7d5}
html[data-theme="dark"] #view-users .user-directory-activity{color:#9aa4b6}
html[data-theme="dark"] #view-users .user-directory-count strong{color:#a5b5d5}
html[data-theme="dark"] #view-users .user-directory-last strong{color:#a5b7d5}
html[data-theme="dark"] #view-users .user-directory-game{color:#9aa4b6}
html[data-theme="dark"] #view-users .user-directory-game.is-on{color:#a5d5c4}
html[data-theme="dark"] #view-users .user-directory-delete:hover{color:#d9a0ad}
html[data-theme="dark"] .notice-probe-inputs label,html[data-theme="dark"] .notice-probe-panel #noticeResolved label{color:#9aa4b6}
html[data-theme="dark"] .notice-probe-inputs input,html[data-theme="dark"] .notice-probe-panel #noticeResolved select{border:1px solid #374258;background:#1b222d;color:#a5b3d5}
html[data-theme="dark"] .notice-probe-result{background:#21324a;border:1px solid #374258}
html[data-theme="dark"] .notice-probe-warning{color:#9aa4b6}
html[data-theme="dark"] #serviceModal .shiny-schedule-info{border:1px solid var(--border,#374258);background:var(--surface-subtle,#21294a);color:var(--text-muted,#9aa4b6)}
html[data-theme="dark"] #serviceModal .shiny-schedule-overview strong{color:var(--text,#a5b6d5)}
html[data-theme="dark"] #serviceModal .shiny-schedule-details summary{color:var(--accent,#ada2d8)}
html[data-theme="dark"] #serviceModal .shiny-schedule-server{border:1px solid var(--border,#374258);background:var(--surface,#1b222d);color:var(--text,#a5b6d5)}
html[data-theme="dark"] .pool-monitor{border:1px solid #374258;background:#132158}
html[data-theme="dark"] .pool-monitor-head strong{color:#a5b4d5}
html[data-theme="dark"] .pool-monitor-head>span{color:#9aa4b6}
html[data-theme="dark"] .pool-bot{border:1px solid #374258;background:#1b222d}
html[data-theme="dark"] .pool-bot-live{border-color:#374258;background:#1f4c36}
html[data-theme="dark"] .pool-bot-off{background:#283143}
html[data-theme="dark"] .pool-bot-head b{color:#a5b5d5}
html[data-theme="dark"] .pool-bot-head span{color:#9aa4b6}
html[data-theme="dark"] .pool-monitor-note{color:#d8bda2!important}
html[data-theme="dark"] .user-history-item.user-history-open:hover{border-color:#374258;background:#241358}
html[data-theme="dark"] .directory-stat{background:#1b222d}
html[data-theme="dark"] .directory-controls input,html[data-theme="dark"] .directory-scan-controls input{background:#1b222d}
html[data-theme="dark"] .directory-row:hover,html[data-theme="dark"] .directory-row:focus-visible{background:#1c2f4f}
html[data-theme="dark"] .directory-kv>div{background:#232f49}
html[data-theme="dark"] .directory-member-list button{background:#1b222d}
html[data-theme="dark"] .directory-copy{background:#132a58;color:#9eb7db}
html[data-theme="dark"] .directory-copy:hover{background:#132b58}
html[data-theme="dark"] .directory-share{border:1px solid #374258;color:#a1b7d9;background:#1b222d}
html[data-theme="dark"] .directory-share:hover{background:#132b58}
html[data-theme="dark"] .directory-member-hq{color:#9aa4b6}
html[data-theme="dark"] #view-database .directory-searchbox>input{background:#1b222d}
html[data-theme="dark"] #view-database .directory-suggestions{background:#1b222d}
html[data-theme="dark"] #view-database .directory-suggest-item{background:#1b222d}
html[data-theme="dark"] #view-database .directory-suggest-item:hover,html[data-theme="dark"] #view-database .directory-suggest-item:focus-visible{background:#132a58}
html[data-theme="dark"] #view-database .directory-suggest-heading{background:#232f49}
html[data-theme="dark"] #view-database .directory-scan-panel{border:1px solid #374258;background:linear-gradient(110deg,#1b222d 40%,#132358 100%)}
html[data-theme="dark"] #view-database .directory-scan-symbol{background:#132358;color:#a5afd5}
html[data-theme="dark"] #view-database .directory-scan-kicker{color:#a5b0d5}
html[data-theme="dark"] #view-database .directory-scan-copy p{color:#9aa4b6}
html[data-theme="dark"] #view-database .directory-scan-actions>label{color:#9aa4b6}
html[data-theme="dark"] #view-database .directory-scan-server-field{border:1px solid #374258;background:#1b222d}
html[data-theme="dark"] #view-database .directory-scan-server-field:focus-within{border-color:#374258}
html[data-theme="dark"] #view-database .directory-scan-server-field input{color:#a5b5d5}
html[data-theme="dark"] #view-database .directory-scan-feedback{border:1px solid #374258;background:#132a58;color:#a5b6d5}
html[data-theme="dark"] #view-database .directory-scan-feedback[data-state=done]{background:#254636;border-color:#374258;color:#a5d5be}
html[data-theme="dark"] #view-database .directory-scan-feedback[data-state=error]{background:#581a13;border-color:#374258;color:#d5a5a6}
html[data-theme="dark"] #view-database .directory-scan-meter{background:#142a57}
html[data-theme="dark"] #view-database .directory-member-list .directory-member{background:#1b222d}
html[data-theme="dark"] #view-database .directory-member-list .directory-member:hover,html[data-theme="dark"] #view-database .directory-member-list .directory-member:focus-visible{border-color:#374258;background:#132a58}
html[data-theme="dark"] #view-database .directory-share{border:1px solid #374258;background:#132d58;color:#a5b9d5}
html[data-theme="dark"] #view-database .directory-share:hover,html[data-theme="dark"] #view-database .directory-share:focus-visible{background:#132d58;color:#99b6e0}
html[data-theme="dark"] #view-database .directory-scan-refresh{background:#1b222d}
html[data-theme="dark"] #view-database .directory-scan-refresh:hover{border-color:#374258}
html[data-theme="dark"] #view-database .directory-phase-card{background:#1e2b4d;border:1px solid #374258}
html[data-theme="dark"] #view-database .directory-phase-step{background:#142957;color:#a5b6d5}
html[data-theme="dark"] #view-database .directory-phase-badge{color:#a5b9d5}
html[data-theme="dark"] #view-database .directory-phase-line{color:#a5b7d5}
html[data-theme="dark"] #view-database .directory-phase-line b{color:#a5b6d5}
html[data-theme="dark"] #view-database .directory-phase-track{background:#20304b}
html[data-theme="dark"] .directory-scan-advisory{border:1px solid #374258;background:#21294a;color:#9aa4b6}
html[data-theme="dark"] .directory-scan-advisory>span:first-child{color:#a5afd5}
html[data-theme="dark"] .admin-bot-card{background:#132758}
html[data-theme="dark"] .admin-bot-state{color:#9aa4b6;background:#273144}
html[data-theme="dark"] .admin-bot-card[data-bot-state="active"] .admin-bot-state{background:#1d4e37;color:#9bdec4}
html[data-theme="dark"] .admin-bot-card[data-bot-state="unavailable"] .admin-bot-state{background:#442727;color:#d5a5af}
html[data-theme="dark"] .admin-bot-meter{background:#233048}
html[data-theme="dark"] .admin-bot-error{color:#d5a5ab}
html[data-theme="dark"] #view-database .directory-server-freshness{color:#a5b7d5}
html[data-theme="dark"] #view-database .directory-server-freshness[data-scanned=yes]{color:#a5d5c0}
html[data-theme="dark"] #view-database .directory-scan-advisory{color:#9aa4b6}
/* END generated contrast mappings */
/* Component-level corrections where default rules use var(--ink) as an action background. */
html[data-theme="dark"] .quick-search,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] #view-database .directory-scan-start,
html[data-theme="dark"] #directoryScanButton{background:#536cbb;color:#fff;border-color:transparent}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .quick-search:hover{background:#637ddb;color:#fff}
html[data-theme="dark"] .filter-chip.active{background:#6172a9;color:#fff;border-color:#6172a9}
html[data-theme="dark"] .account-chip,
html[data-theme="dark"] .language-switch,
html[data-theme="dark"] .theme-switch{background:#202c40;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .language-switch .active,
html[data-theme="dark"] .theme-switch .active{background:#393465;color:#e8e2ff}
html[data-theme="dark"] .language-switch button,
html[data-theme="dark"] .language-switch a,
html[data-theme="dark"] .theme-switch button{color:#adbcd3}
html[data-theme="dark"] .language-switch .active,
html[data-theme="dark"] .theme-switch .active{color:#e8e2ff}
html[data-theme="dark"] .theme-switch button:hover,
html[data-theme="dark"] .language-switch button:hover,
html[data-theme="dark"] .language-switch a:hover{background:#33435c;color:#fff}
html[data-theme="dark"] .theme-switch .active:hover{background:#454177}
html[data-theme="dark"] .hero-card{background:linear-gradient(120deg,#1b2440,#222e51 55%,#302d63);color:#fff}
html[data-theme="dark"] .hero-copy p{color:#c1cbe2}
html[data-theme="dark"] .floating-chip{background:rgba(36,48,74,.97);color:#eef2ff}
html[data-theme="dark"] .floating-chip span{color:#bbcae2}
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .user-card,
html[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] #view-database .directory-detail,
html[data-theme="dark"] #view-database .directory-panel,
html[data-theme="dark"] #view-database .directory-scan-panel{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .recent-item:hover,
html[data-theme="dark"] .directory-row:hover,
html[data-theme="dark"] .directory-member-list button:hover,
html[data-theme="dark"] #view-database .directory-suggest-item:hover,
html[data-theme="dark"] .search-row:hover{background:#2a3750}
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .directory-member-list button,
html[data-theme="dark"] #view-database .directory-member-list .directory-member{background:#253249;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .filter-chip.active{background:#6172a9;color:#fff}
html[data-theme="dark"] .tips-panel{background:linear-gradient(135deg,#29263d,#1c3044)}
html[data-theme="dark"] .copy-demo{background:#182338;border-color:#495573}
html[data-theme="dark"] .modal-backdrop{background:rgba(2,8,18,.77)}
html[data-theme="dark"] .result-modal-head{background:rgba(27,38,56,.97);border-color:var(--line)}
html[data-theme="dark"] .result-section-head,
html[data-theme="dark"] .shield-section-head,
html[data-theme="dark"] .directory-kv>div,
html[data-theme="dark"] .result-note,
html[data-theme="dark"] .checkrow,
html[data-theme="dark"] .scope-card{background:var(--surface-2);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .scanner-form input,
html[data-theme="dark"] .scanner-form select,
html[data-theme="dark"] .modal-form input,
html[data-theme="dark"] .modal-form select,
html[data-theme="dark"] .auth-form input,
html[data-theme="dark"] .explorer-view input,
html[data-theme="dark"] .explorer-view select,
html[data-theme="dark"] #view-database input,
html[data-theme="dark"] #view-database select{background:#172338;color:var(--ink);border-color:#42516a}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{border-color:#a997ff}
html[data-theme="dark"] .directory-suggestions,
html[data-theme="dark"] #view-database .directory-suggestions{background:#1b2638;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .directory-suggest-item,
html[data-theme="dark"] #view-database .directory-suggest-item{background:#1b2638;color:var(--ink)}
html[data-theme="dark"] .directory-suggest-section,
html[data-theme="dark"] #view-database .directory-suggest-section{background:#26364e;color:#c9d4e9}
html[data-theme="dark"] .directory-suggest-item:hover,
html[data-theme="dark"] #view-database .directory-suggest-item:hover{background:#34425c}
html[data-theme="dark"] .progress-track,
html[data-theme="dark"] #view-database .directory-progress-track{background:#34415c}
html[data-theme="dark"] .auth-page{background:#101725}
html[data-theme="dark"] .auth-panel{background:#1b2638}
html[data-theme="dark"] .auth-lead,
html[data-theme="dark"] .auth-footer{color:#b4c3d9}
html[data-theme="dark"] .auth-form input{background:#152033;color:var(--ink);border-color:#41506a}
html[data-theme="dark"] .password-note{background:#282544;border-color:#484071;color:#ddd9fa}
html[data-theme="dark"] .auth-visual{color:#fff}
html[data-theme="dark"] .status-pill.done,
html[data-theme="dark"] .active-badge,
html[data-theme="dark"] .service-badge.live{background:#193e37;color:#83eac3}
html[data-theme="dark"] .status-pill.running,
html[data-theme="dark"] .status-pill.queued{background:#253954;color:#b7d2ff}
html[data-theme="dark"] .status-pill.failed,
html[data-theme="dark"] .error-panel{background:#402633;color:#ffadbd;border-color:#734053}
html[data-theme="dark"] .status-pill.cancelled{background:#313848;color:#c5cfdf}
html[data-theme="dark"] .admin-note,
html[data-theme="dark"] .profile-context,
html[data-theme="dark"] .explorer-guide{background:linear-gradient(115deg,#282545,#223449);border-color:#45456e}
html[data-theme="dark"] .admin-note p,
html[data-theme="dark"] .profile-context p,
html[data-theme="dark"] .profile-context strong,
html[data-theme="dark"] .profile-context small{color:#c5cfe2}
html[data-theme="dark"] .coord-copy,
html[data-theme="dark"] .directory-coord,
html[data-theme="dark"] .directory-share{background:#263955;color:#a7cdff;border-color:#425c82}
html[data-theme="dark"] .directory-share:hover,
html[data-theme="dark"] .coord-copy:hover{background:#334867}
html[data-theme="dark"] .map-card,
html[data-theme="dark"] .detail-card{background:#1a2538;border-color:var(--line)}
html[data-theme="dark"] .map-hud button{background:#29384e;border-color:var(--line);color:#ebf2fd}
html[data-theme="dark"] table{color:var(--ink)}
html[data-theme="dark"] th{background:#253249;color:#b9c7da}
html[data-theme="dark"] td{border-color:var(--line)}
html[data-theme="dark"] tbody tr.clickable:hover{background:#2b3950}
html[data-theme="dark"] .admin-delivery-detail-row>td{background:#242d46}
html[data-theme="dark"] .result-section,
html[data-theme="dark"] .shield-section{border-color:var(--line)}
html[data-theme="dark"] .result-section-head>b,
html[data-theme="dark"] .shield-section-head>b{background:#36455e;color:#e3edff}
html[data-theme="dark"] .directory-scan-panel .directory-scan-feedback[data-state="done"],
html[data-theme="dark"] #view-database .directory-scan-feedback[data-state="done"]{background:#1c3b34;border-color:#315c4c;color:#96e5be}
html[data-theme="dark"] #view-database .directory-scan-feedback[data-state="error"]{background:#3e2630;border-color:#714451;color:#ffb0c0}
html[data-theme="dark"] .admin-bot-card{border-color:var(--line)}
html[data-theme="dark"] .admin-bot-card[data-bot-state="active"] .admin-bot-state{background:#1c4438;color:#92e6c2}
html[data-theme="dark"] *{scrollbar-color:#465670 #1b2638}

/* Shared light/dark choice: compact, readable, keyboard and touch friendly. */
.theme-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:11px;background:#fff;flex:0 0 auto;box-shadow:0 4px 12px rgba(26,39,64,.035)}
.theme-switch button{appearance:none;border:0;background:transparent;color:#76849a;min-width:33px;height:30px;padding:0 7px;border-radius:8px;display:grid;place-items:center;font-size:18px;line-height:1;cursor:pointer;transition:background-color .15s,color .15s}
.theme-switch button:hover{background:#f2f4f8;color:var(--ink)}
.theme-switch button.active{background:#ece9ff;color:#6549e8;box-shadow:inset 0 0 0 1px rgba(113,87,246,.10)}
.theme-switch button:focus-visible{outline:2px solid #907dff;outline-offset:2px}
.theme-switch-auth{position:absolute;right:126px;top:28px;z-index:3}
@media(max-width:900px){.theme-switch-auth{top:20px;right:114px}}
@media(max-width:620px){.theme-switch{padding:2px}.theme-switch button{min-width:30px;height:30px;font-size:17px}.theme-switch-auth{top:16px;right:111px}.topbar-actions{gap:5px}}
@media(max-width:380px){.topbar-actions{gap:4px}.theme-switch button{min-width:28px;padding:0 5px}}
@media(prefers-reduced-motion:reduce){.theme-switch button{transition:none}}

/* v7.5.1 — empty states were light translucent white over dark cards,
   producing a pale grey panel with grey-on-grey content. */
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .empty-state.compact,
html[data-theme="dark"] .admin-discoveries-list .empty-state,
html[data-theme="dark"] .result-modal-body .empty-state {
  background:#202d42;
  border:1px dashed #455571;
  color:#d2dcec;
}
html[data-theme="dark"] .empty-state>b,
html[data-theme="dark"] .empty-state strong {color:#f0f4fc}
html[data-theme="dark"] .empty-state>span,
html[data-theme="dark"] .empty-state>small,
html[data-theme="dark"] .empty-state p {color:#b9c8dd}
/* Emoji selectors intentionally do not rely on private-glyph fonts. */
.theme-switch button span{font-family:system-ui,'Apple Color Emoji','Segoe UI Emoji',sans-serif;font-size:18px;line-height:1}

/* v7.5.2: neutral server input, accessible switches, admin SQLite explorer */
html[data-theme="dark"] #view-database .directory-scan-server-field{background:#121b29;border-color:#566683;box-shadow:none}
html[data-theme="dark"] #view-database .directory-scan-server-field:focus-within{border-color:#8c9cf6;box-shadow:0 0 0 3px rgba(130,147,245,.23)}
html[data-theme="dark"] #view-database .directory-scan-server-field input{background:transparent;color:#f1f5ff}
html[data-theme="dark"] #view-database .directory-scan-server-field>span{color:#a9b8d0}
html[data-theme="dark"] .switch{width:45px;height:26px;flex:none}
html[data-theme="dark"] .switch i{background:#39485e;border:1px solid #677894;box-shadow:inset 0 1px 3px rgba(0,0,0,.35)}
html[data-theme="dark"] .switch i:after{width:19px;height:19px;left:3px;top:2px;background:#f6f8ff;box-shadow:0 1px 5px rgba(0,0,0,.35)}
html[data-theme="dark"] .switch input:checked+i{background:#7567f9;border-color:#a69aff;box-shadow:0 0 0 2px rgba(118,103,249,.13)}
html[data-theme="dark"] .switch input:checked+i:after{transform:translateX(18px)}
html[data-theme="dark"] .switch input:focus-visible+i{outline:2px solid #a4b7ff;outline-offset:3px}
html[data-theme="dark"] .theme-switch{background:#101827;border:1px solid #60718f;box-shadow:0 0 0 1px rgba(155,170,200,.15)}
html[data-theme="dark"] .theme-switch button{min-width:38px;filter:grayscale(.65);opacity:.72}
html[data-theme="dark"] .theme-switch button.active{background:#5754a5;color:#fff;border:1px solid #a79cff;filter:none;opacity:1;box-shadow:0 1px 7px rgba(135,120,250,.42)}
html[data-theme="dark"] #view-database .directory-share{background:#1b304e;border-color:#6980a3}
html[data-theme="dark"] .db-admin-lookup input,
html[data-theme="dark"] .db-admin-controls select,
html[data-theme="dark"] .db-admin-controls input{background:#121b29;color:#edf3ff;border-color:#52617d}
html[data-theme="dark"] .db-admin-table-item:hover,
html[data-theme="dark"] .db-admin-table-item:focus-visible{background:#2b3b56}
html[data-theme="dark"] .db-admin-table-item.selected{background:#353c78;border-color:#716fbf;color:#f0eaff}
html[data-theme="dark"] .db-admin-readonly{background:#1d413c;color:#a9e6d0}
html[data-theme="dark"] .db-admin-grid{background:#151e2d;border-color:#455672}
html[data-theme="dark"] .db-admin-data-table th{background:#28344c;color:#edf2ff}
html[data-theme="dark"] .db-admin-data-table td{color:#e8edfa}
html[data-theme="dark"] .db-admin-data-table tr:nth-child(even) td{background:#1b293d}
html[data-theme="dark"] .db-admin-data-table tr:hover td{background:#31425d}
html[data-theme="dark"] .db-admin-data-table .db-admin-null,
html[data-theme="dark"] .db-admin-data-table .db-admin-masked{color:#9daecc}
