@font-face {
  font-family: Outfit;
  src: url('/assets/fonts/Outfit-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink-primary: #222222;
  --ink-secondary: #666666;
  --ink-tertiary: #999999;
  --ink-disabled: #b5b5b5;
  --surface-page: #ffffff;
  --surface-card: #ffffff;
  --surface-subtle: #f6f6f6;
  --surface-hover: #f0f0f0;
  --border-default: #dadada;
  --border-subtle: #eaeaea;
  --dark-surface: #222222;
  --on-dark: #ffffff;
  --ink: var(--ink-primary);
  --muted: var(--ink-secondary);
  --line: var(--border-default);
  --soft: var(--surface-subtle);
  --surface: var(--surface-card);
  --accent: var(--dark-surface);
  --accent-dark: #000000;
  --accent-soft: var(--surface-subtle);
  --warn: #626262;
  --warn-soft: #f3f3f3;
  --danger: #454545;
  --danger-soft: #ececec;
  --shadow: 0 14px 38px rgb(0 0 0 / 9%);
  --font-ui: Outfit, "Segoe UI", system-ui, sans-serif;
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink-primary); background: var(--surface-page); font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; font-weight: 650; letter-spacing: -.035em; }
h2 { margin-bottom: 4px; font-size: 17px; }
h3 { margin-bottom: 8px; font-size: 14px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 100px; padding: 20px 32px; border-bottom: 1px solid var(--border-default); background: var(--surface-page); }
.brand { display: grid; gap: 4px; }
.brand-title-row { display: flex; align-items: center; gap: 13px; }
.brand-logo { width: auto; height: 31px; flex: 0 0 auto; }
.brand strong { font-size: 34px; line-height: 1.12; letter-spacing: .015em; font-weight: 700; }
.brand-subtitle { color: var(--muted); font-size: 13px; line-height: 1.35; }
.topbar nav { position: absolute; left: 50%; display: flex; gap: 0; padding: 5px; overflow: hidden; border-radius: 999px; background: var(--dark-surface); flex-shrink: 0; transform: translateX(-50%); transition: background-color 260ms cubic-bezier(.2,.75,.25,1); }
.topbar nav::before { position: absolute; top: 5px; bottom: 5px; left: 5px; z-index: 0; width: calc(50% - 5px); border-radius: 999px; background: var(--on-dark); box-shadow: 0 1px 5px rgb(0 0 0 / 10%); content: ""; transform: translateX(0); transition: transform 260ms cubic-bezier(.2,.75,.25,1), background-color 260ms ease, box-shadow 260ms ease; }
.topbar nav[data-active="setup"] { background: var(--surface-subtle); }
.topbar nav[data-active="setup"]::before { background: var(--dark-surface); box-shadow: 0 1px 5px rgb(0 0 0 / 12%); transform: translateX(100%); }
.nav-button { position: relative; z-index: 1; display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 10px; min-width: 154px; padding: 12px 24px; border: 0; border-radius: 999px; color: var(--on-dark); background: transparent; font-size: 16px; font-weight: 550; transition: color 220ms ease; }
.nav-icon { width: 24px; height: 24px; flex-shrink: 0; }
.nav-button.active { background: transparent; box-shadow: none; }
.topbar nav[data-active="schedule"] #scheduleNav, .topbar nav[data-active="setup"] .nav-button { color: var(--ink); }
.topbar nav[data-active="setup"] #setupNav { color: var(--on-dark); }
main { position: relative; width: min(1540px, calc(100% - 44px)); margin: 0 auto; padding: 32px 0 50px; }

