:root { color-scheme: dark; }
:root[data-theme="light"] {
    color-scheme: light;
    --bg-base: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255,255,255,.94);
    --bg-card: #ffffff;
    --border-color: #d4dde8;
    --border-glow: rgba(109,40,217,.15);
    --text-primary: #172033;
    --text-secondary: #475569;
    --text-muted: #526277;
    --text-inverse: #ffffff;
    --accent-purple: #6d28d9;
    --accent-cyan: #007b96;
    --accent-green: #087f52;
    --accent-amber: #966000;
    --accent-red: #c81e4b;
    --shadow-main: 0 12px 35px rgba(30,50,80,.1);
    --shadow-glow: 0 0 16px rgba(109,40,217,.12);
}
.site-logo { display:block; width:64px; height:64px; object-fit:contain; border-radius:14px; flex-shrink:0; background:#030b14; }
.login .site-logo { width:112px; height:112px; margin:0 auto 22px; border-radius:22px; }
.theme-control { display:flex; align-items:center; position:relative; }
.header-account-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.account-menu { position:relative; }
.account-toggle { list-style:none; cursor:pointer; }
.account-toggle::-webkit-details-marker { display:none; }
.account-menu[open] .account-toggle { color:var(--accent-purple); border-color:var(--accent-purple); }
.account-dropdown { position:absolute; top:calc(100% + 10px); left:0; width:230px; max-width:85vw; display:grid; gap:10px; padding:18px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:12px; box-shadow:var(--shadow-main); z-index:300; }
.account-dropdown strong { overflow-wrap:anywhere; }
.account-dropdown > span { color:var(--text-muted); font-size:.85rem; }
.account-dropdown a { text-decoration:none; display:flex; align-items:center; gap:8px; }
#theme-toggle { white-space:nowrap; min-height:38px; font:inherit; }
#theme-status { position:absolute; top:calc(100% + 8px); left:0; min-width:180px; font-size:.8rem; background:var(--bg-surface); color:var(--text-primary); border-radius:8px; z-index:200; }
#theme-status:not(:empty) { padding:8px; box-shadow:var(--shadow-main); }
[data-theme="light"] body, [data-theme="light"] .sa-topbar { background:var(--bg-base); }
[data-theme="light"] .card-design-modal, [data-theme="light"] .card-design-preview-panel,
[data-theme="light"] .dropdown-menu, [data-theme="light"] .modal-content { background:var(--bg-card); color:var(--text-primary); }
[data-theme="light"] .main-header, [data-theme="light"] .sidebar { background:var(--bg-surface); }
[data-theme="light"] .main-content { background:linear-gradient(135deg,#f8fafc,#eaf0f8); }
[data-theme="light"] .statement-card { background:var(--bg-card); }
[data-theme="light"] #vouchers-bulk-actions-bar { background:var(--bg-card); }
[data-theme="light"] .script-output-wrapper { background:#eef2f7; }
.main-header { gap:12px; height:auto; min-height:80px; padding-top:12px; padding-bottom:12px; flex-shrink:0; }
#sidebar-toggle { flex-shrink:0; }
.sidebar-hidden .sidebar { display:none !important; }
.sidebar-hidden .main-content { margin-right:0 !important; width:100% !important; min-width:0; }
.header-right { flex-wrap:wrap; justify-content:flex-end; gap:10px; }
[data-theme="light"] .primary-btn, [data-theme="light"] .primary-btn * { color:#ffffff; }
[data-theme="light"] .data-table th { background:#e9eef6; color:#334155; }
[data-theme="light"] .data-table tr:hover { background:#eef3fa; }
[data-theme="light"] input:not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]),
[data-theme="light"] select, [data-theme="light"] textarea { background-color:var(--bg-card) !important; color:var(--text-primary) !important; border-color:var(--border-color) !important; }
[data-theme="light"] .sa-notice { color:#155e75; }
[data-theme="light"] .modal-overlay { background:rgba(30,41,59,.45); }
[data-theme="light"] .super-stat-icon { color:var(--accent-purple); }
[data-theme="light"] :focus-visible { outline:2px solid #6d28d9; outline-offset:3px; }
@media(max-width:768px) { .site-logo { width:48px; height:48px; } #theme-toggle { font-size:.8rem; padding:8px; } .header-right { flex-wrap:wrap; } }
