:root{--surface:#fff;--surface-soft:#f3f7fb;--ink:#193b55;--muted:#587184;--page:#f3f6fa;--nav-width:248px;--header-height:88px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.signed-in{background:var(--page);color:var(--ink)}
body.signed-in>header{position:sticky;top:0;height:var(--header-height);z-index:20;padding:12px 24px;gap:20px}
#shellControls{display:flex;gap:8px;margin-left:auto;align-items:center}#shellControls button{color:#e4f1fc;background:#ffffff12;border-color:#ffffff35;white-space:nowrap}#menuToggle{min-width:42px;font-size:21px}
body.signed-in #nav{position:fixed;top:var(--header-height);bottom:0;left:0;width:var(--nav-width);padding:18px 12px;display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;overflow-y:auto;overflow-x:hidden;background:var(--surface);border-right:1px solid var(--line);border-bottom:0;z-index:15;box-shadow:none}
#nav button{width:100%;justify-content:flex-start;text-align:left;min-height:44px;flex-shrink:0;padding:11px 13px;gap:12px}#nav .button-icon{width:20px;height:20px;flex-basis:20px}#nav .nav-label{min-width:0;font-size:13px;line-height:1.4}#nav #logout{margin-top:auto}#nav #goProfile{border-top:1px solid var(--line);margin-top:12px}
body.signed-in>main{max-width:none;margin-left:var(--nav-width);padding:28px clamp(18px,3vw,48px) 70px;min-width:0}body.menu-collapsed{--nav-width:76px}body.menu-collapsed #nav .nav-label{display:none}body.menu-collapsed #nav button{justify-content:center;padding:12px}#account{display:flex;align-items:center;gap:10px;text-align:left;font-size:13px;max-width:40%}#account small{display:block;font-size:11px;opacity:.8;max-width:350px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.avatar{width:36px;height:36px;flex:0 0 36px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#dbeefa;color:#135c8f;font-size:13px;font-weight:750}.avatar img{width:100%;height:100%;object-fit:cover}.user-name{display:flex;align-items:center;gap:10px}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.profile-grid label{margin:16px 0}.profile-grid .avatar{width:80px;height:80px;font-size:27px}#profileAvatar{margin:16px 0}
html[data-theme=dark]{color-scheme:dark;--surface:#172838;--surface-soft:#203447;--ink:#dfebf5;--muted:#acc0d0;--page:#101d2a;--line:#344a5d;--blue:#267bb6;background:var(--page);color:var(--ink)}
[data-theme=dark] :is(h1,h2,h3,summary,.panel h2,.dashboard-kpi strong,.dashboard-context b,.schedule-metrics b){color:#e2eef7}
[data-theme=dark] :is(.muted,.hint,label,.eyebrow,.dashboard-context,.dashboard-kpi>span,.dashboard-kpi small,.dashboard-month,.dashboard-legend,.dashboard-rules p,.schedule-day h3,.schedule-metrics span,.unit-entity,.unit-contacts){color:var(--muted)}
[data-theme=dark] :is(.panel,details,dialog,.dashboard-kpi,.schedule-day,.schedule-metrics>div,.schedule-dialog){background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}
[data-theme=dark] :is(input,select,textarea){background:#102333;color:var(--ink);border-color:#456078}[data-theme=dark] :is(input,textarea)::placeholder{color:#93aabc}[data-theme=dark] .readonly :is(input,select,textarea){background:#213345;color:#c9dae8}
[data-theme=dark] button{background:#203c53;color:#d6eafa;border-color:#466078}[data-theme=dark] button:hover{background:#2c506c}[data-theme=dark] button.primary{background:#246f9f;color:#fff;border-color:#3787bd}[data-theme=dark] button.primary:hover{background:#3087bd}[data-theme=dark] button.danger{color:#ffb2b9}
[data-theme=dark] #nav button{background:transparent;border-color:transparent;color:#bed1df}[data-theme=dark] #nav button:hover,[data-theme=dark] #nav button[aria-current=page]{background:#23445d;color:#fff;border-color:#3b6684}
[data-theme=dark] :is(th,.dashboard-table th[scope=row],.listitem,.treecolumn,.logo-upload,.slot-editor){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}[data-theme=dark] tbody tr:hover{background:#22394d}[data-theme=dark] td{border-color:var(--line)}[data-theme=dark] .sticky{background:#101d2af5;border-color:var(--line)}[data-theme=dark] .treecolumn label{border-color:var(--line)}[data-theme=dark] .treecolumn label:has(input:checked){background:#245176;color:white}
[data-theme=dark] .badge,[data-theme=dark] #goSchedule .badge{background:#234964;color:#bce3ff}[data-theme=dark] .warning{background:#44381e;color:#ffe1a4;border-color:#d4a326}[data-theme=dark] .error{background:#492c36;color:#ffd0d8}[data-theme=dark] .success{background:#1c4437;color:#b7f1d6}[data-theme=dark] .schedule-error{color:#ffb0b0}[data-theme=dark] a{color:#8bccfa}
[data-theme=dark] .schedule-day.today{background:#18354b;border-color:#4da5dc}[data-theme=dark] .schedule-day.outside{background:#13212e}[data-theme=dark] .shift-card{background:#22445d!important;color:#e2f2ff!important}[data-theme=dark] .shift-card.vacant{background:#493d23!important}[data-theme=dark] .shift-card.draft{background:#35414e!important}[data-theme=dark] .shift-card.cancelled{background:#482f39!important}[data-theme=dark] .schedule-dialog fieldset{border-color:var(--line)}
[data-theme=dark] .dashboard-track{background:#31465a}[data-theme=dark] .dashboard-column{background-image:linear-gradient(#34495d 1px,transparent 1px);border-color:var(--line)}[data-theme=dark] .dashboard-kpi.accent{background:#204f72}[data-theme=dark] .dashboard-kpi.positive strong{color:#77dcbb}[data-theme=dark] .dashboard-kpi.pending strong{color:#f1c270}[data-theme=dark] .dashboard-table td small{color:#abc0d2}[data-theme=dark] .blocking-alert-icon{background:#4b3b24;color:#ffd798}
/* Document previews retain a paper surface; exported PDFs do not inherit the application theme. */
[data-theme=dark] .print-preview-sheet{color:#18344e;background:white}[data-theme=dark] .print-preview-sheet :is(h2,p,.unit-entity,.unit-contacts){color:#18344e}
@media(max-width:1100px){body.signed-in>header .brand small{display:none}#account small{max-width:180px}.profile-grid{grid-template-columns:1fr}}
@media(max-width:800px){:root{--header-height:76px}body.signed-in>header{padding:10px 12px;gap:8px}body.signed-in>header .brand strong{font-size:19px}body.signed-in>header .cross{display:none}#account>span:not(.avatar){display:none}#account{max-width:40px}#shellControls{gap:4px}#shellControls button{padding:7px 9px;font-size:12px}body.signed-in>main{margin-left:64px;padding:20px 12px 60px}body.signed-in #nav{width:248px;padding:8px;box-shadow:16px 0 30px #0005}body.menu-collapsed #nav{display:flex!important;width:64px;box-shadow:none}body.menu-collapsed #nav .nav-label{display:none}body.menu-collapsed #nav button{justify-content:center;padding:10px}.profile-grid{gap:0}body.signed-in:not(.menu-collapsed) #nav .nav-label{display:inline}body.signed-in:not(.menu-collapsed) #nav button{justify-content:flex-start}.brand small{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{body.signed-in>header,body.signed-in>main,body.signed-in #nav{display:none!important}html[data-theme=dark],html[data-theme=dark] body{color-scheme:light;background:white;color:black}html[data-theme=dark] #print *{color:black!important;background:white!important}}

.preference-status:empty{display:none}.preference-status{position:fixed;bottom:18px;right:18px;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:8px 12px;border-radius:8px;font-size:12px;max-width:320px;box-shadow:0 4px 20px #0002;z-index:50}

#nav .nav-controls{position:sticky;top:0;z-index:2;flex-shrink:0;background:var(--surface);border-bottom:1px solid var(--line);padding:0 0 10px;margin-bottom:6px}
#nav #menuToggle{width:100%;min-width:0;min-height:44px;gap:12px;white-space:nowrap;font-size:13px}
#nav .menu-toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;flex:0 0 20px;font-size:22px;line-height:1}
body.menu-collapsed #nav .menu-toggle-label{display:none}

.preference-status{opacity:1;transition:opacity .25s ease;pointer-events:none}.preference-status.is-fading{opacity:0}

#account .account-name{display:block}#account .account-role{margin-top:1px}
#editUser .user-checkboxes{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:20px 0}
#editUser .user-checkboxes label{display:flex;align-items:center;justify-content:flex-start;gap:10px;margin:0;text-align:left;min-height:28px}
#editUser .user-checkboxes input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0}
