/* Planerko theme: Naftalan palette and type, adapted for dense scheduling. */
:root {
  --dt-primary: #2d4871;
  --dt-primary-dark: #203653;
  --dt-primary-light: #e9eff6;
  --dt-accent: #54b5cb;
  --dt-bg: #f6f7f9;
  --dt-surface: #fff;
  --dt-surface-secondary: #f2f5f8;
  --dt-text: #393637;
  --dt-text-muted: #687583;
  --dt-border: #dce3e9;
  --dt-success: #317454;
  --dt-warning: #946420;
  --dt-danger: #a13f4d;
  --dt-radius: 10px;
  --dt-shadow: 0 8px 28px rgba(32, 54, 83, .07);
  --dt-font-family: "Work Sans", sans-serif;
  --dt-row-header: #eaf0f5;
  --dt-weekend: #f2f6fa;
  --dt-holiday: #fff8e9;
  --dt-shift-day-bg: #e4edf7;
  --dt-shift-day-text: #28517e;
  --dt-shift-night-bg: #e8e9f3;
  --dt-shift-night-text: #444978;
  --dt-shift-vacation-bg: #e5f2e8;
  --dt-shift-vacation-text: #2a704d;
  --dt-shift-sick-bg: #f9e8ec;
  --dt-shift-sick-text: #963c51;
  --dt-shift-unavailable-bg: #f6e8e8;
  --dt-shift-unavailable-text: #8a4650;
  --dt-shift-prefer-bg: #fff3d9;
  --dt-shift-prefer-text: #806019;
  --dt-shift-early-bg: #e4f3f1;
  --dt-shift-early-text: #17675f;
  --bs-primary: var(--dt-primary);
  --bs-primary-rgb: 45, 72, 113;
  --bs-body-font-family: var(--dt-font-family);
  --bs-body-color: var(--dt-text);
  --bs-body-bg: var(--dt-bg);
  --bs-border-color: var(--dt-border);
}
html, body { min-height: 100%; }
body { background: var(--dt-bg); color: var(--dt-text); font-size: .92rem; }
a { color: var(--dt-primary); }
a:hover { color: var(--dt-primary-dark); }
:focus-visible { outline: 3px solid var(--dt-accent) !important; outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { color: var(--dt-primary-dark); font-family: var(--dt-font-family); font-weight: 700; }
.text-muted, .form-text { color: var(--dt-text-muted) !important; }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { position: sticky; top: 0; flex: 0 0 234px; height: 100vh; padding: 25px 14px 16px; flex-direction: column; background: var(--dt-surface); border-right: 1px solid var(--dt-border); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 34px; padding: 0 4px 0 12px; }
.sidebar-top .app-brand { padding: 0; font-size: 1.5rem; line-height: 1; white-space: nowrap; }
.brand-short { display: none; }
.sidebar-toggle { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border: 1px solid var(--dt-border); border-radius: 7px; background: var(--dt-surface); color: var(--dt-primary); }
.sidebar-toggle:hover { background: var(--dt-primary-light); }
.app-brand { display: block; padding: 0 12px; color: var(--dt-primary); font-family: "Hedvig Letters Serif", serif; font-size: 1.65rem; letter-spacing: -.04em; text-decoration: none; }
.app-brand:hover, .mobile-brand:hover { color: var(--dt-primary-dark); }
.brand-dot { color: var(--dt-accent); }
.sidebar-section-label { margin: 33px 12px 9px; color: var(--dt-text-muted); font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.app-nav { gap: 4px; }
.app-nav .nav-link, .sidebar-footer .nav-link { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 13px; border-radius: 8px; color: var(--dt-text-muted); font-weight: 600; text-decoration: none; }
.app-nav .nav-link:hover, .sidebar-footer .nav-link:hover { background: var(--dt-surface-secondary); color: var(--dt-primary); }
.app-nav .nav-link.active { background: var(--dt-primary-light); color: var(--dt-primary); }
.app-nav .bi, .sidebar-footer .bi { width: 18px; font-size: 1rem; }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--dt-border); }
.sidebar-account { display: flex; align-items: center; gap: 11px; padding: 11px 13px 4px; color: var(--dt-text-muted); font-size: .78rem; }
.sidebar-account .bi { width: 18px; }
.sidebar-logout { width: 100%; border: 0; background: transparent; text-align: left; }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 28px 16px; }
.login-card { width: min(100%, 420px); padding: clamp(24px, 5vw, 38px); background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: var(--dt-radius); box-shadow: var(--dt-shadow); }
.login-card .app-brand { padding: 0; }
.login-card h1 { margin: 28px 0 5px; font-size: 1.6rem; }
.login-card .form-label { font-size: .82rem; font-weight: 600; }
.login-card .btn { min-height: 42px; }
.app-main { min-width: 0; flex: 1; }
.app-content { max-width: 1720px; margin: 0 auto; padding: 28px 30px 48px; }
.schedule-workspace-content { max-width: none; }
.mobile-header { align-items: center; gap: 14px; height: 58px; padding: 0 18px; background: var(--dt-surface); border-bottom: 1px solid var(--dt-border); }
.mobile-brand { color: var(--dt-primary); font-family: "Hedvig Letters Serif", serif; font-size: 1.35rem; text-decoration: none; }
.app-sidebar-mobile .sidebar-section-label { margin-top: 0; }
@media (min-width: 992px) {
  .sidebar-collapsed .app-sidebar { flex-basis: 72px; padding-right: 8px; padding-left: 8px; }
  .sidebar-collapsed .app-sidebar .sidebar-top { gap: 2px; padding: 0 1px; }
  .sidebar-collapsed .app-sidebar .sidebar-top .app-brand { font-size: 1.3rem; }
  .sidebar-collapsed .app-sidebar .brand-full, .sidebar-collapsed .app-sidebar .nav-label, .sidebar-collapsed .app-sidebar .sidebar-section-label { display: none; }
  .sidebar-collapsed .app-sidebar .brand-short { display: inline; }
  .sidebar-collapsed .app-sidebar .app-nav { margin-top: 28px; }
  .sidebar-collapsed .app-sidebar .nav-link, .sidebar-collapsed .app-sidebar .sidebar-account { justify-content: center; padding-right: 8px; padding-left: 8px; }
  .sidebar-collapsed .app-sidebar .nav-link .bi, .sidebar-collapsed .app-sidebar .sidebar-account .bi { width: auto; }
}
.offcanvas { --bs-offcanvas-width: 250px; }
.page-header, .workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-header h1, .workspace-heading h1 { margin: 0; font-size: clamp(1.55rem, 2.2vw, 1.9rem); letter-spacing: -.035em; }
.page-subtitle { margin: 5px 0 0; color: var(--dt-text-muted); font-size: .84rem; }
.eyebrow { margin-bottom: 4px; color: var(--dt-text-muted); font-size: .69rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.btn { --bs-btn-border-radius: 7px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--dt-primary); --bs-btn-border-color: var(--dt-primary); --bs-btn-hover-bg: var(--dt-primary-dark); --bs-btn-hover-border-color: var(--dt-primary-dark); --bs-btn-active-bg: var(--dt-primary-dark); --bs-btn-active-border-color: var(--dt-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--dt-primary); --bs-btn-border-color: #9eacc0; --bs-btn-hover-bg: var(--dt-primary); --bs-btn-hover-border-color: var(--dt-primary); }
.btn-outline-secondary { --bs-btn-color: var(--dt-primary); --bs-btn-border-color: var(--dt-border); --bs-btn-hover-bg: var(--dt-surface-secondary); --bs-btn-hover-border-color: var(--dt-border); --bs-btn-hover-color: var(--dt-primary); }
.btn-link { color: var(--dt-primary); }
.form-control, .form-select { border-color: var(--dt-border); border-radius: 7px; }
.form-control:focus, .form-select:focus { border-color: var(--dt-accent); box-shadow: 0 0 0 .2rem rgba(84, 181, 203, .2); }
.form-check-input:checked { background-color: var(--dt-primary); border-color: var(--dt-primary); }
.card { border: 1px solid var(--dt-border); border-radius: var(--dt-radius); box-shadow: var(--dt-shadow); }
.form-panel { width: min(100%, 720px); min-width: 0; max-width: 720px; }
.form-panel .card-body, .form-panel details, .form-panel fieldset { min-width: 0; }
.form-panel input, .form-panel select, .form-panel textarea { max-width: 100%; }
.form-panel ul { max-width: 100%; padding-left: 0; list-style: none; }
.context-mode-options { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.context-mode-options > div { min-width: 0; }
.context-mode-options label { display: flex; align-items: flex-start; gap: 9px; width: 100%; margin: 0; line-height: 1.35; cursor: pointer; }
.context-mode-options input[type="radio"] { flex: 0 0 auto; width: 1em; height: 1em; margin: .18em 0 0; accent-color: var(--dt-primary); }
.choice-list { display: grid; gap: 7px; }
.choice-list label { display: flex; align-items: center; gap: 8px; margin: 0; }
.choice-list input[type="checkbox"] { flex: 0 0 auto; width: 1em; height: 1em; margin: 0; accent-color: var(--dt-primary); }
.employee-search { max-width: 340px; }
.card-header, .card-footer { background: var(--dt-surface); border-color: var(--dt-border); }
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--dt-border); }
.table thead th { color: var(--dt-text-muted); font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.table tbody td, .table tbody th { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--dt-surface-secondary); }
.nav-tabs { border-color: var(--dt-border); }
.nav-tabs .nav-link { color: var(--dt-text-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--dt-primary); border-color: var(--dt-border) var(--dt-border) var(--dt-surface); }
.list-surface { overflow: hidden; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: var(--dt-radius); }
.list-surface .table { margin-bottom: 0; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--dt-text-muted); }
.empty-state .bi { display: block; margin-bottom: 10px; color: var(--dt-accent); font-size: 1.8rem; }
.alert { border-radius: var(--dt-radius); font-size: .86rem; }
.alert-warning { --bs-alert-bg: #fff7e8; --bs-alert-border-color: #f2dfb5; --bs-alert-color: #73501d; }
.alert-danger { --bs-alert-bg: #fceef0; --bs-alert-border-color: #efc7ce; --bs-alert-color: #8a3542; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { background: #f1f3f5; color: #596675; border-color: #e1e6ea; }
.status-generated { background: #e8f4ef; color: #286b4a; border-color: #cce6d8; }
.status-modified { background: #e9f2f7; color: var(--dt-primary); border-color: #cfdfeb; }
.status-final { background: #e9edf5; color: var(--dt-primary-dark); border-color: #d7deeb; }
.status-error { background: #f9e8ec; color: var(--dt-danger); border-color: #efc7ce; }
.autosave-note { color: var(--dt-text-muted); font-size: .75rem; }
.workspace-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.workspace-actions form { margin: 0; }
.workspace-actions .btn { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .8rem; }
.workspace-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 10px 13px; }
.workspace-meta { margin: 10px 0 12px; }
.workspace-meta .form-select { width: 64px; }
.target-hours-form .input-group { width: 220px; }
.target-hours-form .form-control { width: 72px; }
.employee-picker-list { max-height: 340px; overflow: auto; border: 1px solid var(--dt-border); border-radius: 7px; }
.employee-picker-heading { display: grid; grid-template-columns: 1fr 130px; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--dt-border); background: var(--dt-surface-secondary); color: var(--dt-text-muted); font-size: .72rem; font-weight: 700; }
.employee-picker-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 10px; border-bottom: 1px solid var(--dt-border); }
.employee-picker-label { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; cursor: pointer; }
.employee-picker-row .btn { flex-shrink: 0; }
.add-employee-row .employee-picker-label { flex: 1; }
.employee-hours { flex: 0 0 130px; }
.employee-picker-row:last-child { border-bottom: 0; }
.employee-picker-row:hover { background: var(--dt-surface-secondary); }
.employee-picker-row small { margin-left: auto; color: var(--dt-text-muted); }
.employee-picker-row[hidden] { display: none; }
.member-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .8rem; }
.member-strip strong { margin-right: 3px; }
.member-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: 999px; }
.member-chip form { display: inline; }
.member-chip button { padding: 0 2px; border: 0; background: none; color: var(--dt-text-muted); line-height: 1; }
.member-add-form { display: flex; gap: 8px; max-width: 650px; margin: 10px 0; }
.member-add-form input, .member-add-form select { max-width: 260px; }
.grid-toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 6px 8px; background: var(--dt-surface-secondary); border: 1px solid var(--dt-border); border-bottom: 0; border-radius: var(--dt-radius) var(--dt-radius) 0 0; }
.workspace-tools { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.tool-bulk.active, .tool-state.active { background: var(--dt-primary); border-color: var(--dt-primary); color: #fff; box-shadow: 0 0 0 2px var(--dt-accent); }
.active-tool-status { min-width: 118px; color: var(--dt-primary-dark); font-size: .75rem; font-weight: 650; }
.paint-mode .active-tool-status { color: var(--dt-accent-dark); }
.day8-count[hidden] { display: none !important; }
.settings-section { padding-top: 1rem; border-top: 1px solid var(--dt-border); }
.settings-section summary { cursor: pointer; overflow-wrap: anywhere; }
.workspace-dragging, .workspace-dragging * { user-select: none !important; -webkit-user-select: none !important; cursor: crosshair !important; }
.schedule-cell { touch-action: none; }
.schedule-cell.paint-preview { background: var(--dt-accent-light); outline: 2px solid var(--dt-accent); outline-offset: -2px; }
.schedule-cell.pending-edit { box-shadow: inset 0 0 0 2px #d49a21; }
.schedule-cell.warning-highlight { outline: 3px solid #dc3545; outline-offset: -3px; box-shadow: inset 0 0 0 2px #fff; }
.schedule-grid.row-paint-locked tbody tr:not(.paint-row-anchor) { opacity: .55; }
.schedule-grid.row-paint-locked .paint-row-anchor .employee-label { box-shadow: inset 4px 0 var(--dt-accent); }
.schedule-grid-scroll { overscroll-behavior: contain; }
.toolbar-label { margin-right: 6px; color: var(--dt-text-muted); font-size: .75rem; }
.tool-state { padding: 4px 7px; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: 5px; color: var(--dt-primary-dark); font-size: .72rem; font-weight: 700; }
.tool-state:hover, .tool-state:focus { background: var(--dt-primary-light); border-color: var(--dt-accent); }
.tool-state span { color: var(--dt-text-muted); font-weight: 400; }
.tool-bulk, .tool-context { min-width: 34px; padding: 4px 7px; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: 4px; color: var(--dt-primary-dark); font-size: .75rem; font-weight: 700; }
.tool-bulk:hover, .tool-bulk:focus, .tool-context:hover, .tool-context:focus { background: var(--dt-primary-light); border-color: var(--dt-accent); }
.tool-context { border-style: dashed; }
.tool-context.active { border-style: solid; background: var(--dt-accent-light); box-shadow: 0 0 0 2px rgba(84,181,203,.2); }
.grid-axis-select { display: block; margin: 2px auto 0; padding: 0 2px; border: 0; background: transparent; color: var(--dt-text-muted); font-size: .58rem; line-height: 1.2; }
.grid-axis-select:hover, .grid-axis-select:focus { color: var(--dt-primary-dark); text-decoration: underline; }
.schedule-grid-scroll { --calendar-cell-width: 42px; --calendar-cell-height: 31px; --calendar-cell-font: .69rem; --calendar-header-font: .62rem; overflow-x: auto; overflow-y: visible; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: 0 0 var(--dt-radius) var(--dt-radius); }
.schedule-grid-scroll.density-normal { --calendar-cell-width: 48px; --calendar-cell-height: 36px; --calendar-cell-font: .73rem; --calendar-header-font: .66rem; }
.schedule-grid-scroll.density-large { --calendar-cell-width: 58px; --calendar-cell-height: 43px; --calendar-cell-font: .8rem; --calendar-header-font: .72rem; }
.schedule-grid-scroll.grid-standalone { border-radius: var(--dt-radius); }
.schedule-grid { width: 100%; min-width: max-content; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.schedule-grid th, .schedule-grid td { padding: 0; border-right: 1px solid var(--dt-border); border-bottom: 1px solid var(--dt-border); }
.schedule-grid tr:last-child th, .schedule-grid tr:last-child td { border-bottom: 0; }
.schedule-grid tr th:last-child, .schedule-grid tr td:last-child { border-right: 0; }
.schedule-grid thead th { position: sticky; top: 0; z-index: 3; min-width: var(--calendar-cell-width); width: var(--calendar-cell-width); padding: 4px 2px; background: var(--dt-row-header); color: var(--dt-primary-dark); text-align: center; font-size: var(--calendar-header-font); font-weight: 700; line-height: 1.12; white-space: nowrap; }
.column-toggle-form { display: inline; margin-right: 2px; }
.column-toggle { padding: 0 2px; border: 0; background: none; color: var(--dt-primary); }
.employee-header-name { display: inline; }
.schedule-grid .disabled-column { opacity: .52; }
.schedule-grid thead th small { display: block; margin-top: 2px; color: var(--dt-text-muted); font-size: .66rem; font-weight: 500; }
.schedule-grid thead .employee-heading { left: 0; z-index: 5; min-width: 132px; width: 132px; padding-left: 8px; text-align: left; }
.schedule-grid tbody .employee-label { position: sticky; left: 0; z-index: 2; min-width: 132px; width: 132px; padding: 4px 7px; background: var(--dt-surface); color: var(--dt-primary-dark); text-align: left; font-weight: 650; white-space: nowrap; }
.employee-label .column-toggle-form { display: inline-block; margin-right: 5px; }
.employee-label small { display: inline; margin-left: 3px; color: var(--dt-text-muted); font-size: .65rem; font-weight: 500; }
.employee-row-name { display: inline-block; max-width: 82px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.employee-row-actions { display: inline-block; margin-left: 2px; }
.employee-row-actions .btn { padding: 0 3px; color: var(--dt-text-muted); line-height: 1; }
.date-heading .date-month { display: block; color: var(--dt-accent-dark); font-size: .58rem; text-transform: uppercase; }
.date-heading .date-day { display: block; }
.holiday-marker { color: var(--dt-warning); font-size: .58rem; }
.schedule-grid .weekend-column { background: var(--dt-weekend); }
.schedule-grid .holiday-column { background: var(--dt-holiday); }
.schedule-grid .period-previous, .schedule-grid .period-following { background: var(--dt-surface-secondary); color: var(--dt-text-muted); }
.schedule-grid .boundary-start { border-left: 3px solid var(--dt-accent); }
.schedule-grid .today-column { box-shadow: inset 0 3px var(--dt-accent); }
.schedule-grid .disabled-row { opacity: .52; }
.schedule-grid .empty-grid { padding: 28px; color: var(--dt-text-muted); text-align: center; }
.schedule-grid tbody tr:hover th, .schedule-grid tbody tr:hover td { box-shadow: inset 0 0 0 999px rgba(84, 181, 203, .045); }
.schedule-cell { position: relative; display: block; width: 100%; min-width: var(--calendar-cell-width); min-height: var(--calendar-cell-height); padding: 2px; border: 0; background: transparent; color: var(--dt-text-muted); text-align: center; font-size: var(--calendar-cell-font); font-weight: 700; }
.schedule-cell:hover { box-shadow: inset 0 0 0 2px var(--dt-accent); }
.schedule-cell[draggable="true"] { cursor: grab; }
.schedule-cell.dragging { opacity: .42; cursor: grabbing; }
.schedule-cell.drop-target { outline: 3px solid var(--dt-accent-dark); outline-offset: -3px; box-shadow: inset 0 0 0 999px rgba(84, 181, 203, .14); }
.schedule-cell.swap-updated { z-index: 1; border-radius: 9px; animation: swap-confirmation 1.8s ease-out; }
@keyframes swap-confirmation { 0%, 45% { outline: 4px solid #198754; outline-offset: -4px; box-shadow: 0 0 0 4px rgba(25, 135, 84, .24); } 100% { outline: 0 solid transparent; box-shadow: none; } }
.schedule-cell[data-editable="false"] { cursor: default; }
.schedule-cell[data-editable="false"]:hover { box-shadow: none; }
.schedule-cell.source-context_assignment, .schedule-cell.source-assumed_off { opacity: .78; }
.schedule-cell.source-planning_constraint { box-shadow: inset 3px 0 var(--dt-warning); }
.schedule-cell.selected { outline: 2px solid var(--dt-primary); outline-offset: -2px; background: #dcecf5 !important; }
.schedule-cell.shift-off { color: #627181; }
.schedule-cell.state-vacation { background: var(--dt-shift-vacation-bg); color: var(--dt-shift-vacation-text); }
.schedule-cell.state-sick { background: var(--dt-shift-sick-bg); color: var(--dt-shift-sick-text); }
.schedule-cell.state-paid_leave { background: #f2eafa; color: #70508d; }
.schedule-cell.state-unavailable { background: var(--dt-shift-unavailable-bg); color: var(--dt-shift-unavailable-text); }
.schedule-cell.state-prefer_work { background: var(--dt-shift-prefer-bg); color: var(--dt-shift-prefer-text); }
.schedule-cell.shift-day, .schedule-cell.state-locked_day { background: var(--dt-shift-day-bg); color: var(--dt-shift-day-text); }
.schedule-cell.shift-night, .schedule-cell.state-locked_night { background: var(--dt-shift-night-bg); color: var(--dt-shift-night-text); }
.schedule-cell.shift-early, .schedule-cell.state-locked_early { background: var(--dt-shift-early-bg); color: var(--dt-shift-early-text); }
.schedule-cell.shift-off.state-locked_day, .schedule-cell.shift-off.state-locked_night, .schedule-cell.shift-off.state-locked_early, .schedule-cell.shift-off.state-locked_off { background: transparent; color: var(--dt-text-muted); }
.schedule-cell.source-manual_context { box-shadow: inset 3px 0 var(--dt-accent); }
.schedule-cell.source-missing_context { background: #fff4e7; color: var(--dt-warning); box-shadow: inset 0 0 0 1px #d7a64a; }
.schedule-cell.source-missing_context:hover, .schedule-cell.source-missing_context:focus-visible { box-shadow: inset 0 0 0 2px var(--dt-warning); }
.schedule-cell.source-missing_context.missing-highlight { outline: 3px solid var(--dt-warning); outline-offset: -3px; }
.cell-lock { position: absolute; right: 5px; top: 3px; font-size: .64rem; }
.cell-history, .cell-missing { position: absolute; right: 5px; top: 3px; color: var(--dt-text-muted); font-size: .62rem; }
.cell-missing { color: var(--dt-warning); font-weight: 700; }
.cell-plan { position: absolute; right: 5px; bottom: 2px; color: var(--dt-warning); font-size: .55rem; font-weight: 700; }
.grid-legend { margin: 9px 0 22px; color: var(--dt-text-muted); font-size: .72rem; line-height: 1.5; }
.swap-hint { display: flex; align-items: center; gap: 10px; min-height: 30px; margin: 7px 0 -2px; color: var(--dt-text-muted); font-size: .76rem; }
.swap-feedback { padding: 4px 9px; border: 1px solid #79bd98; border-radius: 999px; background: #e8f6ee; color: #146c43; font-size: .72rem; }
.legend-swatch { display: inline-block; width: 9px; height: 9px; margin-left: 9px; border: 1px solid var(--dt-border); }
.legend-swatch.weekend { background: var(--dt-weekend); }
.legend-swatch.holiday { background: var(--dt-holiday); }
.legend-swatch.context { background: var(--dt-surface-secondary); }
.legend-context-manual, .legend-context-missing { display: inline-block; margin-left: 7px; padding: 0 4px; border-left: 3px solid var(--dt-accent); background: var(--dt-surface-secondary); font-weight: 700; }
.legend-context-missing { border-left-color: var(--dt-warning); background: #fff4e7; color: var(--dt-warning); }
.cell-menu { position: fixed; z-index: 1050; overflow: auto; min-width: 175px; max-height: 320px; padding: 4px; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: 7px; box-shadow: var(--dt-shadow); }
.cell-menu-item { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 4px; background: none; color: var(--dt-primary-dark); text-align: left; font-size: .8rem; }
.cell-menu-item:hover, .cell-menu-item:focus { background: var(--dt-primary-light); }
.advanced-panel { margin-top: 18px; background: var(--dt-surface); border: 1px solid var(--dt-border); border-radius: var(--dt-radius); }
.schedule-settings-panel { margin-top: 10px; }
.workspace-primary-toolbar { margin-top: 10px; padding: 7px 8px; background: var(--dt-surface-secondary); border: 1px solid var(--dt-border); border-radius: var(--dt-radius); }
.workspace-collapsible, .workspace-inline-details { border: 1px solid var(--dt-border); border-radius: 7px; background: var(--dt-surface); }
.workspace-collapsible summary, .workspace-inline-details summary { cursor: pointer; padding: 7px 10px; color: var(--dt-primary-dark); font-size: .8rem; font-weight: 650; }
.workspace-inline-details { position: relative; }
.workspace-inline-details form { min-width: 205px; padding: 0 8px 8px; }
.cell-density-controls { white-space: nowrap; }
.advanced-panel summary { cursor: pointer; padding: 12px 14px; color: var(--dt-primary-dark); font-weight: 700; }
.advanced-panel summary span { margin-left: 5px; color: var(--dt-text-muted); font-size: .77rem; font-weight: 400; }
.advanced-content { padding: 4px 14px 14px; }
@media (max-width: 860px) { .grid-toolbar { position: static; } .workspace-tools { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; } .cell-density-controls .btn[data-calendar-density] { display: none; } }
.advanced-links { display: flex; gap: 15px; margin-bottom: 13px; font-size: .8rem; }
.table-sticky-first th:first-child, .table-sticky-first td:first-child { position: sticky; left: 0; z-index: 2; background: var(--dt-surface); }
.availability-table th, .availability-table td { min-width: 56px; text-align: center; vertical-align: middle; }
.availability-table th:first-child, .availability-table td:first-child { min-width: 176px; text-align: left; }
.day-weekend { background: var(--dt-weekend) !important; }
.day-holiday { background: var(--dt-holiday) !important; }
.state-select { min-width: 52px; }
.state-select.state-unavailable { background: var(--dt-shift-unavailable-bg); }
.state-select.state-locked-day { background: var(--dt-shift-day-bg); }
.state-select.state-locked-night { background: var(--dt-shift-night-bg); }
.import-source-image { max-height: 58vh; object-fit: contain; }
.recognition-table th { white-space: nowrap; }
.recognition-table td { min-width: 120px; }
.recognition-table td:first-child, .recognition-table td:last-child { min-width: 76px; text-align: center; }
.recognition-uncertain > * { background: #fff7df !important; }
@media (max-width: 991px) { .app-content { padding: 20px 16px 36px; } }
@media (max-width: 700px) { .app-content { padding-right: 14px; padding-left: 14px; } .page-header, .workspace-heading { align-items: flex-start; flex-direction: column; } .workspace-actions { justify-content: flex-start; } .context-mode-options { grid-template-columns: 1fr; } .schedule-grid thead .employee-heading, .schedule-grid tbody .employee-label { min-width: 145px; width: 145px; } .tool-state span { display: none; } .member-add-form { flex-wrap: wrap; } }
