html[data-theme="dark"] { color-scheme: dark; background: #101010; color: #e6e6e6; }
html[data-theme="dark"] body { background: #101010 !important; color: #e6e6e6 !important; }
.theme-toggle { display:flex; align-items:center; gap:12px; width:100%; min-height:43px; margin:5px 0 0; padding:10px 12px; border:0; border-radius:10px; background:transparent; color:#64758d; font:600 12px Manrope,system-ui,sans-serif; text-align:left; cursor:pointer; }
.theme-toggle:hover { background:#f5f7fb; color:#354966; }
.theme-toggle:focus-visible { outline:2px solid #7399e3; outline-offset:2px; }
.theme-toggle svg { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle-label { flex:1; white-space:nowrap; }
.theme-toggle-track { width:28px; height:16px; padding:2px; flex:none; border-radius:20px; background:#c0c8d3; }
.theme-toggle-thumb { display:block; width:12px; height:12px; border-radius:50%; background:#fff; transition:transform .15s ease; }
.theme-toggle[aria-checked="true"] .theme-toggle-track { background:#6388ce; }
.theme-toggle[aria-checked="true"] .theme-toggle-thumb { transform:translateX(12px); }
html[data-theme="dark"] .sidebar.modern-sidebar { background:#171717 !important; color:#e6e6e6 !important; border-color:#303030 !important; box-shadow:none !important; }
html[data-theme="dark"] .modern-nav a,html[data-theme="dark"] .theme-toggle { color:#b5b5b5 !important; }
html[data-theme="dark"] .modern-nav a:hover,html[data-theme="dark"] .theme-toggle:hover { background:#242424 !important; color:#f2f2f2 !important; }
html[data-theme="dark"] .modern-nav a.active { background:#2b2b2b !important; color:#a9c5ff !important; box-shadow:none !important; }
html[data-theme="dark"] .modern-nav-label,html[data-theme="dark"] .modern-brand small,html[data-theme="dark"] .modern-user small { color:#a3a3a3 !important; }
html[data-theme="dark"] .modern-user { border-color:#303030 !important; }
html[data-theme="dark"] .modern-brand-mark,html[data-theme="dark"] .logo-mark { background:#fff url('/images/affbear.png?v=2') center/contain no-repeat !important; box-shadow:none !important; transform:none !important; }
html[data-theme="dark"] .sheet-mode .sheet-status-select {
    background-color:var(--sheet-status-background,#303030) !important;
    color:var(--sheet-status-color,#d5d5d5) !important;
    border-color:color-mix(in srgb,var(--sheet-status-color,#aaa) 35%,transparent) !important;
}
html[data-theme="dark"] .sheet-mode .sheet-profile-id {
    background:var(--sheet-row-status-background,#303030) !important;
    color:var(--sheet-row-status-color,#d5d5d5) !important;
    border-color:color-mix(in srgb,var(--sheet-row-status-color,#aaa) 35%,transparent) !important;
}
html[data-theme="dark"] .sheet-mode .sheet-status-select option { background:#242424; color:#e6e6e6; }
html[data-theme="dark"] .sheet-mode .sheet-row-active .sheet-profile-id { outline:2px solid #d1b45e; outline-offset:1px; }
html[data-theme="dark"] .sheet-mode tr.sheet-row-selected.sheet-row-selected > :is(td,.sheet-selection-column,.sheet-sticky-column) {
    background:#29445e !important;
    border-bottom-color:#557a9d !important;
}
html[data-theme="dark"] .sheet-mode .sheet-selection-column input[type="checkbox"] { accent-color:#91c5ff !important; }
html[data-theme="dark"] :focus-visible { outline-color:#91b7ff; }
html[data-theme="dark"] ::selection { background:#35588c; color:#fff; }
html[data-theme="dark"] * { scrollbar-color:#555 #1b1b1b; }
html[data-theme="dark"] input,html[data-theme="dark"] textarea { caret-color:#a9c5ff; }
@media(max-width:1000px) { .theme-toggle { justify-content:center; padding:10px; } .theme-toggle-label,.theme-toggle-track { display:none; } }
@media(prefers-reduced-motion:reduce) { .theme-toggle-thumb { transition:none; } }
