/* Studio light/dark appearance. All controls retain their existing actions. */
.theme-controls{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--surface);flex-shrink:0}
.theme-controls button{display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.theme-controls button:hover{background:var(--surface-soft);color:var(--ink)}
.theme-controls button[aria-pressed=true]{background:var(--mint);color:var(--cyan-ink)}
.theme-controls svg{height:19px;width:19px}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] body.studio-theme{
 --ink:#e2edf4;--muted:#a1b4c4;--navy:#d1e8fa;--dark:#0d1723;--green:var(--navy);
 --cyan:#54d1e4;--cyan-ink:#78dce9;--mint:#183b48;--paper:#0d1723;
 --surface:#162431;--surface-soft:#1c2e3d;--line:#2e4555;--border:var(--line);
 --success:#8be0b9;--success-soft:#163e34;--warning:#efc777;--warning-soft:#3a3020;
 --danger:#ff9daf;--danger-soft:#402733;--info-soft:#183442;--shadow:0 8px 28px #00000015;
 color:var(--ink);background:var(--paper);
}
html[data-theme=dark] .studio-theme :is(h1,h2,h3,td strong,.detail-item strong,.calendar-toolbar strong,.vpn-latency strong){color:var(--ink)}
html[data-theme=dark] .studio-theme :is(.card,.tenant-card,.stat,dialog,.monthly-usage,.ai-usage-card,.monthly-usage-stat,.blocked-map-card){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.card-header,.modal-head,.topbar,.metric-footer,.if-footer,.tu-company-toggle){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(th,.call-filters,.ticket-filters,.audio-player,.server-service-item,.member-row,.window-block,.op-backup,.call-outcome,.pickup-options,.op-advanced,.transcript-config,.recording-track,.transfer-summary,.tu-company,.holiday-summary){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .studio-theme :is(td,.detail-item,.modal-actions,.listen-session,.vpn-footnote,.tu-assignment,.audio-settings){border-color:var(--line)}
html[data-theme=dark] .studio-theme tbody tr:hover{background:var(--surface-soft)}
html[data-theme=dark] .studio-theme :is(label,.if-toolbar label){color:#bbcfdd}
html[data-theme=dark] .studio-theme :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:#101f2d;color:var(--ink);border-color:#466171}
html[data-theme=dark] .studio-theme :is(select option,.scope select option){background:#162431;color:var(--ink)}
html[data-theme=dark] .studio-theme :is(input,textarea)::placeholder{color:#90a7b8}
html[data-theme=dark] .studio-theme :is(input,select,textarea):disabled{background:#22313c;color:#9ab0bf}
html[data-theme=dark] .studio-theme input::file-selector-button{background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.primary,.accept){background:#73dbe7;color:#082b38;border-color:#73dbe7}
html[data-theme=dark] .studio-theme :is(.primary,.accept):hover{background:#9ae7ef;border-color:#9ae7ef}
html[data-theme=dark] .studio-theme .secondary{background:var(--surface);color:var(--ink);border-color:#466171}
html[data-theme=dark] .studio-theme .secondary:hover{background:var(--surface-soft);border-color:#6b8797}
html[data-theme=dark] .studio-theme .text-button{color:var(--cyan-ink)}
html[data-theme=dark] .studio-theme .text-button:hover{background:var(--mint);color:#a5eff4}
html[data-theme=dark] .studio-theme :is(.primary.danger,.reject){background:#a92f50;color:#fff;border-color:#c54b6b}
html[data-theme=dark] .studio-theme :is(.secondary.danger,.text-button.danger){background:var(--danger-soft);color:var(--danger);border-color:#754053}
html[data-theme=dark] .studio-theme :is(code,.empty-icon,.tenant-symbol,.avatar,.vpn-device-web){background:var(--surface-soft);color:#b3deef;border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.badge,.status){background:var(--success-soft);color:var(--success);border-color:#2d5b4c}
html[data-theme=dark] .studio-theme :is(.badge.off,.status){background:var(--surface-soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] .studio-theme .badge.pending{background:var(--warning-soft);color:var(--warning);border-color:#68522f}
html[data-theme=dark] .studio-theme .badge.error{background:var(--danger-soft);color:var(--danger);border-color:#754053}
html[data-theme=dark] .studio-theme :is(.notice,.vpn-guide,.welcome-card){background:linear-gradient(115deg,#183440,#192c3b);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.welcome-card p,.vpn-guide p,.vpn-connection small,.vpn-footnote,.if-live-label,.if-condition,.if-note,.metric-chart-modern .metric-axis){color:var(--muted)}
html[data-theme=dark] .studio-theme .welcome-card .secondary{background:var(--surface);border-color:#466171;color:var(--ink)}
html[data-theme=dark] .studio-theme :is(.notice.error,.server-reboot-card){background:var(--danger-soft);color:var(--danger);border-color:#754053}
html[data-theme=dark] .studio-theme :is(.op-warnings,.if-warning,.if-holidays){background:var(--warning-soft);color:var(--warning);border-color:#68522f}
html[data-theme=dark] .studio-theme .close{background:var(--surface-soft);color:var(--ink);border-color:#466171}
html[data-theme=dark] .studio-theme dialog::backdrop{background:#0009}
html[data-theme=dark] .studio-theme .metric-chart-modern{background:linear-gradient(140deg,var(--chart-tint),transparent 48%),var(--surface);border-color:var(--line)}
html[data-theme=dark] .studio-theme .metric-scale-tag{background:var(--surface-soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.metric-reading strong,.metric-icon){filter:brightness(1.8) saturate(.8)}
html[data-theme=dark] .studio-theme .metric-plot svg{filter:brightness(1.45)}
html[data-theme=dark] .studio-theme .chart-grid{stroke:var(--line)}
html[data-theme=dark] .studio-theme .map-ocean{fill:#112331}
html[data-theme=dark] .studio-theme .world-country{fill:#385568;stroke:#112331}
html[data-theme=dark] .studio-theme .world-country.is-blocked{fill:#f2758e}
html[data-theme=dark] .studio-theme .world-country.is-blocked:hover{fill:#ff9daf}
html[data-theme=dark] .studio-theme .incoming-flow{--if-navy:var(--navy);--if-cyan:var(--cyan);--if-line:var(--line);--if-paper:var(--surface-soft)}
html[data-theme=dark] .studio-theme .if-canvas{background-color:#10212e;background-image:radial-gradient(#304857 .7px,transparent .7px);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.if-node,.if-empty){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .studio-theme :is(.if-entry>summary,.if-node>summary:hover,.if-member-tags span,.if-symbol,.calendar-day){background:var(--surface-soft);color:var(--ink)}
html[data-theme=dark] .studio-theme .if-entry>summary .if-symbol{background:var(--mint);color:var(--cyan-ink)}
html[data-theme=dark] .studio-theme :is(.if-heading small,.if-members>summary){color:var(--muted)}
html[data-theme=dark] .studio-theme :is(.if-windows span,.if-members,.if-toolbar){border-color:var(--line);color:var(--muted)}
html[data-theme=dark] .studio-theme :is(.if-positive>.if-condition,.if-holidays>summary){color:var(--cyan-ink)}
html[data-theme=dark] .studio-theme .if-node.if-warning{background:var(--warning-soft);color:var(--warning)}
html[data-theme=dark] .studio-theme .calendar-day.selected{background:var(--mint);color:var(--cyan-ink)}
html[data-theme=dark] .studio-shell .sidebar{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .studio-shell .sidebar .brand{background:#fff;padding:4px 6px;border-radius:10px}
html[data-theme=dark] .studio-shell .sidebar .brand img{max-width:100%}
html[data-theme=dark] .studio-shell .sidebar :is(.nav-item,.logout){color:#bacfdd}
html[data-theme=dark] .studio-shell .sidebar :is(.nav-item:hover:not(.active),.nav-group-toggle[aria-expanded=true],.nav-group-toggle.has-active){background:var(--surface-soft);color:var(--ink)}
html[data-theme=dark] .studio-shell .sidebar .nav-item.active{background:var(--mint);color:var(--cyan-ink)}
html[data-theme=dark] .studio-shell .sidebar .nav-children{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .studio-shell :is(.nav-toggle,.nav-close,.user-chip){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .studio-theme .login-art{background:linear-gradient(145deg,#18333f,#11232e);color:var(--ink)}
html[data-theme=dark] .studio-theme .login-art :is(p,small){color:var(--muted)}
html[data-theme=dark] .studio-theme .login-form{background:var(--surface)}
html[data-theme=dark] .studio-theme.personal-portal .brand{background:#fff;border-radius:10px;padding:4px 8px}
html[data-theme=dark] .studio-theme.personal-portal .keypad button{background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .studio-theme.personal-portal .keypad button:hover{background:var(--mint)}
html[data-theme=dark] .studio-theme :is(.sip-access-summary>div,.sip-access-scope span,.sip-country-grid label:has(input:checked),.personal-portal .call-card){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .studio-theme :is(.sip-access-summary strong,.sip-access-trusted summary,.ai-usage-metrics strong){color:var(--ink)}
html[data-theme=dark] .studio-theme :is(.sip-access-summary span,.sip-access-summary small,.sip-access-trusted p,.ai-usage-period,.ai-usage-metrics small){color:var(--muted)}
html[data-theme=dark] .studio-theme .audio-toggle{background:var(--cyan-ink);color:#082b38}
@media(max-width:600px){
 .studio-shell .topbar{display:grid;grid-template-columns:44px minmax(0,1fr) 82px;gap:10px 12px}
 .studio-shell .nav-toggle{grid-column:1;grid-row:1}
 .studio-shell .topbar .scope{grid-column:2;grid-row:1;min-width:0}
 .studio-shell .user-chip{grid-column:3;grid-row:1;justify-self:end}
 .studio-shell #breadcrumb{grid-column:1/3;grid-row:2;margin:0}
 .studio-shell .theme-controls{grid-column:3;grid-row:2;justify-self:end}
 .personal-portal .topbar{flex-wrap:wrap}
 .personal-portal .theme-controls{margin-left:auto}
 .personal-portal .user-menu{width:100%;justify-content:flex-end}
}
@media print{.theme-controls{display:none!important}html[data-theme=dark] body.studio-theme{--ink:#1b3642;--muted:#5d737c;--navy:#0b365d;--paper:#fff;--surface:#fff;--surface-soft:#f5f8f7;--line:#dfe6e4;color:var(--ink);background:#fff}}
