.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:0 9px;border:1px solid #e4e9e7;border-radius:7px;background:var(--surface,#fff);color:var(--ink,#26332f);font-size:10px;font-weight:650;white-space:nowrap;cursor:pointer}
.theme-toggle:hover{border-color:#bdd4c9;background:#f5faf7}
.theme-icon{font-size:15px;line-height:1}
.access-theme-toggle{display:none;position:fixed;top:13px;right:14px;z-index:70;box-shadow:0 2px 10px #13262215}
.access-locked .access-theme-toggle{display:inline-flex}
@media(max-width:680px){.topbar-actions{gap:6px}.theme-toggle{min-height:30px;padding:0 7px}.theme-toggle .theme-label{display:none}.access-theme-toggle .theme-label{display:inline}}

:root[data-theme="dark"]{color-scheme:dark;--bg:#111816;--surface:#19221f;--ink:#e8efeb;--muted:#a4b1ab;--line:#2b3732;--accent:#54b58f;--accent-dark:#3c9874;--accent-soft:#20372f;--shadow:0 8px 30px rgba(0,0,0,.28)}
:root[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .metric-card,:root[data-theme="dark"] .settings-panel,:root[data-theme="dark"] .settings-card,:root[data-theme="dark"] .company-setting-card,:root[data-theme="dark"] .modal,:root[data-theme="dark"] .modal-head,:root[data-theme="dark"] .modal-footer,:root[data-theme="dark"] .company-switch-choice,:root[data-theme="dark"] .company-autofill,:root[data-theme="dark"] .permission-scope,:root[data-theme="dark"] .module-toggle,:root[data-theme="dark"] .backup-location{background:#19221f;color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] .topbar{background:rgba(25,34,31,.94)}
:root[data-theme="dark"] .nav-item{color:#adbbb4}
:root[data-theme="dark"] .nav-item:hover,:root[data-theme="dark"] .company-switch-choice:hover{background:#222e29;color:#eef5f1}
:root[data-theme="dark"] .nav-item.active{background:#203a30;color:#83d0ac}
:root[data-theme="dark"] .workspace-switcher,:root[data-theme="dark"] .help-card,:root[data-theme="dark"] .detail-stat,:root[data-theme="dark"] .empty-row,:root[data-theme="dark"] .inline-note{background:#202a26;border-color:#2c3933;color:#c1cdc6}
:root[data-theme="dark"] .page-heading h1,:root[data-theme="dark"] .panel-title,:root[data-theme="dark"] .modal-head h2,:root[data-theme="dark"] .metric-value,:root[data-theme="dark"] .company-title-line,:root[data-theme="dark"] .settings-panel h2,:root[data-theme="dark"] .settings-section-heading h2,:root[data-theme="dark"] .company-card-copy strong,:root[data-theme="dark"] .breadcrumbs strong,:root[data-theme="dark"] .profile-row strong{color:#e7efea}
:root[data-theme="dark"] .page-heading p,:root[data-theme="dark"] .panel-subtitle,:root[data-theme="dark"] .metric-foot,:root[data-theme="dark"] .help-card p,:root[data-theme="dark"] .settings-section-heading p,:root[data-theme="dark"] .company-card-copy span,:root[data-theme="dark"] .company-card-copy small,:root[data-theme="dark"] .table-secondary,:root[data-theme="dark"] .breadcrumbs{color:#a5b2ab}
:root[data-theme="dark"] .data-table th,:root[data-theme="dark"] .line-table th{background:#202a26;color:#a7b4ad}
:root[data-theme="dark"] .data-table td,:root[data-theme="dark"] .line-table td,:root[data-theme="dark"] .timeline-item,:root[data-theme="dark"] .detail-heading,:root[data-theme="dark"] .backup-history-row{border-color:#2b3732}
:root[data-theme="dark"] .data-table tbody tr:hover{background:#202b26}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea,:root[data-theme="dark"] .global-search,:root[data-theme="dark"] .line-table input,:root[data-theme="dark"] .line-table select,:root[data-theme="dark"] .filter-select,:root[data-theme="dark"] .toolbar input{background:#111916;color:#e5eee9;border-color:#35433c}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#819087}
:root[data-theme="dark"] .global-search kbd,:root[data-theme="dark"] .close-button,:root[data-theme="dark"] .icon-button:hover{background:#27332d;color:#c9d5ce;border-color:#35433c}
:root[data-theme="dark"] .nav-count,:root[data-theme="dark"] .line-items-wrap,:root[data-theme="dark"] .permission-details{background:#202a26;border-color:#35433c}
:root[data-theme="dark"] .theme-toggle{background:#202a26;color:#e5eee9;border-color:#3a4941}
:root[data-theme="dark"] #accessRoot{background:radial-gradient(ellipse at 50% 0,#1e342b 0,#111816 62%,#111816 100%)}
:root[data-theme="dark"] .access-card{background:#19221f;border-color:#2e3b35;box-shadow:0 15px 50px rgba(0,0,0,.32)}
:root[data-theme="dark"] .access-brand>strong,:root[data-theme="dark"] .access-card h1,:root[data-theme="dark"] .auth-admin-block h3{color:#e7efea}
:root[data-theme="dark"] .access-card form>label,:root[data-theme="dark"] .auth-admin-block>label,:root[data-theme="dark"] .access-intro{color:#b1bdb6}
:root[data-theme="dark"] .auth-admin-block{background:#202a26;border-color:#35433c}
:root[data-theme="dark"] .access-card input,:root[data-theme="dark"] .access-card textarea{background:#111916;color:#e5eee9;border-color:#35433c}
:root[data-theme="dark"] .print-document{background:#fff;color:#17242b}
@media print{:root[data-theme="dark"]{color-scheme:light}:root[data-theme="dark"] body{background:#fff;color:#17242b}}
