.production-editor{min-width:0;display:grid;gap:18px;margin:18px 0}.production-editor details,.production-distribution{border:1px solid var(--line,#647585);border-radius:14px;padding:16px;margin:12px 0}.production-editor summary,.production-distribution summary{cursor:pointer;font-weight:650}.production-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:16px 0}.production-grid label,.production-filters label{display:grid;gap:6px;min-width:0}.production-time>span:last-child{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px}.production-editor input,.production-editor select{box-sizing:border-box;min-width:0;width:100%}.production-item,.production-task{border:1px solid var(--line,#647585);border-radius:12px;margin:18px 0;padding:16px;min-width:0}.production-actions{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}.production-actions [role=status]{color:var(--danger,#c45246)}.production-filters{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin:18px 0}.production-task-people{max-height:200px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin:12px 0}.production-task-people input{width:auto}.production-task-people label[hidden]{display:none}.distribution-person{margin:16px 0;padding:14px;border:1px solid var(--line,#647585);border-radius:12px}.distribution-person h4{margin:0 0 12px}.distribution-person small{font-weight:400}.distribution-assignment{display:grid;gap:6px;width:100%;text-align:left;padding:12px;margin:8px 0;border:1px solid var(--line,#647585);border-radius:10px;background:var(--surface,#243444);color:inherit;white-space:normal}.distribution-assignment.is-conflict{border-color:#bd762a;border-left-width:5px}.project-production-plan{padding-bottom:16px;border-bottom:1px solid var(--line,#647585);margin-bottom:24px}@media(max-width:600px){.production-grid{grid-template-columns:1fr}.production-item,.production-task,.production-editor details{padding:12px}.production-filters label{width:100%}.production-actions button{width:100%}}

.distribution-mobile{display:none}.distribution-matrix table{border-collapse:collapse}.distribution-matrix th,.distribution-matrix td{padding:12px;min-width:170px;border:1px solid var(--line,#647585);white-space:normal;vertical-align:top}.distribution-matrix th:first-child{position:sticky;left:0;background:var(--surface,#243444);z-index:1}.distribution-conflict{border-color:#bd762a!important}@media(max-width:700px){.distribution-mobile{display:block}.distribution-matrix{display:none}}

.production-device-list{margin:18px 0}.production-device-list h4{margin:0 0 10px}.production-device-row{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:12px;align-items:end;margin:12px 0}.production-device-row label{display:grid;gap:6px}.production-device-list [data-add-device]{margin-top:8px}@media(max-width:600px){.production-device-row{grid-template-columns:minmax(0,1fr) 90px}.production-device-row button{grid-column:1/-1}}

.assignment-warning{margin:14px 0;padding:12px;border:1px solid #c79538;border-radius:10px;background:rgba(199,149,56,.12);grid-column:1/-1}.assignment-warning[hidden]{display:none}.assignment-warning div{margin-top:6px}
.distribution-compact{border:1px solid var(--line,#647585);border-radius:10px;overflow:hidden;font-size:13px}.distribution-compact-head,.distribution-compact-row{display:grid;grid-template-columns:minmax(170px,24%) minmax(0,1fr);gap:12px;padding:7px 10px;align-items:center}.distribution-compact-head{font-weight:650;background:var(--surface,#243444)}.distribution-compact-row+.distribution-compact-row{border-top:1px solid var(--line,#647585)}.distribution-name{display:grid;gap:2px}.distribution-name small{opacity:.7;font-size:11px}.distribution-bookings{display:flex;flex-wrap:wrap;gap:5px}.distribution-booking{display:grid;gap:2px;text-align:left;white-space:normal;min-height:0;padding:5px 8px;border:1px solid var(--line,#647585);border-radius:6px;background:transparent;color:inherit;font-size:12px;line-height:1.3}.distribution-booking span{font-size:11px;opacity:.85}.distribution-booking.is-conflict{border-color:#c79538;background:rgba(199,149,56,.12)}@media(max-width:600px){.distribution-compact-head,.distribution-compact-row{grid-template-columns:minmax(100px,32%) minmax(0,1fr);gap:7px;padding:7px}.distribution-name strong{font-size:12px}.distribution-booking{width:100%}}

.distribution-sheet{max-height:68vh;overflow:auto;isolation:isolate;border:1px solid var(--line,#647585);border-radius:8px;font-size:12px}.distribution-sheet table{border-collapse:separate;border-spacing:0;width:max-content;min-width:0;table-layout:fixed}.distribution-sheet th,.distribution-sheet td{box-sizing:border-box;border-right:1px solid var(--line,#647585);border-bottom:1px solid var(--line,#647585);padding:3px 7px;height:27px;text-align:left;line-height:1.25}.distribution-sheet thead th{position:sticky;top:0;z-index:3;background:var(--surface,#243444);vertical-align:top}.distribution-sheet .distribution-role{position:sticky;left:0;width:95px;min-width:95px;max-width:95px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--surface,#243444);z-index:2}.distribution-sheet .distribution-employee{position:sticky;left:95px;width:155px;min-width:155px;max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--surface,#243444);z-index:2}.distribution-sheet thead .distribution-role,.distribution-sheet thead .distribution-employee{z-index:4}.distribution-sheet .distribution-slot{width:190px;min-width:190px;max-width:190px;padding:6px 8px;box-shadow:inset 0 4px hsl(var(--slot-hue) 40% 60%)}.distribution-slot span,.distribution-slot strong,.distribution-slot small{display:block;margin-top:3px;overflow-wrap:anywhere}.distribution-slot small{font-weight:400;opacity:.75}.distribution-cell.is-booked{background:hsla(var(--slot-hue),50%,55%,.14)}.distribution-sheet .distribution-cell button{display:block;min-height:0;width:100%;padding:2px 3px;border:0;border-radius:3px;background:transparent;color:inherit;text-align:left;font-size:12px;line-height:1.25;white-space:nowrap}.distribution-sheet tbody tr:hover td,.distribution-sheet tbody tr:hover th{box-shadow:inset 0 1px #619fae,inset 0 -1px #619fae}.distribution-sheet:focus-visible{outline:2px solid #619fae}

#projectsSection .distribution-sheet{width:100%;height:auto;max-height:76vh;max-height:76dvh;min-height:0;resize:none;font-size:13px}
#projectsSection .distribution-sheet table{width:100%!important;min-width:var(--crew-min,100%);font-size:inherit}
#projectsSection .distribution-sheet .distribution-role{width:7.2em;min-width:0;max-width:none}
#projectsSection .distribution-sheet .distribution-employee{width:10.8em;min-width:0;max-width:none;left:7.2em}
#projectsSection .distribution-sheet .distribution-day{width:auto;min-width:0;max-width:none;overflow-wrap:anywhere}
#projectsSection .distribution-sheet :is(td,th){font-size:inherit;height:auto;padding:2px .35em}
#projectsSection .distribution-sheet :is(.distribution-cell button,.day-assignment span,.distribution-day small,.distribution-employee button,.distribution-day-assigned button){font-size:inherit}
#projectsSection .distribution-sheet .distribution-cell button{white-space:normal;overflow-wrap:anywhere}
#projectsSection .distribution-sheet .distribution-day-assigned{padding:2px .25em}
#projectsSection .distribution-sheet.only-assigned tr[data-assigned="false"]{display:none}
.distribution-sheet [data-no-assigned]{padding:.5em}
.distribution-height-controls input[type=checkbox]{width:auto}

.distribution-sheet{resize:vertical;min-height:200px;box-sizing:border-box}.distribution-height-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.distribution-height-controls label{display:flex;align-items:center;gap:10px;font-size:13px}.distribution-height-controls input{width:160px}.distribution-height-controls .btn{padding:6px 10px;font-size:12px}

.distribution-sheet .distribution-day{width:var(--day-width);min-width:72px;max-width:var(--day-width);text-align:center;padding:8px 3px}.distribution-day small{display:block;opacity:.65;font-weight:400}.distribution-days .distribution-cell{vertical-align:top;padding:2px}.distribution-sheet .distribution-cell .day-assignment{white-space:normal;overflow-wrap:anywhere;padding:4px;margin:1px 0;background:var(--event-bg);color:var(--event-text);border:1px solid var(--event-border)}.day-assignment strong,.day-assignment span{display:block}.day-assignment span{font-size:11px}.distribution-days .is-today{box-shadow:inset 2px 0 rgba(69,137,92,.5),inset -2px 0 rgba(69,137,92,.5)}

.project-inner-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line,#647585);padding:8px 0 12px;margin-bottom:18px}.project-inner-tabs [role=tab]{padding:10px 16px;border:1px solid var(--line,#647585);border-radius:9px;background:transparent;color:inherit}.project-inner-tabs [aria-selected=true]{background:rgba(75,134,160,.2);border-color:#618fa5;font-weight:650}#eventsInnerPanel[hidden],#distributionInnerPanel[hidden]{display:none!important}#distributionInnerPanel>.production-distribution{margin:0;padding:0;border:0}.project-inner-tabs>div{display:flex;gap:8px}@media(max-width:600px){.project-inner-tabs{flex-wrap:wrap}.project-inner-tabs [role=tab]{flex:1;padding:10px;font-size:13px}}

#projectManagerExport[hidden]{display:none!important}

html[data-theme=dark] .distribution-sheet .distribution-cell .day-assignment{background:color-mix(in srgb,var(--event-border) 20%,#181d23);color:#edf2ef}.distribution-sheet .distribution-cell .day-assignment.has-conflict{outline:2px solid #c79538;outline-offset:-2px}

.production-hall{min-width:0;border:1px solid var(--line,#647585);border-radius:14px;padding:18px;margin:18px 0}.production-hall-heading{display:flex;gap:16px;align-items:end;justify-content:space-between}.production-hall-heading label{flex:1;max-width:600px;display:grid;gap:8px}.production-hall>section{margin:24px 0;padding-top:16px;border-top:1px solid var(--line,#647585)}.production-hall h4{margin:0 0 12px}.production-resource-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:12px 0}.production-resource-row label{display:grid;gap:6px;flex:1;min-width:160px}.production-resource-row small{opacity:.65}.production-hall .production-item{background:rgba(100,130,150,.04)}@media(max-width:600px){.production-hall{padding:12px}.production-hall-heading{align-items:stretch;flex-direction:column}.production-resource-row label{flex-basis:100%}.production-resource-row button{width:100%}}

.production-staff-row .staff-personal-schedule{flex:0 0 100%;min-width:0;grid-column:1/-1;border-top:1px solid var(--border,#c7ced7);padding-top:12px}.staff-personal-schedule>small{display:block;margin:6px 0 12px}.hall-schedule-fields{grid-template-columns:repeat(2,minmax(0,1fr))}[data-hall-period],[data-staff-period]{font-size:14px;color:var(--muted,#626d7b);margin:10px 0}@media(max-width:600px){.hall-schedule-fields{grid-template-columns:1fr}}
.event-overview-sheet{overflow:auto;max-height:75vh;min-height:220px;resize:vertical;border:1px solid #aab7c7;border-radius:12px;margin-top:12px}.event-overview-sheet table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px}.event-overview-sheet th,.event-overview-sheet td{padding:8px 10px;border-right:1px solid #cbd3df;border-bottom:1px solid #d5dce5;vertical-align:top;white-space:pre-line;min-width:72px;max-width:250px}.event-overview-sheet thead th{position:sticky;top:0;z-index:3;background:#e6edf5;color:#182638;box-shadow:0 1px #aab7c7}.event-overview-sheet tbody+tbody tr:first-child>*{border-top:3px solid #8796a9}.event-overview-name{position:sticky;left:0;z-index:2;min-width:180px!important;background:var(--event-bg,#edf3f7)}.event-overview-name button{font:inherit;font-weight:700;color:inherit;text-align:left;text-decoration:underline;background:none;border:0;padding:0;cursor:pointer}.event-overview-name small{display:block;margin-top:8px;font-weight:400}.event-overview-sheet tbody tr:hover td{background:#edf4fa}
/* Each event owns its table scroll; edit actions stay outside that scroll. */
.event-overview-sheet{overflow-y:auto;overflow-x:hidden;padding:0;}
.event-overview-block{min-width:0;max-width:100%;border-bottom:3px solid #8796a9;background:var(--card,#fff)}
.event-overview-scroll{overflow:auto;max-width:100%;max-height:60vh;overscroll-behavior:contain}

/* Keep the same sheet layout while editing an individual value. */
.event-overview-block .event-overview-scroll{max-height:none;overflow:visible}
.event-overview-sheet .event-overview-block table{width:100%;min-width:0;table-layout:fixed;font-size:11px}
.event-overview-sheet .event-overview-block th,.event-overview-sheet .event-overview-block td{width:auto;min-width:0!important;max-width:none;padding:6px 3px;overflow-wrap:anywhere;white-space:pre-line}
.event-overview-sheet .event-overview-block thead th:first-child{width:9%}
.event-overview-sheet .event-overview-block .event-overview-name{position:static}
.event-overview-sheet{max-height:none;height:auto!important;overflow:visible;resize:none}

.production-hall>details{margin:12px 0;border:1px solid var(--line,#abb8c9);border-radius:8px;padding:10px}
.production-hall>details>summary{font-weight:600;cursor:pointer}
.production-hall .production-screen-compact{margin:8px 0;padding:10px;border-radius:8px}
.production-screen-compact>.production-grid{grid-template-columns:2fr .65fr .8fr .8fr 1fr 1.4fr;gap:8px;margin:4px 0}
.production-screen-compact label{font-size:12px;gap:4px}
.production-screen-compact input{padding:7px;min-height:34px}
.production-screen-compact>.production-actions{gap:8px;justify-content:flex-end}
.production-screen-compact>.production-actions small{margin-right:auto;font-size:11px}
.production-screen-compact>p{margin:5px 0;font-size:12px}
.production-screen-compact>details{display:inline-block;vertical-align:top;max-width:100%;margin:6px 12px 0 0;padding:6px}
.production-screen-compact>details[open]{display:block}
.production-quick-screens{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.production-quick-screens small{flex-basis:100%;margin-bottom:4px}
.production-quick-screens button{padding:6px 9px;font-size:12px;min-height:32px}
@media(max-width:800px){.production-screen-compact>.production-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Creation uses spreadsheet rows; room details stay outside the editing grid. */
.equipment-grid.production-hall{padding:14px;margin:12px 0;border:1px solid #a6b7cb;border-radius:12px;background:var(--surface,#fff);min-width:0}
.equipment-heading{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.equipment-heading h3{margin:0;font-size:17px}.equipment-heading span,.equipment-help{color:#536478;font-size:13px}.equipment-help{margin:8px 0 14px}
.equipment-table-wrap{max-width:100%;overflow:auto;border:1px solid #acbdd0;border-radius:8px}
.equipment-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;min-width:900px}
.equipment-table th{background:#e4edf7;color:#253c55;padding:9px 6px;text-align:left;border-bottom:2px solid #a6b7cb;font-size:12px;position:sticky;top:0;z-index:1}
.equipment-table th:nth-child(1){width:14%}.equipment-table th:nth-child(2){width:10%}.equipment-table th:nth-child(3){width:18%}.equipment-table th:nth-child(4){width:6%}.equipment-table th:nth-child(5),.equipment-table th:nth-child(6){width:7%}.equipment-table th:nth-child(7){width:9%}.equipment-table th:nth-child(8){width:12%}.equipment-table th:nth-child(9){width:6%}.equipment-table th:last-child{width:11%}
.equipment-table td{padding:4px;border-bottom:1px solid #c8d4e1;border-right:1px solid #dce4ec;vertical-align:middle;background:var(--surface,#fff)}
.equipment-table td label{display:block;margin:0}.equipment-table input,.equipment-table select{width:100%;min-width:0;min-height:36px;padding:6px;border:1px solid transparent;border-radius:4px;background:transparent;font:inherit;box-shadow:none}
.equipment-table input:hover,.equipment-table select:hover{border-color:#9cb0c6}.equipment-table input:focus,.equipment-table select:focus{outline:2px solid #3669a0;outline-offset:-2px;background:#fff}
.equipment-table input:disabled{background:#eef1f5;color:#788492}.equipment-table tr:focus-within>td{background:#f0f6ff}.equipment-table tr.is-new>td{background:#f4f8fc}
.equipment-table .equipment-row-actions{white-space:normal;text-align:center}.equipment-row-actions button{padding:4px;border:0;border-radius:4px;background:#e6edf6;color:#254567;cursor:pointer;font-size:11px;margin:2px}.equipment-row-actions button:hover{background:#cdddf0}.equipment-row-total{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.equipment-row-more[hidden]{display:none}.equipment-row-more>td{padding:12px;background:#f3f7fc}.equipment-extra-fields{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.equipment-extra-fields label{flex:1;min-width:150px}.equipment-extra-fields input{border:1px solid #b0c0d2;background:#fff}.equipment-extra-fields button{align-self:end}.equipment-row-more details{margin-top:10px}
.equipment-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;font-size:13px}.equipment-error:empty{display:none}.equipment-error{color:#a52020}
.equipment-legacy>summary,.equipment-legacy>[data-add-hall],.equipment-legacy>p,.equipment-legacy .production-hall>section,.equipment-legacy [data-hall-list=devices],.equipment-legacy [data-hall-list=controlUnits]{display:none!important}
.equipment-legacy{border:0!important;padding:0!important;margin:0!important}.equipment-hall-settings{margin-top:16px}.equipment-hall-settings h4{margin:0 0 8px}.equipment-hall-settings>p{font-size:13px;color:#536478}
.equipment-hall-details{border:1px solid #bccbdb;border-radius:8px;margin:8px 0}.equipment-hall-details>summary{cursor:pointer;padding:10px 12px;background:#edf3f9;font-weight:600}.equipment-hall-details>.production-hall{border:0;margin:0;padding:12px}.equipment-hall-details .production-hall-heading label{flex:1}.equipment-hall-details .production-hall-heading{justify-content:flex-end}
.equipment-create-dock{position:sticky;bottom:8px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border:1px solid #8da6c1;border-radius:10px;background:#f2f7fc;box-shadow:0 4px 18px #20375025}.equipment-create-dock strong{font-size:14px}.equipment-create-dock button{min-width:130px}
#projectForm.planning-grid{gap:12px}#projectForm>.production-editor{min-width:0}#projectForm .production-stages{margin:0}
.equipment-grid .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:700px){.equipment-grid.production-hall{padding:8px}.equipment-create-dock{bottom:0}.equipment-create-dock strong{font-size:12px}}

#projectForm>.production-editor{margin:0;gap:10px}
#projectForm>.production-editor>.equipment-grid{margin:0}
#projectForm>.project-trip-flag{grid-column:1/-1;flex-direction:row;align-items:center;gap:14px}
#projectForm>.project-trip-flag .project-trip-choice{min-height:40px}


/* Each room owns its equipment table and metadata. */
.equipment-hall-group{margin:12px 0 20px;border:1px solid #a9bdd2;border-radius:10px;overflow:hidden}
.equipment-hall-group>.production-hall{min-width:0;padding:14px}
.equipment-hall-group .production-hall-heading{justify-content:space-between;gap:12px;padding:0 0 12px}
.equipment-hall-group .production-hall-heading label{max-width:640px}
.equipment-hall-actions{display:flex;flex-wrap:wrap;gap:8px;padding:10px 0 16px}
.equipment-group-table th:nth-child(1){width:12%}.equipment-group-table th:nth-child(2){width:23%}.equipment-group-table th:nth-child(3){width:6%}.equipment-group-table th:nth-child(4),.equipment-group-table th:nth-child(5){width:8%}.equipment-group-table th:nth-child(6){width:10%}.equipment-group-table th:nth-child(7){width:15%}.equipment-group-table th:nth-child(8){width:7%}.equipment-group-table th:nth-child(9){width:11%}

.equipment-hall-group>summary{padding:12px 14px;font-size:15px;overflow-wrap:anywhere}.equipment-hall-group>summary::after{content:"Развернуть";float:right;margin-left:12px;font-size:12px;font-weight:400;color:#536478}.equipment-hall-group[open]>summary::after{content:"Свернуть"}.equipment-hall-group>summary:focus-visible{outline:2px solid #3669a0;outline-offset:-3px}

.staff-day-toggle{display:flex!important;align-items:center;gap:8px}.staff-day-toggle input{width:18px!important;min-height:18px!important}.staff-personal-schedule input[hidden]{display:none!important}
.task-staff-cards{grid-column:1/-1;min-width:0;margin:12px 0}
.task-staff-filters{display:grid;grid-template-columns:minmax(150px,240px) 1fr;gap:12px;margin-bottom:12px}
.task-staff-cards .staff-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;max-height:300px;overflow:auto;padding:2px}
.staff-card-grid>[hidden],.task-staff-cards input[hidden]{display:none!important}
.staff-choice-card{display:flex;flex-direction:column;gap:6px;width:100%;height:100%;padding:12px;text-align:left;border:1px solid #aebdce;border-radius:9px;background:#fff;color:#26384b;cursor:pointer;white-space:normal}
.staff-choice-card span{font-size:12px;color:#526478}
.staff-choice-card:hover{background:#edf4fa;border-color:#50799b}
.staff-choice-card.is-selected{background:#e2f1e7;border:2px solid #49815c;padding:11px}
.staff-choice-card:focus-visible,.staff-assigned-person:focus-visible{outline:3px solid #386ba2;outline-offset:2px}
.staff-assigned{margin-top:14px;padding:14px;border:1px solid #a9c5b3;border-radius:9px;background:#f0f7f3}
.staff-assigned-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.staff-assigned-person{padding:8px 12px;border:1px solid #7fa58c;border-radius:7px;background:white;color:#264c34;cursor:pointer}
@media(max-width:600px){.task-staff-filters{grid-template-columns:1fr}.task-staff-cards .staff-card-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}}

.staff-card-busy{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:400;color:#536878;border-top:1px solid #d4dee7;padding-top:7px;margin-top:3px;width:100%}.staff-card-busy.has-bookings,.staff-card-busy.has-bookings span{color:#835015}.staff-card-busy span{font-size:12px}

.distribution-cell[data-assign-day]{cursor:pointer;min-height:28px}.distribution-cell[data-assign-day]:hover{background:#e8f1f8}.distribution-cell[data-assign-day]:focus-visible{outline:2px solid #386ba2;outline-offset:-2px}.distribution-add{padding:2px 8px;border:1px solid #b2c5d5;border-radius:4px;background:#f4f8fb;color:#32597b;cursor:pointer}
.distribution-pick{position:fixed;z-index:1500;width:min(440px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:16px;box-sizing:border-box;background:#fff;color:#253449;border:1px solid #9db1c6;border-radius:12px;box-shadow:0 10px 36px #14284040}.distribution-pick p{margin:8px 0;font-size:13px}.distribution-pick input{width:100%;box-sizing:border-box}.distribution-pick-list{max-height:230px;overflow:auto;display:grid;gap:8px;margin:10px 0}.distribution-pick-event{display:flex;flex-direction:column;gap:5px;text-align:left;padding:10px;border:1px solid #bccbd8;border-radius:7px;background:#f3f7fb;color:#253449;cursor:pointer}.distribution-pick-event:hover{background:#dfecf6}.distribution-pick-event span{font-size:12px}

.distribution-date-button{width:100%;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-weight:700;padding:5px}.distribution-date-button:hover{background:#dbeaf5}.distribution-day-assigned{display:block;padding:4px;border-radius:4px;font-weight:600}

.absence-badge{display:block;border:1px solid #cb8f85;background:#fbe6e1;color:#8a3226;padding:4px;border-radius:4px;font-weight:600}.absence-request{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #c7d1dc}

.distribution-back-dates[hidden]{display:none}.distribution-role-dialog::backdrop{background:#172c4480}.distribution-role-dialog{border:1px solid #9eb3c8;border-radius:12px;padding:22px;max-width:480px;width:calc(100vw - 40px)}.distribution-role-dialog label{display:grid;gap:8px}.distribution-role-dialog form>div{display:flex;gap:12px;margin-top:18px}.distribution-remove{font-size:11px;border:0;background:transparent;color:#963d32;padding:4px;cursor:pointer}

/* The overview uses the same dark surfaces as the rest of the dashboard. */
html[data-theme=dark] .event-overview-sheet{border-color:var(--line-strong);color:var(--text)}
html[data-theme=dark] .event-overview-block{background:var(--surface-solid);color:var(--text);border-color:var(--line-strong)}
html[data-theme=dark] .event-overview-sheet th,html[data-theme=dark] .event-overview-sheet td{border-color:var(--line-strong)}
html[data-theme=dark] .event-overview-sheet thead th{background:#1c2430;color:var(--text);box-shadow:0 1px var(--line-strong)}
html[data-theme=dark] .event-overview-name{background:color-mix(in srgb,var(--event-border,#7896b3) 22%,#161b22);color:var(--text)}
html[data-theme=dark] .event-overview-sheet tbody tr:hover td{background:#252f3c}
html[data-theme=dark] .event-overview-sheet :is(input,select,textarea){background:#111923;color:var(--text);border-color:var(--line-strong)}
html[data-theme=dark] .notification-project{background:color-mix(in srgb,var(--event-border) 22%,#161b22);color:var(--text)}
.notification-project:is(button){cursor:pointer;text-decoration:underline;text-underline-offset:3px}

.equipment-type-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.equipment-type-item{display:flex;align-items:center;gap:10px;border:1px solid var(--line-strong);border-radius:8px;padding:5px 8px;overflow-wrap:anywhere}.equipment-type-item .btn{font-size:12px}

html[data-theme=dark] .equipment-hall-details>summary{background:#233141;color:var(--text)}
html[data-theme=dark] .equipment-hall-details>summary::after{color:var(--muted)}
html[data-theme=dark] :is(.equipment-heading span,.equipment-help){color:var(--muted)}
html[data-theme=dark] .equipment-row-actions button{background:#2a394b;color:#e5edf7}
html[data-theme=dark] .equipment-row-actions button:hover{background:#3b5068}

.project-plan-heading{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;padding:20px;margin:20px 0;border:1px solid var(--line-strong);border-left:5px solid #618fa5;border-radius:10px;background:var(--surface-solid,#fff);color:var(--text)}
.project-plan-heading h3{font-size:26px;line-height:1.2;margin:0;font-weight:800;overflow-wrap:anywhere}
.project-plan-location{font-size:17px;font-weight:600;overflow-wrap:anywhere}
.project-plan-period{font-size:15px;font-weight:600;padding:8px 12px;border-radius:7px;background:var(--surface);border:1px solid var(--line-strong)}

html[data-theme=dark] .equipment-create-dock,html[data-theme=dark] .equipment-row-more>td{background:#1c2938;color:var(--text);border-color:var(--line-strong)}
html[data-theme=dark] .equipment-table tr:focus-within>td,html[data-theme=dark] .equipment-table tr.is-new>td{background:#202d3b}

.equipment-hall-subtotal{font-weight:700;padding:10px 0}.task-comment{white-space:pre-wrap}
.staff-choice-card,.staff-assigned-person{background:hsl(var(--staff-role-hue) 55% 93%)!important;border-color:hsl(var(--staff-role-hue) 35% 65%)!important;color:#172332!important}
.staff-choice-card.is-selected{outline:3px solid hsl(var(--staff-role-hue) 55% 38%);outline-offset:-3px}
[data-theme="dark"] .staff-choice-card,[data-theme="dark"] .staff-assigned-person{background:hsl(var(--staff-role-hue) 30% 20%)!important;color:#f0f3fa!important;border-color:hsl(var(--staff-role-hue) 35% 48%)!important}
#equipmentCatalog{margin-top:24px}#equipmentCatalog .planning-actions-form{display:flex;gap:12px;margin:8px 0}#equipmentCatalog input{flex:1}

.distribution-sheet{max-width:100%;min-width:min(320px,100%)}
.staff-card-size-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:10px 0}.staff-card-size-controls label{display:flex!important;align-items:center;gap:10px;font-size:13px}.staff-card-size-controls input[type=range]{width:180px;min-width:100px}.task-staff-cards .staff-card-grid{align-content:start;min-height:240px;box-sizing:border-box}

.task-staff-cards .staff-card-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--staff-card-width,200px)),1fr))}
.task-staff-cards[data-card-size="compact"]{--staff-card-width:150px}
.task-staff-cards[data-card-size="large"]{--staff-card-width:260px}
.task-staff-cards[data-card-size="compact"] .staff-choice-card{padding:7px;gap:3px;font-size:12px;overflow-wrap:anywhere}
.task-staff-cards[data-card-size="compact"] .staff-card-busy{padding-top:4px;margin-top:0;gap:2px}
.task-staff-cards[data-card-size="large"] .staff-choice-card{padding:16px;gap:8px;font-size:16px}
.staff-card-size-controls select{width:auto;min-width:135px}

#counterpartyCatalog{margin-top:24px;border-top:1px solid var(--border,#c7cdd5);padding-top:16px}
#counterpartyCatalog table{width:100%;border-collapse:collapse;min-width:760px}
#counterpartyCatalog th,#counterpartyCatalog td{padding:10px 12px;border-bottom:1px solid var(--border,#c7cdd5);text-align:left;vertical-align:top}
#counterpartyCatalog th{font-weight:700}#counterpartyCatalog .table-wrap{overflow:auto}
#counterpartyCatalog [data-report]{margin-top:16px;align-items:end}
#counterpartyCatalog [data-list] button{margin-left:8px}

.task-duration-input{display:grid;grid-template-columns:1fr 1fr;gap:8px;border:0;padding:0;margin:0;min-width:0}.task-duration-input legend{padding:0;margin-bottom:6px;font-size:inherit}.task-duration-input label{display:flex;flex-direction:column;gap:4px}.task-duration-input input{min-width:0;width:100%;box-sizing:border-box}.project-task-plan{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.project-task-plan>.task-staff{grid-column:1/-1}

.site-live-notice{position:fixed;bottom:12px;left:16px;right:16px;z-index:150;background:var(--surface-solid,#fff);color:var(--text,#172234);border:1px solid var(--border,#8a9bb0);border-radius:10px;padding:10px;box-shadow:0 3px 16px #0002}

#eventTableInnerPanel [data-city]{min-width:180px;width:100%}
@media(max-width:900px){
 #eventTableInnerPanel .event-overview-sheet{overflow:auto}
 #eventTableInnerPanel .event-overview-block table{width:1500px;min-width:1500px}
}

/* Keep project loading from moving the browser scroll anchor. */
#projectSummary{overflow-anchor:none}
.event-overview-sheet .event-overview-block thead th:nth-child(13){width:12%}
.event-overview-sheet .event-overview-block thead th:nth-child(14){width:12%}

.project-plan-heading[class*="tone-"]{background:var(--event-bg);border-color:var(--event-border);color:var(--event-text)}
.project-collapse{margin-left:auto}
.distribution-time-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}
.distribution-time-fields input{min-width:0;width:100%}

.participant-hall-role{display:block;color:var(--text-muted,#64748b);margin-top:4px;font-size:12px}

/* The whole-day image shares compact controls on staff and employee pages. */
.schedule-board{margin:8px 0}.schedule-board-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.schedule-board-actions [role=status]{font-size:12px;color:var(--text-muted,#64748b);margin-left:auto}
.schedule-board .btn{min-height:36px;padding:6px 10px;font-size:13px}
.schedule-board-zoom{display:grid;grid-template-columns:max-content max-content minmax(70px,150px) 3em;align-items:center;gap:6px;margin:8px 0}
.schedule-board-zoom label{display:flex;align-items:center;min-width:0;margin:0}
.schedule-board-zoom input{width:100%;min-width:0;padding:0;height:28px}
.schedule-board-zoom output{font-size:12px}.schedule-board-hint{font-size:12px;margin:6px 0}
.schedule-board-viewport{overflow:auto;max-height:75vh;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:#e7ecf1;overscroll-behavior:contain}
.schedule-board-viewport img{display:block;max-width:none!important;max-height:none!important;margin:auto;touch-action:pan-x pan-y pinch-zoom}
.schedule-board [hidden]{display:none!important}
@media(max-width:600px){.schedule-board-actions [role=status]{flex-basis:100%;margin:0}.schedule-board-zoom{grid-template-columns:auto auto minmax(60px,1fr) 3em}}

.distribution-day :is([data-column-time],[data-base-time]){background:transparent;color:inherit;font:inherit;border:0;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.distribution-day input[type=time]{box-sizing:border-box;width:100%;min-width:0;font:inherit}
.distribution-day [role=alert]{color:var(--danger,#a73121)}
.distribution-day [data-column-time]{font-weight:bold}
.distribution-day form{display:grid;gap:3px}

.event-overview-sheet .overview-value{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:24px;margin:0;padding:2px;border:0;border-radius:3px;background:transparent;color:inherit;font:inherit;line-height:1.35;text-align:left;text-decoration:underline dotted;text-underline-offset:3px;white-space:pre-line;overflow-wrap:anywhere;cursor:pointer}
.event-overview-sheet .overview-value:hover,.event-overview-sheet .overview-value:focus-visible{background:var(--surface-muted,#71869a25)}
.event-overview-sheet .event-overview-block thead th.overview-active-heading{width:clamp(160px,14vw,220px)}
.event-overview-sheet .overview-active-cell{box-shadow:inset 0 0 0 1px var(--accent,#527dac)}
.overview-cell-form{display:grid;gap:6px;padding:3px;margin:0;min-width:0;white-space:normal;font-size:12px}
.overview-cell-inputs{display:grid;align-content:start;gap:5px;min-width:0;max-height:min(48vh,350px);overflow:auto}
.overview-cell-form :is(label,fieldset,section,details,div){min-width:0;box-sizing:border-box}
.overview-cell-form label,.overview-cell-time{display:grid;gap:2px;font-size:11px}
.overview-cell-form [hidden]{display:none!important}
.overview-cell-form :is(input:not([type=checkbox]),select,textarea){display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:30px;margin:0;padding:3px 4px;font:inherit}
.overview-cell-form textarea{resize:vertical}
.overview-cell-form button{box-sizing:border-box;max-width:100%;min-width:0;min-height:27px;height:auto;padding:3px 6px;font:inherit;white-space:normal;overflow-wrap:anywhere}
.overview-cell-form .rehearsal-schedule{min-width:0;margin:0}
.overview-cell-form .rehearsal-schedule fieldset,.overview-cell-form details{padding:4px;margin:4px 0}
.overview-cell-form .rehearsal-hint{font-size:11px;margin:0 0 4px}
.overview-cell-form .rehearsal-schedule :is(.rehearsal-row,.rehearsal-boundary){grid-template-columns:minmax(0,1fr);gap:3px}
.overview-cell-form .rehearsal-toggle{display:flex;gap:4px}
.overview-cell-form details summary{cursor:pointer;overflow-wrap:anywhere}
.overview-cell-form details[open] label{margin:3px 0}
.overview-cell-form .staff-name-suggestions{position:static;width:100%;min-width:0;max-height:112px}
.overview-cell-actions{display:flex;flex-wrap:wrap;gap:4px}
.overview-cell-form [role=alert]:empty,.overview-draft-hint:empty{display:none}
.distribution-sheet{scrollbar-gutter:stable}
.distribution-sheet tr[data-assigned=true]+tr[data-assigned=false]>:is(th,td){border-top:2px solid var(--line-strong,currentColor)}
#projectsSection .distribution-sheet.distribution-focus-day{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
/* One line per person in the editable day. Keep the action alongside the assignment. */
#projectsSection .dispatch-day-matrix tbody :is(th,td){height:auto;padding:1px 3px;vertical-align:middle}
#projectsSection .dispatch-day-matrix .dispatch-slot{display:flex;align-items:center;gap:2px;min-width:0;min-height:1.45em}
#projectsSection .dispatch-day-matrix .distribution-day-assigned{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 3px;line-height:1.35}
#projectsSection .dispatch-day-matrix .distribution-day-assigned button{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0}
#projectsSection .dispatch-day-matrix .dispatch-slot :is([data-remove-person],[data-base-person][data-assigned=true]){flex:none;width:1.4em;min-height:1.45em;text-align:center;padding:0;line-height:1;color:var(--danger,#a1332a);font-weight:bold}
@media(pointer:coarse){#projectsSection .dispatch-day-matrix .dispatch-slot button{min-height:24px}#projectsSection .dispatch-day-matrix .dispatch-slot :is([data-remove-person],[data-base-person][data-assigned=true]){width:24px;min-height:24px}}
dialog.dispatch-overview[open]{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;margin:0;border:0;border-radius:0;padding:8px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:6px;overflow:hidden;background:var(--surface,#fff);color:var(--text,#192735)}
.dispatch-overview-bar{display:flex;gap:8px;align-items:center;justify-content:space-between}.dispatch-overview-bar .btn{flex:none}
.dispatch-overview-body{overflow:auto;min-height:0;min-width:0;line-height:1.22}
#projectsSection .dispatch-fit-matrix{border-collapse:collapse;table-layout:fixed;width:100%;min-width:0;font-size:inherit}
#projectsSection .dispatch-fit-matrix :is(th,td){position:static;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:inherit;line-height:1.18;padding:1px 3px;height:auto;border:1px solid var(--line,#c9d2da);text-align:left}
#projectsSection .dispatch-fit-matrix thead th{vertical-align:top}
#projectsSection .dispatch-fit-matrix thead th:nth-child(1){width:6em}
#projectsSection .dispatch-fit-matrix thead th:nth-child(2){width:13em}
.dispatch-fit-matrix small,.dispatch-fit-groups small{display:block;font-size:.9em}
.dispatch-fit-matrix :is(td,th)[class*="tone-"],.dispatch-fit-groups section[class*="tone-"]{background:var(--event-bg);color:var(--event-text)}
html[data-theme=dark] .dispatch-overview [class*="tone-"]{background:color-mix(in srgb,var(--event-border) 20%,#181d23);color:#edf2ef}
.dispatch-fit-groups{column-width:17em;column-gap:8px}
.dispatch-fit-groups section{display:inline-block;box-sizing:border-box;width:100%;padding:.35em .5em;margin:0 0 6px;border:1px solid var(--event-border,var(--line,#c9d2da));border-radius:6px;overflow-wrap:anywhere}
.dispatch-fit-groups p{margin:.22em 0 0}.dispatch-fit-groups span{display:inline-block;max-width:100%}
@media(max-width:560px){.dispatch-overview-bar .btn{flex-shrink:1;padding:5px 7px;font-size:13px}}
#projectsSection .distribution-sheet:has(.dispatch-period-matrix){max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
#projectsSection .dispatch-period-matrix :is(th,td){padding:1px 3px;vertical-align:middle}
#projectsSection .dispatch-period-matrix .period-empty-day{width:5em}
#projectsSection .dispatch-period-matrix .period-quiet-day{width:8em}
#projectsSection .dispatch-period-matrix .distribution-date-button{padding:3px}
#projectsSection .dispatch-period-matrix .distribution-date-button small{display:inline}
.period-slot{display:flex;align-items:center;gap:3px;min-width:0}
.period-slot-actions{display:grid;flex:none;align-content:center}
#projectsSection .dispatch-period-matrix .distribution-employee{font-weight:500}
#projectsSection .dispatch-period-matrix tbody .distribution-cell{padding:2px 3px}
#projectsSection .dispatch-period-matrix .period-slot .day-assignment{flex:1 1 0;min-width:0;margin:0;overflow:hidden;padding:3px 6px;border-radius:5px;font-family:inherit;font-weight:400;line-height:1.14}
#projectsSection .dispatch-period-matrix .period-slot :is(.distribution-add,.distribution-remove){flex:none;width:1.2em;min-height:1.25em;padding:0;text-align:center;line-height:1}
#projectsSection .dispatch-period-matrix .period-slot .distribution-remove{color:var(--danger,#a1332a)}
.period-slot+.period-slot{margin-top:3px}
#projectsSection .day-assignment .period-card-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:1px .4em}
#projectsSection .day-assignment .period-card-title{flex:1 1 5ch;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font:inherit;font-weight:400;line-height:1.2}
#projectsSection .day-assignment :is(.period-card-time,.period-card-clock){display:inline-flex;flex:none;margin-left:auto;align-self:flex-start;align-items:center;justify-content:flex-end;white-space:nowrap;font:inherit;font-size:max(12px,.9em);font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums}
.period-card-clock svg{align-self:center;width:1em;height:1em;margin-top:.13em}
#projectsSection .day-assignment .period-card-meta{display:block;margin-top:2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit;font-size:max(12px,.94em);line-height:1.2;font-weight:400}
@media(pointer:coarse){#projectsSection .dispatch-period-matrix .period-slot :is(.distribution-add,.distribution-remove){min-width:24px;min-height:24px}}

/* Tabs and roster controls share the space above the table. Keep filters outside the tablist. */
.projects-toolbar .roster-tools[hidden]{display:none}
#projectsSection .projects-toolbar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;padding:0 0 10px;margin-bottom:12px;border-bottom:1px solid var(--line,#ccd3db);min-width:0}
#projectsSection .projects-toolbar .project-inner-tabs{align-items:center;gap:6px;padding:0 12px 0 0;margin:0;border:0;border-inline-end:1px solid var(--line,#ccd3db)}
#projectsSection .projects-toolbar [role=tab]{box-sizing:border-box;font:inherit;font-size:13px;font-weight:550;min-height:36px;padding:6px 10px;line-height:1.25}
.roster-tools:not([hidden]){display:contents}
#projectsSection .roster-tools>p,#projectsSection .roster-tools>.distribution-height-controls{align-self:center}
#projectsSection .roster-tools>.production-filters{min-height:36px}
#projectsSection .roster-tools :is(.production-filters,.distribution-height-controls){display:flex;align-items:center;flex-wrap:wrap;max-width:100%;gap:5px 8px;margin:0}
#projectsSection .roster-tools label{display:inline-flex;align-items:center;gap:4px;width:auto;margin:0;white-space:nowrap;font-size:13px}
#projectsSection .roster-tools .production-filters :is(input,select){width:auto;min-width:0;height:32px;min-height:32px;margin:0;padding:3px 6px;font-size:13px;box-sizing:border-box}
#projectsSection .roster-tools .production-filters [data-from],#projectsSection .roster-tools .production-filters [data-to]{width:9.7em}
#projectsSection .roster-tools .production-filters [data-search]{width:clamp(14em,14vw,19em)}
#projectsSection .roster-tools .btn{min-height:32px;margin:0;padding:4px 9px;font-size:13px}
#projectsSection .roster-tools [data-status]{margin:0;font-size:12px}
#projectsSection .roster-tools [data-status]:empty{display:none}
@media(max-width:700px){
 #projectsSection .projects-toolbar .project-inner-tabs{width:100%;padding:0;border:0}
 #projectsSection .roster-tools .production-filters{width:100%}
 #projectsSection .roster-tools .production-filters [data-search]{width:12em;flex:1 1 12em}
}

.absence-assign{margin:12px 0 20px}.absence-assign>summary{width:fit-content;cursor:pointer}
.absence-assign-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px;padding:16px;margin-top:12px;border:1px solid var(--form-edge);border-radius:12px;background:var(--form-panel-alt);font-size:16px}
.absence-assign-form label{display:grid;gap:6px;min-width:0}.absence-assign-form :is(input,select,textarea){width:100%;min-width:0;font-size:16px;box-sizing:border-box}
.absence-note,.absence-form-actions,.absence-assign-form [role=status]{grid-column:1/-1}.absence-form-actions{display:flex;gap:12px;flex-wrap:wrap}
.distribution-day-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#distributionInnerPanel{position:relative}
#distributionInnerPanel[aria-busy="true"]::before{content:"Обновляем распределение…";position:absolute;inset:8px 12px auto auto;z-index:6;padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-solid);color:var(--text);font-size:13px;pointer-events:none}
#projectsSection #distributionInnerTab[aria-busy="true"]{box-shadow:inset 0 -2px var(--accent)}
.dispatch-day-matrix .distribution-column-heading{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:start;gap:2px}
.dispatch-day-matrix .distribution-column-heading>form{grid-column:1/-1;min-width:0}
.dispatch-day-matrix .distribution-column-heading>:is([data-column-time],[data-base-time],strong){min-width:0;padding:3px 0;white-space:normal;overflow-wrap:anywhere}
.dispatch-day-matrix .distribution-hide-column{grid-column:2;grid-row:1;box-sizing:border-box;width:28px;min-width:28px;height:28px;min-height:28px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:inherit;font:20px/1 Arial,sans-serif;box-shadow:none;cursor:pointer}
.dispatch-day-matrix .distribution-hide-column:hover{background:#80808020;border-color:currentColor}
.dispatch-day-matrix .distribution-hide-column:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.distribution-day-tools [data-show-hidden-columns]:disabled{opacity:.5;cursor:default}
.base-time-dialog{box-sizing:border-box;width:min(360px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:20px;border:1px solid var(--line,#c9d2da);border-radius:16px;background:var(--surface-solid,#fff);color:var(--text,#20252d);font:16px/1.4 Arial,sans-serif}
.base-time-dialog::backdrop{background:#0006}
.base-time-dialog .base-time-form{display:grid;gap:14px;margin:0;font-size:16px}
.base-time-dialog :is(h3,p){margin:0;font:inherit}.base-time-dialog h3{font-size:18px;font-weight:600}.base-time-dialog p{font-size:14px;color:var(--muted,#687182)}
.base-time-dialog label{display:grid;gap:6px;min-width:0}
.base-time-dialog input{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px;padding:10px}
.base-time-dialog .base-time-actions{display:flex;justify-content:flex-end;gap:10px}
.base-time-dialog button{font-size:14px;min-height:40px}
.base-time-dialog [role=alert]{font-size:14px;color:var(--danger,#a73121)}

html[data-theme="dark"] dialog.base-time-dialog{background:var(--surface-solid,#161b22)!important}

#projectsSection .production-time>span:last-child>.field-explanation{grid-row:2}

/* The equipment table scrolls locally; its intrinsic width must not size the whole editor. */
#projectsSection .production-editor{grid-template-columns:minmax(0,1fr)}
#projectsSection .production-editor>*,#projectsSection .equipment-table-wrap{min-width:0;max-width:100%;box-sizing:border-box}
#projectsSection :is(.project-plan-meta,.production-grid,.task-staff-filters)>*{min-width:0}
#projectsSection :is(.staff-card-grid>div,.staff-choice-card,.staff-assigned-list,.staff-assigned-person){min-width:0;max-width:100%;overflow-wrap:anywhere}
#projectsSection .staff-assigned-person{white-space:normal;text-align:left}
@media(max-width:600px){
 #projectsSection .staff-card-size-controls label{flex-wrap:wrap;min-width:0;max-width:100%}
 #projectsSection .staff-card-size-controls input[type=range]{max-width:100%}
 #projectsSection .production-editor .production-grid:not(.production-stage-dates){grid-template-columns:minmax(0,1fr)}
}

/* Stage boundaries stay paired when the form wraps. */
#projectsSection .production-stage-dates{grid-template-columns:minmax(0,1fr)}
@media(min-width:601px){#projectsSection .production-stage-dates{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){#projectsSection .production-stage-dates{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1800px){#projectsSection .production-stage-dates{grid-template-columns:repeat(6,minmax(0,1fr))}}

.absence-request .absence-request-info{flex:1 1 280px;min-width:0;overflow-wrap:anywhere}
.absence-request .absence-request-reason{margin:6px 0;white-space:pre-wrap}
.absence-request .absence-request-decision{margin:6px 0;font-size:.9em}

/* Only the task work-type picker: system dropdown plus an optional custom task. */
#projectsSection .task-work-type-field{display:grid;align-content:start;gap:8px;min-width:0}
#projectsSection .task-work-type-field :is(select,input){width:100%;min-width:0;max-width:100%;min-height:44px;font-size:16px!important;box-sizing:border-box}
#projectsSection .task-work-type-field input[hidden]{display:none!important}

/* A task title sits inside its panel rather than cutting through the border. */
#projectsSection .production-task>legend{float:left;width:100%;box-sizing:border-box;margin:0 0 10px;padding:0;font-weight:650;line-height:1.4}
#projectsSection .production-task>legend+*{clear:both}
#projectsSection .production-task>.btn{margin-top:8px}

/* Keep one-finger form scrolling vertical. Do not put this on the editor itself:
   its equipment tables must still accept horizontal swipes. Pinch zoom stays available. */
@media (max-width:900px) and (pointer:coarse){
 #projectsSection #eventsInnerPanel{min-width:0;max-width:100%;overflow-x:clip}
 #projectsSection #eventsInnerPanel :is(.production-task,.staff-card-grid,.project-plan-meta,.production-stages,.project-edit-footer,#projectCostEditor){touch-action:pan-y pinch-zoom}
 #projectsSection #eventsInnerPanel :is(.equipment-table-wrap,.table-wrap){overscroll-behavior-x:contain}
}

.distribution-column-heading .distribution-time-pending{display:inline-flex;align-items:center;vertical-align:middle}.distribution-time-pending svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
