/* Schedule-only compatibility with the last screen before the React rollback.
   Loaded after workspace.css so the older component layer cannot rearrange it. */
.main.schedule-pilot-mode .topbar {display:flex;min-height:64px;height:64px;}
.schedule-pilot-view {padding:24px;overflow:auto;flex:1;min-width:0;gap:0;}
.schedule-pilot-view .schedule-pilot-head {align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin:0 0 8px;}
.schedule-pilot-view .schedule-pilot-head h1 {font-size:16px;line-height:24px;font-weight:500;margin:0;}
.schedule-pilot-view .schedule-workspace-tabs {margin:0;border:0;}
.schedule-pilot-view .schedule-workspace-tabs button {min-height:32px;padding:4px 12px;font-size:13px;font-weight:400;}
.schedule-pilot-view .schedule-header-actions {margin-left:auto;align-items:center;gap:4px;}
.schedule-pilot-view :is(.schedule-header-actions,.schedule-actions) .btn {min-height:32px;height:32px;padding:4px 8px;font-size:12px;}
.schedule-pilot-view .schedule-header-actions a {display:inline-flex;align-items:center;text-decoration:none;}
.schedule-pilot-view .schedule-pilot-controls {gap:4px 8px;margin:0;}
.schedule-pilot-view .schedule-pilot-controls>.form-label {flex:1 1 150px;min-width:130px;max-width:none;gap:2px;margin:0;}
.schedule-pilot-view .form-label {font-weight:400;}
.schedule-pilot-view .schedule-pilot-controls>.schedule-pilot-search {flex:1.15 1 190px;}
.schedule-pilot-view .schedule-pilot-controls :is(select,.field) {width:100%;max-width:none;height:32px;min-height:32px;padding:4px 8px;font-size:12px;font-weight:400;}
.schedule-pilot-view .schedule-toolbar-footer {margin:8px 0;}
.schedule-pilot-view .schedule-date-toolbar {align-items:center;margin:0;gap:4px 8px;}
.schedule-pilot-view .schedule-date-toolbar .form-label {display:flex;flex-direction:row;align-items:center;gap:8px;margin:0;max-width:none;}
.schedule-pilot-view .schedule-date-control {display:flex;min-width:0;align-items:center;gap:4px;}
.schedule-pilot-view .schedule-date-step {display:none;}
.schedule-pilot-view .schedule-date-toolbar :is(input,select) {min-height:32px;height:32px;width:144px;padding:4px 8px;font-size:12px;font-weight:400;}
.schedule-pilot-view .schedule-date-toolbar select {width:160px;}
.schedule-pilot-view .schedule-range {gap:0;border:0;}
.schedule-pilot-view .schedule-range button {min-height:32px;padding:4px 12px;border:1px solid var(--border);border-right:0;background:transparent;}
.schedule-pilot-view .schedule-range button:last-child {border-right:1px solid var(--border);}
.schedule-pilot-view .schedule-range button[aria-pressed=true] {background:var(--text);color:var(--panel);border-color:var(--text);}
.schedule-pilot-view .schedule-inline-status {font-size:11px;line-height:16px;color:var(--muted);margin-left:8px;}
.schedule-pilot-view .schedule-status {display:flex;flex-wrap:wrap;flex:none;justify-content:space-between;gap:4px;color:var(--muted);font-size:12px;line-height:18px;margin-bottom:8px;}
.schedule-pilot-view .schedule-actions {display:flex;flex-wrap:wrap;flex:none;gap:8px;margin-bottom:16px;}
.schedule-pilot-view .schedule-actions .btn {min-height:36px;height:auto;padding:8px 12px;}
.schedule-pilot-view .schedule-pilot-checks-clear {margin:0 0 16px;font-size:14px;line-height:20px;}
.schedule-pilot-view .schedule-workspace-layout {flex:1 0 auto;min-width:0;min-height:220px;overflow:visible;align-items:start;}
.schedule-pilot-view .schedule-workspace-layout.is-overview {display:block;}
.schedule-pilot-view .schedule-calendar-panel {display:block;min-width:0;min-height:0;width:100%;height:auto;}
.schedule-pilot-view .schedule-calendar-panel .schedule-pilot-grid {display:block;position:relative;overflow:auto;max-height:68dvh;min-height:220px;scrollbar-gutter:stable;}
.schedule-pilot-view .schedule-calendar-table {font-size:14px;line-height:18px;}
.schedule-pilot-view .schedule-calendar-table :is(th,td) {width:var(--schedule-day-width,72px);min-width:var(--schedule-day-width,72px);max-width:var(--schedule-day-width,72px);}
.schedule-pilot-view .schedule-calendar-table .schedule-person-col {width:200px;min-width:200px;max-width:200px;}
.schedule-pilot-view .schedule-calendar-table .schedule-hours-col {width:72px;min-width:72px;max-width:72px;}
.schedule-pilot-view .schedule-calendar-table thead th {height:40px;padding:0;}
.schedule-pilot-view .schedule-calendar-table thead .schedule-person-col {padding:8px;font-size:12px;font-weight:400;}
.schedule-pilot-view .schedule-calendar-table thead .schedule-hours-col {font-size:12px;font-weight:400;}
.schedule-pilot-view :is(.schedule-calendar-table,.schedule-pilot-table) thead th>button {display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:40px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;cursor:pointer;}
.schedule-pilot-view :is(.schedule-calendar-table,.schedule-pilot-table) thead [aria-pressed=true] {box-shadow:inset 0 -3px var(--primary);}
.schedule-pilot-view .schedule-calendar-table thead th b {font-size:14px;font-weight:600;}
.schedule-pilot-view .schedule-calendar-table thead th small {font-size:12px;line-height:16px;}
.schedule-pilot-view .schedule-person-col button {min-height:52px;padding:0 8px;gap:2px;font-size:14px;line-height:18px;font-weight:600;}
.schedule-pilot-view .schedule-person-col button>b {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:inherit;}
.schedule-pilot-view .schedule-person-col button small {font-size:11px;line-height:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.schedule-pilot-view .schedule-cell button {min-height:48px;padding:2px;}
.schedule-pilot-view .schedule-cell-entry {position:relative;min-height:40px;}
.schedule-pilot-view .schedule-cell-content {flex:1;min-width:0;text-align:center;padding-right:4px;}
.schedule-pilot-view .schedule-cell-content>b {display:block;font-size:14px;line-height:18px;font-weight:500;}
.schedule-pilot-view .schedule-cell-content>.schedule-cell-zones {display:flex;justify-content:center;gap:2px;height:8px;}
.schedule-pilot-view .schedule-cell-zones .schedule-zone-dot {width:6px;height:6px;margin:0;}
.schedule-pilot-view .schedule-cell-content>.schedule-cell-interval {display:block;font-size:10px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.schedule-pilot-view .schedule-cell-status {position:absolute;top:0;right:0;font-size:12px;}
.schedule-pilot-view .schedule-cell-entry.is-form-closed:not(.is-overtime) {background:color-mix(in srgb,var(--green) 12%,var(--panel));}
.schedule-pilot-view .schedule-cell-entry.is-form-pending {background:color-mix(in srgb,var(--amber) 20%,var(--panel));}
.schedule-pilot-view :is(.schedule-cell.is-overtime,.schedule-cell-entry.is-overtime) {background:color-mix(in srgb,var(--amber) 24%,var(--panel));}
.schedule-pilot-view .schedule-cell.is-attention {box-shadow:inset 3px 0 var(--red);background:color-mix(in srgb,var(--red) 12%,var(--panel));}
.schedule-pilot-view .schedule-cell.is-attention .schedule-cell-entry {background:transparent;}
.schedule-pilot-view .schedule-cell.is-attention .schedule-cell-status {color:var(--red);font-weight:700;}
.schedule-pilot-view .schedule-cell.is-selected {box-shadow:inset 0 0 0 2px var(--focus,var(--text));background:var(--primary-soft);}
.schedule-pilot-view .schedule-point-divider .schedule-person-col {padding:4px 8px;}
.schedule-pilot-view .schedule-point-divider .schedule-person-col>small {white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.schedule-pilot-view .schedule-point-divider>.schedule-point-staff {padding:0;width:var(--schedule-day-width,72px);min-width:var(--schedule-day-width,72px);max-width:var(--schedule-day-width,72px);}
.schedule-pilot-view .schedule-point-staff>button {display:flex;align-items:center;justify-content:center;gap:2px;width:100%;min-height:40px;padding:2px;border:0;background:transparent;font:inherit;font-size:12px;color:var(--text);cursor:pointer;}
.schedule-pilot-view .schedule-point-divider>.schedule-point-staff.is-shortage {background:color-mix(in srgb,var(--red) 13%,var(--panel))!important;border-bottom:2px solid var(--red);}
.schedule-pilot-view .schedule-point-staff.is-shortage>button {color:var(--red);font-weight:600;}
.schedule-pilot-view .schedule-point-staff.is-unknown>button {color:var(--amber);}
.schedule-pilot-view .schedule-point-note {text-align:center;}
.schedule-pilot-view .schedule-pilot-table {min-width:100%;font-size:14px;line-height:18px;}
.schedule-pilot-view .schedule-pilot-table :is(th,td) {width:72px;min-width:72px;max-width:72px;}
.schedule-pilot-view .schedule-pilot-table :is(.pilot-coverage-pvz,.pilot-reserve-name) {width:200px;min-width:200px;max-width:200px;}
.schedule-pilot-view .schedule-pilot-table .pilot-coverage-norm {left:200px;width:72px;min-width:72px;max-width:72px;}
.schedule-pilot-view .schedule-workspace-layout.is-working {display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px;}
.schedule-pilot-view .is-working .schedule-calendar-panel {order:0;height:auto;min-height:0;}
.schedule-pilot-view .is-working .schedule-context-panel {order:0;padding:0;max-height:78dvh;overflow:auto;}
.schedule-pilot-view .schedule-side-section {margin:0;padding:12px;border-bottom:1px solid var(--border);}
.schedule-pilot-view .schedule-working-day {min-width:0;}
.schedule-pilot-view .schedule-time-axis {display:none;}
.schedule-pilot-view .schedule-timeline-row {grid-template-columns:minmax(140px,220px) minmax(100px,1fr);padding:12px;}
.schedule-pilot-view .schedule-time-track {background:var(--panel-2);}
.schedule-pilot-view [data-pilot-indicators] {padding:12px;}
.schedule-pilot-editor .schedule-attention {margin:8px 0;padding:8px;}
.schedule-pilot-editor .schedule-shift-zones .permission {gap:6px;}
.schedule-pilot-editor .schedule-zone-dot {display:inline-block;width:6px;height:6px;margin:0;border-radius:50%;background:var(--zone-color,var(--muted));}
.schedule-pilot-editor .schedule-attention .permission {align-items:flex-start;min-height:28px;}
.schedule-pilot-editor .schedule-attention input {flex:none;margin-top:2px;}
.schedule-import-form [hidden] {display:none!important;}
.schedule-pilot-view :is(button,input,select,summary):focus-visible {outline:2px solid var(--focus,var(--text));outline-offset:2px;}
.schedule-pilot-view :is(.schedule-calendar-table,.schedule-pilot-table) button:focus-visible {outline-offset:-2px;}
@media(max-width:1311px){
 .schedule-pilot-view .schedule-workspace-layout.is-working {grid-template-columns:minmax(0,1fr);}
 .schedule-pilot-view .is-working .schedule-context-panel {grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;}
}
@media(max-width:800px){
 .schedule-pilot-view .schedule-calendar-table .schedule-person-col {width:160px;min-width:160px;max-width:160px;}
 .schedule-pilot-view .schedule-pilot-table :is(.pilot-coverage-pvz,.pilot-reserve-name) {width:160px;min-width:160px;max-width:160px;}
 .schedule-pilot-view .schedule-pilot-table .pilot-coverage-norm {left:160px;}
}
@media(max-width:671px){
 .schedule-pilot-view {padding:12px;display:flex;}
 .schedule-pilot-view .schedule-header-actions {width:100%;margin-left:0;justify-content:flex-start;}
 .schedule-pilot-view .schedule-pilot-controls>.form-label {min-width:0;flex:1 1 calc(50% - 8px);}
 .schedule-pilot-view .schedule-pilot-controls>.schedule-pilot-search {flex-basis:100%;}
 .schedule-pilot-view .schedule-pilot-controls :is(select,.field) {height:40px;min-height:40px!important;font-size:16px;}
 .schedule-pilot-view .schedule-date-toolbar {gap:8px;}
 .schedule-pilot-view .schedule-date-toolbar .schedule-range {flex-basis:100%;}
 .schedule-pilot-view .schedule-date-toolbar .form-label {max-width:none;}
 .schedule-pilot-view .schedule-date-toolbar input {width:150px;height:40px;min-height:40px;font-size:16px;}
 .schedule-pilot-view .schedule-inline-status {flex-basis:100%;margin:0;}
 .schedule-pilot-view .is-working .schedule-context-panel {grid-template-columns:minmax(0,1fr);}
 .schedule-pilot-view .schedule-calendar-panel .schedule-pilot-grid {max-height:65dvh;}
 .schedule-pilot-view .schedule-timeline-row {grid-template-columns:minmax(0,1fr);}
 .schedule-pilot-view .schedule-range button {padding-inline:12px;}
}
@media(max-width:400px){
 .schedule-pilot-view .schedule-calendar-table .schedule-person-col {width:136px;min-width:136px;max-width:136px;}
 .schedule-pilot-view .schedule-pilot-table :is(.pilot-coverage-pvz,.pilot-reserve-name) {width:136px;min-width:136px;max-width:136px;}
 .schedule-pilot-view .schedule-pilot-table .pilot-coverage-norm {left:136px;}
}
@media(max-width:720px){
 .schedule-pilot-view .schedule-pilot-head {gap:4px 8px;}
 .schedule-pilot-view .schedule-pilot-head h1 {font-size:14px;}
 .schedule-pilot-view .schedule-workspace-tabs {margin-left:auto;}
 .schedule-pilot-view .schedule-workspace-tabs button {padding-inline:8px;font-size:12px;white-space:nowrap;}
 .schedule-pilot-view .schedule-date-toolbar {display:grid;flex:1 1 100%;grid-template-columns:minmax(0,1fr);width:100%;gap:6px;--schedule-date-hit:calc(40px / var(--interface-zoom,1));}
 .schedule-pilot-view .schedule-date-toolbar .schedule-range {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));order:1;}
 .schedule-pilot-view .schedule-date-control .form-label {flex:1;min-width:0;}
 .schedule-pilot-view .schedule-date-control .schedule-date-label {display:none;}
 .schedule-pilot-view .schedule-date-control input {width:100%;min-width:0;height:var(--schedule-date-hit);min-height:var(--schedule-date-hit);font-size:16px;}
 .schedule-pilot-view .schedule-date-step {display:grid;place-items:center;flex:0 0 var(--schedule-date-hit);min-height:var(--schedule-date-hit);padding:0;font-size:18px;line-height:1;}
 .schedule-pilot-view .is-day-range .schedule-pilot-grid {scrollbar-gutter:auto;}
 /* The virtual table pins its measured width inline. Fit a single day after zoom changes too. */
 .schedule-pilot-view .is-day-range .schedule-calendar-table {width:100%!important;min-width:0;}
 .schedule-pilot-view .is-day-range .schedule-calendar-table .schedule-person-col {width:auto;min-width:0;max-width:none;}
 .schedule-pilot-view .is-day-range .schedule-calendar-table :is(thead th:nth-child(2),.schedule-cell,.schedule-point-staff) {width:64px;min-width:64px;max-width:64px;}
 .schedule-pilot-view .is-day-range .schedule-calendar-table .schedule-hours-col {width:50px;min-width:50px;max-width:50px;}
 .schedule-pilot-view .is-day-range .schedule-calendar-table thead .schedule-hours-col {font-size:11px;line-height:14px;}
}

/* Keep dense shift rows easy to track without changing operational colours. */
.schedule-pilot-view .schedule-calendar-table tbody tr:not(.schedule-point-divider):nth-child(even)>:not(.is-attention):not(.is-overtime):not(.is-selected):not(.is-selected-day) {background-color:color-mix(in srgb,var(--panel-2) 35%,var(--panel));}

.schedule-pilot-view {--schedule-day-accent:#0f62fe;--schedule-hours-low:#0f62fe;--schedule-hours-high:#ba4e00;}
html[data-theme="dark"] .schedule-pilot-view {--schedule-day-accent:#78a9ff;--schedule-hours-low:#78a9ff;--schedule-hours-high:#ff832b;}
.schedule-pilot-view .schedule-calendar-table .is-selected-day {border-inline-color:var(--schedule-day-accent);}
.schedule-pilot-view .schedule-calendar-table .is-selected-day:not(.is-attention):not(.is-overtime):not(.is-selected):not(.is-shortage):not(.is-unknown) {background:color-mix(in srgb,var(--schedule-day-accent) 14%,var(--panel));}
/* Match the layer of the existing important divider background. */
@layer components {
 .schedule-pilot-view .schedule-calendar-table .schedule-point-divider>.schedule-point-staff.is-selected-day:not(.is-shortage):not(.is-unknown) {background:color-mix(in srgb,var(--schedule-day-accent) 14%,var(--panel))!important;}
}
.schedule-pilot-view .schedule-hours-low {color:var(--schedule-hours-low);}
.schedule-pilot-view .schedule-hours-normal {color:var(--text);}
.schedule-pilot-view .schedule-hours-high {color:var(--schedule-hours-high);}
.schedule-pilot-view .schedule-hours-overload {color:var(--red);}
.schedule-pilot-view .schedule-calendar-table tbody tr:not(.schedule-point-divider):hover>:not(.is-attention):not(.is-overtime):not(.is-selected) {background-color:var(--primary-soft);}
.schedule-pilot-view .schedule-calendar-table .schedule-person-col button {text-align:left;}
