.report-template-modal{width:min(1160px,96vw)!important;max-width:1160px!important}.report-template-section{border:1px solid #e1e6ed;border-radius:10px;background:#fff;padding:20px;margin:18px 0}.report-template-section>h3,.daily-wbs-section h3{display:flex;align-items:center;gap:10px;margin-bottom:18px}.report-section-number{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;flex:0 0 29px;background:#fff1e6;border-left:3px solid #f47721;border-radius:4px;color:#a44b0c;font-size:13px}.template-policy{background:#edf3fa;color:#284568;padding:14px 18px;border-radius:9px;line-height:1.7}.template-auto-info{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px;background:#f6f8fb;font-size:12px}.template-table-scroll{overflow-x:auto;margin-bottom:12px}.template-input-table{width:100%;min-width:730px;border-collapse:collapse;font-size:11px}.template-input-table th{padding:10px;background:#eef2f7;color:#254363;border:1px solid #dce3eb;text-align:left}.template-input-table td{padding:5px;border:1px solid #dce3eb;vertical-align:top}.template-input-table input{min-width:74px;font-size:12px;padding:9px 6px;border-radius:4px}.template-input-table input[type=date]{min-width:125px}.template-input-table input[readonly]{background:#f4f7fa}.template-safety-checks{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.template-safety-checks label{display:grid;grid-template-columns:1fr 118px;align-items:center;gap:10px;font-size:12px}.template-safety-checks select{margin:0}.template-signatures{display:grid;grid-template-columns:1fr 1fr;gap:20px}.template-signatures>div{padding:18px;background:#f6f8fb;border:1px solid #e1e6ed;border-radius:8px}.template-signatures small,.template-signatures b,.template-signatures span{display:block}.template-signatures b{margin:12px 0;font-size:18px}.template-signatures span{font-size:11px;color:#7b889a}.template-record-details{margin-top:22px}.template-record-details>summary{font-weight:700;padding:12px;cursor:pointer}.template-readonly-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:20px}.template-readonly-fields small{color:#7b889a}.amendment-card{border:1px solid #e1e6ed;border-radius:12px;padding:18px;margin-bottom:16px}.amendment-card>.daily-editor-section{margin-bottom:0}.report-template-modal .wbs-work{grid-template-columns:minmax(240px,3fr) repeat(3,minmax(75px,1fr)) 38px}.template-work-total{grid-column:1/-1;font-size:11px;padding:7px;background:#f3f6fb}.report-template-modal .machine{grid-template-columns:repeat(4,minmax(0,1fr))}.report-template-modal .machine .machine-work{grid-column:span 2}.report-template-modal .machine>.icon-btn{grid-column:4;justify-self:end}
@media(max-width:700px){.report-template-section{padding:14px}.template-auto-info,.template-signatures,.template-readonly-fields,.template-safety-checks{grid-template-columns:1fr}.report-template-modal .wbs-work{display:flex;flex-direction:column}.report-template-modal .machine{grid-template-columns:repeat(2,minmax(0,1fr))}.report-template-modal .machine .machine-pick,.report-template-modal .machine .machine-work{grid-column:1/-1}.report-template-modal .machine>.icon-btn{grid-column:2}.report-template-modal .modal-body{padding:14px}.template-policy{font-size:12px}.template-safety-checks label{grid-template-columns:1fr 105px}}

.labor-table{table-layout:fixed;min-width:840px;font-size:12px}.labor-table .labor-no{width:34px}.labor-table .labor-hours{width:66px}.labor-table th{background:#e6edf2;text-align:center;font-weight:600;padding:12px 5px;color:#123451}.labor-table td{padding:0;vertical-align:middle;height:34px}.labor-table th,.labor-table td{border:1px solid #a8b8c7}.labor-table input{width:100%;min-width:0!important;padding:8px 6px!important;border:0!important;border-radius:0!important;box-shadow:none;background:transparent;font-size:12px}.labor-table input:focus{outline:2px solid #f5a000;outline-offset:-2px;background:#fff}.labor-table [data-labor-total],.labor-table [data-labor-hours-sum]{background:#e6edf2;text-align:center;color:#123451}.labor-table tfoot{background:#e6edf2;font-weight:700}.labor-table tfoot th{text-align:right}.labor-table tfoot td{text-align:right;padding:5px 7px}.labor-table .labor-row-no{text-align:center;color:#627c91;position:relative}.labor-row-no button{display:none;position:absolute;inset:0;background:#fff2e8;color:#9a3a17;border:0;cursor:pointer}.labor-row-no:hover button,.labor-row-no:focus-within button{display:block}.labor-row-no button:focus{display:block}.report-detail .labor-table td:not(.labor-row-no):not([data-labor-total]){padding:6px;overflow-wrap:anywhere}
/* Daily work and material entry sheets: compact cells with aligned computed totals. */
.daily-work-table,.material-entry-table{table-layout:fixed;min-width:930px;font-size:11px}
.daily-work-table .entry-number,.material-entry-table .entry-number{width:30px}
.daily-work-table .entry-work{width:190px}.daily-work-table .entry-location{width:110px}.daily-work-table .entry-unit,.material-entry-table .entry-unit{width:76px}.daily-work-table .entry-note{width:145px}
.material-entry-table .material-name{width:195px}.material-entry-table .material-supplier{width:160px}.material-entry-table .material-certificate{width:140px}
.daily-work-table th,.material-entry-table th{padding:8px 5px;text-align:center;background:#e6edf2;font-weight:600;color:#123451}
.daily-work-table td,.material-entry-table td{padding:0;height:32px;vertical-align:top;border-color:#a8b8c7}
.daily-work-table th,.material-entry-table th{border-color:#a8b8c7}
.daily-work-table input,.daily-work-table select,.material-entry-table input,.material-entry-table select{width:100%;min-width:0!important;min-height:32px;padding:7px 5px!important;margin:0;border:0!important;border-radius:0!important;background:transparent;font-size:11px;box-shadow:none}
.daily-work-table input:focus,.daily-work-table select:focus,.material-entry-table input:focus,.material-entry-table select:focus{outline:2px solid #f5a000;outline-offset:-2px;background:#fff}
.daily-work-table .entry-calculated,.material-entry-table .entry-calculated{background:#e6edf2;text-align:center;padding:8px 3px;color:#123451;font-variant-numeric:tabular-nums}
.entry-calculated small{display:block;margin-top:4px;font-size:10px}.entry-row-no{text-align:center;padding-top:8px!important;position:relative;color:#627c91}
.entry-row-no button{display:none;position:absolute;inset:0;background:#fff2e8;color:#9a3a17;border:0;cursor:pointer}.entry-row-no:hover button,.entry-row-no:focus-within button,.entry-row-no button:focus{display:block}
.work-labor-detail,.material-opening{font-size:10px}.work-labor-detail summary,.material-opening summary{cursor:pointer;padding:3px 5px;color:#627c91}.work-labor-detail label{font-size:10px;padding:2px 5px}.material-opening input{background:#fff!important}
.report-detail .material-entry-table td{padding:7px;overflow-wrap:anywhere}
[data-compact-safety]{padding:14px 18px}.report-template-section[data-compact-safety]>h3{margin-bottom:10px}
.safety-compact-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 10px;align-items:end}
.safety-compact-fields label{display:flex;flex-direction:column;gap:3px;font-size:11px;line-height:1.4;margin:0}
[data-compact-safety] input,[data-compact-safety] select{height:30px;min-height:30px;padding:4px 7px;font-size:11px;margin:0}
.safety-compact-fields textarea{height:30px;min-height:30px;padding:5px 7px;margin:0;font-size:11px;line-height:18px;resize:vertical}
.safety-accidents{border:0;padding:0;margin:0;min-width:0}.safety-accidents legend{font-size:11px;font-weight:600;color:inherit;margin-bottom:3px}.safety-accidents>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.safety-accidents label{font-size:0;gap:0}.safety-accidents input{width:100%;min-width:0}
.safety-engineer{grid-column:span 2}
[data-compact-safety] .template-safety-checks{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 14px;margin:12px 0}
[data-compact-safety] .template-safety-checks label{grid-template-columns:minmax(0,1fr) 82px;gap:6px;font-size:11px;line-height:1.4;margin:0}
[data-compact-safety] .template-safety-checks select{padding:3px;font-size:10px}
[data-compact-safety]>.form-grid{display:block;margin:8px 0 0}[data-compact-safety]>.form-grid label{font-size:11px;gap:4px;margin:0}[data-compact-safety]>.form-grid textarea{height:58px;min-height:58px;padding:7px;margin:4px 0 0}
.safety-extra{font-size:11px;margin-top:8px}.safety-extra summary{cursor:pointer;color:#627c91}.safety-extra textarea{min-height:48px;height:48px}
[data-compact-safety] .template-readonly-fields{grid-template-columns:repeat(4,1fr);gap:8px;padding:8px 0}[data-compact-safety] .template-readonly-fields p{margin:3px 0;font-size:12px}
.template-safety-readonly{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 16px;font-size:11px}.template-safety-readonly>div{display:flex;align-items:start;justify-content:space-between;gap:7px}.template-safety-readonly b{white-space:nowrap}
@media(max-width:800px){.safety-compact-fields{grid-template-columns:repeat(2,minmax(0,1fr))}[data-compact-safety] .template-safety-checks,.template-safety-readonly{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){[data-compact-safety] .template-safety-checks,.template-safety-readonly{grid-template-columns:1fr}[data-compact-safety] .template-readonly-fields{grid-template-columns:1fr 1fr}.daily-work-table,.material-entry-table{min-width:930px}}
.daily-work-table th,.material-entry-table th{white-space:normal;overflow-wrap:break-word;line-height:1.4}
.daily-work-table td:not(.entry-calculated){background:#fff}.daily-work-table [data-work-unit]{background:#f3f6f9}
.material-opening{display:inline-block;vertical-align:middle;margin-left:4px}.material-opening summary{padding:0 2px}.material-opening[open]{display:block;margin:4px 0 0}
/* Section 4: head count from «Ирц» or by hand */
.labor-source{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 12px;padding:10px 12px;border:1px solid #dbe5ef;border-radius:10px;background:#f6f9fc}
.labor-mode{display:inline-flex;border:1px solid #cfdbe7;border-radius:8px;overflow:hidden;background:white}
.labor-mode button{border:0;background:transparent;padding:7px 12px;font-size:12px;font-weight:600;color:#50647a;min-height:34px}
.labor-mode button+button{border-left:1px solid #cfdbe7}
.labor-mode button.active{background:var(--navy);color:white}
.labor-source [data-attendance-status]{flex:1 1 100%;margin:0}
.labor-auto [data-template-add="laborRows"],.labor-auto [data-template-remove^="laborRows"],.labor-auto [data-report-add="attendance"],.labor-auto [data-report-remove^="attendance"]{display:none}
.labor-auto [data-template-grid="laborRows"] input{background:#f3f6f9;color:#2c4258}.labor-auto [data-template-grid="laborRows"] .form-hint{display:none}.labor-auto [data-template-row="laborRows"][hidden]{display:none}
.labor-source-note{font-size:12px;color:#1f6b45;margin:0 0 8px}
@media(max-width:600px){.labor-mode{width:100%}.labor-mode button{flex:1}.labor-source .btn{width:100%}}
/* Phone: each row of the WBS, labor and material tables is a card with labelled fields. */
@media(max-width:700px){
 .daily-work-table,.labor-table,.material-entry-table,.template-grid-table{display:block;min-width:0!important;width:100%;font-size:13px}
 .template-grid-table thead{display:none}
 .template-grid-table tbody{display:grid;gap:10px}
 .template-grid-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:12px;border:1px solid #d5dee8;border-radius:12px;background:#fff}
 .template-grid-table td{display:block;min-width:0;padding:0!important;border:0!important}
 .template-grid-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:5px;font-size:11px;font-weight:600;line-height:1.3;color:#5f6d80}
 .template-grid-table input{width:100%;min-width:0!important;min-height:44px;font-size:15px}
 .template-grid-table td.template-grid-remove{grid-column:1/-1;justify-self:end}
 .safety-compact-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .safety-accidents{grid-column:1/-1}
 .safety-accidents label{font-size:11px;gap:3px}
 .safety-engineer{grid-column:1/-1}
 .daily-work-table colgroup,.labor-table colgroup,.material-entry-table colgroup,.daily-work-table thead,.labor-table thead,.material-entry-table thead{display:none}
 .daily-work-table tbody,.labor-table tbody,.material-entry-table tbody,.labor-table tfoot{display:grid;gap:10px}
 .labor-table tfoot{margin-top:10px}
 .daily-work-table tr,.labor-table tr,.material-entry-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:12px;border:1px solid #d5dee8;border-radius:12px;background:#fff}
 .daily-work-table td,.labor-table td,.material-entry-table td,.labor-table tfoot th{display:block;height:auto;min-width:0;padding:0!important;border:0!important;background:none!important;text-align:left!important;color:#182b43}
 .daily-work-table td[data-label]::before,.labor-table td[data-label]::before,.material-entry-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:5px;font-size:11px;font-weight:600;line-height:1.3;color:#5f6d80}
 .daily-work-table input,.daily-work-table select,.labor-table input,.material-entry-table input,.material-entry-table select{min-height:44px;padding:10px!important;border:1px solid #cfd8e3!important;border-radius:8px!important;background:#fff;font-size:15px}
 .daily-work-table [data-work-unit]{background:#f3f6f9}
 .daily-work-table .entry-calculated,.material-entry-table .entry-calculated,.labor-table [data-labor-total]{font-weight:700;font-size:15px}
 .daily-work-table .entry-wide,.labor-table .labor-wide,.material-entry-table .entry-wide{grid-column:1/-1}
 .entry-row-no,.labor-table .labor-row-no{grid-column:1/-1;display:flex!important;align-items:center;justify-content:flex-start;gap:8px;min-height:32px;font-weight:700;color:#24496c!important}
 .entry-row-no[data-label]::before,.labor-table .labor-row-no[data-label]::before{display:inline!important;margin:0 4px 0 0!important;font-size:13px!important;color:#24496c!important}
 .entry-row-no button,.labor-row-no button{display:inline-flex!important;position:static!important;align-items:center;justify-content:center;width:36px;height:36px;margin-left:auto;border-radius:8px;font-size:18px}
 .labor-table tfoot tr{grid-template-columns:repeat(3,minmax(0,1fr));background:#e6edf2;border-color:#c9d6e3}
 .labor-table tfoot th{grid-column:1/-1;font-size:14px}
 .labor-table tfoot td:empty{display:none}
 .material-opening summary{padding:6px 0}
 .labor-table tr.labor-empty{display:none}
}
