/* Shared semantic palette. Light-mode component fallbacks retain their original colors. */
:root{color-scheme:light;--surface:var(--panel);--surface-secondary:#f0f3f7;--text-muted:var(--muted);--border:var(--line);--brand:var(--accent);--success:var(--green);--warning:var(--orange);--danger:var(--red);--on-brand:#fff}
:root[data-theme="dark"]{
 color-scheme:dark;--bg:#101722;--panel:#192331;--text:#e9eef6;--muted:#a5b2c5;--line:#354356;--sidebar:#0c1016;--accent:#4e78ff;--green:#65d6a7;--red:#ff929f;--orange:#edbf78;--shadow:0 10px 30px #0003;
 --surface-secondary:#222f40;--card:var(--panel);--chart-grid:#35455b;--chart-label:#abb9cc;
 --theme-surface:var(--panel);--theme-surface-secondary:var(--surface-secondary);--theme-text:var(--text);--theme-muted:var(--muted);--theme-border:var(--line);
 --theme-text-brand:#a5bbff;--theme-text-success:#79dbb1;--theme-text-warning:#f0c785;--theme-text-danger:#ffa3ad;--theme-text-cyan:#82d6e2;--theme-text-purple:#c9b2f1;
 --theme-surface-brand:#223456;--theme-surface-success:#193d33;--theme-surface-warning:#423621;--theme-surface-danger:#452933;--theme-surface-cyan:#183b43;--theme-surface-purple:#352c4b;
 --theme-border-brand:#47618a;--theme-border-success:#376956;--theme-border-warning:#78613a;--theme-border-danger:#83515c;--theme-border-cyan:#356772;--theme-border-purple:#63507f;
 --theme-chart-grid:var(--chart-grid);--theme-chart-label:var(--chart-label)
}
html[data-theme="dark"]{background:var(--bg)}
[data-theme="dark"] .login-body{background:radial-gradient(circle at 20% 10%,#1a2947,transparent 35%),var(--bg)}
[data-theme="dark"] :where(input,textarea,select){background:var(--surface-secondary);color:var(--text);border-color:var(--line);accent-color:var(--accent)}
[data-theme="dark"] :where(input,textarea)::placeholder{color:var(--muted);opacity:1}
[data-theme="dark"] :where(button){color:inherit}
[data-theme="dark"] :where(dialog){background:var(--panel);color:var(--text);border-color:var(--line)}
[data-theme="dark"] :where(input,textarea,select,button):focus-visible{outline:2px solid #8da9ff;outline-offset:2px}
[data-theme="dark"] :where(input,textarea,select,button):disabled{color:var(--muted);cursor:not-allowed}
[data-theme="dark"] .profile-save{color:var(--on-brand)}
[data-theme="dark"] ::selection{background:#375696;color:#fff}
.theme-switch{display:flex;gap:4px;padding:4px;border:1px solid #344153;border-radius:10px;background:#111822;align-self:stretch}
.theme-switch button{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;min-width:0;border:0;border-radius:7px;padding:7px 4px;background:transparent;color:#bac6d8;font:inherit;font-size:12px;cursor:pointer}
.theme-switch button[aria-pressed="true"]{background:#293b61;color:#fff}
.theme-switch button:hover{background:#24334c}
.theme-switch button:focus-visible{outline:2px solid #8da9ff;outline-offset:2px}
.login-card>.theme-switch{width:max-content;margin:0 0 20px auto;background:var(--surface-secondary);border-color:var(--line)}
.login-card>.theme-switch button{padding:7px 10px;color:var(--text)}
.login-card>.theme-switch button[aria-pressed="true"]{background:#293b61;color:#fff}
.login-card>.theme-switch button:hover{background:var(--line)}
.login-card>.theme-switch button[aria-pressed="true"]:hover{background:#293b61}
.brand-on-dark{display:none}
[data-theme="dark"] .brand-on-light{display:none}
[data-theme="dark"] .brand-on-dark{display:block;width:109.12%;height:359.60%;left:-4.60%;top:-125.50%}
[data-theme="dark"] .videosarafan-login-brand .brand-horizontal{aspect-ratio:1327/302}
@media(max-width:760px){.sidebar .theme-label{display:none}.sidebar .theme-switch{gap:2px;padding:2px;flex-direction:column}.sidebar .theme-switch button{padding:6px 0;font-size:16px;min-height:32px;width:100%;flex:none}}

[data-theme="dark"] button:disabled{background:var(--surface-secondary);border-color:var(--line);color:var(--muted)}

/* Decorative privacy help must not intercept the adjacent theme controls. */
.privacy-help{pointer-events:none}
