/* Header layout shared by both themes. */
.main { margin-left: 0; width: 100%; }
.topbar { padding: 0 36px; background: #fff; border-bottom: 1px solid #efefef; }
.topbar .topbar-panel { display: grid; grid-template-columns: minmax(180px,1fr) auto minmax(240px,1fr); align-items: center; gap: 30px; min-height: 88px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.header-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; color: #313131; }
.header-brand > span { font-size: 13px; color: #868686; font-weight: 400; letter-spacing: 0; }
.header-nav { display: flex; flex-direction: row; align-items: center; gap: 32px; align-self: stretch; }
.header-nav-button { position: relative; padding: 0; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: #848484; font-size: 15px; font-weight: 400; }
.header-nav-button:hover:where(:not(html[data-hover-disabled] *)) { color: #313131; }
.header-nav-button.active { color: #292929; font-weight: 500; }
.header-nav-button.active::after { content: ''; position: absolute; bottom: 14px; left: 0; right: 0; height: 2px; border-radius: 2px; background: #565656; }
.topbar-actions { justify-self: end; gap: 12px; }
.topbar-actions > .action-icon, .create-menu > .create-trigger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; min-width: 40px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #767676; box-shadow: none; }
.topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)), .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #313131; }
.create-menu > .create-trigger .icon { width: 21px; height: 21px; }
.profile-menu { margin-left: 6px; padding-left: 18px; border-left: 1px solid #e9e9e9; }
.profile-menu > .profile-trigger { width: auto; min-height: 48px; height: auto; gap: 12px; border: 0; border-radius: 10px; padding: 0; background: transparent; box-shadow: none; }
.profile-menu > .profile-trigger .avatar { width: 42px; height: 42px; border-radius: 50%; }
.profile-summary-name { display: flex; flex-direction: column; align-items: flex-start; max-width: 150px; gap: 4px; }
.profile-summary-name strong { font-size: 15px; font-weight: 500; color: #353535; }
.profile-summary-name > span { display: block; font-size: 13px; color: #868686; }
.workspace { padding-top: 32px; max-width: 1680px; }
.login-theme-toggle { position: absolute; top: 22px; right: 24px; }
.login-form { position: relative; padding-top: 76px; }
/* Neutral graphite palette with restrained gray accents. */
html[data-theme='dark'] { color-scheme: dark; --ink: var(--theme-text,var(--ink)); --muted: #a7a7a7; --line: #1a1c20; --workspace-bg: #111214; --surface: #1a1c20; --blue: #e2e2e2; }
[data-theme='dark'] body, [data-theme='dark'] .shell { background: var(--workspace-bg); color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .topbar { background: var(--workspace-bg); border-bottom-color: #1a1c20; }
[data-theme='dark'] .header-brand { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .header-brand > span { color: #a7a7a7; }
[data-theme='dark'] .header-nav-button { color: #a7a7a7; }
[data-theme='dark'] .header-nav-button:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .header-nav-button.active { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .header-nav-button.active::after { background: #cbcbcb; }
[data-theme='dark'] .topbar-actions > .action-icon, [data-theme='dark'] .create-menu > .create-trigger { color: #e2e2e2; background: transparent; }
[data-theme='dark'] .topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)) { color: #e2e2e2; background: var(--surface-subtle-hover); }
[data-theme='dark'] .profile-menu { border-left-color: #1a1c20; }
[data-theme='dark'] .profile-summary-name strong { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .profile-summary-name > span { color: #a7a7a7; }
[data-theme='dark'] .muted, [data-theme='dark'] .eyebrow { color:var(--muted); }
[data-theme='dark'] .page-heading p, [data-theme='dark'] .section-heading p, [data-theme='dark'] .panel-head p { color: #a7a7a7; }
[data-theme='dark'] .mini-person, [data-theme='dark'] .employee-card, [data-theme='dark'] .panel, [data-theme='dark'] .profile-dropdown, [data-theme='dark'] dialog { background: var(--surface); color: var(--theme-text,var(--ink)); border: 1px solid #1a1c20; box-shadow: 0 12px 32px #1112140c; }
[data-theme='dark'] .mini-person:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #383b40; box-shadow: 0 12px 30px #11121420; }
[data-theme='dark'] .mini-person.selected { background: var(--surface); border-color: #828282; box-shadow: inset 0 0 0 .5px #cbcbcb, 0 8px 22px #11121415; }
[data-theme='dark'] .mini-person-name strong { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .mini-surname, [data-theme='dark'] .mini-status { color: #a7a7a7; }
[data-theme='dark'] .mini-status.working { color: #e2e2e2; }
[data-theme='dark'] .mini-status.working::before { background: #cacad6; }
[data-theme='dark'] .mini-person-top > .icon { color: #a7a7a7; }
[data-theme='dark'] .mini-person-bottom { border-top-color: #1a1c20; }
[data-theme='dark'] .mini-person-bottom > span:first-child { color: #cbcbcb; }
[data-theme='dark'] .mini-person-bottom > span:last-child { color: #a7a7a7; }
[data-theme='dark'] .mini-person-bottom b { color: #e2e2e2; }
[data-theme='dark'] .mini-team-heading h2 > span, [data-theme='dark'] .pill { background: var(--surface); color: #e2e2e2; border-color: transparent; }
[data-theme='dark'] .mini-team-heading > .muted { color: #a7a7a7; }
[data-theme='dark'] .summary-toolbar { border-color: #1a1c20; }
[data-theme='dark'] .quiet-stats, [data-theme='dark'] .period { color: #a7a7a7; }
[data-theme='dark'] .quiet-stats strong { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .quiet-stats small { color: #cbcbcb; }
[data-theme='dark'] input, [data-theme='dark'] select, [data-theme='dark'] textarea { background: var(--surface); color: #e2e2e2; border-color: #383b40; }

[data-theme='dark'] .period input, [data-theme='dark'] .schedule-filter select { background: var(--surface); color: #e2e2e2; border-color: #1a1c20; }
[data-theme='dark'] .action-icon, [data-theme='dark'] .button, [data-theme='dark'] .icon-button { color: #e2e2e2; background: var(--surface); border-color: #383b40; }
[data-theme='dark'] .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .icon-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: var(--theme-text,var(--ink)); border-color: #828282; }
[data-theme='dark'] .button.primary, [data-theme='dark'] .add-shift-icon { background: #cbcbcb; border-color: #cbcbcb; color: #1a1c20; box-shadow: none; }
[data-theme='dark'] .button.primary:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .add-shift-icon:hover:where(:not(html[data-hover-disabled] *)) { background: #e2e2e2; border-color: #e2e2e2; color: #1a1c20; }
[data-theme='dark'] .text-button { color:var(--muted); }
[data-theme='dark'] .text-button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
[data-theme='dark'] .danger { color: var(--danger); }
[data-theme='dark'] .profile-dropdown-heading, [data-theme='dark'] .profile-dropdown > #logout { border-color: #1a1c20; }
[data-theme='dark'] .profile-dropdown-heading strong { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .profile-dropdown-heading > span { color: #a7a7a7; }
[data-theme='dark'] .profile-dropdown > button { color: #e2e2e2; }
[data-theme='dark'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='dark'] .profile-dropdown > button .icon { color: #a7a7a7; }
[data-theme='dark'] .calendar-corner, [data-theme='dark'] .employee-cell, [data-theme='dark'] .day-head { background: var(--surface); border-color: #1a1c20; }
[data-theme='dark'] .calendar-grid { border-top-color: #1a1c20; }
[data-theme='dark'] .calendar-cell { border-color: #1a1c20; }
[data-theme='dark'] .calendar-corner, [data-theme='dark'] .employee-cell b { color: #e2e2e2; }
[data-theme='dark'] .calendar-corner small, [data-theme='dark'] .employee-cell small, [data-theme='dark'] .day-head > span { color: #a7a7a7; }
[data-theme='dark'] .day-head strong { color: #e2e2e2; }
[data-theme='dark'] .day-head.is-today, [data-theme='dark'] .today-cell { background: var(--surface); }
[data-theme='dark'] .day-head.is-today strong { background: #cbcbcb; color: #1a1c20; }
[data-theme='dark'] .shift { background: var(--surface); border-color: #383b40; color: #e2e2e2; }
[data-theme='dark'] .shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #828282; }
[data-theme='dark'] .shift small { color: #cbcbcb; }
[data-theme='dark'] .shift.completed { background: var(--surface); border-color: #383b40; color: #cbcbcb; }
[data-theme='dark'] .shift.completed small { color: #cbcbcb; }
[data-theme='dark'] .empty-slot { color: #575757; background: transparent; border-color: transparent; }
[data-theme='dark'] .empty-slot:hover:where(:not(html[data-hover-disabled] *)) { color: #cbcbcb; background: var(--surface-subtle-hover); border-color: #575757; }
[data-theme='dark'] .calendar-legend { color: #a7a7a7; border-top-color: #1a1c20; }
[data-theme='dark'] .legend-square { background: #a7a7a7; }
[data-theme='dark'] .legend-square.filled { background: var(--surface-subtle); }
[data-theme='dark'] .calendar-scroll { scrollbar-color: #575757 #1a1c20; }
[data-theme='dark'] .calendar-controls .button, [data-theme='dark'] .calendar-controls .icon-button { background: var(--surface); color: #e2e2e2; }
[data-theme='dark'] .employee-card-head .muted, [data-theme='dark'] .employee-hours dt { color: #a7a7a7; }
[data-theme='dark'] .employee-symbol { background: var(--surface); color: #cbcbcb; }
[data-theme='dark'] .employee-schedule { background: var(--surface); color: #e2e2e2; }
[data-theme='dark'] .employee-schedule > span { color: #cbcbcb; }
[data-theme='dark'] .employee-hours > div { border-color: #383b40; }
[data-theme='dark'] .employee-card-footer { border-color: #383b40; }
[data-theme='dark'] .employee-card-footer > span { color: #a7a7a7; }
[data-theme='dark'] .next-shift-hero { background: var(--surface); border-color: #383b40; box-shadow: none; }
[data-theme='dark'] .next-shift-hero .eyebrow { color: #cbcbcb; }
[data-theme='dark'] .next-shift-hero p, [data-theme='dark'] .hero-duration > span:last-child { color: #cbcbcb; }
[data-theme='dark'] .hero-icon { background: var(--surface); border-color: #575757; color: #e2e2e2; }
[data-theme='dark'] .personal-shift { border-color: #1a1c20; }
[data-theme='dark'] .date-tile { background: var(--surface); }
[data-theme='dark'] .date-tile > span { color: #cbcbcb; }
[data-theme='dark'] .badge { background: var(--surface-subtle); color: #e2e2e2; }
[data-theme='dark'] .badge.done { background: var(--surface); color: #cbcbcb; }
[data-theme='dark'] .shift-card-end strong small, [data-theme='dark'] .shift-card-end .muted { color: #a7a7a7; }
[data-theme='dark'] .empty { color: #a7a7a7; }
[data-theme='dark'] .empty h3 { color: #e2e2e2; }
[data-theme='dark'] dialog::backdrop { background: #111214b0; }
[data-theme='dark'] .modal-head .icon-button { background: var(--surface); color: #e2e2e2; }
[data-theme='dark'] .field-hint, [data-theme='dark'] .form-divider span { color: #a7a7a7; }
[data-theme='dark'] .form-divider, [data-theme='dark'] .profile-fields > div { border-color: #383b40; }
[data-theme='dark'] .profile-fields dt { color: #cbcbcb; }
[data-theme='dark'] .form-error { color: var(--danger); }
[data-theme='dark'] .workspace-footer, [data-theme='dark'] .workspace-footer > span:first-child { color: #a7a7a7; }
[data-theme='dark'] #toast { background: #e2e2e2; color: #1a1c20; box-shadow: 0 10px 30px #00000033; }
[data-theme='dark'] .login { background: var(--workspace-bg); }
[data-theme='dark'] .login-story h1, [data-theme='dark'] .login-story .brand { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .login-story .brand-mark, [data-theme='dark'] .login-story .accent { color: #cbcbcb; }
[data-theme='dark'] .login-story p, [data-theme='dark'] .story-bottom { color: #a7a7a7; }
[data-theme='dark'] .login-form { background: var(--surface); box-shadow: none; }
[data-theme='dark'] .login-help, [data-theme='dark'] .login-form footer { color: #a7a7a7; }
[data-theme='dark'] .demo { border-top-color: #383b40; }
[data-theme='dark'] .demo > span, [data-theme='dark'] .demo small { color: #a7a7a7; }
[data-theme='dark'] .demo .button { background: var(--surface); color: #e2e2e2; border-color: #383b40; }
[data-theme='dark'] .demo .button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); }
[data-theme='dark'] .password-field button { color: #cbcbcb; }
[data-theme='dark'] .loading span { color: #a7a7a7; }
@media (max-width: 1100px) {
 .topbar { padding: 0 28px; }
 .topbar .topbar-panel { grid-template-columns: 1fr auto; column-gap: 20px; row-gap: 0; padding: 18px 0 0; }
 .header-brand { font-size: 18px; }
 .header-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 36px; min-height: 54px; }
 .header-nav-button.active::after { bottom: 5px; }
 .topbar-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 650px) {
 .topbar { padding: 0 20px; }
 .topbar .topbar-panel { min-height: 100px; gap: 6px 12px; padding-top: 16px; }
 .header-brand { font-size: 17px; letter-spacing: -.4px; }
 .header-brand > span { font-size: 13px; }
 .topbar-actions { gap: 4px; }
 .topbar-actions > .action-icon, .create-menu > .create-trigger { width: 34px; height: 38px; min-width: 34px; min-height: 38px; border-radius: 9px; }
 .topbar-actions > #header-today { display: none; }
 .profile-menu { margin-left: 4px; padding-left: 10px; }
 .profile-menu > .profile-trigger { min-height: 38px; }
 .profile-menu > .profile-trigger .avatar { width: 36px; height: 36px; }
 .profile-summary-name { display: none; }
 .header-nav { gap: 30px; min-height: 52px; justify-content: flex-start; }
 .header-nav-button { font-size: 15px; }
 .create-dropdown { left: auto; right: -70px; }
 .workspace { padding-top: 24px; }
 .login-form { padding-top: 80px; }
}

/* Primary actions remain dark, rather than becoming bright accents. */
[data-theme='dark'] .button.primary, [data-theme='dark'] .add-shift-icon {
 background: var(--surface-subtle); border-color: #535353; color: var(--theme-text,var(--ink));
}
[data-theme='dark'] .button.primary:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .add-shift-icon:hover:where(:not(html[data-hover-disabled] *)) {
 background: var(--surface-subtle-hover); border-color: #686868; color: var(--theme-text,var(--ink));
}
[data-theme='dark'] #toast { background: var(--surface-subtle); color: var(--theme-text,var(--ink)); }
/* Calm segmented navigation with a clear active surface. */
.header-nav {
 align-self: center; gap: 4px; min-height: 0;
 padding: 5px; border-radius: 15px; background: #ededed;
}
.header-nav-button {
 display: inline-flex; align-items: center; justify-content: center; gap: 9px;
 min-height: 40px; padding: 10px 18px; border-radius: 11px;
 font-size: 14px; color: #757575; line-height: 1.4;
}
.header-nav-button .icon { width: 17px; height: 17px; }
.header-nav-button.active { background: #fff; color: #343434; box-shadow: 0 2px 6px #26262608; }
.header-nav-button.active::after { display: none; }
[data-theme='dark'] .header-nav { background: var(--surface); }
[data-theme='dark'] .header-nav-button { color: #a7a7a7; }
[data-theme='dark'] .header-nav-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #e2e2e2; }
[data-theme='dark'] .header-nav-button.active { background: var(--surface); color: var(--theme-text,var(--ink)); box-shadow: inset 0 1px 0 #f5f5f508, 0 2px 6px #00000022; }
@media (max-width: 1100px) {
 .header-nav { justify-self: center; margin: 8px 0 14px; }
}
@media (max-width: 650px) {
 .header-nav { justify-self: stretch; margin: 8px 0 14px; gap: 4px; }
 .header-nav-button { flex: 1; padding: 10px 12px; }
}
/* Short feedback, with no moving page or looping animation. */
@media (prefers-reduced-motion: no-preference) {
 .header-nav-button, .action-icon, .button, .icon-button, .shift,
 .mini-person, .create-menu > .create-trigger, .profile-menu > .profile-trigger,
 .profile-dropdown > button {
  transition: background-color 160ms ease, color 160ms ease,
   box-shadow 180ms ease, border-color 180ms ease, transform 160ms ease;
 }
 .mini-person:hover:where(:not(html[data-hover-disabled] *)) { transform: translateY(-2px); }
 .action-icon:active, .button:active, .icon-button:active,
 .create-menu > .create-trigger:active { transform: scale(.96); }
 details[open] > .profile-dropdown { animation: menu-appear 150ms ease-out both; transform-origin: top right; }
 dialog[open] { animation: dialog-appear 180ms ease-out both; }
 dialog[open]::backdrop { animation: backdrop-appear 160ms ease-out both; }
 @keyframes menu-appear { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
 @keyframes dialog-appear { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
 @keyframes backdrop-appear { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
 .mini-person:hover:where(:not(html[data-hover-disabled] *)) { transform: none; }
}
/* Picker labels share one state contract across forms, filters and themes. */
html[data-theme] :is(.custom-select-trigger,.date-trigger,.calendar-location-button,.director-location-trigger,.context-location-trigger,.date-month-selects>select,select[data-custom-select='native-time']) { color:var(--muted)!important; }
html[data-theme] :is(.custom-select-trigger,.date-trigger,.calendar-location-button,.director-location-trigger,.context-location-trigger)>:is(span,.icon),
html[data-theme] .custom-select-trigger>.calendar-position-symbol>.icon { color:inherit!important; }
/* A chosen identity is primary text; picker icons and empty prompts retain the control contract. */
html[data-theme] .person-select-trigger[data-person-selected] > span:first-child {
 color:var(--ink)!important;
 font-weight:var(--person-name-weight);
}
html[data-theme] :is(.custom-select-trigger,.date-trigger,.calendar-location-button,.director-location-trigger,.context-location-trigger,.date-month-selects>select,select[data-custom-select='native-time']):not(:disabled):hover:where(:not(html[data-hover-disabled] *)),
html[data-theme] :is(.custom-select-trigger,.date-trigger,.calendar-location-button,.director-location-trigger,.context-location-trigger,.date-month-selects>select,select[data-custom-select='native-time']):not(:disabled):is(:focus-visible,[aria-expanded='true']) { color:var(--ink)!important; }

/* App-owned date picker: native values, consistent presentation. */
.date-field { display: block; min-width: 0; width: 100%; }
.date-trigger { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid #e5e5e5; border-radius:var(--compact-corner,22px); background: #fff; color: #585858; font-size: 14px; white-space: nowrap; }
.date-trigger > .icon { width: 17px; height: 17px; color: #999999; }
.date-trigger:hover:where(:not(html[data-hover-disabled] *)) { border-color: #c1c1c1; }
.date-trigger[aria-expanded='true'] { border-color: #969696; }
.date-popover { position: fixed; inset: auto; margin: 0; width: 304px; max-width: calc(100vw - 24px); padding: 17px; border: 1px solid #e8e8e8; border-radius: 18px; background: #fff; color: #363636; box-shadow: 0 18px 60px #16161622; z-index: 30; font-size: 14px; }
.date-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 17px; }
.date-month-arrow { display: flex; align-items: center; justify-content: center; width: 32px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: #777777; font-size: 24px; }
.date-month-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
.date-month-selects { display: flex; align-items: center; gap: 3px; }
.date-month-selects select { width: auto; min-height: 34px; padding: 5px 4px; background: transparent; color: inherit; border: 0; border-radius: 6px; font-size: 14px; font-weight: 500; text-transform: capitalize; }
.date-weekdays, .date-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; }
.date-weekdays { margin-bottom: 9px; }
.date-weekdays > span { text-align: center; font-size: 13px; color: #979797; }
.date-day { --calendar-day-corner:10px; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 34px; aspect-ratio: 1; padding: 0; border: 0; border-radius:var(--calendar-day-corner); background: transparent; color: #565656; font-size: 14px; }
.date-day.outside { color: #b0b0b0; }
.date-day:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #363636; }
.date-day.current-day { box-shadow: inset 0 0 0 1px #cdcdcd; }
html[data-theme] .date-popover .date-day.chosen { background:var(--control-accent); color:var(--control-accent-ink); box-shadow: none; font-weight: 600; }
.date-popover-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 13px; border-top: 1px solid #ededed; }
.date-popover-footer button { min-height: 34px; border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: #787878; }
.date-popover-footer button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #323232; }
[data-theme='dark'] .date-trigger { background: var(--surface); border-color: #1a1c20; color: #e2e2e2; }
[data-theme='dark'] .date-trigger:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .date-trigger[aria-expanded='true'] { border-color: #575757; }
[data-theme='dark'] .date-popover { background: var(--surface); border-color: #383b40; color: #e2e2e2; box-shadow: 0 18px 60px #00000066; }
[data-theme='dark'] .date-month-selects select { background: var(--surface); border: 0; color: #e2e2e2; }
[data-theme='dark'] .date-month-arrow { color: #cbcbcb; }
[data-theme='dark'] .date-month-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); }
[data-theme='dark'] .date-weekdays > span { color: #a7a7a7; }
[data-theme='dark'] .date-day { color: #e2e2e2; }
[data-theme='dark'] .date-day.outside { color: #828282; }
[data-theme='dark'] .date-day:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .date-day.current-day { box-shadow: inset 0 0 0 1px #575757; }
[data-theme='dark'] .date-popover-footer { border-top-color: #383b40; }
[data-theme='dark'] .date-popover-footer button { color: #cbcbcb; }
[data-theme='dark'] .date-popover-footer button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: var(--theme-text,var(--ink)); }
@media (prefers-reduced-motion: no-preference) {
 .date-trigger, .date-day { transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
 .date-popover:popover-open { animation: menu-appear 130ms ease-out; }
}
@media (max-width: 650px) {
 .period .date-trigger { padding: 10px; gap: 8px; font-size: 14px; }
 .date-trigger > .icon { width: 16px; height: 16px; }
 .date-popover { width: 316px; }
 .date-day { min-height: 36px; }
}
/* A large team occupies one row; cards never make the page taller. */
.mini-team-grid {
 display: grid; grid-template-columns: none; grid-auto-flow: column;
 grid-auto-columns: calc((100% - 54px) / 4); gap: 18px;
 overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
 scrollbar-width: none;
 padding: 4px 2px 14px; margin: -4px -2px -8px;
}
.mini-team-grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
.mini-person { scroll-snap-align: start; }
.team-heading-actions { display: flex; align-items: center; gap: 16px; }
.team-heading-actions > .muted { font-size: 14px; }
.team-scroll-controls { display: flex; gap: 6px; }
.team-scroll-arrow { display: flex; align-items: center; justify-content: center; width: 30px; height: 32px; border: 0; border-radius: 9px; background: #ededed; color: #7c7c7c; font-size: 23px; }
.team-scroll-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #373737; }
.team-controls-mobile { display: none; }
[data-theme='dark'] .mini-team-grid { scrollbar-color: #575757 transparent; }
[data-theme='dark'] .team-scroll-arrow { background: var(--surface); color: #bbbbbb; }
[data-theme='dark'] .team-scroll-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); color: #eeeeee; }
@media (max-width: 1000px) { .mini-team-grid { grid-auto-columns: calc((100% - 36px) / 3); } .team-controls-mobile { display: flex; } }
@media (max-width: 650px) {
 .mini-team-grid { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
 .team-heading-actions { gap: 10px; }
 .team-heading-actions > .muted { font-size: 13px; }
 .team-scroll-arrow { width: 26px; height: 30px; }
 .mini-team-heading { flex-wrap: wrap; }
}
/* A constrained flex row scrolls independently of the document. */
.mini-team { min-width: 0; max-width: 100%; }
.mini-team-grid {
 display: flex; width: 100%; max-width: 100%; min-width: 0;
 gap: 18px; overflow-x: auto; scroll-snap-type: none;
 -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.mini-team-grid > .mini-person { flex: 0 0 calc((100% - 54px) / 4); min-width: 220px; scroll-snap-align: none; }
.team-scroll-controls[hidden] { display: none; }
.team-scroll-arrow:disabled { opacity: .3; cursor: default; }
.mini-team-grid.is-dragging, .mini-team-grid.is-dragging * { cursor: grabbing; user-select: none; }
.mini-team-grid.is-dragging .mini-person { transform: none; }
@media (max-width: 1000px) { .mini-team-grid > .mini-person { flex-basis: calc((100% - 36px) / 3); min-width: 200px; } }
@media (max-width: 650px) { .mini-team-grid { gap: 12px; } .mini-team-grid > .mini-person { flex-basis: calc((100% - 12px) / 2); min-width: 150px; } }
/* Compact sushi mark, crisp at every screen density. */
.header-brand { flex-direction: row; align-items: center; gap: 12px; }
.brand-logo { flex-shrink: 0; width: 42px; height: 42px; }
.logo-nori { fill: #363636; stroke: #363636; }
.logo-rice { fill: #efefef; stroke: #363636; }
.logo-filling { fill: #989898; }
.logo-detail { stroke: #dcdcdc; }
.logo-highlight { stroke: #818181; }
.header-brand > .brand-wordmark { color: inherit; font: inherit; letter-spacing: inherit; }
.brand-wordmark > small { display: block; margin-top: 4px; color: #868686; font-size: 13px; line-height: 1.3; font-weight: 400; letter-spacing: 0; }
[data-theme='dark'] .header-brand > .brand-wordmark { color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .brand-wordmark > small { color: #999999; }
[data-theme='dark'] .logo-nori { fill: #383b40; stroke: #777777; }
[data-theme='dark'] .logo-rice { stroke: #777777; }
@media (max-width: 650px) { .header-brand { gap: 8px; } .brand-logo { width: 32px; height: 36px; } .brand-wordmark > small { font-size: 13px; } }
/* A narrow icon rail, present in both themes. */
:root { --rail-width: 80px; }
.icon-rail { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; align-items: center; width: var(--rail-width); height: 100dvh; padding: 23px 10px 24px; background: #f5f5f5; border-right: 1px solid #eaeaea; }
.rail-brand { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; }
.rail-brand .brand-logo { width: 36px; height: 36px; }
.rail-navigation { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 64px; }
.rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; }
.rail-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #eaeaea; color: #919191; }
.rail-button .icon { width: 20px; height: 20px; }
.rail-button[data-tab="absences"],.header-nav-button[data-tab="absences"] { position:relative; }
.rail-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #494949; }
.rail-button.active { background: #2a2a2a; color: #fff; box-shadow: 0 4px 14px #2929290b; }
.main { margin-left: var(--rail-width); width: calc(100% - var(--rail-width)); }
.header-brand > .brand-logo { display: none; }
.topbar { padding: 0 34px; background: transparent; border: 0; }
.topbar .topbar-panel { grid-template-columns: minmax(150px,1fr) auto minmax(220px,1fr); gap: 24px; min-height: 88px; }
/* Separate pill tabs, rather than a single segmented box. */
.header-nav { display: flex; flex-direction: row; align-self: center; justify-content: center; gap: 8px; padding: 0; margin: 0; min-height: 0; background: transparent; border-radius: 0; }
.header-nav-button { gap: 9px; min-height: 44px; padding: 12px 19px; border: 1px solid #e2e2e2; border-radius: 28px; background: transparent; color: #797979; font-size: 14px; font-weight: 400; box-shadow: none; white-space: nowrap; }
.header-nav-button .icon { width: 16px; height: 16px; }
.header-nav-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #363636; border-color: #d5d5d5; }
.header-nav-button.active { background: #282828; color: #fff; border-color: #282828; box-shadow: 0 4px 14px #2727270a; }
.header-nav-button.active::after { display: none; }
.topbar-actions { gap: 8px; }
.topbar-actions > .action-icon, .create-menu > .create-trigger { width: 42px; height: 42px; min-width: 42px; min-height: 42px; border-radius: 50%; background: #eeeeee; color: #787878; }
.profile-menu { border: 0; margin-left: 4px; padding-left: 5px; }
.profile-summary-name { display: none; }
.profile-menu > .profile-trigger .avatar { width: 42px; height: 42px; }
.workspace { padding-top: 28px; }
/* Near-black with a restrained violet depth; no saturated accent colors. */
[data-theme='dark'] body { background: var(--workspace-bg); }
[data-theme='dark'] .shell { background: var(--workspace-bg); }
[data-theme='dark'] .icon-rail { background: var(--workspace-bg); border-color: #1a1c20; }
[data-theme='dark'] .rail-button { background:var(--surface); color:var(--muted); }
[data-theme='dark'] .rail-button:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-hover); color:var(--ink); }
[data-theme='dark'] .rail-button.active { background: var(--theme-text,var(--ink)); color: #1a1c20; box-shadow: 0 5px 18px #00000022; }
[data-theme='dark'] .topbar { background: transparent; border: 0; }
[data-theme='dark'] .header-nav { background: transparent; }
[data-theme='dark'] .header-nav-button { background: transparent; border-color: #25272c; color: #aaaaaa; }
[data-theme='dark'] .header-nav-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #464646; color: #e0e0e0; }
[data-theme='dark'] .header-nav-button.active { background: var(--theme-text,var(--ink)); border-color: var(--theme-text,var(--ink)); color: #1a1c20; box-shadow: 0 5px 18px #00000022; }
[data-theme='dark'] .topbar-actions > .action-icon, [data-theme='dark'] .create-menu > .create-trigger { background: var(--surface); color: #a3a3a3; }
[data-theme='dark'] .topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); color: #eeeeee; }
[data-theme='dark'] .mini-person, [data-theme='dark'] .employee-card { background: var(--surface); border: 1px solid #ffffff09; border-radius: 24px; box-shadow: 0 8px 28px #00000012; }
[data-theme='dark'] .mini-person:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #ffffff14; }
[data-theme='dark'] .mini-person.selected { background: var(--surface); border-color: #929292; box-shadow: inset 0 0 0 .5px #a5a5a5,0 8px 28px #00000022; }
[data-theme='dark'] .mini-person-bottom { border-color: #ffffff0b; }
[data-theme='dark'] .mini-status.working::before { background: #c4bed6; }
[data-theme='dark'] .mini-team-heading h2 > span { background: var(--surface-subtle); color: #d3d3d3; }
[data-theme='dark'] .summary-toolbar { border-color: #ffffff0b; }
[data-theme='dark'] .panel { border-radius: 26px; background: var(--workspace-bg); border-color: #ffffff0a; box-shadow: none; }
[data-theme='dark'] .calendar-corner, [data-theme='dark'] .employee-cell, [data-theme='dark'] .day-head { background: var(--surface); border-color: #25272c; }
[data-theme='dark'] .calendar-cell { border-color: #25272c; }
[data-theme='dark'] .day-head.is-today, [data-theme='dark'] .today-cell { background: var(--surface); }
[data-theme='dark'] .day-head.is-today strong { background: #eeeeee; color: #1a1c20; }
[data-theme='dark'] .shift { background: var(--surface-subtle); border-color: #383b40; color: #e1e1e1; border-radius: 14px; }
[data-theme='dark'] .shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #6d6d6d; }
[data-theme='dark'] .shift small { color: #b4b4b4; }
[data-theme='dark'] .shift.completed { background: var(--surface); border-color: #383b40; color: #c7c7c7; }
[data-theme='dark'] .shift.completed small { color: #adadad; }
[data-theme='dark'] .empty-slot:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #474747; }
[data-theme='dark'] .next-shift-hero { background: var(--surface); border-color: #383b40; border-radius: 26px; }
@media (prefers-reduced-motion: no-preference) { .rail-button { transition: background-color 160ms ease,color 160ms ease,transform 160ms ease; } .rail-button:active { transform: scale(.95); } }
@media (max-width: 1200px) {
 .topbar .topbar-panel { grid-template-columns: 1fr auto; row-gap: 14px; padding: 18px 0; }
 .header-nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
 .topbar-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 650px) {
 :root { --rail-width: 56px; }
 .icon-rail { padding: 18px 6px; }
 .rail-brand { width: 40px; height: 40px; }
 .rail-brand .brand-logo { width: 31px; height: 34px; }
 .rail-navigation { margin-top: 48px; gap: 10px; }
 .rail-button { width: 38px; height: 38px; }
 .rail-button .icon { width: 18px; height: 18px; }
 .topbar { padding: 0 16px; }
 .topbar .topbar-panel { gap: 14px 8px; min-height: 114px; padding: 18px 0 14px; }
 .header-brand { font-size: 16px; }
 .brand-wordmark > small { display: none; }
 .header-nav { gap: 7px; justify-self: stretch; }
 .header-nav-button { flex: 1; min-height: 42px; padding: 10px 12px; font-size: 13px; gap: 7px; }
 .header-nav-button .icon { width: 15px; height: 15px; }
 .topbar-actions { gap: 4px; }
 .topbar-actions > .action-icon, .create-menu > .create-trigger { width: 32px; height: 36px; min-width: 32px; min-height: 36px; }
 .profile-menu { margin-left: 1px; padding-left: 0; }
 .profile-menu > .profile-trigger .avatar { width: 34px; height: 34px; }
 .workspace { padding: 22px 16px 0; }
 .mini-team-grid > .mini-person { min-width: 155px; }
}
@media (max-height: 480px) { .rail-navigation { margin-top: 20px; } .rail-bottom { gap: 6px; padding-top: 12px; } }
/* Desktop header follows the reference: rail logo, left-aligned pills, actions right. */
.topbar .topbar-panel { grid-template-columns: minmax(0,1fr) auto; padding: 0; min-height: 88px; }
.header-brand { display: none; }
.header-nav { grid-column: 1; grid-row: 1; justify-self: start; }
.topbar-actions { grid-column: 2; grid-row: 1; }
@media (max-width: 650px) {
 .topbar .topbar-panel { min-height: 114px; gap: 14px 8px; padding: 18px 0 14px; }
 .header-brand { display: flex; grid-column: 1; grid-row: 1; font-size: 15px; }
 .header-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
}
/* The rail is only a positioning layer; its icons float on the page. */
.icon-rail, [data-theme='dark'] .icon-rail {
 background: transparent; border: 0; box-shadow: none;
}
/* Selection uses the existing arrow instead of a separate check badge. */
.mini-person.selected::after { display: none; }
.mini-person-top > .icon {
 display: block; visibility: visible; flex-shrink: 0;
 width: 34px; height: 34px; padding: 8px; margin-left: auto;
 border-radius: 50%; color: #9d9d9d; background: transparent;
}
.mini-person:is(.selected,:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) .mini-person-top > .icon {
 display: block; visibility: visible; color: var(--action); background: transparent;
}
@media (prefers-reduced-motion: no-preference) {
 .mini-person-top > .icon { transition: color 160ms ease,background-color 160ms ease; }
}
@media (max-width: 650px) {
 .mini-person-top { flex-wrap: wrap; align-items: center; }
 .mini-person-name { order: 2; flex-basis: 100%; }
 .mini-person-top > .icon { width: 32px; height: 32px; padding: 7px; }
}
/* Bring the workspace closer to the floating rail. */
.workspace { padding-left: var(--compact-gap,8px); }
.topbar { padding-left: var(--compact-gap,8px); }
@media (max-width: 650px) {
 .workspace, .topbar { padding-left: 12px; }
}
/* Cyrillic СХ wordmark, sized for the floating navigation rail. */
.brand-monogram { display: inline-flex; align-items: baseline; justify-content: center; position: relative; width: 40px; height: 36px; font-family: 'Inter',sans-serif; font-size: 27px; line-height: 1.2; font-weight: 800; font-style: italic; letter-spacing: -4px; color: #313131; padding-right: 4px; }
.brand-monogram > span:last-of-type { transform: translateY(2px); }
.brand-monogram > i { width: 4px; height: 4px; border-radius: 1px; background: currentColor; align-self: flex-end; margin: 0 0 6px 5px; flex-shrink: 0; }
[data-theme='dark'] .brand-monogram { color: #f0f0f0; }
.header-brand > .brand-monogram { display: none; }
@media (max-width: 650px) { .brand-monogram { font-size: 24px; width: 35px; height: 32px; letter-spacing: -3.5px; } }
/* The selection arrow has one anchor at every viewport width. */
.mini-person-top { padding-right: 32px; }
.mini-person-top > .icon {
 position: absolute; top: 13px; right: 13px; margin: 0;
}
@media (max-width: 650px) {
 .mini-person-top > .icon { top: 12px; right: 12px; }
}
/* Statistics shares the workspace type scale and surfaces. */
.statistics-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; margin: 0 0 26px; }
.statistics-heading h1 { font-size: 28px; letter-spacing: -.8px; }
.statistics-heading p { font-size: 14px; margin-top:var(--page-caption-space); }
.statistics-period { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.period-presets { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eeeeee; }
.period-presets button { min-height: 34px; padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: #797979; font-size: 13px; }
.period-presets button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #3c3c3c; }
.statistics-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 26px; }
.statistics-metrics article { padding: 24px; border-radius: 23px; background: #fff; box-shadow: 0 8px 28px #26262605; }
.statistics-metrics article > span { display: flex; align-items: center; gap: 10px; color: #818181; font-size: 14px; }
.statistics-metrics article > span > .icon { width: 18px; height: 18px; }
.statistics-metrics strong { display: block; margin: 19px 0 8px; font-size: 36px; line-height: 1.2; font-weight: 550; letter-spacing: -1px; }
.statistics-metrics strong > small { font-size: 18px; font-weight: 400; color: #969696; letter-spacing: 0; }
.statistics-metrics p { font-size: 13px; color: #8e8e8e; }
.statistics-chart .panel-head, .statistics-breakdown .panel-head { padding: 24px 26px; }
.statistics-chart h2, .statistics-breakdown h2 { font-size: 21px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #898989; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart-key-plan { background: #dfdfdf; }
.chart-key-actual { background: #737373; }
.hours-chart { margin: 0; padding: 0 22px 20px; overflow-x: auto; }
.hours-chart svg { display: block; width: 100%; min-width: 600px; }
.chart-gridline { stroke: #eeeeee; stroke-width: 1; stroke-dasharray: 3 5; }
.chart-axis { fill: #888888; font-size: 13px; font-family: inherit; }
.chart-bar-plan { fill: #e3e3e3; }
.chart-bar-actual { fill: #888888; }
.hours-chart figcaption { font-size: 13px; color: #969696; margin: 5px 0 0 8px; }
.statistics-breakdown .panel-head > .muted { font-size: 13px; }
.statistics-table { border-collapse: collapse; width: 100%; text-align: left; }
.statistics-table th { background: #fafafa; color: #888888; font-size: 13px; font-weight: 400; padding: 14px 26px; border-bottom: 1px solid #f0f0f0; }
.statistics-table td { padding: 17px 26px; font-size: 17px; border-bottom: 1px solid #f0f0f0; color: #535353; }
.statistics-table tr:last-child td { border-bottom: 0; }
.statistics-table .person strong { font-size: 15px; font-weight: 500; }
.statistics-table .person .avatar { width: 36px; height: 36px; border-radius: 50%; }
[data-theme='dark'] .period-presets { background: var(--surface); }
[data-theme='dark'] .period-presets button { color: #a7a7a7; }
[data-theme='dark'] .period-presets button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); color: #e5e5e5; }
[data-theme='dark'] .statistics-metrics article { background: var(--surface); border: 1px solid #ffffff09; box-shadow: none; }
[data-theme='dark'] .statistics-metrics article > span { color: #acacac; }
[data-theme='dark'] .statistics-metrics strong > small, [data-theme='dark'] .statistics-metrics p { color: #a5a5a5; }
[data-theme='dark'] .chart-legend > span { color: #afafaf; }
[data-theme='dark'] .chart-key-plan { background: var(--surface-subtle); }
[data-theme='dark'] .chart-key-actual { background: #c5c5c5; }
[data-theme='dark'] .chart-gridline { stroke: #25272c; }
[data-theme='dark'] .chart-axis { fill: #a7a7a7; }
[data-theme='dark'] .chart-bar-plan { fill: #383b40; }
[data-theme='dark'] .chart-bar-actual { fill: #c3c3c3; }
[data-theme='dark'] .hours-chart figcaption { color: #9f9f9f; }
[data-theme='dark'] .statistics-table th { background: var(--surface); color: #a8a8a8; border-color: #25272c; }
[data-theme='dark'] .statistics-table td { color: #d7d7d7; border-color: #25272c; }

.header-nav { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.header-nav-button { flex-shrink: 0; }
@media (max-width: 850px) {
 .statistics-heading { align-items: flex-start; }
 .statistics-period { width: 100%; }
 .statistics-metrics { gap: 12px; }
 .statistics-metrics article { padding: 20px; }
 .statistics-table th, .statistics-table td { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 650px) {
 .header-nav { justify-content: flex-start; }
 .header-nav-button { flex: 0 0 auto; }
 .statistics-heading h1 { font-size: 26px; }
 .statistics-period { flex-direction: column; align-items: stretch; gap: 12px; }
 .period-presets { align-self: flex-start; }
 .statistics-metrics { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .statistics-metrics article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 14px; padding: 20px; border-radius: 20px; }
 .statistics-metrics article > span { font-size: 14px; gap: 8px; }
 .statistics-metrics strong { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: center; font-size: 30px; }
 .statistics-metrics p { font-size: 13px; }
 .statistics-chart .panel-head, .statistics-breakdown .panel-head { padding: 22px; gap: 12px; }
 .statistics-chart h2, .statistics-breakdown h2 { font-size: 20px; }
 .hours-chart { padding: 0 14px 20px; }
 .statistics-table, .statistics-table tbody { display: block; }
 .statistics-table thead { display: none; }
 .statistics-table tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 10px; padding: 20px; border-top: 1px solid #ededed; }
 .statistics-table td { display: block; padding: 0; border: 0; font-size: 18px; }
 .statistics-table td:first-child { grid-column: 1 / -1; }
 .statistics-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 7px; font-size: 13px; color: #8c8c8c; }
 .statistics-table .person strong { font-size: 15px; overflow-wrap: anywhere; }
 [data-theme='dark'] .statistics-table tr { border-top-color: #25272c; }
 [data-theme='dark'] .statistics-table td[data-label]::before { color: #9e9e9e; }
}
/* A descriptive branch label, independent of future access rules. */
.staff-branch { display: inline-flex; align-items: flex-start; gap: 5px; max-width: 100%; margin-top: 6px; color: #7c7c7c; font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; }
.staff-branch .icon { width: 13px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.staff-branch > span { min-width: 0; overflow-wrap: anywhere; }
.calendar-branch { color: #797979; margin-top: 5px; overflow-wrap: anywhere; }
.employee-card-head > div { min-width: 0; }
.employee-card-footer .branch-edit-button { margin-left: 0; margin-right: auto; }
.branch-edit-button .icon { width: 14px; height: 14px; }
.shift-home-branch { margin-top: -10px; font-size: 13px; color: #7e7e7e; overflow-wrap: anywhere; }
.statistics-person-name { min-width: 0; }
.statistics-person-name .staff-branch { display: flex; margin-top: 5px; }
.next-shift-hero .staff-branch, .page-heading .staff-branch { margin-top: 10px; }
[data-theme='dark'] .staff-branch, [data-theme='dark'] .calendar-branch, [data-theme='dark'] .shift-home-branch { color: #a6a6a6; }
/* Keep the team shelf focused on working staff or those off today. */
.team-status-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 12px; background: #ededed; }
.team-status-switch button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: #828282; font-size: 13px; white-space: nowrap; }
.team-status-switch button > span { font-size: 13px; opacity: .7; }
.team-status-switch button[aria-pressed='true'] { background: #fff; color: #3e3e3e; box-shadow: 0 2px 6px #26262606; }
.team-status-empty { padding: 24px 0; color: #868686; font-size: 14px; }
[data-theme='dark'] .team-status-switch { background: var(--surface); }
[data-theme='dark'] .team-status-switch button { color: #9e9e9e; }
[data-theme='dark'] .team-status-switch button[aria-pressed='true'] { background: var(--surface-subtle); color: #e8e8e8; box-shadow: none; }
[data-theme='dark'] .team-status-empty { color: #a5a5a5; }
@media (prefers-reduced-motion: no-preference) { .team-status-switch button { transition: background-color 150ms ease,color 150ms ease; } }
@media (max-width: 650px) { .team-heading-actions { width: 100%; justify-content: space-between; } .team-status-switch button { padding: 7px 10px; } }
/* The team total is neutral in both themes. */
.mini-team-heading h2 > span { background: #e9e9e9; color: #626262; }
[data-theme='dark'] .mini-team-heading h2 > span { background: var(--surface-subtle); color: #d6d6d6; }
/* Light header actions use the same white surface as the cards. */
[data-theme='light'] .topbar-actions > .action-icon,
[data-theme='light'] .create-menu > .create-trigger,
[data-theme='light'] .profile-menu > .profile-trigger { background: #fff; }
[data-theme='light'] .topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
/* A lighter weekly planner, with compact shift chips and a focused daily view. */
.planner { overflow: hidden; border-radius: 24px; }
.planner-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #f0f0f0; }
.planner-navigation { display: flex; align-items: center; gap: 10px; }
.planner-navigation > strong { font-size: 16px; font-weight: 500; color: #4f4f4f; min-width: 140px; text-align: center; }
.planner-nav-arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #959595; font-size: 24px; }
.planner-nav-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #525252; }
.planner-tools { display: flex; align-items: center; gap: 16px; }
.planner-today { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #838383; font-size: 13px; }
.planner-today:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
.planner-view-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 11px; background: #f0f0f0; }
.planner-view-switch button { min-height: 32px; padding: 7px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.planner-view-switch button[aria-pressed='true'] { background: #fff; color: #4f4f4f; box-shadow: 0 2px 5px #2c2c2c06; }
.planner-scroll { padding: 0; }
.planner-grid { display: grid; grid-template-columns: 208px repeat(7,minmax(132px,1fr)); min-width: 1132px; }
.planner-corner { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 18px; background: #fff; position: sticky; left: 0; z-index: 2; border-bottom: 1px solid #f0f0f0; }
.planner-corner > span { font-size: 14px; color: #646464; }
.planner-corner b { margin-left: 6px; font-size: 13px; font-weight: 400; color: #a6a6a6; }
.planner-corner small { font-size: 13px; color: #a6a6a6; }
.planner-day-header { padding: 12px 6px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.planner-day-header > .planner-day-label { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; padding: 2px 6px; border: 0; border-radius: 10px; background: transparent; color: #929292; font-size: 13px; }
.planner-day-header strong { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; font-size: 17px; font-weight: 500; color: #636363; }
.planner-day-header small { display: block; font-size: 13px; color: #a8a8a8; margin-top: 3px; }
.planner-day-header.is-today strong { background: #383838; color: #fff; }
.planner-person-cell { display: flex; align-items: center; position: sticky; left: 0; z-index: 1; padding: 18px 14px 18px 18px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.planner-person { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.planner-person > .avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
.planner-person-info { min-width: 0; flex: 1; }
.planner-person-info strong { display: block; font-size: 14px; font-weight: 500; color: #525252; overflow-wrap: anywhere; line-height: 1.4; }
.planner-person-info > small { display: block; font-size: 13px; color: #a5a5a5; line-height: 1.5; margin-top: 4px; overflow-wrap: anywhere; }
.planner-person-hours { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; font-size: 15px; font-weight: 500; color: #777777; }
.planner-person-hours > small { font-size: 13px; font-weight: 400; color: #acacac; }
.planner-cell { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; min-height: 92px; padding: 13px 7px; border-bottom: 1px solid #f0f0f0; }
.planner-day-header.is-today, .planner-cell.is-today { background: #fbfbfb; }
.planner-shift { display: flex; flex-direction: column; gap: 9px; width: 100%; padding: 12px 10px; border: 1px solid transparent; border-radius: 12px; background: #f0f0f0; color: #696969; text-align: left; }
.planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #d1d1d1; }
.planner-shift-time { display: flex; align-items: baseline; justify-content: center; gap: 3px; white-space: nowrap; font-size: 14px; font-weight: 500; letter-spacing: -.3px; }
.planner-shift-time > span { color: #aaaaaa; font-size: 13px; }
.planner-shift-time sup { font-size: 11px; margin-left: 0; }
.planner-shift-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 13px; color: #9a9a9a; }
.planner-shift-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.planner-shift-meta .icon { width: 13px; height: 13px; }
.planner-shift-meta > strong { white-space: nowrap; font-weight: 400; }
.planner-shift.is-recorded { background: #f4f4f4; color: #939393; }
.planner-shift.is-recorded .planner-shift-meta { color: #a6a6a6; }
.planner-add { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 62px; height: 100%; padding: 0; border: 1px dashed transparent; border-radius: 12px; background: transparent; color: #c7c7c7; font-size: 24px; }
.planner-add > span { opacity: .35; }
.planner-add:hover:where(:not(html[data-hover-disabled] *)), .planner-add:focus-visible { background: var(--surface-subtle); border-color: #e0e0e0; color: #959595; }
.planner-add:hover:where(:not(html[data-hover-disabled] *)) > span, .planner-add:focus-visible > span { opacity: 1; }
.planner-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 16px 22px; color: #a1a1a1; font-size: 13px; }
.planner-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.planner-footer > span:last-child { margin-left: auto; }
.planner-footer .icon { width: 13px; height: 13px; }
.planner-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #b5b5b5; }
.planner-day-strip { display: flex; justify-content: space-between; gap: 6px; padding: 16px 22px; overflow-x: auto; border-bottom: 1px solid #f0f0f0; }
.planner-day-strip > button { display: inline-flex; align-items: center; justify-content: center; flex: 1; flex-direction: column; gap: 6px; min-width: 36px; padding: 10px 6px; border: 0; border-radius: 13px; background: transparent; color: #a4a4a4; font-size: 13px; }
.planner-day-strip > button > strong { font-size: 18px; font-weight: 500; }
.planner-day-strip > button.active { background: #ececec; color: #6b6b6b; }
.planner-day-heading { display: flex; justify-content: space-between; gap: 14px; padding: 18px 22px 8px; color: #a4a4a4; font-size: 13px; }
.planner-day-row { display: flex; align-items: center; gap: 24px; padding: 20px 22px; border-bottom: 1px solid #f0f0f0; }
.planner-day-row > .planner-person { max-width: 300px; }
.planner-day-shifts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: 1; }
.planner-day-shifts .planner-shift { max-width: 230px; }
.planner-day-shifts .planner-add { width: 40px; min-height: 40px; border-color: #e9e9e9; font-size: 22px; }
.planner-off-label { color: #ababab; font-size: 13px; margin-right: 4px; }
[data-theme='dark'] .planner-toolbar, [data-theme='dark'] .planner-day-row, [data-theme='dark'] .planner-day-strip { border-color: #1a1c20; }
[data-theme='dark'] .planner-navigation > strong { color: #d3d3d3; }
[data-theme='dark'] .planner-nav-arrow, [data-theme='dark'] .planner-today { color: #9f9f9f; }
[data-theme='dark'] .planner-nav-arrow:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .planner-today:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); color: #d9d9d9; }
[data-theme='dark'] .planner-view-switch { background: var(--surface); }
[data-theme='dark'] .planner-view-switch button { color: #979797; }
[data-theme='dark'] .planner-view-switch button[aria-pressed='true'] { background: var(--surface-subtle); color: #dddddd; box-shadow: none; }
[data-theme='dark'] .planner-corner, [data-theme='dark'] .planner-person-cell { background: var(--workspace-bg); border-color: #1a1c20; }
[data-theme='dark'] .planner-corner > span { color: #adadad; }
[data-theme='dark'] .planner-corner small, [data-theme='dark'] .planner-corner b { color: var(--muted); }
[data-theme='dark'] .planner-day-header, [data-theme='dark'] .planner-cell { border-color: #1a1c20; }
[data-theme='dark'] .planner-day-header > .planner-day-label { color: #ababab; }
[data-theme='dark'] .planner-day-header strong { color: #d7d7d7; }
[data-theme='dark'] .planner-day-header small { color: #9c9c9c; }
[data-theme='dark'] .planner-day-header.is-today, [data-theme='dark'] .planner-cell.is-today { background: var(--surface); }
[data-theme='dark'] .planner-day-header.is-today strong { background: #dddddd; color: #25272c; }
[data-theme='dark'] .planner-person-info strong { color: #d7d7d7; }
[data-theme='dark'] .planner-person-info > small { color: #a2a2a2; }
[data-theme='dark'] .planner-person-hours { color: #b5b5b5; }
[data-theme='dark'] .planner-person-hours > small { color: #979797; }
[data-theme='dark'] .planner-shift { background: var(--surface-subtle); color: #dcdcdc; }
[data-theme='dark'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #5a5a5a; }
[data-theme='dark'] .planner-shift-time > span { color: #9a9a9a; }
[data-theme='dark'] .planner-shift-meta { color: #afafaf; }
[data-theme='dark'] .planner-shift.is-recorded { background: var(--surface); color: #a9a9a9; }
[data-theme='dark'] .planner-shift.is-recorded .planner-shift-meta { color: #9c9c9c; }
[data-theme='dark'] .planner-add { color: #616161; }
[data-theme='dark'] .planner-add:focus-visible { background: var(--surface); border-color: #383b40; color: #a2a2a2; }

[data-theme='dark'] .planner-add:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #383b40; color: #a2a2a2; }
[data-theme='dark'] .planner-footer { color: #989898; }
[data-theme='dark'] .planner-status-dot { background: #8e8e8e; }
[data-theme='dark'] .planner-day-strip > button { color: #9c9c9c; }
[data-theme='dark'] .planner-day-strip > button.active { background: var(--surface-subtle); color: #d3d3d3; }
[data-theme='dark'] .planner-day-heading, [data-theme='dark'] .planner-off-label { color: #9e9e9e; }
[data-theme='dark'] .planner-day-shifts .planner-add { border-color: #383b40; }
@media (prefers-reduced-motion: no-preference) { .planner-shift, .planner-add, .planner-day-strip > button { transition: background-color 150ms ease,border-color 150ms ease,color 150ms ease; } }
@media (hover: none) { .planner-add > span { opacity: .6; } }
@media (max-width: 650px) {
 .planner-toolbar { padding: 16px; gap: 12px; }
 .planner-navigation { width: 100%; justify-content: space-between; }
 .planner-tools { width: 100%; justify-content: space-between; gap: 12px; }
 .planner-grid { grid-template-columns: 150px repeat(7,132px); min-width: 1074px; }
 .planner-person-cell { padding: 16px 12px; }
 .planner-person-cell .avatar { display: none; }
 .planner-person-hours { font-size: 14px; }
 .planner-person-info strong { font-size: 14px; }
 .planner-footer { padding: 16px; font-size: 13px; gap: 10px 16px; }
 .planner-footer > span:last-child { width: auto; margin-left: auto; }
 .planner-day-strip { padding: 12px 14px; gap: 3px; }
 .planner-day-strip > button { padding: 9px 4px; }
 .planner-day-heading { padding: 16px 18px 4px; }
 .planner-day-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
 .planner-day-row > .planner-person { max-width: none; }
 .planner-day-row .planner-person > .avatar { width: 34px; height: 34px; }
 .planner-day-shifts { padding-left: 44px; }
 .planner-day-shifts .planner-shift { max-width: none; }
}
/* Keep compact planner labels readable on white surfaces. */
.planner-person-info strong { font-size: 15px; }
.planner-shift-time { font-size: 15px; }
[data-theme='light'] .planner-corner small,
[data-theme='light'] .planner-corner b,
[data-theme='light'] .planner-day-header small,
[data-theme='light'] .planner-person-info > small,
[data-theme='light'] .planner-person-hours > small,
[data-theme='light'] .planner-shift-meta,
[data-theme='light'] .planner-shift.is-recorded .planner-shift-meta,
[data-theme='light'] .planner-footer,
[data-theme='light'] .planner-off-label,
[data-theme='light'] .planner-day-heading { color: #7c7c7c; }
/* Match the light sidebar controls to the white header surfaces. */
[data-theme='light'] .rail-button { background: #fff; }
[data-theme='light'] .rail-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='light'] .rail-button.active { background: #2a2a2a; color: #fff; }
/* A static presence indicator in the dark theme. */
html[data-theme] .mini-status.working::before { background: var(--status-positive); animation: none; box-shadow: none; }
/* One quiet shape language for all surfaces. */
.panel, .mini-person, .employee-card, .location-card, .signin-card, dialog { border-radius: 28px; }
.profile-dropdown, .date-popover, .future-shift-notice { border-radius: 22px; }
.button, .planner-shift { border-radius: 15px; }
input, select, textarea { border-radius:var(--compact-corner); }
.action-icon, .rail-button, .create-menu > .create-trigger { border-radius: 15px; }
@supports (corner-shape: squircle) {
 .panel, .mini-person, .employee-card, .location-card, .signin-card, dialog,
 .profile-dropdown, .date-popover, .button, input, select, textarea,
 .planner-shift, .action-icon, .rail-button, .header-nav-button,
 .create-menu > .create-trigger, .team-status-switch, .period-presets, .future-shift-notice { corner-shape: squircle; }
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: #888888; box-shadow: 0 0 0 2px #79797912; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #888888; outline-offset: 3px; }
[data-theme='dark'] input:focus-visible, [data-theme='dark'] select:focus-visible, [data-theme='dark'] textarea:focus-visible { border-color: #868686; box-shadow: 0 0 0 2px #9b9b9b0a; }
/* Sign-in is a single focused surface, with explicit demo roles. */
.signin { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100px 24px 44px; background: radial-gradient(ellipse at 50% 25%,#ececec,transparent 60%),#fafafa; }
.signin-brand { position: absolute; top: 28px; left: 36px; display: flex; align-items: center; gap: 13px; font-size: 18px; font-weight: 600; color: #414141; }
.signin-brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.signin-brand small { font-size: 13px; color: #929292; font-weight: 400; }
.signin-theme { position: absolute; top: 28px; right: 36px; background: #fff; }
.signin-card { width: 100%; max-width: 420px; background: #fff; padding: 34px; box-shadow: 0 18px 70px #27272708; border: 1px solid #eeeeee; }
.signin-symbol { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 16px; background: #f1f1f1; color: #8c8c8c; margin-bottom: 23px; }
.signin-card h1 { font-size: 30px; letter-spacing: -1px; font-weight: 550; }
.signin-card > .muted { font-size: 14px; margin-top: 10px; }
.signin-card form { margin-top: 25px; }
.signin-card label { font-size: 14px; gap: 8px; }
.signin-card input { width: 100%; font-size: 15px; }
.signin-card .primary { margin-top: 4px; }
.signin-demo { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #ececec; padding-top: 25px; margin-top: 27px; }
.signin-demo > span { font-size: 11px; letter-spacing: 1.3px; color: #979797; margin-bottom: 4px; }
.demo-role { display: flex; align-items: center; gap: 12px; min-height: 66px; width: 100%; padding: 12px; border: 0; border-radius: 17px; background: var(--surface-subtle); color: #5b5b5b; text-align: left; }
.demo-role:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
.demo-role > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.demo-role strong { font-size: 14px; font-weight: 500; }
.demo-role small { font-size: 12px; color: #9b9b9b; }
.demo-role-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 36px; color: #959595; }
.demo-role > .icon { width: 17px; height: 17px; color: #9e9e9e; }
.signin-demo > small { text-align: center; font-size: 12px; color: #a5a5a5; margin-top: 4px; }
.signin-help { margin-top: 24px; text-align: center; font-size: 12px; color: #9f9f9f; }
.signin-footer { text-align: center; font-size: 12px; color: #a8a8a8; margin-top: 28px; }
/* Director workspace. */
.locations-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 0 0 28px; }
.locations-heading h1 { font-size: 28px; letter-spacing: -.8px; }
.locations-heading p { font-size: 14px; margin-top:var(--page-caption-space); }
.director-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #848484; background: #eeeeee; padding: 9px 13px; border-radius: 13px; }
.director-badge .icon { width: 16px; height: 16px; }
.location-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.location-card { min-width: 0; padding: 26px; background: #fff; box-shadow: 0 8px 36px #2b2b2b05; border: 1px solid #eeeeee; }
.location-card-title { display: flex; align-items: center; gap: 13px; }
.location-mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 46px; border-radius: 16px; background: #f2f2f2; color: #9b9b9b; flex-shrink: 0; }
.location-card h2 { font-size: 22px; font-weight: 550; }
.location-card-title p { font-size: 13px; color: #9b9b9b; margin-top: 5px; }
.location-staff-count { margin-left: auto; font-size: 13px; color: #9b9b9b; text-align: right; }
.location-admin-title { display: flex; justify-content: space-between; gap: 18px; margin: 27px 0 15px; color: #989898; font-size: 13px; }
.location-admin { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 0; border-top: 1px solid #ececec; }
.location-admin > .avatar { width: 34px; height: 34px; border-radius: 50%; }
.location-admin > div:not(.account-actions) { min-width: 0; flex: 1; }
.location-admin strong { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.location-admin small { display: block; font-size: 13px; color: #9e9e9e; margin-top: 4px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.account-actions .text-button { font-size: 13px; min-height: 34px; color:var(--muted); }
.account-actions .danger { color: var(--danger); }
.employee-card-footer .account-actions { width: 100%; border-bottom: 1px solid #ececec; padding-bottom: 5px; }
.admin-empty-slot { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 68px; width: 100%; border: 1px dashed #d7d7d7; border-radius: 18px; background: transparent; color: #a3a3a3; font-size: 14px; margin-top: 10px; }
.admin-empty-slot .icon { width: 18px; height: 18px; }
.inactive-admins { margin-top: 18px; font-size: 13px; color: #9a9a9a; }
.inactive-admins summary { cursor: pointer; padding: 7px 0; }
.access-generation { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; color: #989898; border-top: 1px solid #e9e9e9; padding-top: 14px; margin-top: 25px; }
.access-generation .text-button { font-size: 13px; }
.access-message-label { margin-top: 25px; font-size: 13px; }
.access-message-label textarea { font-size: 14px; line-height: 1.8; margin-top: 4px; min-height: 235px; }
.future-shift-notice { margin-top: 22px; padding: 18px; background: #f7f3ef; color: #9d8673; font-size: 13px; }
.future-shift-notice strong { font-size: 14px; font-weight: 500; }
.future-shift-notice p { margin-top: 8px; }
.future-shift-notice ul { padding-left: 18px; margin-bottom: 0; }
[data-theme='dark'] .signin { background: var(--workspace-bg); }
[data-theme='dark'] .signin-brand { color: #e1e1e1; }
[data-theme='dark'] .signin-brand small { color: #9d9d9d; }
[data-theme='dark'] .signin-card, [data-theme='dark'] .location-card { background: var(--surface); border-color: #25272c; box-shadow: 0 18px 70px #00000012; }
[data-theme='dark'] .signin-symbol, [data-theme='dark'] .location-mark { background: var(--surface-subtle); color: #a4a4a4; }
[data-theme='dark'] .signin-demo, [data-theme='dark'] .location-admin, [data-theme='dark'] .employee-card-footer .account-actions, [data-theme='dark'] .access-generation { border-color: #25272c; }
[data-theme='dark'] .demo-role { background: var(--surface); color: #d0d0d0; }
[data-theme='dark'] .demo-role:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); }
[data-theme='dark'] .demo-role small, [data-theme='dark'] .location-card-title p, [data-theme='dark'] .location-staff-count, [data-theme='dark'] .location-admin small { color: #999999; }
[data-theme='dark'] .director-badge { background: var(--surface-subtle); color: #aaaaaa; }
[data-theme='dark'] .account-actions .text-button { color:var(--muted); }
[data-theme='dark'] .account-actions .danger { color: var(--danger); }
[data-theme='dark'] .admin-empty-slot { border-color: #494949; color: #9e9e9e; }
[data-theme='dark'] .future-shift-notice { background: var(--surface-subtle); color: #d0b295; }

@media (max-width: 1050px) { .location-cards { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 650px) {
 .signin { padding: 105px 18px 30px; }.signin-brand { left: 24px; top: 24px; }.signin-theme { right: 24px; top: 24px; }
 .signin-card { padding: 28px 24px; }.signin-card h1 { font-size: 28px; }.signin-card input { font-size: 16px; }
 .location-card { padding: 22px; }.location-card-title { flex-wrap: wrap; }.location-staff-count { margin-left: 57px; text-align: left; }
 .location-admin .account-actions { width: 100%; padding-left: 46px; gap: 12px; }.locations-heading h1 { font-size: 26px; }
 .rail-navigation { margin-top: 32px; gap: 9px; }.rail-bottom { gap: 9px; padding-top: 12px; }
}
.workspace-location { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.25; letter-spacing: -.6px; color: var(--ink); }
.workspace-location .icon { width: 24px; height: 26px; flex-shrink: 0; color: var(--muted); }
.workspace-location > span { overflow-wrap: anywhere; }
.planner-readonly { display: flex; align-items: center; justify-content: center; color: #858585; font-size: 14px; min-height: 62px; }
.signin-card input:focus { outline: 0; border-color: #8e8e8e; box-shadow: 0 0 0 2px #8787870a; }
@supports (corner-shape: squircle) { .demo-role, .signin-symbol, .location-mark, .admin-empty-slot, .director-badge { corner-shape: squircle; } }
@media (min-width: 900px) {
 .signin-card:has(.signin-demo) { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 38px; max-width: 780px; padding: 38px; }
 .signin-card:has(.signin-demo) > .signin-symbol { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
 .signin-card:has(.signin-demo) > h1 { grid-column: 1; grid-row: 2; }
 .signin-card:has(.signin-demo) > .muted { grid-column: 1; grid-row: 3; }
 .signin-card:has(.signin-demo) > form { grid-column: 1; grid-row: 4; }
 .signin-card:has(.signin-demo) > .signin-help { grid-column: 1; grid-row: 5; }
 .signin-card:has(.signin-demo) > .signin-demo { grid-column: 2; grid-row: 1 / 6; align-self: center; margin: 0; padding: 10px 0 10px 30px; border-top: 0; border-left: 1px solid #ececec; }
 [data-theme='dark'] .signin-card:has(.signin-demo) > .signin-demo { border-left-color: #25272c; }
}
/* Explicitly hide closed disclosures, including absolutely positioned panels. */
.profile-menu:not([open]) > .profile-dropdown,
.create-menu:not([open]) > .profile-dropdown,
.directory-menu:not([open]) > .profile-dropdown { display: none !important; visibility: hidden; pointer-events: none; animation: none; }
.profile-dropdown[hidden] { display: none !important; visibility: hidden; pointer-events: none; }
.profile-menu[open] > .profile-dropdown,
.create-menu[open] > .profile-dropdown,
.directory-menu[open] > .profile-dropdown { display: block; }
/* Compact director directory and location drill-down. */
.directory-filters, .statistics-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.directory-filters label, .statistics-filters label { min-width: 0; }
.directory-filters select, .directory-filters input, .statistics-filters select { min-height: 42px; padding: 10px 12px; font-size: 13px; }
.directory-filters .period-presets button[aria-pressed='true'] { background: #fff; color: #444444; }
.directory-total { color: #989898; font-size: 13px; }
#directory-search { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#directory-search .action-icon { width: 38px; height: 40px; }
.directory-list { overflow: visible; }
.directory-table { width: 100%; border-collapse: collapse; text-align: left; }
.directory-table th { padding: 15px 22px; font-size: 13px; font-weight: 400; color: #9b9b9b; background: #f8f8f8; }
.directory-table th:first-child { border-radius: 24px 0 0; }.directory-table th:last-child { border-radius: 0 24px 0 0; }
.directory-table td { padding: 15px 22px; font-size: 13px; color: #7b7b7b; border-bottom: 1px solid #ebebeb; }
.directory-table tr:last-child td { border-bottom: 0; }
.directory-table .person { min-width: 180px; }
.directory-table .avatar { width: 32px; height: 32px; border-radius: 50%; }
.directory-table .person strong { font-size: 14px; font-weight: 500; color: #4d4d4d; }
.directory-table .person small { display: block; font-size: 12px; color: #a2a2a2; margin-top: 4px; }
.directory-state { font-size: 12px; color: #979797; }.directory-state.is-inactive { color: #9a9a9a; }
.directory-menu { position: relative; }
.directory-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 34px; height: 34px; border-radius: 11px; cursor: pointer; background: #f2f2f2; font-size: 23px; color: #9d9d9d; }
.directory-menu > summary::-webkit-details-marker { display: none; }
.directory-menu .profile-dropdown { top: calc(100% + 8px); right: 0; width: 200px; z-index: 12; }
.directory-menu .account-actions { flex-direction: column; align-items: stretch; gap: 4px; }
.directory-menu .text-button { justify-content: flex-start; min-height: 40px; padding: 9px 12px; border-radius: 10px; }
.directory-menu .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); text-decoration: none; }
.location-stat-link { display: inline-flex; align-items: center; gap: 12px; padding: 6px 0; background: transparent; border: 0; color: inherit; font-size: 14px; text-align: left; }
.location-stat-link .icon { width: 15px; height: 15px; color: #a5a5a5; }
[data-theme='dark'] .directory-filters .period-presets button[aria-pressed='true'] { background: var(--surface-subtle); color: #d4d4d4; }
[data-theme='dark'] .directory-table th { background: var(--surface); color: #a1a1a1; }
[data-theme='dark'] .directory-table td { border-color: #25272c; color: #a2a2a2; }
[data-theme='dark'] .directory-table .person strong { color: #d7d7d7; }
[data-theme='dark'] .directory-menu > summary { background: var(--surface-subtle); color: #9f9f9f; }
[data-theme='dark'] .directory-menu .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); }
@media (max-width: 1000px) { #directory-search { margin-left: 0; } .directory-table td,.directory-table th { padding: 14px 17px; } }
@media (max-width: 700px) {
 .directory-filters, .statistics-filters { gap: 10px; }
 .directory-filters > label, .statistics-filters > label { flex: 1 1 100%; }
 .directory-filters select, .statistics-filters select { width: 100%; }
 #directory-search { width: 100%; }#directory-search label { flex: 1; }:is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']) { width: 100%; }
 .directory-table, .directory-table tbody { display: block; }.directory-table thead { display: none; }
 .directory-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 17px; gap: 7px 12px; border-bottom: 1px solid #e8e8e8; }
 .directory-table td { display: block; padding: 0; border: 0; }
 .directory-table td:first-child { grid-column: 1; grid-row: 1; }.directory-table td:nth-child(2),.directory-table td:nth-child(3),.directory-table td:nth-child(4) { grid-column: 1; padding-left: 44px; }
 .directory-table td:last-child { grid-column: 2; grid-row: 1 / 5; }
 .directory-table .person { min-width: 0; }.directory-table .person strong { overflow-wrap: anywhere; }
 [data-theme='dark'] .directory-table tr { border-color: #25272c; }
}
/* Theme-owned listboxes, with native select values retained for forms. */
.custom-select { display: inline-flex; min-width: 0; max-width: 100%; width: 100%; }
.custom-select > select[hidden] { display: none !important; }
.custom-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid #e0e0e0; border-radius:var(--compact-corner,22px); background: #fff; color: #737373; font-size: 13px; text-align: left; }
.custom-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger > .icon { width: 17px; height: 17px; flex-shrink: 0; color: #a4a4a4; }
.custom-select-trigger[aria-expanded='true'] { border-color: #ababab;  }

.custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)) { border-color: #ababab;  }
.custom-select-popover { position: fixed; inset: auto; margin: 0; padding: 6px; overflow-y: auto; border: 1px solid #dcdcdc; border-radius: 18px; background: #fff; color: #6c6c6c; box-shadow: 0 16px 48px #2727271f; z-index: 35; scrollbar-width: thin; scrollbar-color: #c5c5c5 transparent; }
.custom-select-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 42px; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: inherit; font-size: 13px; text-align: left; }
.custom-select-option > span { overflow-wrap: anywhere; }
.custom-select-option > .icon { width: 15px; height: 15px; flex-shrink: 0; color: #999999; }
.custom-select-option:hover:where(:not(html[data-hover-disabled] *)), .custom-select-option:focus-visible { outline: 0; background: var(--surface-subtle-hover); }
.custom-select-option[aria-selected='true'] { background: #eaeaea; color: #5b5b5b; }
.custom-select-option:disabled { opacity: .4; cursor: default; }
[data-theme='dark'] .custom-select-trigger { background: var(--surface); border-color: #383b40; color: #bdbdbd; }
[data-theme='dark'] .custom-select-trigger > .icon { color: #8a8a8a; }
[data-theme='dark'] .custom-select-trigger[aria-expanded='true'] {  border-color: #585858; }

[data-theme='dark'] .custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)) {  border-color: #585858; }
[data-theme='dark'] .custom-select-popover { background: var(--surface); border-color: #383b40; color: #bbbbbb; box-shadow: 0 16px 48px #00000066; scrollbar-color: #505050 transparent; }
[data-theme='dark'] .custom-select-option:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .custom-select-option:focus-visible { background: var(--surface-hover); }
[data-theme='dark'] .custom-select-option[aria-selected='true'] { background: var(--surface-subtle); color: #dbdbdb; }
[data-theme='dark'] .custom-select-option > .icon { color: #ababab; }
.date-month-selects .custom-select { width: auto; }
.date-month-selects .custom-select-trigger { min-height: 34px; padding: 5px 6px; gap: 5px; background: transparent; border: 0; font-size: 14px; }
.date-month-selects .custom-select-trigger > .icon { width: 13px; height: 13px; }
@supports (corner-shape: squircle) { .custom-select-trigger, .custom-select-popover, .custom-select-option { corner-shape: squircle; } }
@media (prefers-reduced-motion: no-preference) { .custom-select-popover:popover-open { animation: menu-appear 120ms ease-out; } }

/* Compact employee cards with a stable action layout in both themes. */
.employee-card { display: flex; flex-direction: column; padding: 18px; }
.employee-cards { gap: 16px; align-items: stretch; }
.employee-card-head { gap: 12px; margin-bottom: 16px; }
.employee-card-head .avatar { width: 44px; height: 44px; border-radius: 50%; }
.employee-card-head h3 { font-size: 18px; line-height: 1.3; }
.employee-card-head .muted { font-size: 13px; margin-top: 3px; }
.employee-card-head .staff-branch { margin-top: 5px; font-size: 13px; }
.employee-card-head .employee-symbol { display: none; }
.employee-schedule { padding: 12px 14px; gap: 5px; border-radius: 16px; }
.employee-schedule > span { font-size: 13px; line-height: 1.4; }
.employee-schedule strong { font-size: 17px; line-height: 1.4; }
.employee-hours { margin: 16px 0; gap: 12px; }
.employee-hours dt { font-size: 13px; margin-bottom: 4px; }
.employee-hours dd { font-size: 20px; line-height: 1.3; }
.employee-card-footer { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; margin-top: auto; padding-top: 12px; }
.employee-card-footer > span { font-size: 13px; line-height: 1.4; }
.employee-card-footer .account-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 8px; padding: 0; border: 0; }
.employee-card-footer .text-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-width: 0; min-height: 38px; margin: 0; padding: 8px 10px; border: 0; border-radius: 12px; background: #efefef; font-size: 13px; line-height: 1.3; text-align: center; text-decoration: none; }
.employee-card-footer .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
.employee-card-footer > .text-button { color: var(--ink); }
.employee-card-footer .text-button .icon { width: 16px; height: 16px; flex-shrink: 0; }
[data-theme='dark'] .employee-card-footer .text-button { background: var(--surface); }
[data-theme='dark'] .employee-card-footer .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
@media (max-width:650px) { .employee-card { padding: 16px; } }

/* Shift editor: compact fields and a live summary before saving. */
dialog.shift-dialog { width: 640px; padding: 24px; max-height: calc(100dvh - 32px); }
.shift-dialog .modal-head { align-items: center; margin-bottom: 18px; gap: 16px; }
.shift-dialog .modal-head .eyebrow { font-size: 11px; letter-spacing: 1.4px; }
.shift-dialog .modal-head h2 { margin-top: 5px; font-size: 24px; line-height: 1.2; }
.shift-dialog .modal-head .icon-button { width: 36px; height: 36px; min-height: 36px; flex-shrink: 0; font-size: 24px; }
#shift-form { display: grid; gap: 14px; }
.shift-dialog label { gap: 6px; margin: 0; font-size: 14px; font-weight: 500; }
.shift-dialog input, .shift-dialog .custom-select-trigger, .shift-dialog .date-trigger { width: 100%; min-height: 42px; height: 42px; padding: 9px 12px; font-size: 15px; border-radius:var(--compact-corner,22px); }
.shift-editor-person { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 5px 12px; align-items: center; }
#shift-person-avatar { grid-row: 1 / 3; align-self: center; }
#shift-person-avatar .avatar { width: 44px; height: 44px; border-radius: 50%; }
.shift-editor-person .shift-home-branch { grid-column: 2; display: flex; align-items: center; gap: 5px; margin: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.shift-home-branch .icon { width: 13px; height: 13px; flex-shrink: 0; }
.shift-editor-times { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; }
.shift-timing-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 16px; background: #f0f0f0; color: var(--ink); }
.shift-timing-summary > div { display: flex; flex-direction: column; gap: 4px; }
.shift-timing-summary > div:last-child { text-align: right; }
.shift-timing-summary span { font-size: 13px; color: var(--muted); }
.shift-timing-summary strong { font-size: 17px; font-weight: 550; line-height: 1.3; }
.shift-actual { padding: 0; border-block: 1px solid #ececec; }
.shift-actual > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 0; cursor: pointer; list-style: none; font-size: 13px; color: var(--muted); }
.shift-actual > summary::-webkit-details-marker { display: none; }
.shift-actual > summary > span { display: inline-flex; align-items: center; gap: 7px; }
.shift-actual > summary .icon { width: 16px; height: 16px; }
.shift-actual > summary b { font-size: 18px; font-weight: 400; }
.shift-actual[open] > summary b { transform: rotate(180deg); }
.shift-actual .form-row { gap: 12px; margin-bottom: 8px; }
.shift-actual p { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.shift-dialog .modal-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin: 0; padding-top: 4px; }
.shift-dialog .modal-actions > button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; width: 100%; margin: 0; padding: 10px 12px; font-size: 14px; }
.shift-dialog .modal-actions .icon { width: 17px; height: 17px; }
.shift-dialog .form-error { margin: 0; }
[data-theme='dark'] .shift-timing-summary { background: var(--surface-subtle); }
[data-theme='dark'] .shift-actual { border-color: #25272c; }
@media (max-width: 540px) {
 dialog.shift-dialog { padding: 18px; max-width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
 .shift-dialog .modal-head h2 { font-size: 21px; }
 .shift-editor-times { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
 .shift-editor-times > label:first-child { grid-column: 1 / -1; }
 .shift-timing-summary { gap: 10px; padding: 11px 12px; }
 .shift-timing-summary strong { font-size: 16px; }
 .shift-timing-summary span { font-size: 12px; }
}

.shift-dialog textarea { min-height: 50px; height: 50px; padding: 9px 12px; font-size: 14px; line-height: 1.4; border-radius:var(--compact-corner); resize: vertical; }

/* Profile uses an explicit hover panel, without native details toggling. */
.profile-menu > .profile-trigger { cursor: pointer; }
.profile-menu[open]::after { content: ''; position: absolute; top: 100%; right: 0; width: 100%; height: 20px; }
.profile-menu > .profile-dropdown { z-index: 30; }

.shift-fixed-person { display: grid; gap: 5px; }
.shift-fixed-person > span { color: var(--muted); font-size: 13px; }
.shift-fixed-person > strong { color: var(--ink); font-size: 17px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }

/* Graphite theme: neutral surfaces, with orange retained only for presence. */
html[data-theme='dark'] { --workspace-bg: #111214; --surface: #1a1c20; --ink: var(--theme-text,var(--ink)); --muted: #a7a9ae; --line: #2b2d32; }
[data-theme='dark'] body, [data-theme='dark'] .shell { background: var(--workspace-bg); }
[data-theme='dark'] .planner-day-header.is-today, [data-theme='dark'] .planner-cell.is-today { background: var(--surface-subtle); }

/* Schedule shares the raised card surface instead of merging into the page. */
[data-theme='dark'] .calendar-panel.planner { background: var(--surface); border-color: transparent; box-shadow: 0 8px 28px #00000012; }
[data-theme='dark'] .planner-toolbar, [data-theme='dark'] .planner-day-strip { background: var(--surface); border-color: #ffffff0b; }
[data-theme='dark'] .planner-corner, [data-theme='dark'] .planner-person-cell { background: var(--surface); border-color: #ffffff0b; }
[data-theme='dark'] .planner-day-header { background: var(--surface-subtle); border-color: #ffffff0b; }
[data-theme='dark'] .planner-cell, [data-theme='dark'] .planner-day-row { border-color: #ffffff0b; }
[data-theme='dark'] .planner-day-header.is-today, [data-theme='dark'] .planner-cell.is-today { background: var(--surface-subtle); }
[data-theme='dark'] .planner-day-header.is-today strong { background: #eceef1; color: #202227; }
[data-theme='dark'] .planner-day-header strong, [data-theme='dark'] .planner-person-info strong, [data-theme='dark'] .planner-navigation > strong { color: #f0f1f3; }
[data-theme='dark'] .planner-day-header small, [data-theme='dark'] .planner-person-info > small, [data-theme='dark'] .planner-corner small, [data-theme='dark'] .planner-corner b, [data-theme='dark'] .planner-footer { color: #aeb2ba; }
[data-theme='dark'] .planner-shift { background: var(--surface-subtle); color: #f2f3f5; }
[data-theme='dark'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #737984; }
[data-theme='dark'] .planner-shift-meta, [data-theme='dark'] .planner-shift-time > span { color: #c2c6ce; }
[data-theme='dark'] .planner-shift.is-recorded { background: var(--surface-subtle); color: #e1e4e9; }
[data-theme='dark'] .planner-shift.is-recorded:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #737984; }
[data-theme='dark'] .planner-shift.is-recorded .planner-shift-meta { color: #b9bec8; }
[data-theme='dark'] .planner-add { color: #858b96; }
[data-theme='dark'] .planner-add:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .planner-add:focus-visible { background: var(--surface-subtle-hover); border-color: #646b77; color: #f0f1f3; }
[data-theme='dark'] .planner-view-switch { background: var(--surface-subtle); }
[data-theme='dark'] .planner-view-switch button[aria-pressed='true'], [data-theme='dark'] .planner-day-strip > button.active { background: var(--surface-subtle); color: #f2f3f5; }
[data-theme='dark'] .planner-nav-arrow, [data-theme='dark'] .planner-today, [data-theme='dark'] .planner-person-hours { color: #c3c7cf; }

/* A slightly deeper light canvas separates the white controls and cards. */
[data-theme='light'] body, [data-theme='light'] .shell { background: var(--workspace-bg); }

/* Light graphite: white surfaces, neutral feedback and readable secondary text. */
html[data-theme='light'] { --ink: #292d33; --muted: #626973; --blue: #454b55; --line: #e3e6ea; --surface: #fff; --workspace-bg: #edf3fa; }
[data-theme='light'] .topbar-actions > .action-icon,
[data-theme='light'] .create-menu > .create-trigger,
[data-theme='light'] .team-scroll-arrow { background: #fff; color: #626973; }
[data-theme='light'] .rail-button:not(.active) { background:var(--personal-board); color:var(--muted); }
[data-theme='light'] .topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .rail-button:not(.active):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .team-scroll-arrow:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; }
[data-theme='light'] .header-nav-button { color: #626973; border-color: #dde1e6; }
[data-theme='light'] .header-nav-button:not(.active):hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; border-color: #c9cfd7; }
[data-theme='light'] .header-nav-button.active,
[data-theme='light'] .header-nav-button.active:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .rail-button.active,
[data-theme='light'] .rail-button.active:hover:where(:not(html[data-hover-disabled] *)) { background: #30343b; color: #fff; border-color: #30343b; }
[data-theme='light'] .button:hover:where(:not(html[data-hover-disabled] *)), [data-theme='light'] .icon-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #b6bec8; color: #292d33; }
[data-theme='light'] .button.primary { background: #30343b; border-color: #30343b; color: #fff; }
[data-theme='light'] .button.primary:hover:where(:not(html[data-hover-disabled] *)) { background: #454b55; border-color: #454b55; color: #fff; }
[data-theme='light'] .text-button, [data-theme='light'] .account-actions .text-button { color:var(--muted); }
[data-theme='light'] .text-button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
[data-theme='light'] .text-button.danger { color: var(--danger); }
[data-theme='light'] .text-button.danger:hover:where(:not(html[data-hover-disabled] *)) { color: var(--danger-hover); }
[data-theme='light'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .directory-menu .text-button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .employee-card-footer .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='light'] .custom-select-trigger { color: #454b55; border-color: #d8dde4; }
[data-theme='light'] .custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-trigger[aria-expanded='true'],
[data-theme='light'] .date-trigger:hover:where(:not(html[data-hover-disabled] *)) { border-color: #9ba5b2; }
[data-theme='light'] .custom-select-popover { color: #454b55; border-color: #d8dde4; }
[data-theme='light'] .custom-select-option:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-option:focus-visible,
[data-theme='light'] .date-day:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .date-month-arrow:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .date-popover-footer button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; }
[data-theme='light'] .custom-select-option[aria-selected='true'] { background: #dfe4ea; color: #292d33; }
[data-theme='light'] .mini-person { background: #fff; }
[data-theme='light'] .mini-person:hover:where(:not(html[data-hover-disabled] *)) { background: #fafbfc; border-color: #c5ccd5; transform: none; }
[data-theme='light'] .mini-person.selected { background: #fff; border-color: #555c67; box-shadow: inset 0 0 0 .5px #555c67; }
[data-theme='light'] .period-presets,
[data-theme='light'] .team-status-switch,
[data-theme='light'] .planner-view-switch { background: #e7eaee; }
[data-theme='light'] .period-presets button,
[data-theme='light'] .team-status-switch button,
[data-theme='light'] .planner-view-switch button { color: #626973; }
[data-theme='light'] .period-presets button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .team-status-switch button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-view-switch button:hover:where(:not(html[data-hover-disabled] *)) { color: #292d33; background: #f5f6f8; }
[data-theme='light'] .period-presets button[aria-pressed='true'],
[data-theme='light'] .team-status-switch button[aria-pressed='true'],
[data-theme='light'] .planner-view-switch button[aria-pressed='true'] { background: #fff; color: #292d33; }
[data-theme='light'] .planner-day-header.is-today,
[data-theme='light'] .planner-cell.is-today { background: #e3e7ed; box-shadow: inset 1px 0 #d5dae2,inset -1px 0 #d5dae2; }
[data-theme='light'] .planner-day-header.is-today strong { background: #30343b; color: #fff; }
[data-theme='light'] .planner-nav-arrow:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-today:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; }
[data-theme='light'] .planner-shift { background: #f0f2f5; color: #414853; }
[data-theme='light'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #a9b2bf; }
[data-theme='light'] .planner-shift-meta,
[data-theme='light'] .planner-shift-time > span,
[data-theme='light'] .planner-shift.is-recorded .planner-shift-meta { color: #626973; }
[data-theme='light'] .planner-shift.is-recorded { background: var(--surface-subtle); color: #555d68; }
[data-theme='light'] .planner-shift.is-recorded:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #a9b2bf; }
[data-theme='light'] .planner-add { color: #7a828d; }
[data-theme='light'] .planner-add > span { opacity: 1; }
[data-theme='light'] .planner-add:hover:where(:not(html[data-hover-disabled] *)), [data-theme='light'] .planner-add:focus-visible { background: var(--surface-subtle-hover); border-color: #b3bdca; color: #343b45; }
[data-theme='light'] .planner-day-strip > button.active { background: #30343b; color: #fff; }
[data-theme='light'] .planner-person-info > small,
[data-theme='light'] .planner-day-header small,
[data-theme='light'] .planner-corner small,
[data-theme='light'] .planner-footer,
[data-theme='light'] .planner-off-label,
[data-theme='light'] .planner-day-heading { color: #626973; }
[data-theme='light'] input:focus-visible,
[data-theme='light'] textarea:focus-visible,
[data-theme='light'] .signin-card input:focus { outline: 0; border-color: #7c8796; box-shadow: 0 0 0 2px #50596615; }
[data-theme='light'] button:focus-visible,
[data-theme='light'] a:focus-visible,
[data-theme='light'] summary:focus-visible { outline: 2px solid #697483; outline-offset: 3px; }
.profile-menu > .profile-trigger .avatar { border-radius: 50%; }

/* Icon-only actions are circles; text controls keep their existing pill shape. */
.action-icon, .icon-button, .rail-button, .team-scroll-arrow, .planner-nav-arrow,
.date-month-arrow, .directory-menu > summary, .create-menu > .create-trigger,
.profile-menu > .profile-trigger, .mini-person-top > .icon,
.shift-dialog .modal-head .icon-button { border-radius: 50%; corner-shape: round; }
.topbar-actions > .action-icon, .create-menu > .create-trigger { width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; }
.team-scroll-arrow { width: 32px; height: 32px; }
.planner-nav-arrow { width: 36px; height: 36px; }
.date-month-arrow { width: 34px; height: 34px; }
.planner .planner-add { width: 36px; height: 36px; min-height: 36px; padding: 0; margin: auto; border-radius: 50%; corner-shape: round; }
@media (max-width:650px) {
 .topbar-actions > .action-icon, .create-menu > .create-trigger { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
}

/* Calm lift for selectable employee cards, with room for the soft shadow. */
[data-theme='light'] .mini-team-grid { padding-top: 4px; padding-bottom: 18px; margin-top: -4px; margin-bottom: -18px; }
@media (hover:hover) and (pointer:fine) {
[data-theme='light'] .mini-person:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #bac2cd; box-shadow: 0 10px 24px #303b4b16,0 3px 7px #303b4b08; }
 [data-theme='light'] .mini-person.selected:hover:where(:not(html[data-hover-disabled] *)) { box-shadow: inset 0 0 0 .5px #555c67,0 10px 24px #303b4b16,0 3px 7px #303b4b08; }
 [data-theme='light'] .mini-person::before { content: ''; position: absolute; inset: 0 0 -4px; border-radius: inherit; }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
 [data-theme='light'] .mini-person { transition: transform 180ms cubic-bezier(.2,.7,.2,1),box-shadow 200ms ease,border-color 180ms ease,background-color 180ms ease; }
 [data-theme='light'] .mini-person:hover:where(:not(html[data-hover-disabled] *)) { transform: translateY(-3px); }
 [data-theme='light'] .mini-team-grid.is-dragging .mini-person { transform: none; box-shadow: none; }
}

/* Read the shift as one time range plus a clearly labelled duration. */
.planner-shift { gap: 7px; }
.planner-shift-meta { justify-content: center; flex-wrap: wrap; gap: 3px 5px; line-height: 1.35; }
.planner-shift-meta > strong { font-weight: 550; }
.planner-shift-meta > span { font-size: 12px; }
.planner-shift-meta .icon { width: 12px; height: 12px; }

/* A quiet current-day tint with light, raised shift surfaces. */
[data-theme='light'] .planner-day-header.is-today,
[data-theme='light'] .planner-cell.is-today { background: #f3f5f8; box-shadow: inset 1px 0 #e9ecf1,inset -1px 0 #e9ecf1; }
[data-theme='light'] .planner-day-header.is-today strong { background: #30343b; color: #fff; }
[data-theme='light'] .planner-day-header.is-today > button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='light'] .planner-shift { background: #fff; border-color: #e9edf2; border-radius: 17px; box-shadow: 0 2px 7px #35425506; color: #454e5b; padding: 12px 10px; }
[data-theme='light'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: #fafbfd; border-color: #cbd3de; box-shadow: 0 4px 12px #3542550c; }
[data-theme='light'] .planner-shift-time { font-weight: 550; }
[data-theme='light'] .planner-shift-meta,
[data-theme='light'] .planner-shift-time > span { color: #68717e; }
[data-theme='light'] .planner-shift-meta > strong { font-weight: 500; }
[data-theme='light'] .planner-shift.is-recorded { background: #fafbfd; border-color: #edf0f4; color: #5e6774; box-shadow: none; }
[data-theme='light'] .planner-shift.is-recorded .planner-shift-meta { color: #707986; }
[data-theme='light'] .planner-shift.is-recorded:hover:where(:not(html[data-hover-disabled] *)) { background: #f5f7fa; border-color: #cbd3de; box-shadow: 0 3px 10px #35425508; }

/* Employee cards: align portraits with the name and separate the inner surfaces. */
.employee-card-head { align-items: flex-start; }
.employee-card-head > .avatar { align-self: flex-start; }
[data-theme='light'] .section-heading > .action-icon[data-add-user] { background: #fff; color: #626973; }
[data-theme='light'] .section-heading > .action-icon[data-add-user]:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; }
[data-theme='dark'] .employee-card .employee-schedule { background: var(--surface-subtle); color: #edf0f4; }
[data-theme='dark'] .employee-card .employee-schedule > span { color: #c3c8d0; }
[data-theme='dark'] .employee-card button.employee-schedule:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #646c79; }
[data-theme='dark'] .employee-card-footer .text-button { background: var(--surface-subtle); color: #d3d8e0; }
[data-theme='dark'] .employee-card-footer .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #f3f5f8; }
[data-theme='dark'] .employee-card-footer .text-button.danger { color: var(--danger); }
.access-view-person { display: flex; gap: 12px; align-items: center; margin: 0 0 20px; }
.access-view-person > div { display: grid; gap: 5px; min-width: 0; }
.access-view-person strong { font-size: 18px; overflow-wrap: anywhere; }
.access-view-person span { font-size: 13px; color: var(--muted); }
.access-view-fields { display: grid; gap: 16px; padding: 18px; margin: 0; border-radius: 18px; background: #f1f3f6; }
.access-view-fields > div { display: grid; gap: 5px; }
.access-view-fields dt { font-size: 13px; color: var(--muted); }
.access-view-fields dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.access-view-fields a { color: inherit; text-underline-offset: 3px; }
.access-view-hint { margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
#open-reset-access { width: 100%; justify-content: center; margin-top: 8px; font-size: 14px; }
[data-theme='dark'] .access-view-fields { background: var(--surface-subtle); }
.preview-launch { display: none; }
@media (min-width:1024px) {
 .preview-launch { display: inline-flex; align-items: center; justify-content: center; gap: 9px; position: fixed; bottom: 22px; right: 24px; z-index: 20; min-height: 46px; padding: 12px 17px; border-radius: 26px; background: #fff; color: #414b58; font-size: 13px; font-weight: 550; text-decoration: none; box-shadow: 0 5px 24px #1723341c,0 1px 4px #1723340c; }
 .preview-launch > svg { width: 21px; height: 21px; }
 .preview-launch:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #202630; }
 [data-theme='dark'] .preview-launch { background: var(--surface-subtle); color: #e7ebf2; box-shadow: 0 6px 28px #00000033; }
 [data-theme='dark'] .preview-launch:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
}
html[data-embedded='true'] .preview-launch { display: none; }
@media (prefers-reduced-motion:no-preference) { .preview-launch { transition: background-color 150ms ease,box-shadow 150ms ease; } }

/* Phones use the complete top navigation, with no side rail or reserved gutter. */
@media (max-width:650px) {
 :root { --rail-width: 0px; }
 .icon-rail { display: none; }
 .main { margin-left: 0; width: 100%; }
 .topbar { padding-inline: 14px; }
 .topbar .topbar-panel { grid-template-columns: minmax(0,1fr) auto; gap: 12px 8px; padding: 14px 0 12px; min-height: 0; }
 .header-brand { display: flex; min-width: 0; gap: 8px; }
 .header-brand > .brand-monogram { display: inline-flex; width: 32px; height: 32px; font-size: 24px; flex-shrink: 0; }
 .header-brand > .brand-wordmark { font-size: 14px; white-space: nowrap; }
 .header-nav { min-width: 0; max-width: 100%; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
 .header-nav::-webkit-scrollbar { display: none; }
 .header-nav-button { flex: 1 0 auto; }
 .workspace { padding-inline: 14px; }
}

/* Keep schedule portraits aligned with the first line of the employee name. */
.planner-person { align-items: flex-start; }
.planner-person > .avatar { align-self: flex-start; }
/* A denser phone card keeps all details while reducing vertical gaps. */
@media (max-width:650px) {
 .mini-team-grid { gap: 10px; }
 .mini-team-grid > .mini-person { flex-basis: calc((100% - 10px) / 2); min-width: 150px; padding: 12px; gap: 8px; border-radius: 22px; }
 .mini-person-top { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 6px; padding-right: 0; }
 .mini-person .avatar { width: 32px; height: 32px; border-radius: 50%; }
 .mini-person-name { flex-basis: auto; width: 100%; }
 .mini-person-name strong { font-size: 16px; line-height: 1.2; }
 .mini-surname { font-size: 13px; line-height: 1.25; margin-top: 2px; }
 .mini-person .staff-branch { margin-top: 5px; font-size: 12px; line-height: 1.3; }
 .mini-person .staff-branch .icon { width: 12px; height: 12px; }
 .mini-status { margin-top: 5px; font-size: 12px; line-height: 1.3; gap: 5px; }
 .mini-status.working::before { margin-top: 5px; }
 .mini-person-bottom { padding-top: 8px; gap: 4px; }
 .mini-person-bottom > span:first-child { font-size: 13px; line-height: 1.3; }
 .mini-person-bottom > span:last-child, .mini-person-bottom b { font-size: 12px; line-height: 1.3; }
 .mini-person-top > .icon { top: 10px; right: 10px; }
}

/* Weekly hours belong to the employee details, not a narrow side column. */
.planner-person-info > .planner-person-hours { display: inline-flex; flex-direction: row; align-items: baseline; gap: 4px; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.planner-person-info > .planner-person-hours > small { font-size: inherit; color: inherit; }

/* Portraits share one circular shape at every size and in both themes. */
.avatar { border-radius: 50%; corner-shape: round; overflow: hidden; }

/* Empty shifts use an inset dashed rectangle, without filling the cell. */
.planner-cell:has(> .planner-add) { padding: 12px 8px; }
.planner-cell > .planner-add { width: 100%; height: 100%; min-height: 66px; margin: 0; border: 1px dashed; border-radius: 17px; corner-shape: squircle; background: transparent; }
.planner-cell > .planner-add > span { opacity: 1; }
[data-theme='light'] .planner-cell > .planner-add { border-color: #d8dfe8; color: #929cab; }
[data-theme='light'] .planner-cell > .planner-add:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-cell > .planner-add:focus-visible { border-color: #99a7ba; color: #56677d; background: transparent; }
[data-theme='dark'] .planner-cell > .planner-add { border-color: #414956; color: #929dab; }
[data-theme='dark'] .planner-cell > .planner-add:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .planner-cell > .planner-add:focus-visible { border-color: #748297; color: #d2dbe8; background: transparent; }
.planner-cell > .planner-add:focus-visible { outline-offset: 2px; }

/* Employee statistics: restrained row cards with a clear numeric hierarchy. */
.statistics-metrics { gap: 16px; }
.statistics-metrics article { padding: 22px; }
.statistics-metrics article > span { color: var(--muted); }
.statistics-metrics article strong { font-variant-numeric: tabular-nums; }
.statistics-chart .panel-head, .statistics-breakdown .panel-head { padding: 24px 26px 20px; }
.statistics-breakdown .panel-head h2, .statistics-chart .panel-head h2 { font-size: 22px; font-weight: 550; }
.statistics-breakdown { padding-bottom: 10px; }
.statistics-table-scroll { padding: 0 16px; }
.statistics-table { border-collapse: separate; border-spacing: 0 6px; }
.statistics-table th { background: transparent; padding: 8px 16px; border: 0; color: var(--muted); font-size: 12px; }
.statistics-table th:not(:first-child) { text-align: right; }
.statistics-table .statistics-person-row td { padding: 16px; border: 0; background: var(--surface-subtle); vertical-align: middle; }
.statistics-person-row td:first-child { border-radius: 18px 0 0 18px; width: 52%; }
.statistics-person-row td:last-child { border-radius: 0 18px 18px 0; }
.statistics-person-row td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.statistics-person-row .person { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 12px; align-items: flex-start; min-width: 0; }
.statistics-table .statistics-person-row .person .avatar { width: 42px; height: 42px; }
.statistics-person-name { display: grid; flex: 1; gap: 4px; min-width: 0; }
.statistics-table .statistics-person-name strong { font-size: 16px; line-height: 1.3; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }
.statistics-person-address { color: var(--muted); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.statistics-person-status { color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 3px; }
.statistics-shift-count { display:inline; padding:0; background:transparent; color:var(--ink); font-size:20px; font-weight:550; }
.statistics-hours-value { font-size: 20px; font-weight: 550; color: var(--ink); }
.statistics-hours-unit { margin-left: 4px; font-size: 12px; color: var(--muted); }
.statistics-actual-value { display:inline-flex; align-items:baseline; justify-content:flex-end; gap:4px; padding:0; background:transparent; }
.statistics-actual-value strong { font-size: 20px; font-weight: 550; color: var(--ink); }
.statistics-actual-value small { color: var(--muted); font-size: 12px; }
[data-theme='dark'] .statistics-chart, [data-theme='dark'] .statistics-breakdown { background: var(--surface); }
[data-theme='dark'] .statistics-table .statistics-person-row td { background: var(--surface-subtle); }
[data-theme='dark'] .statistics-shift-count, [data-theme='dark'] .statistics-actual-value { background:transparent; color:var(--ink); }
@media (max-width:650px) {
 .statistics-table-scroll { padding: 0 12px; }
 .statistics-table .statistics-person-row { border: 0; border-radius: 20px; padding: 16px; margin-bottom: 10px; background: var(--surface-subtle); gap: 16px 10px; }
 .statistics-table .statistics-person-row td { padding: 0; background: transparent; width: auto; text-align: left; }
 .statistics-person-row td:first-child, .statistics-person-row td:last-child { border-radius: 0; }
 .statistics-table .statistics-person-row td[data-label]::before { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
 .statistics-table .statistics-person-row .person .avatar { width: 38px; height: 38px; }
 .statistics-shift-count { background: transparent; min-width: 0; padding: 0; height: auto; font-size: 20px; color: var(--ink); }
 .statistics-actual-value { padding: 0; min-width: 0; background: transparent; }
 [data-theme='dark'] .statistics-table .statistics-person-row { background: var(--surface-subtle); }
 [data-theme='dark'] .statistics-table .statistics-person-row td { background: transparent; }
 [data-theme='dark'] .statistics-shift-count, [data-theme='dark'] .statistics-actual-value { background: transparent; }
}

/* Mobile totals use the existing canvas/surface colors and inset dividers. */
@media (max-width:650px) {
 .statistics-table .statistics-person-row { column-gap: 0; }
 .statistics-table .statistics-person-row td[data-label] { position: relative; padding: 12px 10px; background: var(--workspace-bg); border: 0; border-radius: 0; vertical-align: top; }
 .statistics-table .statistics-person-row td:nth-child(2) { border-radius: 14px 0 0 14px; }
 .statistics-table .statistics-person-row td:nth-child(4) { border-radius: 0 14px 14px 0; }
 .statistics-table .statistics-person-row td:nth-child(2)::after,
 .statistics-table .statistics-person-row td:nth-child(3)::after { content: ''; position: absolute; top: 12px; bottom: 12px; right: 0; width: 1px; background: var(--line); }
 .statistics-table .statistics-person-row td[data-label]::before { min-height: 0; white-space: nowrap; line-height: 1.3; margin-bottom: 8px; }
 [data-theme='dark'] .statistics-table .statistics-person-row td[data-label] { background: var(--surface); }
}

[data-theme='dark'] .statistics-table th { background: transparent; }

/* Dark menu rows need a visible interaction surface above the dropdown. */
[data-theme='dark'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .profile-dropdown > button:focus-visible { background: var(--surface-subtle); color: #f5f6f8; }
[data-theme='dark'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)) .icon,
[data-theme='dark'] .profile-dropdown > button:focus-visible .icon { color: #e1e6ee; }

/* Personal notifications share the same neutral surfaces and round controls. */
.notification-menu { position: relative; display: inline-flex; }
.notification-trigger { position: relative; width: 40px; height: 40px; min-height: 40px; }
:is(.notification-badge,.open-shift-response-badge,.absence-nav-badge) { position: absolute; right: -2px; top: -3px; display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: #ed8a45; color: #211d19; font-size: 10px; font-weight: 650; border:0; }
:is(.notification-badge,.open-shift-response-badge,.absence-nav-badge)[hidden] { display: none; }
.notification-dropdown { right: 0; width: 380px; max-width: calc(100vw - 28px); padding: 0; overflow: hidden; z-index: 40; }
.notification-menu:not([open]) > .notification-dropdown { display: none !important; }
.notification-menu[open] > .notification-dropdown:not([hidden]) { display: block; }
.notification-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.notification-heading > div { display: grid; gap: 4px; }
.notification-heading strong { font-size: 17px; font-weight: 550; }
.notification-heading > div > span { font-size: 12px; color: var(--muted); }
.notification-heading .text-button { min-height: 30px; font-size: 12px; white-space: nowrap; padding: 0; }
.notification-list { max-height: min(480px,60dvh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.notification-item { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: transparent; padding: 13px 10px; border-radius: 14px; color: var(--ink); text-align: left; }
.notification-item:hover:where(:not(html[data-hover-disabled] *)), .notification-item:focus-visible { background: var(--surface-subtle-hover); }
.notification-item-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #f0f2f5; color: #657181; flex-shrink: 0; }
.notification-item-icon .icon { width: 16px; height: 16px; }
.notification-item-content { display: grid; gap: 5px; min-width: 0; flex: 1; }
.notification-item-content > strong { font-size: 14px; line-height: 1.35; font-weight: 550; }
.notification-item-content > span { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.notification-item-content > time { color: var(--muted); font-size: 11px; margin-top: 2px; }
.notification-unread-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--control-accent); margin-top: 7px; }
.notification-empty { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 32px 24px; gap: 10px; }
.notification-empty > .icon { width: 28px; height: 28px; color: var(--muted); margin-bottom: 3px; }
.notification-empty strong { font-size: 16px; font-weight: 550; }
.notification-empty p { font-size: 13px; color: var(--muted); line-height: 1.5; }
[data-theme='light'] .notification-trigger { background: #fff; color: #626973; }
[data-theme='light'] .notification-trigger:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #292d33; }
[data-theme='dark'] .notification-trigger { background: var(--surface); color: #a7a9ae; }
[data-theme='dark'] .notification-trigger:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); color: #f0f2f5; }
[data-theme='dark'] .notification-item:hover:where(:not(html[data-hover-disabled] *)), [data-theme='dark'] .notification-item:focus-visible { background: var(--surface-hover); }
[data-theme='dark'] .notification-item-icon { background: var(--surface-subtle); color: #bec7d4; }
@media (max-width:650px) {
 .notification-trigger { width: 36px; height: 36px; min-height: 36px; }
 .notification-dropdown { position: fixed; top: 62px; right: 12px; left: 12px; width: auto; max-width: none; }
 .notification-list { max-height: calc(100dvh - 180px); }
 .notification-heading { padding: 16px; }
}

/* A compact profile with identity, account details and a clear password action. */
dialog.profile-dialog { width: 440px; padding: 24px; }
.profile-dialog .modal-head { margin-bottom: 20px; gap: 14px; }
.profile-dialog .modal-head h2 { font-size: 24px; margin-top: 5px; }
.profile-dialog .modal-head .eyebrow { font-size: 11px; letter-spacing: 1.2px; }
.profile-dialog .modal-head .icon-button { width: 36px; height: 36px; min-height: 36px; font-size: 24px; }
.profile-card { padding: 18px; border-radius: 22px; background: var(--workspace-bg); }
.profile-card-person { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; }
.profile-card-person .avatar { width: 56px; height: 56px; }
.profile-card-person > div { min-width: 0; display: grid; gap: 6px; }
.profile-card-person h3 { font-size: 20px; font-weight: 550; line-height: 1.3; overflow-wrap: anywhere; }
.profile-card-person > div > span { font-size: 13px; color: var(--muted); }
.profile-card-fields { display: grid; gap: 16px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-card-fields > div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; align-items: baseline; }
.profile-card-fields dt { color: var(--muted); font-size: 13px; }
.profile-card-fields dd { font-size: 14px; color: var(--ink); margin: 0; text-align: right; overflow-wrap: anywhere; }
.profile-password-button { width: 100%; justify-content: center; gap: 8px; margin-top: 16px; font-size: 14px; min-height: 42px; }
.profile-password-button .icon { width: 17px; height: 17px; }
.profile-password-note { padding: 0 2px; margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
[data-theme='dark'] .profile-card { background: var(--surface-subtle); }
@media (max-width:450px) { dialog.profile-dialog { padding: 20px; }.profile-card { padding: 16px; }.profile-card-person h3 { font-size: 18px; }.profile-card-fields > div { grid-template-columns: 62px minmax(0,1fr); } }

/* A true circular unread counter on the notification bell. */
:is(.notification-badge,.open-shift-response-badge,.absence-nav-badge) { width: 20px; min-width: 20px; height: 20px; padding: 0; border-radius: 50%; corner-shape: round; font-size: 9px; }

/* The calendar period lives alongside week navigation. */
.planner-toolbar .period { margin: 0; }
.planner-toolbar .period > span:first-child { display: none; }
.planner-toolbar .period label { margin: 0; }
.planner-toolbar .period .date-trigger { min-height: 38px; padding: 8px 10px; font-size: 13px; }
.create-menu > .create-trigger { cursor: pointer; }
.create-menu[open]::after { content: ''; position: absolute; top: 100%; right: 0; width: 100%; height: 20px; }
@media (max-width:650px) {
 .planner-toolbar { gap: 12px; }
 .planner-toolbar .planner-tools { width: 100%; }
 .planner-toolbar .period { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
 .planner-toolbar .period > span:first-child { display: none; }
 .planner-toolbar .period .date-trigger { font-size: 13px; gap: 7px; }
}
.account-avatar-choice { display:grid; gap:var(--form-label-gap); min-width:0; margin:var(--form-section-gap) 0 0; }
html[data-theme] .account-composer .account-avatar-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:var(--compact-gap); }
html[data-theme] .account-composer .account-avatar-option { background:var(--surface); border-color:var(--control-border); gap:var(--compact-gap); }
.account-avatar-option>.icon { width:20px; height:20px; flex:0 0 20px; }

/* Round dialog actions use the shared panel-foundations contract. */
:is(.notification-badge,.open-shift-response-badge,.absence-nav-badge) { background: var(--danger-strong); color: #fff; }

/* Initial dialog focus stays on its container, without highlighting the close action. */
dialog:focus, dialog:focus-visible { outline: none; }

/* A text-only identity leaves more room for mobile header actions. */
@media (max-width:650px) {
 .header-brand > .brand-monogram { display: none; }
 .header-brand > .brand-wordmark { font-size: 14px; line-height: 1.3; }
 .header-brand > .brand-wordmark > small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.2; font-weight: 400; letter-spacing: 0; color: var(--muted); }
}

/* On phones the current location replaces the brand and its large duplicate. */
.header-mobile-location { display: none; }
@media (max-width:650px) {
 .header-desktop-title { display: none; }
 .header-mobile-location { display: block; font-size: 14px; line-height: 1.3; font-weight: 550; letter-spacing: -.2px; overflow-wrap: anywhere; }
 .header-brand > .brand-wordmark { white-space: normal; }
 .workspace-location { display: none; }
}

/* Sign-in: one calm product surface, with a separate optional demo entrance. */
.entry-page { min-height: 100dvh; padding: 28px 32px 24px; display: flex; flex-direction: column; align-items: center; color: var(--ink); background: var(--workspace-bg); }
.entry-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; max-width: 1020px; margin-bottom: 40px; }
.entry-brand { display: grid; gap: 3px; color: var(--ink); text-decoration: none; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; }
.entry-brand > span { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.entry-theme { background: #fff; color: #626973; }
.entry-content { width: 100%; max-width: 920px; margin: auto 0; }
.entry-card { display: grid; grid-template-columns: minmax(0,1fr) 400px; padding: 8px; background: #fff; border-radius: 32px; box-shadow: 0 12px 48px #28313d07; }
.entry-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 34px; border-radius: 25px; background: #f0f2f5; }
.entry-eyebrow { color: #777f8b; font-size: 10px; letter-spacing: 1.7px; font-weight: 550; }
.entry-story h2 { font-size: 34px; line-height: 1.15; font-weight: 550; letter-spacing: -1.1px; margin: 27px 0 16px; color: #353c47; }
.entry-story > p { color: #6a7380; font-size: 14px; line-height: 1.65; }
.entry-illustration { display: flex; justify-content: center; align-items: center; flex: 1; min-height: 164px; margin: 14px 0 12px; position: relative; }
.entry-illustration .avatar { position: relative; z-index: 1; width: 100px; height: 100px; border: 5px solid #f0f2f5; box-shadow: 0 7px 22px #222a3710; }
.entry-illustration .avatar + .avatar { margin-left: -17px; }
.entry-illustration .avatar:nth-of-type(3) { transform: translateY(-12px); z-index: 2; }
.entry-orbit { position: absolute; width: 260px; height: 140px; border: 1px solid #dfe3e9; border-radius: 50%; transform: rotate(-13deg); }
.entry-story-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; color: #747e8c; font-size: 12px; }
.entry-story-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.entry-story-footer .icon { width: 15px; height: 15px; }
.entry-story-footer > i { width: 3px; height: 3px; border-radius: 50%; background: #aeb5bf; }
.entry-form-panel { padding: 30px 32px 24px; min-width: 0; }
.entry-welcome { color: var(--muted); font-size: 13px; }
.entry-form-panel h1 { font-size: 27px; line-height: 1.2; font-weight: 550; letter-spacing: -.7px; margin-top: 7px; }
.entry-description { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 10px; max-width: 290px; }
.entry-form-panel form { display: grid; gap: 17px; margin-top: 26px; }
.entry-form-panel form > label { margin: 0; gap: 7px; font-size: 13px; font-weight: 500; }
.entry-form-panel input { width: 100%; min-height: 46px; padding: 12px 14px; background: #f8f9fb; border-color: #e2e6ec; border-radius:var(--compact-corner,22px); color: var(--ink); font-size: 15px; }
.entry-form-panel input::placeholder { color: #8b929c; }
.entry-form-panel input:focus { outline: 0; border-color: #8e99a8; box-shadow: 0 0 0 2px #5c6a7e0a; }
.entry-form-panel .password-field > input { padding-right: 46px; }
.entry-form-panel #toggle-password { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 32px; height: 32px; color: #7b8491; border-radius: 50%; }
.entry-form-panel #toggle-password .icon { width: 18px; height: 18px; }
.entry-form-panel #toggle-password:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #3e4958; }
.entry-form-panel .form-error { margin: 0; font-size: 13px; }
.entry-submit { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; padding: 12px 16px; font-size: 14px; border-radius: 14px; }
.entry-submit .icon { width: 18px; height: 18px; }
.entry-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 19px; }
.entry-help > span { color: var(--muted); }
.entry-demo { margin-top: 26px; }
.entry-demo-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; padding: 0 2px; }
.entry-demo-heading h2 { font-size: 14px; font-weight: 550; }
.entry-demo-heading > span { font-size: 12px; color: var(--muted); }
.entry-demo-roles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.entry-demo .demo-role { padding: 14px; min-height: 74px; gap: 10px; background: #fff; border: 1px solid transparent; border-radius: 20px; color: var(--ink); box-shadow: 0 3px 14px #28313d03; }
.entry-demo .demo-role strong { font-size: 13px; line-height: 1.3; }
.entry-demo .demo-role small { font-size: 11px; line-height: 1.4; color: var(--muted); }
.entry-demo .demo-role-icon { width: 32px; height: 32px; border-radius: 50%; color: #6b7584; background: #f0f2f6; flex-shrink: 0; }
.entry-demo .demo-role-icon .icon { width: 16px; height: 16px; }
.entry-demo .demo-role > .icon { width: 14px; height: 14px; color: #939ca8; }
.entry-demo .demo-role:hover:where(:not(html[data-hover-disabled] *)) { background: #fafbfc; border-color: #c9d1dc; box-shadow: 0 5px 18px #28313d08; }
.entry-demo > p { margin-top: 11px; font-size: 11px; color: var(--muted); text-align: center; }
.entry-footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 30px; color: var(--muted); font-size: 11px; }
.entry-footer > span { opacity: .6; }
[data-theme='dark'] .entry-theme { background: var(--surface-subtle); color: #b8c1cc; }
[data-theme='dark'] .entry-card { background: var(--surface); box-shadow: 0 14px 55px #00000012; }
[data-theme='dark'] .entry-story { background: var(--surface-subtle); }
[data-theme='dark'] .entry-eyebrow, [data-theme='dark'] .entry-story > p, [data-theme='dark'] .entry-story-footer { color: #a4adb9; }
[data-theme='dark'] .entry-story h2 { color: #eef1f5; }
[data-theme='dark'] .entry-illustration .avatar { border-color: #25292f; }
[data-theme='dark'] .entry-orbit { border-color: #3a414b; }
[data-theme='dark'] .entry-form-panel input { background: var(--surface-subtle); border-color: #343942; color: #eef1f5; }
[data-theme='dark'] .entry-form-panel input:focus { border-color: #7e8a9c; box-shadow: 0 0 0 2px #a1b0c20a; }
[data-theme='dark'] .entry-form-panel #toggle-password { color: #a6b0bd; }
[data-theme='dark'] .entry-form-panel #toggle-password:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: #e6edf7; }
[data-theme='dark'] .entry-demo .demo-role { background: var(--surface); }
[data-theme='dark'] .entry-demo .demo-role:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); border-color: #4c5665; }
[data-theme='dark'] .entry-demo .demo-role-icon { background: var(--surface-subtle); color: #b6c1cf; }
@media (max-width:800px) {
 .entry-page { padding: 24px 20px; }
 .entry-header { margin-bottom: 28px; max-width: 460px; }
 .entry-content { max-width: 460px; }
 .entry-card { display: block; padding: 0; border-radius: 26px; }
 .entry-story { display: none; }
 .entry-form-panel { padding: 28px; }
 .entry-demo { margin-top: 24px; }
 .entry-demo-roles { grid-template-columns: minmax(0,1fr); gap: 8px; }
 .entry-demo .demo-role { min-height: 58px; padding: 11px 14px; }
 .entry-demo .demo-role strong { font-size: 14px; }
 .entry-demo .demo-role small { font-size: 12px; }
}
@media (max-width:450px) {
 .entry-page { padding: 20px 16px; }
 .entry-brand { font-size: 17px; }
 .entry-brand > span { font-size: 11px; }
 .entry-header { margin-bottom: 24px; }
 .entry-form-panel { padding: 24px; }
 .entry-form-panel h1 { font-size: 25px; }
 .entry-form-panel input { font-size: 16px; }
 .entry-form-panel form { margin-top: 22px; gap: 16px; }
 .entry-help { margin-top: 16px; }
 .entry-demo-heading > span { font-size: 11px; }
}
@media (prefers-reduced-motion:no-preference) {
 .entry-demo .demo-role, .entry-theme { transition: background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease; }
}
.entry-form-panel #toggle-password { top: 50%; right: 8px; transform: translateY(-50%); }

/* Team count shares the neutral status-switch track. */
[data-theme='light'] .mini-team-heading h2 > span { background: #e7eaee; color: #626973; border-color: transparent; }

/* Period totals belong to the schedule they describe, without a separate page strip. */
.planner-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 16px 22px; background: #f8f9fb; border-bottom: 1px solid var(--line); }
.planner-summary-label { display: grid; gap: 4px; min-width: 0; }
.planner-summary-label strong { font-size: 13px; line-height: 1.3; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }
.planner-summary-label > span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.planner-summary .quiet-stats { display: flex; align-items: baseline; gap: 22px; color: var(--muted); width: auto; font-size: 13px; }
.planner-summary .quiet-stats strong { font-size: 18px; color: var(--ink); }
.planner-summary .quiet-stats strong > small { color: var(--muted); font-size: 12px; }
[data-theme='dark'] .planner-summary { background: var(--surface-subtle); }
@media (max-width:650px) {
 .planner-summary { padding: 14px 16px; gap: 12px; }
 .planner-summary-label { width: 100%; }
 .planner-summary .quiet-stats { width: 100%; justify-content: space-between; gap: 10px; }
 .planner-summary .quiet-stats strong { font-size: 17px; }
}

/* Every schedule tile shares one size, regardless of screen or employee row height. */
 .planner-cell, .planner-cell:has(> .planner-add) { padding: 12px 8px; }
 .planner-cell > .planner-add,
 .planner-cell > .planner-shift { height: 80px; min-height: 80px; flex: 0 0 80px; border-radius: 17px; corner-shape: squircle; }
 .planner-cell > .planner-add { margin: 0; }
 .planner-cell > .planner-shift { justify-content: center; padding: 10px 8px; gap: 6px; }
 .planner-cell .planner-shift-time { line-height: 1.3; }
 .planner-cell .planner-shift-meta { line-height: 1.3; row-gap: 0; column-gap: 4px; }

/* Departure is an explicit action; employment history remains in the reports. */
.delete-account-description { font-size: 15px; line-height: 1.6; color: var(--ink); margin-top: 12px; }
.delete-account-future { font-size: 14px; line-height: 1.5; color: var(--ink); padding: 12px 14px; border-radius: 14px; background: var(--workspace-bg); margin-top: 14px; }
.delete-account-note { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 14px; }
.button.account-delete-confirm { background: var(--danger-strong); border-color: var(--danger-strong); color: #fff; }
.button.account-delete-confirm:hover:where(:not(html[data-hover-disabled] *)) { background: var(--danger-strong-hover); border-color: var(--danger-strong-hover); color: #fff; }
[data-theme='dark'] .button.account-delete-confirm { background: var(--danger-strong); border-color: var(--danger-strong); color: var(--theme-text,var(--ink)); }
[data-theme='dark'] .button.account-delete-confirm:hover:where(:not(html[data-hover-disabled] *)) { background: var(--danger-strong-hover); border-color: var(--danger-strong-hover); }

/* Shared secondary surface: sampled from the employee 'Next shift' panel. */
html[data-theme='light'] { --surface-subtle: #f2f6fb; --surface-subtle-hover: var(--surface-subtle); }
html[data-theme='dark'] { --surface-subtle: #30343c; --surface-subtle-hover: #30343c; }
[data-theme='light'] .employee-schedule,
[data-theme='light'] .today-schedule,
[data-theme='light'] .employee-card-footer .text-button,
[data-theme='light'] .mini-team-heading h2 > span,
[data-theme='light'] .pill,
[data-theme='light'] .period-presets,
[data-theme='light'] .team-status-switch,
[data-theme='light'] .planner-view-switch,
[data-theme='light'] .planner-summary,
[data-theme='light'] .planner-shift,
[data-theme='light'] .planner-shift.is-recorded,
[data-theme='light'] .planner-day-header.is-today,
[data-theme='light'] .planner-cell.is-today,
[data-theme='light'] .planner-day-strip > button:not(.active):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .statistics-table .statistics-person-row td,
[data-theme='light'] .shift-timing-summary,
[data-theme='light'] .profile-card,
[data-theme='light'] .access-view-fields,
[data-theme='light'] .delete-account-future,
[data-theme='light'] .notification-item-icon,
[data-theme='light'] .directory-menu > summary,
[data-theme='light'] .entry-story,
[data-theme='light'] .entry-form-panel input,
[data-theme='light'] .entry-demo .demo-role-icon { background: var(--surface-subtle); }
[data-theme='light'] .planner-day-header.is-today,
[data-theme='light'] .planner-cell.is-today { box-shadow: inset 1px 0 var(--line),inset -1px 0 var(--line); }
/* A white shift remains distinct when nested inside the tinted current day. */
[data-theme='light'] .planner-cell.is-today > .planner-shift { background: var(--surface); }
[data-theme='light'] .employee-card-footer .text-button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-shift.is-recorded:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-day-header.is-today > button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-option:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-option:focus-visible,
[data-theme='light'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .notification-item:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .directory-menu .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='light'] .entry-illustration .avatar { border-color: var(--surface-subtle); }
@media (max-width:650px) {
 [data-theme='light'] .statistics-table .statistics-person-row { background: var(--surface); }
 [data-theme='light'] .statistics-table .statistics-person-row td { background: transparent; }
 [data-theme='light'] .statistics-table .statistics-person-row td[data-label] { background: var(--surface-subtle); }
}

/* Recorded shifts share the green presence status. */
.planner-shift.is-recorded .planner-shift-meta .icon,
.planner-footer .icon { color: var(--status-positive); }

/* History stays readable and editable, but no longer competes with upcoming shifts. */
[data-theme='light'] .planner-day-header.is-past > button,
[data-theme='light'] .planner-day-header.is-past strong,
[data-theme='light'] .planner-day-header.is-past small { color: #747b85; }
[data-theme='light'] .planner-cell.is-past > .planner-shift { color: #6b737f; border-color: transparent; box-shadow: none; }
[data-theme='light'] .planner-cell.is-past .planner-shift-time { font-weight: 500; }
[data-theme='light'] .planner-cell.is-past .planner-shift-meta { color: #737b86; }
[data-theme='light'] .planner-cell.is-past > .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { color: #454e5b; border-color: #cbd3de; background: var(--surface-subtle-hover); }
[data-theme='light'] .planner-cell.is-past > .planner-add { border-color: #e4e7eb; color: #939ba6; }
[data-theme='light'] .planner-cell.is-past > .planner-add:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-cell.is-past > .planner-add:focus-visible { border-color: #99a7ba; color: #56677d; }
[data-theme='dark'] .planner-day-header.is-past > button,
[data-theme='dark'] .planner-day-header.is-past strong,
[data-theme='dark'] .planner-day-header.is-past small { color: #939aa5; }
[data-theme='dark'] .planner-cell.is-past > .planner-shift { background: var(--surface-subtle); color: #a4acb8; border-color: transparent; box-shadow: none; }
[data-theme='dark'] .planner-cell.is-past .planner-shift-meta { color: #949eac; }
[data-theme='dark'] .planner-cell.is-past > .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: #646d7b; color: #e5eaf1; }
[data-theme='dark'] .planner-cell.is-past > .planner-add { border-color: #333a45; color: #737e8e; }
[data-theme='dark'] .planner-cell.is-past > .planner-add:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .planner-cell.is-past > .planner-add:focus-visible { border-color: #748297; color: #d2dbe8; }

/* Light control feedback uses the approved secondary surface, without blue fills. */
html[data-theme='light'] { --line: #e5e5e5; }
[data-theme='light'] .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .icon-button:not([data-close]):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .rail-button:not(.active):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .header-nav-button:not(.active):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .create-menu > .create-trigger:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .profile-dropdown > button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .directory-menu .text-button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .date-day:not(.chosen):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .date-month-arrow:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .date-popover-footer button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-option:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .custom-select-option:focus-visible,
[data-theme='light'] .custom-select-option[aria-selected='true'],
[data-theme='light'] .team-scroll-arrow:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .button:not(.primary):not(.account-delete-confirm):hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-nav-arrow:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-shift:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-shift.is-recorded:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-cell.is-past > .planner-shift:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .notification-item:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .notification-item:focus-visible,
[data-theme='light'] .entry-form-panel #toggle-password:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
[data-theme='light'] .entry-illustration .entry-orbit { border-color: var(--line); }
.planner-past-empty { display: flex; align-items: center; justify-content: center; min-height: 80px; color: var(--muted); font-size: 16px; opacity: .45; }

[data-theme='light'] .topbar-actions > .action-icon:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='light'] .planner-cell.is-today > .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }

/* Period totals span the panel while staying separate from the calendar columns. */
.planner-summary { width: calc(100% - 44px); max-width: calc(100% - 44px); justify-content: space-between; gap: 16px 28px; margin: 16px 22px 22px; padding: 14px 18px; border: 0; border-radius: 20px; corner-shape: squircle; background: var(--surface-subtle); }
[data-theme='dark'] .planner-summary { background: var(--surface-subtle); }
@media (max-width:650px) {
 .planner-summary { width: calc(100% - 24px); max-width: calc(100% - 24px); margin: 12px 12px 18px; padding: 14px 16px; gap: 12px; }
}

/* Shared controls: content cards and calendar date cells keep their own sizing. */
:root { --control-height: 48px; }
input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
select, .custom-select-trigger, .date-trigger,
.entry-form-panel input, .shift-dialog input, .planner-toolbar .period .date-trigger,
.button, .button.small, .entry-submit, .header-nav-button,
.employee-card-footer .text-button, .profile-dropdown > button {
 height: var(--control-height); min-height: var(--control-height); box-sizing: border-box;
}
textarea { min-height: var(--control-height); }
.button, .button.small, .entry-submit, .header-nav-button,
.custom-select-trigger, .date-trigger, .employee-card-footer .text-button {
 display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0;
}
.action-icon, .icon-button, .rail-button, .team-scroll-arrow, .planner-nav-arrow,
.date-month-arrow, .notification-trigger, .directory-menu > summary,
.topbar-actions > .action-icon, .create-menu > .create-trigger,
.profile-menu > .profile-trigger,
.shift-dialog .modal-head .icon-button, .profile-dialog .modal-head .icon-button {
 width: var(--control-height); height: var(--control-height);
 min-width: var(--control-height); min-height: var(--control-height);
 padding: 0; display: inline-flex; align-items: center; justify-content: center;
 flex-shrink: 0; border-radius: 50%; corner-shape: round; line-height: 1;
}
/* Rectangular profile surface keeps the height of adjacent header controls. */
#profile-menu { margin-left:0; padding-left:0; }
#profile-menu > .profile-trigger {
 width:auto; height:var(--control-height); min-width:0; min-height:var(--control-height); box-sizing:border-box;
 padding:0 var(--compact-gap); gap:var(--identity-gap); border:0;
 border-radius:999px; corner-shape:round;
 background:var(--surface); color:var(--ink); box-shadow:none;
}
#profile-menu > .profile-trigger:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); }
#profile-menu > .profile-trigger .avatar { width:34px; height:34px; min-width:34px; flex-shrink:0; }
#profile-menu .profile-summary-name { display:flex; min-width:0; max-width:160px; gap:2px; text-align:left; }
#profile-menu .profile-summary-name strong { font-size:13px; font-weight:var(--person-name-weight); line-height:1.4; }
#profile-menu .profile-summary-name > span { display:block; font-size:11px; line-height:1.5; color:var(--muted); }
#profile-menu .profile-summary-name > :is(strong,span) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#profile-menu .profile-chevron { display:block; width:16px; height:16px; flex:0 0 16px; margin:0; color:var(--muted); }
@media(max-width:650px) {
 #profile-menu .profile-summary-name { max-width:100px; }
 #profile-menu > .profile-trigger { gap:var(--compact-gap); }
}

.team-scroll-arrow > .icon, .planner-nav-arrow > .icon, .date-month-arrow > .icon {
 width: 20px; height: 20px; display: block; flex: 0 0 20px; margin: 0;
}
.password-field button, .entry-form-panel #toggle-password {
 width: 48px; height: 48px; top: 0; right: 0; display: inline-flex; align-items: center; justify-content: center;
}
.entry-form-panel .password-field > input { padding-right: 48px; }
.custom-select-option { min-height: 48px; }
html[data-input-mode='pointer'] :focus-visible { outline: none !important; }
html[data-input-mode='keyboard'] :focus-visible:not(dialog) { outline: 1px solid currentColor !important; outline-offset: 2px !important; }
@media (max-width: 380px) {
 .topbar .topbar-panel { grid-template-columns: minmax(0,1fr); }
 .header-brand { grid-column: 1; grid-row: 1; }
 .topbar-actions { grid-column: 1; grid-row: 2; }
 .header-nav { grid-column: 1; grid-row: 3; }
 .topbar-actions { gap: 4px; }
}

@media (min-width:381px) and (max-width:650px) { .notification-dropdown { top: 82px; } }
@media (max-width:380px) { .notification-dropdown { top: 125px; } }

/* Employment is separate from account permissions. Neutral labels suit every role. */
.staff-position { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 400; overflow-wrap: anywhere; }
.mini-person-name .staff-position { margin-top: 5px; font-size: 13px; line-height: 1.3; }
.planner-person-info .staff-position { margin: 3px 0; font-size: 12px; }
.statistics-person-name .staff-position { margin-top: 3px; }
.employment-fields { display: grid; gap: 16px; margin: 20px 0; }
.trainee-toggle { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border-radius: 18px; background: var(--surface-subtle); cursor: pointer; -webkit-tap-highlight-color:transparent; }
.trainee-toggle > span:first-child { min-width: 0; display: grid; gap: 3px; }
.trainee-toggle strong { font-size: 15px; font-weight: 500; }
.trainee-toggle small { font-size: 13px; line-height: 1.4; color: var(--muted); font-weight: 400; }
.trainee-toggle input[type='checkbox'] { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.trainee-switch { position: relative; display: block; width: 44px; height: 26px; flex: 0 0 44px; border-radius: 20px; background: var(--line); transition: background-color 160ms ease; }
.trainee-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 4px #0002; transition: transform 160ms ease; }
.trainee-toggle input:checked + .trainee-switch { background: var(--ink); }
.trainee-toggle input:checked + .trainee-switch::after { transform: translateX(18px); }
html[data-input-mode='keyboard'] .trainee-toggle input:focus-visible + .trainee-switch { outline: 1px solid var(--ink); outline-offset: 3px; }
.employment-person { display: flex; align-items: flex-start; gap: 14px; margin-top: 20px; }
.employment-person > div { display: grid; gap: 5px; min-width: 0; }
html[data-theme] #modal .replacement-candidate-card { display:flex; align-items:center; gap:var(--surface-gap); min-width:0; margin:0; padding:var(--surface-gap); background:color-mix(in srgb,var(--action) 8%,var(--surface)); border:1px solid var(--action); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
html[data-theme] #modal .replacement-request-owner { background:var(--surface-subtle); border-color:var(--line); }
.replacement-person-direction { display:grid; place-items:center; flex:0 0 20px; width:20px; height:20px; margin-left:auto; }
.replacement-person-direction>.icon { width:20px; height:20px; stroke-width:1.6; }
.replacement-person-direction.is-outgoing { color:var(--danger-strong); }
.replacement-person-direction.is-incoming { color:var(--status-positive); }
html[data-theme] #modal .replacement-candidate-card>.avatar { width:44px; height:44px; flex:0 0 44px; }
html[data-theme] #modal .replacement-candidate-card>div { gap:var(--form-label-gap); }
html[data-theme] #modal .replacement-candidate-card strong { color:var(--ink); font-size:var(--person-name-size); font-weight:var(--person-name-weight); line-height:var(--person-name-line-height); overflow-wrap:anywhere; }
html[data-theme] #modal .replacement-candidate-card>div>span { color:var(--action); font-size:var(--panel-caption-size); line-height:1.5; }
html[data-theme] #modal .replacement-request-owner>div>span { color:var(--muted); }
.replacement-response-burst { position:absolute; inset:0; pointer-events:none; z-index:4; overflow:hidden; border-radius:inherit; }
.replacement-response-particle { position:absolute; width:6px; height:10px; border-radius:2px; background:var(--action); pointer-events:none; }
.replacement-response-particle:nth-child(3n) { background:color-mix(in srgb,var(--action) 40%,var(--surface)); border-radius:50%; width:7px; height:7px; }
.replacement-response-particle:nth-child(3n + 1) { background:var(--status-positive); width:4px; height:8px; }


.employment-person strong { font-size: 18px; line-height: 1.3; }
.employment-person span:not(.avatar) { font-size: 14px; color: var(--muted); }
.employee-card-footer .account-actions .employment-edit { grid-column: 1 / -1; }
@media (max-width:650px) { .mini-person-name .staff-position { font-size: 12px; margin-top: 4px; } }
@media (prefers-reduced-motion:reduce) { .trainee-switch,.trainee-switch::after { transition: none; } }

.manager-calendar { margin-top: 24px; padding: 22px; }
.manager-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.manager-section-heading h2 { font-size: 22px; line-height: 1.25; font-weight: 550; margin: 0; }
.manager-section-heading p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.manager-section-label { color: var(--muted); font-size: 13px; line-height: 1.5; }
.manager-days { display: grid; grid-template-columns: repeat(7,minmax(145px,1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.manager-day { padding: 12px 0; border-radius: 20px; background: var(--surface-subtle); }
.manager-day.is-today { box-shadow: inset 0 0 0 1px var(--muted); }
.manager-day.is-past { opacity: .75; }
.manager-day-heading { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.manager-day-heading strong { font-size: 18px; color: var(--ink); font-weight: 550; }
.manager-day .planner-cell { min-height: 104px; background: transparent; border: 0; }
.manager-day .planner-shift { width: 100%; }
.manager-statistics { padding: 24px; }
.manager-personal-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 16px 0; border-radius: 18px; background: var(--surface-subtle); }
.manager-personal-totals > div { padding: 0 20px; }
.manager-personal-totals > div + div { border-left: 1px solid var(--line); }
.manager-personal-totals dt { font-size: 13px; line-height: 1.4; color: var(--muted); }
.manager-personal-totals dd { margin: 7px 0 0; font-size: 28px; font-weight: 550; line-height: 1.2; }
.manager-personal-totals dd small { font-size: 14px; color: var(--muted); font-weight: 400; }
.manager-statistics-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
@media (max-width:650px) {
 .manager-calendar,.manager-statistics { padding: 16px; }
 .manager-section-heading { gap: 10px; }
 .manager-section-heading h2 { font-size: 20px; }
 .manager-section-label { display: none; }
 .manager-days { grid-template-columns: repeat(7,minmax(155px,1fr)); }
 .manager-personal-totals > div { padding: 0 10px; }
 .manager-personal-totals dt { font-size: 11px; }
 .manager-personal-totals dd { font-size: 22px; }
}

/* Keep a distinct shift card over the personal day's backing surface. */
.manager-day .planner-cell > .planner-shift { background: var(--surface); border-color: var(--line); box-shadow: 0 2px 7px #00000005; }
.manager-day .planner-cell > .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: var(--muted); box-shadow: 0 4px 12px #0000000b; }
[data-theme='dark'] .manager-day .planner-cell > .planner-shift { background: var(--surface-subtle); }
[data-theme='dark'] .manager-day .planner-cell > .planner-shift:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); }
.manager-day.is-today { box-shadow: none; }
.manager-day-heading { min-height: 32px; }
.manager-day.is-today .manager-day-heading strong { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 12px; background: var(--ink); color: var(--surface); }


/* Shared schedule surfaces and interaction states, in both calendars. */
:root {
 --schedule-current-day: var(--surface-subtle);
 --schedule-shift-edge: var(--line);
}
html[data-theme='dark'] {
 --surface-hover: var(--surface-subtle);
 --surface-subtle-hover: var(--surface-subtle);
 --schedule-current-day: color-mix(in srgb, var(--surface-subtle) 70%, var(--surface));
 --schedule-shift-edge: color-mix(in srgb, var(--surface-subtle) 75%, var(--muted));
}
[data-theme='dark'] .calendar-panel.planner,
[data-theme='dark'] .manager-calendar,
[data-theme='dark'] .planner-day-header,
[data-theme='dark'] .planner-cell,
[data-theme='dark'] .manager-day { background: var(--surface); }
[data-theme='dark'] .planner-day-header.is-today,
[data-theme='dark'] .planner-cell.is-today,
[data-theme='dark'] .manager-day.is-today { background: var(--schedule-current-day); }
[data-theme='dark'] .manager-day .planner-cell { background: transparent; }
[data-theme='dark'] .manager-day.is-today { box-shadow: none; }
[data-theme='dark'] .planner-cell > .planner-shift,
[data-theme='dark'] .planner-cell.is-past > .planner-shift,
[data-theme='dark'] .manager-day .planner-cell > .planner-shift {
 background: var(--surface-subtle);
 border: 1px solid var(--schedule-shift-edge);
 box-shadow: 0 2px 6px #00000012;
}
[data-theme='dark'] .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .planner-cell.is-past > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .manager-day .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background: var(--surface-subtle-hover);
 border-color: var(--muted);
 color: var(--ink);
 box-shadow: 0 4px 12px #00000024;
}
[data-theme='dark'] .planner-cell > .planner-add {
 border-color: var(--schedule-shift-edge);
 color: var(--muted);
 background: transparent;
}
[data-theme='dark'] .planner-cell > .planner-add:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .planner-cell.is-past > .planner-add:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 border-color: var(--muted);
 color: var(--ink);
 background: transparent;
 box-shadow: none;
}
[data-theme='dark'] .team-status-switch button[aria-pressed='true'],
[data-theme='dark'] .custom-select-option[aria-selected='true'] { background: var(--surface-subtle); }
[data-theme='dark'] .team-status-switch button:hover:where(:not(html[data-hover-disabled] *)),
[data-theme='dark'] .profile-dropdown > button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .notification-item:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .custom-select-option:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: var(--surface-hover); color: var(--ink); }
@media (prefers-reduced-motion:no-preference) {
 .planner-shift,.planner-add { transition: background-color 150ms ease,border-color 150ms ease,color 150ms ease,box-shadow 150ms ease; }
}

/* Date pickers and time inputs share one control border and size. */
:root { --control-border: #e5e5e5; }
html[data-theme='dark'] { --control-border: #383b40; }
html[data-theme] :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']),textarea,.date-trigger,.custom-select-trigger) {
 border: 1px solid var(--control-border);
}
html[data-theme] :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']),textarea,.date-trigger,.custom-select-trigger):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
html[data-theme] :is(.date-trigger,.custom-select-trigger)[aria-expanded='true'] {
 border-color: var(--muted);
}
.shift-dialog .date-trigger,.shift-dialog .custom-select-trigger {
 height: var(--control-height); min-height: var(--control-height); border-radius:var(--compact-corner,22px);
}
html[data-theme] .shift-dialog :is(input:not([type='hidden']),.date-trigger,.custom-select-trigger) { background: var(--surface); }

/* In light mode the shift keeps its resting fill; only its edge strengthens. */
[data-theme='light'] .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='light'] .planner-cell.is-past > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='light'] .manager-day .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background: var(--surface-subtle);
 border-color: var(--muted);
 box-shadow: none;
}
[data-theme='light'] .planner-cell.is-today > .planner-shift,
[data-theme='light'] .planner-cell.is-today > .planner-shift:is(:focus-visible),
[data-theme='light'] .manager-day .planner-cell > .planner-shift,
[data-theme='light'] .manager-day .planner-cell > .planner-shift:is(:focus-visible) { background: var(--surface); }

[data-theme='light'] .planner-cell.is-today > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *))),
[data-theme='light'] .manager-day .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *))) { background: var(--surface-subtle-hover); }

.planner-day-label { cursor: default; background: transparent; }
[data-theme='dark'] .planner-cell > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) .planner-shift-meta { color: var(--ink); }

/* Quiet date headers: one date, one context line and an aligned shift count. */
.planner-day-header { min-height: 64px; padding: var(--surface-inset) var(--compact-gap); display: flex; align-items: center; justify-content: center; gap: 0; }
.planner-day-header > .planner-day-label,
.manager-day-heading > .planner-day-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: default; }
.planner-day-number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; corner-shape: round; font-size: 21px; line-height: 1; font-weight: 550; letter-spacing: -.8px; font-variant-numeric: tabular-nums; color: var(--ink); }
.planner-day-context { display: grid; gap: 2px; min-width: 24px; text-align: left; }
.planner-day-weekday { font-size: 13px; line-height: 1.25; font-weight: 500; text-transform: capitalize; color: var(--muted); }
.planner-day-tag { font-size: 12px; line-height: 1.25; font-weight: 400; color: var(--muted); }
.planner-day-header > .planner-day-count,
.manager-day-heading > .planner-day-count { margin: 0; font-size: 13px; line-height: 1.4; font-weight: 400; color: var(--muted); }
.is-past .planner-day-number { color: var(--muted); }
.is-today > .planner-day-label .planner-day-number,
.manager-day.is-today .planner-day-number { background: var(--ink); color: var(--surface); }
.is-today .planner-day-weekday { color: var(--ink); }
.manager-day-heading { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; min-height: 66px; margin-bottom: 4px; padding: 0 8px; }
@media (max-width:650px) {
 .planner-day-header { min-height: 64px; padding: var(--surface-inset) var(--compact-gap); gap: 0; }
 .planner-day-number { font-size: 20px; }
 .manager-day-heading { gap: 6px; }
}

/* Statistics presets follow the same segmented-control states as the team filter. */
.statistics-range { display: inline-flex; gap: 3px; padding: 4px; min-height: var(--control-height); border-radius: 14px; background: var(--surface-subtle); }
.statistics-range > button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 80px; padding: 0 16px; border: 0; border-radius: 10px; font-size: 14px; color: var(--muted); background: transparent; }
[data-theme='light'] .statistics-range > button:focus-visible { color: var(--ink); background: var(--surface); box-shadow: 0 1px 5px #00000008; }

[data-theme='light'] .statistics-range > button:hover:where(:not(html[data-hover-disabled] *)) { color: var(--ink); background: var(--surface-subtle-hover); box-shadow: 0 1px 5px #00000008; }
[data-theme='light'] .statistics-range > button[aria-pressed='true'] { color: var(--ink); background: var(--surface); box-shadow: 0 2px 6px #0000000a; }
[data-theme='dark'] .statistics-range { background: var(--surface); }
[data-theme='dark'] .statistics-range > button[aria-pressed='true'] { color: var(--ink); background: var(--surface-subtle); box-shadow: none; }
[data-theme='dark'] .statistics-range > button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { color: var(--ink); background: var(--surface-subtle-hover); }
@media (prefers-reduced-motion:no-preference) { .statistics-range > button { transition: background-color 150ms ease,color 150ms ease,box-shadow 150ms ease; } }

/* Separate employee summaries on phones without adding another card color. */
@media (max-width:650px) {
 .statistics-table .statistics-person-row { position: relative; margin-bottom: 0; }
 .statistics-table .statistics-person-row + .statistics-person-row { margin-top: 12px; }
 .statistics-table .statistics-person-row + .statistics-person-row::before {
  content: ''; position: absolute; top: -6px; left: 16px; right: 16px;
  height: 1px; background: var(--line); pointer-events: none;
 }
}

/* Employee workspace uses the same three surface levels as the team schedule. */
.employee-page { display: grid; gap: 22px; min-width: 0; padding-bottom: 28px; }
.employee-page .panel { margin: 0; min-width: 0; background: var(--surface); border: 0; box-shadow: none; }
.employee-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 2px; }
.employee-page-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 550; letter-spacing: -.8px; }
.employee-page-heading p { margin-top:var(--page-caption-space); font-size: 14px; line-height: 1.5; color: var(--muted); }
.employee-page .employee-next { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,300px); gap: 24px; padding: 28px; }
.employee-next-main,.employee-next-detail { min-width: 0; }
.employee-kicker { display: block; color: var(--muted); font-size: 12px; letter-spacing: 1.2px; line-height: 1.5; font-weight: 500; }
.employee-next h2 { margin: 12px 0 4px; font-size: 24px; font-weight: 550; line-height: 1.2; letter-spacing: -.5px; }
.employee-next-date { font-size: 14px; line-height: 1.5; color: var(--muted); text-transform: capitalize; }
.employee-next-time { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 20px; }
.employee-next-time > strong { font-size: clamp(22px,2.4vw,28px); line-height: 1.2; font-weight: 550; letter-spacing: -.8px; white-space: nowrap; }
.employee-next-time > span { background: var(--surface-subtle); color: var(--ink); border-radius: 12px; padding: 8px 12px; font-size: 16px; line-height: 1.3; white-space: nowrap; }
.employee-next-detail { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding-left: 24px; border-left: 1px solid var(--line); }
.employee-shift-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.employee-shift-state .icon { width: 14px; height: 14px; color: var(--status-positive); flex-shrink: 0; }
.employee-shift-state.completed { --shift-badge-fill:var(--control-accent); --shift-badge-ink:var(--control-accent-ink); }
.employee-shift-state.scheduled { --shift-badge-fill:color-mix(in srgb,var(--control-accent) 10%,var(--surface)); --shift-badge-ink:var(--control-accent); }
html[data-theme] body .workday-overview .employee-shift-state.scheduled>.icon { color:inherit; }
.employee-shift-state.ongoing { color:var(--status-active-ink); --shift-badge-fill:var(--status-active-fill); --shift-badge-ink:var(--status-active-ink); }
.employee-shift-state > i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.employee-next .employee-shift-state { padding: 7px 11px; border-radius: 10px; background: var(--surface-subtle); color: var(--ink); }
.employee-next-location { display: flex; align-items: flex-start; gap: 8px; font-size: 16px; line-height: 1.4; }
.employee-next-location > span { overflow-wrap: anywhere; }
.employee-next-location .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); flex: 0 0 18px; }
.employee-next-detail > p { font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.employee-timezone { font-size: 12px; line-height: 1.5; color: var(--muted); }
.employee-page .employee-next-empty { display: flex; align-items: center; gap: 20px; }
.employee-next-empty h2 { font-size: 22px; }
.employee-next-empty p { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.employee-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 48px; background: var(--surface-subtle); color: var(--muted); border-radius: 50%; }
.employee-empty-icon .icon { width: 21px; height: 21px; }
.employee-page .employee-week,.employee-page .employee-history { padding: 24px; }
.employee-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 22px; }
.employee-section-head > div { min-width: 0; }
.employee-section-head h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 550; letter-spacing: -.5px; }
.employee-section-head p { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.employee-week-navigation { display: flex; gap: 6px; flex-shrink: 0; }
.employee-week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 10px; }
.employee-week-day { min-width: 0; padding: 12px 8px; border: 1px solid transparent; border-radius: 18px; background: var(--surface-subtle); }
.employee-week-day.is-today { border-color: var(--muted); background: var(--schedule-current-day); }
.employee-week-date { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; min-height: 34px; }
.employee-week-date > time { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; font-size: 21px; line-height: 1; font-weight: 550; border-radius: 11px; color: var(--ink); }
.employee-week-date > div { display: grid; gap: 2px; min-width: 0; }
.employee-week-date > div > span { font-size: 12px; line-height: 1.3; text-transform: capitalize; color: var(--muted); overflow-wrap: anywhere; }
.employee-week-date small { font-size: 11px; line-height: 1.3; color: var(--muted); }
.employee-week-day.is-today .employee-week-date > time { background: var(--ink); color: var(--surface); }
.employee-week-day.is-past .employee-week-date > time { color: var(--muted); }
.employee-week-slots { display: grid; gap: 8px; min-width: 0; }
.employee-week-slot { display: grid; gap: 6px; padding: 12px 6px; border-radius: 12px; background: var(--surface); min-width: 0; text-align: center; }
.employee-week-slot > strong { font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; letter-spacing: -.3px; }
.employee-week-slot > span { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.employee-week-slot .icon { width: 13px; height: 13px; color: var(--status-positive); }
.employee-week-free { font-size: 13px; line-height: 1.5; color: var(--muted); padding: 14px 4px; text-align: center; }
.employee-history-period { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; width: 330px; max-width: 100%; }
.employee-history-period label { min-width: 0; }
.employee-history-period .date-trigger { gap: 6px; padding: 8px 10px; font-size: 13px; background: var(--surface); }
.employee-history-period .date-trigger > .icon { width: 15px; height: 15px; flex: 0 0 15px; }
.employee-history-row { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: start; gap: 16px; padding: 20px 0; }
.employee-history-row + .employee-history-row { border-top: 1px solid var(--line); }
.employee-history-row:first-child { padding-top: 0; }
.employee-history-row:last-child { padding-bottom: 0; }
.employee-history-date { display: grid; justify-items: center; gap: 3px; padding: 9px 4px; border-radius: 14px; background: var(--surface-subtle); }
.employee-history-date strong { font-size: 21px; line-height: 1; font-weight: 550; }
.employee-history-date > span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.employee-history-main { min-width: 0; }
.employee-history-main > span { font-size: 13px; line-height: 1.4; color: var(--muted); text-transform: capitalize; }
.employee-history-main h3 { margin-top: 4px; font-size: 18px; line-height: 1.4; font-weight: 500; }
.employee-history-main p { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.employee-history-result { display: grid; justify-items: end; gap: 8px; padding-top: 2px; }
.employee-history-result > strong { font-size: 20px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.employee-history-result > strong > small { font-size: 13px; color: var(--muted); }
.employee-history-empty { display: grid; justify-items: center; gap: 12px; padding: 28px 16px; text-align: center; }
.employee-history-empty h3 { font-size:var(--empty-title-size); line-height: 1.4; font-weight: 500; }
.employee-history-empty p { max-width: 340px; font-size:var(--form-note-size); line-height:var(--form-note-leading); color: var(--muted); }
[data-theme='dark'] .employee-week-day { background: var(--surface); border-color: var(--line); }
[data-theme='dark'] .employee-week-day.is-today { background: var(--schedule-current-day); border-color: var(--muted); }
[data-theme='dark'] .employee-week-slot { background: var(--surface-subtle); border: 1px solid var(--schedule-shift-edge); }
@media (max-width:1279px) { .employee-week-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width:900px) {
 .employee-week-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .employee-section-head { align-items: flex-start; }
 .employee-history-period { width: 100%; }
 .employee-next { gap: 20px; }
}
@media (max-width:650px) {
 .employee-page { gap: 16px; }
 .employee-page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
 .employee-page-heading h1 { font-size: 25px; }
 .employee-page-heading p { display: block; }
 .employee-page .employee-next { grid-template-columns: minmax(0,1fr); padding: 20px; gap: 20px; }
 .employee-next-detail { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; gap: 12px; }
 .employee-next h2 { font-size: 22px; }
 .employee-next-time { margin-top: 16px; }
 .employee-next-detail .employee-shift-state { padding: 0; background: transparent; }
 .employee-page .employee-next-empty { display: flex; align-items: flex-start; gap: 12px; }
 .employee-next-empty h2 { font-size: 20px; }
 .employee-page .employee-week,.employee-page .employee-history { padding: 18px; }
 .employee-section-head { flex-wrap: nowrap; gap: 12px; margin-bottom: 18px; }
 .employee-section-head h2 { font-size: 20px; }
 .employee-history .employee-section-head { flex-wrap: wrap; }
 .employee-history-period { width: 100%; }
 .employee-week-grid { grid-template-columns: minmax(0,1fr); gap: 8px; }
 .employee-week-day { display: grid; grid-template-columns: 100px minmax(0,1fr); align-items: center; gap: 12px; padding: 12px; }
 .employee-week-date { margin: 0; gap: 8px; }
 .employee-week-date > div > span { font-size: 12px; }
 .employee-week-slot { padding: 10px 7px; }
 .employee-week-slot > strong { font-size: 15px; }
 .employee-week-free { text-align: left; padding: 8px; }
 .employee-week-day.is-free { background: transparent; border-color: var(--line); }
 .employee-week-day.is-free.is-today { background: var(--schedule-current-day); border-color: var(--muted); }
}
@media (max-width:380px) {
 .employee-page .employee-next { padding: 18px; }
 .employee-page .employee-week,.employee-page .employee-history { padding: 14px; }
 .employee-week-day { grid-template-columns: 88px minmax(0,1fr); gap: 8px; padding: 10px; }
 .employee-week-slot > strong { font-size: 14px; }
 .employee-week-date > time { width: 28px; height: 28px; flex-basis: 28px; font-size: 19px; }
 .employee-history-row { grid-template-columns: 44px minmax(0,1fr); gap: 10px 12px; }
 .employee-history-result { grid-column: 2; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; }
 .employee-history-date { grid-row: span 2; }
}

.employee-weekday-short { display: none; }
@media (max-width:650px) {
 .employee-weekday-long { display: none; }
 .employee-weekday-short { display: block; }
}

/* One personal summary replaces the repeated metrics and self row in statistics. */
.statistics-page .employee-statistics-summary { padding: 24px; background: var(--surface); border: 0; box-shadow: none; }
.employee-statistics-summary h2 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 550; letter-spacing: -.4px; }
.employee-statistics-summary > div > p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.employee-statistics-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 18px 0; margin-top: 20px; border-radius: 18px; background: var(--surface-subtle); }
.employee-statistics-values > div { min-width: 0; padding: 0 24px; }
.employee-statistics-values > div + div { border-left: 1px solid var(--line); }
.employee-statistics-values dt { color: var(--muted); font-size: 14px; line-height: 1.4; white-space: nowrap; }
.employee-statistics-values dd { margin: 8px 0 0; font-size: 30px; line-height: 1.2; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.employee-statistics-values dd small { font-size: 14px; color: var(--muted); font-weight: 400; }
.employee-statistics-explanation { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width:650px) {
 .statistics-page .employee-statistics-summary { padding: 18px; }
 .employee-statistics-summary h2 { font-size: 20px; }
 .employee-statistics-values { padding: 14px 0; margin-top: 16px; }
 .employee-statistics-values > div { padding: 0 12px; }
 .employee-statistics-values dt { font-size: 12px; }
 .employee-statistics-values dd { font-size: 24px; }
}
@media (max-width:380px) {
 .statistics-page .employee-statistics-summary { padding: 14px; }
 .employee-statistics-values > div { padding: 0 8px; }
 .employee-statistics-values dt { font-size: 11px; }
 .employee-statistics-values dd { font-size: 21px; }
}

/* Compact devices read the week chronologically as one list, never a wrapped grid. */
@media (max-width:1279px) {
 .employee-week-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
 .employee-week-day,
 [data-theme='dark'] .employee-week-day,
 .employee-week-day.is-free {
  display: grid; grid-template-columns: 122px minmax(0,1fr); align-items: center;
  gap: 18px; padding: 14px 12px; border: 0; border-radius: 0; background: transparent;
 }
 .employee-week-day + .employee-week-day { border-top: 1px solid var(--line); }
 .employee-week-date { margin: 0; gap: 10px; }
 .employee-week-date > div > span { font-size: 13px; }
 .employee-week-day.is-today,
 [data-theme='dark'] .employee-week-day.is-today,
 .employee-week-day.is-free.is-today {
  background: var(--schedule-current-day); border-color: transparent; border-radius: 16px;
  box-shadow: none;
 }
 .employee-week-day.is-today + .employee-week-day { border-color: transparent; }
 .employee-week-slot { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; background: var(--surface-subtle); text-align: left; }
 .employee-week-slot > strong { font-size: 16px; }
 .employee-week-slot > span { font-size: 13px; justify-content: flex-end; }
 .employee-week-free { padding: 12px 14px; font-size: 14px; text-align: left; }
}
@media (max-width:650px) {
 .employee-week-day,
 [data-theme='dark'] .employee-week-day,
 .employee-week-day.is-free { grid-template-columns: 92px minmax(0,1fr); gap: 10px; padding: 12px 8px; }
 .employee-week-date { gap: 8px; }
 .employee-week-date > div > span { font-size: 13px; }
 .employee-week-slot { grid-template-columns: minmax(0,1fr); justify-items: start; gap: 4px; padding: 12px; }
 .employee-week-slot > span { justify-content: flex-start; font-size: 12px; }
 .employee-week-day.is-today .employee-week-slot { background: var(--surface); }
 [data-theme='dark'] .employee-week-day.is-today .employee-week-slot { background: var(--surface-subtle); }
}
@media (max-width:380px) {
 .employee-week-day,
 [data-theme='dark'] .employee-week-day,
 .employee-week-day.is-free { grid-template-columns: 84px minmax(0,1fr); gap: 8px; padding: 12px 6px; }
 .employee-week-date { gap: 6px; }
 .employee-week-slot { padding: 10px; }
 .employee-week-slot > strong { font-size: 15px; }
}

/* Every floating panel shares the same elevation above page cards. */
:root {
 --floating-shadow: 0 16px 44px #0000001a, 0 3px 10px #0000000a;
 --floating-edge: var(--line);
}
html[data-theme='dark'] {
 --floating-shadow: 0 20px 56px #00000080, 0 4px 14px #00000040;
 --floating-edge: var(--control-border);
}
html[data-theme] :is(.profile-dropdown,.custom-select-popover,.date-popover,dialog) {
 box-shadow: var(--floating-shadow);
 border: 1px solid var(--floating-edge);
}

/* Desktop calendars float without a second outline; mobile sheets keep their frame. */
@media (min-width:651px) {
 html[data-theme] body .date-popover {
  border:0;
  box-shadow:var(--floating-shadow);
 }
}

/* Trainee switches must remain legible on their inner-surface backing. */
.trainee-switch { border: 1px solid var(--control-border); }
.trainee-switch::after { top: 50%; left: 3px; transform: translateY(-50%); }
.trainee-toggle input:checked + .trainee-switch::after { transform: translate(16px,-50%); }
[data-theme='dark'] .trainee-switch { background: var(--surface); }
[data-theme='dark'] .trainee-switch::after { background: var(--ink); }
[data-theme='dark'] .trainee-toggle input:checked + .trainee-switch { background: var(--ink); border-color: var(--ink); }
[data-theme='dark'] .trainee-toggle input:checked + .trainee-switch::after { background: var(--surface); }
[data-theme='light'] .trainee-switch::after { background: var(--muted); }
[data-theme='light'] .trainee-toggle input:checked + .trainee-switch::after { background: var(--surface); }

/* The mobile header already offers employee creation; avoid a second plus below. */
@media (max-width:650px) {
 .team-section .section-heading > .action-icon[data-add-user] { display: none; }
}

/* Hover follows its underlying surface, with a small lift rather than a bright fill. */
[data-theme='dark'] .statistics-range > button:not([aria-pressed='true']):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: var(--surface-hover); }
[data-theme='dark'] .team-status-switch button[aria-pressed='true']:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .custom-select-option[aria-selected='true']:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: var(--surface-subtle-hover); }

/* Compact shift editor: identity, time and actions share one clean alignment. */
dialog.shift-dialog { width: 560px; padding: 24px; }
.shift-editor-person { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 0; border-radius: 0; background: transparent; }
.shift-person-caption { font-size: 13px; line-height: 1.4; color: var(--muted); }
.shift-person-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
#shift-person-avatar { grid-row: auto; align-self: flex-start; flex: 0 0 48px; }
#shift-person-avatar .avatar { width: 48px; height: 48px; }
.shift-person-field { flex: 1; min-width: 0; }
.shift-person-field .custom-select-trigger { justify-content: space-between; gap: 10px; text-align: left; }
.shift-person-field .custom-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-person-field .custom-select-trigger > .icon { flex: 0 0 16px; }
.shift-person-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-left: 0; margin-top: 7px; font-size: 13px; line-height: 1.4; color: var(--muted); min-width: 0; }
.shift-editor-person .shift-home-branch { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.shift-fixed-person { gap: 0; min-width: 0; min-height: 0; align-content: start; }
.shift-fixed-person strong { font-size: 17px; line-height: 1.35; font-weight: 550; overflow-wrap: anywhere; }
.shift-dialog .shift-editor-times { grid-template-columns: minmax(0,1.35fr) repeat(2,minmax(0,1fr)); gap: 12px; }
.shift-dialog .date-trigger { justify-content: space-between; }
.shift-dialog .modal-actions { margin-top: 4px; }

/* Account creation groups identity and credentials without stretching every field. */
dialog.account-dialog { width: 540px; padding: 24px; }
.account-dialog .modal-head { margin-bottom: 20px; }
.account-dialog .modal-head h2,.reset-access-dialog .modal-head h2 { font-size: 24px; line-height: 1.2; }
#account-form { display: grid; gap: 16px; }
.account-dialog label { gap: 7px; margin: 0; font-size: 14px; line-height: 1.4; }
.account-dialog input,.account-dialog .custom-select-trigger { height: var(--control-height); min-height: var(--control-height); padding: 10px 12px; font-size: 14px; border-radius:var(--compact-corner); }
.account-dialog .custom-select-trigger { justify-content: space-between; gap: 8px; text-align: left; }
.account-dialog .custom-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog .custom-select-trigger > .icon { flex: 0 0 16px; }
.account-person-card,.account-access-card { padding: 0; border-radius: 0; background: transparent; min-width: 0; }
.account-access-card { padding: 16px; border: 0; border-radius: 18px; background: var(--surface-subtle); }
.account-dialog .employment-fields { grid-template-columns: minmax(0,1fr); gap: 12px; margin: 0; }
.account-dialog .employment-fields .field-hint { margin: 0; align-self: center; }
#account-form .trainee-toggle,#employment-form .trainee-toggle { height:auto; min-height:64px; margin:0; padding:14px; gap:12px; border-radius:18px; background:var(--surface-subtle); }
#account-form .trainee-toggle strong,#employment-form .trainee-toggle strong { font-size:15px; }
#account-form .trainee-toggle small,#employment-form .trainee-toggle small { display:block; }
.account-location { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.account-location .icon { width: 16px; height: 16px; flex: 0 0 16px; }
.account-access-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-access-head h3 { font-size: 16px; line-height: 1.3; font-weight: 500; margin: 0; }
.account-access-head #regenerate-access { background: var(--surface); border: 0; }
.account-access-head #regenerate-access:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover,var(--surface)); }
.account-access-head #regenerate-access .icon { width: 18px; height: 18px; }
.account-access-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.account-access-card > p { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
html[data-theme] .account-dialog :is(input:not([type='hidden']):not([type='checkbox']),.custom-select-trigger) { background: var(--surface); }
.account-dialog .form-error:empty,.reset-access-dialog .form-error:empty { display: none; }
.account-dialog .modal-actions,.reset-access-dialog .modal-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 2px; }
.account-dialog .modal-actions .button,.reset-access-dialog .modal-actions .button { width: 100%; justify-content: center; padding-left: 10px; padding-right: 10px; font-size: 14px; }

/* Password reset remains an explicit confirmation, styled like the other dialogs. */
dialog.reset-access-dialog { width: 460px; padding: 24px; }
.reset-access-content { display: grid; gap: 20px; margin-top: 20px; }
.reset-access-person { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.reset-access-person .avatar { width: 44px; height: 44px; flex: 0 0 44px; }
.reset-access-person > div { display: grid; gap: 4px; min-width: 0; }
.reset-access-person strong { font-size: 17px; line-height: 1.35; font-weight: 550; overflow-wrap: anywhere; }
.reset-access-person > div > span { font-size: 13px; line-height: 1.5; color: var(--muted); }
.reset-access-notice { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface-subtle); }
.reset-access-notice p { margin: 0; font-size: 15px; line-height: 1.5; }
.reset-access-notice > span { font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (max-width:540px) {
 dialog.shift-dialog,dialog.account-dialog,dialog.reset-access-dialog { padding: 18px; max-width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
 .shift-dialog .shift-editor-times { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .shift-dialog .shift-editor-times > label:first-child { grid-column: 1 / -1; }
 .shift-editor-person,.account-person-card { padding: 0; }
 .account-access-card { padding: 14px; }
 .account-dialog .employment-fields { grid-template-columns: minmax(0,1fr); }
 .account-dialog .modal-head h2,.reset-access-dialog .modal-head h2 { font-size: 22px; }
}
@media (max-width:380px) {
 dialog.shift-dialog,dialog.account-dialog,dialog.reset-access-dialog { padding: 16px; }
 .shift-person-meta { padding-left: 0; }
 .account-access-fields { grid-template-columns: minmax(0,1fr); }
}

/* Dialog insets are a quiet step above the modal; controls stay on the modal surface. */
:root { --dialog-inset-surface: var(--surface-subtle); }
html[data-theme='dark'] { --dialog-inset-surface: var(--surface-subtle); }
html[data-theme] dialog :is(.shift-timing-summary,.reset-access-notice) {
 background: var(--dialog-inset-surface);
}
html[data-theme='dark'] dialog :is(.shift-person-field .custom-select-trigger,.account-person-card input,.account-person-card .custom-select-trigger,.account-access-card input) {
 background: var(--surface);
 border-color: var(--control-border);
}
html[data-theme='dark'] dialog :is(.shift-person-field .custom-select-trigger,.account-person-card input,.account-person-card .custom-select-trigger,.account-access-card input):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
html[data-theme='dark'] dialog .custom-select-trigger[aria-expanded='true'] { border-color: var(--muted); }
.shift-dialog .form-error:empty { display: none; }

/* A list uses one interaction fill; the checkmark identifies its selected option. */
[data-theme='dark'] .custom-select-option[aria-selected='true'],
[data-theme='dark'] .custom-select-option:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .custom-select-option[aria-selected='true']:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background: var(--surface-hover);
 color: var(--ink);
}


#account-avatar-preview { display:block; padding:0; }

/* Calendar hover uses the same interaction fill as the team status switch. */
[data-theme='dark'] .date-popover .date-day:not(.chosen):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .date-popover .date-month-arrow:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .date-popover .date-popover-footer button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background: var(--surface-subtle);
 color: var(--ink);
}

[data-theme='dark'] .date-popover .date-month-selects .custom-select-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
[data-theme='dark'] .date-popover .date-month-selects .custom-select-trigger[aria-expanded='true']{

 color: var(--ink);
}

[data-theme='light'] .manager-day:is(.is-empty,.is-past) { background: transparent; }

/* Shared reference red for errors and destructive actions. */
:root {
 --danger: #d43c4c;
 --danger-hover: #bc2e3e;
 --danger-strong: #dd3b4b;
 --danger-strong-hover: #c82e3e;
 --danger-soft: color-mix(in srgb, var(--danger) 7%, var(--surface));
 --danger-soft-hover: color-mix(in srgb, var(--danger) 12%, var(--surface));
}
html[data-theme='dark'] { --danger: #f45b69; --danger-hover: #ff7b87; }
html[data-theme] .employee-card-footer .text-button.danger,
html[data-theme] .account-actions .danger,
html[data-theme] .form-error { color: var(--danger); }
html[data-theme] .employee-card-footer .text-button.danger:hover:where(:not(html[data-hover-disabled] *)),
html[data-theme] .account-actions .danger:hover:where(:not(html[data-hover-disabled] *)) { color: var(--danger-hover); }
html[data-theme] .button.primary.danger { background: var(--danger-strong); border-color: var(--danger-strong); color: #fff; }
html[data-theme] .button.primary.danger:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: var(--danger-strong-hover); border-color: var(--danger-strong-hover); color: #fff; }
:is(.notification-badge,.open-shift-response-badge,.absence-nav-badge) { background: var(--danger-strong); color: #fff; }
.employee-card-footer .text-button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { text-decoration: none; }

/* Experimental period selector: one trigger and one contiguous selected range. */
.period.period-range { display: block; margin: 0; min-width: 0; }
.date-range-field { display: block; min-width: 0; width: 100%; }
.date-range-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; width: 100%; padding: 10px 12px; }
.date-range-value { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.date-range-value > time { white-space: nowrap; }
.date-range-value > span { color:inherit; }
.date-range-trigger > .icon { flex: 0 0 17px; width: 17px; height: 17px; }
.planner-toolbar .period.period-range { width: 310px; max-width: 100%; }
.employee-history .employee-history-period.period-range { width: 310px; max-width: 100%; }
.range-popover { width: 344px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px; }
/* Keep scrolling inside the floating surface: the outer rounded overflow clip
   would cut the shared Squircle paint back into ordinary circular corners. */
.date-popover-scroll { display:contents; }
@media(min-width:651px) {
 .date-popover { overflow:visible; padding:var(--surface-gap); }
 .date-popover-scroll { display:block; max-height:calc(100dvh - 24px - 2 * var(--surface-gap)); overflow:auto; }
}
.range-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.range-summary > div { display: grid; gap: 4px; min-width: 0; }
.range-summary > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.range-summary span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.range-summary strong { font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.range-instruction { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.range-popover .date-popover-head { margin-bottom: 12px; }
.range-popover .date-month-selects { flex: 1; min-width: 0; }
.range-popover .date-month-selects .custom-select { min-width: 0; }
.range-popover .date-month-selects .custom-select:first-child { flex: 1; }
.range-popover .date-month-selects .custom-select:last-child { flex: 0 0 68px; }
.range-popover .date-month-selects .custom-select-trigger { gap: 3px; padding-left: 4px; padding-right: 4px; }
.range-popover .date-month-selects .custom-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.range-popover .date-month-selects .custom-select-trigger .icon { width: 12px; height: 12px; flex: 0 0 12px; }
.range-popover .date-days { column-gap: 0; row-gap: 4px; }
html[data-theme] .range-popover .date-day.in-range { border-radius: 0; background:color-mix(in srgb,var(--control-accent) 12%,var(--surface)); color:var(--ink); }
html[data-theme] .range-popover .date-day.in-range:not(.chosen):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background:color-mix(in srgb,var(--control-accent) 18%,var(--surface)); color:var(--ink); }
.range-popover .date-day.in-range:nth-child(7n+1) { border-radius: 10px 0 0 10px; }
.range-popover .date-day.in-range:nth-child(7n) { border-radius: 0 10px 10px 0; }
html[data-theme] .date-popover .date-day.current-day:not(.chosen) { position:relative; color:var(--control-accent); font-weight:600; box-shadow:none; }
html[data-theme] .date-popover .date-day.current-day:not(.chosen)::after { content:''; position:absolute; inset:0; border:1px solid var(--control-accent); border-radius:var(--calendar-day-corner); corner-shape:round; background:transparent; pointer-events:none; }
html[data-theme] .range-popover .date-day:is(.range-start,.range-end) { position:relative; isolation:isolate; border-radius:0; corner-shape:round; background:transparent; color:var(--control-accent-ink); font-weight:600; box-shadow:none; }
html[data-theme] .range-popover .date-day:is(.range-start,.range-end)::before { content:''; position:absolute; inset:0; z-index:-1; background:color-mix(in srgb,var(--control-accent) 12%,var(--surface)); }
html[data-theme] .range-popover .date-day.range-start::before { left:50%; }
html[data-theme] .range-popover .date-day.range-end::before { right:50%; }
html[data-theme] .range-popover .date-day.range-start.range-end::before { display:none; }
html[data-theme] .range-popover .date-day:is(.range-start,.range-end)::after { content:''; position:absolute; inset:0; z-index:-1; border-radius:var(--calendar-day-corner); corner-shape:round; background:var(--control-accent); }
.range-popover .range-footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding-top: 12px; margin-top: 14px; border-color: var(--line); }
html[data-theme] .range-popover .range-footer .button { justify-content: center; height: 48px; min-height: 48px; font-size: 14px; padding: 0 10px; }
html[data-theme] .range-popover .range-footer .primary { background: var(--ink); color: var(--surface); }
html[data-theme] .range-popover .range-footer .primary:disabled { opacity: .4; cursor: default; }
@media (max-width:650px) {
 .employee-history .employee-history-period.period-range,.planner-toolbar .period.period-range { width: 100%; }
 .date-range-value { font-size: 13px; gap: 7px; }
 .range-popover .date-month-selects .custom-select-trigger { font-size: 13px; }
}


/* Personal manager shifts use the same calendar grid and surfaces as the team. */
.manager-calendar.calendar-panel { padding: 0; }
.manager-calendar > .manager-section-heading { margin: 0; padding: 22px; border-bottom: 1px solid var(--line); }
@media (max-width:650px) {
 .manager-calendar > .manager-section-heading { padding: 18px 16px; }
}

/* Mobile experiment: choose a day, then read a complete vertical team list. */
.mobile-schedule { display: none; }
@media (max-width:650px) {
 .planner > .planner-scroll { display: none; }
 .mobile-schedule { display: block; }
 .mobile-week-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; padding: 12px; border-bottom: 1px solid var(--line); }
 .mobile-week-days > button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 0; border: 0; border-radius: 15px; background: transparent; color: var(--muted); }
 .mobile-week-days > button > span { font-size: 12px; text-transform: capitalize; }
 .mobile-week-days > button > strong { font-size: 18px; line-height: 1.3; font-weight: 550; }
 .mobile-week-days > button > i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
 .mobile-week-days > button > i.has-shifts { background: var(--action); }
 html[data-theme] .mobile-week-days > button:is(:hover:where(:not(html[data-hover-disabled] *)),[aria-pressed='true']) { background: var(--surface-subtle); color: var(--ink); }
 html[data-theme] .mobile-week-days > button[aria-pressed='true'] { box-shadow: none; }
 .mobile-day-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 16px 8px; }
 .mobile-day-summary strong { font-size: 16px; font-weight: 550; }
 .mobile-day-summary > span { font-size: 13px; color: var(--muted); white-space: nowrap; }
 .mobile-shift-list { padding: 0 16px 6px; }
 .mobile-shift-person { padding: 16px 0; }
 .mobile-shift-person + .mobile-shift-person { border-top: 1px solid var(--line); }
 .mobile-shift-person .planner-person > .avatar { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; }
 .mobile-shift-person .planner-person-info strong { font-size: 16px; line-height: 1.4; }
 .mobile-shift-person .planner-person-info .staff-position { font-size: 13px; }
 .mobile-shift-person .planner-person-hours { font-size: 12px; margin-top: 4px; }
 .mobile-shift-slots { display: grid; gap: 8px; margin-top: 12px; }
 html[data-theme] .mobile-shift-slots > .planner-shift { width: 100%; min-height: 76px; margin: 0; padding: 14px 16px; border: 1px solid var(--schedule-shift-edge); background: var(--surface-subtle); border-radius: 18px; }
 html[data-theme] .mobile-shift-slots > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { border-color: var(--muted); }
 .mobile-shift-slots .planner-shift-time { font-size: 18px; }
 .mobile-shift-slots .planner-shift-meta { font-size: 13px; }
 .mobile-assign-shift { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; height: 48px; border: 1px dashed var(--schedule-shift-edge); border-radius: 16px; background: transparent; color: var(--muted); font-size: 14px; }
 .mobile-assign-shift .icon { width: 17px; height: 17px; }
 html[data-theme] .mobile-assign-shift:hover:where(:not(html[data-hover-disabled] *)) { border-color: var(--muted); background: var(--surface-subtle); color: var(--ink); }
 .mobile-no-shift { display: block; color: var(--muted); font-size: 13px; padding: 4px 0; }
}
@media (max-width:350px) {
 .team-heading-actions { flex-wrap: wrap; }
 .team-scroll-controls { margin-left: auto; }
}
@media (max-width:650px) {
 /* Today remains identifiable when another day is selected. */
 html[data-theme] .mobile-week-days > button:has([aria-current='date']) { box-shadow: inset 0 0 0 1px var(--muted); }
 .mobile-week-days > button:has([aria-current='date']) > i { background: var(--action); }
}

/* Team totals belong to the employee list and share its card surface. */
.team-overview { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; margin: 0 0 24px; border-radius: 24px; background: var(--surface); }
.team-overview-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0; flex: 1; max-width: 600px; min-width: 0; }
.team-overview-metrics > div { padding: 0 24px; min-width: 0; }
.team-overview-metrics > div:first-child { padding-left: 0; }
.team-overview-metrics > div + div { border-left: 1px solid var(--line); }
.team-overview-metrics dt { font-size: 13px; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.team-overview-metrics dd { margin: 6px 0 0; font-size: 26px; line-height: 1.2; font-weight: 550; color: var(--ink); font-variant-numeric: tabular-nums; }
.team-overview-metrics dd small { font-size: 14px; color: var(--muted); font-weight: 400; }
.team-overview-period { display: grid; gap: 8px; flex: 0 0 auto; }
.team-overview-period > span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.team-overview-period .period { margin: 0; }
.team-overview-period .date-trigger { background: var(--surface-subtle); }
@media (max-width:1000px) {
 .team-overview { gap: 20px; padding: 20px; }
 .team-overview-metrics > div { padding: 0 16px; }
}
@media (max-width:1000px) {
 .team-overview { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; border-radius: 22px; }
 .team-overview-metrics { grid-template-columns: minmax(0,.9fr) minmax(0,1.2fr) minmax(0,.8fr); max-width: none; flex: auto; }
 .team-overview-metrics > div { padding: 0 8px; }
 .team-overview-metrics dt { font-size: 12px; }
 .team-overview-metrics dd { font-size: 23px; }
 .team-overview-period { border-top: 1px solid var(--line); padding-top: 16px; }
 .team-overview-period .date-trigger { width: 100%; }
}

/* Constrain native date/time controls to their grid track, including iOS Safari. */
form label { min-width: 0; }
input:is([type='time'],[type='date'],[type='datetime-local'],[type='month'],[type='week']) {
 -webkit-appearance: none;
 appearance: none;
 box-sizing: border-box;
 width: 100%; min-width: 0; max-width: 100%;
 inline-size: 100%; min-inline-size: 0; max-inline-size: 100%;
 height: var(--control-height); min-height: var(--control-height); max-height: var(--control-height);
 text-align: left;
}
input:is([type='time'],[type='date'],[type='datetime-local'],[type='month'],[type='week'])::-webkit-date-and-time-value {
 min-height: 0; margin: 0; text-align: left;
}
input:is([type='time'],[type='date'],[type='datetime-local'],[type='month'],[type='week'])::-webkit-datetime-edit {
 min-width: 0; padding: 0;
}
.shift-editor-times > label { min-width: 0; }
@media (max-width:650px) {
 /* A readable input size also prevents Safari from zooming the page on focus. */
 html[data-theme] input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
 html[data-theme] select,
 html[data-theme] textarea { font-size: 16px; }
}

/* Hours distribution: restrained paired columns, shared palette, no interactions. */
.statistics-chart { --chart-plan: color-mix(in srgb,var(--muted) 30%,var(--surface)); --chart-actual: var(--control-accent); }
.statistics-chart .chart-key-plan { background: var(--chart-plan); }
.statistics-chart .chart-key-actual { background: var(--chart-actual); }
.hours-chart.hours-distribution-chart { padding: 20px 26px 22px; overflow: visible; }
.chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-top: 8px; }
.chart-plot { position: relative; padding: 0 0 0 34px; }
.chart-plot-dense { min-width: 480px; }
.chart-scale { position: absolute; inset: 0 auto 52px 0; display: flex; flex-direction: column; justify-content: space-between; width: 28px; color: var(--muted); font-size: 12px; line-height: 1; text-align: left; pointer-events: none; }
.chart-scale > span:first-child { transform: translateY(-50%); }
.chart-scale > span:last-child { transform: translateY(50%); }
.chart-grid { position: absolute; inset: 0 0 52px 34px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid > i { width: 100%; border-top: 1px dashed var(--line); }
.chart-columns { display: grid; gap: 8px; position: relative; }
.chart-column { display: flex; flex-direction: column; min-width: 0; color: var(--muted); }
.chart-bars { display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 190px; width: 100%; padding: 0 8px; }
.chart-bars > i { display: block; flex: 0 1 24px; max-width: 24px; min-width: 4px; height: 0; border-radius: 9px 9px 3px 3px; }
.chart-plan-fill { background: var(--chart-plan); }
.chart-actual-fill { background: var(--chart-actual); }
.chart-column-date { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; width: 100%; height: 52px; }
.chart-column-date strong { font-size: 14px; line-height: 1.25; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.chart-column-date small { font-size: 12px; line-height: 1.2; text-transform: capitalize; }
.hours-chart.hours-distribution-chart figcaption { margin: 12px 0 0 34px; font-size: 12px; color: var(--muted); }
@media (max-width:760px) {
 .hours-chart.hours-distribution-chart { padding: 12px 16px 20px; }
 .chart-columns { gap: 3px; }
 .chart-bars { height: 160px; padding: 0 4px; gap: 3px; }
 .chart-bars > i { flex-basis: 13px; border-radius: 5px 5px 2px 2px; }
 .chart-column-date strong { font-size: 13px; }
 .chart-column-date small { font-size: 11px; }
 .chart-plot { padding-left: 28px; }
 .chart-grid { left: 28px; }
 .chart-scale { font-size: 11px; width: 24px; }
 .hours-chart.hours-distribution-chart figcaption { margin-left: 28px; }
 .statistics-chart .panel-head { align-items: flex-start; flex-direction: column; gap: 12px; }
 .statistics-chart .chart-legend { gap: 18px; }
}

/* Director locations: compact manager identities and one quiet action menu. */
.location-cards { gap: 20px; align-items: stretch; }
html[data-theme] .location-card-refined { background: var(--surface); border: 0; border-radius: 28px; padding: 24px; box-shadow: 0 4px 20px #00000003; }
.location-card-refined .location-card-title { gap: 12px; align-items: center; }
.location-card-refined .location-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-subtle); color: var(--muted); }
.location-card-refined .location-card-title > div { min-width: 0; flex: 1; }
.location-card-refined h2 { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.location-card-refined .location-card-title p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.location-capacity { display: inline-flex; align-items: baseline; gap: 5px; flex: 0 0 auto; color: var(--ink); font-size: 18px; font-weight: 550; background: var(--surface-subtle); padding: 7px 11px; border-radius: 14px; }
.location-capacity small { color: var(--muted); font-size: 12px; font-weight: 400; }
.location-card-refined .location-admin-title { margin: 24px 0 10px; font-size: 12px; color: var(--muted); }
.location-card-refined .location-admins { display: grid; gap: 8px; }
.location-manager-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface-subtle); min-width: 0; }
.location-manager-row > .avatar { width: 40px; height: 40px; flex: 0 0 40px; align-self: flex-start; }
.location-manager-identity { min-width: 0; flex: 1; }
.location-manager-identity strong { display: block; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.location-manager-identity small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.location-manager-menu { flex: 0 0 auto; }
.location-manager-menu > summary { width: 36px; height: 36px; min-width: 36px; min-height: 36px; background: var(--surface); }
.location-manager-menu > .profile-dropdown { width: 250px; right: 0; top: calc(100% + 6px); }
.location-manager-menu .account-actions { display: grid; gap: 3px; }
.location-manager-menu .account-actions .text-button { display: flex; width: 100%; min-height: 44px; justify-content: flex-start; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 13px; text-decoration: none; }
.location-manager-menu .account-actions .text-button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-hover); }
.location-card-refined .admin-empty-slot { margin: 0; min-height: 64px; border-color: var(--line); color: var(--muted); border-radius: 18px; }
.location-card-refined .admin-empty-slot:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle); border-color: var(--muted); color: var(--ink); }
.location-add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 270px; padding: 24px; border: 1px dashed var(--line); border-radius: 28px; background: transparent; color: var(--muted); }
.location-add-card > span { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--ink); margin-bottom: 4px; }
.location-add-card strong { font-size: 18px; font-weight: 500; color: var(--ink); }
.location-add-card small { font-size: 13px; }
.location-add-card:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); border-color: var(--muted); }
#location-form { display: grid; gap: 16px; }
#location-form > label { margin: 0; }
#location-form input { width: 100%; }
#location-form .modal-actions { margin-top: 4px; }
dialog:has(#location-form) { width: 480px; }
/* Statistics location summaries stay in place while the teams expand beneath. */
.location-statistics { padding-bottom: 8px; }
.location-stat-list { padding: 0 20px 12px; }
.location-stat-item { border-top: 1px solid var(--line); }
.location-stat-item:first-child { border-top: 0; }
.location-stat-summary { display: grid; grid-template-columns: minmax(140px,1fr) minmax(300px,.85fr) 32px; align-items: center; gap: 20px; width: 100%; padding: 20px 12px; border: 0; border-radius: 18px; color: var(--ink); background: transparent; text-align: left; }
.location-stat-summary:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle); }
.location-stat-name { display: flex; align-items: center; min-width: 0; gap: 12px; }
.location-stat-name > strong { font-size: 17px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.location-stat-name .location-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-subtle); color: var(--muted); }
.location-stat-totals { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,.9fr) minmax(0,1.3fr); gap: 16px; }
.location-stat-totals > span { display: grid; gap: 5px; text-align: right; }
.location-stat-totals small { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.4; white-space: nowrap; }
.location-stat-totals b { font-size: 21px; font-weight: 550; line-height: 1.3; font-variant-numeric: tabular-nums; }
.location-stat-chevron { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--surface-subtle); border-radius: 50%; color: var(--muted); }
.location-stat-chevron .icon { width: 17px; height: 17px; }
.location-stat-item.is-open .location-stat-chevron { transform: rotate(90deg); color: var(--ink); }
.location-stat-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; }
.location-stat-item.is-open .location-stat-reveal { grid-template-rows: 1fr; opacity: 1; }
.location-stat-inner { min-height: 0; overflow: hidden; }
.location-stat-body { padding: 0 12px 22px; }
.location-stat-team { margin-top: 12px; }
.location-stat-team h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; margin: 0 0 14px; color: var(--ink); }
.location-stat-team h3 > span { color: var(--muted); font-size: 13px; font-weight: 400; }
.location-stat-team + .location-stat-team { margin-top: 24px; }
.location-stat-team .statistics-table-scroll { padding: 0; }
.location-stat-empty { color: var(--muted); font-size: 14px; padding: 8px 0 16px; }
.location-stat-collapse { width: 100%; margin-top: 16px; background: var(--surface-subtle); border: 0; color: var(--muted); }
@media (prefers-reduced-motion:no-preference) {
 .location-stat-reveal { transition: grid-template-rows 260ms ease,opacity 200ms ease; }
 .location-stat-chevron { transition: transform 220ms ease; }
 .location-add-card { transition: background-color 160ms ease,border-color 160ms ease; }
}
/* Director schedule always shows one location, with managers kept separate. */
.director-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.director-calendar-heading h1 { font-size: 28px; font-weight: 550; line-height: 1.3; letter-spacing: -.6px; }
.director-calendar-heading p { font-size: 14px; color: var(--muted); margin-top:var(--page-caption-space); }
.director-calendar-heading > label { width: 240px; min-width: 0; font-size: 12px; color: var(--muted); gap: 6px; }
.director-schedule-title { margin: 24px 0 14px; font-size: 20px; line-height: 1.3; font-weight: 550; }
@media (max-width:1100px) {
 .location-cards { grid-template-columns: minmax(0,1fr); }
 .location-stat-summary { grid-template-columns: minmax(120px,1fr) minmax(270px,1fr) 32px; gap: 12px; }
}
@media (max-width:650px) {
 html[data-theme] .location-card-refined { padding: 20px; border-radius: 24px; }
 .location-card-refined h2 { font-size: 20px; }
 .location-manager-row { padding: 10px; gap: 10px; }
 .location-manager-identity strong { font-size: 15px; }
 .location-manager-menu > .profile-dropdown { right: -8px; width: min(250px,calc(100vw - 64px)); }
 .location-add-card { min-height: 210px; border-radius: 24px; }
 .location-statistics .panel-head { align-items: flex-start; flex-direction: column; gap: 6px; }
 .location-stat-list { padding: 0 12px 8px; }
 .location-stat-summary { grid-template-columns: minmax(0,1fr) 32px; gap: 16px 12px; padding: 18px 8px; }
 .location-stat-name > strong { font-size: 17px; }
 .location-stat-totals { grid-column: 1 / -1; grid-row: 2; gap: 0; background: var(--surface-subtle); border-radius: 14px; padding: 12px; grid-template-columns: minmax(0,.8fr) minmax(0,.9fr) minmax(0,1.3fr); }
 .location-stat-totals > span { text-align: left; padding-left: 12px; }
 .location-stat-totals > span:first-child { padding-left: 0; }
 .location-stat-totals > span + span { border-left: 1px solid var(--line); }
 .location-stat-totals small { font-size: 11px; }
 .location-stat-totals b { font-size: 20px; }
 .location-stat-chevron { grid-column: 2; grid-row: 1; }
 .location-stat-body { padding: 0 4px 20px; }
 .location-stat-team .statistics-person-row { padding: 14px 0; }
 .director-calendar-heading { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 22px; }
 .director-calendar-heading > label { width: 100%; }
 .director-calendar-heading h1 { font-size: 24px; }
 .director-schedule-title { font-size: 18px; }
}
/* Keep the first tab reachable when tablet navigation overflows horizontally. */
.topbar-panel .header-nav { justify-content: flex-start; }
.location-card-refined .location-mark,.location-stat-name .location-mark { corner-shape: round; }

/* Consistent action lists, with no native details layer left after closing. */
html[data-theme='light'] { --surface-hover: var(--surface-subtle-hover); }
.directory-menu > .directory-menu-trigger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-width: 40px; padding: 0; border: 0; border-radius: 50%; corner-shape: round; background: var(--surface-subtle); color: var(--muted); font-size: 23px; line-height: 1; }
.location-manager-menu > .directory-menu-trigger { width: 36px; height: 36px; min-width: 36px; background: var(--surface); }
.directory-menu > .profile-dropdown { width: 260px; max-width: calc(100vw - 40px); padding: 8px; transform: none; filter: none; transition: none; animation: none; }
.directory-menu .account-actions { display: grid; width: 100%; gap: 4px; }
html[data-theme] .directory-menu .account-actions > .text-button { display: flex; align-items: center; justify-content: flex-start; text-align: left; white-space: nowrap; width: 100%; min-height: 48px; height: auto; padding: 12px 14px; border: 0; font-size: 14px; line-height: 1.4; background: transparent; text-decoration: none; }

.directory-menu:not([open]) > .profile-dropdown,
.directory-menu > .profile-dropdown[hidden] { display: none !important; visibility: hidden !important; box-shadow: none !important; opacity: 0; transform: none; filter: none; animation: none !important; }
.directory-menu[open] > .profile-dropdown { opacity: 1; visibility: visible; }
/* Empty location cards behave like the calendar's dashed add controls. */
html[data-theme] .location-add-card:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: transparent; border-color: var(--muted); box-shadow: none; color: var(--ink); }
/* Keep statistics summaries quiet; the arrow explains expansion. */
html[data-theme] .location-stat-summary:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background: transparent; }
.location-stat-summary:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) .location-stat-chevron { color: var(--ink); box-shadow: none; }
.location-stat-chevron .icon { width: 20px; height: 20px; }
/* A pill-shaped location picker sits beside the schedule content. */
.director-calendar-heading { margin-bottom: 18px; }
.calendar-location-picker { display: flex; margin-bottom: 28px; min-width: 0; }
html[data-theme] .calendar-location-picker .calendar-location-button { display:inline-flex; align-items:center; gap:var(--compact-gap); min-width:0; max-width:100%; height:var(--control-height); padding:0 var(--surface-inset); border:0; background:var(--surface); color:var(--ink); text-align:left; }
.calendar-location-button > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-location-button > .icon { width:18px; height:18px; flex:0 0 18px; color:var(--muted); }
html[data-theme] .directory-page:is(.calendar-location-dialog,.organization-managers-dialog) :is(#calendar-location-query,#organization-managers-query) { background:var(--surface-subtle); border-color:transparent; border-radius:var(--compact-corner); corner-shape:var(--surface-curve); }
html[data-theme] .directory-page:is(.calendar-location-dialog,.organization-managers-dialog) :is(#calendar-location-query,#organization-managers-query):hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); border-color:var(--muted); }
html[data-theme] .directory-page:is(.calendar-location-dialog,.organization-managers-dialog) :is(#calendar-location-query,#organization-managers-query):focus { background:var(--surface-subtle); border-color:var(--action); }
.calendar-location-dialog .calendar-location-choices { display:grid; gap:var(--compact-gap); }
.calendar-location-dialog .custom-select-option[aria-pressed='true'] { background:var(--surface-subtle); color:var(--ink); }
.calendar-location-dialog .custom-select-option > span { min-width:0; overflow-wrap:anywhere; }
.calendar-location-dialog .custom-select-option > .icon { width:18px; height:18px; flex:0 0 18px; color:var(--status-positive); }

html[data-theme] .header-nav-button { background: var(--surface); border-color: transparent; color: var(--muted); }
html[data-theme] .header-nav-button:not(.active):hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle); border-color: transparent; color: var(--ink); }
html[data-theme] .header-nav-button.active,
html[data-theme] .header-nav-button.active:hover:where(:not(html[data-hover-disabled] *)) { background: var(--control-accent); border-color: transparent; color: var(--control-accent-ink); }
@media (max-width:650px) { .calendar-location-picker { margin-bottom: 22px; } }

/* Director's people page uses one responsive filter panel and a stable list. */
.directory-page > .locations-heading { align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.directory-page .locations-heading h1 { font-size: 28px; line-height: 1.25; }
.directory-page .locations-heading p { font-size: 14px; line-height: 1.5; margin-top:var(--page-caption-space); }
.directory-page .directory-total { flex: 0 0 auto; padding: 8px 12px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.directory-controls { padding: 18px; margin-bottom: 20px; border-radius: 24px; background: var(--surface); }
.directory-role-filter { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 4px; border-radius: 28px; background: var(--surface-subtle); width: min(100%,440px); margin-bottom: 18px; }
.directory-role-filter > button { display: flex; align-items: center; justify-content: center; min-height: 48px; min-width: 0; border: 0; border-radius: 24px; padding: 8px 12px; color: var(--muted); background: transparent; font-size: 14px; line-height: 1.3; white-space: nowrap; }
.directory-role-filter > button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle-hover); color: var(--ink); }
html[data-theme] .directory-role-filter > button[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
.directory-page .directory-filters { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(2,minmax(0,1fr)); align-items: end; gap: 14px; margin: 0; }
.directory-page .directory-field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; }
.directory-field > span:first-child { color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 400; }
.directory-page #directory-search { display: block; margin: 0; width: 100%; min-width: 0; }
.directory-search-input { display: block; position: relative; min-width: 0; }
html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']),
html[data-theme] .directory-page .directory-field .custom-select-trigger { width: 100%; height: 48px; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid var(--control-border); border-radius:var(--compact-corner,22px); background: var(--surface-subtle); color: var(--ink); font-size: 16px; font-weight: 400; line-height: 1.4; box-shadow: none; }
html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']) { padding-left: 44px; -webkit-appearance: none; appearance: none; }
.directory-page .directory-field .custom-select-trigger { justify-content: space-between; gap: 8px; text-align: left; }
.directory-page .directory-field .custom-select-trigger > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.directory-page .directory-field .custom-select-trigger .icon { width: 14px; height: 14px; flex: 0 0 14px; }
html[data-theme] .directory-page .directory-field .custom-select-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),[aria-expanded='true']){ border-color: var(--muted);  }

html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']):is(:hover:where(:not(html[data-hover-disabled] *)),:focus) { border-color: var(--muted); background: var(--surface-subtle); }
.directory-search-submit { position: absolute; display: flex; align-items: center; justify-content: center; top: 4px; left: 4px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.directory-search-submit .icon { width: 18px; height: 18px; }
.directory-search-submit:hover:where(:not(html[data-hover-disabled] *)) { color: var(--ink); background: var(--surface-subtle-hover); }
.directory-page .directory-list { border: 0; background: var(--surface); border-radius: 24px; }
.directory-page .directory-table { table-layout: fixed; }
.directory-page .directory-table th { padding: 16px 18px; color: var(--muted); background: transparent; font-size: 12px; }
.directory-page .directory-table th:first-child { width: 40%; }
.directory-page .directory-table th:nth-child(2) { width: 28%; }
.directory-page .directory-table th:nth-child(3) { width: auto; }
.directory-page .directory-table th:last-child { width: 76px; }
.directory-page .directory-table td { vertical-align: middle; padding: 18px; border-color: var(--line); color: var(--muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.directory-page .directory-table .person { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; min-width: 0; }
.directory-page .directory-table .person > .avatar { width: 40px; height: 40px; flex: 0 0 40px; }
.directory-page .directory-table .person > div { flex: 1; min-width: 0; }
.directory-page .directory-table .person strong { display: block; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.directory-page .directory-table .person small { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; overflow-wrap: anywhere; }
.directory-page .directory-state { font-size: 12px; color: var(--muted); line-height: 1.4; }
.directory-page .directory-menu > .directory-menu-trigger { width: 40px; height: 40px; min-width: 40px; }
@media (max-width:1100px) {
 .directory-page .directory-table,.directory-page .directory-table tbody { display: block; width: 100%; }
 .directory-page .directory-table thead { display: none; }
 .directory-page .directory-table tr { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) 40px; gap: 5px 16px; padding: 20px; border-bottom: 1px solid var(--line); }
 .directory-page .directory-table tr:last-child { border-bottom: 0; }
 .directory-page .directory-table td { display: block; border: 0; padding: 0; width: auto; min-width: 0; }
 .directory-page .directory-table td:first-child { grid-column: 1; grid-row: 1 / 3; }
 .directory-page .directory-table td:nth-child(2) { grid-column: 2; grid-row: 1; padding: 0; }
 .directory-page .directory-table td:nth-child(3) { grid-column: 2; grid-row: 2; padding: 0; font-size: 13px; }
 .directory-page .directory-table td:last-child { grid-column: 3; grid-row: 1 / 3; justify-self: end; }
}
@media (max-width:1000px) {
 .directory-page .directory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; }
 .directory-page #directory-search { grid-column: 1 / -1; }
}
@media (max-width:650px) {
 .directory-page > .locations-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
 .directory-page .locations-heading h1 { font-size: 24px; }
 .directory-page .directory-total { font-size: 11px; padding: 7px 10px; }
 .directory-page .locations-heading p { font-size: 13px; }
 .directory-controls { padding: 16px; border-radius: 22px; }
 .directory-role-filter { width: 100%; gap: 3px; margin-bottom: 16px; }
 .directory-role-filter > button { padding: 8px 6px; font-size: 13px; }
 html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']) { font-size: 16px; }
 html[data-theme] .directory-page .directory-field .custom-select-trigger { padding-inline: 8px; gap: 6px; }
 .directory-page .directory-table tr { grid-template-columns: minmax(0,1fr) 40px; gap: 5px 12px; padding: 18px 16px; }
 .directory-page .directory-table td:first-child { grid-column: 1; grid-row: 1; }
 .directory-page .directory-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 13px; }
 .directory-page .directory-table td:nth-child(3) { grid-column: 1; grid-row: 3; }
 .directory-page .directory-table td:last-child { grid-column: 2; grid-row: 1 / 4; }
}
/* Location totals are an unboxed summary; employee totals remain on soft cards. */
.location-stat-total-caption { display: none !important; }
@media (max-width:650px) {
 .location-stat-totals { background: transparent; border-radius: 0; padding: 0 0 4px; row-gap: 10px; }
 .location-stat-totals > .location-stat-total-caption { display: block !important; grid-column: 1 / -1; padding-left: 0; border-left: 0; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--muted); text-align: left; }
 .location-stat-totals > span:nth-child(2) { padding-left: 0; border-left: 0; }
 .location-stat-totals b { font-size: 23px; }
 .location-stat-item.is-open .location-stat-totals { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
 .location-stat-team h3 { font-size: 15px; margin-bottom: 12px; padding-left: 10px; border-left: 2px solid var(--line); }
}
/* The disclosure arrow is the leading affordance, without an icon backing. */
.location-stat-summary { grid-template-columns: minmax(140px,1fr) minmax(300px,.85fr); }
.location-stat-name { gap: 10px; }
.location-stat-chevron { width: 24px; height: 32px; flex: 0 0 24px; background: transparent; border-radius: 0; grid-column: auto; grid-row: auto; }
.location-stat-summary:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) .location-stat-chevron { background: transparent; box-shadow: none; }
@media (max-width:1100px) { .location-stat-summary { grid-template-columns: minmax(120px,1fr) minmax(270px,1fr); } }
@media (max-width:650px) {
 .location-stat-summary { grid-template-columns: minmax(0,1fr); }
 .location-stat-name { grid-column: 1; grid-row: 1; }
}

/* Typing uses a single field border; keyboard buttons retain their focus ring. */
html[data-theme][data-input-mode] :is(input:not([type='checkbox']):not([type='radio']),textarea,select):focus-visible {
 outline: 0 !important;
 outline-offset: 0 !important;
 box-shadow: none;
 border-color: var(--muted);
}

/* A compact filter toolbar, without a second card wrapped around the controls. */
.directory-page > .locations-heading { display: block; }
.directory-page .locations-heading h1 { display: flex; align-items: center; gap: 10px; }
.directory-page .directory-total { display: inline-flex; justify-content: center; min-width: 32px; padding: 6px 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; }
.directory-controls { display: grid; grid-template-columns: minmax(0,1fr); align-items: center; gap: var(--surface-gap); padding: 0; margin-bottom: var(--surface-gap); border-radius: 0; background: transparent; }
.directory-list .directory-role-filter { width:fit-content; }
.directory-role-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; width: auto; margin: 0; padding: 0; background: transparent; }
.directory-role-filter > button { padding: 10px 16px; border-radius: 28px; background: var(--surface); }
.directory-role-filter > button:hover:where(:not(html[data-hover-disabled] *)) { background: var(--surface-subtle); }
.directory-page .directory-filters { grid-template-columns: minmax(160px,1fr) minmax(160px,220px); gap: 10px; }
.directory-page .directory-field { gap: 0; }
html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']),
html[data-theme] .directory-page .directory-field .custom-select-trigger { border-color: transparent; border-radius:var(--compact-corner); corner-shape:var(--surface-curve); background: var(--surface); }
html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']):is(:focus){ background: var(--surface); border-color: var(--control-border); }

html[data-theme] .directory-page .directory-field .custom-select-trigger:is([aria-expanded='true']) {  border-color: var(--control-border); }

html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']):is(:hover:where(:not(html[data-hover-disabled] *))){ background: var(--surface-subtle-hover); border-color: var(--control-border); }

html[data-theme] .directory-page .directory-field .custom-select-trigger:is(:hover:where(:not(html[data-hover-disabled] *))) {  border-color: var(--control-border); }
.directory-search-icon { position: absolute; display: flex; align-items: center; justify-content: center; top: 4px; left: 4px; width: 40px; height: 40px; color: var(--muted); pointer-events: none; }
.directory-search-icon .icon { width: 18px; height: 18px; }
html[data-theme] #create-menu > .create-dropdown { --surface:var(--app-dialog-bg); width:280px; max-width:calc(100vw - 24px); background:var(--app-dialog-bg); color:var(--ink); }
html[data-theme] .create-dropdown > button { display: flex; justify-content: flex-start; width: 100%; min-height: 48px; padding: 12px; white-space: nowrap; font-size: 14px; line-height: 1.4; color:var(--ink); }
.create-dropdown > button > .icon { flex:0 0 20px; color:var(--muted); }
.create-dropdown .create-plan-hint{margin-left:auto;flex-shrink:0}
.manager-location-hint { color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 400; }
@media (max-width:1200px) {
 .directory-controls { grid-template-columns: minmax(0,1fr); gap: 14px; }
}
@media (max-width:1000px) {
 .directory-page .directory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}
@media (max-width:650px) {
 .directory-role-filter > button { padding: 10px 12px; font-size: 13px; }
 .directory-controls { margin-bottom: 18px; }
}

/* Pills belong to the top navigation; working controls use soft rectangles. */
.directory-role-filter > button { border-radius: 14px; corner-shape: round; }
html[data-theme] .directory-page :is(#directory-query,#workload-query,#team-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']),
html[data-theme] .directory-page .directory-field .custom-select-trigger { border-radius:var(--compact-corner); corner-shape:var(--surface-curve); }
.directory-page .directory-total { border-radius:10px; }
@media (max-width:650px) {
 .mobile-week-days > button > i { background: color-mix(in srgb,var(--muted) 28%,var(--surface)); }
 .mobile-week-days > button > i.has-shifts { background: var(--action); }
 .mobile-week-days > button:has([aria-current='date']) > i { background: var(--action); }
}
.locations-page .locations-heading h1 { display: flex; align-items: center; gap: 10px; }
.heading-count { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; padding: 6px 10px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
#location-form .field-hint { margin: 0; }
#location-form .form-error:empty { display: none; }
#location-form .modal-actions { margin-top: 0; }

/* Preview-only safe areas scroll away, so live content passes under system chrome. */
html[data-preview-device] body { padding: var(--preview-safe-top,0px) var(--preview-safe-right,0px) var(--preview-safe-bottom,0px) var(--preview-safe-left,0px); }
html[data-preview-device] .shell,
html[data-preview-device] .entry-page,
html[data-preview-device] .loading { min-height: calc(100dvh - var(--preview-safe-top,0px) - var(--preview-safe-bottom,0px)); }
html[data-preview-device] .icon-rail { left: var(--preview-safe-left,0px); top: var(--preview-safe-top,0px); bottom: var(--preview-safe-bottom,0px); height: calc(100dvh - var(--preview-safe-top,0px) - var(--preview-safe-bottom,0px)); }
html[data-preview-device] dialog { max-height: calc(100dvh - var(--preview-safe-top,0px) - var(--preview-safe-bottom,0px) - 24px); max-width: calc(100vw - var(--preview-safe-left,0px) - var(--preview-safe-right,0px) - 24px); }

/* One vertical rhythm prevents page padding and section margins from stacking. */
:root { --page-top-space:24px; --section-space:20px; --heading-space:16px; --page-caption-space:8px; --settings-caption-space:6px; }
.workspace { padding-top:var(--page-top-space); }
.workspace > .team-section { margin-top:0; margin-bottom:var(--section-space); }
.workspace-location { margin-bottom:var(--section-space); }
.team-section > .section-heading { margin-bottom:var(--heading-space); }
.locations-heading,.statistics-heading,.directory-page > .locations-heading,.director-calendar-heading { margin-bottom:var(--section-space); }
.employee-page { gap:var(--section-space); }
.director-schedule-title { margin-top:var(--section-space); margin-bottom:12px; }
.calendar-location-picker { margin-bottom:16px; }
.form-error:empty { display:none; }
form > .form-error:empty + .modal-actions { margin-top:0; }
@media (max-width:650px) {
 :root { --page-top-space:16px; --section-space:16px; --heading-space:var(--surface-gap); --page-caption-space:6px; }
 .topbar .topbar-panel { padding-bottom:8px; }
}

/* Names are primary information everywhere; supporting details use the muted token. */
:root { --person-name-weight:550; }
html[data-theme] :is(.planner-person-info > strong,.mini-person-name > strong,.mini-person-name > .mini-surname,.employee-card-head h3,.statistics-person-name > strong,.directory-table .person strong,.location-manager-identity > strong,.profile-card-person h3,.profile-dropdown-heading > strong,.reset-access-person strong,.access-view-person strong,.shift-fixed-person strong) { color:var(--ink); font-weight:var(--person-name-weight); }
html[data-theme] :is(.planner-person-info > small,.planner-person-info .staff-position,.planner-person-hours,.mini-person-name .staff-position,.staff-branch,.employee-card-head .muted,.statistics-person-address,.statistics-person-status,.directory-table .person small,.directory-state,.location-manager-identity small) { color:var(--muted); }
@media (max-width:650px) {
 .header-nav:not(:has(> button:nth-child(4))) { width:100%; gap:6px; }
 .header-nav:not(:has(> button:nth-child(4))) > .header-nav-button { flex:1 1 0; min-width:0; padding-inline:8px; gap:6px; }
 .header-nav:not(:has(> button:nth-child(4))) .icon { width:14px; height:14px; flex-shrink:0; }
}
@media (max-width:380px) {
 .header-nav:not(:has(> button:nth-child(4))) .icon { display:none; }
}
/* Compact phones keep identity and actions together instead of adding a third row. */
@media (max-width:380px) {
 .topbar .topbar-panel { grid-template-columns:minmax(0,1fr) auto; gap:12px 8px; }
 .header-brand { grid-column:1; grid-row:1; }
 .topbar-actions { grid-column:2; grid-row:1; }
 .header-nav { grid-column:1 / -1; grid-row:2; }
}
@media (max-width:350px) { .header-brand > .brand-wordmark > small { display:none; } }
/* Statistics filters and period controls share one horizontal baseline. */
.statistics-page > .statistics-heading { margin-bottom:16px; }
.statistics-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:var(--section-space); }
.statistics-controls > .statistics-filters { margin:0; gap:12px; flex:1 1 auto; }
.statistics-controls > .statistics-period { width:auto; margin-left:auto; display:flex; flex-direction:row; align-items:center; gap:12px; }
.statistics-controls .statistics-range { display:flex; align-items:center; }
.statistics-controls .statistics-range > button { min-height:48px; }
@media (max-width:1000px) {
 .statistics-controls { align-items:stretch; }
 .statistics-controls > .statistics-filters { flex:1 1 100%; }
 .statistics-controls > .statistics-period { width:100%; margin-left:0; justify-content:space-between; }
}
@media (max-width:650px) {
 .statistics-controls { gap:12px; }
 .statistics-controls > .statistics-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .statistics-controls .statistics-filters > label { min-width:0; }
 .statistics-controls .statistics-filters .custom-select-trigger { padding-inline:10px; gap:6px; justify-content:space-between; }
 .statistics-controls .statistics-filters .custom-select-trigger > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .statistics-controls > .statistics-period { flex-wrap:wrap; gap:10px; }
 .statistics-controls .period { min-width:0; flex:1 1 240px; }
 .statistics-controls .date-range-trigger { width:100%; }
}

/* Shared form rhythm: field groups, explanatory text and actions use one scale. */
:root { --form-gap:14px; --form-label-gap:7px; --form-section-gap:18px; --dialog-inset:24px; }
dialog:has(> :is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form)) { padding:var(--dialog-inset); }
dialog:has(#employment-form) { width:500px; }
dialog:has(> :is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form)) .modal-head { margin-bottom:var(--form-section-gap); }
:is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form) { display:grid; gap:var(--form-gap); }
:is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form) label:not(.trainee-toggle) { margin:0; gap:var(--form-label-gap); min-width:0; }
:is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form) .field-hint { margin:0; line-height:1.55; }
:is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form) .form-error { margin:0; }
:is(#employment-form,#location-form,#account-form,#shift-form,.standard-dialog-form) .modal-actions { margin:0; padding-top:0; gap:10px; }
#employment-form .employment-fields { margin:0; gap:var(--form-gap); }
#employment-form .trainee-toggle { margin:0; padding:14px; gap:12px; }
#employment-form .modal-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
#employment-form .modal-actions .button { width:100%; justify-content:center; padding-inline:10px; font-size:14px; }
dialog:has(#employment-form) .employment-person { margin:0 0 var(--form-section-gap); gap:12px; }
dialog:has(#employment-form) .employment-person .avatar { width:48px; height:48px; flex:0 0 48px; }
dialog:has(#employment-form) .employment-person strong { font-size:var(--person-name-size); }
dialog:has(#employment-form) .modal-head h2 { font-size:24px; line-height:1.2; }
@media (max-width:540px) {
 :root { --dialog-inset:18px; --form-section-gap:16px; }
 dialog:has(#employment-form) .modal-head h2 { font-size:22px; }
 #employment-form .modal-actions { grid-template-columns:1fr; }
}
/* Export is a quiet secondary action, aligned with week navigation. */
.planner-toolbar .schedule-download { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:8px 12px; margin-left:auto; border:0; border-radius:12px; color:var(--muted); background:transparent; font:500 13px/1.3 Inter,sans-serif; white-space:nowrap; transition:background-color 160ms,color 160ms; }
html[data-theme] .planner-toolbar .schedule-download:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); color:var(--ink); }
.schedule-download .icon { width:17px; height:17px; }
.schedule-download:disabled { opacity:.6; cursor:wait; }
@media(max-width:650px) {
 .planner-toolbar { flex-wrap:wrap; }
 .planner-toolbar .schedule-download { padding-inline:8px; }
}
.schedule-download-mobile { display:none; }
@media(max-width:650px) {
 .planner-toolbar .schedule-download { display:none; }
 .schedule-filter,.director-calendar-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
 html[data-theme] .schedule-download-mobile { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:0; margin:0; border:0; border-radius:0; background:transparent; color:var(--muted); font:500 13px/1.3 Inter,sans-serif; white-space:nowrap; box-shadow:none; }
 html[data-theme] .schedule-download-mobile:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); background:transparent; }
 .director-calendar-heading .schedule-download-mobile { align-self:flex-start; }
}

/* Content and the floating rail finish on the same page edge. */
:root { --page-edge-space:24px; }
.icon-rail { padding-bottom:calc(var(--page-edge-space) + env(safe-area-inset-bottom,0px)); }
.workspace { padding-bottom:calc(var(--page-edge-space) + env(safe-area-inset-bottom,0px)); }
.workspace > :last-child,.workspace > :last-child > .panel:last-child { margin-bottom:0; }
.workspace > .team-section:last-child .employee-cards { margin-bottom:0; }

/* Compact inbox, without decorative icons; all colors use existing surface tokens. */
html[data-theme] .notification-dropdown { width:400px; padding:0; border-radius:22px; }
.notification-heading { padding:16px; gap:10px; }
.notification-heading strong { display:flex; align-items:center; gap:7px; font-size:16px; }
.notification-total { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:22px; padding:0 5px; border-radius:7px; background:var(--surface-subtle); color:var(--muted); font-size:11px; font-weight:500; }
.notification-heading > div > span { font-size:11px; }
.notification-heading .text-button { font-size:11px; }
.notification-list { padding:6px; max-height:min(430px,58dvh); }
html[data-theme] .notification-item { gap:10px; padding:12px 10px; border-radius:12px; background:transparent; }
html[data-theme] .notification-item:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background:var(--surface-subtle); }
.notification-item-content { gap:5px; }
.notification-item-top { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.notification-item-top > strong { font-size:13px; line-height:1.4; font-weight:550; color:var(--ink); }
.notification-item-top > time { font-size:10px; line-height:1.4; color:var(--muted); white-space:nowrap; flex-shrink:0; }
.notification-item-content > .notification-description { font-size:12px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.notification-unread-dot { width:5px; height:5px; margin-top:6px; }
.notification-empty { padding:26px 20px; gap:9px; }
.notification-empty strong { font-size:15px; }
.notification-empty p { font-size:12px; }
@media(max-width:650px) {
 html[data-theme] .notification-dropdown { width:auto; max-width:none; left:12px; right:12px; }
 .notification-list { max-height:min(430px,60dvh); }
 .notification-item-top { flex-wrap:wrap; gap:2px 8px; }
}
.profile-dropdown > .profile-application-link { display:flex; align-items:center; justify-content:flex-start; gap:12px; height:var(--control-height); min-height:var(--control-height); box-sizing:border-box; width:100%; padding:12px; color:var(--muted); border-radius:12px; text-decoration:none; font-size:15px; line-height:normal; }
.profile-dropdown > .profile-application-link:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); }
.profile-application-link > .icon { width:19px; height:19px; color:var(--muted); }
.entry-application-link { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:20px; color:var(--muted); text-decoration:none; font-size:13px; }
.entry-application-link .icon { width:16px; height:16px; }
.entry-application-link:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
@media(display-mode:standalone) { .preview-launch { display:none; } }


html[data-theme] #profile-menu .profile-dropdown > :is(button,.profile-application-link) { gap:12px; padding-inline:12px; font-size:15px; color:var(--ink); }
html[data-theme] #profile-menu .profile-dropdown > :is(button,.profile-application-link) > .icon { width:19px; height:19px; flex:0 0 19px; color:var(--muted); }

/* Profile actions share the same surface states, including navigation links. */
html[data-theme] #profile-menu .profile-dropdown > :is(button,.profile-application-link):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible,:active) { background:var(--surface-subtle); color:var(--ink); }
html[data-theme] #profile-menu .profile-dropdown > :is(button,.profile-application-link) { transition:background-color 150ms ease,color 150ms ease; }

.notification-close { display:none!important; }
@media(max-width:650px) {
 html[data-theme] .notification-heading { position:sticky; top:0; z-index:2; background:var(--surface); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; padding-top:14px; }
 .notification-heading > .text-button { grid-column:1; grid-row:2; justify-self:start; }
 html[data-theme] .notification-heading > .notification-close { display:flex!important; grid-column:2; grid-row:1 / span 2; align-items:center; justify-content:center; width:40px; height:40px; min-width:40px; min-height:40px; padding:0; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--ink); }
 .notification-close > .icon { width:20px; height:20px; }
}

/* Profile separators use the same token in both themes. */
html[data-theme] #profile-menu .profile-dropdown > .profile-dropdown-heading { border-bottom:1px solid var(--line); }
html[data-theme] #profile-menu .profile-dropdown > #logout { border-top:0; margin-top:0; }

html[data-theme] #profile-menu .profile-dropdown-heading { display:grid; grid-template-columns:40px minmax(0,1fr); align-items:center; gap:12px; }
#profile-menu .profile-dropdown-heading .avatar { width:40px; height:40px; min-width:40px; border-radius:50%; }
#profile-menu .profile-menu-identity { display:grid; gap:5px; min-width:0; }
#profile-menu .profile-menu-identity > strong { color:var(--ink); font-size:16px; font-weight:550; overflow-wrap:anywhere; }
#profile-menu .profile-menu-identity > span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }

/* Schedule identities keep the same two-line name rhythm at every width. */
:is(.planner-person-info > strong,.planner-person-info > strong > .employee-profile-link) > .planner-name-line { display:block; min-width:0; min-height:1.35em; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.shift-editor-status:empty { display:none; }
.shift-editor-status { margin-bottom:14px; }
.shift-state-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:10px; background:var(--surface-subtle); color:var(--ink); font-size:12px; font-weight:500; line-height:1.4; }
.shift-state-chip .icon { width:16px; height:16px; color:var(--muted); }
.shift-state-chip.is-completed .icon { color:var(--status-positive); }
.shift-state-chip.is-ongoing { background:var(--status-active-fill); color:var(--status-active-ink); }
.shift-state-chip.is-ongoing .icon { color:inherit; }

/* The eye uses the field's midpoint; its hit area keeps the shared 48 px height. */
.entry-form-panel #toggle-password { top:50%; right:0; transform:translateY(-50%); width:48px; height:48px; }

/* Password visibility stays inside the field without covering its border. */
.entry-form-panel #toggle-password {
 right:4px; width:40px; height:40px; min-width:40px; min-height:40px;
 background:transparent; border:0; box-shadow:none;
}
html[data-theme] .entry-form-panel #toggle-password:hover:where(:not(html[data-hover-disabled] *)),
html[data-theme] .entry-form-panel #toggle-password:active {
 background:transparent; box-shadow:none;
}

.shift-editor-times select[data-custom-select='native-time'] { width:100%; min-width:0; height:var(--control-height); padding:0 12px; font:inherit; color:var(--ink); background-color:var(--surface); border:1px solid var(--control-border); border-radius:14px; }

/* The manager can choose a compact list without changing team data or actions. */
.team-view-toolbar { display:flex; justify-content:flex-end; margin:0 0 16px; }
.team-view-switch { display:inline-flex; gap:4px; padding:4px; background:var(--surface); border-radius:14px; }
.team-view-switch button { min-height:40px; padding:0 16px; border:0; border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:14px; }
html[data-theme] .team-view-switch button:is(:hover:where(:not(html[data-hover-disabled] *)),[aria-pressed='true']) { background:var(--surface-subtle); color:var(--ink); }
.team-view-switch button[aria-pressed='true'] { font-weight:550; }
.team-list.panel { padding:0 20px; overflow:visible; }
.team-list-row { display:grid; grid-template-columns:minmax(180px,1.2fr) minmax(150px,1fr) minmax(240px,1fr) 40px; gap:20px; align-items:center; padding:20px 0; }
.team-list-row + .team-list-row { border-top:1px solid var(--line); }
.team-list-person { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.team-list-person .avatar { width:44px; height:44px; flex:0 0 44px; }
.team-list-person h3 { margin:0 0 4px; color:var(--ink); font-size:16px; font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.team-list-person span:not(.avatar) { color:var(--muted); font-size:13px; line-height:1.4; }
.team-list-next { display:grid; gap:5px; min-width:0; }
.team-list-next > span,.team-list-metrics dt { color:var(--muted); font-size:12px; line-height:1.4; }
.team-list-next strong { color:var(--ink); font-size:14px; font-weight:500; line-height:1.5; }
.team-list-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.team-list-metrics dd { margin:5px 0 0; color:var(--ink); font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap; }
.team-list-metrics small { font-size:12px; font-weight:400; color:var(--muted); }
@media(max-width:1100px) {
 .team-list-row { grid-template-columns:minmax(0,1fr) minmax(220px,1fr) 40px; gap:12px 18px; }
 .team-list-person { grid-column:1; grid-row:1; }
 .team-list-next { grid-column:1; grid-row:2; padding-left:56px; }
 .team-list-metrics { grid-column:2; grid-row:1/3; }
 .team-list-row .directory-menu { grid-column:3; grid-row:1; }
}
@media(max-width:650px) {
 .team-view-toolbar { justify-content:flex-start; margin-bottom:12px; }
 .team-list.panel { padding:0 16px; }
 .team-list-row { grid-template-columns:minmax(0,1fr) 40px; padding:18px 0; gap:12px; }
 .team-list-person { grid-column:1; }
 .team-list-row .directory-menu { grid-column:2; }
 .team-list-next { grid-column:1/-1; grid-row:2; padding-left:0; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:4px 12px; }
 .team-list-metrics { grid-column:1/-1; grid-row:3; padding:12px; border-radius:12px; background:var(--surface-subtle); gap:10px; }
 .team-list-metrics > div + div { padding-left:10px; border-left:1px solid var(--line); }
 .team-list-metrics dt { font-size:11px; }
}

.team-view-toolbar { justify-content:space-between; align-items:center; gap:12px; }
.team-view-toolbar > h3 { margin:0; color:var(--ink); font-size:20px; font-weight:550; line-height:1.4; }
@media(max-width:650px) {
 .team-view-toolbar { justify-content:space-between; gap:8px; }
 .team-view-toolbar > h3 { font-size:18px; }
 .team-view-switch button { padding-inline:12px; }
}

/* Override the legacy dark panel background with the shared card surface. */
html[data-theme] .team-list.panel { background:var(--surface); border:0; border-radius:24px; box-shadow:none; }

/* Header and period controls share a centered row on wide statistics screens. */
@media(min-width:1101px) {
 .statistics-page:not(.employee-statistics-page) { display:grid; grid-template-columns:minmax(260px,1fr) minmax(0,auto); gap:24px; align-items:center; }
 .statistics-page:not(.employee-statistics-page) > :not(.statistics-heading):not(.statistics-controls) { grid-column:1/-1; }
 .statistics-page:not(.employee-statistics-page) > .statistics-heading { margin:0; }
 .statistics-page:not(.employee-statistics-page) > .statistics-controls,
 .statistics-page:not(.employee-statistics-page) > .statistics-overview > .statistics-controls { margin:0; }
 .statistics-page:not(.employee-statistics-page) > .statistics-metrics { margin:0; }
 .statistics-page:not(.employee-statistics-page) > .panel { margin-bottom:0; }
}
.statistics-metrics article { position:relative; overflow:hidden; }
.statistics-metrics article > .metric-sparkline { display:block; width:100%; height:64px; margin-top:16px; color:var(--control-accent); opacity:.65; overflow:visible; }
[data-theme='dark'] .statistics-metrics article > .metric-sparkline { opacity:.8; }
@media(max-width:650px) {
 .statistics-metrics article > .metric-sparkline { grid-column:1/-1; grid-row:3; margin-top:6px; height:44px; }
}

.mini-person-name .mini-person-status { display:inline-flex; align-items:center; gap:6px; max-width:100%; margin-top:10px; padding:0; border-radius:0; background:transparent; color:var(--muted); font-size:12px; font-weight:400; line-height:1.4; }
.mini-person-status > .icon { width:14px; height:14px; flex:0 0 14px; }
.mini-person-status.is-completed > .icon { color:var(--status-positive); }
.mini-person-status.is-ongoing { color:var(--ink); }
.mini-person-status > i { width:5px; height:5px; flex:0 0 5px; border-radius:50%; background:var(--status-positive); }
@media(max-width:650px) {
 .mini-person-name .mini-person-status { margin-top:8px; padding:0; gap:4px; font-size:11px; }
 .mini-person-status > .icon { width:12px; height:12px; flex-basis:12px; }
}

.mini-person-status.is-off > i { background:var(--muted); opacity:.4; }

.button.is-saved { display:inline-flex; align-items:center; justify-content:center; gap:8px; opacity:1; }
.button.is-saved .icon { width:20px; height:20px; flex-shrink:0; }
@media(prefers-reduced-motion:no-preference) {
 .button.is-saved .icon { animation:save-check-in 180ms ease-out both; }
 @keyframes save-check-in { from { opacity:0; transform:scale(.7); } to { opacity:1; transform:scale(1); } }
}

.button.is-saving,.button.is-saving:disabled,.button.is-saved:disabled { display:inline-flex; align-items:center; justify-content:center; gap:8px; opacity:1; }
.save-spinner { display:inline-block; width:18px; height:18px; flex:0 0 18px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; }
.save-feedback-check path { stroke-dasharray:1; stroke-dashoffset:0; }
@media(prefers-reduced-motion:no-preference) {
 .save-spinner { animation:save-spinner-turn 650ms linear infinite; }
 .save-feedback-check path { animation:save-check-draw 280ms ease-out both; }
 .button.is-saved > span { animation:save-label-in 180ms ease-out both; }
 @keyframes save-spinner-turn { to { transform:rotate(360deg); } }
 @keyframes save-check-draw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
 @keyframes save-label-in { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:translateY(0); } }
}

/* Compact mobile schedule: identity and shift share a row. */
@media(max-width:650px) {
 .mobile-shift-person { display:grid; grid-template-columns:minmax(0,1fr) 136px; align-items:center; gap:12px; padding:14px 0; }
 .mobile-shift-person .planner-person { min-width:0; align-items:flex-start; gap:9px; }
 .mobile-shift-person .planner-person > .avatar { width:32px; height:32px; flex-basis:32px; }
 .mobile-shift-person .planner-person-info { min-width:0; }
 .mobile-shift-person .planner-person-info > strong { font-size:14px; line-height:1.35; }
 .mobile-shift-person .planner-person-info > small { display:none; }
 .mobile-shift-person .planner-person-info .staff-position { font-size:12px; margin-top:4px; line-height:1.4; }
 .mobile-shift-person .planner-person-hours { font-size:12px; margin-top:5px; line-height:1.4; }
 .mobile-shift-person .planner-person-hours small { font-size:11px; }
 .mobile-shift-slots { min-width:0; margin:0; gap:6px; }
 html[data-theme] .mobile-shift-slots > .planner-shift { min-height:68px; padding:10px 7px; border-radius:14px; gap:6px; }
 .mobile-shift-slots .planner-shift-time { font-size:15px; gap:3px; line-height:1.4; }
 .mobile-shift-slots .planner-shift-meta { font-size:11px; gap:4px; line-height:1.4; flex-wrap:wrap; justify-content:center; }
 .mobile-shift-slots .planner-shift-meta > span { gap:3px; }
 .mobile-shift-slots .planner-shift-meta .icon { width:12px; height:12px; }
 .mobile-shift-slots .planner-shift-meta > strong { font-size:11px; }
 .mobile-shift-slots .mobile-assign-shift { min-height:68px; height:auto; padding:10px 8px; border-radius:14px; font-size:12px; gap:5px; }
 .mobile-shift-slots .mobile-assign-shift .icon { width:15px; height:15px; flex-shrink:0; }
 .mobile-shift-slots .mobile-no-shift { text-align:right; font-size:12px; }
}
@media(max-width:374px) {
 .mobile-shift-person { grid-template-columns:minmax(0,1fr); gap:10px; }
 .mobile-shift-person .planner-person-info { flex:1; }
 .mobile-shift-person :is(.planner-person-info > strong,.planner-person-info > strong > .employee-profile-link) > .planner-name-line { display:inline; min-height:0; white-space:normal; }
 html[data-theme] .mobile-shift-slots > .planner-shift { display:flex; flex-direction:row; align-items:center; justify-content:space-between; min-height:48px; padding:10px 12px; }
 .mobile-shift-slots .planner-shift-meta { justify-content:flex-end; }
 .mobile-shift-slots .mobile-assign-shift { min-height:48px; }
 .mobile-shift-slots .mobile-no-shift { text-align:left; }
}

/* Contain wheel/touch scrolling so an exhausted list cannot scroll its dialog. */
.custom-select-popover { overscroll-behavior:contain; }
.custom-select-popover { overflow:hidden; }
.custom-select-popover:popover-open,.custom-select-popover:not([popover]) { display:flex; flex-direction:column; }
.custom-select-sheet-head { display:none; }
.custom-select-options { min-height:0; overflow-y:auto; overscroll-behavior:contain; scroll-padding-block:6px; }
@media(max-width:650px) {
 .custom-select-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; padding:4px 8px 12px; }
 .custom-select-sheet-head strong { font-size:16px; font-weight:600; color:var(--ink); min-width:0; overflow-wrap:anywhere; }
 html[data-theme] .custom-select-sheet-head .custom-select-close { display:grid; place-items:center; flex:0 0 40px; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; border:1px solid var(--control-border); border-radius:50%; background:transparent; color:var(--muted); }
 html[data-theme] .custom-select-sheet-head .custom-select-close:hover:where(:not(html[data-hover-disabled] *)) { border-color:var(--muted); color:var(--ink); }
 .custom-select-close .icon { width:18px; height:18px; }
}

.team-view-switch button { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:40px; padding:0; }
.team-view-switch button > .icon { display:block; width:20px; height:20px; }

html[data-theme] #toast { display:flex; align-items:flex-start; gap:9px; z-index:80; box-sizing:border-box; width:max-content; max-width:calc(100vw - 32px); padding:11px 16px; border:1px solid var(--line); border-radius:14px; background:#30343c; color:#f2f2f2; border-color:rgb(242 242 242 / .12); box-shadow:0 6px 20px rgb(0 0 0 / .1); font-size:13px; line-height:1.5; text-align:center; transform:translate(-50%,6px); }
html[data-theme] #toast.show { transform:translate(-50%,0); }
html[data-theme='dark'] #toast { background:#30343c; box-shadow:0 8px 24px rgb(0 0 0 / .22); }
@media(max-width:650px) {
 body:has(.mobile-navigation-dock) #toast { bottom:calc(var(--mobile-nav-bottom,14px) + 76px + var(--surface-gap)); }
}
@media(prefers-reduced-motion:reduce) { #toast { transition:none; } }

#toast .toast-symbol { display:flex; flex:0 0 18px; width:18px; height:18px; margin-top:1px; color:var(--accent); }
#toast .toast-symbol .icon { width:18px; height:18px; }
#toast .toast-text { min-width:0; text-align:left; }
#toast[data-kind='success'] .toast-symbol { color:var(--status-positive); }
#toast[data-kind='error'] .toast-symbol { color:var(--danger); }
#toast[data-kind='info'] .toast-symbol { color:#f2f2f2; opacity:.85; }

/* Trial palette: blue data accents and green status indicators. */
:root { --accent:var(--action,#2D81FF); --status-positive-on-light:#16a34a; --status-positive:var(--status-positive-on-light); }
html[data-theme='dark'] { --status-positive:#4ade80; }
html[data-theme] .statistics-metrics article > .metric-sparkline { color:var(--control-accent); opacity:1; }
html[data-theme] .statistics-metrics article > span > .icon { color:var(--accent); }
html[data-theme] .personal-report-note > .icon { color:var(--accent); }

.planner-shift-meta > .icon { display:block; width:14px; height:14px; flex:0 0 14px; color:var(--status-positive); }

/* Primary controls use the shared application accent. */
:root { --action:#2D81FF; --action-hover:#2470E6; --action-ink:#ffffff; }
html[data-theme] .button.primary:not(.danger),
html[data-theme] .range-popover .range-footer .button.primary {
 background:var(--control-accent); border-color:var(--control-accent); color:var(--control-accent-ink);
}
html[data-theme] .button.primary:not(.danger):is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
html[data-theme] .range-popover .range-footer .button.primary:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background:var(--control-accent-hover); border-color:var(--control-accent-hover); color:var(--control-accent-ink);
}
html[data-theme] .create-menu > .create-trigger,
html[data-theme] .mobile-create-button,
html[data-theme] .section-heading > .action-icon[data-add-user] {
 background:var(--control-accent); color:var(--control-accent-ink);
}
html[data-theme] .create-menu > .create-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
html[data-theme] .mobile-create-button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible),
html[data-theme] .section-heading > .action-icon[data-add-user]:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) {
 background:var(--control-accent-hover); color:var(--control-accent-ink);
}
html[data-theme] .location-add-card > span > .icon { color:var(--muted); }
.shift-state-chip .icon { color:var(--status-positive); }
.brand-symbol { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; color:var(--action,#2D81FF); flex-shrink:0; }
html[data-theme="dark"] img[src^="/assets/app/icon.svg"] { filter:grayscale(1) invert(.94) brightness(1.12); }
.brand-symbol > :is(svg,img) { display:block; width:36px; height:36px; }
.header-brand > .brand-symbol { display:none; }

/* Planned clocks stay muted; completion checks use the status color. */
html[data-theme] :is(.planner-shift-meta,.planner-footer,.employee-week-slot,.employee-shift-state,.shift-state-chip) .icon-clock { color:var(--muted); }

/* Location actions and irreversible deletion share the existing control system. */
html[data-theme] .location-card-refined { position:relative; overflow:visible; }
html[data-theme] .location-card-refined .location-delete-link { display:inline-flex; align-items:center; justify-content:flex-start; align-self:flex-start; min-height:44px; margin-top:12px; padding:8px 0; border:0; border-radius:0; background:transparent; color:var(--danger); font-size:13px; font-weight:500; line-height:1.4; text-align:left; text-decoration:none; }
html[data-theme] .location-card-refined .location-delete-link:hover:where(:not(html[data-hover-disabled] *)) { background:transparent; color:var(--danger-hover); text-decoration:none; }
dialog.location-delete-dialog { width:500px; padding:24px; }
.location-delete-dialog .modal-head { margin-bottom:16px; }
.location-delete-dialog .modal-head h2 { font-size:24px; }
#delete-location-form { display:grid; gap:14px; }
.location-delete-name { font-size:20px; font-weight:550; margin:0; overflow-wrap:anywhere; }
.location-delete-warning { font-size:14px; line-height:1.6; margin:0; }
.location-delete-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:14px; margin:0; background:var(--surface-subtle); border-radius:16px; gap:0; }
.location-delete-counts > div { min-width:0; padding-right:12px; }
.location-delete-counts > div + div { padding-left:12px; border-left:1px solid var(--line); }
.location-delete-counts > div:last-child { padding-right:0; }
.location-delete-counts dt { font-size:12px; color:var(--muted); line-height:1.4; }
.location-delete-counts dd { font-size:22px; font-weight:550; margin:6px 0 0; }
#delete-location-form .field-hint { margin:0; }
#delete-location-form label { margin:0; gap:8px; font-size:14px; }
#delete-location-form .form-error:empty { display:none; }
#delete-location-form .modal-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; }
#delete-location-form .modal-actions .button { width:100%; justify-content:center; font-size:14px; }
.director-calendar-heading { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:20px; }
.director-calendar-controls { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.director-calendar-heading .calendar-location-picker { margin:0; }
@media(max-width:650px) {
 dialog.location-delete-dialog { padding:18px; }
 .location-delete-dialog .modal-head h2 { font-size:22px; }
 .director-calendar-heading { align-items:center; gap:12px; }
 .director-calendar-heading > div:first-child { min-width:0; }
 .director-calendar-heading h1 { font-size:24px; }
 .director-calendar-heading p { font-size:12px; }
 .director-calendar-controls { flex-direction:column; align-items:flex-end; gap:8px; max-width:46%; }
 .director-calendar-controls .calendar-location-picker { order:-1; max-width:100%; }
 .director-calendar-controls .custom-select { width:100%; }
 html[data-theme] .director-calendar-controls .custom-select-trigger { max-width:100%; padding-inline:12px; font-size:13px; }
 .director-calendar-controls .schedule-download-mobile { align-self:flex-end; font-size:11px; }
 .location-delete-counts { padding:12px; gap:0; }
}
html[data-theme] .planner-footer .icon-clock { color:inherit; }

#delete-location-form .modal-actions button:disabled { cursor:not-allowed; }

/* Staff cards put the next shift and period completion ahead of account controls. */
.staff-card { padding:var(--surface-inset); }
.staff-card .employee-card-head { align-items:flex-start; gap:12px; margin-bottom:var(--surface-gap); }
.staff-card .employee-card-head > .avatar { width:44px; height:44px; flex:0 0 44px; }
.staff-card .employee-card-head > .staff-card-menu { flex:0 0 auto; margin:-5px -8px 0 0; }
.staff-card .staff-card-identity { flex:1; min-width:0; }
.staff-card .employee-card-head h3 { font-size:17px; line-height:1.35; }
.staff-card .employee-card-head .staff-branch { font-size:12px; }
.staff-card-menu .profile-dropdown { width:250px; max-width:calc(100vw - 24px); }
.staff-card-menu .account-actions { display:grid; gap:3px; }
html[data-theme] .staff-card-menu .text-button { display:flex; align-items:center; width:100%; padding:10px 12px; min-height:44px; margin:0; border:0; border-radius:12px; background:transparent; color:var(--ink); text-align:left; justify-content:flex-start; font-size:13px; text-decoration:none; }
html[data-theme] .staff-card-menu .text-button:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); }
html[data-theme] .staff-card-menu .text-button.danger { color:var(--danger); }
.staff-card-next { display:grid; gap:6px; padding:14px; border-radius:16px; background:var(--surface-subtle); min-height:76px; }
.staff-card-next-label { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); line-height:1.4; }
.staff-card-next-label > i { width:5px; height:5px; border-radius:50%; background:var(--status-positive); }
.staff-card-next-line { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; }
.staff-card-next-line > strong { font-size:17px; font-weight:550; line-height:1.4; color:var(--ink); }
.staff-card-next-line > span { font-size:14px; line-height:1.4; color:var(--ink); font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap; }
.staff-card-next-empty { font-size:12px; color:var(--muted); }
.staff-card .staff-card-metrics { gap:0; margin:18px 0 14px; }
.staff-card-metrics > div { padding-inline:12px; border-right:1px solid var(--line); }
.staff-card-metrics > div:first-child { padding-left:0; }
.staff-card-metrics > div:last-child { padding-right:0; border:0; }
.staff-card-metrics dt { font-size:12px; line-height:1.4; white-space:nowrap; }
.staff-card-metrics dd { font-size:23px; line-height:1.35; font-weight:550; white-space:nowrap; }
.staff-card-metrics dd > small { font-size:12px; font-weight:400; color:var(--muted); }
.staff-card-completion { display:grid; gap:9px; margin-bottom:16px; min-height:34px; }
.staff-card-completion > span { font-size:12px; color:var(--muted); line-height:1.4; }
.staff-card-completion strong { font-weight:500; color:var(--ink); }
.staff-card-completion progress { display:block; appearance:none; width:100%; height:5px; border:0; border-radius:4px; overflow:hidden; background:var(--surface-subtle); color:var(--control-accent); }
.staff-card-completion progress::-webkit-progress-bar { background:var(--surface-subtle); border-radius:4px; }
.staff-card-completion progress::-webkit-progress-value { background:var(--control-accent); border-radius:4px; }
.staff-card-completion progress::-moz-progress-bar { background:var(--control-accent); border-radius:4px; }
.staff-card-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:12px; border-top:1px solid var(--line); margin-top:auto; }
.staff-card-footer > span { color:var(--muted); font-size:11px; }
html[data-theme] .staff-card-footer > .text-button { display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:4px 0; margin:0; background:transparent; border:0; color:var(--ink); font-size:13px; white-space:nowrap; text-decoration:none; }
html[data-theme] .staff-card-footer > .text-button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--muted); background:transparent; }
.staff-card-footer > .text-button > .icon { width:15px; height:15px; }
@media(max-width:650px) {
 .staff-card { padding:18px; }
 .staff-card-next { padding:12px; }
 .staff-card .employee-card-head h3 { font-size:16px; }
 .staff-card-metrics dd { font-size:22px; }
}

/* List view shares shift and completion components with the staff cards. */
.team-list-row { grid-template-columns:minmax(180px,1.1fr) minmax(200px,1fr) minmax(280px,1.25fr) 40px; gap:20px; }
.team-list-person > div { min-width:0; }
.team-list-person .staff-branch { display:flex; margin-top:5px; font-size:12px; }
.team-list-row .staff-list-next { min-width:0; min-height:76px; }
.team-list-period { min-width:0; }
.team-list-period .team-list-metrics { gap:0; padding:0; border-radius:0; background:transparent; }
.team-list-period .team-list-metrics > div { padding-right:12px; min-width:0; }
.team-list-period .team-list-metrics > div + div { border-left:1px solid var(--line); padding-left:12px; }
.team-list-period .team-list-metrics > div:last-child { padding-right:0; }
.team-list-period .team-list-metrics dd { font-size:20px; font-weight:550; }
.team-list-period .team-list-metrics dt { white-space:nowrap; }
.staff-list-completion { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px 10px; min-height:0; margin:12px 0 0; }
.staff-list-completion > progress { grid-column:1/-1; grid-row:2; }
.staff-list-completion > span { grid-column:1; grid-row:1; font-size:11px; }
html[data-theme] .staff-list-completion > .text-button { grid-column:2; grid-row:1; display:inline-flex; align-items:center; gap:4px; min-height:24px; padding:0; margin:0; background:transparent; border:0; color:var(--ink); font-size:12px; white-space:nowrap; text-decoration:none; }
html[data-theme] .staff-list-completion > .text-button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--muted); background:transparent; }
.staff-list-completion > .text-button .icon { width:14px; height:14px; }
@media(max-width:1100px) {
 .team-list-row { grid-template-columns:minmax(0,1fr) minmax(250px,1fr) 40px; gap:14px 18px; }
 .team-list-row > .team-list-person { grid-column:1; grid-row:1; }
 .team-list-row .staff-list-next { grid-column:1; grid-row:2; }
 .team-list-row .team-list-period { grid-column:2; grid-row:1/3; }
 .team-list-row .directory-menu { grid-column:3; grid-row:1; align-self:start; }
}
@media(max-width:650px) {
 .team-list-row { grid-template-columns:minmax(0,1fr) 40px; gap:14px 10px; padding:18px 0; }
 .team-list-row > .team-list-person { grid-column:1; grid-row:1; }
 .team-list-row .directory-menu { grid-column:2; grid-row:1; margin-right:0; }
 .team-list-row .staff-list-next { grid-column:1/-1; grid-row:2; }
 .team-list-row .team-list-period { grid-column:1/-1; grid-row:3; }
 .team-list-person .avatar { width:40px; height:40px; flex-basis:40px; }
 .team-list-period .team-list-metrics dd { font-size:20px; }
 .team-list-period .team-list-metrics dt { font-size:11px; }
}

/* A quiet, unboxed shift summary keeps the list visually compact. */
.team-list-row .staff-list-next { padding:0; border-radius:0; background:transparent; min-height:0; gap:6px; }
.staff-list-next .staff-card-next-line { flex-direction:column; align-items:flex-start; gap:2px; }
.staff-list-next .staff-card-next-line > strong { font-size:13px; font-weight:400; color:var(--muted); }
.staff-list-next .staff-card-next-line > span { font-size:16px; font-weight:550; color:var(--ink); }
.staff-list-next:has(.staff-card-next-empty) .staff-card-next-line > strong { color:var(--ink); font-size:14px; font-weight:500; }

/* Modal action buttons share dimensions, alignment and icon placement. */
html[data-theme] #modal .button { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:var(--control-height); min-height:var(--control-height); padding:0 16px; border-radius:var(--compact-corner); corner-shape:var(--surface-curve); font-size:14px; font-weight:500; line-height:1.4; text-align:center; text-decoration:none; box-sizing:border-box; }
html[data-theme] #modal .button > .icon { display:block; position:static; transform:none; margin:0; width:18px; height:18px; flex:0 0 18px; }
html[data-theme] #modal .modal-actions > .button { min-width:0; width:100%; margin:0; }
html[data-theme] #modal .access-view-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
html[data-theme] #modal .access-view-content { display:grid; gap:var(--form-gap); }
html[data-theme] #modal .access-view-content>:is(.access-view-person,.access-view-fields,.access-view-hint,.access-view-actions) { margin:0; }
html[data-theme] #modal .access-view-content #open-reset-access { margin-top:0; }
.budget-access-toggle[hidden] { display:none!important; }
/* Elevate the menu's complete stacking context, not only the dropdown itself. */
html[data-theme] :is(.location-card,.location-direct-card,.staff-card):has(.directory-menu[open]) { position:relative; z-index:40; overflow:visible; clip-path:none!important; }
html[data-theme] :is(.location-manager-row,.team-list-row,.unified-staff-row):has(.directory-menu[open]) { position:relative; z-index:41; overflow:visible; clip-path:none!important; }

html[data-theme] #modal #open-reset-access { margin:0; }
html[data-theme] #modal .access-copy-form .access-message-label { display:grid; gap:var(--form-label-gap); min-width:0; }
html[data-theme] #modal .access-copy-form textarea { display:block; width:100%; min-height:240px; max-height:50dvh; box-sizing:border-box; resize:vertical; line-height:1.6; }
html[data-theme] #modal .access-copy-form .field-hint { margin:0; }
.access-copy-buffer { position:fixed; left:0; top:0; width:1px; height:1px; opacity:0; pointer-events:none; }

html[data-theme] #modal .access-view-actions:has(#share-access) #open-reset-access { grid-column:1/-1; order:3; }
html[data-theme] #modal .button[data-copied='true'] > .icon { animation:copy-confirm .2s ease-out; }
@keyframes copy-confirm { from { opacity:0; transform:scale(.7); } to { opacity:1; transform:scale(1); } }
@media(min-width:651px) {
 html[data-theme] #modal .modal-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:center; }
 html[data-theme] #modal .modal-actions > .button:only-child { grid-column:1/-1; }
}
@media(max-width:380px) {
 html[data-theme] #modal .access-view-actions { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { html[data-theme] #modal .button[data-copied='true'] > .icon { animation:none; } }

/* Phone sheets stack actions; wider dialogs retain the two-column layout. */
@media(max-width:650px) {
 html[data-theme] #modal .modal-actions,
 html[data-theme] #modal .access-view-actions {
  display:grid; grid-template-columns:minmax(0,1fr); gap:10px;
 }
 html[data-theme] #modal .modal-actions > .button { grid-column:1; width:100%; }
}

/* Shared spacing roles: use these tokens instead of view-specific insets. */
:root { --surface-inset:16px; --surface-gap:16px; --identity-gap:8px; --compact-gap:8px; }
html[data-theme] :is(.staff-card,.team-overview,.location-card-refined) { padding:var(--surface-inset); }
html[data-theme] .staff-card { border:0; }
html[data-theme] .team-list.panel { padding:0 var(--surface-inset); margin:0; }
.team-list-row { padding:var(--surface-inset) 0; gap:var(--surface-gap); }
.employee-cards { gap:var(--surface-gap); margin:0; }
.staff-card .employee-card-head,.team-list-person { gap:var(--identity-gap); }
.staff-card .employee-card-head { margin-bottom:var(--surface-gap); }
.staff-card .staff-card-metrics { margin:var(--surface-gap) 0 var(--identity-gap); }
.staff-card-completion { gap:var(--compact-gap); margin-bottom:var(--surface-gap); }
.staff-list-completion { gap:var(--compact-gap) var(--identity-gap); margin:var(--identity-gap) 0 0; }
.team-view-toolbar { margin:0 0 var(--heading-space); }
.team-overview { gap:var(--surface-inset); margin:0 0 var(--section-space); }
.team-overview-metrics { max-width:none; }
.team-overview-metrics > div { padding-inline:var(--surface-inset); }
.team-overview-metrics > div:first-child { padding-left:0; }
.team-overview-metrics > div:last-child { padding-right:0; }
.team-overview-metrics dd { display:grid; gap:var(--identity-gap); }
html[data-theme] .team-overview-metrics .metric-sparkline { display:block; width:100%; height:44px; overflow:visible; color:var(--control-accent); }
.team-overview-period { align-self:center; gap:var(--compact-gap); }
@media(max-width:1000px) {
 .team-overview-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .team-overview-period { align-self:stretch; padding-top:var(--surface-gap); }
 .team-overview-metrics > div { padding-inline:var(--identity-gap); }
}
@media(max-width:650px) {
 :root { --surface-inset:16px; }
 .team-overview-metrics > div { padding-inline:var(--compact-gap); }
}
:root { --person-avatar-size:44px; }
.team-list-row { align-items:start; }
.staff-card .employee-card-head > .staff-card-menu { margin:0; }
.staff-card .employee-card-head > .avatar,.team-list-person .avatar { width:var(--person-avatar-size); height:var(--person-avatar-size); flex:0 0 var(--person-avatar-size); }
.team-list-person h3 { font-size:17px; line-height:1.35; }
@media(max-width:650px) { .team-list-person h3 { font-size:16px; } }

/* Team summary: a separate period control and three compact, readable metrics. */
.team-section > .section-heading { align-items:center; gap:var(--surface-gap); }
.team-period-control { display:grid; gap:var(--compact-gap); flex:0 0 auto; min-width:0; }
.team-period-control > span { font-size:12px; color:var(--muted); line-height:1.4; }
.team-period-control .period { margin:0; }
.team-period-control .date-trigger { background:var(--surface); }
.team-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--surface-gap); margin-bottom:var(--section-space); }
.team-summary-metric { display:grid; grid-template-columns:minmax(max-content,1fr) minmax(0,100px); grid-template-rows:auto auto; align-items:center; gap:var(--compact-gap) var(--surface-gap); min-width:0; padding:var(--surface-inset); border-radius:20px; background:var(--surface); }
.team-summary-metric > span { grid-column:1; grid-row:1; font-size:13px; color:var(--muted); line-height:1.4; }
.team-summary-metric > strong { grid-column:1; grid-row:2; color:var(--ink); font-size:26px; line-height:1.2; font-weight:550; white-space:nowrap; font-variant-numeric:tabular-nums; }
.team-summary-metric > strong > small { font-size:13px; font-weight:400; color:var(--muted); }
html[data-theme] .team-summary-metric > .metric-sparkline { grid-column:2; grid-row:1/3; display:block; width:100%; height:44px; color:var(--control-accent); overflow:visible; }
@media(max-width:1000px) {
 .team-section > .section-heading { flex-direction:column; align-items:stretch; }
 .team-period-control { align-self:flex-start; }
 .team-summary-metric { grid-template-columns:minmax(max-content,1fr) minmax(0,72px); }
 .team-summary-metric > strong { font-size:23px; }
}
@media(max-width:650px) {
 .team-period-control { align-self:stretch; }
 .team-period-control .date-trigger { width:100%; }
 .team-summary-grid { grid-template-columns:minmax(0,1fr); gap:var(--compact-gap); }
 .team-summary-metric { grid-template-columns:minmax(0,1fr) 100px; border-radius:16px; gap:4px var(--surface-gap); }
 .team-summary-metric > strong { font-size:23px; }
}

/* Reversible reference palette: graphite workspace, elevated neutral cards, clean blue. */
html[data-theme='dark'] {
 --workspace-bg:#1c1e20;
 --surface:#25282b;
 --surface-subtle:#30343c;
 --surface-hover:var(--surface-subtle);
 --surface-subtle-hover:var(--surface-subtle);
 --theme-text:#f1f5fa;
 --ink:var(--theme-text);
 --action-ink:var(--theme-text);
 --accent-card-fill:#d4dfed;
 --accent-card-ink:#1c2734;
 --muted:#a3adba;
 --action:#078cff;
 --action-hover:#299cff;
 --line:color-mix(in srgb,var(--surface) 84%,var(--ink));
 --control-border:color-mix(in srgb,var(--surface) 86%,var(--ink));
 --schedule-current-day:color-mix(in srgb,var(--surface-subtle) 70%,var(--surface));
 --schedule-ongoing-fill:var(--surface-subtle);
 --schedule-shift-edge:color-mix(in srgb,var(--surface-subtle) 75%,var(--muted));
 --dialog-inset-surface:var(--surface-subtle);
 --floating-edge:var(--control-border);
 --mobile-dock-surface:var(--surface-subtle);
 --mobile-dock-ink:var(--ink);
 --mobile-dock-muted:var(--muted);
 --mobile-dock-inverse:var(--surface);
}
html[data-theme='dark'] :is(input,select,textarea,.custom-select-trigger,.date-trigger) { border-color:var(--control-border); }
html[data-theme='dark'] #toast { background:var(--surface-subtle); }

/* Settings expose device preferences and existing notification/install controls. */
.header-nav > .settings-mobile-source { display:none; }
.settings-page > .page-heading { margin:0 0 var(--section-space); }
.settings-page h1 { font-size:28px; line-height:1.25; font-weight:550; letter-spacing:-.6px; }
.settings-grid { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:var(--surface-gap); }
.settings-card { display:flex; flex-direction:column; align-items:flex-start; gap:var(--surface-gap); min-width:0; padding:var(--surface-inset); background:var(--surface); border-radius:24px; }
.settings-documents{gap:var(--compact-gap)}
.settings-documents .settings-legal-links{display:flex;flex-wrap:wrap;align-items:center;gap:0 var(--surface-gap);min-width:0}
.settings-documents .settings-legal-links>.text-button{justify-content:flex-start;min-width:0;max-width:100%;height:auto;min-height:32px;margin:0;padding:4px 0;font-size:var(--person-name-size);line-height:var(--person-name-line-height);text-align:left;white-space:normal}

.support-dialog{display:grid;gap:var(--form-section-gap)}
.support-ticket-list{display:grid;gap:var(--list-row-gap)}
.support-ticket-row{display:flex;align-items:center;justify-content:space-between;gap:var(--surface-gap);text-align:left}
.support-ticket-row>span{display:grid;gap:var(--compact-gap);min-width:0}
.support-ticket-row strong{font-size:var(--person-name-size);font-weight:550;line-height:1.5;overflow-wrap:anywhere}
.support-ticket-row small{font-size:13px;color:var(--muted);line-height:1.6}
.support-ticket-attention-dot{display:inline-block;width:6px;height:6px;margin-inline-start:var(--compact-gap);vertical-align:middle;border-radius:50%;corner-shape:round;background:var(--danger-strong)}
.support-ticket-meta{display:flex;align-items:center;flex-wrap:wrap;gap:var(--compact-gap)}
.support-ticket-status:is(.is-new,.is-working){background:color-mix(in srgb,var(--action) 8%,var(--surface));color:var(--action)}
.support-dialog-actions{display:grid}
.support-dialog-actions>.button{width:100%}
.support-settings-heading{display:flex;align-items:center;gap:var(--compact-gap);flex-wrap:wrap}
.support-unread-badge[hidden]{display:none!important}
.support-ticket-row>.icon{width:18px;height:18px;flex:0 0 18px;color:var(--muted)}
/* One messenger component for customer and owner support. */
.support-chat-thread{gap:var(--surface-gap);min-width:0}
.support-chat-log{display:flex;flex-direction:column;align-items:flex-start;gap:var(--surface-gap);width:100%;min-width:0;height:clamp(240px,42dvh,420px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent;scrollbar-gutter:stable;padding:var(--surface-gap);box-sizing:border-box;background:var(--surface-hover);border-radius:var(--compact-corner);corner-shape:var(--surface-curve)}
.support-chat-day{align-self:center;margin-block:var(--compact-gap);padding:4px var(--compact-gap);border-radius:var(--small-control-corner);background:var(--surface);font-size:12px;line-height:1.5;color:var(--muted)}
.support-chat-entry{display:grid;grid-template-columns:32px minmax(0,1fr);gap:var(--compact-gap);flex:none;align-self:flex-start;max-width:88%;min-width:0;box-sizing:border-box}
.support-chat-entry.is-self{align-self:flex-end;grid-template-columns:minmax(0,1fr)}
.support-chat-entry>.support-chat-avatar{grid-row:1/3;width:32px;height:32px;min-width:32px;font-size:12px}
.support-chat-message-meta{display:flex;align-items:baseline;gap:var(--compact-gap);flex-wrap:wrap;font-size:12px;line-height:1.5;color:var(--muted)}
.support-chat-message-meta>strong{font-weight:550;color:var(--ink)}
.support-chat-message-meta>time{font-size:11px;font-variant-numeric:tabular-nums}
.support-chat-entry.is-self>.support-chat-message-meta{justify-content:flex-end}
.support-chat-message{min-width:0;box-sizing:border-box;padding:var(--compact-gap) var(--surface-gap);border-radius:var(--compact-corner);corner-shape:var(--surface-curve);background:var(--surface);overflow-wrap:anywhere}
.support-chat-entry.is-self>.support-chat-message{background:var(--action);color:var(--action-ink)}
.support-chat-message>p{margin:0;font-size:14px;line-height:1.6;white-space:pre-wrap}
.support-chat-composer{--support-send-size:40px;display:grid;grid-template-columns:minmax(0,1fr) var(--support-send-size);align-items:end;gap:var(--compact-gap);width:100%;margin:0;min-width:0}
.support-chat-input{display:flex;align-items:flex-end;gap:var(--compact-gap);width:100%;min-width:0;padding:0 4px;border:1px solid var(--line);border-radius:var(--compact-corner);corner-shape:var(--surface-curve);background:var(--surface-hover);box-sizing:border-box}
.support-chat-input:hover:where(:not(html[data-hover-disabled] *)){border-color:var(--muted)}
.support-chat-input:focus-within{border-color:var(--action)}
html[data-theme] body :is(#owner-reply-form,#support-reply-form) .support-chat-input>textarea{flex:1;min-width:0;width:0;min-height:calc(var(--support-send-size) - 2px);max-height:144px;margin:0;padding:var(--compact-gap) var(--compact-gap);box-sizing:border-box;resize:none;overflow-y:auto;border:0;border-radius:0;outline:0;box-shadow:none;background:transparent;color:var(--ink);font-family:inherit;font-size:14px;line-height:1.5}
html[data-theme] #modal .support-chat-send,html[data-theme] body .support-chat-composer>.support-chat-send{width:var(--support-send-size);height:var(--support-send-size);min-width:var(--support-send-size);min-height:var(--support-send-size);flex:0 0 var(--support-send-size);padding:0;border-radius:50%!important;corner-shape:round!important;clip-path:none!important}
html[data-theme] #modal .support-chat-send>.icon,.support-chat-send>.icon{width:20px;height:20px}
.support-chat-send[aria-busy='true']{opacity:.55;cursor:wait}
.support-chat-composer>.form-error{grid-column:1/-1;margin:0;font-size:13px;line-height:1.5}
.support-chat-back{justify-self:start;display:inline-flex;align-items:center;gap:var(--compact-gap);font-size:13px}
.support-chat-back>.icon{width:16px;height:16px}
@media(max-width:650px){.support-chat-log{height:clamp(150px,32dvh,300px)}.support-chat-entry{max-width:96%}html[data-theme] body :is(#owner-reply-form,#support-reply-form) .support-chat-input>textarea{font-size:16px}}
/* Director billing uses the same settings surface, controls and dialog type. */
.settings-billing{scroll-margin-top:var(--surface-inset)}
.billing-metrics{width:100%}
.billing-tile{display:grid;align-content:start;gap:var(--surface-gap);min-width:0;padding:var(--surface-inset);background:var(--surface-subtle);border:1px solid transparent;border-radius:var(--surface-corner);corner-shape:var(--surface-curve)}
.billing-tile-plan{grid-template-columns:minmax(0,1fr) auto;align-items:center;background:var(--billing-summary-fill);border-color:var(--billing-summary-border);color:var(--ink)}
.billing-access-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:var(--surface-gap);min-width:0}
.billing-access-plan{display:flex;align-items:center;flex-wrap:wrap;gap:var(--surface-gap);min-width:0}
.billing-access-heading{display:flex;flex-wrap:wrap;grid-column:1 / -1;align-items:center;gap:var(--compact-gap);min-width:0}
.billing-access-heading h3{margin:0;font-size:var(--settings-title-size);line-height:1.25;font-weight:650}
.billing-tile-plan>.billing-access-heading{padding-bottom:var(--surface-gap);border-bottom:1px solid var(--line)}
.billing-access-heading>:is(.billing-plan-badge,.billing-payment-status){display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;font-size:12px;font-weight:550;line-height:1.5;border-radius:var(--small-control-corner);white-space:nowrap}
.billing-access-heading>.billing-plan-badge{background:var(--action-hover);color:var(--action-ink)}
.billing-tile-price{font-size:var(--settings-title-size);font-weight:550;line-height:1.5}
.billing-tile-price small{font-size:13px;font-weight:400;color:var(--muted);white-space:nowrap}
.billing-summary-expiry{display:grid;gap:var(--compact-gap);margin:0;color:var(--muted)}
.billing-summary-expiry strong{font-size:var(--panel-body-size);font-weight:550;color:var(--ink)}
.billing-settings-actions{display:flex;flex-direction:row;align-items:center;gap:var(--surface-gap)}
.billing-settings-actions>.text-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--compact-gap);font-size:13px;white-space:nowrap}
.billing-settings-actions>.text-button>.icon{width:16px;height:16px}
.billing-settings-footer{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--compact-gap);width:100%;box-sizing:border-box;padding-top:var(--surface-gap);border-top:1px solid var(--line)}
.billing-history-button{display:inline-flex;align-items:center;gap:var(--compact-gap);font-size:13px;margin-left:auto}
.billing-history-button>.icon{width:16px;height:16px}
.billing-payment-list{display:grid;gap:var(--list-row-gap)}
.billing-payment-row{display:flex;align-items:center;justify-content:space-between;gap:var(--surface-gap);padding:var(--list-row-padding);background:var(--list-row-fill);border-radius:var(--inset-corner);corner-shape:var(--surface-curve)}
.billing-payment-copy,.billing-payment-result{display:grid;gap:var(--compact-gap);min-width:0}
.billing-payment-copy>strong,.billing-payment-result>strong{font-size:var(--person-name-size);font-weight:550;line-height:1.5}
.billing-payment-copy>span{font-size:13px;line-height:1.6;color:var(--muted)}
.billing-payment-result{justify-items:end;flex-shrink:0}
.billing-payment-status{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:var(--small-control-corner);background:var(--surface-subtle);color:var(--muted);font-size:12px;line-height:1.5;white-space:nowrap}
.billing-payment-status>.icon{width:14px;height:14px;flex:0 0 14px}
.billing-payment-status.is-paid{background:color-mix(in srgb,var(--status-positive) 8%,var(--surface));color:var(--status-positive)}
.billing-payment-status.is-failed{background:color-mix(in srgb,var(--danger) 8%,var(--surface));color:var(--danger)}
.billing-dialog{display:grid;gap:var(--form-section-gap)}
.billing-dialog>.modal-actions{margin:0;padding-top:0}
.billing-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--surface-gap)}
@media(min-width:651px){dialog:has(.billing-plans){width:720px}}
.billing-plan{display:flex;flex-direction:column;gap:var(--compact-gap);min-width:0;padding:var(--surface-inset);background:var(--surface-subtle);border:1px solid var(--control-border);border-radius:var(--compact-corner);corner-shape:var(--surface-curve)}
.billing-plan-pro{background:color-mix(in srgb,var(--control-accent) 6%,var(--surface-subtle));border-color:var(--control-accent)}
.billing-plan-pro .billing-plan-heading h3{color:var(--control-accent)}
.billing-plan-pro .billing-plan-badge{background:var(--control-accent);color:var(--control-accent-ink)}
.billing-plan-summary{position:relative;display:block;min-width:0;padding:var(--surface-inset);margin:calc(-1 * var(--surface-inset)) calc(-1 * var(--surface-inset)) 0;overflow:hidden}
.billing-plan .tariff-price-values{flex-wrap:nowrap}
.plan-access-label:has(.plan-access-label-icon){padding:0 10px 0 0}
.plan-access-label-icon{display:grid;place-items:center;width:28px;height:28px;background:color-mix(in srgb,var(--action) 12%,transparent);border-radius:var(--small-control-corner)}
.plan-access-label-icon>.icon{width:18px;height:18px}
.billing-plan-summary>div{min-width:0}
.billing-plan-summary .settings-note{margin-block:var(--compact-gap);font-size:var(--person-title-size);line-height:var(--person-title-line-height)}
@media(max-width:1100px){.billing-tile-plan{grid-template-columns:minmax(0,1fr)}.billing-tile-plan .billing-settings-actions{grid-column:1 / -1}}
.billing-plan.is-current{border-color:var(--control-accent)}
.billing-plan-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--compact-gap)}
.billing-plan-heading h3{font-size:var(--settings-title-size);line-height:1.3;font-weight:550;margin:0}
.billing-plan-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border-radius:var(--small-control-corner);background:color-mix(in srgb,var(--action) 10%,var(--surface));color:var(--action);font-size:12px;font-weight:550;white-space:nowrap}
.billing-plan-price{margin:var(--compact-gap) 0;font-size:13px;color:var(--muted)}
.billing-plan-price strong{font-size:24px;line-height:1.25;font-weight:650;color:var(--ink);white-space:nowrap}
.billing-plan ul{display:grid;gap:var(--compact-gap);padding:0;margin:0 0 var(--surface-gap);list-style:none;font-size:13px;line-height:1.6}
.billing-plan li{display:flex;align-items:flex-start;gap:var(--compact-gap)}
.billing-plan li>.icon{width:16px;height:16px;flex:0 0 16px;margin-top:2px;color:var(--status-positive)}
.billing-plan li.is-unavailable{color:var(--muted)}
.billing-plan li.is-unavailable>.icon{color:var(--muted);opacity:.6}
.billing-plan>.button{width:100%;margin-top:auto}
.billing-order{padding:var(--surface-inset);background:var(--surface-subtle);border-radius:var(--compact-corner);corner-shape:var(--surface-curve);display:grid;gap:var(--surface-gap)}
.billing-order-plan,.billing-order-plan>div,.billing-order-total{display:flex;align-items:center;justify-content:space-between;gap:var(--compact-gap);min-width:0}
.billing-order-plan>div{justify-content:flex-start;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.billing-order-plan>.icon{color:var(--muted);flex-shrink:0}
.billing-order-plan .billing-plan-badge{background:var(--control-accent);color:var(--control-accent-ink)}
.billing-order-total{padding-top:var(--surface-gap);border-top:1px solid var(--line)}
.billing-order-total>span:first-child{font-size:14px;color:var(--muted)}
.billing-order-total .tariff-price{text-align:right}
.billing-order .form-note{margin:0}
.billing-checkout-notice{display:flex;align-items:flex-start;gap:var(--compact-gap);color:var(--muted)}
.billing-checkout-notice>.icon{width:18px;height:18px;flex:0 0 18px;margin-top:2px}
.billing-checkout-notice strong{display:block;font-size:14px;line-height:1.5;font-weight:550;color:var(--ink)}
.billing-checkout-notice .form-note{margin:var(--form-label-gap) 0 0}
.billing-dialog a{color:var(--action);text-decoration:underline}
html[data-theme] :is(.billing-profile,.billing-tile-plan){
 --billing-summary-fill:color-mix(in srgb,var(--action) 8%,var(--surface));
 --billing-summary-border:color-mix(in srgb,var(--action) 22%,var(--surface));
}
html[data-theme="light"] :is(.billing-profile,.billing-tile-plan){
 --billing-summary-fill:color-mix(in srgb,var(--personal-ink) 9%,var(--personal-paper));
}
html[data-theme] .billing-tile-plan{
 --billing-summary-fill:var(--surface);
 --billing-summary-border:transparent;
 background:var(--billing-summary-fill);
 & .billing-access-heading>.billing-plan-badge-pro { background:var(--control-accent); color:var(--control-accent-ink); }
 & .billing-access-heading>.billing-payment-status.is-processing { background:var(--recruiting-fill); color:var(--status-recruiting); }
 @media(max-width:650px) { & .billing-access-summary { grid-template-columns:minmax(0,1fr); } }
}
html[data-theme] #profile-menu .profile-dropdown>.billing-profile{display:flex;align-items:center;gap:var(--compact-gap);height:auto;min-height:var(--control-height);padding:var(--surface-gap);margin-block:var(--compact-gap);border:1px solid var(--billing-summary-border);background:var(--billing-summary-fill);line-height:1.5}
html[data-theme] #profile-menu .profile-dropdown>.billing-profile:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible,:active){background:color-mix(in srgb,var(--action) 12%,var(--surface))}
html[data-theme] #profile-menu .billing-profile>.billing-plan-badge{background:var(--surface-subtle);color:var(--ink);padding:4px 10px}
html[data-theme] #profile-menu .billing-profile>.billing-plan-badge-pro{background:var(--control-accent);color:var(--control-accent-ink)}
.billing-profile>span:first-child{display:grid;gap:4px;flex:1;min-width:0;text-align:left}
.billing-profile strong{font-size:13px;font-weight:550}
.billing-profile small{font-size:12px;color:var(--muted);line-height:1.5}
.billing-profile>.icon{width:16px;height:16px;flex:0 0 16px}
@media(max-width:650px){.billing-tile-plan{grid-template-columns:minmax(0,1fr)}.billing-settings-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--compact-gap)}.billing-history-button{margin-left:0;justify-content:space-between}.billing-plans{grid-template-columns:minmax(0,1fr)}.billing-plan,.billing-tile{padding:var(--surface-gap)}}


/* Access recovery uses the same surfaces, heading rhythm and actions as settings. */
/* The locked workspace stays visible beneath an inert, blurred preview. */
.access-blocked-page{position:relative;min-height:100dvh;isolation:isolate}
.access-blocked-preview{filter:blur(7px);pointer-events:none;user-select:none;height:100dvh;overflow:hidden}
.access-blocked-shade{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:var(--surface-inset);background:color-mix(in srgb,var(--workspace-bg) 55%,transparent);overflow:auto}
@media(max-width:650px){.access-blocked-shade{padding:var(--surface-gap)}}

/* Shared Pro lock: the preview is decorative and cannot receive focus or input. */
.pro-feature-card{width:100%}
.pro-feature-gate{position:relative;isolation:isolate;display:grid;place-items:center;width:100%;min-width:0;min-height:calc(var(--control-height) * 4);border-radius:var(--compact-corner);corner-shape:var(--surface-curve)}
.pro-feature-preview{grid-area:1/1;width:100%;min-width:0;padding:var(--surface-gap);filter:blur(4px);opacity:.35;pointer-events:none;user-select:none}
.pro-feature-preview-rows{display:grid;gap:var(--form-section-gap)}
.pro-feature-preview-rows .settings-tool-row{min-width:0}
.pro-feature-overlay.plan-access-card{position:relative;grid-area:1/1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--surface-gap);width:100%;min-width:0;box-sizing:border-box;padding:var(--surface-gap);border:0;border-radius:var(--inset-corner);corner-shape:var(--surface-curve);background:color-mix(in srgb,var(--control-accent) var(--plan-access-tint,6%),var(--personal-paper));text-align:left;box-shadow:none}
html[data-theme='light'] .plan-access-card{--plan-access-tint:12%}
.plan-access-body{display:grid;grid-template-columns:var(--control-height) minmax(0,1fr);gap:var(--surface-gap);align-items:center;min-width:0}
.plan-access-symbol{display:grid;place-items:center;align-self:stretch;border-right:1px solid color-mix(in srgb,var(--control-accent) 16%,var(--personal-paper));color:var(--control-accent);padding-right:var(--surface-gap)}
.plan-access-symbol>.icon{width:24px;height:24px;flex:none}
.pro-feature-copy{min-width:0;display:grid;gap:var(--form-label-gap)}
.plan-access-label{justify-self:start;color:var(--control-accent);font-size:var(--panel-caption-size);font-weight:var(--person-name-weight);line-height:1.5}
.pro-feature-copy>h2{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--compact-gap);margin:0;color:var(--ink);font-family:var(--panel-heading-font);font-size:var(--panel-subsection-title-size);font-weight:var(--person-name-weight);line-height:1.4}
.pro-feature-copy>.form-note{margin:0;font-size:var(--form-note-size);line-height:var(--form-note-leading);font-weight:400;color:var(--muted)}
.plan-access-action{min-width:0;justify-self:end}
.plan-access-action>.text-button{color:var(--control-accent);justify-content:flex-start}
.plan-access-action>.button{white-space:nowrap;justify-content:center}
.plan-access-card>[data-access-logout],.plan-access-close{grid-column:1/-1;justify-self:end}
.plan-access-close{color:var(--muted)}
.plan-access-dialog-content .plan-access-card,.access-blocked-message{grid-template-columns:minmax(0,1fr)}
.plan-access-dialog-content .plan-access-action,.access-blocked-message .plan-access-action{justify-self:stretch}
.plan-access-dialog-content .plan-access-action>.button,.access-blocked-message .plan-access-action>.button{width:100%}
.pro-feature-gate,.location-direct-card{container-type:inline-size}
@container(max-width:600px){
 .pro-feature-overlay.plan-access-card{grid-template-columns:minmax(0,1fr)}
 .plan-access-action{justify-self:start;margin-inline-start:calc(var(--control-height) + var(--surface-gap))}
}
@media(max-width:650px){
 .pro-feature-overlay.plan-access-card{grid-template-columns:minmax(0,1fr)}
 .plan-access-action{justify-self:start;margin-inline-start:calc(var(--control-height) + var(--surface-gap))}
 .plan-access-action>.button{white-space:normal}
}

.settings-appearance { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; width:100%; }
:root { --settings-title-size:20px; }
@media(max-width:650px) { :root { --settings-title-size:18px; } }
.settings-section-heading h2 { margin:0; font-size:var(--settings-title-size); line-height:1.3; font-weight:550; }
.settings-section-heading p { margin:var(--settings-caption-space) 0 0; font-size:13px; line-height:1.5; color:var(--muted); }
.settings-theme-options { display:flex; flex-wrap:wrap; gap:var(--compact-gap); width:fit-content; max-width:100%; }
.settings-theme-option { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:var(--compact-gap); min-width:0; min-height:var(--control-height); padding:0 var(--surface-inset); border:1px solid transparent; border-radius:var(--compact-corner); corner-shape:var(--surface-curve); background:var(--surface-subtle); color:var(--muted); text-align:center; font-size:14px; }
.settings-theme-option > .icon { width:20px; height:20px; }
.settings-theme-option > span:not(.settings-option-check) { min-width:0; }
html[data-theme] .settings-theme-option:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); color:var(--ink); }
html[data-theme] .settings-theme-option[aria-pressed='true'] { background:var(--surface); color:var(--ink); border-color:var(--control-border); }
.settings-appearance-options { width:fit-content; }
.settings-control-row { display:flex; align-items:center; justify-content:space-between; gap:var(--surface-gap); width:100%; }
.settings-control-copy { min-width:0; display:grid; gap:var(--compact-gap); }
.settings-control-copy > strong { font-size:var(--person-name-size); font-weight:var(--person-name-weight); line-height:var(--person-name-line-height); }
.settings-switch.trainee-toggle { display:inline-flex; flex:0 0 auto; justify-content:center; width:var(--control-height); min-height:var(--control-height); padding:0; margin:0; border:0; border-radius:0; background:transparent; gap:0; }
.settings-switch:has(input:disabled) { opacity:.5; cursor:default; }
.settings-push-notice { display:flex; align-items:flex-start; gap:var(--identity-gap); width:100%; padding:var(--surface-inset); border:1px solid color-mix(in srgb,var(--action) 22%,var(--surface)); border-radius:var(--compact-corner); corner-shape:var(--surface-curve); background:color-mix(in srgb,var(--action) 8%,var(--surface)); }
.settings-push-notice[hidden] { display:none; }
.settings-push-notice > .icon { flex:0 0 20px; width:20px; height:20px; color:var(--action); }
.settings-push-notice > div { min-width:0; }
.settings-push-notice strong { display:block; font-size:13px; line-height:1.6; font-weight:550; color:var(--action); }
.settings-notification-categories { display:grid; gap:var(--surface-gap); width:100%; padding-top:var(--surface-gap); border-top:1px solid var(--line); }
.settings-notification-categories > .settings-control-row + .settings-control-row { padding-top:var(--surface-gap); border-top:1px solid var(--line); }
.settings-notifications:has(> [data-push-settings-note]:not([hidden])) :is(.settings-notification-categories,.settings-reminder-block) .settings-control-copy,
.settings-notifications:has(> [data-push-settings-note]:not([hidden])) .settings-notification-categories > .settings-note { opacity:.5; }
@media(max-width:650px) {
 .settings-page .settings-notifications:has(> [data-push-settings-note]:not([hidden])) :is(.settings-notification-categories,.settings-reminder-block) .settings-control-copy,
 .settings-page .settings-notifications:has(> [data-push-settings-note]:not([hidden])) .settings-notification-categories > .settings-note { opacity:1; color:var(--muted); }
}
.settings-reminder-block { width:100%; padding-top:var(--surface-gap); border-top:1px solid var(--line); }
.settings-reminder-time { display:grid; gap:var(--compact-gap); margin-top:var(--compact-gap); }
.settings-reminder-time[hidden] { display:none; }
.settings-reminder-time > label { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,220px); align-items:center; gap:var(--compact-gap); font-size:var(--person-title-size); color:var(--muted); }
.settings-reminder-time .custom-select { width:100%; }
@media(max-width:1100px) { .settings-reminder-time > label { grid-template-columns:minmax(0,1fr); } }
.settings-tools { grid-column:1 / -1; width:100%; gap:0; }
.settings-tool-row { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:center; gap:var(--surface-gap); width:100%; padding:var(--compact-gap) 0; }
.settings-tool-row + .settings-tool-row { border-top:1px solid var(--line); margin-top:var(--compact-gap); padding-top:var(--surface-gap); }
.settings-tool-row > .icon { width:20px; height:20px; color:var(--muted); }
html[data-theme] .settings-tool-row > .icon-button { color:var(--ink); background:transparent; border:1px solid transparent; box-shadow:none; }
html[data-theme] .settings-tool-row > .icon-button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background:transparent; border-color:var(--control-border); }
.settings-note,.settings-push-status { font-size:13px; line-height:1.6; color:var(--muted); margin:0; }
.settings-card > .button { margin-top:auto; font-size:14px; justify-content:center; padding:0 16px; gap:8px; }
.settings-card > .button > .icon { width:18px; height:18px; }
@media(max-width:650px) {
 .settings-page h1 { font-size:24px; }
 .settings-documents .settings-legal-links { display:grid; grid-template-columns:minmax(0,1fr); width:100%; gap:0; }
 .settings-grid { grid-template-columns:minmax(0,1fr); }
 .settings-card { border-radius:20px; }
 .settings-card > .button { width:100%; }
 .settings-appearance { grid-template-columns:minmax(0,1fr); }
 .settings-appearance-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
 .settings-theme-option { flex-direction:column; min-width:0; min-height:calc(var(--control-height) + var(--compact-gap) * 2); padding:var(--compact-gap); gap:4px; }
}

/* Compact passive day headers keep the current-day column continuous. */
.planner-day-header .planner-day-context { gap:2px; text-align:left; }
html[data-theme] .planner-day-context > .planner-day-weekday { font-size:13px; line-height:1.2; }
html[data-theme] .planner-day-context > .planner-day-count { display:block; margin:0; font-size:12px; font-weight:400; line-height:1.2; white-space:nowrap; color:var(--muted); }
.planner-corner { padding:var(--surface-inset); gap:4px; }
.planner-corner > span { font-size:13px; line-height:1.2; }
.planner-corner > small,.planner-corner b { font-size:12px; line-height:1.2; }

/* Standard panels always use the card surface, including a manager's own totals. */
html[data-theme='dark'] .panel { background:var(--surface); }
html[data-theme] .manager-statistics { padding:0 0 var(--compact-gap); }
.manager-statistics > .manager-section-heading { padding:var(--surface-inset); margin:0; }
.manager-statistics .statistics-table-scroll { padding:0 var(--surface-inset); }
@media(prefers-reduced-motion:no-preference) {
 .location-stat-reveal { transition:grid-template-rows 220ms cubic-bezier(.2,.7,.2,1),opacity 180ms ease; }
}

/* Mobile statistics use separated cards in both themes, without row separators. */
@media(max-width:650px) {
 html[data-theme] .statistics-table .statistics-person-row { padding:var(--surface-inset); background:var(--surface-subtle); border:0; box-shadow:none; margin-bottom:0; }
 html[data-theme] .statistics-table .statistics-person-row + .statistics-person-row { margin-top:var(--surface-gap); }
 html[data-theme] .statistics-table .statistics-person-row + .statistics-person-row::before { display:none; content:none; }
 html[data-theme] .statistics-table .statistics-person-row > td { border:0; }
 html[data-theme] .statistics-table .statistics-person-row > td:first-child { background:transparent; }
 html[data-theme] .statistics-table .statistics-person-row > td[data-label] { background:var(--surface); }
}

/* Phone list rows are individual cards, matching the statistics card pattern. */
@media(max-width:650px) {
 html[data-theme] .team-list.panel { padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; }
 html[data-theme] .team-list-row { padding:var(--surface-inset); background:var(--surface); border:0; border-radius:20px; }
 html[data-theme] .team-list-row + .team-list-row { margin-top:var(--surface-gap); border-top:0; }
 .team-list-period .team-list-metrics { padding:12px; border-radius:12px; background:var(--surface-subtle); }
}

/* Keep a shift's date and time together; tablet rows have two clear levels. */
.staff-list-next .staff-card-next-line { flex-direction:row; align-items:baseline; gap:4px var(--compact-gap); }
@media(min-width:651px) and (max-width:1100px) {
 .team-list-row { grid-template-columns:minmax(0,1fr) minmax(150px,.8fr) 40px; }
 .team-list-row > .team-list-person { grid-column:1; grid-row:1; }
 .team-list-row .staff-list-next { grid-column:2; grid-row:1; }
 .team-list-row .directory-menu { grid-column:3; grid-row:1; }
 .team-list-row .team-list-period { grid-column:1/-1; grid-row:2; }
 .staff-list-next .staff-card-next-line > span { font-size:14px; }
}

/* Selected employee cards have a quiet border that follows the shared curve. */
html[data-theme] body .mini-team-grid > .mini-person { border:1px solid transparent; }
html[data-theme] body .mini-team-grid > .mini-person.selected,
html[data-theme] body .mini-team-grid > .mini-person.selected:hover:where(:not(html[data-hover-disabled] *)) {
 border-color:var(--ink);
 box-shadow:none;
}

/* Team identities never break a surname into isolated letters. */
.mini-person-name > strong,.mini-person-name > .mini-surname {
 display:block; max-width:100%; white-space:nowrap; overflow:hidden;
 text-overflow:ellipsis; overflow-wrap:normal; word-break:normal;
}
.mini-person-name .staff-position { overflow-wrap:normal; word-break:normal; hyphens:none; line-height:1.4; }
@media(min-width:651px) {
 .mini-team-grid > .mini-person { flex-basis:calc((100% - 54px) / 4); min-width:300px; padding:var(--surface-inset); }
 .mini-person-top { flex-direction:row; flex-wrap:nowrap; align-items:flex-start; gap:var(--identity-gap); }
 .mini-person-name { flex:1; order:0; width:auto; min-width:0; }
 .mini-person .avatar { width:44px; height:44px; flex:0 0 44px; }
}
@media(max-width:650px) {
 .mini-team-grid > .mini-person { min-width:170px; }
}

/* List details use the same disclosure on phone, tablet and desktop. */
.team-list-row { grid-template-columns:minmax(0,1fr) 40px; align-items:center; }
.team-list-row > .team-list-person { grid-column:1; grid-row:1; }
.team-list-toggle { display:flex; align-items:center; justify-content:center; grid-column:2; grid-row:1; align-self:center; width:40px; height:40px; padding:0; border:0; background:transparent; color:var(--muted); border-radius:50%; }
.team-list-toggle > .icon { width:18px; height:18px; transition:transform 220ms ease; }
.team-list-toggle[aria-expanded='true'] > .icon { transform:rotate(90deg); }
.team-list-toggle:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); color:var(--ink); }
.team-list-reveal { display:grid; grid-column:1/-1; grid-row:2; grid-template-rows:0fr; visibility:hidden; transition:grid-template-rows 220ms cubic-bezier(.2,.7,.2,1),visibility 220ms; }
.team-list-row.is-expanded .team-list-reveal { grid-template-rows:1fr; visibility:visible; }
.team-list-reveal-inner { display:grid; min-height:0; overflow:hidden; grid-template-columns:minmax(0,1fr) 40px; gap:0 var(--identity-gap); }
.team-list-row.is-revealed .team-list-reveal-inner { overflow:visible; }
.team-list-row .staff-list-next { grid-column:1; grid-row:1; padding-top:var(--surface-gap); }
.team-list-row .staff-list-next .staff-card-next-line { min-height:40px; align-items:center; flex-wrap:nowrap; gap:var(--compact-gap); }
.team-list-row .staff-list-next .staff-card-next-line > strong { flex:1; min-width:0; }
.team-list-row .staff-list-next .staff-card-next-line > span { white-space:nowrap; font-size:14px; }
.team-list-row .directory-menu { grid-column:2; grid-row:1; align-self:end; margin:0; }
.team-list-row .directory-menu-trigger { width:40px; height:40px; min-height:40px; padding:0; display:flex; align-items:center; justify-content:center; }
.team-list-row .team-list-period { grid-column:1/-1; grid-row:2; margin-top:var(--surface-gap); }
@media(min-width:651px) {
 html[data-theme] .team-list.panel { display:grid; gap:var(--compact-gap); padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; }
 html[data-theme] .team-list-row { padding:var(--surface-inset); background:var(--surface); border:0; border-radius:20px; gap:0 var(--identity-gap); }
 html[data-theme] .team-list-row + .team-list-row { margin:0; border:0; }
 .team-list-reveal-inner { grid-template-columns:minmax(0,1fr) 40px; gap:0 var(--identity-gap); }
 .team-list-row .staff-list-next { align-self:center; margin-top:var(--identity-gap); padding:0; border-radius:0; background:transparent; }
 .team-list-row .staff-list-next .staff-card-next-line { justify-content:flex-start; flex-wrap:wrap; gap:var(--identity-gap); }
 .team-list-row .staff-list-next .staff-card-next-line > strong { flex:0 1 auto; }
 .team-list-row .team-list-period { grid-column:1/-1; grid-row:2; margin-top:var(--identity-gap); min-width:0; }
 .team-list-row .team-list-metrics { padding:12px; border-radius:14px; background:var(--surface-subtle); }
 .team-list-row .directory-menu { grid-column:2; grid-row:1; align-self:center; margin-top:var(--identity-gap); }
}
@media(max-width:650px) {
 html[data-theme] .team-list.panel { padding-inline:var(--surface-inset); background:var(--surface); border-radius:20px; }
 html[data-theme] .team-list-row { padding:var(--surface-inset) 0; border-radius:0; background:transparent; gap:0 var(--identity-gap); }
 html[data-theme] .team-list-row + .team-list-row { margin-top:0; border-top:1px solid var(--line); }
 .team-list-row .staff-list-next:has(.staff-card-next-line > span) { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 var(--compact-gap); }
 .team-list-row .staff-list-next:has(.staff-card-next-line > span) .staff-card-next-line { display:contents; }
 .team-list-row .staff-list-next:has(.staff-card-next-line > span) .staff-card-next-line > strong { grid-column:1; grid-row:1; align-self:center; min-height:40px; display:flex; align-items:center; }
 .team-list-row .staff-list-next .staff-card-next-line > span { grid-column:2; grid-row:1; align-self:center; }
 .team-list-row .staff-list-next:has(.staff-card-next-line > span) .staff-card-next-label { grid-column:2; grid-row:2; justify-self:end; margin:0; font-size:11px; line-height:1.4; }
 .team-list-row .staff-list-next:has(.staff-card-next-line > span) ~ .directory-menu { align-self:start; margin-top:var(--surface-gap); }
}
@media(prefers-reduced-motion:reduce) {
 .team-list-reveal,.team-list-toggle > .icon { transition:none; }
}

/* Context belongs to the page heading; a person's status belongs to identity. */
.team-list-person .mini-person-status { display:flex; align-items:center; gap:6px; margin-top:5px; padding:0; background:transparent; color:var(--muted); font-size:12px; line-height:1.4; }
.team-list-person .mini-person-status > .icon { width:14px; height:14px; }
html[data-theme] .team-list-row .staff-list-next .staff-card-next-label { display:none; }

/* A list is one surface on every device, with inset separators. */
html[data-theme] .team-list.panel { display:grid; gap:var(--compact-gap); padding:var(--surface-inset); background:var(--surface); border:0; border-radius:24px; box-shadow:none; }
html[data-theme] .team-list-row { padding:var(--surface-inset); background:var(--surface-subtle); border:0; border-radius:16px; margin:0; }
html[data-theme] .team-list-row + .team-list-row { margin:0; border:0; }
html[data-theme] .team-list-row .team-list-metrics { background:var(--surface); }

.undo-toast-stack { position:fixed; z-index:100; bottom:26px; left:50%; transform:translateX(-50%); display:grid; gap:8px; width:max-content; max-width:calc(100vw - 24px); }
.undo-toast { display:flex; align-items:center; gap:10px; padding:6px 12px; border-radius:16px; background:#212121; color:#f2f2f2; box-shadow:0 8px 28px #0003; font-size:13px; }
.undo-toast button { min-height:40px; padding:0 8px; border:0; border-radius:8px; background:transparent; color:#fff; font:inherit; font-weight:600; cursor:pointer; }
.undo-toast button:hover:where(:not(html[data-hover-disabled] *)) { background:#303030; }
.undo-toast button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.undo-clock { position:relative; display:grid; place-items:center; width:28px; height:28px; flex:none; font-size:11px; font-variant-numeric:tabular-nums; }
.undo-clock svg { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); }
.undo-clock circle { fill:none; stroke:var(--accent); stroke-width:2; }
@media(max-width:650px){ .undo-toast-stack { bottom:calc(var(--mobile-nav-bottom,14px) + 76px + var(--surface-gap)); } }

/* The director's directory follows the same nested-list surface pattern. */
html[data-theme] .directory-page .directory-list { padding:var(--surface-inset); background:var(--surface); }
html[data-theme] .directory-page .directory-table { border-collapse:separate; border-spacing:0 var(--compact-gap); }
html[data-theme] .directory-page .directory-table tbody td { border:0; background:var(--surface-subtle); padding:var(--surface-inset); }
html[data-theme] .directory-page .directory-table tbody td:first-child { border-radius:16px 0 0 16px; }
html[data-theme] .directory-page .directory-table tbody td:last-child { border-radius:0 16px 16px 0; }
@media(max-width:1100px){
 html[data-theme] .directory-page .directory-table tbody { display:grid; gap:var(--compact-gap); }
 html[data-theme] .directory-page .directory-table tbody tr { border:0; border-radius:16px; background:var(--surface-subtle); padding:var(--surface-inset); }
 html[data-theme] .directory-page .directory-table tbody td { background:transparent; padding:0; border-radius:0; }
}
@media(max-width:650px){
 .directory-page .directory-table tbody tr{--directory-text-inset:calc(40px + 12px)}
 .directory-page .directory-table tbody tr:has(.person>input.staff-select){--directory-text-inset:calc(16px + 12px + 40px + 12px)}
 html[data-theme] .directory-page .directory-table tbody td:nth-child(2),html[data-theme] .directory-page .directory-table tbody .directory-permission,html[data-theme] .directory-page .directory-table tbody .directory-location-cell { padding-left:var(--directory-text-inset); }
}

/* Desktop/tablet use one navigation rail and a contextual page heading. */
:root { --location-title-size:18px; --location-title-weight:500; --context-title-size:var(--location-title-size); --context-caption-size:12px; }
@media(max-width:650px) { :root { --location-title-size:16px; } }
:root { --page-title-weight:650; --section-title-weight:600; }
html[data-theme] .workspace h1 { font-weight:var(--page-title-weight); }
html[data-theme] .workspace h2,
html[data-theme] .calendar-filter-label { font-weight:var(--section-title-weight); }
html[data-theme] :is(.heading-count,.directory-total,.pill,.mini-team-heading h2 > span) { font-weight:550; }
.settings-positions { grid-column:1/-1; }
.position-settings-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:var(--surface-gap); width:100%; }
.position-settings-heading h2 { display:flex; align-items:center; gap:var(--identity-gap); }
.position-settings-heading > .icon-button { flex:0 0 40px; }
.position-settings-list,.position-archive { width:100%; min-width:0; }
.position-settings-list,.position-archive > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--compact-gap); }
@media(min-width:1280px) {
 .position-settings-list,.position-archive > div { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.position-settings-row { display:flex; align-items:center; justify-content:space-between; gap:var(--identity-gap); min-width:0; padding:12px; border:0; border-radius:14px; background:var(--surface-subtle); }
.position-settings-row + .position-settings-row { border-top:0; }
.position-settings-row > div:first-child { display:grid; gap:4px; min-width:0; }
.position-settings-row strong { color:var(--ink); font-size:14px; font-weight:550; overflow-wrap:anywhere; }
.position-settings-row small { color:var(--muted); font-size:12px; line-height:1.4; }
.position-settings-actions { display:flex; gap:4px; flex-shrink:0; }
html[data-theme] .position-settings-actions .icon-button { width:32px; height:32px; min-width:32px; min-height:32px; padding:0; border:0; background:transparent; box-shadow:none; }
html[data-theme] .position-settings-actions .icon-button:not(:disabled):hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); color:var(--ink); }
html[data-theme] .position-settings-actions .icon-button:not(:disabled):active { background:var(--surface); transform:scale(.94); }
html[data-theme] .position-settings-actions .icon-button.danger { color:var(--danger); }
html[data-theme] .position-settings-actions .icon-button.danger:not(:disabled):hover:where(:not(html[data-hover-disabled] *)) { color:var(--danger); background:var(--danger-soft); }
html[data-theme] .position-settings-actions .icon-button:disabled { opacity:.35; cursor:not-allowed; }
.position-settings-actions .icon-button > .icon { width:16px; height:16px; }
html[data-theme] .position-settings-heading > .icon-button { display:grid; place-items:center; flex:0 0 40px; aspect-ratio:1; width:40px; min-width:40px; max-width:40px; height:40px; min-height:40px; max-height:40px; border:0; border-radius:50%; corner-shape:round; background:var(--surface-subtle); padding:0; transition:color 150ms ease,box-shadow 150ms ease,transform 150ms ease; }
html[data-theme] .position-settings-heading > .icon-button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); box-shadow:inset 0 0 0 1px var(--control-border); }
html[data-theme] .position-settings-heading > .icon-button:active { color:var(--ink); transform:scale(.94); box-shadow:inset 0 0 0 1px var(--muted); }
.position-settings-heading .heading-count,.report-section-heading .heading-count { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 8px; border-radius:10px; background:var(--surface-subtle); color:var(--muted); font-size:13px; font-weight:550; letter-spacing:0; }
.position-settings-heading > .icon-button > .icon { width:18px; height:18px; }
@media(max-width:650px) {
 .position-settings-list,.position-archive > div { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .position-settings-actions .icon-button { width:40px; height:40px; min-width:40px; min-height:40px; }
}
.position-archive > summary { display:flex; align-items:center; justify-content:space-between; gap:var(--identity-gap); padding:12px 0; cursor:pointer; list-style:none; font-size:14px; color:var(--muted); }
.position-archive > summary::-webkit-details-marker { display:none; }
.position-archive > summary .icon { width:16px; height:16px; }
.position-archive[open] > summary .icon { transform:rotate(90deg); }
.position-archive-description>span { display:grid; gap:var(--compact-gap); }
.position-archive-description>span>strong { font-size:var(--person-name-size); font-weight:var(--person-name-weight); line-height:var(--person-name-line-height); color:var(--ink); }
.position-archive-description>span>span { color:var(--muted); }
@media(min-width:651px) and (max-width:1000px) {
 .directory-page #directory-search { grid-column:auto; }
}
@media(max-width:650px) {
 .directory-page .directory-filters { grid-template-columns:minmax(0,1fr); }
}

/* One typography scale for editable fields and their dropdown choices. */
:root { --control-font-size:14px; --control-font-weight:500; --select-font-size:var(--segment-font-size,13px); }
html[data-theme] :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']),textarea,select,.custom-select-trigger,.custom-select-option,.date-trigger) {
 font-family:Inter,sans-serif;
 font-size:var(--control-text-size,var(--control-font-size)) !important;
 font-weight:var(--control-font-weight) !important;
 line-height:1.4;
 letter-spacing:0;
}
html[data-theme] :is(select,.custom-select-trigger,.custom-select-option) { --control-text-size:var(--select-font-size); }
@media(min-width:651px) {
 body.panel-typography { --search-font-size:var(--select-font-size); }
 html[data-theme] body.panel-typography input[type='search'] { --control-text-size:var(--search-font-size); }
}
.date-trigger .date-range-value { font-size:inherit; font-weight:inherit; }
@media(max-width:650px) {
 :root { --control-font-size:16px; }
 /* Selection controls share one visual scale, including native mobile hour lists. */
 html[data-theme] :is(select,.custom-select-trigger,.custom-select-option,.date-trigger) {
  --control-text-size:var(--select-font-size);
 }
 html[data-theme] :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']),textarea,select,.custom-select-trigger,.custom-select-option,.date-trigger) {
  --control-font-weight:400;
  font-variant-numeric:lining-nums tabular-nums;
 }
 html[data-theme] form label { font-size:14px; line-height:1.4; }
 html[data-theme] :is(input,textarea)::placeholder { font-size:14px; font-weight:400; }
}

.organization-context-heading{display:flex;align-items:center;gap:var(--compact-gap);min-width:0;max-width:100%}
.desktop-context { display:none; }
@media(min-width:651px) {
 .topbar .topbar-panel { grid-template-columns:minmax(0,1fr) auto; min-height:96px; gap:var(--surface-gap); padding:var(--surface-inset) 0; }
 .topbar .header-brand,.topbar .header-nav { display:none; }
 .desktop-context { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
 .desktop-context-title { display:block; max-width:100%; overflow-wrap:anywhere; margin:0; font-size:var(--context-title-size); font-weight:550; line-height:1.35; letter-spacing:-.2px; color:var(--ink); }
 .desktop-context p { margin:0; font-size:var(--context-caption-size); line-height:1.4; color:var(--muted); overflow-wrap:anywhere; }
 .desktop-context .heading-count { font-size:13px; line-height:1; }
 .desktop-context-location { display:flex; align-items:center; min-width:0; width:fit-content; max-width:100%; margin:0; }
 .desktop-context-location { gap:var(--compact-gap); }
 html[data-theme] .desktop-context-location .context-location-trigger { display:inline-flex; align-items:center; gap:var(--compact-gap); min-width:0; max-width:100%; min-height:0; height:auto; margin:0; padding:0; border:0; background:transparent; color:var(--ink); text-decoration:none; box-shadow:none; }
 html[data-theme] .desktop-context-location .context-location-trigger:hover:where(:not(html[data-hover-disabled] *)) {  text-decoration:none; }

 html[data-theme] .desktop-context-location .context-location-change { display:inline-flex; align-items:center; justify-content:center; flex:0 0 16px; width:16px; min-width:16px; height:16px; min-height:16px; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:var(--muted); box-shadow:none; }
 html[data-theme] .desktop-context-location .context-location-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) .context-location-change { color:var(--ink);  }
 .context-location-change > .icon { width:16px; height:16px; transform:rotate(90deg); }

 .topbar-actions { grid-column:2; grid-row:1; align-self:center; }
 .workspace { padding-top:var(--heading-space); }
 .workspace > .workspace-location { display:none; }
 .director-calendar-heading .director-calendar-controls { display:none; }
}

/* Tablet statistics use an explicit full-width toolbar below the heading. */
@media(min-width:651px) and (max-width:1399px) {
 .statistics-page:not(.employee-statistics-page) { display:block; }
 .statistics-page:not(.employee-statistics-page) > .statistics-heading { margin-bottom:var(--surface-gap); }
 .statistics-page:not(.employee-statistics-page) > .statistics-controls,
 .statistics-page:not(.employee-statistics-page) > .statistics-overview > .statistics-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--surface-gap); margin-bottom:var(--section-space); }
 .statistics-controls > .statistics-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
 .statistics-controls > .statistics-period { width:100%; margin-left:0; justify-content:space-between; flex-wrap:nowrap; }
 .statistics-controls .statistics-range { height:48px; padding:4px; box-sizing:border-box; flex-shrink:0; }
 .statistics-controls .statistics-range > button { min-height:40px; height:40px; padding-block:0; }
 .statistics-controls .period { min-width:0; }
}

/* Job confirmations use the same section rhythm as other forms. */
:is(#archive-position-form,#delete-position-form) { display:grid; gap:var(--form-gap); margin-top:var(--form-section-gap); }
:is(#archive-position-form,#delete-position-form) .form-error,
:is(#archive-position-form,#delete-position-form) .modal-actions { margin:0; }
#position-form { display:grid; gap:var(--form-gap); }
#position-form label,#position-form .form-error,#position-form .modal-actions { margin:0; }
#employment-form .access-role-field { padding-top:var(--form-gap); border-top:1px solid var(--line); }
#employment-form .access-role-field .field-hint { color:var(--muted); font-size:13px; font-weight:400; }
.manager-creation-role>div { display:grid; gap:4px; min-width:0; }
.manager-creation-role strong { color:var(--ink); font-size:var(--panel-body-size); font-weight:550; }
.manager-creation-role span { color:var(--muted); font-size:var(--form-note-size); line-height:1.6; }
.directory-permission-label { display:none; }
.shift-next-day { font-size:.65em; line-height:1; margin-left:3px; font-weight:500; color:var(--muted); white-space:nowrap; }
.planner-night-note { font-size:12px; color:var(--muted); }
@media(min-width:1101px) {
 .directory-page .directory-table th:first-child { width:32%; }
 .directory-page .directory-table th:nth-child(2) { width:23%; }
 .directory-page .directory-table th:nth-child(3) { width:21%; }
 .directory-page .directory-table th:nth-child(4) { width:auto; }
 .directory-page .directory-table th:last-child { width:64px; }
}
@media(min-width:651px) and (max-width:1100px) {
 .directory-page .directory-table td:first-child { grid-row:1/4; }
 .directory-page .directory-table .directory-permission { grid-column:2; grid-row:2; }
 .directory-page .directory-table .directory-location-cell { grid-column:2; grid-row:3; font-size:13px; }
 .directory-page .directory-table td:last-child { grid-row:1/4; }
 .directory-permission-label { display:inline; }
}

.locations-page .location-cards { grid-template-columns:minmax(0,1fr); gap:var(--surface-gap); }
@media(min-width:760px){ .locations-page .location-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(min-width:1280px){ .locations-page .location-cards { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:650px) {
 .directory-page .directory-table .directory-permission { grid-column:1; grid-row:3; font-size:13px; }
 .directory-page .directory-table .directory-location-cell { grid-column:1; grid-row:4; font-size:13px; }
 .directory-page .directory-table td:last-child { grid-row:1/5; }
 .directory-permission-label { display:inline; }
}

/* Page rhythm belongs to the layout, not to the individual metric variant. */
.statistics-page:not(.employee-statistics-page) { display:grid; row-gap:var(--section-space); }
.statistics-page:not(.employee-statistics-page) > :is(.statistics-heading,.statistics-controls,.team-summary-grid,.panel) { margin-block:0; }
@media(max-width:1399px) {
 .statistics-page:not(.employee-statistics-page) { grid-template-columns:minmax(0,1fr); align-items:stretch; }
}

.period-comparison,.team-workload { padding:var(--surface-inset); min-width:0; }
.report-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--surface-gap); margin-bottom:var(--surface-gap); }
.report-section-heading h2 { display:flex; align-items:center; flex-wrap:wrap; gap:var(--identity-gap); margin:0; font-size:22px; line-height:1.3; font-weight:var(--section-title-weight); }
.report-section-heading p { margin-top:6px; font-size:13px; line-height:1.5; color:var(--muted); }
.report-period-state { display:inline-flex; align-items:center; gap:6px; flex-shrink:0; font-size:12px; color:var(--muted); padding:0; background:transparent; }
.report-period-state::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--status-positive); }
.report-section-heading .comparison-range { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; }
.comparison-range > strong { color:var(--ink); font-size:13px; font-weight:500; }
.comparison-range > span { color:var(--muted); font-size:12px; }
.comparison-rows { display:grid; }
.comparison-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,.4fr) minmax(170px,.5fr); align-items:center; gap:var(--surface-gap); padding:16px 0; min-width:0; }
.comparison-row + .comparison-row { border-top:1px solid var(--line); }
.comparison-row-label { display:grid; gap:5px; min-width:0; }
.comparison-row-label > span { display:flex; align-items:center; gap:8px; color:var(--ink); font-size:14px; font-weight:500; line-height:1.4; }
.comparison-row-label .icon { width:17px; height:17px; flex:none; color:var(--muted); }
.comparison-row-label > small { padding-left:25px; font-size:12px; line-height:1.4; color:var(--muted); }
.comparison-result { justify-self:end; font-size:26px; font-weight:550; line-height:1.3; font-variant-numeric:tabular-nums; white-space:nowrap; }
.comparison-result small,.workload-total small { font-size:13px; font-weight:400; color:var(--muted); }
.comparison-difference { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin:0; color:var(--muted); font-size:13px; line-height:1.5; font-variant-numeric:tabular-nums; text-align:right; }
.comparison-difference > .icon { width:16px; height:16px; flex:none; }
.comparison-difference.has-change { color:var(--accent); }
.period-comparison > .report-footnote { margin-top:8px; }
.report-footnote { margin-top:var(--surface-gap); color:var(--muted); font-size:12px; line-height:1.6; }
.workload-list { display:grid; gap:var(--compact-gap); }
.workload-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px var(--surface-gap); min-width:0; padding:var(--surface-inset); background:var(--surface-subtle); border-radius:16px; }
.workload-identity { display:flex; align-items:flex-start; gap:var(--identity-gap); min-width:0; }
.workload-identity > .avatar { width:36px; height:36px; flex:0 0 36px; }
.workload-identity > div { display:grid; gap:4px; min-width:0; }
.workload-identity strong { font-size:14px; font-weight:var(--person-name-weight); line-height:1.4; overflow-wrap:anywhere; }
.workload-identity span { color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.workload-total { font-size:20px; font-weight:550; font-variant-numeric:tabular-nums; white-space:nowrap; }
.workload-hours { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px 16px; color:var(--muted); font-size:12px; }
.workload-bar { grid-column:1/-1; display:block; width:100%; height:6px; border-radius:3px; overflow:hidden; }
.workload-track { fill:var(--surface); }
.workload-actual { fill:var(--accent); }
.workload-planned { fill:var(--muted); opacity:.4; }
.workload-more { margin-top:var(--compact-gap); }
.workload-more > summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; padding:8px; cursor:pointer; color:var(--muted); font-size:13px; list-style:none; }
.workload-more > summary::-webkit-details-marker { display:none; }
.workload-more > summary .icon { width:16px; height:16px; transition:transform 220ms ease; }
.workload-more[open] > summary .icon { transform:rotate(90deg); }
.workload-more > summary:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
html[data-theme] details:is(.workload-more,.employee-history,.location-now-more,.inactive-admins,.position-archive) > summary {
 -webkit-tap-highlight-color:transparent;
}
html[data-theme] details.workload-more > summary:is(:hover:where(:not(html[data-hover-disabled] *)),:focus,:active) { background:transparent; box-shadow:none; }
@media(max-width:650px){
 .report-section-heading { flex-wrap:wrap; gap:8px; }
 .report-section-heading h2 { font-size:20px; }
 .comparison-row { grid-template-columns:minmax(0,1fr) auto; gap:8px var(--surface-gap); padding:12px 0; }
 .comparison-result { grid-column:2; grid-row:1; font-size:24px; }
 .comparison-difference { grid-column:1/-1; grid-row:2; font-size:12px; padding-left:25px; }

}

html[data-theme] .statistics-person-open { padding:0; min-height:0; border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; box-shadow:none; }
.statistics-person-open strong > .icon { width:14px; height:14px; margin-left:6px; color:var(--muted); vertical-align:middle; }
html[data-theme] .statistics-person-open:hover:where(:not(html[data-hover-disabled] *)) { background:transparent; }
.statistics-person-open:hover:where(:not(html[data-hover-disabled] *)) strong > .icon { color:var(--ink); }
.statistics-person-open:focus-visible { outline:1px solid var(--muted); outline-offset:4px; }
html[data-theme] #modal.statistics-profile-dialog { width:660px; max-width:calc(100vw - 32px); }
.person-report { display:grid; gap:var(--surface-gap); }
.person-report-identity { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.person-report-identity > .avatar { width:56px; height:56px; flex:0 0 56px; }
.person-report-identity > div { display:grid; gap:4px; min-width:0; }
.person-report-identity h3 { margin:0; font-size:20px; line-height:1.35; font-weight:var(--person-name-weight); overflow-wrap:anywhere; }
.person-report-identity span { font-size:14px; color:var(--muted); line-height:1.5; }
.person-report-identity small,.person-report-period { font-size:12px; color:var(--muted); line-height:1.5; }
.person-report-period { margin:0; }
.person-report-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:14px; border-radius:16px; background:var(--surface-subtle); gap:12px; margin:0; }
.person-report-totals > div { min-width:0; }
.person-report-totals > div + div { border-left:1px solid var(--line); padding-left:12px; }
.person-report-totals dt { font-size:12px; color:var(--muted); white-space:nowrap; }
.person-report-totals dd { margin:8px 0 0; font-size:24px; font-weight:550; line-height:1.2; white-space:nowrap; font-variant-numeric:tabular-nums; }
.person-report-totals small { font-size:12px; font-weight:400; color:var(--muted); }
.person-report-status { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:12px; color:var(--muted); }
.person-report-status strong { color:var(--ink); font-weight:550; }
.person-report-graph-section,.person-report-comparison { padding:14px; background:var(--surface-subtle); border-radius:16px; min-width:0; }
.person-report-chart-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.person-report-chart-heading h3,.person-report-shifts h3 { margin:0; font-size:15px; font-weight:550; }
.person-report-chart-heading > span { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); }
.person-report-chart-heading i { width:6px; height:6px; border-radius:2px; background:var(--control-accent); }
.person-report-chart-heading i.is-planned { background:var(--muted); opacity:.4; margin-left:6px; }
.person-report-chart-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
.person-report-chart { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(44px,1fr); gap:6px; padding-bottom:4px; }
.person-report-chart.is-week { grid-auto-columns:minmax(0,1fr); }
.person-report-column { display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0; text-align:center; }
.person-report-column > strong { font-size:12px; line-height:1.4; font-weight:550; font-variant-numeric:tabular-nums; white-space:nowrap; }
.person-report-column small { font-size:10px; font-weight:400; color:var(--muted); }
.person-report-column svg { display:block; height:96px; width:100%; }
.person-report-column > span { font-size:10px; line-height:1.4; color:var(--muted); }
.person-report-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.person-report-comparison > div { display:grid; align-content:start; gap:6px; min-width:0; }
.person-report-comparison span,.person-report-comparison small { font-size:12px; line-height:1.5; color:var(--muted); }
.person-report-comparison strong { font-size:18px; font-weight:550; }
.person-report-comparison strong.has-change { color:var(--accent); }
.person-report-shifts { display:grid; gap:0; }
.person-report-shifts h3 { margin-bottom:8px; }
.person-report-shifts > div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.person-report-shifts > div > span { display:grid; align-content:start; gap:4px; font-size:13px; }
.person-report-shifts > div > span:last-child { text-align:right; }
.person-report-shifts small { font-size:12px; color:var(--muted); }
.person-report-shifts .employee-shift-state { padding:0; background:transparent; font-size:11px; white-space:nowrap; }
.person-report-empty { padding:24px 0; text-align:center; color:var(--muted); font-size:13px; }
html[data-theme] .manager-statistics.manager-workload { padding:0; }
.manager-workload-content { padding:var(--surface-inset); min-width:0; margin-bottom:0; }
@media(max-width:650px){
 html[data-theme] #modal.statistics-profile-dialog { max-width:100%; }
 .person-report-identity > .avatar { width:48px; height:48px; flex-basis:48px; }
 .person-report-identity h3 { font-size:18px; }
 .person-report-totals { padding:12px; gap:8px; }
 .person-report-totals > div + div { padding-left:8px; }
 .person-report-totals dd { font-size:22px; }
 .person-report-totals dt { font-size:11px; }
 .person-report-comparison { grid-template-columns:minmax(0,1fr); gap:14px; }
}

/* Mobile action targets grow without enlarging icon-only navigation. */
@media(max-width:650px) {
 html[data-theme] body :is(.button,a.button),html[data-theme] #modal .button { height:52px; min-height:52px; }
 html[data-theme] body :is(.team-status-switch,.team-view-switch,.period-presets,.directory-role-filter,.install-tabs) > button { min-height:48px; height:48px; }
}

/* Workload: explicit hour totals instead of progress bars. */
.workload-row { grid-template-columns:minmax(0,1fr); align-items:start; gap:16px; }
.workload-total { display:grid; justify-items:end; gap:4px; }
.workload-total > span { font-size:11px; font-weight:400; color:var(--muted); }
.workload-total > strong { font-size:24px; font-weight:550; line-height:1.3; }
.workload-hours { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; padding:14px 16px; background:var(--surface); border-radius:14px; corner-shape:squircle; }
.workload-hours > div { display:grid; gap:4px; min-width:0; }
.workload-hours > div + div { border-left:1px solid var(--line); padding-left:16px; }
.workload-hours dt { font-size:13px; color:var(--muted); }
.workload-hours dd { margin:0; font-size:26px; font-weight:550; line-height:1.3; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.workload-hours dd small { font-size:13px; font-weight:400; color:var(--muted); }

@media(max-width:650px) {
 .workload-total > strong { font-size:22px; }
 .workload-hours { gap:10px; padding:12px; }
 .workload-hours > div + div { padding-left:10px; }
 .workload-hours dt { font-size:11px; }
 .workload-hours dd { font-size:22px; }
}
/* Paired period sparklines reuse the metric-card drawing style and shared scale. */
.period-comparison .comparison-rows { grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--surface-gap); }
.comparison-insight { min-width:0; padding:16px; background:var(--surface-subtle); border-radius:var(--inset-corner,18px); corner-shape:squircle; }
.comparison-insight h3 { margin:0 0 12px; font-size:15px; font-weight:550; line-height:1.4; }
.comparison-periods { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.comparison-period { display:grid; gap:4px; min-width:0; color:var(--accent); }
.comparison-period.previous { color:var(--muted); }
.comparison-period > span { color:var(--muted); font-size:12px; line-height:1.4; }
.comparison-period > strong { font-size:26px; line-height:1.3; font-weight:550; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.comparison-period.previous > strong { color:var(--muted); }
.comparison-period strong small { font-size:12px; font-weight:400; color:var(--muted); }
.comparison-period .metric-sparkline { display:block; width:100%; height:38px; overflow:visible; margin-top:4px; }
.comparison-insight .comparison-difference { justify-content:flex-start; text-align:left; margin-top:12px; padding:0; grid-column:auto; grid-row:auto; }
html[data-theme='light'] .comparison-difference.is-decline { color:var(--danger); }
html[data-theme='dark'] .comparison-difference.is-decline { color:var(--danger); }
.period-comparison > .report-footnote { margin-top:12px; }
@media(max-width:650px) {
 .period-comparison .comparison-rows { grid-template-columns:minmax(0,1fr); gap:12px; }
 .comparison-insight { padding:14px; }
 .comparison-insight h3 { margin-bottom:10px; }
 .comparison-periods { gap:14px; }
 .comparison-period > strong { font-size:24px; }
 .comparison-period .metric-sparkline { height:34px; }
 .comparison-insight .comparison-difference { margin-top:10px; }
}
@keyframes sparkline-draw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
@keyframes sparkline-fill { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:no-preference) {
 .metric-sparkline .sparkline-line { stroke-dasharray:1; animation:sparkline-draw 700ms cubic-bezier(.2,.7,.2,1) both; }
 .metric-sparkline .sparkline-area { animation:sparkline-fill 650ms ease-out both; }
}
/* Completion stays at the right edge even when an overnight note follows. */
html[data-theme] .planner-footer > span:nth-child(2) { margin-left:auto; }
html[data-theme] .planner-footer > .planner-night-note { flex-basis:100%; width:100%; margin-left:0; }
/* People management stays operational; hour totals live in statistics. */
.staff-card-identity .mini-person-status { display:flex; align-items:center; gap:6px; margin-top:7px; padding:0; background:transparent; color:var(--muted); font-size:12px; line-height:1.4; }
.staff-card-identity .mini-person-status > .icon { width:14px; height:14px; }

/* Flat list: all operational details are visible without disclosure controls. */
html[data-theme] .team-list-row.staff-list-flat { display:grid; grid-template-columns:minmax(200px,1fr) minmax(160px,.65fr) auto 40px; align-items:center; gap:16px; }
.team-list-row.staff-list-flat > .team-list-person { grid-column:1; grid-row:1; }
.team-list-row.staff-list-flat .staff-list-next:has(.staff-card-next-line > span),
.team-list-row.staff-list-flat > .staff-list-next { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; grid-column:2; grid-row:1; margin:0; padding:0; min-height:0; gap:4px; }
.team-list-row.staff-list-flat .staff-list-next .staff-card-next-line { display:flex; flex-direction:column; align-items:flex-start; min-height:0; gap:4px; }
.team-list-row.staff-list-flat .staff-list-next .staff-card-next-line > strong { display:block; flex:none; min-height:0; font-size:12px; font-weight:400; color:var(--muted); }
.team-list-row.staff-list-flat .staff-list-next .staff-card-next-line > span { font-size:14px; font-weight:500; }
.team-list-row.staff-list-flat > .directory-menu { grid-column:4; grid-row:1; align-self:center; margin:0; }
@media(min-width:651px) and (max-width:1100px) {
 html[data-theme] .team-list-row.staff-list-flat { grid-template-columns:minmax(0,1fr) auto 40px; gap:14px 16px; }
 .team-list-row.staff-list-flat > .team-list-person { grid-column:1/3; }
 .team-list-row.staff-list-flat > .directory-menu { grid-column:3; align-self:start; }
 .team-list-row.staff-list-flat .staff-list-next:has(.staff-card-next-line > span),.team-list-row.staff-list-flat > .staff-list-next { grid-column:1; grid-row:2; }
}
@media(max-width:650px) {
 html[data-theme] .team-list-row.staff-list-flat { grid-template-columns:minmax(0,1fr) 40px; gap:12px; }
 .team-list-row.staff-list-flat > .directory-menu { grid-column:2; align-self:start; }
 .team-list-row.staff-list-flat .staff-list-next:has(.staff-card-next-line > span),.team-list-row.staff-list-flat > .staff-list-next { grid-column:1/-1; grid-row:2; }
 .team-list-row.staff-list-flat .staff-list-next .staff-card-next-line { width:100%; flex-direction:row; align-items:center; justify-content:space-between; }
}
/* Shift state belongs to its time block, not the employee identity. */
html[data-theme] .staff-card .staff-card-next-line > span { font-size:20px; font-weight:550; }
html[data-theme] body .team-list-row.staff-list-flat .staff-list-next .staff-card-next-label { display:flex; align-items:center; justify-self:start; gap:6px; margin:0; font-size:12px; color:var(--muted); }
html[data-theme] .team-list-row.staff-list-flat .staff-list-next .staff-card-next-line > span { font-size:18px; font-weight:550; }
.staff-card-next-label > .icon { width:14px; height:14px; flex:none; color:var(--muted); }
.staff-card-next.is-completed .staff-card-next-label > .icon { color:var(--status-positive); }
@media(max-width:380px) { html[data-theme] .staff-card .staff-card-next-line > span { font-size:18px; } }
/* Card actions live beside the shift state instead of an empty footer. */
.staff-card>.staff-card-next{margin: auto 0 0;padding:var(--surface-inset);gap:var(--compact-gap)}
.staff-card-next-top{display:flex;align-items:center;justify-content:space-between;gap:var(--compact-gap);min-width:0}
.staff-card-next-top>.staff-card-next-label{min-width:0}
.staff-card>.staff-card-next .staff-card-next-line{gap:var(--compact-gap)}
.staff-card>.staff-card-next.is-empty .staff-card-next-line>strong{font-size:14px}

/* Theme switches must never add border thickness to layout surfaces. */
html[data-theme] body :is(.panel,.mini-person) { border-width:0; }
@media(max-width:650px) {
 html[data-theme] body .team-list-row.staff-list-flat > .directory-menu { align-self:start; margin-top:0; }
 html[data-theme] body .team-list-row.staff-list-flat > .team-list-person { align-self:start; }
 html[data-theme] body .team-list-row.staff-list-flat > .staff-list-next,
 html[data-theme] body .team-list-row.staff-list-flat > .staff-list-next:has(.staff-card-next-line > span) { padding:12px; background:var(--surface); border-radius:14px; corner-shape:squircle; align-items:stretch; }
 html[data-theme] body .team-list-row.staff-list-flat .staff-list-next .staff-card-next-label { align-self:start; justify-content:flex-start; }
 html[data-theme] body .team-list-row.staff-list-flat .staff-list-next .staff-card-next-line { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; }
}
html[data-theme] .mini-team-grid { padding-block:var(--surface-gap); margin-block:calc(-1 * var(--surface-gap)); overflow-y:hidden; }

.shift-edit-notice { color:var(--muted); font-size:13px; line-height:1.5; margin:0; }

.date-trigger.date-locked { cursor:default; box-sizing:border-box; }

/* Workload filters reuse directory search and the shared custom select. */
.people-filters { margin-bottom:20px; }
.people-filters :is(#workload-search,#team-search) { margin:0; min-width:0; }

.workload-row { gap:12px; padding:16px; }
.workload-hours { padding:10px 12px; gap:12px; }
.workload-hours > div + div { padding-left:12px; }
.workload-hours dd { font-size:22px; }
@media(min-width:1001px) {
 .workload-row { grid-template-columns:minmax(0,1fr) minmax(360px,.9fr); align-items:center; gap:20px; }
 .workload-hours { grid-column:auto; }
}
@media(max-width:650px) {

 .workload-row { padding:12px; gap:12px; }
 .workload-hours { padding:10px 12px; }
 .workload-hours dd { font-size:20px; }
}

/* Compact personal report uses the existing surface and chart tokens. */
html[data-theme] #modal.statistics-profile-dialog { width:600px; }
.statistics-profile-dialog .modal-head { margin-bottom:18px; }
.statistics-profile-dialog .modal-head h2 { font-size:24px; }
.person-report { gap:16px; }
.person-report-overview { display:grid; gap:10px; }
.person-report-identity > .avatar { width:48px; height:48px; flex-basis:48px; }
.person-report-identity h3 { font-size:18px; }
.person-report-identity span { font-size:13px; }
.person-report-summary { background:var(--surface-subtle); border-radius:16px; padding:14px; }
.person-report-totals { padding:0; background:transparent; }
.person-report-totals dd { margin-top:6px; font-size:24px; }
.person-report-status { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); justify-content:space-between; gap:8px; font-size:11px; }
.person-report-chart { display:grid; grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:0; }
.person-report-series { min-width:0; color:var(--control-accent); }
.person-report-series.is-planned { color:var(--muted); }
.person-report-series > span { font-size:12px; color:var(--muted); }
.person-report-series .metric-sparkline { display:block; width:100%; height:64px; margin-top:8px; overflow:visible; }
.person-report-axis { display:flex; justify-content:space-between; font-size:10px; color:var(--muted); margin-top:4px; }
.person-report .report-footnote { font-size:11px; margin:10px 0 0; line-height:1.5; }
.person-report-comparison { padding:0; background:transparent; gap:14px; }
.person-report-comparison > div { padding:12px; border-radius:14px; background:var(--surface-subtle); gap:4px; }
.person-report-comparison span { font-size:11px; }
.person-report-comparison small { font-size:10px; }
.person-report-details { min-width:0; border-top:1px solid var(--line); }
.person-report-details > summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0 0; min-height:40px; cursor:pointer; list-style:none; font-size:13px; color:var(--ink); -webkit-tap-highlight-color:transparent; }
.person-report-details > summary::-webkit-details-marker { display:none; }
.person-report-details summary b { display:inline-flex; padding:3px 7px; margin-left:5px; border-radius:8px; background:var(--surface-subtle); font-size:11px; font-weight:550; }
.person-report-details summary > .icon { width:16px; height:16px; transition:transform 220ms ease; }
.person-report-details[open] summary > .icon { transform:rotate(90deg); }
.person-report-shifts { margin-top:8px; }
@media(max-width:650px) {
 .statistics-profile-dialog .modal-head h2 { font-size:22px; }
 .person-report { gap:14px; }
 .person-report-summary { padding:12px; }
 .person-report-totals dd { font-size:22px; }
 .person-report-comparison { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .person-report-comparison > div { padding:10px; }
 .person-report-series .metric-sparkline { height:52px; }
 .person-report-chart { gap:12px; }
}

.person-report-comparison strong.is-growth { color:#18794e; }
.person-report-comparison strong.is-decline { color:var(--danger); }
[data-theme='dark'] .person-report-comparison strong.is-growth { color:#65c990; }
[data-theme='dark'] .person-report-comparison strong.is-decline { color:var(--danger); }

/* Directory controls are shared without per-page colors or dimensions. */
.team-workload { padding:0; min-width:0; background:transparent; }
.team-workload-content { padding:var(--surface-inset); min-width:0; margin-bottom:0; }
.team-section .team-view-toolbar h2,
@media(max-width:1000px) { .team-section .team-view-toolbar h2 { font-size:24px; } }

/* Shared chart styling: reference glow, gradient area and a clear endpoint. */
.metric-sparkline .sparkline-guide { stroke:var(--muted); stroke-opacity:.17; stroke-width:1; stroke-dasharray:3 5; vector-effect:non-scaling-stroke; }
.metric-sparkline .sparkline-glow { stroke:currentColor; stroke-width:6; opacity:.16; filter:blur(2px); vector-effect:non-scaling-stroke; }
.metric-sparkline .sparkline-endpoint path { fill:none; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.metric-sparkline .sparkline-point-halo { stroke:currentColor; stroke-width:10; opacity:.2; }
.metric-sparkline .sparkline-point { stroke:currentColor; stroke-width:6; }
.metric-sparkline .sparkline-point-core { stroke:var(--surface); stroke-width:2; }
@media(prefers-reduced-motion:no-preference) {
 .metric-sparkline .sparkline-glow { stroke-dasharray:1; animation:sparkline-draw 700ms cubic-bezier(.2,.7,.2,1) both; }
 .metric-sparkline .sparkline-endpoint { animation:sparkline-fill 650ms ease-out both; }
}
/* Identity typography: one scale for the same content in every standard view. */
:root {
 --person-name-size:14px;
 --person-name-line-height:1.4;
 --person-title-size:12px;
 --person-title-line-height:1.5;
}
html[data-theme] :is(
 .directory-page .directory-table .person strong,
 .team-list-person h3,.staff-card .employee-card-head h3,
 .workload-identity strong,.statistics-person-name > strong,
 .planner-person-info > strong,.mini-person-name > strong,.mini-person-name > .mini-surname,
 .location-manager-identity > strong,.location-now-identity strong,
 .profile-card-person h3,.profile-menu-identity > strong,
 .employment-person strong,.reset-access-person strong,.access-view-person strong,
 .shift-fixed-person strong,.person-report-identity h3,.workday-manager-list strong
) {
 font-size:var(--person-name-size);
 font-weight:var(--person-name-weight,550);
 color:var(--ink);
 line-height:var(--person-name-line-height);
 letter-spacing:0;
}
html[data-theme] :is(
 .directory-page .directory-table .person small,
 .team-list-person > div > span,.staff-card-identity > .muted,
 .workload-identity > div > span,.statistics-person-name .staff-position,
 .planner-person-info .staff-position,.mini-person-name .staff-position,
 .location-manager-identity small,.location-now-identity > div > span,
 .profile-card-person > div > span,.profile-menu-identity > span,
 .employment-person > div > span,.reset-access-person > div > span,
 .access-view-person > div > span,.shift-person-meta > span,
 .person-report-identity > div > span
) {
 font-size:var(--person-title-size);
 font-weight:400;
 line-height:var(--person-title-line-height);
 letter-spacing:0;
}

/* Mobile schedule: one calm surface per person, readable time/status row. */
@media (max-width:650px) {
 .mobile-schedule-refined .mobile-day-summary { padding:14px 16px 12px; align-items:center; }
 .mobile-schedule-refined .mobile-day-summary > strong { font-size:14px; }
 .mobile-schedule-refined .mobile-day-summary > span { font-size:12px; }
 .mobile-schedule-refined .mobile-shift-list { display:grid; gap:8px; padding:0 12px 12px; }
 html[data-theme] .mobile-schedule-refined .mobile-shift-person { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin:0; padding:12px; border:0; border-radius:18px; background:var(--surface-subtle); min-width:0; }
 .mobile-schedule-refined .mobile-shift-person .planner-person { gap:10px; align-items:flex-start; }
 .mobile-schedule-refined .mobile-shift-person .planner-person > .avatar { width:36px; height:36px; flex:0 0 36px; }
 .mobile-schedule-refined .planner-person-info { flex:1; min-width:0; }
 .mobile-schedule-refined :is(.planner-person-info > strong,.planner-person-info > strong > .employee-profile-link) > .planner-name-line { display:inline; min-height:0; white-space:normal; overflow-wrap:anywhere; }
 .mobile-schedule-refined .planner-person-info .staff-position { margin-top:2px; }
 .mobile-schedule-refined .planner-person-hours { display:none; }
 .mobile-schedule-refined .mobile-shift-slots { min-width:0; margin:0; gap:6px; }
 html[data-theme] .mobile-schedule-refined .mobile-shift-slots > .planner-shift { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:44px; height:auto; padding:8px 10px; border:1px solid transparent; border-radius:12px; background:var(--surface); box-shadow:none; opacity:1; }
html[data-theme] .mobile-schedule-refined .mobile-shift-slots > .planner-shift:is(:focus-visible) { border-color:var(--control-border); background:var(--surface); transform:none; }

html[data-theme] .mobile-schedule-refined .mobile-shift-slots > .planner-shift:is(:hover:where(:not(html[data-hover-disabled] *))) { border-color:var(--control-border); background:var(--surface-subtle-hover); transform:none; }
 .mobile-schedule-refined .planner-shift-time { font-size:15px; line-height:1.4; flex-shrink:0; white-space:nowrap; }
 .mobile-schedule-refined .planner-shift-meta { width:auto; flex:0 1 auto; font-size:11px; line-height:1.4; gap:4px; flex-wrap:nowrap; justify-content:flex-end; text-align:right; }
 .mobile-schedule-refined .planner-shift-meta > strong, .mobile-schedule-refined .planner-shift-meta > span { font-size:11px; white-space:nowrap; }
 .mobile-schedule-refined .mobile-shift-slots .mobile-assign-shift { min-height:44px; height:auto; padding:8px 10px; border-radius:12px; font-size:12px; background:transparent; }
 .mobile-schedule-refined .mobile-no-shift { text-align:left; padding:4px 0 0 46px; font-size:12px; }
}


/* Shared labelled list pattern: one header, matching columns, one surface per row. */
.list-column-head,html[data-theme] .unified-data-table th { color:var(--muted); font-size:13px; font-weight:400; line-height:1.5; background:transparent; }
.list-column-head { display:grid; align-items:center; gap:16px; padding:10px var(--surface-inset) 16px; }
.unified-staff-list { --staff-list-columns:minmax(180px,1.4fr) minmax(130px,1fr) minmax(150px,1fr) 112px; }
.staff-list-columns { grid-template-columns:var(--staff-list-columns); }
html[data-theme] .team-list-row.unified-staff-row { display:grid; grid-template-columns:var(--staff-list-columns); gap:16px; align-items:center; padding:var(--surface-inset); }
html[data-theme] .unified-staff-row > .team-list-person { grid-column:1; grid-row:1; align-items:flex-start; min-width:0; }
.unified-staff-row > div { min-width:0; }
.unified-staff-row .team-list-person { gap:10px; }
.unified-staff-row .team-list-person > .avatar { width:36px; height:36px; flex:0 0 36px; }
.unified-staff-row .team-list-person h3 { margin:0; overflow-wrap:anywhere; }
.unified-staff-row > .staff-list-login { grid-column:2; grid-row:1; color:var(--muted); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.unified-staff-row > .staff-list-position { grid-column:3; grid-row:1; }
.unified-staff-row > .staff-list-actions { grid-column:4; grid-row:1; }
.staff-list-position { font-size:12px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.staff-list-actions { display:flex; justify-content:flex-end; align-items:center; gap:12px; }
.staff-list-mobile-position { display:none!important; }
html[data-theme] .unified-staff-row .staff-list-actions > .directory-menu { margin:0; align-self:center; flex:0 0 40px; }
.list-cell-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.workload-list-columns { grid-template-columns:minmax(0,1.35fr) repeat(3,minmax(90px,.55fr)); padding:10px 16px 16px; gap:20px; }
@media(min-width:1101px) {
 .unified-workload-list > .workload-row { grid-template-columns:minmax(0,1.35fr) repeat(3,minmax(90px,.55fr)); gap:20px; }
 .unified-workload-list > .workload-row > .workload-hours { display:contents; }
 .unified-workload-list .workload-hours > div { min-width:0; padding:0; border:0; background:transparent; }
 .unified-workload-list .workload-hours dt { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); }
 .unified-workload-list .workload-hours dd { font-size:20px; margin:0; }
}
@media(max-width:1100px) {
 .staff-list-columns,.workload-list-columns { display:none; }
 html[data-theme] .team-list-row.unified-staff-row { grid-template-columns:minmax(0,1fr) auto; gap:12px 16px; align-items:center; }
 html[data-theme] .unified-staff-row > .team-list-person { grid-column:1; grid-row:1; }
 .unified-staff-row > .staff-list-position { display:none; }
 .unified-staff-row .staff-list-mobile-position { display:block!important; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
 .unified-staff-row > .staff-list-actions { grid-column:2; grid-row:1; }
 .staff-list-actions { gap:4px; }
}
@media(max-width:650px) {
 html[data-theme] .team-list-row.unified-staff-row { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
 html[data-theme] .unified-staff-row > .team-list-person { grid-column:1; grid-row:1; }
 .unified-staff-row > .staff-list-actions { grid-column:2; grid-row:1; }
}

/* Shift composer experiment: isolated to the shift dialog. */
html[data-theme] dialog.shift-dialog { width:500px; padding:24px; }
html[data-theme] .shift-dialog .modal-head { margin-bottom:22px; }
html[data-theme] .shift-dialog .modal-head h2 { font-size:24px; line-height:1.25; font-weight:650; }
html[data-theme] :is(#shift-form,#open-shift-form,#shift-template-form).shift-composer { gap:20px; }
.shift-composer .shift-section-label { color:var(--muted); font-size:12px; line-height:1.4; }
html[data-theme] .shift-composer .shift-editor-person { gap:8px; }
html[data-theme] .shift-composer .shift-person-row { padding:14px; gap:12px; border-radius:var(--inset-corner); corner-shape:squircle; background:var(--surface-subtle); align-items:center; }
html[data-theme] .shift-composer #shift-person-avatar { flex:0 0 44px; align-self:center; }
html[data-theme] .shift-composer #shift-person-avatar .avatar { width:44px; height:44px; }
html[data-theme] .shift-composer .shift-person-field :is(.custom-select-trigger,.shift-fixed-person) { background:transparent; border:0; box-shadow:none; min-height:30px; height:auto; padding:0; border-radius:0; font-size:16px; font-weight:550; color:var(--ink); }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)) { color:var(--muted);  }
html[data-theme] .shift-composer .shift-person-meta { margin-top:4px; font-size:12px; }
html[data-theme] .shift-composer .shift-editor-times { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
html[data-theme] .shift-composer .shift-editor-times > label:first-child { grid-column:1 / -1; }
html[data-theme] .shift-composer :is(label,.shift-template-label) { font-size:13px; font-weight:500; gap:var(--form-label-gap); }
html[data-theme] .shift-composer :is(.date-trigger,.shift-editor-times .custom-select-trigger,select[data-custom-select='native-time']) { height:48px; min-height:48px; padding:0 14px; border:1px solid var(--control-border); background:var(--surface); border-radius:var(--compact-corner,22px); font-size:16px; }
html[data-theme] .shift-composer .shift-editor-times .custom-select-trigger { justify-content:space-between; }
html[data-theme] .shift-composer .shift-timing-summary { padding:16px; gap:12px; background:var(--surface-subtle); border-radius:var(--inset-corner); }
html[data-theme] .shift-composer .shift-timing-summary strong { font-size:15px; font-weight:550; }
html[data-theme] .shift-composer .shift-duration-result strong { font-size:24px; line-height:1.25; font-weight:600; }
html[data-theme] .shift-composer .shift-timing-summary span { font-size:12px; }
html[data-theme] .shift-composer .shift-editor-status { margin:0; }
html[data-theme] #shift-form .shift-edit-notice { background:var(--dialog-inset-surface); border-color:transparent; margin:0; font-size:12px; line-height:1.6; }
html[data-theme] .shift-composer .modal-actions { gap:10px; margin:0; padding:0; }
html[data-theme] .shift-composer .modal-actions > button { font-size:14px; min-height:48px; }
@media(max-width:650px) {
 html[data-theme] :is(#shift-form,#open-shift-form,#shift-template-form).shift-composer { gap:18px; }
 html[data-theme] .shift-dialog .modal-head { margin-bottom:20px; }
 html[data-theme] .shift-dialog .modal-head h2 { font-size:22px; }
 html[data-theme] .shift-composer .shift-person-row { padding:12px; }
 html[data-theme] .shift-composer .shift-person-field :is(.custom-select-trigger,.shift-fixed-person) { font-size:14px; }
 html[data-theme] .shift-composer .modal-actions { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .shift-composer .modal-actions > button { min-height:52px; }
}

/* Employee picker uses the shared field treatment, including its inner text. */
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger { min-height:48px; height:48px; padding:0 12px; border:1px solid var(--control-border); border-radius:var(--compact-corner,22px); corner-shape:var(--surface-curve); background:var(--surface); box-shadow:none; font-size:14px; font-weight:500; }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)) {  border-color:var(--muted); color:var(--ink); }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger > span { border:0; outline:0; box-shadow:none; background:transparent; }

/* Account creation follows the compact shift composer. */
html[data-theme] dialog.account-dialog { width:500px; padding:24px; }
html[data-theme] .account-dialog .modal-head { margin-bottom:22px; }
html[data-theme] .account-dialog .modal-head h2 { font-size:24px; line-height:1.25; font-weight:650; }
html[data-theme] #account-form.account-composer { grid-template-columns:minmax(0,1fr); min-width:0; width:100%; gap:20px; }
html[data-theme] #account-form.account-composer > * { min-width:0; max-width:100%; }

/* Group the portrait with its radio choices; the name gets a full-width field. */
html[data-theme] .account-composer .account-person-card { padding:0; border:0; background:transparent; }
html[data-theme] .account-composer .account-person-row {
 --account-avatar-size:var(--control-height);
 display:flex; align-items:center; gap:var(--surface-gap); min-width:0;
 padding:var(--surface-inset); background:var(--surface-subtle);
 border-radius:var(--inset-corner); corner-shape:var(--surface-curve);
}
html[data-theme] #account-form .account-person-row > .account-avatar-choice { flex:1; margin:0; }
html[data-theme] #account-form .account-avatar-options { display:flex; flex-wrap:wrap; }
html[data-theme] #account-form .account-avatar-option { flex:1 0 auto; width:auto; padding-inline:var(--compact-gap); }
html[data-theme] #account-form .account-avatar-option[aria-checked="false"]:hover:where(:not(html[data-hover-disabled] *)) {
 background-color:var(--surface);
 color:var(--ink);
 border-color:var(--control-border);
}
html[data-theme] .account-composer .account-avatar-control { margin:0; padding:0; width:var(--account-avatar-size); flex:0 0 var(--account-avatar-size); }
html[data-theme] .account-composer #account-avatar-preview .avatar { width:var(--account-avatar-size); height:var(--account-avatar-size); min-width:var(--account-avatar-size); min-height:var(--account-avatar-size); }

html[data-theme] .account-composer label:not(.trainee-toggle),html[data-theme] .account-composer .account-avatar-choice>span { font-size:13px; font-weight:500; gap:7px; }
html[data-theme] .account-composer :is(input:not([type='hidden']):not([type='checkbox']),.custom-select-trigger) { min-width:0; height:48px; min-height:48px; padding:0 12px; font-size:16px; line-height:1.4; border:1px solid var(--control-border); border-radius:var(--compact-corner,22px); background:var(--surface); }
html[data-theme] .account-composer .employment-fields { gap:12px; }
html[data-theme] .account-composer .trainee-toggle { min-height:64px; padding:12px 14px; border:0; border-radius:var(--inset-corner); background:var(--surface-subtle); }
html[data-theme] .account-composer .trainee-toggle strong { font-size:14px; font-weight:500; }
html[data-theme] .account-composer .trainee-toggle small { font-size:12px; line-height:1.45; margin-top:3px; }
html[data-theme] .account-composer .account-access-card { padding:16px; border:0; border-radius:var(--inset-corner); background:var(--surface-subtle); }
html[data-theme] .account-composer .account-access-head { gap:12px; margin-bottom:12px; }
html[data-theme] .account-composer .account-access-head h3 { font-size:15px; font-weight:550; }
html[data-theme] .account-composer #regenerate-access { flex:0 0 32px; width:32px; min-width:32px; height:32px; min-height:32px; padding:0; border:0; border-radius:50%; corner-shape:round; background:transparent; }
html[data-theme] .account-composer #regenerate-access:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); }
html[data-theme] .account-composer .account-access-fields { gap:12px; }
html[data-theme] .account-composer .account-access-card > p { font-size:12px; line-height:1.5; margin:12px 0 0; }
html[data-theme] .account-composer .modal-actions { gap:10px; margin:0; padding:0; }
html[data-theme] .account-composer .modal-actions > button { min-height:48px; font-size:14px; }
@media(max-width:650px) {
 html[data-theme] .account-dialog .modal-head { margin-bottom:20px; }
 html[data-theme] .account-dialog .modal-head h2 { font-size:22px; }
 html[data-theme] #account-form.account-composer { gap:18px; }
 html[data-theme] .account-composer .account-access-fields { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .account-composer .modal-actions { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .account-composer .modal-actions > button { min-height:52px; }
}

.account-auto-access-note { display:flex; align-items:flex-start; gap:8px; margin:0; color:var(--muted); font-size:12px; line-height:1.6; }


/* Secondary form text: the automatic-credentials note is the shared reference. */
:root { --feedback-icon-size:20px; --form-note-size:14px; --form-note-leading:1.6; --empty-title-size:18px; }
@media(max-width:650px) { :root { --form-note-size:12px; --empty-title-size:16px; } }
html[data-theme] :is(#modal,#owner-modal) .form-note,
html[data-theme] .employee-profile-empty-shift .form-note,
html[data-theme] .internship-learning .form-note,
html[data-theme] form .field-hint {
 font-size:var(--form-note-size); line-height:var(--form-note-leading);
 font-weight:400; letter-spacing:normal; color:var(--muted);
}
html[data-theme] :is(#modal,#owner-modal) .form-note-with-icon { display:flex; align-items:flex-start; gap:8px; }
html[data-theme] :is(#modal,#owner-modal) :is(.form-note-with-icon,.account-auto-access-note) > .icon {
 position:static; display:block; flex:0 0 var(--feedback-icon-size); width:var(--feedback-icon-size); height:var(--feedback-icon-size);
 margin:1px 0 0; color:var(--feedback-icon-color,var(--status-recruiting)); transform:none; background:transparent;
}
html[data-theme] :is(#modal,#owner-modal) .form-note-with-icon > span { min-width:0; }
html[data-theme] .trainee-toggle input:checked + .trainee-switch { background:var(--control-accent); border-color:var(--control-accent); }
html[data-theme] .trainee-toggle input:checked + .trainee-switch::after { background:var(--control-accent-ink); }
@media(hover:hover) {
 html[data-theme] .trainee-toggle:hover:where(:not(html[data-hover-disabled] *)) input:checked:not(:disabled) + .trainee-switch { background:var(--control-accent-hover); border-color:var(--control-accent-hover); }
}
html[data-theme][data-input-mode='keyboard'] .trainee-toggle input:focus-visible + .trainee-switch { outline-color:var(--control-accent); }

/* A fixed identity has no empty input-height reservation below the name. */
html[data-theme] .shift-composer .shift-person-field .shift-fixed-person {
 display:block; min-height:0; height:auto; line-height:var(--person-name-line-height);
}
html[data-theme] .shift-composer .shift-fixed-person > strong { display:block; margin:0; }
html[data-theme] .shift-composer .shift-person-meta { margin-top:3px; }
@media(max-width:650px) {
 html[data-theme] :is(#shift-form,#open-shift-form,#shift-template-form).shift-composer { gap:12px; }
 html[data-theme] .shift-dialog .modal-head { margin-bottom:16px; }
 html[data-theme] .shift-composer .shift-editor-times { gap:12px; }
 html[data-theme] .shift-composer .shift-timing-summary { padding:12px 14px; }
}

@media(max-width:650px) {
 html[data-theme] .statistics-profile-dialog .modal-head { margin-bottom:12px; }
 html[data-theme] .statistics-profile-dialog .person-report { gap:12px; }
}
@media(max-width:650px) {
 html[data-theme] .statistics-profile-dialog .person-report-overview { gap:8px; }
 html[data-theme] .statistics-profile-dialog .person-report-graph-section { padding:12px; }
}

/* User-approved composition: one employee picker, aligned date/time, open identity. */
html[data-theme] .shift-composer .shift-person-row {
 position:relative; padding:16px; gap:16px;
 background:var(--dialog-inset-surface); border:1px solid transparent;
 border-radius:var(--field-corner); align-items:center;
}
html[data-theme] .shift-composer .shift-person-field .custom-select { position:static; }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger {
 position:static; appearance:none; -webkit-appearance:none;
 border:0; outline:0; border-radius:0; box-shadow:none; background:transparent;
 height:auto; min-height:0; padding:0 24px 0 0;
 font-size:var(--person-name-size); font-weight:var(--person-name-weight,550);
 color:var(--ink);
 line-height:var(--person-name-line-height);
}
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger:hover:where(:not(html[data-hover-disabled] *)) {  color:var(--ink); border:0; }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger::after { content:''; position:absolute; inset:0; border-radius:var(--inset-corner); cursor:pointer; }
html[data-theme] .shift-composer .shift-person-field .custom-select-trigger > .icon { position:absolute; right:16px; top:calc(50% - 8px); margin:0; width:16px; height:16px; color:var(--muted); }
html[data-theme][data-input-mode='keyboard'] .shift-person-row:has(.custom-select-trigger:focus-visible) { outline:1px solid var(--ink); outline-offset:2px; }
html[data-theme] .shift-composer .shift-person-meta { padding-right:24px; }
html[data-theme] .shift-composer .shift-editor-times { grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,1fr)); gap:12px; }
html[data-theme] .shift-composer .shift-editor-times > label:first-child { grid-column:auto; }
@media(max-width:650px) {
 html[data-theme] .shift-composer .shift-person-row { padding:14px; gap:12px; }
 html[data-theme] .shift-composer .shift-editor-times { grid-template-columns:repeat(2,minmax(0,1fr)); }
 html[data-theme] .shift-composer .shift-editor-times > label:first-child { grid-column:1/-1; }
}
/* Override the shared input border only for the integrated employee picker. */
html[data-theme] #shift-form .shift-person-field .custom-select-trigger{ border:0; box-shadow:none; background:transparent; }

html[data-theme] #shift-form .shift-person-field .custom-select-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),:focus,:active) { border:0; box-shadow:none;  }

/* The position filter belongs to the calendar toolbar, before PDF export. */
.planner-toolbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:16px; margin-left:auto; min-width:0; }
.calendar-position-toolbar { display:flex; justify-content:flex-end; margin:0; min-width:0; }
.calendar-position-toolbar > .directory-field { width:max-content; max-width:100%; margin:0; }
.calendar-position-toolbar .custom-select { width:auto; max-width:100%; }
html[data-theme] #calendar-position + .custom-select-trigger { width:auto; max-width:100%; padding-inline:12px; gap:8px; justify-content:space-between; }
.manager-schedule-section { margin-top:var(--section-space); min-width:0; }
html[data-theme] .manager-schedule-section > .manager-calendar { margin-top:0; }
@media (max-width:650px) {
 .planner-toolbar-actions { width:100%; margin-left:0; }
 .planner-toolbar-actions { justify-content:flex-end; }
}

/* Today stays in the shared highlighted column; a dot replaces the date disc. */
@media (min-width:651px) {
 html[data-theme] .planner-day-header.is-today .planner-day-number {
  position:relative;
  background:transparent;
  color:var(--ink);
  border-radius:0;
 }
 html[data-theme] .planner-day-header.is-today .planner-day-number::after {
  content:'';
  position:absolute;
  width:5px;
  height:5px;
  left:50%;
  bottom:-5px;
  transform:translateX(-50%);
  border-radius:50%;
  background:var(--status-positive);
 }
}
@media (min-width:651px) {
 html[data-theme] .planner-day-header > .planner-day-label { align-items:flex-start; }
 html[data-theme] .planner-day-header .planner-day-number { position:relative; top:-3px; height:auto; line-height:1.2; }
}

.calendar-position-symbol { display:none; }
/* One glyph scale for equivalent compact filters; the hit area stays independent. */
html[data-theme] body.panel-typography #app .custom-select-trigger .calendar-position-symbol > .icon {
 width:20px; height:20px; min-width:20px; min-height:20px; flex:0 0 20px;
 stroke-width:1.6;
}
.schedule-mobile-actions { display:flex; align-items:center; gap:8px; }
.director-schedule-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
@media (min-width:651px) { .planner-toolbar > .schedule-mobile-actions { display:none; } }
@media (max-width:650px) {
 .planner-toolbar-actions { display:none; }
 .planner-toolbar{flex-wrap:nowrap;gap:var(--compact-gap)}
 .planner-toolbar>.planner-navigation,.employee-week-navigation{width:auto;flex:1;min-width:0;gap:4px;justify-content:flex-start}
 .planner-toolbar>.planner-navigation>.planner-nav-arrow{flex-shrink:0}
 .planner-toolbar>.planner-navigation>strong,.employee-week-navigation>strong{min-width:0;flex:1;font-size:14px;line-height:1.4}
 .planner-toolbar>.schedule-mobile-actions{flex-shrink:0;margin-left:auto}
 .schedule-mobile-actions .calendar-position-toolbar,
 .schedule-mobile-actions .directory-field,
 .schedule-mobile-actions .custom-select { width:auto; max-width:none; }
 html[data-theme] #calendar-position + .custom-select-trigger,
 html[data-theme] .schedule-mobile-actions .schedule-download-mobile {
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; min-height:40px; flex:0 0 40px;
  padding:0; margin:0; border:0; border-radius:50%;
  background:transparent; box-shadow:none; color:var(--muted);
 }
 #calendar-position + .custom-select-trigger > span:not(.calendar-position-symbol),
 #calendar-position + .custom-select-trigger > .icon,
 .schedule-mobile-actions .schedule-download-mobile > span { display:none; }
 #calendar-position + .custom-select-trigger > .calendar-position-symbol { display:flex; align-items:center; justify-content:center; overflow:visible; }
 .schedule-mobile-actions .icon { width:20px; height:20px; }
 html[data-theme] #calendar-position + .custom-select-trigger.has-filter { background:var(--surface); color:var(--action); }
 html[data-theme] #calendar-position + .custom-select-trigger:is(:hover:where(:not(html[data-hover-disabled] *)),[aria-expanded='true']){  color:var(--ink); }

 html[data-theme] .schedule-mobile-actions .schedule-download-mobile:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); color:var(--ink); }
 .director-schedule-toolbar .director-schedule-title { margin:0; }
 .director-schedule-toolbar { margin-top:var(--section-space); margin-bottom:12px; }
}

@media (max-width:650px) {
 html[data-theme] .people-filters .directory-filters { grid-template-columns:minmax(0,1fr) 48px; align-items:center; gap:8px; }
 html[data-theme] .people-filters .directory-filters > form { grid-column:auto; }
 html[data-theme] .people-filters .directory-filters > label { width:48px; min-width:0; margin:0; }
 html[data-theme] .people-filters .custom-select { width:48px; }
 html[data-theme] :is(#team-position,#workload-position,#pay-rate-status) + .custom-select-trigger {
  display:flex; align-items:center; justify-content:center;
  width:48px; height:48px; min-height:48px; padding:0; gap:0;
  border:0; border-radius:var(--compact-corner,22px); background:var(--surface); color:var(--muted);
 }
 .people-filters .position-filter-trigger > span:not(.calendar-position-symbol),
 .people-filters .position-filter-trigger > .icon { display:none; }
 .people-filters .position-filter-trigger > .calendar-position-symbol { display:flex; align-items:center; justify-content:center; overflow:visible; }
 html[data-theme] :is(#team-position,#workload-position,#pay-rate-status) + .custom-select-trigger.has-filter { color:var(--action); }
 html[data-theme] #calendar-position + .custom-select-trigger,
 html[data-theme] .schedule-mobile-actions .schedule-download-mobile { corner-shape:round; }
}

@media (max-width:650px) {
 html[data-theme] .directory-controls .directory-filters { grid-template-columns:minmax(0,1fr) 48px; align-items:center; gap:8px; }
 html[data-theme] .directory-controls .directory-filters > #directory-search { grid-column:auto; }
 html[data-theme] .directory-controls .directory-filters > label { width:48px; min-width:0; margin:0; }
 .directory-controls .directory-filters > label .custom-select { width:48px; }
 html[data-theme] #directory-location + .custom-select-trigger {
  display:flex; align-items:center; justify-content:center;
  width:48px; height:48px; min-height:48px; padding:0; gap:0;
  border:0; border-radius:var(--compact-corner,22px); background:var(--surface); color:var(--muted);
 }
 #directory-location + .custom-select-trigger > span:not(.calendar-position-symbol),
 #directory-location + .custom-select-trigger > .icon { display:none; }
 #directory-location + .custom-select-trigger > .calendar-position-symbol { display:flex; align-items:center; justify-content:center; overflow:visible; }
 html[data-theme] #directory-location + .custom-select-trigger.has-filter { color:var(--action); }
}

@media (max-width:650px) {
 html[data-theme] .directory-role-filter {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  width:100%; padding:4px; gap:4px; background:var(--surface);
 }
 html[data-theme] .directory-role-filter > button { background:transparent; padding-inline:6px; }
 html[data-theme] .directory-role-filter > button:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle); }
 html[data-theme] .directory-role-filter > button[aria-pressed='true'] { background:var(--ink); color:var(--surface); }
 html[data-theme] .statistics-page:not(.employee-statistics-page) > .statistics-controls,
 .statistics-page:not(.employee-statistics-page) > .statistics-overview > .statistics-controls {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--surface-gap) var(--compact-gap); align-items:center;
 }
 html[data-theme] .statistics-controls > .statistics-period { display:contents; }
 html[data-theme] .statistics-controls > .statistics-filters {
  display:flex; flex-flow:row nowrap; grid-column:2; grid-row:1;
  width:auto; margin:0; gap:8px; flex:none;
 }
 html[data-theme] .statistics-controls .statistics-filters > label,
 html[data-theme] .statistics-controls .statistics-filters .custom-select { width:48px; flex:0 0 48px; margin:0; }
 html[data-theme] .statistics-controls .statistics-range { grid-column:1; grid-row:1; min-width:0; width:100%; }
 html[data-theme] .statistics-controls .statistics-range > button { flex:1; min-width:0; padding-inline:8px; }
 html[data-theme] .statistics-controls .statistics-period > .period { grid-column:1 / -1; grid-row:2; width:100%; min-width:0; margin:0; }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger {
  display:flex; align-items:center; justify-content:center; width:48px; height:48px;
  min-height:48px; padding:0; gap:0; border:0; border-radius:var(--compact-corner,22px);
  background:var(--surface); color:var(--muted);
 }
 :is(#stats-location,#stats-staff) + .custom-select-trigger > span:not(.calendar-position-symbol),
 :is(#stats-location,#stats-staff) + .custom-select-trigger > .icon { display:none; }
 :is(#stats-location,#stats-staff) + .custom-select-trigger > .calendar-position-symbol { display:flex; align-items:center; justify-content:center; overflow:visible; }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger.has-filter { color:var(--action); }
}
@media (max-width:650px) {
 html[data-theme] body .directory-role-filter { border-radius:18px; corner-shape:squircle; }
 html[data-theme] body #directory-role-filter > button {
  border-radius:14px!important; corner-shape:squircle!important;
 }
 html[data-theme] .directory-role-filter > button[aria-pressed='true'] { background:var(--surface-subtle); color:var(--ink); }
}

.segment-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Native search cancellation differs on phones; always provide our own control. */
/* Search focus uses the action color; hover keeps its neutral border. */
html[data-theme][data-input-mode] .directory-search-input > :is(#directory-query,#team-query,#workload-query,#absence-query,#events-query,#location-query,input[type='search']):focus { border-color:var(--action); }
.directory-search-input > input[type='search']::-webkit-search-cancel-button { -webkit-appearance:none; appearance:none; display:none; }
.directory-search-input > input[type='search']::-ms-clear { display:none; }
html[data-theme] :is(#directory-query,#team-query,#workload-query,#absence-query,#events-query,#calendar-location-query,.directory-search-input>input[type='search']) { padding-right:44px; }
html[data-theme] .directory-search-input > .search-clear {
 position:absolute; right:8px; top:50%; transform:translateY(-50%);
 display:flex; align-items:center; justify-content:center;
 width:32px; height:32px; min-height:32px; padding:0; margin:0;
 border:0; border-radius:50%; corner-shape:round; background:transparent; color:var(--surface);
}
.directory-search-input > .search-clear[hidden] { display:none!important; }
.search-clear > span { display:flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:50%; background:var(--muted); }
.search-clear .icon { width:12px; height:12px; flex:0 0 12px; stroke-width:2; }
html[data-theme] .directory-search-input > .search-clear:hover:where(:not(html[data-hover-disabled] *)) > span { background:var(--ink); }

@media (max-width:650px) {
 html[data-theme] .schedule-mobile-actions #calendar-position + .custom-select-trigger { background:var(--surface); }
}
.directory-location-context > strong { color:var(--ink); font-size:inherit; font-weight:550; }

/* Icon-only filters use circular hit surfaces like other standalone icons. */
@media (max-width:650px) {
 html[data-theme] :is(#calendar-position,#team-position,#workload-position,#directory-location,#stats-location,#stats-staff) + .custom-select-trigger {
  border-radius:50%!important;
  corner-shape:round!important;
 }
}

/* Location identity and actions share the existing directory menu pattern. */
.location-card-refined .location-name-with-count { display:flex; align-items:center; gap:10px; }
.location-name-with-count > span:first-child { min-width:0; overflow-wrap:anywhere; }
.location-name-with-count .location-capacity { font-size:14px; line-height:20px; padding:4px 9px; border-radius:10px; }
.location-card-refined .location-card-title > .location-actions-menu { flex:0 0 auto; align-self:flex-start; }
.location-actions-menu .profile-dropdown { width:max-content; min-width:230px; max-width:calc(100vw - 32px); }
.location-actions-menu .profile-dropdown button { text-align:left; justify-content:flex-start; }

/* Long location names never dictate control widths or displace actions. */
.location-card-refined .location-name-with-count { align-items:flex-start; }
.location-name-with-count > span:first-child { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.location-name-with-count .location-capacity { margin-top:1px; }
.location-text,.desktop-context-title,.header-mobile-location,.directory-location-context {
 min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.location-text,.header-mobile-location { display:block; }
.locations-heading > div,.brand-wordmark { min-width:0; max-width:100%; }
.location-stat-name { min-width:0; }
.staff-branch > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.custom-select { min-width:0; max-width:100%; }
html[data-theme] :is(.location-select-trigger,#stats-staff + .custom-select-trigger) { min-width:0; max-width:100%; }
:is(.location-select-trigger,#stats-staff + .custom-select-trigger) > span:first-child { flex:1 1 auto; text-align:left; }
:is(.location-select-trigger,#stats-staff + .custom-select-trigger) > .icon { flex-shrink:0; }
.custom-select-option > span { min-width:0; white-space:normal; overflow-wrap:anywhere; text-align:left; }
@media(min-width:651px) {
 .statistics-filters > label { width:220px; max-width:100%; }
 .desktop-context-location .custom-select { min-width:0; max-width:100%; }
}

@media(max-width:1100px) {
 html[data-theme] .directory-page .directory-table tbody td:nth-child(2) { font-size:13px; font-weight:400; line-height:1.45; }
}

/* Director locations: shared directory filters and inset list rows. */
.location-list-filters { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:12px; margin-bottom:20px; }
html[data-theme] .locations-list-page #location-query { width:100%; height:48px; min-height:48px; padding:10px 44px; border:1px solid transparent; border-radius:var(--compact-corner,22px); background:var(--surface); color:var(--ink); font-size:14px; }
.location-list-filters .custom-select-trigger { background:var(--surface); }
.location-list-panel { padding:16px; }
.location-list-columns { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr) minmax(140px,1fr) 76px; gap:20px; padding:12px 20px 20px; }
.location-list-rows { display:grid; gap:8px; }
.location-list-row { min-width:0; background:var(--surface-subtle); border-radius:20px; corner-shape:squircle; }
.location-list-summary { display:flex; align-items:center; gap:8px; padding:16px 20px; }
html[data-theme] .location-list-open { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr) minmax(140px,1fr) 24px; gap:20px; flex:1; min-width:0; padding:0; border:0; background:transparent; color:var(--ink); text-align:left; border-radius:0; }
.location-list-name { min-width:0; align-self:center; }
.location-list-name strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; font-size:16px; font-weight:550; line-height:1.4; }
.location-list-staff { align-self:center; font-size:var(--person-name-size); font-weight:var(--person-name-weight,550); line-height:var(--person-name-line-height); font-variant-numeric:tabular-nums; }
.location-list-staff small { display:none; }
.location-list-managers { display:flex; align-items:center; gap:10px; min-width:0; }
.location-avatar-stack { display:flex; flex:0 0 auto; padding-left:8px; }
.location-avatar-stack > :is(.avatar,.location-avatar-more) { width:34px; height:34px; flex:0 0 34px; border:2px solid var(--surface-subtle); border-radius:50%; margin-left:-8px; box-sizing:border-box; }
.location-avatar-more { display:flex; align-items:center; justify-content:center; background:var(--surface); color:var(--muted); font-size:11px; font-weight:550; }
.location-manager-caption { color:var(--muted); font-size:12px; line-height:1.4; }
.location-list-chevron { display:flex; align-items:center; color:var(--muted); transition:transform 220ms ease; }
.location-list-chevron .icon { width:18px; height:18px; }
.location-list-open:hover:where(:not(html[data-hover-disabled] *)) .location-list-chevron { color:var(--ink); }
.location-list-row.is-open .location-list-chevron { transform:rotate(90deg); }
.location-list-mobile-count { display:none; }
.location-list-summary .location-actions-menu { flex:0 0 36px; }
.location-list-summary .directory-menu-trigger { width:36px; min-width:36px; height:36px; }
.location-list-reveal { display:grid; grid-template-rows:0fr; transition:grid-template-rows 260ms cubic-bezier(.2,.8,.2,1); }
.location-list-reveal > div { overflow:hidden; min-height:0; }
.location-list-row.is-open .location-list-reveal { grid-template-rows:1fr; }
.location-list-details { padding:0 20px 20px; }
.location-list-details .location-admin-title { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; margin-bottom:12px; }
.location-list-details .location-admins { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.location-list-details .location-manager-row { background:var(--surface); }
.location-list-details .admin-empty-slot { margin:0; min-height:64px; }
@media(max-width:1100px) {
 .location-list-columns { grid-template-columns:minmax(0,1.2fr) 90px minmax(130px,1fr) 72px; gap:12px; }
 html[data-theme] .location-list-open { grid-template-columns:minmax(0,1.2fr) 90px minmax(130px,1fr) 20px; gap:12px; }
 .location-list-managers { flex-direction:column; align-items:flex-start; gap:4px; }
}
@media(max-width:650px) {
 .location-list-filters { grid-template-columns:minmax(0,1fr); gap:8px; margin-bottom:16px; }
 .location-list-columns { display:none; }
 .location-list-panel { padding:8px; }
 .location-list-summary { padding:14px 12px; gap:4px; }
 html[data-theme] .location-list-open { grid-template-columns:minmax(0,1fr) 24px; gap:10px; border-radius:0!important; }
 .location-list-name strong { font-size:14px; }
 .location-list-mobile-count { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
 .location-list-staff { display:none; }
 .location-list-managers { grid-column:1; grid-row:2; flex-direction:row; align-items:center; gap:8px; }
 .location-list-chevron { grid-column:2; grid-row:1/3; }
 .location-avatar-stack > :is(.avatar,.location-avatar-more) { width:28px; height:28px; flex-basis:28px; }
 .location-manager-caption { font-size:11px; }
 .location-list-summary .location-actions-menu { align-self:flex-start; }
 .location-list-details { padding:0 12px 14px; }
 .location-list-details .location-admins { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) { .location-list-reveal,.location-list-chevron { transition:none; } }
.location-list-row.is-open .location-list-reveal > div { overflow:visible; }
@media(max-width:650px) {
 .location-list-filters { grid-template-columns:minmax(0,1fr) 48px; align-items:center; }
 .location-list-filters > label:last-child,.location-list-filters > label:last-child .custom-select { width:48px; }
 html[data-theme] #location-managers-filter + .custom-select-trigger {
  width:48px; min-width:48px; height:48px; padding:0; border:0; border-radius:50%!important; corner-shape:round!important; background:var(--surface); color:var(--muted); justify-content:center;
 }
 #location-managers-filter + .custom-select-trigger > span:not(.calendar-position-symbol),#location-managers-filter + .custom-select-trigger > .icon { display:none; }
 #location-managers-filter + .custom-select-trigger .calendar-position-symbol { display:flex; align-items:center; justify-content:center; }
 html[data-theme] #location-managers-filter + .custom-select-trigger.has-filter { color:var(--action); }
}

/* One explicit location action; all management lives in its dialog. */
.location-list-static .location-list-identity { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr) minmax(140px,1fr); gap:20px; flex:1; min-width:0; }
.location-list-static .location-edit-button { flex:0 0 auto; gap:6px; padding-inline:14px; background:var(--surface); color:var(--ink); border:0; font-size:13px; }
.location-edit-button .icon { width:16px; height:16px; }
.location-list-columns { grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr) minmax(140px,1fr) 140px; }
.location-management { display:grid; gap:20px; }
.location-management-identity h3 { font-size:18px; font-weight:550; line-height:1.4; margin:0 0 4px; overflow-wrap:anywhere; }
.location-management-identity p { margin:0; font-size:13px; }
.location-management-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.location-management-actions .button { font-size:13px; padding-inline:10px; gap:6px; }
.location-management-managers .location-admin-title { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.location-management-managers .location-admins { display:grid; gap:8px; }
.location-management-managers .admin-empty-slot { width:100%; margin-top:8px; }
@media(max-width:1100px) {
 .location-list-static .location-list-identity { grid-template-columns:minmax(0,1.2fr) 80px minmax(120px,1fr); gap:12px; }
 .location-list-columns { grid-template-columns:minmax(0,1.2fr) 80px minmax(120px,1fr) 140px; gap:12px; }
}
@media(max-width:650px) {
 .location-list-static { align-items:flex-start; }
 .location-list-static .location-list-identity { grid-template-columns:minmax(0,1fr); gap:10px; }
 .location-list-static .location-edit-button { width:40px; height:40px; min-height:40px; padding:0; border-radius:50%!important; }
 .location-edit-button > span { display:none; }
 .location-management-actions { grid-template-columns:minmax(0,1fr); }
}

/* Shared edge inset for a container holding inset row/card surfaces. */
:root { --nested-surface-inset:16px; }

html[data-theme] :is(.location-list-panel,.team-list.panel,.directory-page .directory-list,.team-workload-content,.manager-workload-content) { padding:var(--nested-surface-inset); }
.settings-positions { padding:var(--nested-surface-inset); }
.settings-positions > .position-archive > summary { margin-inline:8px; }
.location-management-managers .location-admin-title { justify-content:flex-start; margin:0 0 12px; }
.location-management-managers .location-admin-title .heading-count { margin:0; }

/* Light segmented controls: grey track, white selection at every breakpoint. */

@media(max-width:650px) {
 html[data-theme] .location-list-static .location-edit-button { flex:0 0 40px; width:40px; min-width:40px; max-width:40px; height:40px; min-height:40px; max-height:40px; aspect-ratio:1; box-sizing:border-box; }
}
@media(min-width:651px) {
 .location-avatar-stack:not(:empty) + .location-manager-caption { display:none; }
}

.location-avatar-stack { isolation:isolate; }
.location-avatar-stack > .location-avatar-more { position:relative; z-index:1; }
.location-list-name strong { font-size:var(--person-name-size); font-weight:var(--person-name-weight,550); line-height:var(--person-name-line-height); letter-spacing:0; }
@media(min-width:1101px) {
 .location-list-columns { column-gap:32px; grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr) minmax(140px,1fr) 148px; }
 .location-list-static { gap:32px; }
 .location-list-static .location-list-identity { column-gap:32px; }
 .location-list-static .location-edit-button { width:148px; box-sizing:border-box; }
}
@media(min-width:651px) and (max-width:1100px) {
 .location-list-columns { column-gap:20px; grid-template-columns:minmax(0,1.2fr) 80px minmax(120px,1fr) 148px; }
 .location-list-static { gap:20px; }
 .location-list-static .location-list-identity { column-gap:20px; }
 .location-list-static .location-edit-button { width:148px; box-sizing:border-box; }
}

/* Location layouts reuse the staff view switch and the same row content. */
.locations-list-page > .locations-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
@media(min-width:651px) {
 .location-list-panel { --location-name-column:minmax(0,1fr); --location-staff-column:minmax(80px,.8fr); --location-managers-column:minmax(120px,1fr); }
 .location-list-columns { grid-template-columns:var(--location-name-column) var(--location-staff-column) var(--location-managers-column) 148px; }
 .location-list-static .location-list-identity { grid-template-columns:var(--location-name-column) var(--location-staff-column) var(--location-managers-column); }
}
html[data-theme] .location-list-panel.location-view-cards { padding:0; background:transparent; box-shadow:none; }
.location-view-cards .location-list-columns { display:none; }
.location-view-cards .location-list-rows { grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--surface-gap); }
.location-view-cards .location-list-row { background:var(--surface); border-radius:var(--surface-corner,24px); }
.location-view-cards .location-list-summary.location-list-static { display:flex; flex-direction:column; align-items:stretch; gap:20px; padding:var(--surface-inset); height:100%; box-sizing:border-box; }
.location-view-cards .location-list-static .location-list-identity { display:flex; flex-direction:column; align-items:flex-start; gap:12px; flex:1; }
.location-view-cards .location-list-name { align-self:stretch; }
.location-view-cards .location-list-name strong { min-height:calc(var(--person-name-size) * var(--person-name-line-height) * 2); }
.location-view-cards .location-list-mobile-count { display:none; }
.location-view-cards .location-list-staff { display:block; align-self:flex-start; }
.location-view-cards .location-list-staff small { display:inline; color:var(--muted); font-size:12px; font-weight:400; }
.location-view-cards .location-list-managers { flex-direction:row; align-items:center; min-height:34px; }
.location-view-cards .location-list-static .location-edit-button { width:100%; background:var(--surface-subtle); }
.location-view-cards .empty { grid-column:1/-1; }
@media(max-width:1100px) { .location-view-cards .location-list-rows { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) {
 .locations-list-page > .locations-heading { align-items:flex-start; gap:10px; }
 .locations-list-page .locations-heading h1 { font-size:24px; }
 .locations-list-page .team-view-switch { flex-shrink:0; }
 .location-view-cards .location-list-rows { grid-template-columns:minmax(0,1fr); }
 .location-view-cards .location-list-name strong { min-height:0; }
 .location-view-cards .location-list-static .location-edit-button { height:48px; min-height:48px; max-height:none; min-width:0; max-width:none; flex:0 0 auto; aspect-ratio:auto; border-radius:999px!important; }
 .location-view-cards .location-edit-button > span { display:inline; }
}

/* Location cards: clear title, grouped team facts, full-width shared action. */
.location-card-facts { display:contents; }
.location-list-staff > strong { font:inherit; }
.location-view-cards .location-list-summary.location-list-static { gap:16px; }
.location-view-cards .location-list-static .location-list-identity { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:16px; width:100%; }
.location-view-cards .location-list-name strong { min-height:0; font-size:var(--person-name-size); }
.location-view-cards .location-card-facts { display:grid; grid-template-columns:minmax(70px,.7fr) minmax(0,1.3fr); gap:14px; padding:14px; border-radius:16px; corner-shape:squircle; background:var(--surface-subtle); min-width:0; }
.location-view-cards .location-list-staff { display:flex; flex-direction:column; align-self:stretch; justify-content:space-between; gap:10px; }
.location-view-cards .location-list-staff > strong { order:2; font-size:22px; font-weight:550; line-height:34px; }
.location-view-cards .location-list-staff > small { display:block; font-size:12px; line-height:1.4; color:var(--muted); }
.location-view-cards .location-list-managers { display:flex; flex-direction:column-reverse; align-items:flex-start; justify-content:space-between; gap:10px; min-width:0; padding-left:14px; border-left:1px solid var(--line); }
.location-view-cards .location-manager-caption { display:block!important; font-size:12px; line-height:1.4; }
.location-view-cards .location-avatar-stack { min-height:34px; align-items:center; }
html[data-theme] .location-view-cards .location-list-static .location-edit-button {
 display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-width:0; max-width:none; height:48px; min-height:48px; max-height:48px; padding:0 14px; flex:0 0 48px; aspect-ratio:auto; box-sizing:border-box; border:1px solid var(--control-border); background:transparent; color:var(--ink);
}
html[data-theme] .location-view-cards .location-list-static .location-edit-button:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background:var(--surface-subtle); }
html[data-theme] .location-view-cards .location-edit-button > span { display:inline; }
@media(max-width:650px) {
 .location-list-static .location-card-facts { display:contents; }
 .location-view-cards .location-card-facts { display:grid; }
 .location-view-cards .location-avatar-stack > :is(.avatar,.location-avatar-more) { width:32px; height:32px; flex-basis:32px; }
 html[data-theme] .location-view-cards .location-list-static .location-edit-button { height:52px; min-height:52px; max-height:52px; flex-basis:52px; }
}
.location-view-cards .location-card-facts > .location-list-staff { grid-column:1; grid-row:1; }
.location-view-cards .location-card-facts > .location-list-managers { grid-column:2; grid-row:1; }

/* Compact location editor follows the existing identity and inset list patterns. */
html[data-theme] .location-management-dialog .location-compact-head { align-items:flex-start; margin-bottom:20px; gap:12px; }
.location-compact-head > div { min-width:0; flex:1; }
.location-title-line { display:flex; align-items:center; gap:8px; min-width:0; }
.location-title-line h2 { min-width:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.location-compact-head p { font-size:13px; line-height:1.4; margin:4px 0 0; }
html[data-theme] .location-title-line .location-rename-icon { flex:0 0 32px; width:32px; min-width:32px; height:32px; min-height:32px; padding:0; border:0; background:transparent; }
.location-rename-icon .icon { width:16px; height:16px; }
.location-management-managers .location-admin-title { justify-content:space-between; gap:12px; margin-bottom:8px; }
.location-admin-title h3 { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:550; line-height:1.4; color:var(--ink); margin:0; }
html[data-theme] .location-management-managers .location-add-manager { flex:0 0 36px; width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border:0; border-radius:50%!important; corner-shape:round!important; background:var(--surface-subtle); }
.location-add-manager .icon { width:18px; height:18px; }
.location-management-managers .location-admins { padding:var(--nested-surface-inset); gap:0; border-radius:18px; background:var(--surface-subtle); }
.location-management-managers .location-manager-row { padding:8px; border-radius:12px; background:transparent; gap:10px; }
.location-management-managers .location-manager-row > .avatar { width:32px; height:32px; flex-basis:32px; }
.location-management-managers .location-manager-identity strong { font-size:14px; line-height:1.4; }
.location-management-managers .location-manager-identity small { font-size:12px; margin-top:2px; }
html[data-theme] .location-management-dialog .location-management-delete { justify-self:start; border:0; background:transparent; padding:8px 0; min-height:40px; color:var(--danger); font-size:13px; text-decoration:none; }
html[data-theme] .location-management-dialog .location-management-delete:hover:where(:not(html[data-hover-disabled] *)) { color:var(--danger-hover); text-decoration:none; }
.location-managers-empty { margin:8px; color:var(--muted); font-size:13px; }

html[data-theme] .location-title-line .location-rename-icon { display:inline-flex; align-items:center; justify-content:center; align-self:center; margin:0; line-height:1; }
.location-title-line h2 { margin:0; }

/* List actions are icon-only; cards keep the full-width labelled action. */
html[data-theme] .location-list-panel:not(.location-view-cards) .location-list-static .location-edit-button {
 display:flex; align-items:center; justify-content:center; flex:0 0 40px;
 width:40px; min-width:40px; max-width:40px; height:40px; min-height:40px; max-height:40px;
 padding:0; aspect-ratio:1; border-radius:50%!important; corner-shape:round!important;
}
.location-list-panel:not(.location-view-cards) .location-edit-button > span { display:none; }
@media(min-width:651px) {
 .location-list-panel:not(.location-view-cards) .location-list-columns { grid-template-columns:var(--location-name-column) var(--location-staff-column) var(--location-managers-column) 40px; }
}

/* Manager rows are individual inset surfaces within the shared list. */
.location-management-managers .location-admins { gap:8px; }
.location-management-managers .location-manager-row { background:var(--surface); padding:10px; border-radius:14px; corner-shape:squircle; }


/* Managers are visible directly in location cards, without an intermediate editor. */
.location-direct-card.is-readonly .directory-menu { display:none; }
.location-direct-card>.location-readonly-notice {width:100%;margin-block:var(--surface-gap);margin-inline:0}
.workspace > .workspace-readonly-notice { margin:0 0 var(--surface-gap); }
.workspace-readonly-notice .form-note { margin:var(--compact-gap) 0 0; }

.locations-page .location-direct-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; align-items:stretch; }
@media(min-width:760px) { .locations-page .location-direct-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(min-width:1280px) { .locations-page .location-direct-cards { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.location-direct-card .location-card-title { align-items:flex-start; justify-content:space-between; flex-wrap:nowrap; }
.location-direct-card .location-card-title > .location-actions-menu { flex:0 0 36px; }
.location-direct-card .location-card-title h2 { font-size:18px; font-weight:600; margin:0; }
.location-direct-card .location-card-title h2 > span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.location-direct-card .location-admin-title { display:flex; align-items:center; gap:8px; margin:20px 0 10px; }
.location-direct-card .location-admins { gap:8px; }
.location-direct-card .location-manager-identity strong { font-size:14px; font-weight:550; line-height:1.4; }
html[data-theme] body .location-direct-card .admin-empty-slot { width:100%; min-height:56px; padding:12px; border:1px dashed color-mix(in srgb,var(--muted) 30%,var(--line)); border-radius:16px!important; corner-shape:squircle!important; margin:4px 0 0; color:var(--muted); background:transparent; font-size:14px; }
html[data-theme] body .location-direct-card .admin-empty-slot:hover:where(:not(html[data-hover-disabled] *)) { border-color:var(--muted); color:var(--ink); background:transparent; }
html[data-theme] body .location-direct-card .admin-empty-slot:active { border-color:var(--ink); background:var(--surface-subtle); }
.location-direct-card .location-actions-menu > .directory-menu-trigger { width:36px; height:36px; min-width:36px; min-height:36px; padding:0; display:flex; align-items:center; justify-content:center; }
@media(max-width:650px) {
 html[data-theme] .location-direct-card { padding:16px; }
 .location-direct-card .location-card-title h2 { font-size:16px; }
 .location-direct-card .location-manager-row { padding:10px; gap:10px; }
 .location-direct-card .location-manager-row > .avatar { width:36px; height:36px; flex-basis:36px; }
}
.location-direct-card .location-admin-title { justify-content:flex-start; }
.location-direct-card .location-admin-title .heading-count { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 6px; background:var(--surface-subtle); border-radius:8px; font-size:12px; font-weight:550; }

/* Entity action menus share the employee menu typography. */
:root { --action-menu-font-size:14px; --action-menu-font-weight:500; }
html[data-theme] .directory-menu .profile-dropdown .text-button {
 font-family:inherit;
 font-size:var(--action-menu-font-size);
 font-weight:var(--action-menu-font-weight);
 line-height:1.4;
 display:flex; align-items:center; justify-content:flex-start; text-align:left;
 min-height:48px; padding:12px 14px; text-decoration:none;
}

/* Empty locations offer one clear next step, without a redundant zero badge. */
.location-team-empty { display:flex; align-items:flex-start; gap:12px; padding:16px; margin-bottom:4px; background:var(--surface-subtle); border-radius:16px; corner-shape:squircle; }
.location-team-empty > .icon { flex:0 0 22px; width:22px; height:22px; margin-top:1px; color:var(--muted); }
.location-team-empty > div { min-width:0; }
.location-team-empty strong { display:block; color:var(--ink); font-size:14px; font-weight:550; line-height:1.4; }
.location-team-empty p { color:var(--muted); font-size:12px; line-height:1.5; margin:5px 0 0; max-width:32ch; }

/* Keep the statistics toolbar on one line on tablets; reuse compact filter icons. */
@media (min-width:651px) and (max-width:1399px) {
 html[data-theme] .statistics-page:not(.employee-statistics-page) > .statistics-controls,
 .statistics-page:not(.employee-statistics-page) > .statistics-overview > .statistics-controls {
  display:flex; flex-flow:row nowrap; align-items:center; gap:10px;
 }
 html[data-theme] .statistics-controls > .statistics-filters {
  display:flex; width:auto; flex:0 0 auto; gap:8px; margin:0;
 }
 html[data-theme] .statistics-controls .statistics-filters > label,
 html[data-theme] .statistics-controls .statistics-filters .custom-select { width:48px; flex:0 0 48px; margin:0; }
 html[data-theme] .statistics-controls > .statistics-period { display:contents; }
 html[data-theme] .statistics-controls .statistics-range { flex:0 0 auto; margin-left:auto; }
 html[data-theme] .statistics-controls .statistics-range > button { padding-inline:14px; }
 html[data-theme] .statistics-controls .period { flex:0 1 300px; min-width:0; margin:0; }
 html[data-theme] .statistics-controls .date-range-trigger { width:100%; min-width:0; padding-inline:12px; font-size:14px; }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger {
  display:flex; align-items:center; justify-content:center; width:48px; height:48px;
  min-height:48px; padding:0; gap:0; border:0; border-radius:50%!important; corner-shape:round!important; background:var(--surface); color:var(--muted);
 }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger > span:not(.calendar-position-symbol),
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger > .icon { display:none; }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger > .calendar-position-symbol { display:flex; align-items:center; justify-content:center; }
 html[data-theme] :is(#stats-location,#stats-staff) + .custom-select-trigger.has-filter { color:var(--action); }
}

/* Period first, location and employee filters at the right end of the toolbar. */
@media (min-width:651px) {
 html[data-theme] .statistics-controls > .statistics-filters { order:2; flex:0 0 auto; }
 html[data-theme] .statistics-controls > .statistics-period { order:1; margin-left:0; }
}
@media (min-width:651px) and (max-width:1399px) {
 html[data-theme] .statistics-controls .statistics-range { order:0; margin-left:0; }
 html[data-theme] .statistics-controls .period { order:1; margin-left:auto; }
}

/* Location names share typography in the header and location cards. */
html[data-theme] .desktop-context-title,
html[data-theme] .header-mobile-location,
html[data-theme] .location-direct-card .location-card-title h2 {
 font-size:var(--location-title-size)!important;
 font-weight:var(--location-title-weight)!important;
 line-height:1.4;
 letter-spacing:-.2px;
}

/* Tablet lists retain desktop column labels and the same aligned column grid. */
@media (min-width:651px) and (max-width:1100px) {
 .unified-staff-list { --staff-list-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 80px; }
 .staff-list-columns { display:grid; gap:12px; }
 html[data-theme] .team-list-row.unified-staff-row { grid-template-columns:var(--staff-list-columns); gap:12px; }
 .unified-staff-row > .staff-list-position { display:block; }
 html[data-theme] .unified-staff-row .staff-list-mobile-position { display:none!important; }
 .unified-staff-row > .staff-list-actions { grid-column:4; grid-row:1; }
 .workload-list-columns,
 .unified-workload-list > .workload-row { display:grid; grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,.6fr)); gap:12px; }
 .workload-list-columns { padding-inline:16px; font-size:12px; }
 .unified-workload-list > .workload-row { padding:16px; align-items:center; }
 .unified-workload-list > .workload-row > .workload-hours { display:contents; }
 .unified-workload-list .workload-hours > div { min-width:0; padding:0; border:0; background:transparent; }
 .unified-workload-list .workload-hours dt { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); }
 .unified-workload-list .workload-hours dd { margin:0; font-size:20px; }
 html[data-theme] .directory-page .directory-table { --tablet-directory-columns:minmax(0,1.5fr) minmax(0,.95fr) minmax(0,1fr) minmax(0,.8fr) 36px; }
 html[data-theme] .directory-page .directory-table thead { display:block; }
 html[data-theme] .directory-page .directory-table tr { display:grid; grid-template-columns:var(--tablet-directory-columns); align-items:center; gap:12px; padding:16px; }
 html[data-theme] .directory-page .directory-table thead tr { background:transparent; border:0; }
 html[data-theme] .directory-page .directory-table th,
 html[data-theme] .directory-page .directory-table td { grid-column:auto; grid-row:auto; min-width:0; width:auto; padding:0; justify-self:stretch; }
 html[data-theme] .directory-page .directory-table th { text-align:left; font-size:12px; }
 html[data-theme] .directory-page .directory-table .directory-permission-label { display:none; }
 html[data-theme] .directory-page .directory-table .person { gap:8px; }
 html[data-theme] .directory-page .directory-table .person > .avatar { width:32px; height:32px; flex-basis:32px; }
}

/* Keep the document on one horizontal axis; carousels and tables scroll locally. */
@media(max-width:1100px) {
 html,body { width:100%; max-width:100%; overflow-x:hidden; overscroll-behavior-x:none; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
 @supports(overflow:clip) { html,body { overflow-x:clip; } }
 .main,.workspace,.topbar-panel { min-width:0; max-width:100%; }
 .mini-team-grid,.planner-scroll,.manager-planner-scroll { overscroll-behavior-x:contain; }
}
@media(max-width:650px) {
 .team-heading-actions { min-width:0; max-width:100%; flex-wrap:wrap; }
 .team-scroll-controls { flex:0 0 auto; margin-left:auto; }
}
/* Native editable fields must not trigger Safari's automatic focus zoom. */
@supports(-webkit-touch-callout:none) {
 @media(hover:none) and (pointer:coarse) {
  html[data-theme] :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']),textarea,select) { --control-text-size:16px; }
 }
}
/* Phone team controls: heading and arrows share a row, tabs sit directly below. */
@media(max-width:650px) {
 .mini-team-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; }
 .mini-team-heading > h2 { grid-column:1; grid-row:1; margin:0; }
 .mini-team-heading > .team-heading-actions { display:contents; }
 .mini-team-heading .team-scroll-controls { grid-column:2; grid-row:1; margin:0; }
 .mini-team-heading .team-status-switch { grid-column:1 / -1; grid-row:2; width:100%; min-width:0; }
 .mini-team-heading .team-status-switch > button { flex:1 1 0; min-width:0; }
 html[data-theme] .mini-team-heading .team-scroll-arrow { width:44px; min-width:44px; height:44px; min-height:44px; padding:0; }
}
/* Standard phones fit tabs and arrows together; compact phones retain safe targets. */
@media(min-width:375px) and (max-width:650px) {
 .mini-team-heading { column-gap:6px; }
 .mini-team-heading > h2 { grid-column:1 / -1; }
 .mini-team-heading .team-status-switch { grid-column:1; grid-row:2; }
 .mini-team-heading .team-scroll-controls { grid-column:2; grid-row:2; }
 html[data-theme] .mini-team-heading .team-status-switch > button { justify-content:center; flex:1 1 auto; padding-inline:8px; gap:6px; font-size:13px; }
 .mini-team-heading .team-scroll-controls { gap:2px; }
}

/* Director management reuses the existing directory, locations and positions views. */
.management-page { min-width:0; }
.organization-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); align-items:stretch; gap:var(--surface-gap); margin-bottom:var(--surface-gap); }
.organization-overview>.settings-card { width:100%; align-items:stretch; }
.organization-overview-card .settings-section-heading { min-width:0; }
.organization-overview-card h2 { overflow-wrap:anywhere; }
.organization-overview-card>.button { align-self:flex-start; margin:auto 0 0; }
.organization-overview-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--compact-gap); }
.organization-overview-metrics>div { display:grid; gap:var(--compact-gap); padding:var(--compact-gap); background:var(--surface-subtle); border-radius:var(--small-control-corner); min-width:0; }
.organization-overview-metrics dt { color:var(--muted); font-size:var(--panel-caption-size,12px); line-height:1.5; overflow-wrap:anywhere; }
.organization-overview-metrics dd { margin:0; color:var(--ink); font-size:var(--panel-section-title-size,20px); font-weight:550; line-height:1.3; font-variant-numeric:tabular-nums; }
.organization-team-chart { display:grid; gap:var(--compact-gap); min-width:0; margin:0; padding:var(--surface-gap); background:var(--surface-subtle); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.organization-team-chart>figcaption { font-size:var(--panel-body-size,14px); font-weight:550; line-height:1.4; color:var(--ink); }
.organization-team-legend { display:flex; flex-wrap:wrap; gap:var(--compact-gap) var(--surface-gap); color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.organization-team-chart .is-employees { --team-series-color:var(--control-accent); }
.organization-team-chart .is-managers { --team-series-color:color-mix(in srgb,var(--control-accent) 40%,var(--surface)); }
.organization-team-legend>span,.organization-team-counts>span { display:inline-flex; align-items:center; gap:4px; }
.organization-team-legend>span::before,.organization-team-counts>span::before { content:''; width:var(--compact-gap); height:var(--compact-gap); flex:0 0 var(--compact-gap); border-radius:50%; background:var(--team-series-color); }
.organization-team-rows { display:grid; gap:var(--compact-gap); }
.organization-team-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) auto; align-items:center; gap:var(--compact-gap); min-width:0; font-size:var(--person-title-size,12px); line-height:1.5; }
.organization-team-name { min-width:0; color:var(--ink); overflow-wrap:anywhere; }
.organization-team-row>.organization-team-bar { display:block; width:100%; height:var(--compact-gap); min-width:0; overflow:hidden; border-radius:999px; corner-shape:round; }
.organization-team-track { fill:var(--surface); }
.organization-team-bar>rect:is(.is-employees,.is-managers) { fill:var(--team-series-color); }
.organization-team-counts { display:grid; grid-template-columns:repeat(2,4ch); gap:var(--compact-gap); color:var(--ink); font-variant-numeric:tabular-nums; }
.organization-team-counts>span { display:grid; grid-template-columns:var(--compact-gap) minmax(0,1fr); text-align:right; }
@supports(grid-template-columns:subgrid) {
 .organization-team-rows { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) max-content max-content; }
 .organization-team-row { grid-column:1 / -1; grid-template-columns:subgrid; }
 .organization-team-counts { grid-column:3 / 5; grid-template-columns:subgrid; }
}
.organization-access-list { display:grid; min-width:0; }
.organization-access-list .organization-access-row { gap:var(--compact-gap); padding:12px 0; background:transparent; border-radius:0; }
.organization-access-list>.organization-access-row+.organization-access-row { border-top:1px solid var(--line); }
.organization-access-description { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px; margin-top:var(--identity-gap); font-size:var(--person-title-size,12px); line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
html[data-theme] {
 --status-review-ink:var(--notice-warning); --status-review-fill:color-mix(in srgb,var(--status-review-ink) 8%,var(--surface));
 --status-open-ink:var(--status-recruiting); --status-open-fill:color-mix(in srgb,var(--status-open-ink) 8%,var(--surface));
 --status-active-ink:var(--status-positive); --status-active-fill:color-mix(in srgb,var(--status-active-ink) 8%,var(--surface));
}
html[data-theme="dark"] {
 --status-review-ink:var(--notice-warning);
 --status-open-ink:var(--status-recruiting);
 --status-active-ink:var(--status-positive);
}
html[data-theme] { --status-recruiting:#165ec3; --review-ink:#955100; --review-fill:#fff0cf; --recruiting-fill:#e3efff; }
html[data-theme='dark'] { --status-recruiting:#94bff1; --review-ink:var(--notice-warning); --review-fill:#463725; --recruiting-fill:#28394f; }
.organization-access-role { --role-accent:var(--muted); --role-fill:var(--personal-board); display:inline-flex; align-items:center; gap:4px; padding:0 var(--compact-gap); border-radius:var(--small-control-corner); background:var(--role-fill); color:var(--role-accent); }
.organization-access-role.is-owner { --role-accent:var(--status-recruiting); --role-fill:var(--recruiting-fill); }
.organization-access-scope { min-width:0; }
.organization-access-role>.icon { width:14px; height:14px; flex:0 0 14px; }
.organization-access-card>.organization-managers-more { justify-content:flex-start; width:100%; margin-top:auto; background:var(--surface-subtle); color:var(--ink); }
.organization-managers-more>span { flex:1; min-width:0; text-align:left; }
.organization-managers-more:hover:where(:not(html[data-hover-disabled] *)) { background:var(--surface-subtle-hover); }
.organization-managers-results { display:grid; gap:var(--surface-gap); min-width:0; }
.organization-managers-dialog .directory-field { margin:0; }
@media(max-width:1100px){.organization-overview{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.organization-overview-card>.button{width:100%;align-self:stretch}}
.management-tabs { display:inline-flex; width:auto; max-width:100%; margin:0 0 var(--surface-gap); }
.management-tabs > button { justify-content:center; white-space:nowrap; }
.settings-positions>.management-tabs { align-self:flex-start; margin:0; }
.management-content { min-width:0; }
.management-section-title { margin:0; font-size:24px; font-weight:650; line-height:1.25; letter-spacing:-.5px; }
.management-content .settings-positions { width:100%; }
@media(max-width:650px) {
 .management-tabs { display:flex; width:100%; margin-bottom:var(--surface-gap); }
 html[data-theme] body .management-tabs > button { flex:1 1 0; min-width:0; }
 .management-section-title { font-size:20px; }
}
.positions-page > .settings-positions > .position-settings-heading { margin:0; align-items:center; gap:var(--surface-gap); }
.positions-page > .settings-positions > .position-settings-heading .heading-count{background:var(--surface-subtle)}
.positions-page > .settings-positions > .position-settings-heading .settings-section-heading { margin:0; }
.positions-page > .settings-positions > .position-settings-heading h2 { font-size:24px; font-weight:650; line-height:1.25; letter-spacing:-.5px; }
.positions-page > .settings-positions > .position-settings-heading p { margin-top:var(--page-caption-space); }
.positions-page > .settings-positions { margin:0; }
@media(max-width:650px) {
 .positions-page > .settings-positions > .position-settings-heading h2 { font-size:20px; }
}
.management-page .directory-page > .locations-heading { display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between; gap:16px; }
.management-add { flex:0 0 auto; white-space:nowrap; }
.people-filters .management-add { display:none; }
@media(max-width:650px) {
 html[data-theme] body .management-add { display:inline-flex; align-items:center; justify-content:center; width:48px; min-width:48px; height:48px; min-height:48px; flex:0 0 48px; padding:0; border-radius:50%!important; corner-shape:round!important; }
 .management-add > span { display:none; }
 html[data-theme] .people-filters:has(.management-add) .directory-filters { grid-template-columns:minmax(0,1fr) 48px 48px; }
 .management-page .directory-page > .locations-heading > div { min-width:0; }
}
@media(max-width:650px) {
 html[data-theme] body .management-add.management-add { box-sizing:border-box; width:48px!important; min-width:48px!important; max-width:48px!important; height:48px!important; min-height:48px!important; max-height:48px!important; aspect-ratio:1; flex:0 0 48px!important; padding:0!important; }
}
.team-toolbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex:0 0 auto; }
.team-create-desktop { white-space:nowrap; }
@media(max-width:650px) {
 .team-toolbar-actions > .team-create-desktop { display:none; }
 .team-toolbar-actions { gap:0; }
}
@media(min-width:651px) {
 .team-section .people-filters .directory-filters { grid-template-columns:minmax(0,1fr) minmax(160px,220px) auto; align-items:center; }
 .team-section .people-filters .team-view-switch { flex:0 0 auto; margin:0; }
}

.team-heading-copy { min-width:0; }
.team-heading-copy > p { margin:var(--page-caption-space) 0 0; font-size:14px; line-height:1.5; }
@media(max-width:650px) { .team-heading-copy > p { margin-top:var(--page-caption-space); font-size:13px; } }
/* Dialogs have a single clear title, without an uppercase category above it. */
html[data-theme] body :is(#modal,#owner-modal) .modal-head { align-items:center; }
html[data-theme] body :is(#modal,#owner-modal) .modal-head>div:first-child { min-width:0; }
html[data-theme] body :is(#modal,#owner-modal) .modal-head h2 { display:flex;align-items:center;min-height:var(--control-height);margin:0; }
html[data-theme] body :is(#modal,#owner-modal) .modal-head>button { flex-shrink:0; }
html[data-theme] body :is(#modal,#owner-modal) .modal-head:has(>div>p)>button { align-self:flex-start; }
/* Creation actions use the same typography as primary form actions. */
html[data-theme] body :is(.management-add,.team-create-desktop,.creation-action) {
 font-size:14px; font-weight:500; line-height:1.4; gap:8px;
}


/* Navigation introduction: top-layer spotlight without changing target layout. */
html.smeno-tour-open { overflow:hidden; }
html[data-theme] body dialog.onboarding-tour {
 --onboarding-dim:rgb(0 0 0 / .32);
 position:fixed; inset:0; width:100%; height:100dvh; max-width:none; max-height:none;
 margin:0; padding:0; border:0; border-radius:0; corner-shape:round; background:transparent; color:var(--ink);
 box-shadow:none; overflow:hidden; overscroll-behavior:contain; animation:none;
}
html[data-theme='dark'] body dialog.onboarding-tour { --onboarding-dim:rgb(0 0 0 / .52); }
html[data-theme] body dialog.onboarding-tour::backdrop {
 background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; animation:none;
}
.onboarding-spotlight {
 position:absolute; pointer-events:none; border:1.5px solid var(--action);
 border-radius:18px; corner-shape:var(--surface-curve);
 box-shadow:0 0 0 100vmax var(--onboarding-dim),0 0 0 3px color-mix(in srgb,var(--action) 12%,transparent);
}
.onboarding-card {
 position:absolute; box-sizing:border-box; padding:16px; overflow:auto;
 border-radius:var(--compact-corner); corner-shape:var(--surface-curve);
 background:var(--surface); color:var(--ink); box-shadow:0 12px 40px rgb(0 0 0 / .16);
 scrollbar-width:thin; overscroll-behavior:contain;
}
.onboarding-eyebrow { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; line-height:1.5; }
.onboarding-eyebrow > span:last-child { font-variant-numeric:tabular-nums; }
.onboarding-progress { display:flex; gap:4px; margin:8px 0 12px; }
.onboarding-progress i { flex:1; height:3px; border-radius:3px; background:var(--surface-subtle); }
.onboarding-progress i.is-filled { background:var(--control-accent); }
.onboarding-copy h2 { margin:0 0 6px; font-size:18px; font-weight:550; line-height:1.3; letter-spacing:-.4px; }
.onboarding-copy p { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.onboarding-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:14px; }
.onboarding-actions > div { display:flex; gap:8px; }
html[data-theme] .onboarding-actions .button { min-height:44px; padding:10px 14px; font-size:13px; }
html[data-theme] .onboarding-actions .onboarding-skip { min-height:44px; padding:8px 0; border:0; background:transparent; color:var(--muted); font-size:12px; box-shadow:none; }
html[data-theme] .onboarding-actions .onboarding-skip:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
@media(max-width:650px) {
 .onboarding-card { padding:16px; }
 html[data-theme] .onboarding-actions .button { min-height:52px; padding-inline:14px; }
 html[data-theme] .onboarding-actions .onboarding-skip { min-height:52px; }
}
@media(prefers-reduced-motion:no-preference) {
 .onboarding-card { animation:onboarding-appear 180ms ease-out; }
 @keyframes onboarding-appear { from { opacity:0; } to { opacity:1; } }
}

/* Staff list experiment: continuous rows on one surface, with quiet dividers. */
html[data-theme] body .team-list.panel.unified-staff-list { gap:0; }
html[data-theme] body .unified-staff-list > .staff-list-columns {
 margin:0; padding:4px 0 12px; border-bottom:0;
}
html[data-theme] body .unified-staff-list > .team-list-row.unified-staff-row {
 min-height:76px; margin:0; padding:16px 0; border:0; border-radius:0;
 corner-shape:round; background:transparent; box-shadow:none;
}
html[data-theme] body .unified-staff-list > .team-list-row.unified-staff-row + .team-list-row.unified-staff-row {
 margin:0; border-top:1px solid var(--line);
}
@media(min-width:651px) {
 .unified-staff-list > .staff-list-columns > span:last-child { text-align:center; }
 .unified-staff-list > .unified-staff-row > .staff-list-actions { justify-content:center; }
}
html[data-theme] body .unified-staff-list > .unified-staff-row > .team-list-person { align-items:center; gap:12px; }
html[data-theme] body .unified-staff-list > .unified-staff-row .team-list-person > .avatar { width:40px; height:40px; flex-basis:40px; }
@media(max-width:650px) {
 html[data-theme] body .unified-staff-list > .team-list-row.unified-staff-row { padding:14px 0; }
 html[data-theme] body .unified-staff-list > .unified-staff-row > .team-list-person { align-items:flex-start; gap:10px; }
}

/* Shared plain-list treatment. Card views and calendar cells retain their surfaces. */
html[data-theme] body :is(.position-settings-list,.position-archive > div,.workload-list,.location-admins) { gap:0; }
html[data-theme] body :is(.position-settings-list,.position-archive > div) { grid-template-columns:minmax(0,1fr); }
html[data-theme] body :is(.position-settings-row,.workload-row,.location-manager-row) {
 margin:0; padding:16px 0; border:0; border-radius:0; corner-shape:round;
 background:transparent; box-shadow:none;
}
html[data-theme] body :is(.position-settings-row,.workload-row,.location-manager-row) + :is(.position-settings-row,.workload-row,.location-manager-row) {
 border-top:1px solid var(--line);
}
html[data-theme] body :is(.workload-list-columns,.settings-positions > .position-settings-heading) { padding-inline:0; }
html[data-theme] body .settings-positions > .position-archive > summary { margin-inline:0; }
html[data-theme] body .workload-row .workload-hours { background:transparent; padding-inline:0; border-radius:0; }
html[data-theme] body .workload-more { margin-top:0; border-top:1px solid var(--line); }
html[data-theme] body .location-management-managers .location-admins { background:transparent; padding:0; border-radius:0; }
html[data-theme] body .location-admins > .admin-empty-slot { margin-top:8px; }

/* Desktop table dividers belong to cells; compact layouts use one border per row. */
html[data-theme] body :is(.directory-table,.statistics-table).unified-data-table { border-collapse:separate; border-spacing:0; }
html[data-theme] body :is(.directory-table,.statistics-table).unified-data-table tbody { gap:0; }
html[data-theme] body :is(.directory-table,.statistics-table).unified-data-table tbody tr {
 margin:0; border:0; border-radius:0; corner-shape:round; background:transparent; box-shadow:none;
}
html[data-theme] body :is(.directory-table,.statistics-table).unified-data-table tbody td {
 border-radius:0; corner-shape:round; background:transparent; box-shadow:none;
}
html[data-theme] body :is(.directory-table,.statistics-table).unified-data-table tbody tr > td:is(:first-child,:last-child) {
 border-radius:0; corner-shape:round; background:transparent;
}
@media(min-width:1101px) {
 html[data-theme] body .directory-table.unified-data-table :is(th,td) { padding:16px 12px; }
 html[data-theme] body .directory-table.unified-data-table :is(th,td):first-child { padding-left:0; }
 html[data-theme] body .directory-table.unified-data-table :is(th,td):last-child { padding-right:0; }
 html[data-theme] body .directory-table.unified-data-table thead th { border-bottom:1px solid var(--line); }
 html[data-theme] body .directory-table.unified-data-table tbody tr + tr > td { border-top:1px solid var(--line); }
}
@media(min-width:651px) {
 html[data-theme] body .statistics-table.unified-data-table :is(th,td) { padding:16px 12px; }
 html[data-theme] body .statistics-table.unified-data-table :is(th,td):first-child { padding-left:0; }
 html[data-theme] body .statistics-table.unified-data-table :is(th,td):last-child { padding-right:0; }
 html[data-theme] body .statistics-table.unified-data-table thead th { border-bottom:1px solid var(--line); }
 html[data-theme] body .statistics-table.unified-data-table tbody tr + tr > td { border-top:1px solid var(--line); }
}
@media(max-width:1100px) {
 html[data-theme] body .directory-page .directory-table tbody tr { padding:16px 0; }
 html[data-theme] body .directory-page .directory-table tbody tr + tr { border-top:1px solid var(--line); }
 html[data-theme] body .directory-page .directory-table thead tr { padding-inline:0; }
}
@media(max-width:650px) {
 html[data-theme] body :is(.position-settings-row,.workload-row,.location-manager-row) { padding-block:14px; }
 html[data-theme] body .statistics-table.unified-data-table .statistics-person-row { padding:14px 0; margin:0; }
 html[data-theme] body .statistics-table.unified-data-table .statistics-person-row + .statistics-person-row { margin:0; border-top:1px solid var(--line); }
 html[data-theme] body .statistics-table.unified-data-table .statistics-person-row > td[data-label] { background:transparent; }
}
/* Location list mode uses the same rows; its optional card view is unchanged. */
html[data-theme] body .location-list-panel:not(.location-view-cards) .location-list-rows { gap:0; }
html[data-theme] body .location-list-panel:not(.location-view-cards) .location-list-row { border-radius:0; background:transparent; }
html[data-theme] body .location-list-panel:not(.location-view-cards) .location-list-row + .location-list-row { border-top:1px solid var(--line); }


/* Icon-rail labels: custom hover and keyboard hints, without layout changes. */
.rail-tooltip { display:none; }
@media(min-width:651px) {
 .icon-rail :is(.rail-button,.rail-brand) { position:relative; }
 .icon-rail .rail-tooltip {
  display:block; position:absolute; z-index:30; left:calc(100% + 12px); top:50%;
  transform:translateY(-50%); width:max-content; max-width:240px; padding:9px 13px;
  border-radius:12px; corner-shape:var(--surface-curve);
  background:var(--ink); color:var(--surface); box-shadow:0 4px 16px rgb(0 0 0 / .12);
  font-size:12px; font-weight:500; line-height:1.4; text-align:left; white-space:normal;
  visibility:hidden; opacity:0; pointer-events:none;
 }
 .icon-rail .rail-tooltip::before { content:''; position:absolute; inset:0 100% 0 auto; width:12px; }
 .icon-rail :is(.rail-button,.rail-brand):focus-visible:not([data-tooltip-dismissed]) > .rail-tooltip {
  visibility:visible; opacity:1; pointer-events:auto;
 }
 html.smeno-tour-open .icon-rail .rail-tooltip { display:none; }
}
@media(min-width:651px) and (hover:hover) and (pointer:fine) {
 .icon-rail :is(.rail-button,.rail-brand):hover:where(:not(html[data-hover-disabled] *)):not([data-tooltip-dismissed]) > .rail-tooltip {
  visibility:visible; opacity:1; pointer-events:auto;
 }
}
@media(prefers-reduced-motion:no-preference) {
 .icon-rail .rail-tooltip { transition:opacity 140ms ease,visibility 140ms; }
 .icon-rail :is(.rail-button,.rail-brand):hover:where(:not(html[data-hover-disabled] *)) > .rail-tooltip { transition-delay:180ms; }
}


/* Period comparison: compact cards with dates beside the matching values. */
/* Statistics activity uses shared surfaces with semantic status accents. */
.statistics-activity { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:var(--surface-gap); min-width:0; }
.statistics-activity-card { align-items:stretch; }
.statistics-activity-heading { display:flex; align-items:flex-start; flex-wrap:wrap; gap:var(--compact-gap); min-width:0; }
.statistics-activity-heading>.settings-section-heading { flex:1; min-width:0; }
html[data-theme] .statistics-activity-heading>.statistics-activity-period { width:auto; max-width:100%; margin-left:auto; }
.statistics-activity-period>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.statistics-activity-period>.icon:last-child { transform:rotate(90deg); }
.statistics-activity-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--surface-gap); }
.statistics-activity-tile { display:grid; align-content:start; gap:var(--surface-gap); min-width:0; padding:var(--surface-gap); background:var(--surface-subtle); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.statistics-activity-tile h3 { display:flex; align-items:flex-start; gap:var(--compact-gap); min-width:0; margin:0; font-size:var(--panel-body-size,14px); font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.statistics-activity-tile h3>span:not(.statistics-request-count) { min-width:0; flex:1; }
.statistics-reason-symbol { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:18px; color:var(--muted); }
.statistics-reason-symbol>.icon { width:18px; height:18px; }
.statistics-activity-tile.is-approved,.statistics-activity-tile.is-pending { gap:var(--compact-gap); }
.statistics-activity-tile.is-approved { background:color-mix(in srgb,var(--status-positive) 6%,var(--surface)); }
.statistics-activity-tile.is-pending { background:color-mix(in srgb,var(--action) 6%,var(--surface)); }
.statistics-activity-tile:is(.is-approved,.is-pending)>h3>.icon { width:18px; height:18px; flex:0 0 18px; align-self:center; }
.statistics-activity-tile.is-approved>h3>.icon { color:var(--status-positive); }
.statistics-activity-tile.is-pending>h3>.icon { color:var(--action); }
.statistics-absence-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--compact-gap); }
.statistics-absence-totals>div { display:flex; align-items:baseline; justify-content:space-between; gap:var(--compact-gap); min-width:0; }
.statistics-absence-totals dt { color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.statistics-absence-totals dd { margin:0; font-size:20px; font-weight:550; line-height:1.3; font-variant-numeric:tabular-nums; }
.statistics-request-tile { border:0; background:var(--surface-subtle); }
.statistics-request-count { margin-left:auto; color:var(--ink); font-size:26px; font-weight:550; line-height:1.3; font-variant-numeric:tabular-nums; }
.statistics-request-totals { display:grid; }
.statistics-request-totals>div { --request-color:var(--muted); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:var(--compact-gap); padding:var(--compact-gap) 0; }
.statistics-request-totals>div+div { border-top:1px solid var(--line); }
.statistics-request-totals>.is-pending { --request-color:var(--action); }
.statistics-request-totals>.is-closed { --request-color:var(--status-positive); }
.statistics-request-totals>.is-cancelled { --request-color:var(--danger); }
.statistics-request-totals dt { display:flex; align-items:baseline; gap:var(--compact-gap); min-width:0; color:var(--muted); font-size:var(--panel-body-size,14px); line-height:1.5; overflow-wrap:anywhere; }
.statistics-request-totals dt::before { content:''; flex:0 0 var(--compact-gap); width:var(--compact-gap); height:var(--compact-gap); border-radius:50%; background:var(--request-color); }
.statistics-request-totals dd { margin:0; font-size:var(--panel-body-size,14px); font-weight:550; font-variant-numeric:tabular-nums; }
.statistics-absence-reasons { width:100%; table-layout:fixed; border-collapse:collapse; font-size:var(--person-title-size,12px); line-height:1.5; }
.statistics-absence-reason-column { width:40%; }
.statistics-absence-reasons th,.statistics-absence-reasons td { padding:var(--compact-gap); border-bottom:1px solid var(--line); text-align:left; overflow-wrap:anywhere; vertical-align:middle; }
.statistics-absence-reasons thead th { color:var(--muted); font-weight:500; background:var(--surface-subtle); }
.statistics-absence-reasons thead th:first-child { border-top-left-radius:var(--small-control-corner); }
.statistics-absence-reasons thead th:last-child { border-top-right-radius:var(--small-control-corner); }
.statistics-absence-reasons tbody th { font-weight:550; }
.statistics-table-status { display:flex; align-items:center; gap:4px; min-width:0; }
.statistics-table-status>.icon { width:14px; height:14px; flex:0 0 14px; color:var(--muted); }
.statistics-table-status.is-approved>.icon { color:var(--status-positive); }
.statistics-table-status.is-pending>.icon { color:var(--status-review-ink); }
.statistics-reason-label { display:flex; align-items:center; gap:var(--compact-gap); min-width:0; }
.statistics-reason-value { display:inline-block; }
.statistics-reason-value strong { font-weight:550; }
.statistics-activity-card>.statistics-activity-note { margin:0; }

@media(max-width:1100px) { .statistics-activity { grid-template-columns:minmax(0,1fr); } }
@media(max-width:650px) {
 .statistics-activity-tiles { grid-template-columns:minmax(0,1fr); }
 .statistics-absence-totals dd { font-size:18px; }
 .statistics-request-count { font-size:22px; }
 html[data-theme] .statistics-activity-heading>.statistics-activity-period { width:100%; margin:0; }
 .statistics-absence-reason-column { width:34%; }
 .statistics-absence-reasons col:nth-child(2) { width:38%; }
 .statistics-absence-reasons thead th { vertical-align:bottom; }
 .statistics-absence-reasons .statistics-table-status { flex-direction:column; align-items:flex-start; gap:4px; white-space:nowrap; overflow-wrap:normal; }
 .statistics-absence-reasons th,.statistics-absence-reasons td { padding-inline:4px; }
 .statistics-reason-label { flex-wrap:wrap; }
}

.period-comparison.comparison-flat { --comparison-chart-height:160px; padding:var(--surface-inset); background:var(--surface); box-shadow:none; }
.comparison-flat>.comparison-section-heading { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,360px) max-content; align-items:center; gap:var(--surface-gap); margin-bottom:var(--surface-gap); }
.comparison-flat>.comparison-section-heading:not(:has(.comparison-period-note)) { grid-template-columns:minmax(0,1fr) max-content; }
.comparison-section-heading>.settings-section-heading { min-width:0; }
.comparison-period-note { display:flex; align-items:center; box-sizing:border-box; gap:var(--compact-gap); min-width:0; height:var(--control-height); padding:0 var(--surface-gap); background:color-mix(in srgb,var(--action) 8%,var(--surface)); border-radius:var(--compact-corner); corner-shape:var(--surface-curve); }
.comparison-period-note>.icon { flex:0 0 20px; width:20px; height:20px; color:var(--action); }
.comparison-period-note>div { min-width:0; }
.comparison-period-note strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--panel-body-size,14px); font-weight:550; line-height:1.4; }
html[data-theme] .comparison-flat .comparison-period-trigger { justify-self:end; width:auto; max-width:100%; height:var(--control-height); min-height:var(--control-height); }
.comparison-period-trigger>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.comparison-period-trigger>.icon:last-child { transform:rotate(90deg); }
.comparison-flat .comparison-rows { gap:var(--surface-gap); }
@media(min-width:651px) {
 .comparison-flat .comparison-rows { position:relative; column-gap:calc(var(--surface-gap) * 2 + 1px); }
 .comparison-flat .comparison-rows::before { content:""; position:absolute; top:0; bottom:0; left:50%; width:1px; transform:translateX(-50%); background:var(--line); pointer-events:none; }
}
.comparison-flat .comparison-insight { display:grid; align-content:start; gap:var(--surface-gap); margin:0; padding:0; border:0; border-radius:0; corner-shape:round; overflow:visible; background:transparent; box-shadow:none; }
.comparison-flat .comparison-insight-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:var(--compact-gap) var(--surface-gap); margin:0; }
.comparison-metric-heading { display:flex; align-items:flex-start; gap:var(--compact-gap); min-width:0; }
.comparison-metric-heading>div { min-width:0; }
.comparison-flat .comparison-insight h3 { margin:0; font-size:var(--panel-subsection-title-size,16px); font-weight:550; line-height:1.4; }
.comparison-metric-heading p { margin-top:var(--settings-caption-space); color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.comparison-change { display:grid; justify-items:end; gap:var(--compact-gap); margin-left:auto; }
.comparison-flat .comparison-difference { justify-content:center; gap:var(--compact-gap); margin:0; padding:4px var(--surface-gap); font-size:var(--panel-body-size,14px); font-weight:550; border-radius:999px; background:var(--surface-subtle); color:var(--muted); }
.comparison-flat .comparison-difference.is-growth { color:var(--status-positive); background:color-mix(in srgb,var(--status-positive) 10%,var(--surface)); }
.comparison-flat .comparison-difference.is-decline { color:var(--danger); background:color-mix(in srgb,var(--danger) 10%,var(--surface)); }
.comparison-absolute-change { color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; text-align:right; }
.comparison-flat .comparison-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:var(--compact-gap); margin:0; }
.comparison-flat .comparison-value { display:flex; flex-direction:column; gap:var(--compact-gap); min-width:0; padding:var(--surface-gap); background:var(--surface-subtle); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.comparison-flat .comparison-value.current { background:color-mix(in srgb,var(--action) 6%,var(--surface)); }
.comparison-flat .comparison-value-label { color:var(--ink); font-size:var(--person-title-size,12px); line-height:1.5; }
.comparison-flat .comparison-value-dates { margin-top:auto; color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.comparison-flat .comparison-value strong { font-size:30px; font-weight:550; line-height:1.2; letter-spacing:-1px; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.comparison-flat .comparison-value strong small { font-size:var(--panel-body-size,14px); font-weight:500; letter-spacing:0; }
.comparison-chart { display:grid; grid-template-columns:max-content minmax(0,1fr); column-gap:var(--compact-gap); min-width:0; }
.comparison-chart-scale { position:relative; height:var(--comparison-chart-height); min-width:3ch; color:var(--muted); font-size:var(--person-title-size,12px); line-height:1; font-variant-numeric:tabular-nums; }
.comparison-chart-scale>span { position:absolute; right:0; transform:translateY(-50%); }
.comparison-chart-scale>span:nth-child(1) { top:15.625%; }
.comparison-chart-scale>span:nth-child(2) { top:40.625%; }
.comparison-chart-scale>span:nth-child(3) { top:65.625%; }
.comparison-chart-scale>span:nth-child(4) { top:90.625%; }
.comparison-flat .comparison-overlay { position:relative; height:var(--comparison-chart-height); isolation:isolate; min-width:0; }
.comparison-flat .comparison-series { position:absolute; inset:0; color:var(--control-accent); }
.comparison-flat .comparison-series.previous { color:var(--muted); }
.comparison-flat .comparison-series .metric-sparkline { display:block; width:100%; height:100%; margin:0; overflow:visible; }
.comparison-flat .comparison-series.previous :is(.sparkline-area,.sparkline-glow,.sparkline-endpoint,.sparkline-guide) { display:none; }
.comparison-flat .comparison-series.previous .sparkline-line { stroke-dasharray:.025 .02; stroke-dashoffset:0; animation:none; opacity:.65; }
.comparison-flat .comparison-series.current .sparkline-area { opacity:.6; }
.comparison-flat .comparison-axis { display:flex; justify-content:space-between; grid-column:2; margin-top:var(--compact-gap); color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.comparison-legend { display:flex; justify-content:flex-start; flex-wrap:wrap; gap:var(--compact-gap) var(--surface-gap); margin-top:var(--surface-gap); color:var(--muted); font-size:var(--person-title-size,12px); line-height:1.5; }
.comparison-legend>span { display:inline-flex; align-items:center; gap:var(--compact-gap); }
.comparison-legend i { width:20px; border-top:2px solid var(--control-accent); }
.comparison-legend .previous i { border-color:var(--muted); border-top-style:dashed; }
@media(min-width:651px) and (max-width:1100px) {
 .comparison-flat>.comparison-section-heading { grid-template-columns:minmax(0,1fr) max-content; }
 .comparison-section-heading>.settings-section-heading { grid-column:1 / -1; }
}
@media(max-width:650px) {
 .comparison-flat>.comparison-section-heading,.comparison-flat>.comparison-section-heading:not(:has(.comparison-period-note)) { grid-template-columns:minmax(0,1fr); }
 .period-comparison.comparison-flat { --comparison-chart-height:128px; }
 html[data-theme] .comparison-flat .comparison-period-trigger { width:100%; }
 .comparison-flat .comparison-value strong { font-size:26px; }
 .comparison-flat .comparison-value { padding:var(--compact-gap); }
 .comparison-change { justify-items:start; margin-left:0; }
 .comparison-absolute-change { text-align:left; }
}

/* Employee statistics: grouped metric tiles and one combined timeline. */
html[data-theme] #modal.statistics-profile-dialog { width:560px; }
html[data-theme] .statistics-profile-dialog .person-report { display:grid; gap:var(--surface-gap); }
html[data-theme] .statistics-profile-dialog .person-report-overview { gap:var(--surface-gap); }
html[data-theme] .statistics-profile-dialog .person-report-identity { align-items:center; gap:12px; }
html[data-theme] .statistics-profile-dialog .person-report-identity > .avatar { width:44px; height:44px; flex:0 0 44px; }
html[data-theme] .statistics-profile-dialog .person-report-identity h3 { font-size:16px; line-height:1.35; }
html[data-theme] .statistics-profile-dialog .person-report-identity span { font-size:12px; }
.person-report-context { display:flex; align-items:center; flex-wrap:wrap; gap:6px 16px; color:var(--muted); font-size:var(--person-title-size); line-height:1.5; }
.person-report-context > span { display:flex; align-items:center; gap:6px; min-width:0; overflow-wrap:anywhere; }
.person-report-context .icon { width:16px; height:16px; flex-shrink:0; }
html[data-theme] .statistics-profile-dialog :is(.person-report-summary,.person-report-totals,.person-report-comparison) { background:transparent; box-shadow:none; }
html[data-theme] .statistics-profile-dialog .person-report-summary { padding:0; border:0; }
html[data-theme] .statistics-profile-dialog .person-report-totals { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; gap:var(--compact-gap); align-items:stretch; }
html[data-theme] .statistics-profile-dialog .person-report-totals > div { padding:var(--surface-inset); background:var(--surface-subtle); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
html[data-theme] .statistics-profile-dialog .person-report-totals > div + div { border:0; padding:var(--surface-inset); }
html[data-theme] .statistics-profile-dialog .person-report-totals dt { font-size:var(--person-name-size); line-height:1.5; white-space:normal; }
html[data-theme] .statistics-profile-dialog .person-report-totals dd { margin:var(--compact-gap) 0; font-size:26px; line-height:1.2; }
html[data-theme] .statistics-profile-dialog .person-report-totals .is-primary { display:grid; grid-column:1 / -1; grid-template-columns:minmax(0,1fr) auto; column-gap:var(--surface-gap); row-gap:4px; align-items:center; background:color-mix(in oklab,var(--accent) 5%,var(--surface)); }
html[data-theme] .statistics-profile-dialog .person-report-totals .is-primary dd { grid-column:2; grid-row:1 / 3; margin:0; font-size:30px; color:var(--accent); }
.person-report-stat-caption { display:block; color:var(--muted); font-size:var(--person-title-size); line-height:1.5; }
.person-report-status-item { display:inline-block; white-space:nowrap; }
.person-report-status-item + .person-report-status-item::before { content:" · "; white-space:pre; }
html[data-theme] .statistics-profile-dialog .person-report-graph-section { padding:var(--compact-gap) 0; background:transparent; }
html[data-theme] .statistics-profile-dialog .person-report-chart-heading { align-items:flex-start; flex-direction:column; gap:var(--compact-gap); margin-bottom:var(--surface-gap); }
html[data-theme] .statistics-profile-dialog .person-report-chart-heading h3 { font-size:var(--person-name-size); font-weight:500; }
.person-report-legend { display:flex; flex-wrap:wrap; gap:12px; }
.person-report-legend > span { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:var(--person-title-size); line-height:1.5; }
.person-report-legend i { width:12px; height:2px; border-radius:2px; background:var(--control-accent); }
.person-report-legend .person-report-legend-planned i { height:0; background:transparent; border-top:2px dashed var(--muted); border-radius:0; }
html[data-theme] .statistics-profile-dialog .person-report-chart { display:block; position:relative; height:82px; padding:0; }
html[data-theme] .statistics-profile-dialog .person-report-chart > .person-report-series { position:absolute; inset:0; }
html[data-theme] .statistics-profile-dialog .person-report-series .metric-sparkline { width:100%; height:100%; margin:0; }
.person-report-chart .is-planned :is(.sparkline-area,.sparkline-glow,.sparkline-endpoint,.sparkline-guide) { display:none; }
.person-report-chart .is-planned .sparkline-line { stroke-dasharray:.025 .02; stroke-dashoffset:0; animation:none; opacity:.7; }
html[data-theme] .statistics-profile-dialog .person-report-axis { margin-top:var(--compact-gap); font-size:var(--person-title-size); }
html[data-theme] .statistics-profile-dialog .person-report-comparison { grid-template-columns:minmax(0,1fr); gap:0; padding:0 var(--surface-inset); border:0; background:var(--surface-subtle); }
html[data-theme] .statistics-profile-dialog .person-report-comparison > div { display:grid; grid-template-columns:18px minmax(0,1fr) auto; column-gap:var(--identity-gap); row-gap:4px; padding:var(--surface-inset) 0; background:transparent; border-radius:0; }
html[data-theme] .statistics-profile-dialog .person-report-comparison > div + div { border:0; border-top:1px solid var(--line); }
html[data-theme] .statistics-profile-dialog .person-report-comparison > div > span:not(.person-report-insight-icon) { grid-column:2; font-size:var(--person-name-size); align-self:center; }
html[data-theme] .statistics-profile-dialog .person-report-comparison strong { grid-column:3; grid-row:1 / 3; align-self:center; font-size:18px; white-space:nowrap; }
html[data-theme] .statistics-profile-dialog .person-report-comparison small { grid-column:2; font-size:var(--person-title-size); line-height:1.5; }
html[data-theme] .statistics-profile-dialog .person-report-insight-icon { grid-column:1; grid-row:1; display:flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:0; background:transparent; color:var(--muted); }
.person-report-insight-icon > .icon { width:18px; height:18px; }
html[data-theme] .statistics-profile-dialog .person-report > .report-footnote { margin:0; font-size:13px; line-height:1.55; }
html[data-theme] .statistics-profile-dialog .person-report-details { margin-top:0; }
html[data-theme] .statistics-profile-dialog .person-report-details > summary { font-size:var(--person-name-size); padding-top:var(--surface-gap); }
html[data-theme] .statistics-profile-dialog .person-report-details summary b { font-size:var(--person-title-size); }
@media(max-width:650px) {
 html[data-theme] .statistics-profile-dialog .person-report-chart { height:82px; }
 .statistics-profile-dialog .person-report-status-item { display:block; }
 .statistics-profile-dialog .person-report-status-item + .person-report-status-item::before { content:none; }
 html[data-theme] .statistics-profile-dialog .person-report-comparison strong { grid-column:2; grid-row:auto; justify-self:start; }
 html[data-theme] .statistics-profile-dialog .person-report-comparison small { grid-column:2; }
}

/* Employee lists: selection, sorting and pagination share the existing surface. */
:is(.staff-name-heading,.staff-select-heading){display:flex;align-items:center;min-width:0}
input.staff-select{appearance:auto;flex:0 0 16px;width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--action);cursor:pointer}
/* Native dark checkboxes are almost black; keep list selection visible. */
html[data-theme='dark'] input.staff-select {
 appearance:none; border:1px solid var(--muted); border-radius:4px;
 background-color:var(--surface-subtle); background-position:center; background-repeat:no-repeat;
}
html[data-theme='dark'] input.staff-select:checked,
html[data-theme='dark'] input.staff-select:indeterminate {
 background-color:var(--action); border-color:var(--action);
}
html[data-theme='dark'] input.staff-select:checked {
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-theme='dark'] input.staff-select:indeterminate {
 background-image:linear-gradient(white,white); background-size:8px 2px;
}
input.staff-select:disabled{cursor:default;opacity:.35}
.staff-sort{display:inline-flex;align-items:center;gap:6px;padding:4px 0;border:0;background:transparent;color:var(--muted);font:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.staff-sort span{font-size:14px;opacity:.5}
.staff-sort.is-active span{opacity:1;color:var(--ink)}
.staff-sort:focus-visible,input.staff-select:focus-visible{outline:2px solid var(--action);outline-offset:4px;border-radius:3px}
.staff-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0;margin-top:var(--surface-gap);border:0;color:var(--muted);font-size:13px}
.staff-pagination>div{display:flex;align-items:center;gap:12px}
.staff-pagination .button{display:inline-flex;align-items:center;justify-content:center;width:32px;min-height:32px;padding:6px;border-radius:10px}
.staff-pagination .button:disabled{opacity:.35;cursor:default}
.staff-pagination .icon{width:16px;height:16px}
@media(max-width:650px){
 .team-list .staff-list-columns{display:flex!important;align-items:center;justify-content:space-between;gap:12px}
 .team-list .staff-list-columns>span:not(:first-child){display:none}
 html[data-theme] .unified-staff-row > .staff-list-login,
 html[data-theme] .directory-page .directory-table .person > div > small { display:none; }
 .team-list .staff-list-columns .staff-sort{font-size:12px}
}
@media(max-width:650px){
 html[data-theme] body .directory-page .directory-table thead{display:block}
 html[data-theme] body .directory-page .directory-table thead tr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0 12px}
 html[data-theme] body .directory-page .directory-table thead th{display:none;width:auto;padding:0;border:0;font-size:12px}
 html[data-theme] body .directory-page .directory-table thead th:nth-child(-n+2){display:block}
}

/* Compact sort chevrons and page numbers replace text arrows and tall buttons. */
.staff-sort-icon{width:14px;height:18px;flex:0 0 14px}
.staff-sort-icon path{opacity:.35}
.staff-sort-icon path.is-direction{opacity:1;stroke:var(--ink)}
html[data-theme] body .staff-pagination{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:12px 0 0;margin-top:4px;font-size:12px}
html[data-theme] body .staff-pagination .staff-page-buttons{display:flex;align-items:center;gap:4px}
html[data-theme] body .staff-pagination :is(.staff-page-number,.staff-page-arrow){display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 0 30px;width:30px;min-width:30px;height:30px;min-height:30px;max-height:30px;margin:0;padding:0;border:0;border-radius:8px;box-shadow:none;background:transparent;color:var(--muted);font-size:13px;line-height:1;cursor:pointer}
html[data-theme] body .staff-pagination .staff-page-number[aria-current='page']{background:var(--surface-subtle);color:var(--ink);font-weight:600}
html[data-theme] body .staff-pagination :is(.staff-page-number,.staff-page-arrow):hover:where(:not(html[data-hover-disabled] *)):not(:disabled){background:var(--surface-subtle);color:var(--ink)}
html[data-theme] body .staff-pagination .staff-page-arrow:disabled{opacity:.3;cursor:default}
.staff-page-gap{padding:0 3px}

/* Pagination follows the rows; sidebar grid placement must not affect it. */
html[data-theme] body .staff-pagination{grid-row:auto;grid-column:1 / -1;order:0;position:static}

/* Bulk action stays compact alongside the selection count. */

/* Selected employee actions float at the bottom on tablet and desktop. */
@media(min-width:651px){
}

/* Phone bulk actions use two deliberate rows instead of wrapping unpredictably. */
@media(max-width:650px){
}

/* Location staffing: a day editor and a collapsed, grouped schedule summary. */
html[data-theme] body .staffing-settings-page{width:100%;max-width:none;min-width:0}
.staffing-location-field{display:flex;flex-direction:column;gap:8px;max-width:320px;margin-bottom:20px;font-size:13px;color:var(--muted)}
.staffing-location-name{margin:0 0 16px;color:var(--muted);font-size:14px}
html[data-theme] body .staffing-settings-panel{box-sizing:border-box;min-width:0;margin:0;padding:var(--surface-inset,16px);border:0;background:var(--surface);box-shadow:none;overflow:visible}
.staffing-settings-panel .settings-section-heading{margin:0}
.staffing-settings-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin:20px 0 16px}
.staffing-settings-toolbar .period-presets{margin:0}

.staffing-date-field{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:13px;color:var(--muted);margin:0}
.staffing-date-field input{width:170px}
.staffing-weekdays{display:flex;flex:0 0 auto;align-items:center;gap:4px;width:auto;margin:0 0 0 auto;border:0}
html[data-theme] body .staffing-weekdays>button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;padding-inline:10px;font-size:13px;border:0}
.staffing-weekdays small{font-size:11px;color:var(--muted);font-weight:400}
.staffing-editor-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:20px 0 8px}
.staffing-editor-heading h3{margin:0;font-size:15px;font-weight:550}
.staffing-editor-heading>span{font-size:12px;color:var(--muted)}
.staffing-position-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}
.staffing-position-control{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:8px 0;border-bottom:1px solid var(--line)}
.staffing-position-control>label{display:block;min-width:0;margin:0;font-size:14px;font-weight:400;line-height:1.4;overflow-wrap:anywhere}
.staffing-stepper{display:flex;align-items:center;flex:0 0 auto;gap:4px;padding:0;background:transparent}
html[data-theme] body .staffing-stepper>button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:32px;height:32px;min-height:32px;min-width:32px;margin:0;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ink);font-size:18px;font-weight:400}
html[data-theme] body .staffing-stepper>button:disabled{opacity:.35;cursor:default}
html[data-theme] body .staffing-stepper>input{box-shadow:none;max-height:32px;box-sizing:border-box;display:block;width:44px;min-width:0;height:32px;min-height:32px;padding:4px;border:1px solid var(--control-border,var(--line));border-radius:var(--small-control-corner);background:var(--surface);color:var(--ink);font-size:14px;text-align:center;appearance:textfield;-moz-appearance:textfield}
html[data-theme] body .staffing-stepper>input:focus{border-color:var(--control-border,var(--line));background:var(--surface-subtle)}
.staffing-stepper input::-webkit-inner-spin-button,.staffing-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.staffing-copy-day{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:20px 0 0;font-size:12px;color:var(--muted)}
html[data-theme] body .staffing-copy-day>.button{min-height:32px;padding:6px 10px;font-size:12px;border-radius:10px}
.staffing-save-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:20px}
html[data-theme] body .staffing-save-actions .button{min-height:var(--control-height,48px);padding:10px 16px;font-size:14px}
html[data-theme] body .staffing-save-actions .text-button{font-size:12px}
.staffing-draft-status{font-size:12px;color:var(--muted)}
.staffing-exceptions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:24px;padding-top:16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
html[data-theme] body .staffing-exceptions .text-button{font-size:12px}
html[data-theme] body .staffing-summary-grouped{margin:0;padding:0 16px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.staffing-summary-grouped>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:12px 0;list-style:none;cursor:pointer}
.staffing-summary-grouped>summary::-webkit-details-marker{display:none}
.staffing-status-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--ink)}
.staffing-status-title>.icon{width:16px;height:16px;color:var(--accent,#2D81FF)}
.staffing-status-title>strong{font-size:13px;font-weight:500}
.staffing-status-title>small{font-size:12px;color:var(--muted)}
.staffing-summary-toggle{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}
.staffing-summary-toggle>.icon{width:14px;height:14px;transition:transform 150ms ease}
.staffing-summary-grouped[open] .staffing-summary-toggle>.icon{transform:rotate(90deg)}
/* Flat date groups keep one-role shortages to a single compact row. */
.staffing-day-groups{display:flex;flex-direction:column;gap:0;padding:0 0 8px}
.staffing-shortage-day{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:baseline;gap:16px;min-width:0;padding:6px 0;border-radius:0;background:transparent}
.staffing-shortage-day+.staffing-shortage-day{border-top:1px solid var(--line)}
.staffing-shortage-day>strong{padding:7px 0;font-size:12px;font-weight:500;color:var(--muted);line-height:1.5;text-transform:none}
.staffing-shortage-day>strong::first-letter{text-transform:uppercase}
.staffing-shortage-day>ul{list-style:none;padding:0;margin:0;min-width:0}
.staffing-shortage-day li{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:7px 0;font-size:13px;line-height:1.5}
.staffing-shortage-day li+li{border-top:1px solid var(--line)}
.staffing-shortage-number{display:inline-flex;align-items:baseline;flex-shrink:0;gap:4px;text-align:right;font-size:12px;white-space:nowrap}
.staffing-shortage-number b{font-weight:550;color:var(--accent,#2D81FF)}
.staffing-shortage-number small{display:inline-block;min-width:116px;margin-left:16px;font-size:12px;color:var(--muted);text-align:right}
.staffing-summary-settings{display:flex;justify-content:flex-end;padding:0 0 12px}
html[data-theme] body :is(.staffing-summary-settings,.staffing-quiet-summary)>.text-button{display:inline-flex;align-items:center;gap:6px;font-size:12px}
.staffing-summary-settings .icon,.staffing-quiet-summary .icon{width:14px;height:14px}
.staffing-quiet-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;color:var(--muted);font-size:12px;border-bottom:1px solid var(--line)}
@media(max-width:750px){
 .staffing-position-editor,.staffing-day-groups{grid-template-columns:minmax(0,1fr)}
 .staffing-location-field{max-width:none}
 .staffing-weekdays{gap:4px;margin:0;width:100%;justify-content:space-between}
 html[data-theme] body .staffing-weekdays>button{flex:1;min-width:0;gap:4px;padding-inline:4px}
 html[data-theme] body .staffing-stepper>button{width:40px;height:40px;min-width:40px;min-height:40px}
 html[data-theme] body .staffing-stepper>input{height:40px;min-height:40px;max-height:40px;font-size:16px}
 .staffing-status-title{gap:6px}
 .staffing-status-title>small{width:100%;margin-left:22px}
 .staffing-copy-day>span{width:100%}
 .staffing-quiet-summary{align-items:flex-start;flex-direction:column;gap:8px}
}

@media(max-width:650px){
 .staffing-shortage-day{grid-template-columns:minmax(0,1fr);gap:0;padding:8px 0}
 .staffing-shortage-day>strong{padding:0 0 2px}
 .staffing-shortage-day li{gap:8px;padding:5px 0;font-size:12px}
 .staffing-shortage-number{flex-wrap:wrap;justify-content:flex-end;max-width:60%;white-space:normal;font-size:11px}
 .staffing-shortage-number small{min-width:0;margin-left:6px;font-size:11px}
}

.staffing-settings-toolbar{justify-content:space-between}
.staffing-editor-tools{display:flex;align-items:center;gap:16px;color:var(--muted);font-size:12px}
html[data-theme] body .staffing-editor-tools>.button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:8px 12px;font-size:13px}
.staffing-editor-tools .icon{width:16px;height:16px}
.staffing-copy-presets{display:flex;flex-wrap:wrap;gap:16px;margin:16px 0 10px}
html[data-theme] body .staffing-copy-presets>.text-button{font-size:13px}
.staffing-copy-description{font-size:13px;line-height:1.6}
.staffing-copy-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}
html[data-theme] body .staffing-copy-days>label{display:flex;flex-direction:row;align-items:center;gap:10px;min-height:40px;margin:0;font-size:14px;cursor:pointer}
html[data-theme] body .staffing-report-launch{display:inline-flex;align-items:center;gap:8px;min-height:36px;margin:0;padding:0;border:0;background:transparent;color:var(--ink);font-size:13px;text-align:left}
.staffing-report-launch strong{font-weight:500}
.staffing-report-launch>span{font-size:12px;color:var(--muted)}
.staffing-report-launch>.icon{width:16px;height:16px;flex-shrink:0}
.staffing-report-launch>.icon:first-child{color:var(--accent,#2D81FF)}
.staffing-report-launch>.icon:last-child{color:var(--muted);width:14px;height:14px}
@media(max-width:750px){
 .staffing-editor-heading{align-items:flex-start;flex-wrap:wrap;gap:8px}
 .staffing-editor-tools{gap:10px;margin-left:auto}
 .staffing-settings-toolbar{gap:12px}
}
@media(max-width:650px){
 .staffing-report-launch{flex-wrap:wrap}

 .staffing-copy-days{grid-template-columns:minmax(0,1fr)}
 .staffing-save-actions{gap:12px}
}
html[data-theme] body .staffing-report-launch{display:flex;justify-content:space-between;flex-wrap:nowrap;gap:16px;width:100%;padding:0}
.staffing-launch-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.staffing-launch-status>.icon{width:16px;height:16px;flex-shrink:0;color:var(--muted)}
.staffing-launch-status>strong{font-size:13px;font-weight:500;color:var(--ink)}
.staffing-launch-status>small{font-size:12px;color:var(--muted)}
.staffing-launch-details{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;font-size:12px;color:var(--muted)}
@media(max-width:650px){
 .staffing-quiet-summary{flex-direction:row}
 .staffing-launch-status>small{display:none}
 html[data-theme] body .staffing-report-launch>.staffing-launch-details{display:inline-flex}
}

/* Staffing report: compact day surfaces, with self-explanatory role rows. */





/* One daily plan uses the shared settings heading and action styles. */
.staffing-daily-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--surface-gap,16px);margin-bottom:var(--heading-space,16px)}
.staffing-daily-note,.staffing-daily-migration{margin-top:16px;font-size:13px;line-height:1.5;color:var(--muted)}
.staffing-daily-migration{padding:12px;margin:0 0 12px;border-radius:12px;background:var(--surface-subtle)}

@media(max-width:650px){
 .staffing-daily-heading{align-items:flex-start;gap:var(--compact-gap)}
}
html[data-theme] body [data-staffing-discard][hidden]{display:none}

/* The plan heading inherits the complete settings heading, including its caption gap. */
.staffing-stepper .icon{width:16px;height:16px;stroke-width:1.6}
html[data-theme] body .staffing-stepper>button:hover:where(:not(html[data-hover-disabled] *)):not(:disabled){background:var(--surface-subtle)}
@media(min-width:1200px){
 .staffing-daily-panel .staffing-position-editor{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:24px}
}

/* Staffing report uses the shared week switch and shows one day at a time. */
html[data-theme] body dialog.staffing-report-dialog{box-sizing:border-box;width:min(1040px,calc(100vw - 48px));max-width:1040px;padding:var(--dialog-inset,24px)}
html[data-theme] body .staffing-report-dialog .modal-head{margin-bottom:var(--form-section-gap,18px)}
html[data-theme] body .staffing-report-dialog .modal-head h2{font-size:24px;font-weight:650;line-height:1.25}
.staffing-report-focus{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start;gap:var(--surface-gap)}
.staffing-report-overview,.staffing-report-detail{display:grid;align-content:start;gap:var(--surface-gap);min-width:0}
.staffing-report-detail{padding:0;background:transparent}
.staffing-report-day-copy>p{margin:var(--compact-gap) 0 0;color:var(--muted);font-size:var(--panel-caption-size);line-height:1.5}
.staffing-week-coverage{padding:var(--surface-inset);background:var(--surface);border-radius:var(--inset-corner);corner-shape:var(--surface-curve)}
.staffing-week-coverage>h3,.staffing-day-totals>h3{margin:0 0 var(--surface-gap);font-size:var(--panel-subsection-title-size);font-weight:500;line-height:1.4}
.staffing-week-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--compact-gap);min-width:0}
html[data-theme] body .staffing-week-column{display:grid;justify-items:center;gap:var(--compact-gap);min-width:0;margin:0;padding:0;border:0;background:transparent;color:var(--muted);font-size:var(--panel-caption-size);line-height:1.5;font-variant-numeric:tabular-nums}
.staffing-week-column>svg{width:100%;max-width:32px;height:96px;overflow:visible}
.staffing-week-track{fill:var(--app-dialog-bg)}
.staffing-week-fill{fill:color-mix(in srgb,var(--control-accent) 45%,var(--surface))}
.staffing-week-column.is-selected{color:var(--ink)}
.staffing-week-column.is-selected .staffing-week-fill{fill:var(--control-accent)}
.staffing-week-column.is-past{opacity:.45}
.staffing-day-totals{display:flex;flex-wrap:wrap;gap:var(--compact-gap) var(--surface-gap);margin:var(--compact-gap) 0 0;color:var(--muted);font-size:var(--panel-caption-size);line-height:1.5}
.staffing-day-totals>div{display:flex;align-items:baseline;gap:calc(var(--compact-gap) / 2)}
.staffing-day-totals dd{margin:0;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums}
@media(min-width:801px) and (min-height:600px){.staffing-report-overview{position:sticky;top:0;align-self:start}}
@media(max-width:800px){.staffing-report-focus{grid-template-columns:minmax(0,1fr)}}
.staffing-report-context{display:flex;flex-direction:column;align-items:stretch;gap:var(--compact-gap);margin-bottom:var(--surface-gap);font-size:13px;color:var(--muted)}
.staffing-report-date-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--compact-gap);margin-bottom:var(--compact-gap)}
.staffing-report-date-heading h3{margin:0;font-size:14px;font-weight:550;line-height:1.4}
.staffing-report-date-heading h3::first-letter{text-transform:uppercase}
.staffing-report-roles{display:flex;flex-direction:column;gap:var(--compact-gap)}
.staffing-report-role-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--compact-gap);min-width:0;padding:var(--surface-inset);border-radius:16px;background:var(--surface-subtle)}
.staffing-report-no-candidates{margin:var(--surface-gap) 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.staffing-report-complete{display:flex;flex-direction:column;align-items:center;gap:var(--compact-gap);padding:var(--surface-gap) 0;text-align:center}
.staffing-report-complete>.icon{width:24px;height:24px;color:var(--muted)}
.staffing-report-complete h3{margin:0;font-size:16px;font-weight:550}
.staffing-report-complete p{margin:0;font-size:13px;color:var(--muted);line-height:1.5}
.staffing-report-complete > .button{margin-top:var(--compact-gap)}
@media(max-width:650px){
 .staffing-report-complete > .button{width:100%}
 html[data-theme] body dialog.staffing-report-dialog{width:100%;max-width:none}
 html[data-theme] body .staffing-report-dialog .modal-head h2{font-size:22px}
}
/* The two-line day labels need their own content height inside the shared segment track. */

/* Shared day picker: the staffing popup and mobile schedule use the same geometry. */
html[data-theme] body .week-day-switch{--day-idle-fill:var(--list-row-surface);display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:stretch;box-sizing:border-box;gap:6px;padding:8px 12px 4px;border:0;background:transparent;height:auto;min-height:0}
html[data-theme] body .week-day-switch>button{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;height:auto;min-height:0;max-height:none;margin:0;padding:7px 0;gap:4px;border:0;border-radius:var(--inset-corner);corner-shape:var(--surface-curve);background:var(--day-idle-fill);box-shadow:none;color:var(--muted);-webkit-tap-highlight-color:transparent;transition:color 160ms}
.week-day-switch>button>span{font-size:12px;line-height:1.4;text-transform:capitalize}
.week-day-switch>button>strong{display:grid;place-items:center;width:30px;height:30px;background:transparent;font-size:16px;font-weight:550;line-height:1}
.week-day-switch>button>i{display:block;width:4px;height:4px;border-radius:50%;flex-shrink:0}
html[data-theme] body .week-day-switch>button:hover:where(:not(html[data-hover-disabled] *)){background:var(--day-idle-fill);color:var(--ink)}
html[data-theme] body .week-day-switch>button[aria-pressed='true']{background:var(--control-accent);color:var(--control-accent-ink);box-shadow:none}
html[data-theme] body .week-day-switch>button[aria-pressed='true']>strong{background:transparent;color:inherit}
html[data-theme] body .week-day-switch>button[aria-pressed='true']>i:is(.has-shifts,.has-shortage){background:currentColor}
html[data-theme] body .staffing-report-week{width:100%;margin:0 0 var(--surface-gap);padding-inline:0}
.staffing-report-week>button>i.has-shortage{background:var(--action)}
.staffing-report-week>button>i:not(.has-shortage){background:transparent}

.staffing-report-role-copy{min-width:0;flex:1}
.staffing-report-role-copy h4{margin:0;font-size:14px;font-weight:550;line-height:1.4;overflow-wrap:anywhere}
.staffing-report-role-details{display:flex;flex-wrap:wrap;align-items:center;gap:4px var(--compact-gap);margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.staffing-report-role-details>span{white-space:nowrap}
html[data-theme] body .staffing-report-week>button:disabled{opacity:.4;cursor:default}


.staffing-report-menu{flex-shrink:0}
.staffing-report-day-copy p{margin:4px 0 0;font-size:13px;color:var(--muted);line-height:1.5}
.staffing-report-role-copy h4{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px}
.staffing-role-shortage{padding:2px 8px;border-radius:999px;background:var(--personal-board);color:var(--ink);font-size:12px;font-weight:500;line-height:1.5;white-space:nowrap}
.staffing-role-covered{display:inline-flex;align-self:center;color:var(--status-positive)}
.staffing-role-covered>.icon{width:14px;height:14px}
.staffing-role-avatars{display:flex;align-items:center;justify-content:flex-start;width:156px;min-width:0}
.staffing-role-avatars:has(.location-avatar-more){width:192px}
.staffing-role-people{align-items:center;padding-left:12px}
.staffing-assigned-person,.staffing-person-placeholder{display:block;position:relative;box-sizing:border-box;flex:0 0 48px;width:48px;height:48px;margin-left:-12px;border-radius:50%}
.staffing-assigned-person>.avatar{box-sizing:border-box;width:100%;height:100%;min-width:0;border:2px solid var(--surface-subtle)}
.staffing-person-placeholder{display:flex;align-items:center;justify-content:center;border:1px dashed var(--line);background:var(--surface-subtle);color:var(--muted)}
.staffing-person-placeholder>.icon{width:20px;height:20px;opacity:.55}


/* Staffing footer keeps the selected-day total separate from editing the plan. */


.staffing-daily-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--surface-gap)}
@media(max-width:650px){.staffing-daily-title{gap:var(--compact-gap)}}
@media(max-width:650px){
 .staffing-save-actions{display:flex;flex-direction:column;align-items:stretch}
 html[data-theme] body .staffing-save-actions>.button[type='submit']{width:100%}
 .staffing-save-actions>.staffing-draft-status{text-align:center}
}

/* The add action is the last circle of the same overlapping avatar stack. */
html[data-theme] body .staffing-role-people>.staffing-role-assign{position:relative;z-index:2;flex:0 0 48px;margin-left:-12px;box-shadow:0 0 0 2px var(--surface-subtle)}
.staffing-role-people>.location-avatar-more{box-sizing:border-box;width:48px;height:48px;flex:0 0 48px;margin-left:-12px}
@media(max-width:650px){
 .staffing-report-role-card:has(.location-avatar-more){grid-template-columns:minmax(0,1fr)}
}

/* Actual shortages are a warning state, separate from the neutral planner captions. */
html[data-theme] body .staffing-quiet-summary.has-shortage>.staffing-report-launch{box-sizing:border-box;min-height:44px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);border-radius:16px;background:color-mix(in srgb,var(--accent) 7%,var(--surface))}
.staffing-quiet-summary.has-shortage .staffing-launch-status>.icon{width:18px;height:18px;color:var(--control-accent)}
.staffing-quiet-summary.has-shortage .staffing-launch-status>strong{font-weight:550}
.staffing-quiet-summary.has-shortage .staffing-launch-status>small,.staffing-quiet-summary.has-shortage .staffing-launch-details{color:var(--accent)}
html[data-theme] body .staffing-quiet-summary.has-shortage>.staffing-report-launch:hover:where(:not(html[data-hover-disabled] *)){background:color-mix(in srgb,var(--accent) 11%,var(--surface))}
@media(max-width:650px){
 .staffing-quiet-summary.has-shortage .staffing-launch-status{flex:1;min-width:0;flex-wrap:nowrap}
 .staffing-quiet-summary.has-shortage .staffing-launch-status>strong{flex:1;min-width:0;white-space:normal}
 .staffing-quiet-summary.has-shortage .staffing-launch-status>small{display:none}
}


/* Coverage is a compact metric, with two separately rounded arcs. */
.staffing-coverage{--staffing-coverage-bg:var(--surface);--staffing-coverage-ink:var(--ink);position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--surface-gap);min-width:0;overflow:hidden;margin:0 0 var(--surface-gap);padding:var(--surface-inset);border-radius:var(--inset-corner);background:var(--staffing-coverage-bg)}
.staffing-coverage-ring{position:relative;z-index:1;display:grid;place-items:center;flex:0 0 64px;width:64px;height:64px}
.staffing-coverage-ring>svg{display:block;width:100%;height:100%;overflow:visible}
.staffing-coverage-ring circle{fill:none;stroke-width:8;stroke-linecap:round}
.staffing-ring-track{stroke:color-mix(in srgb,var(--staffing-coverage-ink) 24%,transparent)}
.staffing-ring-fill{stroke:var(--control-accent)}
.staffing-ring-value{font-family:var(--panel-heading-font,inherit);font-size:18px;font-weight:550;font-variant-numeric:tabular-nums;fill:var(--staffing-coverage-ink)}
.staffing-coverage-copy{position:relative;z-index:1;min-width:0}
.staffing-coverage-label{display:flex;align-items:center;gap:var(--compact-gap);font-size:13px;line-height:1.4;color:var(--muted)}
.staffing-coverage-label>.icon{flex:0 0 16px;width:16px;height:16px;color:var(--staffing-coverage-ink)}
.staffing-coverage-copy>p{margin:var(--settings-caption-space) 0 0;font-size:14px;font-weight:550;line-height:1.4;color:var(--staffing-coverage-ink)}
/* Dates retain the neutral mobile-calendar selection palette. */
html[data-theme] body .staffing-report-week{gap:6px;padding:0;border:0;border-radius:0;background:transparent}
html[data-theme] body .staffing-report-week>button{padding:8px 0;border:0;border-radius:var(--inset-corner);corner-shape:var(--surface-curve)}
@media(max-width:650px){html[data-theme] body .staffing-report-week{gap:4px}}

.staffing-coverage-waves{position:absolute;z-index:0;right:0;bottom:0;width:80%;height:100%;pointer-events:none;mask-image:linear-gradient(90deg,transparent,#000 75%)}
.staffing-wave-back{fill:color-mix(in srgb,var(--control-accent) 4%,transparent)}
.staffing-wave-front{fill:color-mix(in srgb,var(--control-accent) 7%,transparent)}

/* Today is distinct from the selected day, in the calendar and staffing popup alike. */
html[data-theme] body .week-day-switch>button:has(>strong[aria-current='date']){box-shadow:inset 0 0 0 1px var(--control-accent)}
html[data-theme] body .week-day-switch>button:not([aria-pressed='true']):has(>strong[aria-current='date'])>strong{background:transparent;color:var(--ink)}
html[data-theme] body .week-day-switch>button[aria-pressed='true']:has(>strong[aria-current='date']){box-shadow:none}

/* Open shifts reuse replacement cards; only the schedule toolbar needs layout. */
.employee-schedule-group{min-width:0}
.schedule-replacement-view{min-width:0}
.schedule-replacement-view>.replacement-panel{margin:0}
.open-shift-toolbar{min-width:0;max-width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--surface-gap);margin-bottom:var(--surface-gap)}
/* Responses need only identity and confirmation; keep the shared card geometry. */
html[data-theme] body .open-shift-response{grid-template-columns:minmax(0,1fr) auto}
html[data-theme] body .open-shift-response>.replacement-identity{grid-column:1;grid-row:1;align-items:center}
html[data-theme] body .open-shift-response>.replacement-actions{grid-column:2;grid-row:1}
.replacement-actions>[data-open-shift-review]{position:relative;overflow:visible}
.staffing-offer-publish{grid-column:1/-1;justify-self:start}
@media(max-width:650px){
 .open-shift-toolbar{align-items:stretch}
 .open-shift-toolbar>.period-presets{width:100%;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 .open-shift-toolbar>.period-presets>button{display:inline-flex;align-items:center;justify-content:center;min-width:0;padding-inline:8px}
 .open-shift-toolbar>.button{width:100%}
}

/* Location time templates reuse settings lists and the shared shift composer. */
.shift-template-settings{margin-top:var(--section-space)}
.shift-template-picker{display:grid;gap:var(--form-label-gap);min-width:0}
.shift-template-options{display:flex;flex-wrap:wrap;gap:var(--compact-gap)}
.shift-template-choice{display:inline-flex;align-items:center;justify-content:center;gap:var(--identity-gap);max-width:100%;min-height:36px;padding:8px 12px;border:1px solid var(--control-border);border-radius:14px;background:var(--surface);color:var(--muted);font:inherit;font-size:13px;font-weight:500;line-height:1.4;text-align:left}
.shift-template-choice>span{min-width:0;overflow-wrap:anywhere}
.shift-template-choice>small{flex-shrink:0;font-size:12px;font-weight:400}
.shift-template-choice:hover:where(:not(html[data-hover-disabled] *)){background:var(--surface);color:var(--ink)}
.shift-template-choice[aria-pressed='true']{background:color-mix(in srgb,var(--control-accent) 8%,var(--surface));border-color:var(--control-accent);color:var(--ink)}
.shift-template-choice:focus-visible{outline:2px solid var(--control-accent);outline-offset:2px}
.shift-template-empty-note{font-size:var(--form-note-size);line-height:var(--form-note-leading);color:var(--muted)}
.shift-template-editor-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:650px){
 .shift-template-settings>.position-settings-heading{flex-direction:row;align-items:flex-start;gap:var(--compact-gap)}
 .shift-template-settings>.button{width:100%}
}

/* Week navigation reuses calendar arrows inside the staffing dialog. */
 .staffing-report-location{display:flex;align-items:center;gap:var(--compact-gap);margin:var(--settings-caption-space) 0 0;color:var(--muted);font-size:13px;font-weight:400;line-height:1.5}
.staffing-report-location>.icon{width:14px;height:14px;flex-shrink:0}
.staffing-report-location>span{min-width:0;overflow-wrap:anywhere}
.staffing-report-navigation{width:100%;min-width:0;justify-content:space-between;gap:var(--compact-gap)}
.staffing-report-navigation>.planner-nav-arrow{flex-shrink:0}
.staffing-report-navigation>strong{flex:1;min-width:0;font-size:16px;line-height:1.4}
@media(max-width:650px){.staffing-report-navigation>strong{font-size:14px}}

/* Location feature controls reuse the personal-settings switches. */
.staffing-daily-heading > .settings-section-heading,.shift-template-settings .settings-section-heading { min-width:0; flex:1; }
.staffing-daily-heading > .settings-switch,.shift-template-settings .settings-switch { flex-shrink:0; }

.settings-switch:has([data-location-feature]:disabled) { opacity:1; }

/* Customer conversation: wider dialog, only the message history scrolls. */
html:has(#modal.support-conversation-dialog[open]),html:has(#modal.support-conversation-dialog[open]) body{overflow:hidden;overscroll-behavior:none}
html[data-theme] body #modal.support-conversation-dialog{width:760px;max-width:calc(100% - 32px);height:min(800px,90dvh);max-height:90dvh;padding:var(--surface-inset);box-sizing:border-box;overflow:hidden}
html[data-theme] body #modal.support-conversation-dialog[open]{display:flex;flex-direction:column;gap:var(--surface-gap)}
#modal.support-conversation-dialog>.modal-head{flex:none;margin:0;gap:var(--surface-gap)}
#modal.support-conversation-dialog>.modal-head>div{min-width:0}
#modal.support-conversation-dialog>.modal-head h2{margin:0;overflow-wrap:anywhere}
#modal.support-conversation-dialog>.modal-head>[data-close]{flex:none}
#modal.support-conversation-dialog>.support-chat-thread{display:grid;grid-template-rows:auto minmax(0,1fr) auto;flex:1;min-height:0;min-width:0}
.support-chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--surface-gap);flex-wrap:wrap}
#modal.support-conversation-dialog .support-chat-log{height:100%;min-height:0}
#modal.support-conversation-dialog .support-chat-composer{flex:none}

.location-limit-dialog>.plan-access-card{width:100%}
.location-limit-banner{margin-block:var(--surface-gap);min-width:0}

/* Approved blue glass artwork: shared by billing and access overlays. */
html[data-theme] body .billing-glass-card {
 --ink:var(--action-ink); --muted:color-mix(in srgb,var(--action-ink) 82%,transparent);
 position:relative; isolation:isolate; overflow:hidden; color:var(--ink); background:var(--action);
}
html[data-theme] body .billing-glass-card > :not(.billing-glass-art) { position:relative; z-index:1; }
html[data-theme] body .billing-glass-card .pro-feature-copy { position:relative; z-index:1; }
html[data-theme] body .billing-glass-card > .billing-glass-art {
 display:block; position:absolute; top:0; right:0; width:auto; height:100%; max-width:100%;
 object-fit:contain; object-position:right center; opacity:.45; z-index:0; pointer-events:none; user-select:none;
 -webkit-mask-image:linear-gradient(to right,transparent,#000 45%); mask-image:linear-gradient(to right,transparent,#000 45%);
}
html[data-theme] body .billing-glass-card .plan-access-label {
 background:color-mix(in srgb,var(--action-ink) 14%,transparent); color:var(--action-ink);
}
html[data-theme] body .billing-glass-card .plan-access-label-icon { background:color-mix(in srgb,var(--action-ink) 10%,transparent); }
html[data-theme] body .billing-glass-card .billing-payment-status {
 background:color-mix(in srgb,var(--action-ink) 92%,transparent); color:var(--action);
}
html[data-theme] body .billing-glass-card .billing-payment-status.is-paid {
 background:color-mix(in srgb,var(--status-positive-on-light) 8%,var(--action-ink)); color:var(--status-positive-on-light);
}
html[data-theme] body .billing-glass-card .billing-payment-status.is-failed {
 background:color-mix(in srgb,var(--danger-strong) 8%,var(--action-ink)); color:var(--danger-strong);
}
html[data-theme] body .billing-glass-card :is(.plan-access-action > .button.primary,.billing-settings-actions > .button.primary) {
 background:var(--action-ink); color:var(--action); border-color:transparent;
}
html[data-theme] body .billing-glass-card :is(.plan-access-action > .button.primary,.billing-settings-actions > .button.primary):hover:where(:not(html[data-hover-disabled] *)) {
 background:color-mix(in srgb,var(--action-ink) 90%,var(--action)); color:var(--action); border-color:transparent;
}
html[data-theme] body .billing-glass-card .plan-access-exit {
 background:transparent; color:var(--action-ink); border:1px solid color-mix(in srgb,var(--action-ink) 60%,transparent);
}
html[data-theme] body .billing-glass-card .plan-access-exit:hover:where(:not(html[data-hover-disabled] *)) {
 background:transparent; color:var(--action-ink); border-color:var(--action-ink);
}
html[data-theme] body .billing-glass-card :is(.plan-access-close,.billing-settings-actions > .text-button) { color:var(--action-ink); }

/* Basic transition uses standard notes, selection controls and compact rows. */
.billing-transition section{min-width:0}
.billing-transition h3{display:flex;justify-content:space-between;gap:var(--identity-gap);margin:0 0 var(--compact-gap);font-size:var(--person-title-size);font-weight:550}
.billing-transition h3 span{color:var(--muted);font-weight:400}
.billing-transition section>.form-note{margin-bottom:var(--compact-gap)}
.billing-transition-summary>div+div{margin-top:var(--compact-gap)}
.billing-transition-summary>.form-note{margin-top:var(--compact-gap)}
.billing-transition-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--compact-gap)}
html[data-theme] body .billing-transition .button.pay-mode-choice{display:flex;flex-direction:row;justify-content:flex-start;text-align:left;margin:0;padding-inline:var(--surface-gap);cursor:pointer}
.billing-transition-option:has(input:focus-visible){outline:2px solid var(--control-accent);outline-offset:2px}
.billing-transition-option:has(input:disabled){color:var(--muted)}
.billing-transition-option strong{font-size:var(--person-title-size);font-weight:500;overflow-wrap:anywhere}
.billing-transition-details,.billing-transition-features{font-size:var(--person-title-size)}
.billing-transition-details{margin-top:var(--compact-gap)}
.billing-transition :is(.billing-transition-details,.billing-transition-features)>summary{color:var(--muted);cursor:pointer}
.billing-transition-features>.form-note{margin-top:var(--compact-gap)}
.billing-transition-details>div{display:flex;justify-content:space-between;gap:var(--identity-gap);padding:var(--compact-gap) 0;border-bottom:1px solid var(--control-border)}
.billing-transition-details small{display:block;color:var(--muted);line-height:1.6}
@media(max-width:650px){.billing-transition-options{grid-template-columns:minmax(0,1fr)}}

/* Read-only locations: disabled actions keep their place without interactive hover. */
html[data-theme] body .directory-menu button:disabled{
 cursor:not-allowed;opacity:.35;pointer-events:none;
}

/* Shared input paint: quiet fill and the shared search accent on hover, press and focus. */
html[data-theme] body :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='submit']):not([type='button']):not([type='color']),textarea:not(.support-chat-input textarea),select:not([hidden]),.custom-select-trigger:not(.shift-person-field *),.date-trigger,.date-range-trigger,.support-chat-input) { background-color:var(--field-surface,var(--surface-subtle))!important; border-width:1px!important; border-style:solid!important; border-color:var(--field-border,transparent)!important; box-shadow:none!important; }
html[data-theme] body :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='submit']):not([type='button']):not([type='color']),textarea:not(.support-chat-input textarea),select:not([hidden]),.custom-select-trigger:not(.shift-person-field *),.date-trigger,.date-range-trigger,.support-chat-input):hover:where(:not(html[data-hover-disabled] *)):not(:disabled) { border-color:var(--field-state-border,var(--control-accent))!important; }
html[data-theme] body :is(input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='submit']):not([type='button']):not([type='color']),textarea:not(.support-chat-input textarea),select:not([hidden]),.custom-select-trigger:not(.shift-person-field *),.date-trigger,.date-range-trigger,.support-chat-input):is(:active,:focus,:focus-visible,:focus-within,[aria-expanded='true']):not(:disabled) { border-color:var(--field-state-border,var(--control-accent))!important; outline:0!important; box-shadow:none!important; }

/* Shared inline feedback: text stays readable; icon and surface carry severity. */
html[data-theme] body :is(.form-feedback,.form-note-with-icon,.form-error:not(:empty)) {
 --feedback-accent:var(--action);
 display:grid; grid-template-columns:var(--feedback-icon-size) minmax(0,1fr); align-items:start;
 gap:var(--compact-gap); box-sizing:border-box; min-width:0; max-width:100%;
 margin:0; padding:var(--surface-gap); border:0; border-radius:var(--small-control-corner);
 background:color-mix(in srgb,var(--feedback-accent) 7%,var(--surface));
 color:var(--ink)!important; font-size:var(--form-note-size); font-weight:400;
 line-height:var(--form-note-leading); overflow-wrap:anywhere; text-align:left;
}
html[data-theme] body .form-error:not(:empty) { --feedback-accent:var(--danger-strong); }
html[data-theme] body :is(.form-feedback,.form-note-with-icon,.form-error:not(:empty)):not(:has(>.icon))::before {
 content:''; grid-column:1; width:var(--feedback-icon-size); height:var(--feedback-icon-size); margin-top:1px;
 background:var(--feedback-icon-color,var(--feedback-accent)); flex-shrink:0;
 -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 10.5V17'/%3E%3Ccircle cx='12' cy='7.5' r='0.5'/%3E%3C/svg%3E") center/contain no-repeat;
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 10.5V17'/%3E%3Ccircle cx='12' cy='7.5' r='0.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
html[data-theme] body :is(.form-feedback,.form-note-with-icon,.form-error:not(:empty))>.icon {
 position:static; grid-column:1; width:var(--feedback-icon-size); height:var(--feedback-icon-size); margin:1px 0 0;
 flex:0 0 var(--feedback-icon-size); color:var(--feedback-icon-color,var(--feedback-accent)); stroke-width:1.6;
}
html[data-theme] body :is(.form-feedback,.form-note-with-icon,.form-error:not(:empty))>span { min-width:0; }
html[data-theme] body :is(.form-feedback,.form-note-with-icon)[hidden] { display:none; }

/* Confirmations share the same note-to-actions gap as editor dialogs. */
html[data-theme] #modal .standard-dialog-form>.replacement-dialog-slot { margin:0; }
html[data-theme] #modal .standard-dialog-form>.modal-actions { margin:0; padding-top:0; }

/* Application palette shared by workspaces, administration and public service pages. */
html[data-theme] {
 --control-accent:#4866cf;
 --control-accent-hover:#405dc3;
 --control-accent-ink:#fff;
 --personal-canvas:#e7e9ec;
 --personal-board:#f3f4f5;
 --personal-paper:#fff;
 --list-row-surface:var(--personal-paper);
 --personal-ink:#19191e;
 --personal-muted:#51596b;
 --personal-contrast:#fff;
}
html[data-theme="dark"] {
 --personal-canvas:#0c0e12;
 --personal-board:#151820;
 --personal-paper:#20242d;
 --personal-ink:#eff1f7;
 --personal-muted:#bec5d4;
 --personal-contrast:#101217;
}
html[data-theme], html[data-theme] body {
 --canvas:var(--personal-canvas);
 --panel:var(--personal-paper);
 --active:var(--personal-ink);
 --active-ink:var(--personal-contrast);
 --hover:var(--personal-board);
 --workspace-bg:var(--personal-canvas);
 --surface:var(--personal-paper);
 --surface-subtle:var(--personal-board);
 --ink:var(--personal-ink);
 --muted:var(--personal-muted);
 --accent:var(--personal-ink);
 --action:var(--personal-ink);
 --action-ink:var(--personal-contrast);
 --action-hover:color-mix(in srgb,var(--personal-ink) 75%,var(--personal-muted));
 --theme-text:var(--personal-ink);
 --segment-active:var(--control-accent);
 --segment-active-ink:var(--control-accent-ink);
 --segment-track:var(--personal-board);
 --panel-tab-active:var(--personal-ink);
 --panel-tab-count:var(--personal-board);
 --notice-info:var(--personal-muted);
 --list-row-fill:var(--list-row-surface);
 --list-row-hover-fill:color-mix(in srgb,var(--ink) var(--neutral-hover-strength,1.5%),var(--list-row-fill));
 --field-surface:var(--personal-board);
 --search-surface-fill:var(--personal-paper);
 --search-filter-fill:var(--personal-ink);
 --search-filter-ink:var(--personal-contrast);
}
html[data-theme] {
 --app-dialog-bg:var(--personal-board);
 --app-dialog-card:var(--personal-paper);
}
html[data-theme] body :is(dialog,.mobile-sheet,.profile-dropdown,.custom-select-popover,.date-popover) {
 --surface:var(--app-dialog-card);
 --surface-subtle:var(--app-dialog-card);
 --search-surface-fill:var(--app-dialog-card);
 --search-surface-border:color-mix(in srgb,var(--ink) 16%,var(--search-surface-fill));
 --dialog-inset-surface:var(--app-dialog-card);
 --field-surface:var(--app-dialog-card);
 --list-row-fill:var(--app-dialog-card);
 --list-row-hover-fill:color-mix(in srgb,var(--ink) var(--neutral-hover-strength,1.5%),var(--app-dialog-card));
 --segment-track:var(--app-dialog-card);
 --mobile-inset-fill:var(--app-dialog-card);

}


/* A transparent dialog host keeps its spotlight or drawer geometry; paint the visible panel. */
html[data-theme] body :is(dialog:not(.onboarding-tour,.plan-access-dialog,.employee-profile-drawer),.mobile-sheet:not(dialog),.profile-dropdown,.custom-select-popover,.date-popover):not(.continuous-corner-surface),
html[data-theme] body :is(dialog.onboarding-tour .onboarding-card,dialog.plan-access-dialog .plan-access-card) {
 background-color:var(--app-dialog-bg)!important;
}

/* Preserve the app icon silhouette when displaying its raster fallback. */
img[src*="/assets/app/icon-"],img[src*="/assets/app/logo.png"]{clip-path:inset(0 round 25%)}

/* Inline drafts use the existing schedule grid and shift composer. */
.schedule-draft-toolbar{display:flex;align-items:center;gap:var(--surface-gap);min-width:0;padding:var(--surface-gap);border-radius:var(--inset-corner);background:var(--surface)}
.schedule-draft-symbol{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--control-height);height:var(--control-height);border-radius:var(--small-control-corner);color:var(--control-accent);background:color-mix(in srgb,var(--control-accent) 9%,var(--surface))}
.schedule-draft-symbol>.icon{width:24px;height:24px}
.schedule-draft-copy{display:grid;flex:1;gap:calc(var(--compact-gap) / 2);min-width:0}
.schedule-draft-copy>strong{font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);line-height:1.4}
.schedule-draft-copy>.form-note{margin:0;color:var(--muted)}
.schedule-draft-actions{display:flex;align-items:center;gap:var(--surface-gap);flex-shrink:0}
html[data-theme] body.panel-typography #app .schedule-draft-actions>.button{height:var(--control-height);min-height:var(--control-height);padding:var(--compact-gap) var(--surface-gap);white-space:nowrap}
@media(max-width:1100px){.schedule-draft-toolbar:has(.schedule-draft-actions>button:nth-child(2)){flex-wrap:wrap}.schedule-draft-toolbar:has(.schedule-draft-actions>button:nth-child(2)) .schedule-draft-copy{flex-basis:calc(100% - var(--control-height) - var(--surface-gap))}.schedule-draft-actions{margin-left:auto}}
@media(max-width:650px){
 .schedule-draft-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--compact-gap)}
 .schedule-draft-toolbar>.schedule-draft-symbol{display:none}
 .schedule-draft-toolbar>.schedule-draft-copy{min-width:0}
 .employee-publication-banner{column-gap:var(--surface-gap)}
 .schedule-draft-toolbar:has(.schedule-draft-actions>button:nth-child(2))>.schedule-draft-copy{grid-column:1 / -1}
 .schedule-draft-toolbar:has(.schedule-draft-actions>button:nth-child(2))>.schedule-draft-actions{grid-column:1 / -1;width:100%;justify-content:space-between}
 .schedule-draft-actions>.text-button{white-space:nowrap}
 html[data-theme] body.panel-typography #app .schedule-draft-toolbar .schedule-draft-actions>.button{height:auto!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--control-accent);corner-shape:round}
 html[data-theme] body.panel-typography #app .schedule-draft-toolbar .schedule-draft-actions>.button:enabled:hover:where(:not(html[data-hover-disabled] *)){color:var(--control-accent-hover)}
}
.schedule-draft-rows{display:grid;gap:var(--list-row-gap);min-width:0}
.schedule-draft-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--compact-gap) var(--surface-gap);min-width:0}
.schedule-draft-row>div{display:grid;gap:calc(var(--compact-gap) / 2);min-width:0;flex:1}
.schedule-draft-row strong{font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);overflow-wrap:anywhere}
.schedule-draft-row>div>span{font-size:var(--panel-caption-size);color:var(--muted);overflow-wrap:anywhere}

/* Publication shortages: one disclosure, with flat date rows when expanded. */
.schedule-review-shortages>summary{display:flex;align-items:center;gap:var(--compact-gap);list-style:none;cursor:pointer;min-width:0}
.schedule-review-shortages>summary::-webkit-details-marker{display:none}
.schedule-review-shortages>summary>.icon:first-child{color:var(--notice-warning);flex-shrink:0}
.schedule-review-shortages>summary>span{display:grid;flex:1;min-width:0;gap:calc(var(--compact-gap) / 2)}
.schedule-review-shortages>summary strong{font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);line-height:1.4}
.schedule-review-shortages>summary small{color:var(--muted);font-size:var(--panel-caption-size);line-height:1.5}
.schedule-review-shortages>summary>.icon:last-child{color:var(--muted);flex-shrink:0}
.schedule-review-shortages[open]>summary>.icon:last-child{transform:rotate(90deg)}
.schedule-review-shortages>dl{display:grid;gap:0;margin:var(--surface-gap) 0 0;font-size:var(--panel-caption-size)}
.schedule-review-shortages>dl>div{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--surface-gap);padding-block:var(--compact-gap);border-top:1px solid var(--line)}
.schedule-review-shortages dt{color:var(--muted);line-height:1.6}
.schedule-review-shortages dd{display:grid;gap:calc(var(--compact-gap) / 2);min-width:0;margin:0;line-height:1.6}
.schedule-review-shortages dd>strong{font-weight:var(--person-name-weight);color:var(--ink);flex-shrink:0}
.schedule-review-shortages dd>ul{display:flex;flex-wrap:wrap;gap:calc(var(--compact-gap) / 2) var(--surface-gap);list-style:none;padding:0;margin:0;color:var(--muted)}
.schedule-review-shortages dd li{display:inline-flex;align-items:baseline;gap:calc(var(--compact-gap) / 2)}
.schedule-review-shortages dd li>b{font-weight:var(--person-name-weight);color:var(--ink)}

.schedule-review-changes{display:grid;gap:var(--compact-gap);min-width:0}
.schedule-review-changes>.settings-section-heading{margin:0}
.schedule-change-day{min-width:0}
.schedule-change-day>h4{margin:0 0 var(--compact-gap);font-size:var(--panel-body-size);font-weight:var(--person-name-weight);line-height:1.4;color:var(--muted)}
.schedule-change-list{display:grid;min-width:0}
.schedule-change-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--compact-gap);min-width:0;padding-block:var(--compact-gap)}
.schedule-change-row+.schedule-change-row{border-top:1px solid var(--line)}
.schedule-change-row.is-updated>.schedule-change-time{grid-column:1 / -1;padding-left:calc(var(--list-row-action-size) + var(--compact-gap))}
.schedule-change-person{display:flex;align-items:center;gap:var(--compact-gap);min-width:0}
.schedule-change-person>.avatar{width:var(--list-row-action-size);height:var(--list-row-action-size);flex:0 0 var(--list-row-action-size)}
.schedule-change-person>div{display:grid;gap:calc(var(--compact-gap) / 2);min-width:0}
.schedule-change-person strong{font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);line-height:1.4;overflow-wrap:anywhere}
.schedule-change-status{font-size:var(--panel-caption-size);line-height:1.5;color:var(--muted)}
.schedule-change-status.is-removed{color:var(--danger)}
.schedule-change-time{display:grid;gap:calc(var(--compact-gap) / 2);font-size:var(--panel-caption-size);line-height:1.6;color:var(--muted);min-width:0}
.schedule-change-time>span:not(.notification-shift-version){font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);line-height:1.4;color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.schedule-change-time .notification-shift-version>del{font-size:var(--panel-body-size);font-variant-numeric:tabular-nums}
.schedule-change-time .notification-shift-version.is-current>strong{font-size:var(--list-row-title-size);font-weight:var(--person-name-weight);color:var(--ink);font-variant-numeric:tabular-nums}


.schedule-publication-row>.schedule-change-person{display:flex;flex-direction:row;gap:var(--compact-gap)}
.schedule-publication-row .form-note{margin:0}
.schedule-publication-state{display:flex;flex-shrink:0;color:var(--muted)}
.schedule-publication-state.is-acknowledged{color:var(--control-accent)}

/* Conflicts reuse the payment form radio choice and existing record surfaces. */
.schedule-conflict{display:grid;gap:var(--surface-gap)}
.schedule-conflict-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--compact-gap);margin:0;padding:0;border:0;min-width:0}
html[data-theme] body #modal #schedule-draft-conflicts .button.pay-mode-choice.schedule-conflict-option{display:flex;flex-direction:row;height:auto!important;min-height:var(--control-height)!important;justify-content:flex-start;align-items:center;text-align:left;white-space:normal;padding:var(--compact-gap) var(--surface-gap);cursor:pointer}
#schedule-draft-conflicts .schedule-conflict-option>span:last-child{display:grid;gap:calc(var(--compact-gap) / 2);min-width:0}
.schedule-conflict-option strong{font-size:var(--panel-body-size);font-weight:var(--person-name-weight);line-height:1.4}
.schedule-conflict-option small{font-size:var(--panel-caption-size);font-weight:400;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.schedule-conflict-option:has(input:disabled){opacity:.5;cursor:default}
.schedule-conflict-option:has(input:focus-visible){outline:2px solid var(--control-accent);outline-offset:2px}
@media(max-width:650px){.schedule-conflict-options{grid-template-columns:minmax(0,1fr)}}

.schedule-draft-symbol.is-published{color:var(--status-active-ink);background:var(--status-active-fill)}
.schedule-draft-copy>[data-publication-people]{justify-self:start;justify-content:flex-start;gap:calc(var(--compact-gap) / 2);margin:0;padding:0;min-height:0;height:auto;text-align:left}

.schedule-draft-published-heading{display:flex;align-items:center;gap:var(--compact-gap)}
.schedule-draft-published-heading>.icon{display:none;flex-shrink:0;width:20px;height:20px;color:var(--status-positive)}
@media(max-width:650px){
 .schedule-draft-published-heading>.icon{display:block}
 .schedule-draft-copy:has(>.schedule-draft-published-heading>.icon)>[data-publication-people],
 .employee-publication-banner>.schedule-draft-copy:has(>.schedule-draft-published-heading>.icon)>.form-note{margin-inline-start:calc(20px + var(--compact-gap))}
}

@media(max-width:650px){.schedule-draft-action-detail{display:none}}


/* Shared Smenlo checkbox; native focus, validation and form values are retained. */
html[data-theme] body input.smenlo-check[type='checkbox'] {
 --checkbox-size:20px;
 appearance:none; -webkit-appearance:none; position:relative; display:inline-block;
 box-sizing:border-box; flex:0 0 var(--checkbox-size); width:var(--checkbox-size);
 height:var(--checkbox-size); min-height:0; margin:0; padding:0; vertical-align:middle;
 border:1px solid var(--control-border); border-radius:calc(var(--compact-gap,8px) / 2);
 background:var(--surface); background-image:none; color:var(--control-accent-ink,var(--action-ink));
 box-shadow:none; cursor:pointer;
 transition:background-color 180ms ease,border-color 180ms ease,transform 180ms ease;
}
html[data-theme] body input.smenlo-check::after {
 content:''; position:absolute; width:30%; height:52%; left:34%; top:15%;
 box-sizing:border-box; border:0 solid currentColor; border-right-width:2px; border-bottom-width:2px;
 opacity:0; clip-path:inset(100% 0 0 0); transform:translateY(2px) rotate(45deg) scale(.8);
 transition:clip-path 220ms ease,opacity 120ms ease,transform 220ms cubic-bezier(.2,.8,.2,1);
}
html[data-theme] body input.smenlo-check:is(:checked,:indeterminate) { background:var(--control-accent,var(--action)); border-color:var(--control-accent,var(--action)); }
html[data-theme] body input.smenlo-check:checked::after { opacity:1; clip-path:inset(0); transform:translateY(0) rotate(45deg) scale(1); }
html[data-theme] body input.smenlo-check:indeterminate::after { width:50%; height:2px; left:25%; top:calc(50% - 1px); border:0; background:currentColor; opacity:1; clip-path:inset(0); transform:none; }
html[data-theme] body input.smenlo-check:not(:disabled):hover:where(:not(html[data-hover-disabled] *)) { border-color:var(--control-accent,var(--action)); }
html[data-theme] body input.smenlo-check:not(:disabled):active { transform:scale(.9); }
html[data-theme] body input.smenlo-check:focus-visible { outline:2px solid var(--control-accent,var(--action)); outline-offset:3px; }
html[data-theme] body input.smenlo-check:disabled { opacity:.4; cursor:default; }
html[data-theme] body input.smenlo-check.staff-select { --checkbox-size:16px; }
@media(prefers-reduced-motion:reduce) {
 html[data-theme] body input.smenlo-check,html[data-theme] body input.smenlo-check::after { transition:none; }
}
