/* EMS UI V2 — presentation layer only */
:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #101113;
  --surface-2: #17181b;
  --surface-3: #1d1f23;
  --line: #292b31;
  --line-soft: #202226;
  --text: #f7f7f8;
  --muted: #9b9ca1;
  --accent: #2f88ff;
  --accent-strong: #1673ec;
  --danger: #f06464;
  --warning: #e9a84a;
  --info: #63a9ff;
  --shift-admin: #9a7cff;
  --shift-day: #d99b45;
  --shift-morning: #46b98a;
  --shift-evening: #e78545;
  --shift-night: #607eea;
  --shift-oc: #3ab680;
  --shift-ot: #ea6c59;
  --shift-leave: #4aa4e8;
  --shift-off: #656970;
  --radius: 18px;
  --shadow: none;
  --sidebar: 248px;
  --touch-target: 44px;
  --content-gutter: clamp(18px, 3vw, 46px);
}

* { scrollbar-color: #34363b transparent; }
html, body { background: var(--bg) !important; }
body { color: var(--text); font-family: Inter, "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
button, input, select { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); background: var(--bg); }
.app-stage { min-width: 0; }
.app-sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 28px;
  padding: 26px 18px; border-inline-end: 1px solid var(--line-soft); background: #09090a;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; padding-inline: 4px; }
.brand-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 14px; color: #fff; background: var(--accent); font-weight: 900; }
.brand-copy { display: grid; gap: 3px; min-width: 0; }
.brand-copy strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: .7rem; }
.desktop-nav { display: grid; gap: 5px; }
.nav-item, .drawer-nav-item, .bottom-nav-item {
  border: 0; color: var(--muted); background: transparent; transition: color .15s ease, background .15s ease;
}
.nav-item { min-height: 46px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 12px; border-radius: 13px; text-align: start; }
.nav-item:hover { color: var(--text); background: var(--surface); }
.nav-item[data-active="true"] { color: var(--text); background: var(--surface-2); }
.nav-item__icon { display: grid; place-items: center; min-width: 24px; min-height: 24px; font-size: 1.08rem; line-height: 1; }
.nav-item__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 700; }
.sidebar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.shell-action { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); font-size: .74rem; }
.shell-action:disabled { opacity: .35; }

.mobile-topbar, .mobile-bottom-nav, .mobile-drawer, .mobile-drawer-scrim { display: none; }
.page-root { min-width: 0; padding: 30px var(--content-gutter) 48px; }
.page { width: min(1540px, 100%); min-width: 0; margin-inline: auto; }
.page-header, .page-header-clean { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.page-header h1, .page-header-clean h1 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.15rem); letter-spacing: -.02em; }
.page-header p { margin: 6px 0 0; color: var(--muted); }

