:root{--ink:#17202a;--muted:#6d7785;--line:#dfe4ea;--panel:#fff;--bg:#f4f6f8;--navy:#18314f;--navy-2:#244969;--amber:#f4b740;--amber-bg:#fff6df;--blue-bg:#eef5fa;--green:#247a55;--shadow:0 12px 36px rgba(24,49,79,.10);--scale:1;--row-h:58px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink);font-family:Inter,Segoe UI,Arial,sans-serif}button,input{font:inherit}.appbar{height:76px;padding:0 28px;display:flex;align-items:center;gap:32px;background:var(--navy);color:#fff;position:sticky;top:0;z-index:50;box-shadow:0 5px 20px rgba(10,26,43,.18)}.brand{display:flex;align-items:center;gap:11px;min-width:210px}.brand-mark{width:38px;height:38px;border-radius:11px;background:var(--amber);color:var(--navy);display:grid;place-items:center;font-weight:900;font-size:21px}.brand b,.brand small{display:block}.brand b{font-size:17px}.brand small{opacity:.67;margin-top:2px}.period{display:flex;align-items:center;gap:10px;margin:auto}.period div{text-align:center}.period small,.period strong{display:block}.period small{font-size:11px;opacity:.6;text-transform:uppercase;letter-spacing:.08em}.period strong{margin-top:3px;font-size:15px}.toolbar{display:flex;gap:8px;align-items:center}.search{height:40px;width:270px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.09);border-radius:10px}.search input{border:0;outline:0;background:transparent;color:#fff;width:100%;font-size:13px}.search input::placeholder{color:rgba(255,255,255,.57)}.button,.icon-btn,.chip{border:0;cursor:pointer}.button{height:40px;padding:0 16px;border-radius:10px;font-weight:650}.button.primary{background:var(--amber);color:#162c45}.button.secondary{background:rgba(255,255,255,.1);color:#fff}.icon-btn{width:36px;height:36px;border-radius:9px;background:rgba(255,255,255,.09);color:inherit;font-size:20px}.icon-btn:hover,.button.secondary:hover{background:rgba(255,255,255,.18)}main{padding:22px 28px 34px}.summary{display:grid;grid-template-columns:repeat(3,190px) 1fr;gap:12px;margin-bottom:18px}.summary>div{min-height:70px;padding:13px 16px;border:1px solid #e4e8ed;border-radius:13px;background:#fff}.summary span{display:block;color:var(--muted);font-size:12px}.summary strong{display:block;margin-top:5px;font-size:24px;line-height:1}.summary .legend{display:flex;align-items:center;justify-content:flex-end;gap:24px}.summary .legend span{display:flex;align-items:center;gap:8px;color:#4e5968}.dot{width:10px;height:10px;border-radius:3px;display:inline-block}.dot.request{background:var(--amber)}.dot.role{background:#dceaf4}.sheet-card{background:var(--panel);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.sheet-head{height:76px;padding:0 18px 0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}h1{margin:0;font-size:20px}.sheet-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.view-tools{display:flex;align-items:center;gap:7px}.view-tools .icon-btn{background:#edf1f4;color:var(--navy)}.view-tools output{width:46px;text-align:center;color:var(--muted);font-size:12px}.chip{height:34px;border-radius:9px;padding:0 12px;background:#f1f3f5;color:#5f6975;font-size:12px}.chip.active{background:#dce8f1;color:var(--navy);font-weight:650}.table-wrap{height:calc(100vh - 298px);min-height:430px;overflow:auto;position:relative;background:#fff}.table-wrap::-webkit-scrollbar{height:13px;width:13px}.table-wrap::-webkit-scrollbar-thumb{background:#b8c1cb;border:3px solid #eef1f3;border-radius:10px}.table-wrap::-webkit-scrollbar-track{background:#eef1f3}table{border-collapse:separate;border-spacing:0;min-width:2050px;width:max-content;font-size:calc(12px * var(--scale));line-height:1.3;transform-origin:top left}th,td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px 9px;background:#fff;vertical-align:middle}thead th{position:sticky;top:0;z-index:20;height:66px;background:var(--navy-2);color:#fff;text-align:left;font-size:11px;font-weight:650;letter-spacing:.01em}th .date{display:block;font-size:12px}th .day{display:block;margin-top:4px;color:#b9cadd;text-transform:uppercase;font-size:10px}.sticky-1{position:sticky!important;left:0;z-index:15}.sticky-2{position:sticky!important;left:240px;z-index:15}.sticky-3{position:sticky!important;left:440px;z-index:15;box-shadow:6px 0 12px rgba(28,48,68,.06)}thead .sticky-1,thead .sticky-2,thead .sticky-3{z-index:30;background:var(--navy-2)}tbody tr{height:var(--row-h)}tbody td{background:var(--blue-bg)}tbody tr.request-row td{background:var(--amber-bg)}tbody tr.request-row td.sticky-1,tbody tr.request-row td.sticky-2,tbody tr.request-row td.sticky-3{background:#ffe5a0}tbody td.sticky-1,tbody td.sticky-2,tbody td.sticky-3{background:#e5eff6}.cell-text{width:100%;min-height:34px;border:1px solid transparent;background:transparent;border-radius:6px;padding:5px 6px;color:inherit;resize:none;overflow:hidden;outline:none}.cell-text:hover,.cell-text:focus{background:#fff;border-color:#9eb8ca}.num-input{width:62px;height:34px;text-align:center;border:1px solid transparent;border-radius:7px;background:transparent;outline:none;font-weight:650;color:#253747}.num-input:hover,.num-input:focus{background:#fff;border-color:#86a9c1;box-shadow:0 0 0 3px rgba(43,111,151,.09)}.request-row .num-input{color:#5b4300}.request-row .cell-text{font-weight:650}.col-site{width:240px;min-width:240px}.col-role{width:200px;min-width:200px}.col-work{width:250px;min-width:250px}.col-code{width:125px;min-width:125px}.col-day{width:78px;min-width:78px;text-align:center}.col-summary{width:105px;min-width:105px;text-align:right}.col-note{width:310px;min-width:310px}.computed{font-variant-numeric:tabular-nums;font-weight:700;background:#f7f8fa!important;text-align:right}tfoot td{position:sticky;bottom:0;z-index:18;background:#eef1f4;font-weight:800;height:46px}tfoot .sticky-1{z-index:25;background:#eef1f4}.scroll-hint{height:34px;padding:9px 18px;color:#7c8794;font-size:11px;border-top:1px solid var(--line)}tr.is-hidden{display:none}.toast{position:fixed;right:24px;bottom:24px;padding:13px 17px;background:#173d30;color:#fff;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.2);opacity:0;transform:translateY(12px);pointer-events:none;transition:.22s}.toast.show{opacity:1;transform:none}
.section-row td{border-top:2px solid #d59b1f}.section-row td.sticky-1{background:#f4b740!important}.section-name{display:flex;flex-direction:column;gap:5px;font-weight:800;font-size:13px;line-height:1.25}.section-name small{width:max-content;padding:3px 7px;border-radius:5px;background:rgba(24,49,79,.12);color:#5d4309;font-size:9px;text-transform:uppercase;letter-spacing:.06em}.section-empty{display:block;width:20px;height:100%;margin-left:8px;border-left:2px solid #bed0dc}.operation-cell{padding-left:23px!important;position:relative}.operation-cell:before{content:'↳';position:absolute;left:5px;top:7px;color:#8ca2b2;font-weight:700}.standalone-row td{border-top:2px solid #9fb5c4}.standalone-row td.sticky-1{background:#dceaf4!important}.operation-row:hover td{background:#f8fbfd}.operation-row:hover td.sticky-1,.operation-row:hover td.sticky-2,.operation-row:hover td.sticky-3{background:#edf5fa}
body.compact{--row-h:42px}body.compact th,body.compact td{padding-top:4px;padding-bottom:4px}body.compact .cell-text,body.compact .num-input{min-height:29px;height:29px}
@media(max-width:1100px){.appbar{padding:0 14px}.brand{min-width:auto}.brand div{display:none}.search{width:210px}.summary{grid-template-columns:repeat(3,1fr)}.summary .legend{display:none}main{padding:14px}.table-wrap{height:calc(100vh - 270px)}}@media(max-width:720px){.appbar{height:auto;min-height:68px;flex-wrap:wrap;padding:10px 12px;gap:8px}.period{order:3;width:100%}.toolbar{margin-left:auto}.search{display:none}.button.secondary{display:none}main{padding:10px}.summary{display:none}.sheet-head{height:auto;padding:13px;align-items:flex-start;gap:10px}.sheet-head p{display:none}.view-tools .chip{display:none}.table-wrap{height:calc(100vh - 205px)}.sticky-2,.sticky-3{position:static!important;box-shadow:none}.col-site{width:190px;min-width:190px}}

/* Иерархический вид: участок занимает объединённую строку, операции идут без колонки участка. */
table{min-width:1910px}.sticky-2{left:220px}.sticky-3{left:480px}.col-role{width:220px;min-width:220px}.col-work{width:260px;min-width:260px}.col-code{width:130px;min-width:130px}.section-title{width:610px;min-width:610px;padding-left:16px}.section-row .section-title,.standalone-row .section-title{background:#f4b740!important}.operation-row .operation-cell{padding-left:23px!important}
@media(max-width:720px){.col-role{width:190px;min-width:190px}.section-title{min-width:580px}}

.section-actions{min-height:56px;padding:9px 14px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:#f8fafb}.action-group{display:flex;gap:7px}.collapse-actions{margin-left:auto}.action-button{height:36px;padding:0 13px;border:1px solid #d5dce3;border-radius:9px;background:#fff;color:#354353;font-size:12px;font-weight:650;cursor:pointer;transition:.15s}.action-button:hover:not(:disabled){border-color:#99afbf;background:#f0f5f8}.action-button.primary-action{border-color:#c68d17;background:var(--amber);color:#26394e}.action-button.danger-action{color:#a43c3c}.action-button:disabled{opacity:.42;cursor:not-allowed}.selection-hint{overflow:hidden;max-width:330px;color:#788491;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.table-wrap{height:calc(100vh - 354px)}.section-layout{display:flex;align-items:center;gap:11px}.section-layout .section-name{min-width:0;flex:1}.section-layout .section-name>span{overflow:hidden;text-overflow:ellipsis}.toggle-section{width:30px;height:30px;flex:0 0 30px;border:1px solid rgba(53,72,91,.22);border-radius:8px;background:rgba(255,255,255,.58);color:#263b50;font-size:20px;font-weight:700;line-height:1;cursor:pointer}.toggle-section:hover{background:#fff}.row-add{height:30px;flex:0 0 auto;padding:0 10px;border:1px solid rgba(53,72,91,.22);border-radius:8px;background:#fff;color:#325472;font-size:10px;font-weight:700;cursor:pointer}.row-add:hover{border-color:#648ca8;background:#f7fbfd}.operation-layout{display:flex;align-items:center;gap:5px}.operation-layout .cell-text{flex:1;min-width:0}.delete-operation{width:27px;height:27px;flex:0 0 27px;border:0;border-radius:7px;background:transparent;color:#9b5656;font-size:19px;cursor:pointer;opacity:.38}.operation-row:hover .delete-operation,.delete-operation:focus{opacity:1}.delete-operation:hover{background:#ffe7e7;color:#a32121}.collapsed-operation{display:none}.selected-section td{box-shadow:inset 0 2px #326d96,inset 0 -2px #326d96}.selected-section .section-title{box-shadow:inset 3px 0 #326d96,inset 0 2px #326d96,inset 0 -2px #326d96}.section-row{cursor:pointer}
@media(max-width:1100px){.table-wrap{height:calc(100vh - 326px)}.selection-hint{display:none}}@media(max-width:720px){.section-actions{overflow-x:auto;flex-wrap:nowrap}.collapse-actions{margin-left:0}.action-button{white-space:nowrap}.table-wrap{height:calc(100vh - 261px)}.row-add{font-size:0}.row-add:after{content:'＋';font-size:16px}}

/* Спокойная промышленная тема: один акцент и явная иерархия строк. */
:root{--ink:#17212b;--muted:#64717d;--line:#d9e0e6;--panel:#fff;--bg:#f3f5f7;--navy:#243746;--navy-2:#243746;--amber:#287d8e;--amber-bg:#e7eef2;--blue-bg:#fff;--green:#277a5b;--shadow:0 8px 28px rgba(25,43,56,.08);--row-h:48px}
body{font-size:13px}.appbar{height:64px;background:#243746;box-shadow:0 2px 12px rgba(25,43,56,.14)}.brand-mark{width:34px;height:34px;border-radius:9px;background:#d8ecef;color:#235f6c;font-size:18px}.brand b{font-weight:600}.button.primary{background:#287d8e;color:#fff}.button.primary:hover{background:#206a79}.button.secondary{background:rgba(255,255,255,.08)}main{padding-top:18px}.summary{margin-bottom:14px}.summary>div{min-height:62px;padding:11px 15px;border-color:#e1e6ea;border-radius:11px;box-shadow:none}.summary strong{margin-top:5px;font-size:20px;font-weight:600}.sheet-card{border:1px solid #e0e5e9;border-radius:12px;box-shadow:var(--shadow)}.sheet-head{height:66px}.sheet-head h1{font-size:18px;font-weight:600}.chip{background:#edf1f3;color:#53616d}.chip.active{background:#e8f3f5;color:#206a79}.view-tools .icon-btn{background:#edf1f3;color:#344b5c}.section-actions{min-height:52px;padding:8px 14px;background:#f8fafb}.action-button{height:34px;border-color:#d9e0e6;border-radius:8px;background:#fff;color:#43525e;font-weight:500}.action-button:hover:not(:disabled){border-color:#9fb1bd;background:#f4f8fa}.action-button.primary-action{border-color:#287d8e;background:#287d8e;color:#fff}.action-button.primary-action:hover:not(:disabled){border-color:#206a79;background:#206a79}.action-button.danger-action{color:#a84040}.action-button.danger-action:hover:not(:disabled){border-color:#e6bcbc;background:#fcecec}.selection-hint{color:#64717d}.table-wrap{height:calc(100vh - 326px)}table{font-size:calc(12.5px * var(--scale))}thead th{height:56px;background:#243746;font-weight:600;color:#f7fafb}th .day{color:#b9c7d0}thead .sticky-1,thead .sticky-2,thead .sticky-3{background:#243746}tbody td{background:#fff;color:#26343f;font-weight:400}tbody td.sticky-1,tbody td.sticky-2,tbody td.sticky-3{background:#fff}.operation-row:hover td,.operation-row:hover td.sticky-1,.operation-row:hover td.sticky-2,.operation-row:hover td.sticky-3{background:#f4f8fa}.cell-text,.num-input{font-weight:400;color:#26343f}.request-row .num-input,.request-row .cell-text{font-weight:400;color:#26343f}.computed{background:#f7f9fa!important;font-weight:400;color:#40505c}.cell-text:hover,.cell-text:focus,.num-input:hover,.num-input:focus{background:#fff;border-color:#3b8fa0;box-shadow:0 0 0 2px rgba(59,143,160,.16)}.section-row td,.standalone-row td{border-top:1px solid #bbc6cf;background:#e7eef2!important}.section-row td.sticky-1,.standalone-row td.sticky-1,.section-row .section-title,.standalone-row .section-title{background:#e7eef2!important}.section-row:hover td,.standalone-row:hover td{background:#dde8ed!important}.section-name{font-size:13px;font-weight:700;color:#1e3542}.section-name small{display:none}.section-title{padding-left:12px}.section-layout{gap:9px}.toggle-section{width:28px;height:28px;flex-basis:28px;border-color:#bbcbd3;border-radius:7px;background:#fff;color:#287d8e;font-size:18px}.toggle-section:hover{border-color:#287d8e;background:#e8f3f5}.toggle-section:focus-visible,.row-add:focus-visible,.action-button:focus-visible{outline:2px solid #3b8fa0;outline-offset:2px}.row-add{height:28px;border-color:#9fc6cd;border-radius:7px;color:#206a79;font-weight:500}.row-add:hover{border-color:#287d8e;background:#e8f3f5}.operation-cell{font-weight:400}.operation-cell:before{color:#9daeb8}.delete-operation{opacity:.65;color:#9b5555}.delete-operation:hover{background:#fcecec;color:#b54747}.selected-section td{box-shadow:none!important}.selected-section .section-title{box-shadow:inset 3px 0 #287d8e!important}.col-code{box-shadow:6px 0 10px rgba(31,51,65,.05)}tfoot td{height:42px;border-top:1px solid #bbc6cf;background:#eef2f4;font-weight:400;color:#33434f}.scroll-hint{color:#75828d;background:#fbfcfc}body.compact{--row-h:38px}body.compact .cell-text,body.compact .num-input{min-height:28px;height:28px}
@media(max-width:1100px){.table-wrap{height:calc(100vh - 298px)}}@media(max-width:720px){.appbar{min-height:62px}.table-wrap{height:calc(100vh - 249px)}}

/* Компактная компоновка без сводной полосы. */
main{padding-top:16px}.collapse-actions{margin-left:0}.selection-hint{margin-left:4px}.table-wrap{height:calc(100vh - 248px)}.search{padding-right:6px}.clear-search{width:28px;height:28px;display:grid;place-items:center;flex:0 0 28px;border:0;border-radius:7px;background:transparent;color:rgba(255,255,255,.68);font-size:19px;line-height:1;cursor:pointer}.clear-search:hover,.clear-search:focus-visible{background:rgba(255,255,255,.13);color:#fff;outline:none}.section-row td,.standalone-row td,.section-row .num-input,.standalone-row .num-input,.section-row .computed,.standalone-row .computed,.section-row .cell-text,.standalone-row .cell-text{font-weight:700!important}
@media(max-width:1100px){.table-wrap{height:calc(100vh - 234px)}}@media(max-width:720px){.table-wrap{height:calc(100vh - 249px)}}
.search input::-webkit-search-cancel-button{display:none}
.cell-select{width:100%;height:34px;border:1px solid transparent;border-radius:7px;background:transparent;color:#26343f;padding:0 28px 0 7px;font:400 12.5px/1.2 Inter,Segoe UI,Arial,sans-serif;outline:none;cursor:pointer}.cell-select:hover,.cell-select:focus{background:#fff;border-color:#3b8fa0;box-shadow:0 0 0 2px rgba(59,143,160,.16)}.section-name .area-select{height:36px;font-weight:700;font-size:13px;color:#1e3542}.operation-layout .operation-select{flex:1;min-width:0}.work-type[readonly]{color:#52616c;background:#f7f9fa;cursor:default}.work-type[readonly]:focus{border-color:#d9e0e6;box-shadow:none}.section-row .cell-select,.standalone-row .cell-select{font-weight:700!important}body.compact .cell-select{height:28px}
.period-switch{display:flex;padding:3px;border-radius:9px;background:#edf1f3}.period-switch .chip{height:28px;background:transparent}.period-switch .chip.active{background:#fff;color:#206a79;box-shadow:0 1px 4px rgba(31,51,65,.12)}.num-cell{min-width:58px;display:grid;place-items:center}.num-display,.num-editor{width:58px;height:32px;border:1px solid transparent;border-radius:7px;text-align:center;font:400 12.5px/1 Inter,Segoe UI,Arial,sans-serif;color:#26343f}.num-display{background:transparent;cursor:text}.num-display:hover{background:#f4f8fa;border-color:#c5d3da}.num-editor{background:#fff;border-color:#3b8fa0;outline:0;box-shadow:0 0 0 2px rgba(59,143,160,.16)}.num-editor[hidden],.num-display[hidden]{display:none}.section-number,.section-service{font-variant-numeric:tabular-nums}.collapsed-operation.search-visible{display:table-row}body.compact .num-display,body.compact .num-editor{height:28px}.section-row .num-display,.section-row .num-editor{font-weight:700!important}
@media(max-width:900px){.view-tools [data-density]{display:none}.period-switch .chip{display:block!important}}

/* Компактные числовые колонки. */
.col-day{width:56px;min-width:56px;padding-left:4px;padding-right:4px}.num-cell{min-width:46px}.num-display,.num-editor{width:46px}.col-summary{width:88px;min-width:88px;padding-left:7px;padding-right:7px}thead .col-day{padding-left:3px;padding-right:3px;text-align:center}thead .col-day .date{font-size:11px}

/* Единое выравнивание и формат чисел. */
tbody .col-day,tfoot .col-day,tbody .col-summary,tfoot td:nth-last-child(-n+4){text-align:right;font-variant-numeric:tabular-nums}.num-cell{justify-items:end}.num-display,.num-editor{text-align:right;padding-left:3px;padding-right:7px}.section-number,.section-service,.computed{font-variant-numeric:tabular-nums;text-align:right}thead .col-day,thead .col-summary{text-align:center}

/* Реальная ширина таблицы без лишней горизонтальной области. */
table{min-width:0!important;width:max-content;table-layout:fixed}.table-wrap{overscroll-behavior-x:contain;scrollbar-gutter:stable}

/* Одинаковая правая линия чисел в участках и операциях. */
.section-row .col-day{padding-right:11px}.section-row .col-summary:not(.computed){padding-right:14px}
tfoot .col-day{padding-right:11px}tfoot td:nth-last-child(2){padding-right:14px;text-align:right}

/* Таблица без колонки кодировки. */
.col-work{width:390px;min-width:390px}.sticky-2{left:220px;box-shadow:7px 0 12px rgba(31,51,65,.06)}.section-title{width:610px;min-width:610px}
@media(max-width:720px){.col-work{width:340px;min-width:340px}.section-title{min-width:530px}}

.table-wrap{height:calc(100vh - 214px)}
@media(max-width:1100px){.table-wrap{height:calc(100vh - 200px)}}@media(max-width:720px){.table-wrap{height:calc(100vh - 215px)}}

/* Workflow MVP */
[hidden]{display:none!important}.login-screen{position:fixed;inset:0;z-index:100;background:rgba(23,33,43,.58);display:grid;place-items:center;padding:20px;backdrop-filter:blur(5px)}.login-card{width:min(390px,100%);background:#fff;border-radius:16px;padding:30px;box-shadow:0 24px 70px rgba(20,34,45,.25);display:grid;gap:16px}.login-card .brand-mark{width:42px;height:42px}.login-card h1{font-size:24px;margin:0}.login-card p,.login-card small{margin:0;color:#64717d}.login-card label{display:grid;gap:7px;color:#475764}.login-card select{height:42px;border:1px solid #bbc6cf;border-radius:8px;padding:0 11px;background:#fff;color:#17212b}.user-badge{padding:8px 12px;border-radius:8px;background:#e8f3f5;color:#206a79;font-weight:600}.workflow-bar{position:sticky;top:64px;z-index:12;display:flex;align-items:center;gap:20px;min-height:54px;padding:8px 14px;background:#f8fafb;border-top:1px solid #d9e0e6;border-bottom:1px solid #d9e0e6}.legend{margin-left:auto;display:flex;gap:16px;color:#64717d;font-size:12px}.legend span{display:flex;align-items:center;gap:6px}.dot{width:8px;height:8px;border-radius:50%;background:#bbc6cf}.dot.pending{background:#c98c28}.dot.approved{background:#277a5b}body[data-role=aut] .editor-only{display:none}.section-title{font-weight:700!important;color:#17212b;padding-left:18px!important}.operation-row td{font-weight:400}.demand-cell{position:relative;padding:0!important;text-align:right}.demand-button{width:100%;min-height:48px;padding:6px 10px;border:0;background:transparent;color:#17212b;text-align:right;font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.demand-button:disabled{opacity:1;cursor:default}.demand-button small{display:block;margin-top:3px;color:#8a6525;font-size:9px;white-space:nowrap}.has-proposal{background:#fff8e8!important}.has-proposal:after{content:'';position:absolute;right:0;top:0;border-top:8px solid #c98c28;border-left:8px solid transparent}.reviewable{box-shadow:none}.old-value{color:#7b8791;text-decoration:line-through}.arrow{padding:0 3px;color:#8a6525}.new-value{color:#206a79;font-weight:600}.matrix-dialog{width:min(520px,calc(100% - 28px));border:0;border-radius:14px;padding:0;box-shadow:0 22px 75px rgba(20,34,45,.25)}.matrix-dialog::backdrop{background:rgba(23,33,43,.48);backdrop-filter:blur(3px)}.matrix-dialog form{padding:22px}.dialog-head{display:flex;justify-content:space-between;gap:20px}.dialog-head h2{margin:0 0 4px;font-size:20px}.dialog-head p{margin:0;color:#64717d}.dialog-close{border:0;background:transparent;font-size:25px;color:#64717d;cursor:pointer}.matrix{width:100%;margin:20px 0;border-collapse:separate;border-spacing:6px}.matrix th{background:transparent!important;color:#64717d!important;text-align:center;font-size:12px}.matrix tbody th{text-align:left}.matrix td{border:0!important}.matrix input{width:100%;height:42px;border:1px solid #bbc6cf;border-radius:8px;padding:0 10px;text-align:right;font:600 16px Segoe UI,sans-serif}.matrix input:focus{outline:0;border-color:#3b8fa0;box-shadow:0 0 0 3px rgba(59,143,160,.16)}.old-matrix{padding:10px 12px;border-radius:8px;background:#f3f5f7;color:#64717d;font-size:12px}.dialog-comment{display:grid;gap:6px;margin-top:12px}.dialog-comment textarea{border:1px solid #bbc6cf;border-radius:8px;padding:8px;resize:vertical}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.button.danger{color:#b54747;border-color:#e0bcbc;background:#fff}.button.danger:hover{background:#fcecec}.table-wrap{max-height:calc(100vh - 205px)}#sheet tfoot td,#sheet .computed{text-align:right;padding-right:10px;font-variant-numeric:tabular-nums}
@media(max-width:800px){.workflow-bar{top:0;flex-wrap:wrap}.legend{display:none}.user-badge{display:none}.matrix-dialog form{padding:16px}}
.pair-fields{display:grid;gap:14px;margin-top:20px}.pair-fields label{display:grid;gap:6px;color:#475764;font-size:12px}.pair-fields select,.pair-fields textarea{width:100%;border:1px solid #bbc6cf;border-radius:8px;background:#fff;color:#17212b;padding:9px 11px;font:13px Segoe UI,sans-serif}.pair-fields select{height:42px}.pair-fields textarea{resize:none;background:#f7f9fa}.workflow-bar .collapse-actions{margin-left:0}.section-row{cursor:pointer}.section-row.selected-section td{box-shadow:inset 3px 0 #287d8e}.section-layout>span{flex:1}.collapsed-operation{display:none}.operation-layout>span{flex:1}.delete-operation{flex:none}
.section-row .section-total{font-weight:700;text-align:right;padding-right:10px;font-variant-numeric:tabular-nums;background:#e7eef2}.action-button:disabled{opacity:.45;cursor:not-allowed}
.section-layout span{display:flex;min-width:0;flex-direction:column;gap:2px}.section-layout span strong{font-weight:700;white-space:normal}.section-layout span small{font-size:10px;font-weight:400;color:#64717d}.cell-editor-shell{position:relative;display:flex;align-items:stretch;min-height:48px}.quick-value{flex:1;min-width:0;border:0;background:transparent;padding:6px 24px 6px 7px;color:#17212b;text-align:right;font:inherit;font-variant-numeric:tabular-nums;cursor:text}.quick-value:disabled{cursor:default;opacity:1}.detail-button{position:absolute;right:2px;top:3px;width:20px;height:20px;border:1px solid transparent;border-radius:5px;background:transparent;color:#6f7f8a;font-size:12px;line-height:17px;cursor:pointer;opacity:.72}.detail-button:hover,.detail-button:focus{background:#e8f3f5;border-color:#b9d6dc;color:#206a79;opacity:1;outline:0}.detail-summary{display:block;overflow:hidden;color:#287d8e;font-size:8px;line-height:11px;white-space:nowrap;text-overflow:ellipsis}.cell-status{display:block;color:#8a6525;font-size:8px;line-height:10px}.inline-number{width:100%;min-width:45px;height:38px;margin:5px 3px;padding:0 24px 0 5px;border:1px solid #3b8fa0;border-radius:6px;background:#fff;text-align:right;font:600 14px Segoe UI,sans-serif;box-shadow:0 0 0 2px rgba(59,143,160,.16);font-variant-numeric:tabular-nums}.demand-cell:has(.detail-summary:not(:empty)){background:#f2f8f9}.demand-cell:has(.detail-summary:not(:empty)) .detail-button{color:#287d8e;opacity:1}
.dot.approval{background:#4e9774}.demand-cell.status-submitted,.demand-cell.status-draft{background:#fff6d9!important}.demand-cell.status-hr_approved{background:#e9f5ed!important}.status-hr_approved .cell-status{color:#277a5b}.status-hr_approved:after{border-top-color:#4e9774}
.demand-cell.has-proposal:after{left:auto;right:0;border-top-width:9px;border-right:0;border-left:9px solid transparent}
.period-picker-wrap{position:relative;text-align:center}.period-picker-wrap>small{display:block}.period-label{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:2px;padding:2px 7px;border:0;border-radius:7px;background:transparent;color:#fff;cursor:pointer}.period-picker-wrap:hover .period-label,.period-picker-wrap:focus-within .period-label{background:rgba(255,255,255,.12);outline:0}.period-label strong{margin:0!important}.period-label span{font-size:10px;opacity:.7}.period-picker-input{position:absolute;z-index:2;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.period-dialog form{padding:22px}.date-period-panel{display:grid;grid-template-columns:1fr auto;align-items:end;gap:10px;margin-top:20px}.date-period-panel label,.month-period-panel label{display:grid;gap:7px;color:#475764;font-size:12px}.date-period-panel input,.month-period-panel input{height:42px;border:1px solid #bbc6cf;border-radius:8px;background:#fff;padding:0 10px;color:#17212b}.month-period-panel{margin-top:20px}.month-period-panel>label{max-width:150px}.month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.month-choice{height:42px;border:1px solid #d2dbe1;border-radius:8px;background:#fff;color:#344652;cursor:pointer}.month-choice:hover,.month-choice.active{border-color:#287d8e;background:#e8f3f5;color:#206a79}.period-dialog .button.primary{min-width:110px}@media(max-width:520px){.month-grid{grid-template-columns:repeat(2,1fr)}.date-period-panel{grid-template-columns:1fr}}
.bulk-approve{height:22px;padding:0 6px;border:1px solid #86b5bd;border-radius:5px;background:#fff;color:#206a79;font-size:9px;font-weight:600;line-height:20px;white-space:nowrap;cursor:pointer}.bulk-approve:hover{border-color:#287d8e;background:#e8f3f5}thead .bulk-approve{display:block;height:20px;margin:5px auto 0;padding:0 4px;border-color:#6e95a1;background:rgba(255,255,255,.1);color:#fff;font-size:8px;line-height:18px}.section-layout .bulk-approve,.operation-layout .bulk-approve{flex:0 0 auto}.operation-layout .bulk-approve{margin-left:auto}
.bulk-period-button{border-color:#277a5b;background:#277a5b;color:#fff;font-weight:600}.bulk-period-button:hover:not(:disabled){border-color:#1f654a;background:#1f654a}.bulk-approve{border-color:#79ad96;color:#277a5b}.bulk-approve:hover{border-color:#277a5b;background:#e9f5ed}.review-only-button.active{border-color:#287d8e;background:#e8f3f5;color:#206a79;box-shadow:inset 0 0 0 1px #287d8e}
.notification-button{white-space:nowrap;font-size:12px}.notification-button:disabled{cursor:default;opacity:.72}@media(max-width:900px){.notification-button{width:38px;padding:0;font-size:0}.notification-button:before{content:'🔔';font-size:16px}}
.toast{z-index:200}
.demand-matrix th:first-child{min-width:130px;text-align:left}.demand-matrix input{width:88px;text-align:right}.matrix-hint{margin:10px 0 0;color:#64717d;font-size:12px;line-height:1.4}
.demand-cell .detail-button,.demand-cell:has(.detail-summary:not(:empty)) .detail-button{opacity:0;pointer-events:none;transition:opacity .12s ease}.demand-cell:hover .detail-button,.demand-cell:focus-within .detail-button,.demand-cell:has(.detail-summary:not(:empty)):hover .detail-button,.demand-cell:has(.detail-summary:not(:empty)):focus-within .detail-button{opacity:.72;pointer-events:auto}.demand-cell .detail-button:hover,.demand-cell .detail-button:focus{opacity:1}
.demand-cell .detail-button{left:2px;right:auto}.demand-cell .quick-value{padding-left:24px;padding-right:10px}
.operation-row .computed{background:#edf2f4!important}.section-row .computed{background:#dde7ec!important}#sheet tfoot td{font-weight:700!important;padding-right:10px}#sheet tfoot .col-summary{background:#e1e8ec!important}
.workflow-bar{gap:8px}.workflow-bar .action-group{gap:4px}.workflow-bar .action-button{height:30px;padding:0 9px;border-radius:7px;font-size:11px}.workflow-period-switch{margin-left:auto;display:flex;padding:3px;border-radius:10px;background:#edf1f3}.workflow-period-switch .chip{height:30px}.workflow-bar .legend{margin-left:0}.table-wrap{height:calc(100vh - 182px);max-height:calc(100vh - 182px)}
body[data-period="day"] #sheet tbody .computed,body[data-period="day"] #sheet tfoot .col-summary{display:none}
.period-picker-wrap{position:relative}#quickDayPicker{display:none}body[data-period="day"] #quickDayPicker{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.workflow-bar{position:relative;top:auto;z-index:35;flex:0 0 auto}.table-wrap{position:relative;z-index:1}
.history-button{position:absolute;left:2px;top:25px;width:20px;height:20px;border:1px solid transparent;border-radius:5px;background:transparent;color:#6f7f8a;font-size:14px;line-height:17px;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease}.demand-cell:hover .history-button,.demand-cell:focus-within .history-button{opacity:.72;pointer-events:auto}.history-button:hover,.history-button:focus{border-color:#b9d6dc;background:#e8f3f5;color:#206a79;opacity:1;outline:0}.history-dialog{position:fixed;inset:0 0 0 auto;width:min(460px,calc(100% - 24px));max-width:none;height:100vh;max-height:none;margin:0;padding:0;border:0;border-radius:14px 0 0 14px;background:#f7f9fa;box-shadow:-18px 0 55px rgba(20,34,45,.2)}.history-dialog::backdrop{background:rgba(23,33,43,.32)}.history-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:16px;padding:22px;border-bottom:1px solid #d9e0e6;background:#fff}.history-head h2{margin:0 0 5px;font-size:20px}.history-head p{margin:0;color:#64717d;font-size:12px}.history-content{display:grid;gap:12px;padding:16px 20px 28px}.history-event{padding:14px;border:1px solid #d9e0e6;border-radius:10px;background:#fff}.history-event-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.history-event-head strong{color:#17212b}.history-event-head time{flex:none;color:#64717d;font-size:11px}.history-actor{margin-top:4px;color:#287d8e;font-size:12px}.history-event ul{display:grid;gap:6px;margin:12px 0 0;padding:10px 0 0;border-top:1px solid #edf1f3;list-style:none}.history-event li{display:flex;justify-content:space-between;gap:12px;color:#53616d;font-size:12px}.history-event li b{color:#26343f;font-weight:600;font-variant-numeric:tabular-nums}.history-event p{margin:10px 0 0;color:#53616d;font-size:12px}.decision-event{border-left:3px solid #287d8e}.history-empty{padding:28px 12px;color:#64717d;text-align:center}.history-empty.error{color:#b54747}
.section-value-button{width:100%;height:100%;min-height:42px;padding:6px 10px;border:0;background:transparent;color:inherit;text-align:right;font:inherit;font-weight:700;font-variant-numeric:tabular-nums;cursor:text}.section-value-button:hover,.section-value-button:focus-visible{background:rgba(255,255,255,.58);box-shadow:inset 0 0 0 1px #3b8fa0;outline:0}.section-inline-number{margin:3px!important;height:36px!important}.section-operation-fields{display:grid;gap:9px;max-height:55vh;margin-top:18px;overflow:auto}.section-operation-fields label{display:grid;grid-template-columns:minmax(0,1fr) 100px;align-items:center;gap:14px;padding:8px 10px;border:1px solid #e1e6ea;border-radius:9px;background:#f8fafb}.section-operation-fields label span{color:#33434f}.section-operation-fields input{width:100%;height:36px;border:1px solid #bbc6cf;border-radius:7px;padding:0 9px;text-align:right;font-variant-numeric:tabular-nums}.section-operation-fields input:focus{outline:0;border-color:#3b8fa0;box-shadow:0 0 0 2px rgba(59,143,160,.16)}
.section-row .section-edit-cell{padding:0!important}.section-row .section-edit-cell .section-value-button{padding-right:10px}
.login-card input{width:100%;height:42px;border:1px solid #bbc6cf;border-radius:8px;padding:0 11px;background:#fff;color:#17212b}.login-card input:focus{outline:0;border-color:#3b8fa0;box-shadow:0 0 0 2px rgba(59,143,160,.16)}
/* Расстановка сотрудников */
.staffing-button{position:absolute;left:24px;top:25px;width:20px;height:20px;border:0;border-radius:5px;background:transparent;color:var(--accent);opacity:0;cursor:pointer;font-size:12px}.demand-cell:hover .staffing-button,.staffing-button:focus{opacity:1;background:var(--accent-soft)}.staffing-count{display:block;margin-top:2px;font-size:9px;font-weight:400;white-space:nowrap;color:var(--text-muted)}.staffing-count.complete{color:var(--success)}.staffing-count.short{color:#9b6b16}.staffing-dialog{width:min(720px,calc(100vw - 24px));max-height:88vh;border:0;border-radius:14px;padding:0;box-shadow:0 24px 70px rgba(25,43,56,.24)}.staffing-dialog::backdrop{background:rgba(20,34,45,.38)}.staffing-head{display:flex;justify-content:space-between;gap:20px;padding:20px 22px 14px;border-bottom:1px solid var(--border)}.staffing-head h2{margin:0 0 4px;font-size:19px}.staffing-head p{margin:0;color:var(--text-muted)}.staffing-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:16px 22px}.staffing-summary div{padding:12px;background:var(--surface-subtle);border:1px solid var(--border);border-radius:10px}.staffing-summary span{display:block;color:var(--text-muted);font-size:11px}.staffing-summary strong{font-size:21px}.staffing-short{color:#a36d12}.staffing-complete{color:var(--success)}.staffing-add{display:grid;grid-template-columns:1fr 110px auto;gap:8px;padding:0 22px 14px}.staffing-add select{min-width:0;height:36px;border:1px solid var(--border-strong);border-radius:7px;background:#fff;padding:0 9px}.staffing-need-details{margin:0 22px 12px;padding:9px 11px;background:var(--accent-soft);border-radius:7px;color:var(--accent)}.staffing-list{padding:0 22px 22px;max-height:46vh;overflow:auto}.staffing-person{display:grid;grid-template-columns:minmax(0,1fr) 130px 30px;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--border)}.staffing-person strong,.staffing-person small{display:block}.staffing-person small{margin-top:3px;color:var(--text-muted)}.staffing-status{height:30px;border:1px solid var(--border);border-radius:6px;background:#fff}.staffing-remove{width:28px;height:28px;border:0;border-radius:6px;background:var(--danger-soft);color:var(--danger);cursor:pointer}@media(max-width:620px){.staffing-add{grid-template-columns:1fr 90px}.staffing-add .button{grid-column:1/-1}.staffing-person{grid-template-columns:1fr 110px 28px}}
.staffing-tools{display:flex;gap:8px;padding:0 22px 12px}.staffing-tools .button{font-size:12px;padding:7px 10px}
.staffing-count{position:absolute;right:7px;bottom:2px;display:block;margin:0;padding:0;border:0;background:transparent;text-align:right;font:400 9px/12px Segoe UI,sans-serif;cursor:pointer;text-decoration:none}.staffing-count:hover,.staffing-count:focus{color:var(--accent);text-decoration:underline;text-underline-offset:2px;outline:0}.demand-cell:has(.staffing-count) .quick-value{padding-bottom:16px}
.staffing-picker{margin:0 22px 14px;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-subtle)}.staffing-filters{display:grid;grid-template-columns:minmax(210px,1.6fr) repeat(4,minmax(100px,1fr));gap:7px}.staffing-filters input,.staffing-filters select{min-width:0;height:34px;border:1px solid var(--border-strong);border-radius:7px;background:#fff;padding:0 9px;color:var(--text)}.staffing-selection-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:11px 0 7px;color:var(--text-muted);font-size:11px}.staffing-selection-head label{cursor:pointer}.staffing-candidates{max-height:245px;overflow:auto;border:1px solid var(--border);border-radius:8px;background:#fff}.staffing-candidate{display:flex;align-items:flex-start;gap:9px;padding:8px 10px;border-bottom:1px solid var(--border);cursor:pointer}.staffing-candidate:last-child{border-bottom:0}.staffing-candidate:hover{background:var(--row-hover)}.staffing-candidate input{margin-top:3px}.staffing-candidate span,.staffing-candidate strong,.staffing-candidate small{display:block}.staffing-candidate strong{font-weight:500}.staffing-candidate small{margin-top:2px;color:var(--text-muted);font-size:10px}.staffing-clear-link{margin-right:auto;padding:0;border:0;background:transparent;color:var(--danger);font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.staffing-clear-link:hover{color:#913838;text-decoration-thickness:2px}.staffing-add-selected{width:100%;margin-top:9px}.staffing-add-selected:disabled{opacity:.45;cursor:default}@media(max-width:900px){.staffing-filters{grid-template-columns:1fr 1fr}.staffing-filters input{grid-column:1/-1}}
.staffing-candidate.current{background:#edf7f1}.staffing-candidate.current:hover{background:#e4f3ea}.staffing-candidate.busy{background:#f3f5f7;color:var(--text-muted);cursor:not-allowed}.staffing-candidate.busy input{accent-color:#9aa6af}.staffing-candidate.busy small{color:#9a6262}
#sheet tbody .operation-row [data-date-col].column-hover{background:#f4f8fa!important}#sheet tbody .section-row [data-date-col].column-hover{background:#dde8ed!important}#sheet thead [data-date-col].column-hover{background:#2d4658!important}#sheet tfoot [data-date-col].column-hover{background:#e5ebee!important}

.ai-import-button{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#080808;color:#fff;cursor:pointer;transition:transform .16s ease,background .16s ease}.ai-import-button:hover{background:#2b2b2b;transform:translateY(-1px)}.ai-import-button:focus-visible{outline:2px solid #3b8fa0;outline-offset:2px}.ai-import-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.ai-import-dialog{width:min(760px,calc(100vw - 24px));height:min(760px,calc(100vh - 32px));padding:0;border:0;border-radius:18px;background:#fff;box-shadow:0 28px 90px rgba(12,20,27,.28);overflow:hidden}.ai-import-dialog::backdrop{background:rgba(20,30,38,.46);backdrop-filter:blur(3px)}.ai-import-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid var(--border)}.ai-import-head>div{display:flex;align-items:center;gap:12px}.ai-import-head h2{margin:0;font-size:20px}.ai-import-head p{margin:4px 0 0;color:var(--text-muted);font-size:12px}.ai-import-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#080808;color:#fff;font-size:18px}.ai-chat{height:calc(100% - 275px);min-height:260px;padding:18px 22px;overflow:auto;background:#f5f5f3}.ai-message{width:fit-content;max-width:86%;margin:0 0 10px;padding:11px 13px;border-radius:14px;white-space:pre-wrap;line-height:1.45}.ai-message.assistant{border-bottom-left-radius:4px;background:#fff;color:#1c252c;box-shadow:0 2px 10px rgba(20,30,38,.06)}.ai-message.user{margin-left:auto;border-bottom-right-radius:4px;background:#111;color:#fff}.ai-import-form{padding:14px 22px 18px;border-top:1px solid var(--border);background:#fff}.ai-dropzone{height:72px;display:flex;align-items:center;gap:10px;padding:10px 13px;border:1px dashed #aeb8be;border-radius:12px;background:#fafaf8;cursor:pointer}.ai-dropzone:hover,.ai-dropzone.dragover{border-color:#111;background:#f2f2ef}.ai-dropzone input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ai-dropzone span,.ai-dropzone strong,.ai-dropzone small{display:block}.ai-drop-icon{width:34px;height:34px;display:grid!important;place-items:center;border-radius:50%;background:#111;color:#fff;font-size:20px}.ai-dropzone small{color:var(--text-muted);font-size:10px}.ai-file-list{min-height:18px;margin:7px 0;color:var(--text-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-compose{display:grid;grid-template-columns:1fr auto;gap:8px}.ai-compose textarea{min-height:42px;max-height:100px;padding:9px 11px;border:1px solid var(--border-strong);border-radius:10px;resize:vertical;color:var(--text)}.ai-compose textarea:focus{outline:0;border-color:var(--focus);box-shadow:0 0 0 2px rgba(59,143,160,.16)}.ai-compose .button{height:auto;min-height:42px}.ai-import-status{min-height:16px;margin:7px 0 0;color:var(--text-muted);font-size:11px}.ai-import-status.error{color:var(--danger)}@media(max-width:620px){.ai-import-head p{display:none}.ai-chat{height:calc(100% - 260px)}.ai-compose{grid-template-columns:1fr}.ai-compose .button{height:38px}}.ai-message.assistant{white-space:normal;width:min(96%,680px)}.ai-message.assistant p{margin:0 0 9px}.ai-message.assistant p:last-child{margin-bottom:0}.ai-message.assistant h3,.ai-message.assistant h4,.ai-message.assistant h5,.ai-message.assistant h6{margin:14px 0 7px;font-size:13px;line-height:1.35}.ai-message.assistant ul,.ai-message.assistant ol{margin:7px 0 10px;padding-left:22px}.ai-message.assistant li{margin:3px 0}.ai-table-wrap{max-width:100%;margin:10px 0;overflow-x:auto;border:1px solid var(--border);border-radius:9px;background:#fff;cursor:grab;touch-action:pan-y}.ai-table-wrap.dragging{cursor:grabbing;user-select:none}.ai-message.assistant table{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px}.ai-message.assistant th,.ai-message.assistant td{padding:8px 10px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);text-align:left;vertical-align:top;white-space:normal;min-width:110px;max-width:280px}.ai-message.assistant th{background:#eef3f5;color:#243746;font-weight:600;white-space:nowrap}.ai-message.assistant tr:last-child td{border-bottom:0}.ai-message.assistant th:last-child,.ai-message.assistant td:last-child{border-right:0}.ai-unified-compose{padding:9px 10px 8px;border:1px solid #8fa1ad;border-radius:13px;background:#fff;box-shadow:0 1px 3px rgba(25,43,56,.08);transition:border-color .16s ease,box-shadow .16s ease}.ai-unified-compose:focus-within{border-color:var(--focus);box-shadow:0 0 0 2px rgba(59,143,160,.16)}.ai-unified-compose.dragover{border-color:var(--accent);background:var(--accent-soft)}.ai-compose-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:end;gap:8px}.ai-attach-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--border);border-radius:9px;background:var(--surface-subtle);color:var(--text);cursor:pointer;font-size:20px;line-height:1}.ai-attach-button:hover{border-color:var(--accent);color:var(--accent)}.ai-attach-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ai-compose-row textarea{min-height:34px;max-height:110px;padding:7px 2px;border:0;outline:0;resize:vertical;color:var(--text);font:inherit;background:transparent}.ai-compose-row .button{min-height:34px;height:34px}.ai-format-hint{display:block;margin:5px 0 0 42px;color:var(--text-muted);font-size:10px}.ai-file-list[hidden]{display:none}.ai-unified-compose .ai-file-list{min-height:0;margin:0 0 7px 42px;color:var(--accent);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}@media(max-width:620px){.ai-compose-row{grid-template-columns:34px minmax(0,1fr)}.ai-compose-row .button{grid-column:1/-1}.ai-format-hint{margin-left:0}}.staffing-dialog{width:min(640px,calc(100vw - 24px))}.staffing-head{padding:14px 16px 10px}.staffing-head h2{font-size:18px}.staffing-summary{gap:8px;padding:10px 16px}.staffing-summary div{padding:8px 10px}.staffing-summary strong{font-size:18px}.staffing-tools{padding:0 16px 8px}.staffing-need-details{margin:0 16px 8px;padding:7px 9px}.staffing-list{padding:0 16px 14px;max-height:56vh}.staffing-person{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:7px 2px}.staffing-picker{margin:0 16px 10px;padding:10px}.staffing-add{padding:0 16px 10px}.staffing-worked-check{display:flex;align-items:center;gap:5px;white-space:nowrap;cursor:pointer}.staffing-worked-check input{margin:0}.staffing-tools:empty{display:none}.staffing-dialog{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 20px 60px rgba(25,43,56,.22)}.staffing-head{align-items:center;background:var(--surface-subtle)}.staffing-head p{font-size:12px}.staffing-summary{background:#fff}.staffing-summary div{background:#f8fafb;border-color:#d9e0e6;border-radius:8px}.staffing-summary span{font-size:10px}.staffing-tools{justify-content:flex-end;align-items:center;border-top:1px solid var(--border);padding-top:8px;background:var(--surface-subtle)}.staffing-attendance-actions{display:flex;gap:7px;margin-left:auto}.staffing-attendance-actions[hidden]{display:none}.staffing-tools .button{height:30px;padding:0 10px;border-radius:7px}.staffing-list{background:#fff}.staffing-list-head,.staffing-person{display:grid;grid-template-columns:minmax(220px,1fr) 82px 92px 52px;align-items:center;column-gap:10px}.staffing-list-head{position:sticky;top:0;z-index:1;padding:7px 8px;background:#e7eef2;border-top:1px solid var(--border);border-bottom:1px solid var(--border-strong);color:var(--text-muted);font-size:10px;font-weight:600}.staffing-person{padding:8px;border-bottom:1px solid var(--border)}.staffing-person:hover{background:var(--row-hover)}.staffing-person strong{font-weight:500}.staffing-shift,.staffing-gender{font-size:12px;color:#42515d}.staffing-worked-check{justify-content:center}.staffing-worked-check input{width:16px;height:16px;accent-color:var(--success)}.staffing-picker{background:#f8fafb;border-color:#d9e0e6}.staffing-candidates{border-color:#d9e0e6}.staffing-add-selected{background:var(--accent);border-color:var(--accent)}@media(max-width:620px){.staffing-list-head,.staffing-person{grid-template-columns:minmax(150px,1fr) 58px 70px 38px;column-gap:6px}.staffing-list-head{font-size:9px}.staffing-shift,.staffing-gender{font-size:11px}.staffing-attendance-actions{width:100%;justify-content:flex-end}}.staffing-dialog{background:#fff;color:#17212b;border-color:#d9e0e6;overflow:hidden}.staffing-head{background:#f8fafb;border-bottom-color:#d9e0e6}.staffing-head p{color:#64717d}.staffing-summary{background:#fff}.staffing-summary div{background:#f8fafb;border:1px solid #d9e0e6}.staffing-summary span{color:#64717d}.staffing-tools{background:#f8fafb;border-top-color:#d9e0e6;border-bottom:1px solid #d9e0e6}.staffing-list{background:#fff}.staffing-person{background:#fff;border-bottom-color:#d9e0e6}.staffing-person:hover{background:#f4f8fa}.staffing-person small{color:#64717d}.staffing-picker{background:#f8fafb;border-color:#d9e0e6}.staffing-attendance-actions .button.secondary{background:#fff;color:#465661;border:1px solid #bbc6cf}.staffing-attendance-actions .button.secondary:hover{background:#fcecec;color:#a13f3f;border-color:#d8a1a1}.staffing-attendance-actions .button.primary{background:#287d8e;color:#fff;border:1px solid #287d8e}.staffing-attendance-actions .button.primary:hover{background:#206a79}.ai-preview-card{width:100%;margin:12px 0;padding:0;border:1px solid #bbc6cf;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 4px 16px rgba(25,43,56,.08)}.ai-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;background:#e7eef2;border-bottom:1px solid #bbc6cf}.ai-preview-head strong,.ai-preview-head span{display:block}.ai-preview-head span{margin-top:2px;color:#64717d;font-size:10px}.ai-preview-head label{display:flex;align-items:center;gap:6px;color:#64717d;font-size:11px}.ai-preview-head select{height:30px;border:1px solid #bbc6cf;border-radius:7px;background:#fff}.ai-preview-table-wrap{max-width:100%;overflow:auto;cursor:grab;touch-action:pan-y}.ai-preview-table-wrap.dragging{cursor:grabbing;user-select:none}.ai-preview-table{min-width:1320px;width:100%;border-collapse:collapse;font-size:11px}.ai-preview-table th,.ai-preview-table td{position:static;height:auto;padding:7px;border-right:1px solid #d9e0e6;border-bottom:1px solid #d9e0e6;background:#fff;color:#17212b}.ai-preview-table th{background:#243746;color:#fff;font-weight:600}.ai-preview-table select,.ai-preview-table input[type=date]{width:100%;height:31px;border:1px solid #bbc6cf;border-radius:6px;background:#fff;padding:0 6px}.ai-preview-table th:nth-child(1){width:210px}.ai-preview-table th:nth-child(2){width:230px}.ai-preview-table th:nth-child(3){width:240px}.ai-preview-table th:nth-child(4){width:130px}.ai-preview-table th:nth-child(5){width:430px}.ai-qty-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}.ai-qty-grid label{display:grid;grid-template-columns:18px 44px;align-items:center;gap:2px;color:#64717d;font-size:9px}.ai-qty-grid input{width:44px;height:29px;border:1px solid #bbc6cf;border-radius:5px;text-align:right;padding:0 5px}.ai-preview-remove{width:26px;height:26px;border:0;border-radius:6px;background:#fcecec;color:#b54747;cursor:pointer}.ai-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px;background:#f8fafb}.ai-preview-actions span{color:#64717d;font-size:10px}.ai-preview-actions .button{height:34px;background:#287d8e;color:#fff}.ai-preview-actions .button:disabled{opacity:.45}