.hidden { display: none !important; }
.view-transition-shell { isolation: isolate; }
.view-incoming, .view-outgoing { position: absolute !important; top: 32px; left: 0; pointer-events: none; will-change: opacity, transform; overflow: hidden; border-radius: 24px; }
.view-incoming { z-index: 2; animation: workspace-enter 350ms cubic-bezier(.22,1,.36,1) both; }
.view-outgoing { z-index: 1; width: 100%; animation: workspace-exit 350ms cubic-bezier(.22,1,.36,1) both; }
.view-incoming#scheduleView, .view-outgoing#scheduleView { background: #fff; }
.view-incoming#setupView { animation-name: setup-enter; }
.view-incoming#scheduleView { animation-name: schedule-enter; }
.view-outgoing#setupView { animation-name: setup-exit; }
.view-outgoing#scheduleView { animation-name: schedule-exit; }
@keyframes workspace-enter { from { opacity: 0; transform: translateX(24px) scale(1.012); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes workspace-exit { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(-24px) scale(.98); } }
@keyframes schedule-enter { from { opacity: 0; transform: translateX(calc(-50% - 24px)) scale(1.012); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes schedule-exit { from { opacity: 1; transform: translateX(-50%) scale(1); } to { opacity: 0; transform: translateX(calc(-50% - 24px)) scale(.98); } }
@keyframes setup-enter { from { opacity: 0; transform: translateX(24px) scale(1.012); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes setup-exit { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(24px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .view-incoming, .view-outgoing { animation-duration: 80ms !important; } .view-incoming#scheduleView, .view-outgoing#scheduleView { transform: translateX(-50%) !important; } @keyframes workspace-enter { from { opacity: 0; } to { opacity: 1; } } @keyframes workspace-exit { from { opacity: 1; } to { opacity: 0; } } @keyframes setup-enter { from { opacity: 0; } to { opacity: 1; } } @keyframes setup-exit { from { opacity: 1; } to { opacity: 0; } } @keyframes schedule-enter { from { opacity: 0; } to { opacity: 1; } } @keyframes schedule-exit { from { opacity: 1; } to { opacity: 0; } } }
.muted { color: var(--muted); }
.page-heading { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.display-settings { position: relative; }
.display-settings-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 98px; height: 38px; padding: 0 11px; border: 1px solid var(--border-default); border-radius: 8px; color: var(--ink-primary); background: var(--surface-card); font-weight: 650; }
.display-settings-button:hover { border-color: var(--ink-tertiary); background: var(--surface-hover); }
.display-settings-button svg { width: 19px; height: 19px; }
.display-settings-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; display: grid; min-width: 188px; gap: 8px; padding: 12px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface-card); box-shadow: 0 8px 24px rgb(0 0 0 / 9%); }
.display-settings-section { display: grid; gap: 8px; }
.display-settings-section + .display-settings-section { margin-top: 3px; padding-top: 11px; border-top: 1px solid var(--border-default); }
.display-settings-popover strong { font-size: 12px; font-weight: 650; }
.display-settings-popover label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 500; cursor: pointer; }
.display-settings-popover input { width: 14px; min-height: 14px; margin: 0; accent-color: var(--dark-surface); }
.message { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; z-index: 60; width: max-content; max-width: min(720px, calc(100vw - 32px)); margin: 0; padding: 13px 23px; border: 1px solid var(--dark-surface); border-radius: 999px; color: var(--on-dark); background: var(--dark-surface); box-shadow: 0 16px 44px rgb(0 0 0 / 16%); text-align: center; transform: translateX(-50%); }
.message-content { display: grid; gap: 8px; }
.message-title { font-size: 14px; font-weight: 550; line-height: 1.4; }
.message-detail { margin: 0; color: var(--on-dark); font-size: 14px; font-weight: 400; line-height: 1.45; }
.message.requires-confirmation { width: min(700px, calc(100vw - 32px)); padding: 21px 30px 18px; border-radius: 34px; }
.message.requires-confirmation .message-title { font-size: 17px; font-weight: 650; }
.message-confirm { display: grid; width: 40px; height: 40px; margin: 17px auto 0; padding: 0; place-items: center; border: 1px solid var(--on-dark); border-radius: 999px; color: var(--on-dark); background: transparent; }
.message-confirm:hover { color: var(--dark-surface); background: var(--on-dark); }
.message-confirm svg { width: 20px; height: 20px; }

.button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--border-default); border-radius: 8px; color: var(--ink-primary); background: var(--surface-card); font-weight: 650; }
.button:hover { border-color: var(--ink-tertiary); }
.button.primary { border: 0; color: var(--on-dark); background: var(--dark-surface); }
.button.primary:hover { background: var(--dark-surface); }
.button.secondary { background: var(--surface-card); }
.button.danger { border-color: #bebebe; color: var(--danger); background: var(--danger-soft); }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.button:disabled, button:disabled { cursor: default; color: var(--ink-disabled); background: var(--surface-subtle); opacity: 1; }
button:focus-visible, summary:focus-visible { outline: 1px solid var(--ink-primary); outline-offset: 3px; }
.link-button { padding: 3px; border: 0; color: var(--accent); background: transparent; font-weight: 700; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 7px; color: var(--muted); background: var(--soft); font-size: 20px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.setup-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 24px; align-items: start; }
.setup-sidebar { position: sticky; top: 124px; display: grid; gap: 14px; }
.editor-column { display: grid; gap: 18px; min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--border-default); border-radius: 10px; background: var(--surface-card); }
.panel:not(details) { padding: 18px; }
.configuration-panel { display: grid; gap: 20px; }
.planning-week-panel { padding: 15px 18px !important; }
.panel-heading { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.panel-heading p { margin: 0; }
label { display: grid; gap: 6px; color: var(--ink-secondary); font-size: 12px; font-weight: 650; }
input, select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid var(--border-default); border-radius: 7px; color: var(--ink-primary); background: var(--surface-card); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(0 0 0 / 11%); }
input.invalid, select.invalid { border-color: var(--danger); background: #f9f9f9; }
.inline-error { color: var(--danger); font-size: 11px; font-weight: 600; }
.input-with-action { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.save-state { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; }

.table-scroll { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 8px 9px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .03em; text-align: left; text-transform: uppercase; }
td { padding: 9px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
tbody tr:hover { background: var(--surface-subtle); }
.table-action { padding: 2px 5px; border: 0; color: var(--accent); background: transparent; font-weight: 700; }
.empty-state { padding: 18px; color: var(--muted); text-align: center; }
.pill { display: inline-block; margin: 1px 3px 1px 0; padding: 3px 7px; border-radius: 999px; color: var(--ink-secondary); background: var(--surface-subtle); font-size: 11px; }

.coverage-grid { table-layout: fixed; }
.coverage-grid th:first-child { width: 112px; }
.coverage-grid tbody th { padding: 10px 9px; border-bottom: 1px solid var(--border-subtle); text-align: left; text-transform: none; }
.coverage-grid tbody th strong, .coverage-grid tbody th span { display: block; }
.coverage-grid tbody th span { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.coverage-cell { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-height: 48px; gap: 5px 36px; padding: 8px; border: 1px solid transparent; border-radius: 7px; color: var(--ink-primary); background: var(--surface-subtle); text-align: left; }
.coverage-cell:hover, .coverage-cell:focus { border-color: var(--border-default); background: var(--surface-hover); outline: none; }
.coverage-closed { display: block; min-height: 48px; padding: 14px 8px; border-radius: 7px; color: var(--muted); background: var(--soft); }
.coverage-editor { display: grid; gap: 6px; padding: 7px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface-subtle); }
.coverage-editor > span { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.coverage-editor label { gap: 2px; font-size: 10px; }
.coverage-editor input { min-width: 0; min-height: 30px; padding: 3px 5px; }
.coverage-editor .coverage-actions { display: flex; justify-content: flex-end; }
.category-editor .staffing-category-row { grid-template-columns: minmax(94px, 1.2fr) 1fr 1fr; align-items: end; }
.legacy-coverage-notice { display: grid; gap: 4px; padding: 8px; border-radius: 5px; background: var(--warn-soft); color: var(--ink); }
.staffing-category-row > b { display: inline-flex; align-self: center; align-items: center; gap: 5px; font-size: 11px; }
.staffing-category-row .shift-icon-indicator, .coverage-category .shift-icon-indicator { width: 19px; height: 19px; flex: 0 0 19px; }
.staffing-category-row .shift-icon-indicator svg, .coverage-category .shift-icon-indicator svg { width: 13px; height: 13px; }
.coverage-category { display: grid; grid-template-columns: 74px 30px; align-items: center; column-gap: 28px; min-width: 0; color: var(--ink-secondary); font-size: 11px; white-space: nowrap; }
.coverage-category-name { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
.coverage-category-value { color: var(--ink-primary); font-weight: 700; text-align: left; }
.coverage-category b { color: var(--ink-primary); font-weight: 650; }
.coverage-error { grid-column: 1 / -1; }
.grid-hint { margin: 10px 0 0; color: var(--muted); font-size: 11px; }

.hours-grid { display: grid; grid-template-columns: repeat(7, minmax(95px, 1fr)); gap: 10px; }
.hours-day { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--border-default); border-radius: 9px; background: var(--surface-subtle); }
.hours-day.closed { background: var(--soft); }
.hours-day strong { font-size: 12px; }
.hours-day-heading { display: flex; align-items: baseline; justify-content: flex-start; gap: 12px; }
.hours-date { color: var(--muted); font-size: 11px; }
.holiday { padding: 4px 6px; border-radius: 5px; color: #4e4e4e; background: var(--warn-soft); font-size: 10px; line-height: 1.25; }
.hours-day .check { display: flex; }
.hours-day input[type="time"] { min-height: 32px; padding: 4px 6px; }
.check { display: inline-flex; grid-template-columns: auto 1fr; gap: 7px; align-items: center; }
.check input { width: 15px; min-height: 15px; }

.advanced-panel { overflow: hidden; }
.advanced-panel > summary { display: flex; gap: 14px; align-items: center; padding: 17px 18px; cursor: pointer; list-style: none; }
.advanced-panel > summary span { color: var(--muted); font-size: 12px; }
.advanced-content { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.advanced-content > .form-grid { margin-top: 16px; }
.split-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.compact-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid #efefef; }

dialog { width: min(780px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 30px 100px rgb(0 0 0 / 28%); }
dialog::backdrop { background: rgb(0 0 0 / 55%); backdrop-filter: blur(2px); }
dialog form { padding: 20px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 21px; }
.dialog-actions { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.dialog-actions .spacer { flex: 1; }
.dialog-actions:not(:has(.spacer)) { justify-content: flex-end; }
fieldset { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; }
.target-field { display: grid; grid-template-columns: 1fr 1fr; align-items: end; padding: 8px 10px; }
.working-days-field { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 10px; padding: 8px 10px; }
.working-days-field .check { min-height: 38px; align-items: center; }
.employee-advanced { margin-top: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.employee-advanced > summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.employee-advanced[open] > summary { margin-bottom: 12px; }
legend { padding: 0 4px; color: var(--ink-secondary); font-size: 12px; font-weight: 650; }
.availability-grid { display: grid; grid-template-columns: 95px 1fr 1fr; gap: 7px 9px; align-items: center; }
.availability-grid input { min-height: 32px; }
.field-errors { margin-bottom: 14px; padding: 10px; border-radius: 7px; color: var(--danger); background: var(--danger-soft); line-height: 1.5; }
.preflight-panel { border-color: #c7c7c7; background: #fafafa; }
.preflight-item { margin-top: 8px; padding: 9px 10px; border-left: 1px solid var(--warn); border-radius: 5px; background: var(--warn-soft); }
.preflight-item.error { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.status-card { display: grid; gap: 3px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.status-card small { color: var(--muted); font-size: 10px; }
.status-card.good { border-color: #d3d3d3; background: #f8f8f8; }
.status-card.bad { border-color: #c2c2c2; background: #f6f6f6; }
.status-card.warn { border-color: #d3d3d3; background: #f8f8f8; }
.status-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.schedule-panel { position: relative; min-width: 0; }
@media screen {
  .schedule-panel:has(> .week-lock-sticker:not(.hidden)) {
    border: 3px solid #268557;
    padding: 16px;
  }
  .schedule-panel:has(> .week-lock-sticker.is-editing:not(.hidden)) { border-color: #f3c64e; }
}
.schedule-scroll { max-height: calc(100vh - 260px); }
#scheduleTable { min-width: 1040px; }
#scheduleTable th { position: sticky; top: 0; z-index: 4; background: white; }
#scheduleTable th:first-child, #scheduleTable td:first-child { position: sticky; left: 0; z-index: 3; min-width: 170px; background: white; box-shadow: 5px 0 8px rgb(0 0 0 / 3%); }
#scheduleTable th:first-child { z-index: 5; }
#scheduleTable td { width: 130px; height: 76px; padding: 7px; }
.employee-cell strong { display: block; }
.employee-cell span { color: var(--muted); font-size: 11px; }
.shift-chip { display: block; width: 100%; margin-bottom: 5px; padding: 6px 7px; border: 1px solid #cfcfcf; border-radius: 6px; color: #3d3d3d; background: #f2f2f2; font-size: 11px; line-height: 1.35; text-align: left; }
.shift-chip.locked::after { content: "  🔒"; }
.validation-panel { position: sticky; top: 124px; }
.validation-item { margin-bottom: 9px; padding: 9px; border-left: 1px solid #a6a6a6; border-radius: 5px; background: #f8f8f8; font-size: 12px; line-height: 1.45; }
.validation-item.error { border-color: var(--danger); background: var(--danger-soft); }
.validation-ok { padding: 20px 6px; color: var(--accent); text-align: center; }

@media (max-width: 1000px) {
  .setup-grid, .schedule-layout { grid-template-columns: 1fr; }
  .setup-sidebar, .configuration-panel, .validation-panel { position: static; }
  .hours-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid.four { grid-template-columns: repeat(2, 1fr); }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; padding: 18px 16px; position: static; }
  .topbar nav { position: relative; left: auto; align-self: stretch; transform: none; }
  .nav-button { flex: 1; justify-content: center; }
  .brand-subtitle { max-width: 320px; }
  .message { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .message.requires-confirmation { padding: 19px 22px 16px; }
  .schedule-heading .actions { gap: 6px; }
  main { width: calc(100% - 20px); padding-top: 20px; }
  .page-heading { display: block; }
  .page-heading .actions { justify-content: flex-start; margin-top: 14px; }
  .hours-grid, .form-grid.two, .form-grid.four, .split-panels { grid-template-columns: 1fr; }
  .employee-identity-row, .employee-target-row { grid-template-columns: 1fr; }
  .coverage-grid { min-width: 780px; }
}

@media print {
  @page { size: A4 landscape; margin: 9mm; }
  body { background: white; font-size: 9px; }
  .no-print, #messageBar, .validation-panel, #addShiftButton { display: none !important; }
  main { width: 100%; margin: 0; padding: 0; }
  .schedule-layout { display: block; }
  .panel { border: 0; box-shadow: none; }
  .schedule-scroll { max-height: none; overflow: visible; }
  #scheduleTable { min-width: 0; table-layout: fixed; }
  #scheduleTable th, #scheduleTable td { position: static !important; min-width: 0 !important; height: auto; padding: 4px; box-shadow: none !important; }
  .shift-chip { padding: 3px; font-size: 8px; break-inside: avoid; }
  .status-strip { grid-template-columns: repeat(4, 1fr); }
  .status-card { padding: 5px; }
}

/* Persistent shared frame: route layers never change their layout mode at cleanup. */
html { scrollbar-gutter: stable; }
main { width: min(calc(100% - 48px), 1820px); }
.workspace-frame { position: relative; display: grid; grid-template-areas: "workspace"; min-width: 0; }
.workspace-frame > .view { grid-area: workspace; min-width: 0; }
.workspace-frame.view-transition-shell { isolation: isolate; }
.workspace-frame .view-incoming, .workspace-frame .view-outgoing { position: relative !important; top: auto; left: auto; width: 100%; overflow: clip; border-radius: 24px; pointer-events: none; will-change: opacity, transform; }
.workspace-frame .view-incoming { z-index: 2; animation-duration: 350ms; }
.workspace-frame .view-outgoing { z-index: 1; animation-duration: 350ms; }
.workspace-frame .view-incoming#scheduleView, .workspace-frame .view-outgoing#scheduleView { background: #fff; }
#scheduleView { position: relative; left: auto; width: 100%; margin: 0; transform: none; }
#setupView { margin: 0; padding: 34px 24px 54px; border-radius: 24px; }
@media (max-width: 650px) { main { width: calc(100% - 20px); } #scheduleView { left: auto; width: 100%; margin: 0; transform: none; } #setupView { margin: 0; padding: 24px 16px 42px; } }

/* The two routes are permanent, absolute layers in one stage—not grid items or flow siblings. */
html, body { overflow-x: clip; }
.workspace-frame { display: block; position: relative; width: 100%; overflow-x: clip; }
.workspace-frame > .view { position: absolute !important; inset: 0; width: 100%; min-width: 0; margin: 0; }
.workspace-frame > #setupView { padding: 34px 24px 54px; }
.workspace-frame > #scheduleView { left: 0; transform: none; }
.workspace-frame.view-transition-shell { overflow: hidden; border-radius: 24px; }
.workspace-frame .view-incoming, .workspace-frame .view-outgoing { position: absolute !important; inset: 0; width: 100%; margin: 0; border-radius: 0; }
@media (max-width: 650px) { .workspace-frame > #setupView { padding: 24px 16px 42px; } }

/* Setup is intentionally a focused dark workspace; Schedule remains white. */
#setupView { margin: -32px calc((100vw - min(1540px, calc(100vw - 44px))) / -2) -50px; padding: 34px max(22px, calc((100vw - min(1540px, calc(100vw - 44px))) / 2)) 54px; color: var(--ink-primary); background: var(--dark-surface); }
.setup-page-heading { justify-content: flex-end; color: var(--on-dark); margin-bottom: 18px; }
.setup-page-heading h1 { margin-bottom: 5px; }
.setup-page-heading .muted { color: #bdbdbd; }
.setup-page-heading .setup-eyebrow { display: none; }
#setupView th { text-transform: none; }
.setup-eyebrow { margin-bottom: 7px; color: #a8a8a8; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.setup-grid { grid-template-columns: 310px minmax(0, 1fr); gap: 20px; }
#setupView .panel { border-color: var(--border-default); border-radius: 12px; box-shadow: 0 18px 48px rgb(0 0 0 / 13%); }
#setupView .configuration-panel { gap: 17px; background: var(--surface-card); }
#setupView .planning-week-panel { background: var(--surface-card); }
.setup-save-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 0; color: var(--on-dark); background: var(--dark-surface); }
.setup-save-button.is-saved { border: 1px solid var(--border-default); color: var(--ink-tertiary); background: var(--surface-subtle); }
.setup-save-button .saved-check { color: #25834a; font-size: 15px; }
.week-field-heading { display: flex; align-items: center; justify-content: space-between; }
.week-field-heading .link-button { color: var(--ink-secondary); font-size: 11px; font-weight: 600; }
.setup-page-heading .button.primary { min-height: 48px; padding: 12px 20px; color: var(--ink-primary); background: var(--surface-card); font-size: 15px; }
.setup-page-heading .button.primary:hover { color: var(--ink-primary); background: var(--surface-hover); }
.menu-danger { color: #9b3838 !important; }
.coverage-subsection + .coverage-subsection { margin-top: 24px; padding-top: 21px; border-top: 1px solid #ececec; }
.subsection-heading, .section-title-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.subsection-heading h3, .section-title-row h3 { margin: 0; font-size: 14px; }
.subsection-heading .muted { font-size: 11px; }
.hours-grid { grid-template-columns: repeat(7, minmax(104px, 1fr)); }
.hours-day { padding: 9px; }
.employee-status { color: var(--ink-secondary); font-size: 12px; }
.employee-status::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; content: ""; }
.employee-status.active::before { background: #39885b; }
.employee-status.inactive::before { background: #9b3838; }
.employee-status.inactive { color: #9b9b9b; }
.new-employee-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #39885b; vertical-align: middle; }
.preference-state { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 700; }
.has-preference { color: #268248; background: #eaf6ed; }.no-preference { color: #aaaaaa; background: #f3f3f3; }
#employeeTable td:first-child { min-width: 190px; }
#employeeTable { min-width: 1000px; }
#employeeTable th:nth-child(2), #employeeTable th:nth-child(3) { min-width: 125px; }
#employeeTable td { vertical-align: middle; }
.setup-employee-cell > strong { display: block; margin-top: 6px; font-weight: 600; }
.exception-panel-heading { align-items: center; padding-right: 8px; }
.exception-panel-heading .link-button { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.exception-panel-heading .link-button span { font-size: 14px; line-height: 1; }
.exception-list { display: grid; }
.exception-row { display: grid; grid-template-columns: minmax(150px, 1.25fr) minmax(110px, .8fr) minmax(90px, .6fr) minmax(100px, .7fr) 68px; gap: 14px; align-items: center; min-height: 44px; padding: 8px 10px; border-top: 1px solid var(--border-subtle); }
.exception-row strong { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.exception-row > span { color: var(--ink-secondary); font-size: 12px; }
.exception-time { color: var(--ink-primary) !important; }
.exception-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.exception-reason { color: var(--ink-primary) !important; }
.exception-edit { display: grid; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; color: var(--ink-tertiary); background: transparent; place-items: center; }
.exception-edit:hover { color: var(--ink-primary); background: var(--surface-subtle); }
.exception-edit svg { width: 16px; height: 16px; }
.exception-delete { display: grid; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; color: var(--ink-tertiary); background: transparent; place-items: center; }
.exception-delete:hover { color: #9b3838; background: #f7eeee; }
.exception-delete svg { width: 16px; height: 16px; }
.exception-empty { margin: 0; padding: 8px 10px; }
.exception-top-fields { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) auto; }
.exception-all-day-control { align-self: end; min-height: 38px; white-space: nowrap; }
.exception-date-fields { margin-top: 13px; }
#exceptionTimeFields { margin-top: 13px; }
.optional-label { margin-left: 4px; color: var(--ink-tertiary); font-size: 10px; font-weight: 500; }
.solver-details { margin-top: 19px; padding-top: 16px; border-top: 1px solid #ececec; }
.solver-details > summary { cursor: pointer; color: #4a4a4a; font-size: 13px; font-weight: 650; }
.solver-details .form-grid { margin-top: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.employee-section + .employee-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eeeeee; }
.employee-section h3 { margin-bottom: 11px; font-size: 14px; }
.basic-information-grid { display: grid; gap: 13px; }
.employee-identity-row { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(105px, .82fr) minmax(150px, 1.38fr); gap: 13px; align-items: end; }
.employee-target-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.status-toggle-field { align-self: end; }
.status-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; font-size: 13px; font-weight: 550; }
.status-toggle input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.status-toggle-track { position: relative; display: inline-block; width: 38px; height: 22px; border-radius: 999px; background: #bdbdbd; transition: background-color .2s ease; }
.status-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); content: ""; transition: transform .2s ease; }
.status-toggle input:checked + .status-toggle-track { background: var(--dark-surface); }
.status-toggle input:checked + .status-toggle-track::after { transform: translateX(16px); }
.status-toggle input:focus-visible + .status-toggle-track { outline: 2px solid #777; outline-offset: 2px; }
.availability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.availability-day { display: grid; grid-template-columns: minmax(62px, .8fr) auto 1fr 1fr; gap: 7px; align-items: center; padding: 7px 8px; border: 1px solid #e7e7e7; border-radius: 8px; background: #fbfbfb; }
.availability-day strong { font-size: 12px; }
.availability-day input[type="time"] { min-height: 31px; padding: 4px 5px; }
.availability-day input:disabled { color: var(--ink-disabled); background: var(--surface-subtle); }
.availability-switch { display: inline-flex; gap: 5px; align-items: center; color: var(--ink-secondary); font-size: 10px; font-weight: 600; white-space: nowrap; }
.availability-switch input { width: 13px; min-height: 13px; margin: 0; accent-color: var(--dark-surface); }
.employee-advanced { margin-top: 20px; background: var(--surface-subtle); }
.advanced-employee-section + .advanced-employee-section { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--border-subtle); }
.advanced-employee-section h3 { margin-bottom: 9px; }
.preference-rules { display: grid; gap: 8px; }
.preference-rule { display: grid; grid-template-columns: 112px 90px 120px minmax(220px,1fr) 28px; gap: 7px; align-items: center; padding: 8px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-card); }
.preference-rule select { min-height: 32px; padding: 4px 6px; font-size: 11px; }
.preference-window { display: grid; grid-template-columns: auto auto 1fr auto 1fr; gap: 5px; align-items: center; color: var(--ink-secondary); font-size: 10px; white-space: nowrap; }
.preference-window input[type="checkbox"] { width: 13px; min-height: 13px; margin: 0; accent-color: var(--dark-surface); }
.preference-window input[type="time"] { min-height: 30px; padding: 3px 5px; font-size: 11px; }
.preference-window input:disabled { color: var(--ink-disabled); background: var(--surface-subtle); }
.preference-window b { color: var(--ink-tertiary); font-size: 12px; }.preference-delete { width: 26px; height: 26px; border: 0; border-radius: 5px; color: var(--ink-tertiary); background: transparent; font-size: 16px; }.preference-delete:hover { color: var(--ink-secondary); background: var(--surface-hover); }
.coverage-cell { min-height: 48px; align-items: center; }.coverage-counts { color: var(--ink-secondary); font-size: 11px; white-space: nowrap; }.coverage-counts b { color: var(--ink-primary); font-weight: 650; }.coverage-counts i { margin: 0 2px; color: var(--ink-tertiary); font-style: normal; }
.internal-id { display: flex; gap: 8px; align-items: center; margin: 10px 0 12px; color: var(--ink-tertiary); font-size: 11px; }
.internal-id code { overflow: hidden; min-width: 0; padding: 3px 5px; border-radius: 4px; color: var(--ink-secondary); background: var(--surface-hover); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.copy-id { width: 25px; height: 25px; border: 1px solid var(--border-default); border-radius: 5px; color: var(--ink-secondary); background: var(--surface-card); }
.setup-management-list { display: grid; gap: 7px; }
.setup-management-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border-default); border-radius: 8px; }
.setup-management-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.setup-row-delete { color: #9b3838; }
@media (max-width: 1000px) { #setupView { margin-left: -22px; margin-right: -22px; padding-left: 22px; padding-right: 22px; } .availability-grid { grid-template-columns: 1fr; } .form-grid.three { grid-template-columns: 1fr; } }
@media (max-width: 650px) { #setupView { margin: -20px -10px -50px; padding: 24px 10px 42px; } .availability-day { grid-template-columns: 1fr auto 1fr 1fr; } }
/* Setup controls use the same neutral, lightweight treatment as the editor. */
.setup-panel-heading { align-items: center; margin: 0; gap: 8px; }
.setup-panel-heading h2 { margin: 0; white-space: nowrap; }
.panel-tools { display: flex; gap: 8px; align-items: center; }
.panel-tools .link-button { white-space: nowrap; font-size: 12px; font-weight: 550; }
.overflow-menu { position: relative; }
#managerModeButton { font-weight: 700; }
#managerModeButton.is-manager { color: #268557; }
.menu-divider { margin: 4px 0; border-top: 1px solid var(--border-subtle); }
#managerModeDialog label { display: grid; gap: 7px; }
#managerPassword { letter-spacing: .15em; }
#managerModeError { margin-top: 12px; }
.access-expired .workspace-frame { visibility: hidden; }
.overflow-menu summary { display: grid; place-items: center; width: 28px; height: 28px; font-size: 22px; border-radius: 5px; cursor: pointer; list-style: none; line-height: 1; }
.overflow-menu summary::-webkit-details-marker { display: none; }
.overflow-menu summary:hover { background: var(--surface-hover); }
.overflow-items { position: absolute; right: 0; top: 34px; z-index: 30; width: 172px; padding: 5px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface-card); box-shadow: 0 8px 24px rgb(0 0 0 / 8%); }
.overflow-items button { display: block; width: 100%; border: 0; border-radius: 4px; text-align: left; padding: 9px 10px; background: var(--surface-card); color: var(--ink-primary); font-size: 13px; }
.overflow-items button:hover { background: var(--surface-hover); }
.overflow-items button:disabled { color: var(--ink-disabled); }
.field-label { color: var(--ink-secondary); font-size: 12px; font-weight: 650; }
.planning-week-panel .field-label, .setup-panel-heading h2 { color: var(--ink-primary); font-size: 16px; font-weight: 650; }
.week-field { display: grid; gap: 7px; }
.week-navigator { display: flex; align-items: center; border: 1px solid var(--border-default); border-radius: 7px; min-height: 38px; }
.week-picker { position: relative; flex: 1; min-width: 0; }
.week-arrow, .week-range { border: 0; background: transparent; color: var(--ink); height: 36px; border-radius: 6px; }
.week-arrow { width: 28px; flex-shrink: 0; font-size: 22px; }
.week-range { width: 100%; padding: 0 2px; font-size: 12px; white-space: nowrap; }
.week-arrow:hover, .week-range:hover { background: #f5f5f5; }
.date-picker-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.date-picker-input.date-picker-fallback { top: 40px; width: 100%; height: 38px; padding: 7px; opacity: 1; pointer-events: auto; border: 1px solid #d4d4d4; z-index: 10; }
.small-dialog { width: min(420px, calc(100% - 32px)); }
#availabilityExceptionDialog { width: min(560px, calc(100% - 32px)); }
.schedule-empty { padding: 64px 24px !important; text-align: center; }
.schedule-empty h2 { font-size: 20px; margin-bottom: 12px; }
.schedule-empty p { margin-bottom: 24px; }
.schedule-heading h1 { margin-bottom: 8px; }
.schedule-heading p { font-size: 13px; margin-bottom: 0; }
.status-card.bad strong::before { content: "! "; }
.status-card.warn strong::before { content: "· "; }
.validation-item.error::before { content: "Error · "; font-weight: 700; }
.check input { accent-color: var(--dark-surface); }
@media (max-width: 1000px) { .setup-sidebar, .configuration-panel { position: static; } }

/* Schedule workspace: neutral controls, semantic color only on status icons. */
#scheduleView { position: relative; left: 50%; width: min(calc(100vw - 48px), 1820px); margin: 0; transform: translateX(-50%); }
.schedule-layout { display: block; }
.schedule-heading { gap: 20px; margin-bottom: 18px; }
.schedule-title-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.schedule-title-line h1 { margin-bottom: 0; }
.schedule-indicators { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.schedule-indicator { display: inline-flex; gap: 4px; align-items: center; min-height: 26px; padding: 3px 8px; border: 1px solid #e7e7e7; border-radius: 999px; background: #f7f7f7; color: var(--ink); font-size: 11px; font-weight: 500; white-space: nowrap; }
.schedule-indicator:disabled { background: #f5f5f5; color: #8b8b8b; }
.schedule-indicator.has-issues { background: #fff7df; border-color: #f3e5b6; color: #65521d; }
.schedule-indicator.has-high-issues { background: #fff2f0; border-color: #f3d1cc; color: #8d3029; }
.schedule-indicator.has-info-issues { background: #f4f4f4; border-color: #e2e2e2; color: #626262; }
#openIndicator:not(:disabled) { background: #222; border-color: #222; color: white; }
button.schedule-indicator:not(:disabled):hover { filter: brightness(.97); }
.schedule-indicator svg, .saved-check svg { display: block; width: 15px; height: 15px; flex-shrink: 0; }
.saved-check { color: #238347; display: inline-flex; align-items: center; }
.issue-warning { color: #e9b528; }
.employee-cell .row-hours-warning { color: #d4493e; --warning-mark-color: #fff; }
.issue-warning { display: inline-flex; }
.issue-priority { display: inline-flex; align-items: center; flex: none; }
.issue-priority svg { display: block; width: 16px; height: 16px; }
.issue-priority.priority-high { color: #d4493e; --warning-mark-color: #fff; }
.issue-priority.priority-low { color: #e9b528; }
.issue-priority.priority-info { color: #929292; --warning-mark-color: #fff; }
#saveDraftButton { display: inline-flex; align-items: center; gap: 5px; }
.action-icon, #confirmWeekButton svg, #unlockWeekButton svg { width: 17px; height: 17px; flex: none; }
#fairnessHistoryButton { display: inline-flex; height: 38px; padding: 0 12px; align-items: center; justify-content: center; gap: 9px; line-height: 1; white-space: nowrap; }
#fairnessHistoryButton .action-icon { display: block; width: 18px; height: 18px; transform: translateY(1px); }
#fairnessHistoryButton > span { display: block; line-height: 18px; }
#openDraftButton, #confirmWeekButton, #unlockWeekButton { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.confirm-control { position: relative; min-width: 155px; }
#confirmWeekButton { width: 100%; }
#confirmWeekButton.confirmed { border: 0; color: #fff; background: #268557; }
#printButton { position: absolute; inset: 0; width: 100%; opacity: 0; pointer-events: none; }
#unlockWeekButton { display: none; position: absolute; top: 100%; right: 0; z-index: 15; min-width: 155px; border-color: #d7d7d7; background: #fff; box-shadow: 0 8px 20px rgb(0 0 0 / 12%); }
.confirm-control.is-confirmed:hover #printButton, .confirm-control.is-confirmed:has(:focus-visible) #printButton { opacity: 1; pointer-events: auto; }
.confirm-control.is-confirmed:hover #unlockWeekButton, .confirm-control.is-confirmed:has(:focus-visible) #unlockWeekButton { display: inline-flex; }
.week-lock-sticker { position: absolute; top: 0; right: 0; transform: translate(50%, -50%); z-index: 8; display: grid; width: 68px; height: 68px; padding: 14px; place-items: center; border: 3px solid #fff; border-radius: 50%; color: white; background: #268557; box-shadow: 0 2px 8px rgb(0 0 0 / 15%); }
.week-lock-sticker svg { width: 34px; height: 34px; }
.week-lock-sticker .sticker-edit { display: none; }
.week-lock-sticker:not(:disabled):hover .sticker-lock { display: none; }
.week-lock-sticker:not(:disabled):hover .sticker-edit { display: block; }
.week-lock-sticker.is-editing, .week-lock-sticker:not(:disabled):hover { color: #3f3300; background: #f3c64e; }
.week-lock-sticker.is-relockable:not(:disabled):hover { color: #fff; background: #268557; }
.week-lock-sticker:disabled { cursor: default; }
.schedule-week-label { color: var(--ink); font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; }
.setup-context-tag { display: inline-flex; padding: 4px 9px; background: var(--surface-subtle); border-radius: 6px; color: var(--ink-secondary); font-size: 12px; line-height: 1.35; }
.schedule-action-separator { width: 1px; height: 24px; margin: 0 5px; background: #dddddd; }
.schedule-heading .schedule-note { color: var(--muted); font-size: 12px; margin-top: 7px; }
.schedule-note:empty { display: none; }
#scheduleTable { min-width: 1750px; table-layout: fixed; }
#scheduleTable th { color: var(--ink); vertical-align: middle; text-transform: none; letter-spacing: 0; font-size: 18px; font-weight: 650; line-height: 1.1; white-space: nowrap; }
#scheduleTable .weekday-name { color: var(--ink); font-size: 18px; font-weight: 650; }
#scheduleTable .weekday-date { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
#scheduleTable th:first-child, #scheduleTable td:first-child { width: 245px; min-width: 245px; }
#scheduleTable th:not(:first-child), #scheduleTable td:not(:first-child) { width: 215px; min-width: 215px; }
.schedule-employee-heading { display: inline-flex; align-items: center; gap: 9px; }
.schedule-header-add { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 3px 7px; border: 1px solid #dedede; border-radius: 6px; color: #555; background: #f7f7f7; font-size: 10px; font-weight: 550; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.schedule-header-add:hover { border-color: #bdbdbd; color: var(--ink); background: #f1f1f1; }
.schedule-header-add > span { font-size: 14px; line-height: 1; }
#scheduleTable tbody tr:hover { background: white; }
#scheduleTable td { vertical-align: middle; height: 86px; }
.employee-row-info { position: relative; padding: 2px 0 22px; }
.employee-row-info > strong { display: block; margin-top: 7px; font-weight: 600; }
.employee-row-info > span { display: block; margin-top: 4px; }
.employee-row-info > .schedule-employee-meta { display: flex; width: fit-content; min-height: 23px; margin-top: 0; align-items: center; gap: 6px; }
.saturday-indicator { display: inline-flex; width: fit-content; min-height: 19px; flex: 0 0 auto; padding: 2px 6px; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.saturday-indicator.is-pending { border: 1px solid #d4a01b; color: #a97400; background: #fffdf4; }
.saturday-indicator.is-met { border: 1px solid #268557; color: #fff; background: #268557; }
.row-hours { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-secondary); white-space: nowrap; }
.row-hours > strong { color: var(--ink-primary); font-weight: 700; }
.row-hours-icon { display: inline-flex; width: 15px; height: 15px; margin-right: 3px; align-items: center; justify-content: center; flex: 0 0 15px; }
.row-hours-icon svg { width: 15px; height: 15px; }
.employee-cell .row-hours-ok { color: var(--ink-tertiary); }
.employee-row-actions { display: flex; position: absolute; bottom: 0; right: 0; gap: 12px; opacity: 0; transition: opacity .12s ease; }
.employee-cell:hover .employee-row-actions, .employee-cell:focus-within .employee-row-actions { opacity: 1; }
.employee-row-actions button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 2px 0; }
.employee-row-actions button:hover { color: var(--ink); }
.employee-row-actions svg { width: 13px; height: 13px; }
.off-cell { width: 100%; min-height: 42px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #b1b1b1; font-size: 11px; font-weight: 400; text-align: center; }
.off-cell .off-add { display: none; color: #555; white-space: nowrap; font-size: 12px; font-weight: 500; }
.off-cell:hover, .off-cell:focus-visible { background: #f5f5f5; }
.off-cell:hover .off-label, .off-cell:focus-visible .off-label { display: none; }
.off-cell:hover .off-add, .off-cell:focus-visible .off-add { display: inline; }
.shift-chip { display: grid; grid-template-columns: minmax(0, 1fr) 70px; align-items: center; gap: 8px; position: relative; background: #fafafa; min-height: 63px; padding: 9px 10px; font-size: 12px; line-height: 1.3; margin-bottom: 0; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.shift-chip.indicator-mode-icons { grid-template-columns: minmax(0, 1fr) 20px; }
.shift-chip.indicator-mode-hidden { grid-template-columns: minmax(0, 1fr); }
.shift-time { display: block; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.leave-chip { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 63px; text-align: left; }
.leave-chip.holiday-chip { background: repeating-linear-gradient(135deg, #fffdf8 0 10px, #fcfaf4 10px 20px); border-color: #eadca6; }
.leave-chip.sick-chip { background: repeating-linear-gradient(135deg, #fefafa 0 10px, #fbf6f6 10px 20px); border-color: #e9cccc; }
.leave-chip.vacation-chip { background: repeating-linear-gradient(135deg, #f9fdfd 0 10px, #f4fafb 10px 20px); border-color: #c9e6e9; }
.leave-chip.holiday-chip:hover { background: repeating-linear-gradient(135deg, #fffaf0 0 10px, #fcf6e9 10px 20px); }
.leave-chip.sick-chip:hover { background: repeating-linear-gradient(135deg, #fdf4f4 0 10px, #faeeee 10px 20px); }
.leave-chip.vacation-chip:hover { background: repeating-linear-gradient(135deg, #f3fbfc 0 10px, #edf8f9 10px 20px); }
.dayoff-chip { background: repeating-linear-gradient(135deg, #fcfcfc 0 10px, #f8f8f8 10px 20px); border-color: #e5e5e5; }
.shift-chip.dayoff-chip:hover { background: repeating-linear-gradient(135deg, #f9f9f9 0 10px, #f4f4f4 10px 20px); }
.leave-chip.holiday-chip .shift-time, .leave-chip.sick-chip .shift-time, .leave-chip.vacation-chip .shift-time { color: #858585; }
.dayoff-chip .shift-time { color: #858585; }
.dayoff-chip.all-day .shift-time { color: #aaa; }
.dayoff-chip .leave-card-copy small { color: #777; }
.leave-card-copy { display: grid; gap: 2px; min-width: 0; }
.leave-card-copy small { color: #666; font-size: 11px; }
.leave-warning { display: inline-flex; align-self: flex-start; color: #e9b528; }
.leave-warning svg { width: 16px; height: 16px; }
.shift-badges { grid-column: 2; display: flex; min-width: 0; height: 100%; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 3px; pointer-events: none; }
.shift-badge, .shift-duty-badges { display: inline-flex; align-items: center; gap: 3px; }
.shift-badge { width: 70px; height: 20px; min-height: 20px; padding: 2px 5px; border: 1px solid #d6d6d6; border-radius: 4px; font-size: 9px; font-weight: 550; line-height: 1; justify-content: flex-start; white-space: nowrap; }
.shift-badge svg { width: 11px; height: 11px; flex: 0 0 11px; }
.shift-period { color: #3e3e3e; background: #fff; }
.shift-morning svg { color: #d5a400; }
.shift-afternoon svg { color: #476fa8; }
.shift-duty-badges { flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 3px; }
.shift-duty { border-color: transparent; }
.shift-opening { color: #242424; background: #fff1c9; }
.shift-closing { color: #fff; background: #183a66; }
.shift-icon-indicator { display: grid; width: 20px; height: 20px; place-items: center; }
.shift-icon-indicator svg { width: 13px; height: 13px; }
.print-shift-indicators { display: none; }
.print-document-header { display: none; }
.shift-period-icon.shift-morning { color: #d5a400; }
.shift-period-icon.shift-afternoon { color: #476fa8; }
.shift-duty-icon { border-radius: 5px; }
.shift-duty-icon.shift-opening { color: #242424; background: #fff1c9; }
.shift-duty-icon.shift-closing { color: #fff; background: #183a66; }
.department-tag { display: inline-flex; width: fit-content; padding: 2px 6px; border-radius: 4px; font-size: 11px; line-height: 1.4; font-weight: 450; color: #343434; background: #f3f3f3; }
.department-management { background: #faeaf0; }
.department-salesfloor { background: #eaf5ec; }
.department-visual { background: #eaf1fb; }
.employee-tag-row { display: flex; width: fit-content; align-items: center; }
.employee-row-info > .employee-tag-row { display: flex; margin-top: 0; }
.employee-row-info > .department-tag { display: inline-flex; color: #343434; }
.shift-chip:hover { background: #f0f0f0; border-color: #aaa; }
#scheduleView[data-card-style="floating"] .shift-chip { border-color: transparent; box-shadow: 0 3px 7px rgb(25 25 25 / 6%), 0 10px 22px rgb(25 25 25 / 8%); }
#scheduleView[data-card-style="floating"] .shift-chip:hover { z-index: 1; border-color: transparent; box-shadow: 0 5px 12px rgb(25 25 25 / 9%), 0 16px 30px rgb(25 25 25 / 12%); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { #scheduleView[data-card-style="floating"] .shift-chip { transition: none; } #scheduleView[data-card-style="floating"] .shift-chip:hover { transform: none; } }
.schedule-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px,100%); max-height: 100dvh; height: 100dvh; border-radius: 0; border-left: 1px solid var(--line); }
.drawer-content { padding: 26px; }
.schedule-drawer::backdrop { background: rgb(0 0 0 / 15%); backdrop-filter: none; }
.issue-group { border-bottom: 1px solid var(--line); }
.issue-group summary { display: flex; gap: 10px; align-items: center; padding: 17px 0; cursor: pointer; font-weight: 600; }
.issue-group summary::before { content: "›"; color: var(--muted); }
.issue-group[open] summary::before { content: "⌄"; }
.issue-count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.issue-detail { padding: 12px 0; border-top: 1px solid #eee; font-size: 12px; line-height: 1.5; }
.issue-detail strong { font-weight: 550; }
.issue-detail p { margin: 5px 0; color: var(--muted); }
.attention-category { margin-top: 25px; }
.attention-category > h3 { display: flex; gap: 12px; justify-content: space-between; font-size: 15px; font-weight: 600; }
.attention-category > h3 > span { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.issue-subgroup { border-bottom: 1px solid var(--line); }
.issue-subgroup > summary { display: flex; align-items: center; gap: 8px; padding: 14px 0; cursor: pointer; font-size: 13px; line-height: 1.4; }
.issue-subgroup > summary::before { content: '›'; color: var(--muted); }
.issue-subgroup > summary > .issue-summary { flex: 1; min-width: 0; }
.issue-subgroup[open] > summary::before { content: '⌄'; }
.issue-subgroup .issue-count { flex-shrink: 0; white-space: nowrap; }
.issue-person { margin-left: 14px; padding: 11px 0; border-top: 1px solid #f0f0f0; font-size: 12px; }
.issue-person-heading { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.issue-person-heading strong { font-weight: 500; }
.issue-evidence { margin-top: 6px; color: var(--muted); font-size: 11px; }
.issue-evidence summary { cursor: pointer; }
.issue-evidence p { line-height: 1.5; margin: 8px 0; }
.shift-context { display: grid; gap: 5px; margin-bottom: 22px; }
.shift-context span { font-size: 13px; }
#shiftDialog { width: min(500px,calc(100% - 32px)); }
#shiftTimeField, .shift-duration-field { min-width: 0; }
.shift-time-inputs { display: flex; align-items: center; gap: 5px; width: 100%; }
.shift-time-inputs input { min-width: 0; flex: 1; padding-inline: 5px; }
.shift-time-inputs > span { flex: none; }
.disabled-time .shift-time-inputs, .disabled-duration { opacity: .48; }
.day-off-notice { display: block; margin-top: 4px; color: #9b3838; font-size: 11px; font-weight: 500; }
.shift-duration-field > span { display: block; margin-bottom: 7px; color: var(--ink-secondary); font-size: 12px; font-weight: 650; }
.shift-duration-value { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 7px 10px; border: 1px solid #dedede; border-radius: 8px; background: #f5f5f5; }
.shift-duration-value strong { font-size: 12px; font-weight: 650; white-space: nowrap; }
.shift-duration-value .leave-warning { align-self: center; flex: 0 0 auto; }
.shift-duration-value small { margin-left: auto; color: #666; font-size: 10px; text-align: right; }
.shift-duration-value button { margin-left: auto; padding: 2px 4px; border: 0; background: transparent; font-size: 18px; }
.shift-duration-value input { width: 70px; min-width: 0; padding: 4px; }
.saved-schedules-dialog { width: min(580px,calc(100% - 32px)); height: min(560px,calc(100dvh - 40px)); max-height: calc(100dvh - 40px); overflow: hidden; }
.fairness-history-dialog { width: min(980px,calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: hidden; }
.fairness-history-content { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 40px); padding: 24px; }
.fairness-month-nav { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; width: min(420px,100%); height: 42px; border: 1px solid var(--border-default); border-radius: 8px; text-align: center; }
.fairness-month-nav button { display: grid; height: 100%; padding: 0; place-items: center; border: 0; background: transparent; cursor: pointer; }
.fairness-month-nav button svg { display: block; width: 14px; height: 14px; }
.fairness-block-label { display: inline-flex; min-width: 0; align-items: baseline; justify-content: center; gap: 7px; white-space: nowrap; }
.fairness-block-label strong { font-size: 14px; font-weight: 650; }
.fairness-block-label small { color: var(--ink-secondary); font-size: 11px; font-weight: 400; }
.fairness-history-list { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.fairness-history-header, .fairness-history-row { display: grid; grid-template-columns: minmax(180px,1.8fr) repeat(3,minmax(130px,1fr)); gap: 12px; align-items: center; min-width: 700px; padding: 12px 14px; }
.fairness-history-header { position: sticky; top: 0; z-index: 1; background: #f7f7f7; color: var(--ink-secondary); font-size: 11px; font-weight: 600; }
.fairness-history-row { border-top: 1px solid var(--line); font-size: 12px; }
.fairness-person { display: grid; gap: 3px; }
.fairness-person strong { font-weight: 600; }
.fairness-person small { color: var(--muted); font-size: 11px; }
.fairness-metric { display: grid; gap: 3px; }
.fairness-metric strong { font-size: 12px; font-weight: 600; }
.fairness-metric small { color: var(--muted); font-size: 10px; }
.fairness-empty { padding: 20px; color: var(--muted); font-size: 13px; }
.saved-schedules-content { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 24px; }
.saved-week-picker { position: relative; width: min(380px, 100%); }
.saved-week-picker > strong { display: block; margin-bottom: 8px; color: var(--ink-secondary); font-size: 13px; }
.saved-week-nav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 42px; border: 1px solid var(--border-default); border-radius: 8px; }
.saved-week-nav button, .saved-calendar-heading button { height: 100%; border: 0; color: var(--ink); background: transparent; cursor: pointer; }
.saved-week-nav button:first-child, .saved-week-nav button:last-child { font-size: 24px; }
#savedWeekCurrent { font-size: 14px; font-weight: 600; }
.saved-week-calendar { position: absolute; top: calc(100% + 5px); left: 0; z-index: 20; width: min(380px, calc(100vw - 60px)); max-height: min(360px, calc(100dvh - 220px)); overflow-y: auto; padding: 12px; border: 1px solid var(--border-default); border-radius: 10px; background: white; box-shadow: 0 14px 30px rgb(0 0 0 / 15%); }
#setupView .planning-week-panel { position: relative; z-index: 10; }
.setup-week-calendar { left: -28px; }
.saved-calendar-heading { display: grid; grid-template-columns: 35px 1fr 35px; height: 34px; align-items: center; text-align: center; }
.saved-calendar-heading button { font-size: 23px; }
.saved-calendar-weekdays, .saved-calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.saved-calendar-weekdays { padding: 8px 0 5px; color: var(--ink-secondary); font-size: 11px; }
.saved-calendar-week { position: relative; width: 100%; margin: 2px 0; padding: 7px 1px; border: 1px solid transparent; border-radius: 7px; background: white; font-size: 12px; cursor: pointer; }
.saved-calendar-week:hover, .saved-calendar-week.is-selected { background: #f3f3f3; }
.saved-calendar-week.is-confirmed { border-color: #268557; }
.saved-calendar-week.is-confirmed.is-selected { background: #edf7f0; }
.saved-calendar-week .outside-month { color: #a3a3a3; }
.saved-calendar-lock { position: absolute; top: -7px; right: -6px; display: grid; width: 17px; height: 17px; padding: 3px; place-items: center; border-radius: 50%; color: #fff; background: #268557; }
.saved-calendar-lock svg { width: 11px; height: 11px; }
.saved-schedules-list { display: grid; flex: 1; align-content: start; gap: 8px; min-height: 0; margin-top: 20px; overflow-y: auto; }
.saved-schedule-row { display: flex; align-items: stretch; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 14px; overflow: hidden; }
.saved-schedule-row.is-confirmed { border-color: #268557; }
.saved-schedule-row.was-confirmed { border-color: #a7a7a7; }
.saved-schedule-open { display: flex; flex: 1; min-width: 0; align-items: center; padding: 15px 14px; border: 0; color: inherit; background: transparent; text-align: left; }
.saved-schedule-details { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.saved-version-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; min-height: 22px; padding: 2px 6px; border-radius: 999px; color: #666; background: #f1f1f1; font-size: 12px; font-weight: 600; }
.saved-schedule-copy { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.saved-schedule-week { color: var(--ink); font-weight: 700; }
.saved-schedule-meta { color: var(--muted); font-weight: 400; }
.saved-schedule-row:not(.is-confirmed):not(.was-confirmed):hover { border-color: #aaa; }
.saved-schedule-open:hover { background: #f8f8f8; }
.saved-schedule-delete { display: grid; width: 44px; flex: 0 0 44px; place-items: center; border: 0; border-left: 1px solid #eeeeee; color: #8a8a8a; background: white; }
.saved-schedule-delete:hover { color: #7b3434; background: #f7eeee; }
.saved-schedule-delete svg { width: 16px; height: 16px; }
.saved-schedule-lock { display: grid; width: 44px; flex: 0 0 44px; place-items: center; border-left: 1px solid #eeeeee; color: #fff; }
.saved-schedule-lock svg { width: 27px; height: 27px; padding: 6px; border-radius: 50%; background: #268557; }
.was-confirmed .saved-schedule-lock svg { background: #9a9a9a; }
.saved-schedule-row.is-editing { border-color: #f3c64e; }
.saved-schedule-row.is-editing .saved-schedule-lock { color: #3f3300; }
.saved-schedule-row.is-editing .saved-schedule-lock svg { background: #f3c64e; }
.saved-date-fields { display: grid; grid-template-columns: 1fr 1.4fr .8fr auto; gap: 10px; align-items: end; }
.schedule-dialog-message { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.schedule-dialog-message:empty { display: none; }
.schedule-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.schedule-scroll:hover, .schedule-scroll:focus-within { scrollbar-color: #c5c5c5 transparent; }
.schedule-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.schedule-scroll::-webkit-scrollbar-track { background: transparent; }
.schedule-scroll::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: transparent; background-clip: padding-box; }
.schedule-scroll:hover::-webkit-scrollbar-thumb, .schedule-scroll:focus-within::-webkit-scrollbar-thumb { background-color: #c5c5c5; }
.schedule-scroll::-webkit-scrollbar-thumb:hover { background-color: #a7a7a7; }
@media (hover: none) { .employee-row-actions { opacity: 1; } }
@media (hover: none) { .confirm-control.is-confirmed #unlockWeekButton { display: inline-flex; } }
@media (max-width: 1250px) { .schedule-heading { flex-wrap: wrap; } }
@media (max-width: 650px) {
  .schedule-title-line { gap: 10px; }
  .schedule-week-label { font-size: 24px; }
  .schedule-action-separator { display: none; }
  #scheduleView { left: auto; width: 100%; margin-left: 0; transform: none; }
  .saved-date-fields { grid-template-columns: 1fr 1.4fr .8fr; }
  .saved-date-fields button { grid-column: 1 / -1; }
  #scheduleTable th:first-child, #scheduleTable td:first-child { width: 180px; min-width: 180px; }
}
@media print {
  dialog, #setupView, .employee-row-actions, #technicalStatus { display: none !important; }
  #scheduleView { display: block !important; left: auto; width: 100%; margin-left: 0; transform: none; }
  .schedule-title-line { gap: 15px; }
  .schedule-indicator { font-size: 9px; }
  #scheduleTable { min-width: 0; }
  #scheduleTable th:first-child, #scheduleTable td:first-child { width: 18%; }
  #scheduleTable td { height: auto; }
  .employee-row-info { padding-bottom: 0; }
  .off-cell { min-height: 0; font-size: 9px; }
  .off-cell .off-label { display: inline !important; }
  .off-cell .off-add { display: none !important; }
  .shift-chip, #scheduleView[data-card-style="floating"] .shift-chip { min-height: 0; padding: 3px; font-size: 8px; line-height: 1.3; border-color: #ddd; box-shadow: none; transform: none; }
  .shift-time { font-size: 10px; margin-bottom: 2px; }
  .shift-badges { display: none; }
  .department-tag { font-size: 8px; padding: 1px 3px; print-color-adjust: exact; }
}

/* Persistent route stage: both routes are always overlaid, never flow siblings. */
html { scrollbar-gutter: stable; overflow-x: clip; }
body { overflow-x: clip; }
main { width: min(calc(100% - 48px), 1820px); }
.workspace-frame { position: relative; display: block; width: 100%; min-width: 0; overflow-x: clip; }
.workspace-frame:not(.view-transition-shell) { overflow: visible; }
.workspace-frame > .view {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  min-width: 0;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.workspace-frame.view-transition-shell { isolation: isolate; overflow: hidden; border-radius: 24px; }
.workspace-frame .view-incoming,
.workspace-frame .view-outgoing {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.workspace-frame .view-incoming { z-index: 2; animation-duration: 350ms; }
.workspace-frame .view-outgoing { z-index: 1; animation-duration: 350ms; }
.workspace-frame .view-incoming#scheduleView,
.workspace-frame .view-outgoing#scheduleView { background: #fff; }
#scheduleView { position: absolute !important; inset: 0 !important; width: 100% !important; margin: 0 !important; transform: none; }
#setupView { position: absolute !important; inset: 0 !important; width: 100% !important; margin: 0 !important; padding: 34px 24px 54px; border-radius: 24px; }
#setupView.view-incoming .setup-sidebar,
#setupView.view-outgoing .setup-sidebar {
  /* Disable sticky positioning while the whole page is transformed. */
  position: relative;
  top: auto;
  left: auto;
  width: auto;
}

/* Override the legacy centred-schedule keyframes: both page layers animate in the same stage. */
@keyframes schedule-enter { from { opacity: 0; transform: translateX(-24px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes schedule-exit { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(-24px) scale(.98); } }
@keyframes setup-enter { from { opacity: 0; transform: translateX(24px) scale(1.01); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes setup-exit { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(24px) scale(1.01); } }

/* Layers overlap at one origin, but must retain their intrinsic content height.
   Stretching them with bottom: 0 makes a short Schedule inherit Setup's height. */
.workspace-frame > .view,
.workspace-frame .view-incoming,
.workspace-frame .view-outgoing,
#scheduleView,
#setupView {
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  inset: 0 auto auto 0 !important;
}
@media (max-width: 650px) {
  main { width: calc(100% - 20px); }
  #setupView { padding: 24px 16px 42px; }
  .employee-identity-row, .employee-target-row { grid-template-columns: 1fr; }
  .exception-row { grid-template-columns: minmax(0, 1fr) auto 68px; gap: 6px 10px; }
  .exception-row strong { grid-column: 1 / 3; }
  .exception-row .exception-reason { grid-column: 1; }
  .exception-row .exception-time { grid-column: 2; }
  .exception-actions { grid-column: 3; grid-row: 1 / 3; }
  .exception-top-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .exception-all-day-control { grid-column: 1 / 3; }
}

/* Print rules belong last so the screen table widths and route layers cannot override them. */
@media print {
  @page {
    size: A4 landscape;
    margin: 0 0 8mm;
    @bottom-right {
      content: counter(page) " / " counter(pages);
      margin-right: 9mm;
      color: #777;
      font: 8px Outfit, sans-serif;
    }
  }
  html, body { overflow: visible !important; }
  main, .workspace-frame, .workspace-frame > .view, #scheduleView {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  #scheduleView { padding: 0 9mm !important; box-sizing: border-box; }
  .workspace-frame { display: block !important; }
  #setupView { display: none !important; }
  .schedule-panel, .schedule-scroll { overflow: visible !important; max-height: none !important; }
  .schedule-panel { padding-top: 0 !important; }
  .schedule-heading, #scheduleStatus { display: none !important; }
  #scheduleTable { width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: fixed; }
  #scheduleTable thead { display: table-header-group; }
  #scheduleTable tbody { display: table-row-group; }
  #scheduleTable .print-document-header { display: table-row !important; }
  #scheduleTable .print-document-header th { padding: 0 2px 2mm !important; border: 0; white-space: normal; text-transform: none; }
  .print-document-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7mm; }
  .print-logo { display: block; width: auto; height: 20px; }
  .print-document-meta { position: absolute; top: 0; right: 0; display: grid; justify-items: end; color: #666; font-size: 8px; font-weight: 400; line-height: 1.2; }
  .print-document-meta strong { font-weight: 600; }
  #printTimestamp { font-weight: 400; }
  .print-document-context { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
  .print-document-context strong { font-size: 15px; font-weight: 650; letter-spacing: -.03em; }
  .print-document-context span { color: var(--ink-secondary); font-size: 8px; font-weight: 400; }
  #scheduleTable tr { break-inside: avoid; page-break-inside: avoid; }
  #scheduleTable th, #scheduleTable td { position: static !important; min-width: 0 !important; max-width: none !important; height: auto !important; padding: 2px !important; overflow: hidden; vertical-align: middle; box-shadow: none !important; }
  #scheduleTable tbody td { padding: 5.5px 2px !important; border-bottom: .35px solid #ededed; }
  #scheduleTable thead tr:last-child th { padding-bottom: 6px !important; border-bottom: .35px solid #e8e8e8; }
  #scheduleTable th:first-child, #scheduleTable td:first-child { width: 25.625% !important; }
  #scheduleTable th:not(:first-child), #scheduleTable td:not(:first-child) { width: 10.625% !important; }
  #scheduleTable col:first-child { width: 25.625%; }
  #scheduleTable col:not(:first-child) { width: 10.625%; }
  #scheduleTable th, #scheduleTable .weekday-name { font-size: 10px; line-height: 1.1; }
  #scheduleTable .weekday-date { margin-left: 2px; font-size: 8px; }
  .schedule-employee-heading { gap: 0; }
  .employee-row-info { padding: 0; }
  .employee-row-info > strong { margin-top: 2px; font-size: 10px; line-height: 1.15; overflow-wrap: anywhere; }
  .employee-row-info > span { margin-top: 1px; }
  .employee-cell .row-hours { display: inline-flex !important; flex-direction: row; gap: 2px; align-items: center; font-size: 8px; white-space: nowrap; }
  .employee-cell .row-hours > strong { display: inline; }
  .employee-cell .row-hours > span { font-size: 8px; }
  .row-hours-icon, .row-hours-icon svg { width: 10px; height: 10px; }
  #scheduleTable .employee-cell .row-hours-icon { flex: 0 0 10px; margin-left: -2px; margin-right: 0; justify-content: flex-start; }
  #scheduleTable .employee-cell .department-tag { padding: 1px 3px; font-family: var(--font-ui); font-size: 7px; font-weight: 400; line-height: 1.15; }
  .shift-chip, #scheduleView[data-card-style="floating"] .shift-chip {
    display: flex; width: 100%; height: 25px; min-height: 25px; max-width: 100%; gap: 2px;
    align-items: center; justify-content: space-between; margin: 1px 0; padding: 2px 3px;
    box-sizing: border-box; font-size: 8px; line-height: 1.1; border-width: .35px;
    border-color: #e9e9e9; break-inside: avoid;
  }
  #scheduleTable .holiday-chip { border-color: #f0e8cc; }
  #scheduleTable .sick-chip { border-color: #f0dddd; }
  #scheduleTable .vacation-chip { border-color: #e1f0f1; }
  #scheduleTable .dayoff-chip { border-color: #ededed; }
  .shift-time { margin: 0; font-size: 9.5px; line-height: 1.1; white-space: nowrap; }
  .leave-card-copy { gap: 1px; }
  .leave-card-copy small { font-size: 7px; }
  #scheduleTable .leave-chip .leave-warning { display: inline-grid; width: 13px; height: 13px; flex: 0 0 13px; align-self: center; place-items: center; }
  #scheduleTable .leave-warning svg { width: 9px; height: 9px; }
  .shift-badges { display: none !important; }
  .print-shift-indicators { display: inline-flex; flex: none; align-items: center; gap: 1px; print-color-adjust: exact; }
  .print-shift-indicators .shift-icon-indicator { width: 13px; height: 13px; flex: 0 0 13px; }
  .print-shift-indicators .shift-icon-indicator svg { width: 9px; height: 9px; }
  .off-cell { min-height: 0; padding: 0; font-size: 8px; }
}
