/* Preserve the familiar object / department / section arrangement. */
.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}
.object-editor .object-identity{margin:0 0 18px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.object-identity-code{font-size:12px;font-weight:650;color:var(--muted);letter-spacing:.04em}
.object-identity h2{font-size:22px;line-height:1.4;margin:6px 0 8px;overflow-wrap:anywhere}
.object-identity-state{font-size:13px;margin:0;line-height:1.5}
.object-identity-state>span:last-child{color:var(--muted)}
.status-dot{display:inline-block;width:7px;height:7px;background:var(--accent);border-radius:50%;margin-right:7px}
.section-workspace{display:block}
.section-workspace-main{min-width:0}
.department-overview-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0}
.object-editor .object-sections{display:flex!important;flex-wrap:wrap;padding:0 0 18px;margin:18px 0 22px;gap:8px}
.object-editor .object-sections button{min-height:40px;border-width:1px;font-weight:550}
.object-editor .object-sections button.active{border-color:var(--accent);box-shadow:inset 0 -3px var(--accent);font-weight:700}
.object-editor .workspace-section-heading{padding:0 0 18px;margin:0;border:0;border-radius:0;background:transparent;display:flex;justify-content:space-between;align-items:center;gap:16px}
.workspace-section-heading .zone-label{color:var(--muted);font-size:9px;letter-spacing:.1em;margin:0 0 6px;display:block}
.workspace-section-heading h3{font-size:22px;line-height:1.25;font-weight:600;margin:0}
.workspace-section-heading .workspace-version{font-size:10px;color:var(--muted);white-space:nowrap}
.workspace-view-tabs{display:flex;gap:20px;margin:0 0 20px;border-bottom:1px solid var(--line)}
.workspace-view-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);padding:0 0 12px;font-size:13px;margin:0 0 -1px;box-shadow:none}
.workspace-view-tabs button[aria-pressed="true"]{color:var(--text);border-bottom-color:var(--accent);font-weight:600}
.section-workspace-main .object-details{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.section-data-view>div>.object-details>h3:first-child,.section-data-view>.object-details>h3:first-child{display:none}
.section-workspace-main .object-details>p,.section-workspace-main p{line-height:1.6}
.section-workspace-main .object-details>p{font-size:13px}
.section-workspace-main button{box-shadow:none}
.section-workspace-main button:focus-visible,.workspace-section-nav button:focus-visible,.department-tab:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.section-workspace-main .record-summary{padding:14px 16px;margin:14px 0 22px;border:1px solid var(--line);border-radius:8px;background:var(--page)}
.section-workspace-main .record-summary>.zone-label{font-size:9px;letter-spacing:.1em;color:var(--muted)}
.section-workspace-main .record-summary>h4{font-size:14px;margin:5px 0 12px}
.section-workspace-main .record-summary>.small{margin:12px 0 0;font-size:11px}
.object-editor .section-workspace-main .summary-values{padding:0;border:0;border-radius:0;background:transparent;gap:12px}
.section-workspace-main .summary-values>div{padding:0 12px 0 0;background:transparent;border-right:1px solid var(--line);border-radius:0}
.section-workspace-main .summary-values>div:last-child{border-right:0}
.section-workspace-main .summary-values strong{font-size:23px;line-height:1.3;font-weight:600}
.section-workspace-main .summary-values span{font-size:11px;line-height:1.4;color:var(--muted);display:block}
.section-workspace-main .history,.section-workspace-main .schedule-card{background:transparent;border:1px solid var(--line);border-radius:8px;padding:16px;margin:12px 0;box-shadow:none}
.section-workspace-main .history h4,.section-workspace-main .schedule-card h4{font-size:15px;font-weight:600;line-height:1.5;margin:0 0 6px}
.section-workspace-main .history p,.section-workspace-main .schedule-card p{font-size:13px;margin:7px 0}
.section-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.section-workspace-main .record-counterparty{color:var(--muted);font-size:12px}
.record-key-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
.record-key-values span{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}
.record-key-values strong{font-size:17px;font-weight:600;overflow-wrap:anywhere}
.section-workspace-main .section-help,.section-workspace-main .import-disclosure,.section-workspace-main .document-tools-disclosure{padding:11px 0;margin:0 0 14px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font-size:12px}
.section-help summary,.import-disclosure summary,.document-tools-disclosure summary,.record-details summary{cursor:pointer;font-size:12px;line-height:1.5}
.section-help[open] summary,.import-disclosure[open] summary,.document-tools-disclosure[open] summary{color:var(--text);margin-bottom:12px}
.record-details{margin:12px 0 16px;color:var(--muted)}
.record-details[open]{border-top:1px solid var(--line);padding-top:12px}
.section-workspace-main .object-facts{margin:0 0 22px}
.object-facts>div{display:grid;grid-template-columns:150px minmax(0,1fr);gap:20px;border-bottom:1px solid var(--line);padding:15px 0}
.object-facts dt{font-size:12px;color:var(--muted)}
.object-facts dd{margin:0;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.object-section-content>.primary{margin-bottom:18px}
.object-editor .archive{display:block!important;background:transparent;padding:12px 0;border:0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.object-editor .archive summary{cursor:pointer}
.object-editor .archive label{margin-top:14px}
.documents-zone>.zone-label{display:none}
.section-workspace-main .documents-zone>.panel-heading{padding:0 0 12px;border:0}
.section-workspace-main .documents-zone>.panel-heading h3{font-size:16px}
.section-workspace-main .documents-zone>.panel-heading button{font-size:12px;padding:7px 10px}
.section-workspace-main table{font-size:13px}
.section-workspace-main th{font-size:11px;letter-spacing:.01em}

/* A consistent, visible hierarchy for actions, without changing their behavior. */
.section-workspace-main button,.section-workspace-main .button,.editor-drawer button,.editor-drawer .button{min-height:42px;border:1px solid color-mix(in srgb,var(--muted) 55%,var(--line));background:var(--raised);color:var(--text);font-weight:600;padding:10px 16px;border-radius:8px;line-height:1.4}
.section-workspace-main button:hover:not(:disabled),.editor-drawer button:hover:not(:disabled){background:color-mix(in srgb,var(--raised) 82%,var(--accent));border-color:var(--accent)}
.section-workspace-main button.primary,.editor-drawer button.primary{background:var(--accent);color:var(--accent-ink);border:1px solid var(--accent);font-weight:750;box-shadow:0 2px 5px #0002}
.section-workspace-main button.primary:hover:not(:disabled),.editor-drawer button.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 90%,var(--text));color:var(--accent-ink);border-color:var(--accent)}
.section-workspace-main button:disabled,.editor-drawer button:disabled{opacity:.48;box-shadow:none;cursor:not-allowed}
.section-workspace-main button:focus-visible,.editor-drawer button:focus-visible,.editor-drawer a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.section-workspace-main .history>button+button{margin-left:8px}
.object-editor .workspace-view-tabs button{width:auto;flex:0 0 auto;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;box-shadow:none;color:var(--muted);padding:8px 4px 12px}
.object-editor .workspace-view-tabs button[aria-pressed="true"]{border-bottom-color:var(--accent);color:var(--text);font-weight:700}
.contracts-panel .record-summary>.summary-values{margin-top:12px}
.section-workspace-main .records-heading{margin:18px 0 10px;padding:0;border:0;font-size:15px}
/* Editing surfaces are separate from read-only summaries in every department. */
dialog.editor-drawer{width:min(940px,96vw);background:var(--page);color:var(--text);border-left:1px solid var(--line)}
.editor-drawer .editor-drawer-header{background:var(--surface);margin:0;border-bottom:1px solid var(--line);padding:20px 24px}
.editor-drawer-header .zone-label{color:var(--accent);font-size:11px;letter-spacing:.07em;font-weight:700}
.editor-drawer .editor-drawer-body{padding:22px 24px 0;background:var(--page)}
.editor-drawer .editor-drawer-body form,.object-editor .editor-drawer .editor-drawer-body form{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.editor-drawer .editor-drawer-body fieldset,.object-editor .editor-drawer .editor-drawer-body fieldset{background:transparent;box-shadow:none;min-width:0}
.editor-drawer .editor-drawer-body form>fieldset{padding:0;margin:0;border:0}
.editor-drawer .editor-drawer-body form>fieldset>legend{font-size:14px;font-weight:650;color:var(--muted);margin:0 0 18px;padding:0}
.editor-drawer .editor-drawer-body .form-group,.object-editor .editor-drawer .editor-drawer-body .form-group{display:block;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px 20px 4px;margin:0 0 24px}
.editor-drawer .form-group>legend{font-size:16px;line-height:1.4;font-weight:700;color:var(--text);padding:0 8px;margin-left:-8px}
.editor-drawer .editor-drawer-body label,.object-editor .editor-drawer .editor-drawer-body label{font-size:14px;font-weight:600;color:var(--text);line-height:1.5;margin-bottom:18px}
.editor-drawer .editor-drawer-body input:not([type="checkbox"]):not([type="radio"]),.editor-drawer .editor-drawer-body select,.editor-drawer .editor-drawer-body textarea{min-height:44px;background:var(--page);color:var(--text);border:1px solid color-mix(in srgb,var(--muted) 55%,var(--line));border-radius:7px;padding:11px 12px;margin-top:7px;font-size:15px;font-weight:400;line-height:1.45}
.editor-drawer .editor-drawer-body input:focus,.editor-drawer .editor-drawer-body select:focus,.editor-drawer .editor-drawer-body textarea:focus{outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:1px;border-color:var(--accent);background:var(--surface)}
.editor-drawer .editor-drawer-body textarea{min-height:90px;resize:vertical}
.editor-drawer .editor-drawer-body .check{padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--raised);font-weight:500;align-items:flex-start}
.editor-drawer .check input{flex:0 0 auto;margin-top:3px;width:18px;height:18px;accent-color:var(--accent)}
.editor-drawer .fields{gap:16px 20px;align-items:start}
.editor-drawer .fields>label{min-width:0}
.editor-drawer .editor-drawer-body .muted{color:var(--muted);font-size:13px;line-height:1.6}
.editor-drawer .editor-drawer-body .actions:last-child,.editor-drawer .editor-drawer-body .editor-actions{position:sticky;bottom:0;z-index:3;display:flex;flex-wrap:wrap;gap:10px;margin:20px -24px 0;padding:16px 24px;background:var(--surface);border-top:2px solid var(--line);box-shadow:0 -8px 20px #0002}
.editor-drawer .editor-drawer-body .actions:last-child button{min-height:46px}
.editor-drawer .form-summary{padding:16px 18px;margin:0 0 22px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:8px;background:var(--raised)}
.editor-drawer .form-summary h3{font-size:15px;margin:0 0 8px}
.editor-drawer .form-summary p:last-child{margin-bottom:0}
.editor-drawer .search{min-width:0;margin-bottom:8px;align-items:stretch}
.editor-drawer .search input{margin-top:0!important;min-width:0}
.editor-drawer .search button{flex-shrink:0}
.editor-drawer .date-emphasis{padding:14px;border-left:3px solid var(--accent);border-radius:6px;background:var(--raised);margin:0 0 18px}
.editor-drawer .date-emphasis label{margin-bottom:8px}
.editor-drawer .date-emphasis p{margin:0}
.mobile-object-toggle{display:none}
@media(max-width:850px){.object-mode .object-workbench{grid-template-columns:1fr}.mobile-object-toggle{display:block;margin-bottom:12px}.object-mode .object-browser{display:none;position:static;max-height:360px}.object-mode .show-object-list .object-browser{display:block}}
@media(max-width:600px){.object-editor .object-sections button{font-size:12px;padding:8px 10px}.object-facts>div{grid-template-columns:1fr;gap:5px}.record-key-values{grid-template-columns:1fr}.workspace-section-heading h3{font-size:20px}.workspace-version{display:none}.section-workspace-main .summary-values{grid-template-columns:1fr}.section-workspace-main .summary-values>div{border-right:0;border-bottom:1px solid var(--line);padding-bottom:10px}.editor-drawer .editor-drawer-body{padding:18px 16px 0}.editor-drawer .editor-drawer-body .form-group,.object-editor .editor-drawer .editor-drawer-body .form-group{padding:14px 14px 0}.editor-drawer .editor-drawer-body .actions:last-child,.editor-drawer .editor-drawer-body .editor-actions{margin-left:-16px;margin-right:-16px;padding:12px 16px}.editor-drawer .editor-drawer-body .actions:last-child button{flex:1 1 140px}.editor-drawer .search{flex-wrap:wrap}.editor-drawer .search button{width:100%}.section-workspace-main .history>button+button{margin-left:0;margin-top:8px}}

/* Full object limits: all recorded years, distinct from annual source records. */
.limits-overview{border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:12px;background:var(--page);padding:20px;margin:18px 0 26px}
.limits-overview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:12px}
.limits-overview .zone-label,.funding-year-records>.zone-label{font-size:11px;letter-spacing:.06em;font-weight:700;color:var(--muted)}
.limits-overview h4{font-size:18px;line-height:1.4;margin:6px 0 0}
.limits-grand-total>span{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}
.limits-grand-total>strong{font-size:24px;font-weight:700;line-height:1.4;display:block;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.limits-grand-total small{font-size:16px;color:var(--muted)}
.limits-table-wrap{border:1px solid var(--line);border-radius:8px;overflow:auto;max-width:100%;margin:16px 0}
.limits-table-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.section-workspace-main .limits-table caption{text-align:left;padding:12px 14px;font-size:12px;color:var(--muted);background:var(--surface)}
.section-workspace-main .limits-table th,.section-workspace-main .limits-table td{padding:12px 14px;border:1px solid var(--line);font-size:13px}
.section-workspace-main .limits-table thead th{background:var(--raised);font-weight:650;white-space:nowrap;color:var(--text);text-align:right}
.section-workspace-main .limits-table th:first-child{min-width:190px;text-align:left;line-height:1.5;white-space:normal}
.section-workspace-main .limits-table tbody th{background:var(--surface);color:var(--text);font-weight:500}
.section-workspace-main .limits-table .money{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;max-width:none;min-width:140px;color:var(--text)}
.section-workspace-main .limits-table .total-column{background:var(--raised);font-weight:650}
.section-workspace-main .limits-table tfoot th,.section-workspace-main .limits-table tfoot td{background:color-mix(in srgb,var(--accent) 12%,var(--surface));font-weight:750;border-top:2px solid var(--accent)}
.limits-table-note{margin:0;color:var(--muted);line-height:1.6}
.funding-year-records{border:1px solid var(--line);border-radius:10px;padding:18px;margin:18px 0;background:var(--surface)}
@media(max-width:600px){.limits-overview,.funding-year-records{padding:14px}.limits-grand-total>strong{font-size:22px}.section-workspace-main .limits-table th:first-child{min-width:160px}}

/* Property register: summary separated from editable records. */
.property-summary{display:flex;flex-wrap:wrap;gap:14px;padding:18px;margin:18px 0 8px;background:var(--raised);border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:12px}
.property-summary span{flex:1;min-width:140px;color:var(--muted)}
.property-summary strong{display:block;color:var(--text);font-size:1.5rem;margin-bottom:4px}
.property-unit-table{min-width:760px;width:100%}.property-unit-table th,.property-unit-table td{vertical-align:top}.property-unit-table .actions{display:flex;flex-direction:column;align-items:stretch;gap:6px}.property-unit-table caption{text-align:left;padding:12px;font-weight:600}
.editor-group-title{margin-top:24px;border-top:1px solid var(--line);padding-top:18px}

.property-unit-table td:last-child{min-width:126px}.property-unit-table button{white-space:nowrap;word-break:normal;min-width:106px;padding:10px 12px}.property-unit-table td:nth-child(3) .muted{white-space:nowrap}

/* Final procurement package stays distinct from the source project archive. */
.preparation-final { margin-top: 20px; padding: 20px; border: 2px solid var(--accent, #6b9de7); border-radius: 12px; background: var(--surface, #172439); }
.preparation-final .table-scroll { overflow-x: auto; max-width: 100%; margin: 16px 0; }
.preparation-final table { width:100%; min-width:680px; border-collapse:collapse; }
.preparation-final th,.preparation-final td { padding:12px; text-align:left; border-bottom:1px solid var(--border, #526179); }
.preparation-final td:nth-child(n+3),.preparation-final th:nth-child(n+3) { text-align:right; white-space:nowrap; }
.preparation-final .actions { flex-wrap:wrap; }
.preparation-final .button { display:inline-flex; align-items:center; padding:10px 14px; border:1px solid currentColor; border-radius:7px; text-decoration:none; }
@media(max-width:700px){.preparation-final{padding:12px}.preparation-final .actions>*{max-width:100%;white-space:normal}}
.transfer-routes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:12px;margin:18px 0}
.transfer-routes .route-choice{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;padding:16px;min-height:86px;border:2px solid var(--line);border-radius:12px;white-space:normal;overflow-wrap:anywhere}
.transfer-routes .route-choice.active{border-color:var(--accent);box-shadow:inset 4px 0 0 var(--accent)}
.transfer-routes .route-choice span{font-size:.85rem;color:var(--muted)}

.transfer-routes{max-height:340px;overflow:auto;padding:3px}

.transfer-stage-table{min-width:760px}.transfer-stage-table td:last-child{min-width:130px}.transfer-stage-table td:last-child button{display:block;width:100%;margin:3px 0;white-space:nowrap}

/* Cross-object deadline overview; source editors keep their existing layout. */
.monitor-control-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:12px 0 20px}
.deadline-summary{border:1px solid var(--line,#d4dde7);border-radius:12px;padding:16px;margin:20px 0;background:var(--surface,#f5f8fa)}
.deadline-summary p{margin-top:0}
.deadline-counters{display:flex;flex-wrap:wrap;gap:12px 24px}
.deadline-counters b{font-size:22px;margin-right:4px}
.deadline-late{color:var(--tone-ffaaa9,#ffaaa9);font-weight:700}
.deadline-table td{vertical-align:top}.deadline-table td:first-child{min-width:140px}.deadline-table p{margin:8px 0}
.deadline-source-focus{outline:2px solid var(--accent,#24887c);outline-offset:-2px}

.deadline-export{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:18px}.deadline-export .toolbar{align-items:flex-end}.deadline-export label{min-width:150px;margin:0}.deadline-export .toolbar .button{white-space:normal}

/* Accounting: compare the annual totals before working with their source records. */
.funding-year-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0}.funding-year-controls label{margin:0;max-width:180px}.funding-year-controls .actions{padding-bottom:1px}
.funding-overview{border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:12px;background:var(--surface);padding:20px;margin:22px 0 30px;min-width:0}.funding-overview-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.funding-overview h4,.funding-records-heading h4{font-size:19px;margin:8px 0 14px}.funding-unit{font-size:12px;color:var(--muted)}
.funding-overview-scroll{border:1px solid var(--line);border-radius:8px}.funding-overview-table{min-width:730px}.funding-overview-table th,.funding-overview-table td{padding:16px 18px;line-height:1.55;border-bottom:1px solid var(--line)}.funding-overview-table thead th{font-size:12px;text-align:right;vertical-align:bottom}.funding-overview-table thead th:first-child{ text-align:left }.funding-overview-table tbody th{font-size:13px;font-weight:500;background:transparent;min-width:200px;color:var(--text)}
.funding-panel .money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;overflow-wrap:normal}.funding-overview-table .funding-received{background:color-mix(in srgb,var(--accent) 9%,var(--surface));font-weight:700}.funding-overview-table tfoot th,.funding-overview-table tfoot td{border-top:2px solid var(--accent);font-weight:750;font-size:14px}.funding-negative{color:var(--tone-ffaaa9,#b84845)}.funding-overview-note,.funding-coverage{margin:14px 0 0;line-height:1.6}.funding-coverage{font-size:13px;border-left:3px solid var(--accent);padding:8px 12px}.funding-record-filters{display:flex;gap:18px;flex-wrap:wrap;margin:18px 0}.funding-year-records{padding-top:22px;border-top:2px solid var(--line)}.funding-panel .table-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:720px){.funding-overview{padding:14px}.funding-year-controls{align-items:stretch}.funding-year-controls .actions{width:100%}.funding-overview-table th,.funding-overview-table td{padding:12px}}

/* Keep the source payment row distinct inside schedule cards. */
.schedule-card.focused-assignment{border:2px solid var(--accent);box-shadow:0 0 0 3px var(--tone-64d6c422,#64d6c422)}

/* Acceptance: keep editable quantities central and actions visible. */
.period-acceptance-editor fieldset{display:flex;flex-direction:column;gap:10px;min-height:0}.period-acceptance-editor p,.period-acceptance-editor label{margin:0}.period-acceptance-table{max-height:calc(100dvh - 340px);min-height:200px;overflow:auto}.period-acceptance-table table{min-width:900px;width:100%}.period-acceptance-table th{position:sticky;top:0;background:var(--surface);z-index:1}.period-acceptance-table th,.period-acceptance-table td{padding:10px 12px;vertical-align:top}.period-acceptance-table td:first-child{min-width:270px}.period-acceptance-table input{min-width:140px;width:100%;font-variant-numeric:tabular-nums}.period-acceptance-save{position:sticky;bottom:0;background:var(--surface);padding:12px 0;border-top:1px solid var(--line);z-index:2}

/* Personal incomplete form snapshots. Keep editing space compact. */
.form-draft-summary,.drawer-draft-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border,#68798b);border-radius:8px;margin:8px 0;font-size:.85rem}
.form-draft-summary button,.drawer-draft-controls button{font-size:.85rem;padding:7px 12px}
.drawer-draft-controls{margin:0;border-radius:0;flex:none;background:var(--tone-1a2735,#1a2735)}
.drawer-draft-controls>span{flex:1;min-width:180px}
.draft-workspace{min-width:0}

.draft-workspace:has(dialog[open]) > .form-draft-summary{display:none}
.draft-workspace:not([data-draft-editor]) > .form-draft-summary > button:first-child{display:none}

.draft-workspace:not([data-draft-editor]) > .form-draft-summary:not(.has-draft-content){display:none}

/* Ordered navigation and preparation actions; no selectors target schedule editors. */
.department-workflow-nav{border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:14px 0 20px;background:var(--surface)}
.workflow-nav-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.object-editor .department-workflow-nav .object-sections{margin:12px 0 0;padding:0;border:0}
.object-editor .workflow-entry-sections button{display:flex;align-items:center;gap:8px;min-height:46px;text-align:left}
.object-editor .workflow-entry-sections button.active{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);box-shadow:0 2px 5px #0002}
.workflow-step-number{display:inline-flex;flex:0 0 24px;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid currentColor;border-radius:50%;font-size:12px;font-weight:750}
.workflow-next-section{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
.workflow-next-section button{font-weight:700;border-color:var(--accent);padding:8px 14px}
.workflow-other-sections{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.workflow-other-sections summary{cursor:pointer;color:var(--muted);font-size:13px}
.preparation-next{display:flex;flex-direction:column;gap:6px;padding:14px 16px;margin:14px 0;border-left:4px solid var(--accent);border-radius:6px;background:var(--raised)}
.preparation-next .zone-label{color:var(--accent);font-size:10px;font-weight:750;letter-spacing:.08em}
.preparation-workflow{margin-top:14px;counter-reset:none}
.preparation-workflow>section{display:flex;flex-direction:column;align-items:flex-start;background:var(--surface);min-width:0}
.preparation-workflow>section.prep-current{border:2px solid var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
.preparation-workflow>section>button{margin-top:10px;width:100%;min-height:46px}
.preparation-workflow .zone-label{font-size:10px;line-height:1.5;color:var(--muted);font-weight:750}
.preparation-workflow>.prep-current .zone-label{color:var(--accent)}
.preparation-workflow .status{font-weight:700}
.preparation-workflow table{width:100%}
.prep-admin{border-top:1px solid var(--line);margin-top:16px;padding-top:12px}
.prep-admin summary,.prep-export summary{cursor:pointer;font-size:13px;color:var(--muted)}
.prep-admin .actions{margin-top:12px}
@media(max-width:700px){.department-workflow-nav{padding:12px}.workflow-nav-heading>.small{display:none}.workflow-next-section{align-items:stretch;flex-direction:column}.workflow-entry-sections button{flex:1 1 170px}}

.preparation-next>button{align-self:flex-start;min-height:46px;margin-top:6px}

/* EIS connection diagnostics: loaded by the application stylesheet. */
.eis-connection{padding:20px}.eis-connection summary{font-size:18px;cursor:pointer}.eis-steps{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:24px;margin:18px 0}.eis-steps fieldset{height:100%;padding:16px;border:1px solid var(--border,#7b91a6);border-radius:10px}.eis-steps legend{font-weight:700;padding:0 8px}.eis-steps button{min-height:44px}

.damia-preview{overflow:auto;margin:16px 0}.damia-preview table{width:100%;border-collapse:collapse}.damia-preview th,.damia-preview td{border-bottom:1px solid var(--border,#7b91a6);padding:12px;text-align:left;vertical-align:top;overflow-wrap:anywhere}.damia-preview tbody th{width:30%;min-width:130px}

/* The procurement reader uses the existing object workspace; schedule editor is unchanged. */
.damia-object fieldset {min-width:0}.damia-object .fields {grid-template-columns:minmax(200px,1fr) minmax(260px,3fr)}
.damia-result {border:1px solid var(--line);border-radius:8px;padding:14px;margin:12px 0}.damia-result summary {cursor:pointer;padding:8px 0}
.damia-object .damia-preview {max-height:55vh;overflow:auto;margin-top:12px}.damia-object .damia-preview th {min-width:160px}
.damia-object .actions {flex-wrap:wrap}.damia-object a {overflow-wrap:anywhere}
@media(max-width:720px){.damia-object .fields {grid-template-columns:1fr}.damia-object .damia-preview th {min-width:110px}}
.damia-object.panel {padding:20px;margin-bottom:20px}
.damia-object fieldset {border:1px solid var(--line);border-radius:8px;padding:16px;margin:16px 0}
.damia-object legend {font-weight:700;padding:0 6px}
.damia-object .fields {display:grid;gap:16px}
.conclusion-workspace>p{max-width:1000px}.conclusion-card{border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:20px;margin:20px 0}.conclusion-card header{margin:0 0 12px}.conclusion-card h4{margin:0 0 10px}.conclusion-next{padding:12px 14px;background:var(--surface-alt,var(--surface));border-left:4px solid var(--accent);line-height:1.6}.conclusion-package{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.conclusion-table{max-height:420px;overflow:auto;margin:12px 0}.conclusion-table th{position:sticky;top:0}.conclusion-table td,.conclusion-table th{padding:10px 12px}.conclusion-table input{min-width:140px}.conclusion-hold{display:inline-block;color:#eab86b;margin-left:12px}.conclusion-card details{margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}.conclusion-card summary{cursor:pointer}.conclusion-card .actions{display:flex;flex-wrap:wrap;gap:10px}.conclusion-card .actions .button{font-size:13px}@media(max-width:700px){.conclusion-card{padding:14px}.conclusion-card header{display:block}.conclusion-card .actions>*{flex:1 1 180px}}

/* Land agreement preparation: keep the steps compact inside the existing editor. */
.editor-drawer .land-agreement-steps{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 22px;padding-bottom:12px;border-bottom:1px solid var(--line,#526b7c)}
.editor-drawer .land-agreement-steps button{width:auto;margin:0;padding:9px 12px;border:1px solid var(--line,#526b7c);background:var(--surface,#172733);color:var(--text,#e5edf2);font-weight:600}
.editor-drawer .land-agreement-steps button.primary{background:var(--accent,#65d4c3);border-color:var(--accent,#65d4c3);color:var(--accent-ink,#062d2d)}
/* Object-wide facts remain separate from the current department's editing area. */
.object-overview{border:1px solid var(--line,#c6d2de);border-left:4px solid var(--accent,#087e70);border-radius:12px;padding:12px 16px;margin:4px 0 18px;background:var(--surface,#f3f7fa)}
.object-overview>header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.object-overview>header>div:first-child{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.object-overview .actions{margin:0;flex-wrap:nowrap}.object-overview button{padding:6px 10px;font-size:.82rem}
.object-overview-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:12px 0}
.object-overview-metrics>div{border-right:1px solid var(--line,#c6d2de);padding-right:8px}.object-overview-metrics>div:last-child{border:0}
.object-overview-metrics dt{font-size:.72rem;color:var(--muted,#567);line-height:1.4}.object-overview-metrics dd{margin:4px 0 0;font-size:.95rem;font-weight:750;overflow-wrap:anywhere}
.object-overview-attention{display:flex;gap:14px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line,#c6d2de);padding-top:8px;font-size:.82rem}
.object-overview-details{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.4fr);gap:20px;margin-top:16px;border-top:1px solid var(--line,#c6d2de)}
.object-overview-details td,.object-overview-details th{font-size:.8rem;padding:8px}.object-overview-details h4{font-size:.95rem;margin:14px 0}
.object-overview-risk{padding:10px 0;border-bottom:1px solid var(--line,#c6d2de);font-size:.82rem}.object-overview-risk p{margin:5px 0}
@media(max-width:1250px){.object-overview-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.object-overview-details{grid-template-columns:1fr}.object-overview>header{align-items:flex-start;flex-direction:column}.object-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Keep the object workspace visible below the summary, without changing department placement. */
.object-mode .content>header{margin-bottom:12px}.object-mode .content>header h1{font-size:20px;margin:0}.object-mode .content>header p.muted{display:none}
.object-editor .object-identity{padding-bottom:10px;margin-bottom:10px}.object-identity h2{font-size:20px;margin:3px 0 4px}
.object-overview>header{margin-bottom:0}.object-overview{margin-bottom:12px}
.object-editor>.department-tabs{margin:12px 0;padding:8px;gap:6px}.object-editor>.department-tabs .department-tab{min-height:54px;padding:8px 10px;font-size:13px}
.department-workflow-nav{margin:10px 0 14px;padding:10px 12px}.object-editor .department-workflow-nav .object-sections{margin-top:8px}.workflow-next-section{margin-top:8px}.workflow-other-sections{margin-top:8px;padding-top:8px}

.schedule-repair{min-width:0;min-height:0;flex:1;overflow:auto;padding:16px}.schedule-repair h3{margin-top:0}.schedule-repair-table{overflow:auto;max-height:55vh;border:1px solid var(--border,#8295a7);border-radius:8px}.schedule-repair-table table{width:100%;min-width:760px;border-collapse:collapse}.schedule-repair-table th{position:sticky;top:0;background:var(--surface,#203342);z-index:1}.schedule-repair-table th,.schedule-repair-table td{padding:10px;text-align:left;border-bottom:1px solid var(--border,#8295a7)}.schedule-repair-table input[type=checkbox]{width:20px;height:20px}.schedule-repair .actions{flex-wrap:wrap;margin:12px 0}

.conclusion-return-note{margin:12px 0;padding:14px 16px;border:1px solid var(--accent);border-left:5px solid var(--accent);border-radius:8px;background:var(--surface)}.conclusion-return-note h4{margin:0 0 8px}.conclusion-review-reason{white-space:pre-wrap;overflow-wrap:anywhere}.conclusion-review-history ol{padding-left:24px;max-height:55vh;overflow:auto}.conclusion-review-history li{padding:12px 8px;border-bottom:1px solid var(--line)}.conclusion-review-history li p{margin:5px 0}

/* Act estimate picker: all positions remain reachable; no schedule-editor selectors. */
.act-picker-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:10px 0}.act-picker-toolbar>label{flex:1;min-width:200px;margin:0!important}.act-picker-modes{display:flex;gap:6px}.act-picker-modes .active{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:700}.act-picker-table{max-height:52dvh;min-height:240px;overflow:auto;border:1px solid var(--line);border-radius:8px}.act-picker-table table{width:100%;min-width:800px;margin:0;font-size:12px}.act-picker-table th{position:sticky;top:0;z-index:1;background:var(--surface);padding:8px;text-align:left}.act-picker-table td{padding:8px;vertical-align:top}.act-picker-table td:first-child{width:40%;min-width:235px;overflow-wrap:anywhere}.act-picker-table td:nth-child(2){min-width:140px}.act-picker-table td:nth-child(3){width:125px;min-width:125px}.act-picker-table small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.act-picker-table input{width:100%;min-width:90px;min-height:34px!important;margin:0!important;padding:6px 8px!important;font-variant-numeric:tabular-nums}.act-picker-table button{white-space:nowrap;min-height:34px!important;padding:6px 10px!important;font-size:12px}.act-position-money{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.act-position-selected{background:color-mix(in srgb,var(--accent) 8%,var(--surface))}.act-picker-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:12px}.act-picker-pages>div{display:flex;align-items:center;gap:8px}.act-picker-pages button{min-height:32px;padding:5px 10px}.act-picker-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:10px}.act-picker-total>span{font-size:12px;color:var(--muted)}.act-calculation-help{margin:10px 0}.act-calculation-help summary{cursor:pointer;font-weight:650}@media(max-width:600px){.act-picker-toolbar>label{flex-basis:100%}.act-picker-table{max-height:50dvh}.act-picker-pages>div{width:100%;justify-content:space-between}}

/* Own department is the primary workspace; other departments remain readable. */
.department-selector{display:flex;flex-direction:column;gap:8px;margin:12px 0}.department-selector .department-tabs{margin:0}.department-selector .department-own-tabs{display:flex}.department-selector .department-own{min-width:260px;flex:0 1 480px;border:2px solid var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface))}.department-selector .department-tab small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.department-other-tabs{border:1px solid var(--line);border-radius:9px;padding:9px 12px;background:var(--surface)}.department-other-tabs>summary{cursor:pointer;font-weight:600;font-size:13px;color:var(--muted)}.department-other-tabs[open]>.department-tabs{margin-top:10px}.department-readonly{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:8px;background:var(--surface);margin:8px 0 14px;font-size:13px}.department-readonly>div{flex:1}.department-readonly span{display:block;color:var(--muted);margin-top:4px}.department-readonly button{font-size:12px;white-space:nowrap}@media(max-width:700px){.department-selector .department-own{min-width:0;flex:1}.department-readonly{flex-wrap:wrap}}

.conclusion-preview-report{margin:16px 0}.conclusion-preview-report h3{font-size:17px;margin:12px 0}.conclusion-preview-report table{width:100%;min-width:660px}.conclusion-preview-report td,.conclusion-preview-report th{vertical-align:top}.conclusion-preview-report tbody th{position:static;min-width:140px;max-width:240px;overflow-wrap:anywhere;font-weight:600}.conclusion-preview-report .conclusion-date{white-space:nowrap}.conclusion-period-warning>th{border-left:3px solid var(--danger,#c66a76)}.conclusion-period-issues{margin:0;padding-left:18px;min-width:180px}.conclusion-period-issues li+li,.conclusion-other-issues li+li{margin-top:8px}.conclusion-preview-report .conclusion-table:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Contract context follows acceptance and payments without changing schedule editors. */
.contract-execution-links{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.contract-execution-links button{border-color:var(--accent);font-weight:650}
.execution-panel .execution-contract-context{display:block;padding:14px 16px;border-left:4px solid var(--accent);overflow-wrap:anywhere}
.execution-contract-context>strong{display:block;margin-bottom:6px}
.execution-contract-context p{margin:0 0 10px}
.execution-contract-context .actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.execution-period-filter{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.execution-period-filter label{margin:0;max-width:190px}
.execution-period-filter button{align-self:flex-end}
@media(max-width:600px){.execution-contract-context .actions button{flex:1 1 180px;white-space:normal}.contract-execution-links button{flex:1}.execution-period-filter{align-items:flex-end}}

.object-overview-contract-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.object-overview-contract-actions button{white-space:nowrap}

/* Acceptance register and cumulative work journal. */
.act-register-table{max-height:65vh;overflow:auto}.act-register-table table{min-width:850px;width:100%}.act-register-table th,.journal-table th{position:sticky;top:0;background:var(--surface);z-index:1}.act-register-table td{vertical-align:top}.act-register-table small,.journal-table small{display:block;color:var(--muted);margin-top:6px}.act-register-table .amount{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}.act-register-table .actions{gap:6px}.act-register-table button{padding:6px 10px;min-height:36px}.act-register-table td:nth-child(2){max-width:260px;overflow-wrap:anywhere}.act-status{display:inline-block;border:1px solid var(--line);border-radius:6px;padding:4px 8px;white-space:nowrap}.act-status[data-state="Принят"]{border-color:var(--accent);color:var(--accent)}.act-detail{background:var(--surface)}.act-detail .table-wrap{max-height:40vh}.act-form-step{border-bottom:1px solid var(--line);padding-bottom:10px;margin-top:22px}.act-vat-block{padding:12px;border:1px solid var(--line);border-radius:8px}.accepted-journal-toggle{margin:18px 0}.accepted-journal-toggle>summary{font-weight:700;cursor:pointer;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:8px}.accepted-journal .fields{margin-top:12px}

/* Readable quantities and explicit periods in the accepted work journal. */
.journal-period{margin:18px 0 8px}
.journal-table{max-width:100%;max-height:60vh;overflow:auto;scrollbar-gutter:stable;border:1px solid var(--line);border-radius:8px}
.journal-table:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.journal-table table{min-width:1360px;width:100%;table-layout:auto;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums}
.journal-table th,.journal-table td{padding:10px 12px;vertical-align:top}
.journal-table thead th{color:var(--text);box-shadow:0 1px var(--line)}
.journal-table th:first-child,.journal-table td:first-child{min-width:280px;width:25%;max-width:360px;overflow-wrap:anywhere}
.journal-table th:nth-child(2),.journal-table td:nth-child(2){min-width:64px;white-space:nowrap;overflow-wrap:normal;word-break:normal}
.journal-table th:nth-child(n+3){min-width:108px;text-align:right}
.journal-table td:nth-child(n+3){white-space:nowrap;overflow-wrap:normal;word-break:normal;text-align:right;max-width:none}
.journal-table::-webkit-scrollbar{width:12px;height:12px}
.journal-table::-webkit-scrollbar-track{background:var(--page)}
.journal-table::-webkit-scrollbar-thumb{background:var(--muted);border:3px solid var(--page);border-radius:8px}
.journal-table::-webkit-scrollbar-corner{background:var(--page)}
@media(max-width:720px){.journal-table{max-height:55vh}.journal-table th,.journal-table td{padding:9px 10px}}

.equipment-attachments .attachment-add {
    position: relative;
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
}
.equipment-attachments .attachment-add input[type=file] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.equipment-attachments .attachment-add:focus-within { outline: 2px solid currentColor; }
.equipment-attachments .attachment-count { margin-bottom: .4rem; }
.equipment-attachments .attachment-list { list-style: none; margin: 0; padding: 0; }
.equipment-attachments .attachment-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .8rem;
    margin: .3rem 0;
}
.equipment-attachments .attachment-list li span { min-width: 0; overflow-wrap: anywhere; }
