/* v0.9.30 — scoped cost workspace. No shrinking fonts or hidden horizontal data. */
#tab-capex.cost30-workspace { container:cost30 / inline-size; min-width:0; max-width:100%; }
#tab-capex [data-capex-panel][hidden],#capexImportedEditorNotice[hidden] { display:none!important; }
.cost30-workspace .cost30-dashboard,.cost30-workspace .cost30-panel { min-width:0; max-width:100%; overflow:visible; }
.cost30-workspace .card-heading { display:flex; flex-wrap:wrap; gap:14px; align-items:flex-start; }
.cost30-workspace .card-heading>div { flex:1 1 300px; min-width:0; }
.cost30-workspace .card-heading h2 { overflow-wrap:anywhere; line-height:1.35; }
.cost30-result-badge { color:#69788b; background:#f4f6f9; border:1px solid #e0e6ed; border-radius:20px; padding:6px 10px; font-size:11px; white-space:nowrap; }
.cost30-status { color:#67778c; font-size:12px; line-height:1.5; margin:6px 0 14px; overflow-wrap:anywhere; }
.cost30-status.error { border:1px solid #f0cfcb; padding:12px; background:#fff6f4; color:#9d3430; border-radius:8px; }
.cost30-method { margin-top:5px; }
.cost30-method summary { cursor:pointer; display:list-item; color:#476a91; }
.cost30-method p { margin:7px 0; }
#costStructureSummaryGrid.cost30-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:12px 0; }
.cost30-tile { font:inherit; text-align:left; min-width:0; padding:16px; display:flex; flex-direction:column; gap:7px; border:1px solid #dce4ee; border-radius:11px; background:#fff; color:#182d48; box-shadow:0 2px 7px rgba(19,42,67,.025); transition:border-color .15s,box-shadow .15s; }
.cost30-tile:hover,.cost30-tile:focus-visible { border-color:#ba8619; box-shadow:0 3px 13px rgba(114,87,34,.1); outline:2px solid transparent; }
.cost30-tile:focus-visible { outline:2px solid #b58115; outline-offset:2px; }
.cost30-tile-label { color:#63758a; font-size:12px; line-height:1.4; display:flex; justify-content:space-between; gap:8px; }
.cost30-tile-label b { color:#98a4b6; font-size:15px; }
.cost30-tile>strong { color:#152b46; font-size:24px; line-height:1.15; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cost30-exact { font-size:11px; color:#53677f; white-space:nowrap; }
.cost30-tile-note { font-size:11px; color:#748196; line-height:1.4; }
.cost30-tile.total { background:#fffaf0; border-top:3px solid #bd8b28; padding-top:14px; }
.cost30-tile.direct { border-top:3px solid #5187b2; padding-top:14px; }
.cost30-tile.common { border-top:3px solid #c49a4c; padding-top:14px; }
.cost30-tile.warning { background:#fff5f0; border-color:#d78263; }
.cost30-tile.check .cost30-tile-note { color:#367653; }
.cost30-composition { margin-top:14px; }
.cost30-bar { display:flex; height:12px; border-radius:5px; overflow:hidden; }
.cost30-bar button { border:0; padding:0; min-width:0; }
.cost30-bar button:focus-visible { outline:2px solid #172d49; outline-offset:-2px; }
.cost30-bar .direct,.cost30-bar-legend .direct { background:#5187b2; }
.cost30-bar .common,.cost30-bar-legend .common { background:#c49a4c; }
.cost30-bar-legend { display:flex; flex-wrap:wrap; gap:8px 24px; color:#64758a; font-size:12px; margin-top:8px; }
.cost30-bar-legend span { display:flex; align-items:center; gap:7px; }
.cost30-bar-legend i { display:inline-block; width:10px; height:10px; border-radius:2px; }
.cost30-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.cost30-shortcuts .button { font-size:12px; white-space:normal; text-align:left; }
.cost30-snapshot-note { color:#8491a1; font-size:11px; line-height:1.5; margin:12px 0 0; }
.cost30-calculation-check { padding:14px; }
.cost30-calculation-check>summary { cursor:pointer; font-weight:650; color:#54687e; }
.cost30-check-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.cost30-check-grid .project-kpi { min-width:0; }
.cost30-type-list { display:grid; gap:14px; }
.cost30-type { min-width:0; border:1px solid #dce4ed; border-radius:10px; background:#fff; }
.cost30-type>header { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; background:#f7f9fb; padding:12px 15px; border-bottom:1px solid #e4e9f0; border-radius:10px 10px 0 0; }
.cost30-type h3 { min-width:0; flex:1 1 320px; overflow-wrap:anywhere; margin:0; font-size:14px; line-height:1.45; }
.cost30-type>header>span { color:#718098; font-size:12px; line-height:1.5; }
.cost30-type-fields { display:grid; grid-template-columns:minmax(130px,.8fr) minmax(200px,2fr) minmax(150px,1fr) minmax(155px,1fr); align-items:start; gap:14px; padding:15px; }
.cost30-type-fields label { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px; color:#65758b; }
.cost30-type-fields label>span { font-weight:600; }
.cost30-type-fields .mini-input,.cost30-type-fields .mini-select,.cost30-type-fields .analogue-select { min-width:0!important; max-width:100%; width:100%!important; height:40px; font-size:13px; border-radius:7px; }
.cost30-type-fields small { line-height:1.4; overflow-wrap:anywhere; color:#7d8da1; }
.cost30-type-fields .cost30-rate-field input { text-align:right; font-weight:750; background:#fff6d6; }
.cost30-type-fields .cost30-type-action { align-self:start; margin-top:24px; min-width:0; }
.cost30-type-action .button { width:100%; min-width:0; min-height:40px; font-size:12px; white-space:normal; }
.cost30-workspace .cost30-table-wrap { width:100%; max-width:100%; min-width:0; overflow:visible; }
.cost30-workspace table.cost30-table { min-width:0!important; width:100%!important; table-layout:fixed; border-collapse:separate; border-spacing:0; }
.cost30-table th { background:#f4f6f9; color:#586c84; padding:12px; font-size:12px; line-height:1.4; font-weight:650; white-space:normal; text-align:left; position:static; }
.cost30-table td { padding:14px 12px; font-size:13px; line-height:1.5; vertical-align:top; border-bottom:1px solid #e3e9f0; white-space:normal; overflow-wrap:anywhere; color:#334d6a; }
.cost30-table td strong { color:#1c3452; }
.cost30-table .cost30-number { text-align:right; font-variant-numeric:tabular-nums; }
.cost30-number>strong,.cost30-number>.cost30-unit { white-space:nowrap; }
.cost30-house-table th:first-child { width:34%; }
.cost30-house-table th:not(:first-child) { width:22%; text-align:right; }
.cost30-register-table th:first-child { width:37%; }
.cost30-register-table th:not(:first-child) { width:21%; text-align:right; }
.cost30-detail-table th:nth-child(1) { width:37%; }
.cost30-detail-table th:nth-child(2) { width:22%; text-align:right; }
.cost30-detail-table th:nth-child(3) { width:41%; }
.cost30-house-link { padding:0; color:#193d68; background:none; border:0; line-height:1.5; font-size:13px; font-weight:750; text-align:left; overflow-wrap:anywhere; }
.cost30-house-link:hover { color:#aa790d; text-decoration:underline; }
.cost30-house-link:focus-visible { outline:2px solid #bb8625; outline-offset:3px; }
.cost30-cell-meta { display:block; margin-top:5px; color:#7889a0; font-size:11px; line-height:1.5; }
.cost30-unit { display:block; margin-top:5px; color:#647b96; font-size:12px; }
.cost30-table tr.selected td { background:#fffcf4; }
.cost30-row-more { margin-top:9px; text-align:left; font-size:11px; color:#6d819a; }
.cost30-row-more summary { cursor:pointer; display:list-item; color:#577598; line-height:1.5; }
.cost30-row-more>span { display:block; margin-top:7px; }
.cost30-item-info { display:grid; gap:7px; font-size:12px; line-height:1.5; color:#728299; }
.cost30-item-info b { font-weight:550; color:#5a718c; }
.cost30-house-picker { display:flex; flex-direction:column; gap:8px; max-width:100%; width:680px; color:#657a94; font-size:12px; margin:4px 0 14px; }
.cost30-house-picker select { width:100%; min-width:0; max-width:100%; height:42px; border:1px solid #d6dee8; border-radius:8px; padding:8px 12px; background:#f7f9fb; color:#243e5c; }
.cost30-selected-name { overflow-wrap:anywhere; margin:10px 0; }
.cost30-selected-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:10px 0 22px; }
.cost30-metric { display:flex; flex-direction:column; gap:8px; background:#f7f9fc; border:1px solid #e0e7ef; border-radius:9px; padding:12px; min-width:0; }
.cost30-metric>span { font-size:12px; color:#6c7e94; line-height:1.5; }
.cost30-metric>strong { color:#1e3755; font-size:17px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.cost30-workspace .cost30-empty td { padding:20px; color:#7b899a; }
.cost30-panel>h3 { margin:20px 0 12px; font-size:15px; }
.cost30-panel { scroll-margin-top:190px; }
@container cost30 (max-width:1080px) {
  .cost30-type-fields { grid-template-columns: minmax(140px,1fr) minmax(210px,2fr); }
  .cost30-type-fields .cost30-type-action { align-self:center; margin-top:0; }
  .cost30-type-action .button { width:auto; min-width:190px; }
}
@container cost30 (max-width:860px) {
  #costStructureSummaryGrid.cost30-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cost30-selected-grid,.cost30-check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cost30-table, .cost30-table tbody { display:block; }
  .cost30-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .cost30-table tr:not(.cost30-empty) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid #dfe6ef; border-radius:9px; margin-bottom:14px; padding:6px; background:#fff; }
  .cost30-table td { display:block; width:auto!important; min-width:0; padding:10px!important; border:0!important; text-align:left!important; }
  .cost30-table td:first-child { grid-column:1 / -1; }
  .cost30-table td::before { content:attr(data-label); display:block; color:#7d8ca1; font-size:11px; margin-bottom:6px; }
  .cost30-table td:first-child::before { display:none; }
  .cost30-table .cost30-number { text-align:left; }
  .cost30-table tr.cost30-empty { display:block; }
  .cost30-row-more { max-width:100%; }
}
@container cost30 (max-width:520px) {
  #costStructureSummaryGrid.cost30-kpis,.cost30-selected-grid,.cost30-check-grid,.cost30-type-fields { grid-template-columns:minmax(0,1fr); }
  .cost30-table tr:not(.cost30-empty) { grid-template-columns:minmax(0,1fr); }
  .cost30-tile>strong { font-size:23px; }
  .cost30-type-action .button,.cost30-shortcuts .button { width:100%; min-width:0; }
}
@media print { .cost30-shortcuts,.cost30-type-action,.cost30-house-picker {display:none!important;} .cost30-tile {box-shadow:none;} }
/* Match existing card header inset; never let child content touch the border. */
.cost30-dashboard > :not(.card-heading) { margin-left:18px; margin-right:18px; }
.cost30-dashboard > :last-child { margin-bottom:16px; }
.cost30-panel .cost30-type-list { margin:0 18px 18px; }
.cost30-panel .cost30-table-wrap { width:auto; max-width:calc(100% - 36px); margin:0 18px 18px; }
.cost30-panel > .cost30-selected-summary,.cost30-panel > .cost30-status,.cost30-panel > h3 { margin-left:18px; margin-right:18px; }
.cost30-panel .cost30-house-picker { width:min(680px,calc(100% - 36px)); margin-left:18px; margin-right:18px; }
.cost30-type-fields .money-input-source,.cost30-type-fields .numeric-input-source { width:1px!important; max-width:1px!important; min-width:0!important; height:1px!important; }
#tab-capex .cost30-table td.cost30-number {text-align:right;}
@container cost30 (max-width:860px) {#tab-capex .cost30-table td.cost30-number {text-align:left;}}

body.kmop-cost30-active {min-width:0;}
#costStructureSummaryGrid.cost30-kpis {margin-left:18px; margin-right:18px;}
