/* The matrix inherits the approved left-sidebar shell and system sans-serif type. */
.sandbox-banner{position:relative;z-index:6;margin:0;padding:8px 16px;background:#fff3d9;text-align:center;font-size:12px;color:#71551f}
.schedule-panel{min-width:0}.schedule-panel h1{margin:4px 0}.schedule-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:24px 0 16px}.schedule-toolbar>input{flex:1;min-width:180px}.schedule-toolbar input[type=date]{width:154px}.schedule-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;margin:0}.schedule-toggle{display:flex;gap:8px;align-items:center;font-size:14px;min-height:44px}.schedule-toggle input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0}.schedule-groups{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.schedule-group-chip{display:flex;align-items:center;border-radius:10px;background:var(--tone);border:1px solid transparent}.schedule-group-chip button{border:0;background:transparent;min-height:40px;padding:7px 12px;font-size:13px}.schedule-group-chip .schedule-drag{padding:6px;width:28px}.schedule-group-chip:has(.is-selected){outline:2px solid var(--ink,#263646);outline-offset:1px}.schedule-groups>button{font-size:13px;min-height:40px}.schedule-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:#516071;margin-bottom:12px}.schedule-legend>span{display:flex;align-items:center;gap:6px}.schedule-legend>span:before{content:'';width:12px;height:12px;border-radius:4px;background:#f1f3f6;border:1px solid #d5dce5}.schedule-legend .legend-needed:before{background:#fff0d1;border-color:#bd8a35}.schedule-legend .legend-confirmed:before{background:#e5f3ea;border-color:#51916b}.schedule-legend .legend-not-needed:before{background:#e4e6ea}.schedule-legend .legend-conflict:before{background:#fbe5e1;border-color:#c86a5c}.schedule-matrix-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.schedule-matrix-bar .actions{flex-wrap:wrap}.schedule-matrix-bar button{min-height:38px}.schedule-conflict-button{color:#974334;background:#fff0eb;border-color:#ebccc4;font-size:13px}.schedule-scroll{position:relative;overflow:auto;max-height:calc(100dvh - 335px);min-height:300px;border-radius:14px;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid #d9dfe6}.schedule-scroll table.schedule-matrix{table-layout:fixed;width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:13px}.schedule-matrix th,.schedule-matrix td{padding:0!important;border-right:1px solid #e1e5eb;border-bottom:1px solid #e1e5eb;vertical-align:top;min-width:0!important}.schedule-matrix .schedule-project{width:232px;min-width:232px!important;max-width:232px;background:#f8fafc!important;z-index:4!important;padding:14px 16px!important;font-weight:400;box-shadow:0 2px 3px #1d293606}.schedule-date{display:flex;justify-content:space-between;color:#48627a;gap:10px;margin-bottom:8px}.schedule-date strong{font-variant-numeric:tabular-nums}.schedule-project-name{display:block;font-size:15px;line-height:1.5;font-weight:700;margin-bottom:6px;overflow-wrap:anywhere}.schedule-venue,.schedule-pm{display:block;font-size:12px;color:#536578;margin-top:4px;overflow-wrap:anywhere}.schedule-project-edit{min-height:30px;font-size:11px;border:0;background:transparent;padding:6px 0;color:#48627a}.schedule-matrix .schedule-corner{width:174px;min-width:174px!important;max-width:174px;z-index:6!important;background:#f3f5f8!important;padding:18px!important}.schedule-matrix .schedule-row-name{width:174px;min-width:174px!important;max-width:174px;vertical-align:middle;background:var(--tone)!important;z-index:2!important;padding:4px 8px!important;box-shadow:2px 0 3px #1d293606}.schedule-drag{touch-action:none;cursor:grab;width:28px;min-height:38px;background:transparent;border:0;color:#6a7a8d;padding:4px;vertical-align:middle}.schedule-item-name{font-size:13px;background:transparent;border:0;padding:8px 4px;max-width:126px;min-height:44px;vertical-align:middle;text-align:left;font-weight:600}.schedule-category-row th{background:var(--tone)!important;z-index:3!important;padding:4px 8px!important;vertical-align:middle}.schedule-category-row td{height:43px;background:var(--tone)!important}.schedule-category-title{background:none;border:0;font-size:13px;font-weight:700;padding:4px;min-height:34px}.schedule-edit-group{background:none;border:0;padding:4px 6px;min-height:30px}.schedule-matrix .schedule-td{background:#fff!important;width:232px;min-width:232px!important;max-width:232px}.schedule-matrix .state-needed{background:#fff4dc!important}.schedule-matrix .state-confirmed{background:#edf7f0!important}.schedule-matrix .state-not-needed{background:#edeff2!important}.schedule-matrix .needs-review{background:#fff0eb!important;box-shadow:inset 0 0 0 2px #d88471}.schedule-cell{width:100%;min-height:72px;height:100%;padding:10px 14px;display:flex;flex-direction:column;align-items:start;gap:4px;text-align:left;background:transparent;border:0;border-radius:0;font-size:13px;white-space:normal}.schedule-cell:hover{background:#172d4810}.schedule-cell strong{font-weight:650}.schedule-cell-state{font-size:11px;color:#536578}.state-needed .schedule-cell-state{color:#855b17}.state-confirmed .schedule-cell-state{color:#37654a}.state-not-needed .schedule-cell-state{color:#6b727c}.schedule-cell-note{color:#617080;font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.schedule-warning{color:#a44732;font-size:12px}.schedule-reviewed{color:#37684d;font-size:12px}.schedule-dragging{opacity:.55}.schedule-drop-before{outline:3px solid #5b86af;outline-offset:-3px}.schedule-drop-after{outline:3px dashed #5b86af;outline-offset:-3px}.tone-slate{--tone:#edf0f4}.tone-blue{--tone:#e4eef8}.tone-rose{--tone:#f8e9ed}.tone-violet{--tone:#eee8f7}.tone-amber{--tone:#f8efd9}.tone-teal{--tone:#e0f0ef}.tone-sage{--tone:#e9efdf}.schedule-empty{padding:40px 24px;background:#f7f9fb;border:1px solid #dfe5eb;border-radius:14px;color:#617080}.schedule-dialog{width:min(670px,calc(100% - 28px));max-height:90dvh;padding:24px;border:1px solid #dfe5eb;overflow:auto;box-shadow:0 20px 80px #13243e30}.schedule-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}.schedule-dialog-head h2{margin:0;font-size:20px}.schedule-dialog .schedule-field{margin:16px 0}.schedule-cell-fields{border:0;padding:0;margin:0;min-width:0}.schedule-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px}.schedule-picker .schedule-field{margin:10px 0}.schedule-picker>input{grid-column:1/-1}.schedule-picker-results{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow-y:auto;margin:10px 0 16px;border:1px solid #e1e6ed;border-radius:10px;padding:8px}.schedule-picker-results button{text-align:left;border:0;background:white;min-height:40px;padding:8px 10px;font-size:14px}.schedule-picker-results .is-selected{background:#e9f0f7;color:#345875}.schedule-selected{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}.schedule-selected-pill{display:inline-flex;align-items:center;background:#e9f0f7;border-radius:8px;font-size:13px;padding:3px 6px 3px 10px}.schedule-selected-pill button{min-height:30px;padding:4px 8px}.schedule-dialog-foot{position:sticky;bottom:-24px;background:white;padding:12px 0 8px;margin-top:18px}.schedule-dialog-foot button{width:100%}.schedule-review-card{border:1px solid #dfe5eb;border-radius:12px;padding:16px;margin:14px 0}.schedule-review-card h3{margin:0}.schedule-review-card button{margin-top:12px}.schedule-dialog .error:not(:empty){padding:10px;background:#fff0ed;border-radius:8px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.schedule-panel .section-heading{gap:14px}.schedule-toolbar{gap:8px;margin-top:16px}.schedule-toolbar>input{flex-basis:100%}.schedule-toolbar input[type=date]{width:140px}.schedule-groups{flex-wrap:nowrap;overflow-x:auto;padding:3px;gap:6px}.schedule-group-chip{flex-shrink:0}.schedule-matrix .schedule-corner,.schedule-matrix .schedule-row-name{width:130px;min-width:130px!important;max-width:130px}.schedule-item-name{max-width:82px;font-size:12px}.schedule-matrix .schedule-project,.schedule-matrix .schedule-td{width:210px;min-width:210px!important;max-width:210px}.schedule-scroll{max-height:65dvh;min-height:360px}.schedule-dialog{padding:18px}.schedule-picker{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.schedule-matrix-bar{align-items:end}.schedule-matrix-bar .actions{gap:6px}.schedule-matrix-bar .muted{font-size:12px}.schedule-legend{gap:10px;font-size:11px}}
/* Keep the working area, not the toolbar, as the visual focus. */
main:has(#finance-panel.schedule-panel:not([hidden]))>header{height:58px;min-height:58px;margin-bottom:12px}
main:has(#finance-panel.schedule-panel:not([hidden]))>#notice:not(:empty){position:fixed;right:24px;bottom:20px;z-index:8;max-width:min(420px,calc(100vw - 32px));box-shadow:0 4px 24px #20364e20;margin:0}
.schedule-panel .section-heading{margin-bottom:10px}.schedule-panel .eyebrow{display:none}.schedule-panel h1{font-size:26px}
.schedule-toolbar{margin:10px 0}.schedule-toolbar input,.schedule-toolbar select{margin-top:0}.schedule-toolbar .schedule-field{gap:3px}
.schedule-groups{margin-bottom:10px}.schedule-legend{margin-bottom:8px}.schedule-matrix-bar{margin-bottom:8px}
.schedule-matrix .schedule-project{padding:10px 12px!important}.schedule-date{margin-bottom:4px}.schedule-project-name{margin-bottom:2px}
.schedule-groups>button{flex-shrink:0;white-space:nowrap}
@media(max-width:760px){.schedule-panel .section-heading{flex-direction:row;align-items:center;flex-wrap:wrap}.schedule-panel .section-heading h1{font-size:24px}.schedule-panel .section-heading>.actions{gap:6px}.schedule-panel .section-heading>.actions button{padding:9px 10px;font-size:13px}}
/* Compact overview: only assignment names; status stays in the cell colour. */
.schedule-matrix .schedule-project,.schedule-matrix .schedule-td{width:164px;min-width:164px!important;max-width:164px}
.schedule-matrix .schedule-project{padding:0!important}
.schedule-project-info{display:block;width:100%;min-width:0;border:0;border-radius:0;padding:8px 10px;background:transparent;text-align:left;font-weight:400}
button.schedule-project-info:hover{background:#eaf0f5}
.schedule-project-info .schedule-date,.schedule-project-info .schedule-project-name,.schedule-project-info .schedule-venue,.schedule-project-info .schedule-pm{display:block;margin:0;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.schedule-project-info .schedule-project-name{font-size:13px;font-weight:700}
.schedule-matrix .schedule-corner,.schedule-matrix .schedule-row-name{width:132px;min-width:132px!important;max-width:132px}
.schedule-matrix .schedule-corner{padding:10px!important}
.schedule-matrix .schedule-row-name{padding:0 5px!important}
.schedule-cell{display:flex;justify-content:center;min-height:36px;height:36px;padding:6px 9px;gap:0;font-size:13px;line-height:1.5}
.schedule-cell strong{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.schedule-matrix .schedule-drag{width:22px;min-height:32px;padding:2px}
.schedule-item-name{min-height:32px;max-width:94px;padding:4px 2px;font-size:12px;line-height:1.4}
.schedule-category-row td{height:29px}.schedule-category-row th{padding:0 5px!important}
.schedule-category-title,.schedule-edit-group{min-height:28px;padding:2px 3px;font-size:12px}
.schedule-matrix .review-confirmed{background:#e3edf9!important;box-shadow:inset 0 0 0 1px #7f9cbd}
.schedule-legend .legend-reviewed:before{background:#e3edf9;border-color:#7f9cbd}
@media(min-width:761px){
 main:has(#finance-panel.schedule-panel:not([hidden])){padding-left:24px;padding-right:24px}
 .schedule-panel .section-heading{margin-bottom:6px}.schedule-panel .section-heading button,.schedule-toolbar input{min-height:36px;padding:7px 10px;font-size:13px}
 .schedule-toolbar{margin:6px 0 8px}.schedule-toolbar input[type=date]{width:140px}.schedule-toggle{min-height:36px}
 .schedule-group-chip button,.schedule-groups>button{min-height:32px;padding:5px 9px}.schedule-group-chip .schedule-drag{width:24px;padding:4px}
 .schedule-groups{gap:6px;margin-bottom:8px}.schedule-legend{gap:12px}.schedule-matrix-bar button{min-height:32px;padding:6px 12px}
}
@media(pointer:coarse){.schedule-cell{height:44px;min-height:44px}.schedule-matrix .schedule-drag,.schedule-item-name,.schedule-category-title,.schedule-edit-group{min-height:44px}}
@media(prefers-reduced-motion:reduce){.schedule-panel *,.schedule-dialog *{scroll-behavior:auto!important;transition:none!important}}
@media(prefers-contrast:more){.schedule-cell-state,.schedule-venue,.schedule-pm{color:#182839}.schedule-matrix th,.schedule-matrix td{border-color:#8a99a8}}
.schedule-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}.schedule-workspace.has-tools{grid-template-columns:minmax(0,1fr) 158px}
.schedule-grid-host{min-width:0}.schedule-matrix-bar{justify-content:flex-end}
.schedule-tools{border:1px solid #e0e5eb;border-radius:12px;padding:10px;background:#f8fafc;max-height:calc(100dvh - 220px);overflow:auto;scrollbar-width:thin}
.schedule-panel .schedule-tools>h2{font-size:13px;font-weight:700;margin:0 0 10px;padding:4px 0}
.schedule-tools .schedule-groups{display:flex;flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:6px;margin:12px 0}
.schedule-tools .schedule-group-chip{flex-shrink:0}.schedule-tools .schedule-group-chip button:not(.schedule-drag){flex:1;text-align:left;padding-left:4px;font-size:12px}
.schedule-tools .schedule-legend{flex-direction:column;gap:9px;font-size:11px}
.schedule-side-summary .actions{flex-direction:column;align-items:stretch;gap:7px;font-size:12px}.schedule-side-summary button{padding:7px;font-size:11px;min-height:32px}
.schedule-workspace .schedule-scroll{max-height:calc(100dvh - 230px);min-height:240px}
.schedule-workspace .schedule-scroll table.schedule-matrix{min-width:0}
.schedule-workspace .schedule-matrix .schedule-project,.schedule-workspace .schedule-matrix .schedule-td{width:var(--column-width,112px);min-width:var(--column-width,112px)!important;max-width:var(--column-width,112px)}
.schedule-picker-results .resource-needs-info{box-shadow:inset 3px 0 #d6a24c}
.resource-mini-status{font-size:11px;color:#805519;margin-left:8px}
@media(max-width:1000px){.schedule-workspace.has-tools{grid-template-columns:minmax(0,1fr)}.schedule-tools{grid-row:1;max-height:240px}.schedule-tools .schedule-legend{flex-direction:row;flex-wrap:wrap}.schedule-tools .schedule-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr))}.schedule-side-summary .actions{flex-direction:row;align-items:center}.schedule-workspace .schedule-scroll{max-height:calc(100dvh - 290px)}}
.schedule-drag-preview{position:fixed;top:0;left:0;z-index:9999;pointer-events:none;min-width:130px;max-width:240px;padding:10px 14px;border:1px solid #b5c8dd;border-radius:12px;background:rgba(255,255,255,.95);box-shadow:0 12px 36px #183c6638;backdrop-filter:blur(12px);will-change:transform;font:13px/1.5 system-ui,sans-serif}
.schedule-drag-preview strong,.schedule-drag-preview small{display:block}.schedule-drag-preview small{font-size:11px;color:#42688b;margin-top:4px}
.schedule-drop-marker{position:fixed;height:4px;margin-top:-2px;z-index:9998;background:#367ac0;border-radius:3px;box-shadow:0 0 0 2px #fff;pointer-events:none}
.schedule-drop-marker:before{content:'';position:absolute;width:9px;height:9px;left:-4px;top:-3px;border-radius:50%;background:#367ac0}
.schedule-workspace .schedule-dragging{opacity:.25}.schedule-workspace .schedule-drop-before,.schedule-workspace .schedule-drop-after{outline:none}
@media(prefers-reduced-transparency:reduce){.schedule-drag-preview{background:#fff;backdrop-filter:none}}
/* One compact command row; narrow screens scroll the controls, not the page. */
.schedule-command-bar{display:flex;align-items:center;gap:8px;overflow-x:auto;padding:4px 3px 10px;margin-bottom:2px;scrollbar-width:thin}
body:has(#workspace:not([hidden]))>.sandbox-banner{display:none}
.schedule-title-tools{display:flex;align-items:center;gap:6px;flex:none}.schedule-title-tools h1{font-size:21px;margin:0;white-space:nowrap}
.schedule-command-bar button{min-height:34px;padding:6px 9px;font-size:12px;white-space:nowrap;flex:none}
.schedule-command-bar .schedule-tools-toggle{font-size:23px;line-height:1;width:32px;padding:3px;background:transparent;border-color:transparent}.schedule-tools-toggle[aria-expanded=true]{background:#e6edf3}
.schedule-command-bar .schedule-toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0;flex:none}
.schedule-command-bar .schedule-toolbar>input{flex:none;width:88px;min-width:0;margin:0}
.schedule-command-bar input{min-height:34px;font-size:12px;padding:6px;margin:0}
.schedule-command-bar .schedule-field{flex-direction:row;align-items:center;font-size:12px;gap:4px;white-space:nowrap}
.schedule-command-bar input[type=date]{width:118px}.schedule-command-bar .schedule-toggle{font-size:12px;gap:4px;white-space:nowrap;min-height:34px}
.schedule-command-bar input[type=checkbox]{width:16px;height:16px;min-height:16px;padding:0}
.schedule-command-actions,.schedule-arrows{gap:4px;flex-wrap:nowrap;flex:none}.schedule-command-actions{margin-left:auto}
.schedule-project-info .schedule-project-name{overflow:visible;text-overflow:clip}
.schedule-wrap .schedule-project-info .schedule-project-name{white-space:normal;overflow-wrap:anywhere}
.schedule-wrap .schedule-cell{height:auto;min-height:36px}.schedule-wrap .schedule-cell strong{white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}
@media(pointer:coarse){.schedule-command-bar button,.schedule-command-bar .schedule-toggle,.schedule-command-bar input:not([type=checkbox]){min-height:44px}.schedule-command-bar .schedule-tools-toggle{width:44px}.schedule-wrap .schedule-cell{min-height:44px}}
/* Compact floating controls never reserve table columns or push the matrix down. */
.schedule-workspace,.schedule-workspace.has-tools{position:relative;grid-template-columns:minmax(0,1fr)}
.schedule-workspace .schedule-tools{position:absolute;top:0;left:0;z-index:12;width:min(252px,100%);max-height:min(490px,65dvh);padding:10px;background:#fff;border-radius:12px;box-shadow:0 10px 32px #20364e26;overscroll-behavior:contain}
.schedule-tools-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;line-height:1.4;margin:0 0 6px}
.schedule-tools-head .schedule-tools-close{min-height:28px;width:28px;padding:0;border:0;background:transparent;font-size:20px}
.schedule-tools .schedule-side-summary .actions{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px;font-size:11px}
.schedule-tools .schedule-side-summary button{padding:4px 6px;min-height:26px;font-size:10px}
.schedule-workspace .schedule-tools .schedule-groups{display:flex;flex-direction:column;gap:5px;margin:8px 0}
.schedule-tools .schedule-group-chip button:not(.schedule-drag){min-height:30px;padding:4px;font-size:11px}.schedule-tools .schedule-group-chip .schedule-drag{min-height:30px;width:22px;padding:2px}
.schedule-tools .schedule-groups>button{min-height:30px;padding:4px;font-size:11px}
.schedule-workspace .schedule-tools .schedule-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;font-size:10px;margin:8px 0 0;padding-top:8px;border-top:1px solid #e0e5eb}
@media(pointer:coarse){.schedule-tools .schedule-group-chip button:not(.schedule-drag),.schedule-tools .schedule-group-chip .schedule-drag,.schedule-tools .schedule-groups>button,.schedule-tools-head .schedule-tools-close{min-height:44px}}

.state-arranged { background: #e8f2eb; }
.legend-arranged { color: #366146; }
.schedule-project small { display:block; font-weight:400; }
