html[data-theme="light"]{color-scheme:light}
.header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;min-height:max(24px, calc(32px * var(--interface-font-scale, 1)))}
#theme-icon{font-size:calc(17px * var(--interface-font-scale, 1));line-height:1}
.theme-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
html[data-theme="dark"]{color-scheme:dark;--background:#111923;--surface:#1b2634;--text:#e4ecf5;--text-secondary:#a6b6c9;--border:#35465b;--primary:#8cbcff;--danger:#ff9393;--success:#80d6a2;--shadow:0 2px 8px #0003;--dark-input:#14202e;--dark-hover:#2b3d52}
html[data-theme="dark"] body{background:var(--background);color:var(--text)}
html[data-theme="dark"] body input:not([type=checkbox]):not([type=radio]):not([type=submit]),
html[data-theme="dark"] body main .bp-form-card input:not([type=checkbox]),
html[data-theme="dark"] body main .registration-form input,
html[data-theme="dark"] body select,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body main .bp-form-card select,
html[data-theme="dark"] body main .bp-form-card textarea{background:var(--dark-input);color:var(--text);border-color:var(--border)}
html[data-theme="dark"] body input::placeholder,html[data-theme="dark"] body textarea::placeholder{color:#92a4ba;opacity:1}
html[data-theme="dark"] body input:disabled,html[data-theme="dark"] body select:disabled{color:var(--text-secondary)}
html[data-theme="dark"] body input[type=checkbox],html[data-theme="dark"] body input[type=radio]{accent-color:#8cbcff}
html[data-theme="dark"] body .btn-secondary{background:#2b3b50;color:var(--text)}
html[data-theme="dark"] body .btn-primary{background:#2865bd;color:#fff}
html[data-theme="dark"] body main .calculation-grand-total,
html[data-theme="dark"] body main .service-total{background:#253a51;color:var(--text)}
html[data-theme="dark"] body .lab-menu-link:hover,
html[data-theme="dark"] body .lab-company-menu a:hover,
html[data-theme="dark"] body .lab-menu-section>summary:hover,
html[data-theme="dark"] body .lab-menu-subsection>summary:hover,
html[data-theme="dark"] body .lab-menu-group>summary:hover,
html[data-theme="dark"] body .dashboard-settings-menu a:hover{background:var(--dark-hover)}
html[data-theme="dark"] body .lab-controls .lab-metric.is-active,
html[data-theme="dark"] body .lab-metric.is-active{background:#263e5c}
html[data-theme="dark"] body .lab-badge,html[data-theme="dark"] body .employees-status{background:#304054;color:var(--text-secondary)}
html[data-theme="dark"] body .lab-status-ready,html[data-theme="dark"] body .lab-status-delivered,html[data-theme="dark"] body .employees-status.active,html[data-theme="dark"] body .employees-notice.success{background:#204335;color:#95e1b1}
html[data-theme="dark"] body .lab-status-in_progress,html[data-theme="dark"] body .employees-unit{background:#263f62;color:#adcfff}
html[data-theme="dark"] body .lab-status-fitting{background:#4b3d24;color:#f3d28d}
html[data-theme="dark"] body .lab-status-cancelled{background:#303b49;color:#b9c5d4}
html[data-theme="dark"] body .alert-danger,html[data-theme="dark"] body .employees-notice.error{background:#4b2830;color:#ffb5b5}
html[data-theme="dark"] body .employee-field-error,html[data-theme="dark"] body .employee-form-errors,html[data-theme="dark"] body .bp-field-error,html[data-theme="dark"] body .errorlist{color:var(--danger)}
html[data-theme="dark"] body .employees-card{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] body .employees-table th,html[data-theme="dark"] body .employees-table td,html[data-theme="dark"] body .employee-access-heading{border-color:var(--border)}
html[data-theme="dark"] body .employees-field label,html[data-theme="dark"] body .employees-subtitle,html[data-theme="dark"] body .employees-hint,html[data-theme="dark"] body .employees-list-title span,html[data-theme="dark"] body .employees-table th,html[data-theme="dark"] body .employees-table td small,html[data-theme="dark"] body .employee-access-heading p,html[data-theme="dark"] body .compact-employees .employee-count{color:var(--text-secondary)}
html[data-theme="dark"] body .employees-back,html[data-theme="dark"] body .employees-eyebrow{color:var(--primary)}
html[data-theme="dark"] body .lab-drawer::backdrop{background:#0008}
@media(max-width:600px){.header-actions{gap:7px}.theme-toggle{padding:calc(5px * var(--interface-font-scale, 1)) calc(8px * var(--interface-font-scale, 1))}.header-actions .header-user{max-width:100px;overflow:hidden;text-overflow:ellipsis}.site-header-inner{flex-wrap:wrap}}

/* Icon-only theme switch; accessible label and tooltip stay on the button. */
body .header-actions .theme-toggle{--theme-toggle-size:max(24px, calc(34px * var(--interface-font-scale, 1)));width:var(--theme-toggle-size);height:var(--theme-toggle-size);min-height:var(--theme-toggle-size);padding:0;justify-content:center;gap:0}
html[data-theme="light"] #theme-icon{color:#7b8490}
html[data-theme="dark"] #theme-icon{color:#ffd45c}
#theme-icon{font-family:Arial,sans-serif!important;font-size:calc(23px * var(--interface-font-scale, 1));line-height:1}