.button, .icon-button {
  min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 15px;
  color: var(--text); background: var(--surface-2); font-weight: 750;
}
.button:hover, .icon-button:hover { border-color: #3b3e45; background: var(--surface-3); }
.button-primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.button-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.button-quiet { border-color: transparent; color: var(--muted); background: transparent; }
.button-danger { color: #fff; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }
.compact-action { min-height: 38px; padding: 7px 12px; font-size: .78rem; }

.panel, .stat-card, .employee-group, .employee-editor, .settings-section, .export-card, .saved-roster-card {
  border: 1px solid var(--line-soft) !important; border-radius: var(--radius) !important; background: var(--surface) !important; box-shadow: none !important;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.stat-card { min-height: 112px; display: grid; align-content: space-between; gap: 16px; padding: 19px; }
.stat-label { color: var(--muted); font-size: .8rem; }
.stat-value { font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1; }
.stat-card[data-tone="positive"] .stat-value { color: #77d6ae; }
.stat-card[data-tone="warning"] .stat-value { color: var(--warning); }
.dashboard-saved { display: grid; gap: 10px; margin-top: 14px; padding: 20px; }
.dashboard-saved .stat-value { font-size: 1rem; }

.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.search-input, .field input, .field select, .employee-list__toolbar input, .employee-list__toolbar select,
.setting-field input, .setting-field select, .completion-name input {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  color: var(--text); background: #0b0c0e; outline: none;
}
.search-input:focus, .field input:focus, .field select:focus, .setting-field input:focus, .setting-field select:focus { border-color: var(--accent); }
.field { display: grid; gap: 7px; color: var(--muted); }
.field > span { font-size: .8rem; }
.badge, .shift-badge, .leave-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 26px; padding: 4px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .72rem; font-weight: 800; }
.leave-badge { color: #7bbff2; }
.empty-state { padding: 44px 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: color-mix(in srgb, var(--surface) 65%, transparent); text-align: center; }

/* Quick create */
.quick-create-form { margin: 0; padding: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.quick-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.quick-step { min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #0b0c0e; font-size: .78rem; }
.quick-step[data-active="true"] { color: #fff; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quick-review-list { display: grid; gap: 8px; padding: 0; }
.quick-review-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.quick-review-item dd { margin: 0; font-weight: 800; }

/* Employees */
.employees-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,390px); gap: 16px; align-items: start; }
.employee-list__toolbar { display: grid; grid-template-columns: minmax(0,1fr) 180px auto; gap: 10px; margin-bottom: 12px; }
.employee-groups, .employee-list, .employee-editor-host { display: grid; gap: 12px; min-width: 0; }
.employee-group { overflow: hidden; }
.employee-group__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.employee-group__header h2 { margin: 0; font-size: .92rem; }
.employee-group__header span { color: var(--muted); font-size: .75rem; }
.employee-group__rows { display: grid; }
.employee-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.employee-row:last-child { border-bottom: 0; }
.employee-row__identity { display: grid; gap: 6px; }
.employee-row__identity strong { font-size: .88rem; }
.employee-row__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .75rem; }
.employee-row__actions { display: flex; gap: 6px; }
.employee-row__actions .button { min-height: 36px; padding: 6px 10px; font-size: .72rem; }
.employee-editor { position: sticky; top: 18px; padding: 18px; }
.employee-editor__form { display: grid; gap: 12px; }
.employee-editor__header, .employee-editor__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-editor__header h2 { margin: 0; font-size: 1rem; }
.leave-editor { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.leave-periods { display: grid; gap: 7px; }
.leave-period { display: flex; justify-content: space-between; gap: 8px; padding: 9px; border-radius: 10px; background: var(--surface-2); }

/* Settings */
.settings-page { padding-bottom: 92px; }
.settings-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 12px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.settings-hero::after { display: none; }
.settings-kicker, .settings-intro, .settings-hero__meta { display: none; }
.settings-hero h1 { margin: 0; font-size: clamp(1.55rem,2.4vw,2.15rem); }
.settings-hero p { max-width: 64ch; margin: 7px 0 0; color: var(--muted); font-size: .84rem; }
.settings-sections { display: grid; gap: 10px; }
.settings-section { margin: 0 !important; overflow: hidden; }
.settings-section > summary { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 12px 15px; cursor: pointer; list-style: none; }
.settings-section > summary::-webkit-details-marker { display: none; }
.settings-section__icon { display: grid; place-items: center; width: 36px; aspect-ratio: 1; border-radius: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.settings-section__title { font-size: .9rem; font-weight: 800; }
.settings-section__count { display: grid; place-items: center; min-width: 27px; height: 27px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .7rem; }
.settings-section__chevron { color: var(--muted); }
.settings-section .settings-grid { padding: 2px 12px 12px; }
.setting-field { min-height: 82px; display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 13px; background: #0c0d0f; }
.setting-field--toggle { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.setting-field__label { color: var(--muted); font-size: .78rem; }
.switch-control { position: relative; display: inline-grid; }
.switch-control input { position: absolute; inset: 0; z-index: 2; opacity: 0; cursor: pointer; }
.switch-track { position: relative; display: block; width: 48px; height: 28px; border: 1px solid var(--line); border-radius: 999px; background: #08090a; }
.switch-thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #676a70; transition: .18s ease; }
.switch-control input:checked + .switch-track { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, #08090a); }
.switch-control input:checked + .switch-track .switch-thumb { inset-inline-start: 23px; background: var(--accent); }
.settings-save-bar { position: fixed; z-index: 35; inset-inline-end: max(18px,var(--content-gutter)); bottom: 18px; display: flex; align-items: center; gap: 12px; padding: 8px; padding-inline-start: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,17,19,.94); backdrop-filter: blur(16px); }
.settings-save-status { color: var(--muted); font-size: .74rem; }

/* Review, saved, profile, completion */
.review-page { max-width: 1000px; }
.review-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.alert-list { display: grid; gap: 9px; }
.alert-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 15px; background: var(--surface); }
.alert-panel-copy, .alert-title { display: grid; gap: 7px; }
.alert-details { display: flex; flex-wrap: wrap; gap: 7px 16px; margin: 0; }
.alert-detail { display: flex; gap: 5px; font-size: .76rem; }
.alert-detail dt { color: var(--muted); }
.alert-detail dd { margin: 0; }
.saved-roster-list, .profile-months { display: grid; gap: 11px; }
.saved-roster-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px; }
.saved-roster-details { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.profile-identity, .profile-month { padding: 18px; }
.profile-identity h2 { margin: 0 0 8px; }
.profile-month__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-month__header h3 { margin: 0; font-size: .95rem; }
.completion-name { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 15px; margin-bottom: 12px; }
.completion-metadata { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; padding: 0; overflow: hidden; }
.completion-metadata dt, .completion-metadata dd { margin: 0; padding: 12px 15px; }
.completion-metadata dt { color: var(--muted); font-size: .72rem; }
.completion-metadata dd { font-weight: 900; }
.export-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.export-card { display: grid; align-content: start; gap: 12px; padding: 18px; }
.export-card h2 { margin: 0; font-size: 1rem; }
.export-card p { color: var(--muted); font-size: .78rem; }

/* Roster */
.roster-page { max-width: none; }
.roster-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.roster-title-block { display: flex; align-items: center; gap: 12px; }
.roster-title-icon { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 13px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-size: 1.15rem; }
.roster-title-block h1 { margin: 0; font-size: clamp(1.55rem,2.4vw,2.15rem); }
.roster-title-block p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.roster-tools { display: grid; grid-template-columns: minmax(0,1fr) 170px; gap: 9px; margin-bottom: 9px; }
.roster-search, .roster-filter { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.roster-search > span, .roster-filter > span { color: var(--muted); }
.roster-search-input, .roster-filter-select { min-width: 0; width: 100%; border: 0; color: var(--text); background: transparent; outline: 0; }
.roster-filter-select { appearance: none; }
.roster-month-bar { min-height: 52px; display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; align-items: center; gap: 8px; margin-bottom: 9px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.roster-month-arrow { min-height: 40px; border: 0; border-radius: 10px; color: var(--text); background: var(--surface-2); font-size: 1.25rem; }
.roster-month-copy { display: grid; place-items: center; gap: 2px; }
.roster-month-copy strong { font-size: .9rem; }
.roster-month-copy small { color: var(--muted); font-size: .68rem; }
.roster-summary-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.roster-summary-strip article { min-height: 76px; display: grid; place-content: center; gap: 6px; padding: 11px; border-inline-end: 1px solid var(--line-soft); text-align: center; }
.roster-summary-strip article:last-child { border-inline-end: 0; }
.roster-summary-strip span { color: var(--muted); font-size: .68rem; }
.roster-summary-strip strong { font-size: 1.15rem; }
.roster-summary-strip article[data-token="day"] strong { color: var(--shift-day); }
.roster-summary-strip article[data-token="night"] strong { color: #8097ff; }
.roster-summary-strip article[data-token="oc"] strong { color: #66d7a4; }
.roster-board { overflow: visible; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.roster-table-scroll { width: 100%; max-width: 100%; overflow: auto; border-radius: 16px 16px 0 0; }
.roster-table-unified { --day-width: 48px; width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.roster-table-unified th, .roster-table-unified td { height: 54px; padding: 4px; border-inline-end: 1px solid var(--line-soft); border-block-end: 1px solid var(--line-soft); text-align: center; }
.roster-table-unified thead th { position: sticky; top: 0; z-index: 5; background: #151619; }
.roster-name-column { position: sticky; inset-inline-start: 0; z-index: 4; width: 220px; min-width: 220px; padding-inline: 12px !important; background: var(--surface); text-align: start !important; }
.roster-name-heading { z-index: 7 !important; color: var(--muted); font-size: .72rem; }
.roster-day-head, .roster-day-cell { width: var(--day-width); min-width: var(--day-width); }
.roster-day-head { height: 62px !important; padding: 7px 2px !important; }
.roster-day-head[data-weekend="true"], .roster-day-cell[data-weekend="true"] { background: color-mix(in srgb, var(--warning) 4%, var(--surface)); }
.roster-day-head[data-today="true"] .roster-date { color: #fff; background: var(--accent); }
.roster-weekday { display: block; color: var(--muted); font-size: .59rem; white-space: nowrap; }
.roster-date { display: grid; place-items: center; width: 25px; aspect-ratio: 1; margin: 4px auto 0; border-radius: 8px; font-size: .75rem; }
.roster-metric { width: 76px; min-width: 76px; color: var(--muted); background: #141518; font-size: .72rem; }
.roster-metric-value { color: var(--text); font-weight: 850; }
.roster-employee-row:hover { background: rgba(255,255,255,.018); }
.roster-employee-row:hover .roster-name-column { background: #131416; }
.roster-employee { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; }
.roster-avatar { display: grid; place-items: center; width: 32px; aspect-ratio: 1; border-radius: 10px; color: #a8cfff; background: color-mix(in srgb, var(--accent) 13%, var(--surface-2)); font-size: .72rem; font-weight: 900; }
.roster-employee-copy { display: grid; min-width: 0; gap: 3px; }
.roster-employee-copy strong, .roster-employee-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-employee-copy strong { font-size: .78rem; }
.roster-employee-copy small { color: var(--muted); font-size: .62rem; }
.roster-group-chip { min-width: 24px; min-height: 22px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: .62rem; font-weight: 900; }
.shift-menu { position: relative; }
.shift-menu > summary { list-style: none; }
.shift-menu > summary::-webkit-details-marker { display: none; }
.shift-menu[open] { z-index: 30; }
.shift-pill { display: grid; place-items: center; width: 34px; min-height: 30px; margin: auto; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 900; cursor: pointer; }
.shift-pill[data-token="day"] { color: #ffe0a7; background: color-mix(in srgb, var(--shift-day) 30%, var(--surface-2)); }
.shift-pill[data-token="night"] { color: #c7d0ff; background: color-mix(in srgb, var(--shift-night) 32%, var(--surface-2)); }
.shift-pill[data-token="morning"] { color: #a9efd4; background: color-mix(in srgb, var(--shift-morning) 28%, var(--surface-2)); }
.shift-pill[data-token="evening"] { color: #ffd0ad; background: color-mix(in srgb, var(--shift-evening) 28%, var(--surface-2)); }
.shift-pill[data-token="oc"] { color: #b6f4d7; background: color-mix(in srgb, var(--shift-oc) 28%, var(--surface-2)); }
.shift-pill[data-token="ot"] { color: #ffc2b8; background: color-mix(in srgb, var(--shift-ot) 28%, var(--surface-2)); }
.shift-pill[data-token="leave"] { color: #b9e2ff; background: color-mix(in srgb, var(--shift-leave) 26%, var(--surface-2)); }
.shift-pill[data-token="admin"] { color: #ddd2ff; background: color-mix(in srgb, var(--shift-admin) 28%, var(--surface-2)); }
.shift-pill[data-token="off"] { color: #6d7077; }
.roster-day-cell[data-focus="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.shift-menu__options { position: absolute; inset-block-start: calc(100% + 5px); inset-inline-start: 50%; z-index: 50; display: grid; grid-template-columns: repeat(3,40px); gap: 6px; width: max-content; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: #111214; box-shadow: 0 16px 40px rgba(0,0,0,.45); transform: translateX(-50%); }
[dir="rtl"] .shift-menu__options { transform: translateX(50%); }
.shift-menu__choice { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); font-size: .68rem; font-weight: 900; }
.roster-total-row th, .roster-total-row td { height: 38px; color: var(--muted); background: #141518; font-size: .68rem; font-weight: 800; }
.roster-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 11px 14px; }
.roster-legend__item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.roster-legend__item i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--shift-off); }
.roster-legend__item i[data-token="day"] { background: var(--shift-day); }
.roster-legend__item i[data-token="night"] { background: var(--shift-night); }
.roster-legend__item i[data-token="oc"] { background: var(--shift-oc); }
.roster-legend__item strong { color: var(--text); font-size: .68rem; }
.roster-legend__item small { font-size: .62rem; }
.roster-page-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

@media (max-width: 1100px) {
  .app-shell { display: block; }
  .app-sidebar { display: none; }
  .mobile-topbar { position: sticky; top: 0; z-index: 35; min-height: 64px; display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--line-soft); background: rgba(5,5,5,.94); backdrop-filter: blur(18px); }
  .round-icon-button { position: relative; display: grid; place-items: center; width: 42px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--surface); }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; content: ''; }
  .menu-lines::before { transform: translateY(-5px); }
  .menu-lines::after { transform: translateY(3.5px); }
  .mobile-page-title { display: grid; justify-items: center; gap: 2px; min-width: 0; }
  .mobile-page-title strong { font-size: .88rem; }
  .mobile-page-title small { color: var(--muted); font-size: .62rem; }
  .notification-dot { position: absolute; inset-inline-end: 8px; top: 8px; width: 6px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); }
  .mobile-bottom-nav { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; min-height: 70px; display: grid; grid-template-columns: repeat(5,1fr); padding: 5px max(8px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border-top: 1px solid var(--line-soft); background: rgba(8,8,9,.96); backdrop-filter: blur(18px); }
  .bottom-nav-item { min-width: 0; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 11px; }
  .bottom-nav-item[data-active="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
  .bottom-nav-item .nav-item__icon { min-height: 20px; font-size: 1rem; }
  .bottom-nav-item .nav-item__label { max-width: 100%; font-size: .58rem; }
  .mobile-drawer-scrim { position: fixed; z-index: 70; inset: 0; display: block; border: 0; background: rgba(0,0,0,.64); }
  .mobile-drawer-scrim[hidden], .mobile-drawer[hidden] { display: none; }
  .mobile-drawer { position: fixed; z-index: 80; inset-block: 0; inset-inline-start: 0; width: min(84vw,340px); display: flex; flex-direction: column; gap: 16px; padding: max(18px,env(safe-area-inset-top)) 14px max(18px,env(safe-area-inset-bottom)); border-inline-end: 1px solid var(--line); background: #0a0a0b; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .mobile-drawer__brand { display: flex; align-items: center; gap: 10px; }
  .mobile-drawer__brand .brand-mark { width: 38px; }
  .mobile-drawer__nav { display: grid; gap: 5px; overflow-y: auto; }
  .drawer-nav-item { min-height: 46px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; text-align: start; }
  .drawer-nav-item[data-active="true"] { color: var(--text); background: var(--surface-2); }
  .mobile-drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
  .page-root { padding: 18px var(--content-gutter) calc(92px + env(safe-area-inset-bottom)); }
  .employees-layout { grid-template-columns: 1fr; }
  .employee-editor { position: static; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .export-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root { --content-gutter: 11px; }
  .page-root { padding-top: 14px; }
  .page-header { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 15px; }
  .page-header h1 { font-size: 1.35rem; }
  .page-header .page-actions { width: 100%; }
  .page-header .page-actions .button { flex: 1; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 86px; padding: 13px; }
  .stat-label { font-size: .68rem; }
  .stat-value { font-size: 1.35rem; }
  .quick-create-form { padding: 13px; }
  .quick-steps { gap: 5px; margin-bottom: 14px; }
  .quick-step { min-height: 34px; padding: 5px; font-size: .66rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .employee-list__toolbar { grid-template-columns: minmax(0,1fr) auto; }
  .employee-list__toolbar select { width: 48px; padding-inline: 7px; color: transparent; }
  .employee-list__toolbar .button { grid-column: 1 / -1; }
  .employee-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 11px 12px; }
  .employee-row__meta { grid-column: 1 / -1; }
  .employee-row__actions { grid-row: 1; grid-column: 2; }
  .employee-row__actions .button { width: 36px; overflow: hidden; padding: 0; color: transparent; }
  .employee-row__actions .button::before { color: var(--muted); content: '•••'; }
  .settings-hero p { display: none; }
  .settings-section > summary { min-height: 56px; padding: 10px 12px; }
  .settings-save-bar { inset-inline: 10px; bottom: calc(78px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .alert-panel { align-items: stretch; flex-direction: column; }
  .saved-roster-card { grid-template-columns: 1fr; }
  .saved-roster-card .page-actions .button { flex: 1 1 90px; }
  .completion-name { grid-template-columns: 1fr; }
  .completion-metadata { grid-template-columns: repeat(2,1fr); }

  .roster-header { margin-bottom: 10px; }
  .roster-title-icon { width: 36px; border-radius: 11px; }
  .roster-title-block h1 { font-size: 1.25rem; }
  .roster-title-block p { font-size: .65rem; }
  .roster-header-actions .compact-action { width: 38px; overflow: hidden; padding: 0; color: transparent; }
  .roster-header-actions .compact-action::before { color: var(--muted); content: '✓'; }
  .roster-tools { grid-template-columns: minmax(0,1fr) 44px; gap: 7px; }
  .roster-search, .roster-filter { min-height: 44px; border-radius: 12px; }
  .roster-filter { padding: 0; justify-content: center; }
  .roster-filter > span { position: absolute; pointer-events: none; }
  .roster-filter-select { width: 42px; opacity: 0; }
  .roster-month-bar { min-height: 48px; margin-bottom: 7px; }
  .roster-summary-strip { margin-bottom: 7px; }
  .roster-summary-strip article { min-height: 64px; padding: 7px 3px; }
  .roster-summary-strip span { font-size: .55rem; }
  .roster-summary-strip strong { font-size: 1rem; }
  .roster-board { border-radius: 14px; }
  .roster-table-scroll { border-radius: 14px 14px 0 0; }
  .roster-table-unified { --day-width: calc((100vw - 132px) / 7); min-width: 100%; }
  .roster-name-column { width: 121px; min-width: 121px; padding-inline: 7px !important; }
  .roster-day-head, .roster-day-cell { max-width: 42px; }
  .roster-table-unified th, .roster-table-unified td { height: 47px; padding: 2px; }
  .roster-day-head { height: 54px !important; }
  .roster-weekday { font-size: .48rem; }
  .roster-date { width: 22px; font-size: .66rem; }
  .roster-avatar { display: none; }
  .roster-employee { grid-template-columns: minmax(0,1fr) auto; gap: 5px; }
  .roster-employee-copy strong { font-size: .66rem; }
  .roster-employee-copy small { font-size: .52rem; }
  .roster-group-chip { min-width: 20px; min-height: 20px; font-size: .53rem; }
  .shift-pill { width: min(30px, calc(var(--day-width) - 4px)); min-height: 27px; border-radius: 8px; font-size: .6rem; }
  .roster-metric { display: none; }
  .roster-total-row { display: none; }
  .roster-legend { gap: 8px 12px; padding: 9px 10px; }
  .roster-legend__item small { display: none; }
  .roster-page-actions .button { width: 100%; }
}

@media (max-width: 370px) {
  .roster-table-unified { --day-width: calc((100vw - 116px) / 7); }
  .roster-name-column { width: 105px; min-width: 105px; }
  .roster-employee-copy small, .roster-group-chip { display: none; }
  .roster-summary-strip span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media print {
  .app-sidebar, .mobile-topbar, .mobile-bottom-nav, .roster-tools, .roster-month-bar, .roster-summary-strip, .roster-page-actions, .shift-menu__options { display: none !important; }
  .app-shell { display: block; }
  .page-root { padding: 0; }
  .roster-table-unified { --day-width: 24px; }
  .roster-name-column { position: static; width: 120px; min-width: 120px; }
}

/* v28 — dashboard operations, profile modal, coverage summary and light mode */
.modal-open { overflow: hidden; }
.roster-workspace { display: grid; gap: 12px; }
.roster-employee-button { width: 100%; border: 0; padding: 0; color: inherit; background: transparent; text-align: start; cursor: pointer; }
.roster-employee-button:hover .roster-employee-copy strong { color: #a8cfff; }
.roster-employee-button:focus-visible { border-radius: 10px; outline: 2px solid var(--accent); outline-offset: 3px; }
.roster-employee-copy small { display: none !important; }

.coverage-summary { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.coverage-summary-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); }
.coverage-summary-header h2 { margin: 0; font-size: .9rem; }
.coverage-summary-header p { margin: 4px 0 0; color: var(--muted); font-size: .66rem; }
.coverage-summary-scroll { width: 100%; overflow-x: auto; }
.coverage-summary-table { --day-width: 48px; width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.coverage-summary-table th, .coverage-summary-table td { height: 42px; padding: 4px; border-inline-end: 1px solid var(--line-soft); border-block-end: 1px solid var(--line-soft); text-align: center; }
.coverage-summary-table thead th { background: #151619; }
.coverage-summary-table .roster-day-head, .coverage-summary-value { width: var(--day-width); min-width: var(--day-width); }
.coverage-summary-label { position: sticky; inset-inline-start: 0; z-index: 3; width: 220px; min-width: 220px; padding-inline: 13px !important; background: var(--surface); text-align: start !important; font-size: .72rem; }
.coverage-summary-table thead .coverage-summary-label { z-index: 5; color: var(--muted); background: #151619; }
.coverage-summary-value { font-size: .75rem; font-weight: 900; }
.coverage-summary-table tr[data-token="day"] .coverage-summary-value { color: #ffe0a7; background: color-mix(in srgb, var(--shift-day) 9%, var(--surface)); }
.coverage-summary-table tr[data-token="night"] .coverage-summary-value { color: #c7d0ff; background: color-mix(in srgb, var(--shift-night) 10%, var(--surface)); }
.coverage-summary-table tr[data-token="oc"] .coverage-summary-value { color: #b6f4d7; background: color-mix(in srgb, var(--shift-oc) 9%, var(--surface)); }

.employee-profile-modal { position: fixed; z-index: 140; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.employee-profile-dialog { width: min(1040px, calc(100vw - 36px)); max-height: min(92dvh, 920px); display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; border: 1px solid #34363d; border-radius: 22px; background: #0c0d0f; box-shadow: 0 30px 90px rgba(0,0,0,.6); outline: none; }
.profile-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, #101113), #101113); }
.profile-modal-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.profile-modal-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 52px; aspect-ratio: 1; border-radius: 16px; color: #d7e9ff; background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); font-size: 1.15rem; font-weight: 900; }
.profile-modal-kicker { color: var(--accent); font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.profile-modal-identity h2 { margin: 3px 0 0; font-size: 1.3rem; }
.profile-modal-identity p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.profile-modal-close { display: grid; flex: 0 0 auto; place-items: center; width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--surface-2); font-size: 1.35rem; }
.profile-modal-body { min-height: 0; display: grid; gap: 12px; overflow-y: auto; padding: 16px; }
.profile-modal-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
.profile-modal-metric { min-height: 86px; display: grid; align-content: space-between; gap: 10px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.profile-modal-metric span { color: var(--muted); font-size: .66rem; }
.profile-modal-metric strong { font-size: 1.25rem; }
.profile-modal-metric[data-token="day"] strong { color: var(--shift-day); }
.profile-modal-metric[data-token="night"] strong { color: #8097ff; }
.profile-modal-metric[data-token="oc"] strong { color: #66d7a4; }
.profile-modal-section { padding: 15px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface); }
.profile-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.profile-section-heading h3 { margin: 0; font-size: .9rem; }
.profile-section-heading span { min-width: 27px; min-height: 27px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .68rem; }
.profile-details-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 0; }
.profile-detail { min-width: 0; padding: 11px; border-radius: 12px; background: #0b0c0e; }
.profile-detail dt { color: var(--muted); font-size: .65rem; }
.profile-detail dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 800; }
.profile-schedule-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(44px,1fr)); gap: 6px; }
.profile-schedule-day { min-height: 58px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px solid var(--line-soft); border-radius: 11px; background: #0b0c0e; }
.profile-schedule-day span { color: var(--muted); font-size: .6rem; }
.profile-schedule-day strong { font-size: .72rem; }
.profile-schedule-day[data-token="day"] strong { color: #ffe0a7; }
.profile-schedule-day[data-token="night"] strong { color: #c7d0ff; }
.profile-schedule-day[data-token="oc"] strong { color: #b6f4d7; }
.profile-schedule-day[data-token="leave"] strong { color: #b9e2ff; }
.profile-availability-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.profile-availability-card { min-width: 0; padding: 12px; border-radius: 13px; background: #0b0c0e; }
.profile-availability-card > strong { font-size: .75rem; }
.profile-availability-card p { margin: 10px 0 0; color: var(--muted); font-size: .7rem; }
.profile-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.profile-chip-list span { display: grid; place-items: center; min-width: 29px; min-height: 29px; border-radius: 9px; color: #a8cfff; background: color-mix(in srgb, var(--accent) 11%, var(--surface-2)); font-size: .68rem; font-weight: 900; }
.profile-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.profile-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 9px; color: var(--muted); background: var(--surface-2); font-size: .68rem; }
.profile-history-list { display: grid; gap: 7px; }
.profile-history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border-radius: 11px; background: #0b0c0e; }
.profile-history-item > div:first-child { display: grid; gap: 3px; }
.profile-history-item strong { font-size: .76rem; }
.profile-history-item small { color: var(--muted); font-size: .62rem; }
.profile-history-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.profile-history-stats span { padding: 5px 7px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: .62rem; }
.profile-modal-empty, .profile-notes { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }

/* Daily operations dashboard */
.dashboard-operations { max-width: 1500px; }
.dashboard-ops-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.dashboard-ops-kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-ops-header h1 { margin: 0; font-size: clamp(1.7rem,3vw,2.5rem); }
.dashboard-ops-header p { margin: 7px 0 0; color: var(--muted); font-size: .82rem; }
.dashboard-today-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.dashboard-today-summary article { min-height: 84px; display: grid; align-content: space-between; gap: 10px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 15px; background: var(--surface); }
.dashboard-today-summary span { color: var(--muted); font-size: .68rem; }
.dashboard-today-summary strong { font-size: 1.35rem; }
.dashboard-today-summary article[data-warning="true"] { border-color: color-mix(in srgb,var(--danger) 42%,var(--line)); }
.dashboard-today-summary article[data-warning="true"] strong { color: var(--danger); }
.dashboard-section { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); }
.dashboard-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dashboard-section-header h2 { margin: 0; font-size: 1rem; }
.dashboard-section-header p { margin: 4px 0 0; color: var(--muted); font-size: .68rem; }
.today-shifts-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 9px; }
.today-shift-card { min-width: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: 14px; background: #0b0c0e; }
.today-shift-card[data-status="short"] { border-color: color-mix(in srgb,var(--danger) 38%,var(--line)); }
.today-shift-header { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-bottom: 11px; }
.today-shift-symbol { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 12px; color: var(--text); background: var(--surface-2); font-weight: 900; }
.today-shift-card[data-token="day"] .today-shift-symbol { color: #ffe0a7; background: color-mix(in srgb,var(--shift-day) 24%,var(--surface-2)); }
.today-shift-card[data-token="night"] .today-shift-symbol { color: #c7d0ff; background: color-mix(in srgb,var(--shift-night) 26%,var(--surface-2)); }
.today-shift-header h3 { margin: 0; font-size: .85rem; }
.today-shift-header p { margin: 3px 0 0; color: var(--muted); font-size: .65rem; }
.today-shift-status { display: grid; place-items: center; width: 27px; aspect-ratio: 1; border-radius: 999px; color: #77d6ae; background: color-mix(in srgb,#77d6ae 10%,transparent); font-size: .7rem; font-weight: 900; }
.today-shift-card[data-status="short"] .today-shift-status { color: var(--danger); background: color-mix(in srgb,var(--danger) 10%,transparent); }
.today-team-list { display: flex; flex-wrap: wrap; gap: 6px; }
.today-team-list span { padding: 6px 8px; border-radius: 9px; color: var(--text); background: var(--surface-2); font-size: .68rem; }
.today-team-empty { margin: 0; color: var(--muted); font-size: .7rem; }
.dashboard-oncall-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 8px; }
.dashboard-oncall-person { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 13px; background: #0b0c0e; }
.dashboard-oncall-person > span { display: grid; place-items: center; width: 35px; aspect-ratio: 1; border-radius: 11px; color: #b6f4d7; background: color-mix(in srgb,var(--shift-oc) 16%,var(--surface-2)); font-size: .72rem; font-weight: 900; }
.dashboard-oncall-person > div { display: grid; gap: 3px; min-width: 0; }
.dashboard-oncall-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.dashboard-oncall-person small { color: var(--muted); font-size: .62rem; }
.dashboard-section-empty { margin: 0; color: var(--muted); font-size: .74rem; }
.dashboard-alert-count { display: grid; place-items: center; min-width: 31px; min-height: 31px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .72rem; font-weight: 900; }
.dashboard-alert-list { display: grid; gap: 8px; }
.dashboard-alert-card { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 13px; background: #0b0c0e; }
.dashboard-alert-card[data-token="danger"] { border-inline-start: 3px solid var(--danger); }
.dashboard-alert-card[data-token="warning"] { border-inline-start: 3px solid var(--warning); }
.dashboard-alert-card[data-token="info"] { border-inline-start: 3px solid var(--info); }
.dashboard-alert-icon { display: grid; place-items: center; width: 32px; aspect-ratio: 1; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: .72rem; font-weight: 900; }
.dashboard-alert-card[data-token="danger"] .dashboard-alert-icon { color: var(--danger); }
.dashboard-alert-card[data-token="warning"] .dashboard-alert-icon { color: var(--warning); }
.dashboard-alert-copy { min-width: 0; }
.dashboard-alert-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; color: var(--muted); font-size: .6rem; }
.dashboard-alert-copy strong { display: block; font-size: .76rem; }
.dashboard-alert-copy p { margin: 5px 0 0; color: var(--muted); font-size: .65rem; }
.dashboard-alert-action { min-height: 34px; padding: 5px 9px; font-size: .65rem; }
.dashboard-all-clear { display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 13px; color: #77d6ae; background: color-mix(in srgb,#77d6ae 7%,#0b0c0e); }
.dashboard-all-clear > span { display: grid; place-items: center; width: 36px; aspect-ratio: 1; border-radius: 11px; background: color-mix(in srgb,#77d6ae 12%,transparent); font-weight: 900; }
.dashboard-all-clear strong { font-size: .78rem; }
.dashboard-all-clear p { margin: 4px 0 0; color: var(--muted); font-size: .67rem; }
.dashboard-no-today { display: grid; justify-items: start; gap: 10px; padding: 22px; border: 1px dashed var(--line); border-radius: 17px; background: var(--surface); }
.dashboard-no-today p { margin: 0; color: var(--muted); }

.sidebar-actions { grid-template-columns: repeat(3,1fr); }
.mobile-drawer__actions { grid-template-columns: repeat(3,1fr); }
.theme-control { font-size: 1rem; }

@media (max-width: 900px) {
  .profile-modal-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-today-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .coverage-summary-table { --day-width: calc((100vw - 132px) / 7); }
  .coverage-summary-label { width: 121px; min-width: 121px; padding-inline: 7px !important; font-size: .6rem; }
  .coverage-summary-header { padding: 11px; }
  .coverage-summary-header p { display: none; }
  .employee-profile-modal { place-items: stretch; padding: 0; background: var(--bg); backdrop-filter: none; }
  .employee-profile-dialog { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .profile-modal-header { position: sticky; top: 0; z-index: 5; padding: max(12px,env(safe-area-inset-top)) 12px 12px; }
  .profile-modal-avatar { width: 43px; border-radius: 13px; }
  .profile-modal-identity h2 { max-width: 68vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
  .profile-modal-body { padding: 10px 10px calc(20px + env(safe-area-inset-bottom)); }
  .profile-modal-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .profile-modal-metric { min-height: 72px; padding: 10px; }
  .profile-modal-section { padding: 11px; border-radius: 14px; }
  .profile-details-grid, .profile-availability-grid { grid-template-columns: 1fr; }
  .profile-schedule-grid { grid-template-columns: repeat(7,minmax(0,1fr)); }
  .profile-schedule-day { min-height: 50px; }
  .profile-history-item { align-items: stretch; flex-direction: column; }
  .profile-history-stats { justify-content: flex-start; }
  .dashboard-ops-header { align-items: stretch; flex-direction: column; }
  .dashboard-ops-header .page-actions .button { flex: 1; }
  .dashboard-today-summary { gap: 7px; }
  .dashboard-today-summary article { min-height: 70px; padding: 11px; }
  .dashboard-section { padding: 11px; border-radius: 14px; }
  .today-shifts-grid { grid-template-columns: 1fr; }
  .dashboard-alert-card { grid-template-columns: 30px minmax(0,1fr); }
  .dashboard-alert-action { grid-column: 2; justify-self: start; }
}

/* Full light theme */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --surface-3: #e5e9ed;
  --line: #d5dae0;
  --line-soft: #e5e8ec;
  --text: #15181d;
  --muted: #68707b;
  --accent: #1f73db;
  --accent-strong: #145fb9;
  --danger: #c94747;
  --warning: #b87516;
  --info: #276fc1;
  --shadow: none;
}
[data-theme="light"] html,
[data-theme="light"] body { background: var(--bg) !important; }
[data-theme="light"] .app-sidebar { background: #ffffff; }
[data-theme="light"] .mobile-topbar,
[data-theme="light"] .mobile-bottom-nav { background: rgba(255,255,255,.94); }
[data-theme="light"] .mobile-drawer { background: #ffffff; }
[data-theme="light"] .search-input,
[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .employee-list__toolbar input,
[data-theme="light"] .employee-list__toolbar select,
[data-theme="light"] .setting-field input,
[data-theme="light"] .setting-field select,
[data-theme="light"] .completion-name input,
[data-theme="light"] .setting-field,
[data-theme="light"] .profile-detail,
[data-theme="light"] .profile-schedule-day,
[data-theme="light"] .profile-availability-card,
[data-theme="light"] .profile-history-item,
[data-theme="light"] .today-shift-card,
[data-theme="light"] .dashboard-oncall-person,
[data-theme="light"] .dashboard-alert-card { background: #f8f9fb; }
[data-theme="light"] .roster-table-unified thead th,
[data-theme="light"] .coverage-summary-table thead th,
[data-theme="light"] .coverage-summary-table thead .coverage-summary-label { background: #eef1f4; }
[data-theme="light"] .roster-metric,
[data-theme="light"] .roster-total-row th,
[data-theme="light"] .roster-total-row td { background: #f1f3f5; }
[data-theme="light"] .roster-employee-row:hover .roster-name-column { background: #f3f7fc; }
[data-theme="light"] .shift-menu__options { background: #ffffff; box-shadow: 0 16px 40px rgba(21,24,29,.16); }
[data-theme="light"] .employee-profile-modal { background: rgba(26,31,38,.42); }
[data-theme="light"] .employee-profile-dialog { border-color: var(--line); background: #f6f7f9; box-shadow: 0 30px 90px rgba(21,24,29,.22); }
[data-theme="light"] .profile-modal-header { background: linear-gradient(135deg, color-mix(in srgb,var(--accent) 7%,#fff),#fff); }
[data-theme="light"] .profile-modal-avatar { color: #1559a8; }
[data-theme="light"] .profile-modal-metric,
[data-theme="light"] .profile-modal-section { background: #ffffff; }
[data-theme="light"] .dashboard-all-clear { background: #f2faf6; }
[data-theme="light"] .settings-save-bar { background: rgba(255,255,255,.94); }
[data-theme="light"] .today-shift-card[data-token="day"] .today-shift-symbol,
[data-theme="light"] .shift-pill[data-token="day"] { color: #6d4700; }
[data-theme="light"] .today-shift-card[data-token="night"] .today-shift-symbol,
[data-theme="light"] .shift-pill[data-token="night"] { color: #263f9d; }
[data-theme="light"] .coverage-summary-table tr[data-token="day"] .coverage-summary-value { color: #765006; }
[data-theme="light"] .coverage-summary-table tr[data-token="night"] .coverage-summary-value { color: #344db0; }
[data-theme="light"] .coverage-summary-table tr[data-token="oc"] .coverage-summary-value { color: #177449; }

@media print {
  .coverage-summary { break-inside: avoid; }
  .employee-profile-modal { display: none !important; }
}


/* v29 interaction and accessibility polish */
.today-shift-card-button { width: 100%; color: inherit; text-align: inherit; cursor: pointer; }
.today-shift-card-button:hover { border-color: color-mix(in srgb,var(--accent) 38%,var(--line)); background: color-mix(in srgb,var(--accent) 4%,var(--surface)); }
.today-shift-card-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.employee-profile-dialog:focus { outline: none; }
[data-theme="light"] .today-shift-card-button:hover { background: #f3f7fc; }

/* Settings Control Center v2 */
.settings-page-v2 { max-width: 1680px; padding-bottom: 106px; }
.settings-v2-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.settings-v2-kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.settings-v2-header h1 { margin: 0; font-size: clamp(1.7rem,3vw,2.5rem); letter-spacing: -.025em; }
.settings-v2-header p { max-width: 68ch; margin: 7px 0 0; color: var(--muted); font-size: .8rem; }
.settings-header-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: .7rem; font-weight: 800; }
.settings-header-status i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: #67c89c; }
.settings-header-status[data-dirty='true'] { color: var(--warning); border-color: color-mix(in srgb,var(--warning) 35%,var(--line)); }
.settings-header-status[data-dirty='true'] i { background: var(--warning); }

.settings-presets { display: grid; grid-template-columns: minmax(190px,.72fr) minmax(0,1.8fr); align-items: center; gap: 14px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); }
.settings-presets-copy { display: grid; gap: 5px; }
.settings-presets-copy strong { font-size: .84rem; }
.settings-presets-copy small { color: var(--muted); font-size: .66rem; line-height: 1.55; }
.settings-preset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.settings-preset-card { min-width: 0; min-height: 68px; display: grid; grid-template-columns: 48px minmax(0,1fr) 24px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #0b0c0e; text-align: start; }
.settings-preset-card:hover { border-color: color-mix(in srgb,var(--accent) 45%,var(--line)); }
.settings-preset-card[data-active='true'] { border-color: color-mix(in srgb,var(--accent) 60%,var(--line)); background: color-mix(in srgb,var(--accent) 8%,var(--surface-2)); }
.settings-preset-hours { display: grid; place-items: center; width: 46px; aspect-ratio: 1; border-radius: 12px; color: #a8cfff; background: color-mix(in srgb,var(--accent) 14%,var(--surface-2)); font-size: .82rem; font-weight: 950; }
.settings-preset-card > div { display: grid; min-width: 0; gap: 4px; }
.settings-preset-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.settings-preset-card small { overflow: hidden; color: var(--muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.settings-preset-card i { color: var(--muted); font-style: normal; }
.settings-preset-card[data-active='true'] i { color: var(--accent); }

.settings-validation, .settings-impact-notice { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; padding: 13px 14px; border: 1px solid color-mix(in srgb,var(--danger) 42%,var(--line)); border-radius: 15px; color: var(--danger); background: color-mix(in srgb,var(--danger) 7%,var(--surface)); }
.settings-validation { display: grid; gap: 7px; }
.settings-validation strong { font-size: .78rem; }
.settings-validation ul { display: grid; gap: 5px; margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: .68rem; }
.settings-impact-notice { color: var(--warning); border-color: color-mix(in srgb,var(--warning) 38%,var(--line)); background: color-mix(in srgb,var(--warning) 6%,var(--surface)); }
.settings-impact-notice > span { display: grid; flex: 0 0 auto; place-items: center; width: 31px; aspect-ratio: 1; border-radius: 10px; background: color-mix(in srgb,var(--warning) 15%,transparent); font-weight: 950; }
.settings-impact-notice strong { display: block; font-size: .76rem; }
.settings-impact-notice p { margin: 4px 0 0; color: var(--muted); font-size: .65rem; }

.settings-layout-v2 { display: grid; grid-template-columns: minmax(220px,260px) minmax(420px,1fr) minmax(220px,280px); gap: 12px; align-items: start; }
.settings-nav { position: sticky; top: 18px; display: grid; gap: 5px; padding: 7px; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); }
.settings-nav-item { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid transparent; border-radius: 12px; color: var(--muted); background: transparent; text-align: start; }
.settings-nav-item:hover { color: var(--text); background: var(--surface-2); }
.settings-nav-item[data-active='true'] { color: var(--text); border-color: color-mix(in srgb,var(--accent) 28%,var(--line)); background: color-mix(in srgb,var(--accent) 8%,var(--surface-2)); }
.settings-nav-icon { display: grid; place-items: center; width: 32px; aspect-ratio: 1; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: .7rem; font-weight: 900; }
.settings-nav-item[data-active='true'] .settings-nav-icon { color: var(--accent); background: color-mix(in srgb,var(--accent) 13%,var(--surface-2)); }
.settings-nav-copy { display: grid; min-width: 0; gap: 3px; }
.settings-nav-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.settings-nav-copy small { overflow: hidden; color: var(--muted); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav-count { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .61rem; font-weight: 850; }

.settings-content-v2 { min-width: 0; }
.settings-panel { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); }
.settings-panel-header { min-height: 82px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(110deg,color-mix(in srgb,var(--accent) 5%,var(--surface)),var(--surface)); }
.settings-panel-icon { display: grid; flex: 0 0 auto; place-items: center; width: 43px; aspect-ratio: 1; border-radius: 13px; color: var(--accent); background: color-mix(in srgb,var(--accent) 12%,var(--surface-2)); font-size: .82rem; font-weight: 950; }
.settings-panel-header h2 { margin: 0; font-size: 1rem; }
.settings-panel-header p { margin: 5px 0 0; color: var(--muted); font-size: .66rem; }
.settings-field-list { display: grid; }
.settings-field-row { min-height: 78px; display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,200px); align-items: center; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.settings-field-row:last-child { border-bottom: 0; }
.settings-field-row:hover { background: rgba(255,255,255,.014); }
.settings-field-row[data-disabled='true'] { opacity: .45; }
.settings-field-row--toggle { grid-template-columns: minmax(0,1fr) auto; }
.settings-field-copy { min-width: 0; }
.settings-field-label { display: block; color: var(--text); font-size: .76rem; font-weight: 850; cursor: pointer; }
.settings-field-copy p { max-width: 68ch; margin: 5px 0 0; color: var(--muted); font-size: .62rem; line-height: 1.55; }
.settings-field-control { width: 100%; }
.settings-field-control input, .settings-field-control select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 8px 11px; color: var(--text); background: #0b0c0e; outline: none; }
.settings-field-control input:focus, .settings-field-control select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 11%,transparent); }
.settings-field-control input:disabled, .settings-field-control select:disabled { cursor: not-allowed; }
.settings-switch { position: relative; display: inline-grid; cursor: pointer; }
.settings-switch input { position: absolute; inset: 0; z-index: 2; opacity: 0; cursor: pointer; }
.settings-switch-track { position: relative; display: block; width: 50px; height: 29px; border: 1px solid var(--line); border-radius: 999px; background: #090a0c; transition: .16s ease; }
.settings-switch-thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 21px; aspect-ratio: 1; border-radius: 50%; background: #686b72; transition: .16s ease; }
.settings-switch input:checked + .settings-switch-track { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 24%,#090a0c); }
.settings-switch input:checked + .settings-switch-track .settings-switch-thumb { inset-inline-start: 24px; background: var(--accent); }
.settings-switch input:focus-visible + .settings-switch-track { outline: 3px solid color-mix(in srgb,var(--accent) 38%,transparent); outline-offset: 3px; }

.settings-live-summary { position: sticky; top: 18px; display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); }
.settings-live-summary > header { display: grid; gap: 4px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); }
.settings-live-summary > header span { color: var(--muted); font-size: .61rem; }
.settings-live-summary > header strong { font-size: .92rem; }
.settings-shift-preview { display: grid; gap: 7px; }
.settings-shift-preview article { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 12px; background: #0b0c0e; }
.settings-shift-preview article > span { display: grid; place-items: center; width: 35px; aspect-ratio: 1; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: .72rem; font-weight: 950; }
.settings-shift-preview article[data-token='day'] > span { color: #ffe0a7; background: color-mix(in srgb,var(--shift-day) 28%,var(--surface-2)); }
.settings-shift-preview article[data-token='night'] > span { color: #c7d0ff; background: color-mix(in srgb,var(--shift-night) 30%,var(--surface-2)); }
.settings-shift-preview article[data-token='morning'] > span { color: #a9efd4; background: color-mix(in srgb,var(--shift-morning) 26%,var(--surface-2)); }
.settings-shift-preview article[data-token='evening'] > span { color: #ffd0ad; background: color-mix(in srgb,var(--shift-evening) 26%,var(--surface-2)); }
.settings-shift-preview article > div { display: grid; min-width: 0; gap: 3px; }
.settings-shift-preview strong { font-size: .7rem; }
.settings-shift-preview small { color: var(--muted); font-size: .58rem; }
.settings-summary-list { display: grid; gap: 0; margin: 0; }
.settings-summary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.settings-summary-list > div:last-child { border-bottom: 0; }
.settings-summary-list dt { color: var(--muted); font-size: .61rem; }
.settings-summary-list dd { margin: 0; font-size: .68rem; font-weight: 850; }

.settings-action-bar-v2 { position: fixed; z-index: 36; inset-inline: calc(var(--sidebar) + var(--content-gutter)) var(--content-gutter); bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(16,17,19,.94); box-shadow: 0 18px 50px rgba(0,0,0,.32); backdrop-filter: blur(18px); }
.settings-action-copy { display: grid; gap: 3px; min-width: 0; }
.settings-action-copy strong { font-size: .72rem; }
.settings-action-copy small { overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.settings-action-buttons { display: flex; align-items: center; gap: 7px; }
.settings-action-buttons .button { min-height: 40px; padding: 7px 11px; font-size: .68rem; white-space: nowrap; }
.settings-save-button:disabled { opacity: .42; cursor: not-allowed; }

@media (max-width: 1350px) {
  .settings-layout-v2 { grid-template-columns: minmax(210px,240px) minmax(0,1fr); }
  .settings-live-summary { position: static; grid-column: 1 / -1; grid-template-columns: minmax(170px,.5fr) minmax(0,1.4fr) minmax(240px,1fr); align-items: center; }
  .settings-live-summary > header { padding: 0 12px 0 0; border-bottom: 0; border-inline-end: 1px solid var(--line-soft); }
  .settings-shift-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 1100px) {
  .settings-action-bar-v2 { inset-inline: var(--content-gutter); bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (max-width: 850px) {
  .settings-v2-header { align-items: stretch; flex-direction: column; }
  .settings-header-status { align-self: flex-start; }
  .settings-presets { grid-template-columns: 1fr; }
  .settings-layout-v2 { display: block; }
  .settings-nav { position: sticky; top: 64px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; margin-bottom: 9px; padding: 6px; border-radius: 14px; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav-item { flex: 0 0 auto; min-height: 42px; grid-template-columns: 28px auto auto; padding: 6px 8px; }
  .settings-nav-icon { width: 27px; border-radius: 8px; }
  .settings-nav-copy small { display: none; }
  .settings-nav-copy strong { max-width: 145px; font-size: .67rem; }
  .settings-panel { margin-bottom: 9px; }
  .settings-live-summary { display: grid; grid-template-columns: 1fr; margin-top: 9px; }
  .settings-live-summary > header { padding: 0 0 10px; border-inline-end: 0; border-bottom: 1px solid var(--line-soft); }
  .settings-shift-preview { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
}

@media (max-width: 700px) {
  .settings-page-v2 { padding-bottom: 155px; }
  .settings-v2-header { margin-bottom: 9px; }
  .settings-v2-header h1 { font-size: 1.4rem; }
  .settings-v2-header p { font-size: .68rem; }
  .settings-preset-grid { grid-template-columns: 1fr; }
  .settings-preset-card { min-height: 60px; }
  .settings-panel-header { min-height: 72px; padding: 12px; }
  .settings-panel-icon { width: 38px; border-radius: 11px; }
  .settings-field-row, .settings-field-row--toggle { grid-template-columns: minmax(0,1fr) auto; gap: 10px; min-height: 70px; padding: 11px 12px; }
  .settings-field-row:not(.settings-field-row--toggle) { grid-template-columns: 1fr; }
  .settings-field-control { width: 100%; }
  .settings-field-copy p { font-size: .58rem; }
  .settings-action-bar-v2 { align-items: stretch; flex-direction: column; gap: 8px; inset-inline: 9px; bottom: calc(78px + env(safe-area-inset-bottom)); padding: 9px; }
  .settings-action-copy { padding-inline: 4px; }
  .settings-action-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-action-buttons .settings-save-button { grid-column: 1 / -1; grid-row: 1; }
  .settings-action-buttons .button { width: 100%; }
}

@media (max-width: 380px) {
  .settings-presets-copy small, .settings-action-copy small { display: none; }
  .settings-nav-copy strong { max-width: 105px; }
  .settings-live-summary { padding: 11px; }
}

/* Settings v2 light mode */
[data-theme='light'] .settings-preset-card,
[data-theme='light'] .settings-field-control input,
[data-theme='light'] .settings-field-control select,
[data-theme='light'] .settings-shift-preview article { background: #f8f9fb; }
[data-theme='light'] .settings-panel-header { background: linear-gradient(110deg,color-mix(in srgb,var(--accent) 5%,#fff),#fff); }
[data-theme='light'] .settings-field-row:hover { background: #fafbfd; }
[data-theme='light'] .settings-switch-track { background: #e4e7eb; }
[data-theme='light'] .settings-switch input:checked + .settings-switch-track { background: color-mix(in srgb,var(--accent) 18%,#e4e7eb); }
[data-theme='light'] .settings-action-bar-v2 { background: rgba(255,255,255,.95); box-shadow: 0 18px 45px rgba(21,24,29,.15); }

@media print {
  .settings-action-bar-v2, .settings-presets, .settings-nav, .settings-live-summary { display: none !important; }
  .settings-layout-v2 { display: block; }
}
.settings-regenerate-button { color: var(--warning); border-color: color-mix(in srgb,var(--warning) 38%,var(--line)); background: color-mix(in srgb,var(--warning) 8%,var(--surface-2)); }
.settings-regenerate-button:hover { border-color: var(--warning); background: color-mix(in srgb,var(--warning) 13%,var(--surface-2)); }
.settings-regenerate-button:disabled { opacity: .42; cursor: not-allowed; }
@media (max-width: 700px) {
  .settings-action-buttons:has(.settings-regenerate-button) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-action-buttons .settings-regenerate-button { grid-column: 1 / -1; grid-row: 2; }
}

/* v32 — readable roster modes */
.roster-tools { grid-template-columns: minmax(260px,1fr) 170px auto; align-items: stretch; }
.roster-view-switch { display: inline-grid; grid-template-columns: repeat(3,minmax(54px,auto)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.roster-view-option { min-height: 38px; border: 0; border-radius: 9px; padding: 6px 11px; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 850; }
.roster-view-option:hover { color: var(--text); background: var(--surface-2); }
.roster-view-option[data-active="true"] { color: #fff; background: var(--accent); }
.roster-summary-strip[data-columns="3"] { grid-template-columns: repeat(3,1fr); }
.roster-summary-strip[data-columns="4"] { grid-template-columns: repeat(4,1fr); }
.roster-summary-strip article { min-height: 62px; }
.roster-table-scroll { scrollbar-gutter: stable; }
.roster-table-unified { --day-width: 62px; }
.roster-workspace[data-day-view="7"] .roster-table-unified,
.roster-workspace[data-day-view="7"] .coverage-summary-table { --day-width: 78px; }
.roster-workspace[data-day-view="14"] .roster-table-unified,
.roster-workspace[data-day-view="14"] .coverage-summary-table { --day-width: 62px; }
.roster-workspace[data-day-view="31"] .roster-table-unified,
.roster-workspace[data-day-view="31"] .coverage-summary-table { --day-width: 50px; }
.roster-table-unified th, .roster-table-unified td { height: 60px; }
.roster-day-head { height: 70px !important; }
.roster-weekday { font-size: .66rem; }
.roster-date { width: 29px; font-size: .82rem; }
.roster-name-column { width: 270px; min-width: 270px; padding-inline: 15px !important; }
.roster-employee { grid-template-columns: 36px minmax(0,1fr) 28px; gap: 11px; }
.roster-avatar { width: 36px; font-size: .78rem; }
.roster-employee-copy strong { font-size: .9rem; line-height: 1.25; }
.roster-group-chip { min-width: 27px; min-height: 25px; font-size: .68rem; }
.roster-group-chip[data-token="admin"] { color: var(--shift-admin); border: 1px solid color-mix(in srgb,var(--shift-admin) 38%,var(--line)); background: color-mix(in srgb,var(--shift-admin) 8%,var(--surface)); }
.roster-group-chip[data-token="day"] { color: var(--shift-day); }
.roster-group-chip[data-token="night"] { color: #9eacff; }
.shift-pill { width: 40px; min-height: 36px; border-radius: 10px; font-size: .75rem; }
.shift-pill[data-token="admin"] { color: var(--shift-admin); border-color: color-mix(in srgb,var(--shift-admin) 32%,var(--line)); background: color-mix(in srgb,var(--shift-admin) 9%,var(--surface)); }
.shift-pill[data-token="off"] { color: color-mix(in srgb,var(--muted) 48%,transparent); font-size: .82rem; }
.roster-employee-row[data-group-start="true"] > * { border-block-start: 3px solid color-mix(in srgb,var(--accent) 22%,var(--line)); }
.roster-metric { width: 68px; min-width: 68px; position: sticky; z-index: 4; background: color-mix(in srgb,var(--surface-2) 82%,var(--surface)); }
.roster-metric-oncall { inset-inline-end: 0; }
.roster-metric-hours { inset-inline-end: 68px; }
.roster-metric-shifts { inset-inline-end: 136px; box-shadow: -10px 0 18px -18px rgba(0,0,0,.8); }
[dir="rtl"] .roster-metric-shifts { box-shadow: 10px 0 18px -18px rgba(0,0,0,.8); }
.roster-table-unified thead .roster-metric { z-index: 8; }
.coverage-summary-label { width: 270px; min-width: 270px; }
.coverage-summary-table th, .coverage-summary-table td { height: 48px; }

[data-theme="light"] .roster-board,
[data-theme="light"] .coverage-summary { border-color: #c8ced8; box-shadow: 0 8px 28px rgba(33,43,54,.07); }
[data-theme="light"] .roster-table-unified thead th,
[data-theme="light"] .coverage-summary-table thead th { color: #394354; background: #e8ecf2; }
[data-theme="light"] .roster-name-column { background: #fff; }
[data-theme="light"] .roster-metric { color: #596579; background: #eef1f5; }
[data-theme="light"] .roster-day-head[data-weekend="true"],
[data-theme="light"] .roster-day-cell[data-weekend="true"] { background: #fff8e8; }
[data-theme="light"] .shift-pill[data-token="admin"] { color: #6650b7; background: #f3f0ff; }
[data-theme="light"] .shift-pill[data-token="off"] { color: #a0a7b2; }
[data-theme="light"] .roster-employee-button:hover .roster-employee-copy strong { color: #1559a8; }

@media (max-width: 1100px) {
  .roster-tools { grid-template-columns: minmax(0,1fr) 150px; }
  .roster-view-switch { grid-column: 1 / -1; width: fit-content; }
  .roster-name-column { width: 220px; min-width: 220px; }
  .coverage-summary-label { width: 220px; min-width: 220px; }
}
@media (max-width: 700px) {
  .roster-tools { grid-template-columns: minmax(0,1fr) 44px; }
  .roster-view-switch { width: 100%; grid-template-columns: repeat(3,1fr); }
  .roster-view-option { min-height: 36px; }
  .roster-admin-toggle { display: none; }
  .roster-summary-strip article { min-height: 56px; }
  .roster-workspace[data-day-view] .roster-table-unified,
  .roster-workspace[data-day-view] .coverage-summary-table { --day-width: calc((100vw - 142px) / 7); }
  .roster-name-column { width: 131px; min-width: 131px; padding-inline: 8px !important; }
  .coverage-summary-label { width: 131px; min-width: 131px; }
  .roster-table-unified th, .roster-table-unified td { height: 50px; }
  .roster-day-head { height: 58px !important; }
  .roster-employee-copy strong { font-size: .69rem; }
  .shift-pill { width: min(32px,calc(var(--day-width) - 5px)); min-height: 29px; font-size: .62rem; }
  .roster-metric { display: none; position: static; }
}
