/* Owner Construction v366. Match the contractor portal's project header, tab buttons, and cards.
   Keep the original owner functions below each matching read-only contractor-facing card. */
.construction-hub{margin-top:20px;border:1px solid var(--border,#484238);background:var(--grey,#151515);position:relative;z-index:1;--pp-line:#423c2c;--pp-gold:#c9ad76;--pp-panel:#171717;--pp-txt:#eee9df;--pp-muted:#ada79d}
.construction-hub>summary{list-style:none;cursor:pointer}.construction-hub>summary::-webkit-details-marker{display:none}.construction-hub .construction-chevron{width:15px;height:15px;flex:none;color:var(--gold,#c8a96e);transition:transform .2s}.construction-hub[open] .construction-chevron{transform:rotate(180deg)}.construction-caption{font:11px/1.3 'Barlow Condensed',sans-serif;letter-spacing:.045em;color:var(--muted,#aaa);margin-left:auto;text-align:right}
.construction-inner{padding:16px;min-width:0}.construction-inner *{box-sizing:border-box}.construction-owner-note{color:var(--gold,#c8a96e);font:11px/1.6 'Barlow Condensed',sans-serif;letter-spacing:.15em;margin-bottom:12px}.construction-owner-note span{display:block;font:12px/1.5 Arial,sans-serif;letter-spacing:0;color:var(--muted,#aaa);margin-top:2px}
.construction-hub .pp-overview{border:1px solid var(--pp-line);background:var(--pp-panel);padding:19px;margin:0 0 15px;min-width:0}.construction-hub .pp-overview h1{font:600 clamp(19px,3.5vw,28px)/1.3 Arial,sans-serif;color:var(--pp-txt);margin:5px 0 8px;overflow-wrap:anywhere}.construction-hub .pp-overview p{font:13px/1.5 Arial,sans-serif;color:var(--pp-muted);margin:4px 0}.construction-hub .pp-stage{font:700 11px/1.4 Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--pp-gold)}.construction-hub .pp-meta{display:flex;gap:7px 16px;flex-wrap:wrap;color:var(--pp-muted);font:11px/1.5 Arial,sans-serif;margin-top:9px}
.construction-hub .pp-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 16px}.construction-hub .pp-nav button{background:#171717;border:1px solid var(--pp-line);color:var(--pp-muted);min-height:45px;padding:10px 5px;cursor:pointer;letter-spacing:.5px;font:600 13px Arial,sans-serif}.construction-hub .pp-nav button[aria-current=page]{background:var(--pp-gold);color:#111;border-color:var(--pp-gold)}.construction-hub .construction-panel[hidden]{display:none!important}.construction-hub .construction-mirror{background:var(--pp-panel);border:1px solid var(--pp-line);padding:18px;margin:0 0 16px}.construction-hub .pp-card h2{font:600 19px/1.3 Arial,sans-serif;color:var(--pp-gold);margin:0 0 8px}.construction-hub .pp-card p{font:13px/1.65 Arial,sans-serif;color:var(--pp-muted);margin:8px 0 14px}.construction-hub .pp-actions{display:flex;flex-wrap:wrap;gap:9px}.construction-hub button.pp-btn{min-height:42px;padding:9px 14px;background:#171717;border:1px solid #796643;color:var(--pp-gold);font:600 12px/1.35 Arial,sans-serif;cursor:pointer;border-radius:3px}.construction-hub button.pp-btn-primary{color:#111;background:var(--pp-gold);border-color:var(--pp-gold)}.construction-hub button.pp-btn:disabled{opacity:.45;cursor:not-allowed}.construction-hub .pp-small{font:11px/1.55 Arial,sans-serif!important;color:var(--pp-muted)!important}
.construction-owner-tools{border-top:1px solid var(--border,#555);padding-top:15px;margin-top:15px}.construction-owner-title{font:700 11px/1.4 'Barlow Condensed',sans-serif;color:var(--gold,#c8a96e);letter-spacing:.14em;margin-bottom:8px}.construction-owner-tools>details{display:block!important;margin:0!important;border:0!important;background:transparent!important;z-index:auto!important}.construction-owner-tools>details>summary{display:none!important}.construction-owner-tools>details:not([open]){display:none!important}.construction-owner-tools .pcc-inner,.construction-owner-tools .sov-content{padding-left:0;padding-right:0}.construction-owner-tools .dset-root .pcc-inner{padding-left:0;padding-right:0}
.construction-kv{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--pp-line);padding:9px 0;font:12px/1.5 Arial,sans-serif}.construction-kv>span{color:var(--pp-muted)}.construction-kv strong{font-weight:600;text-align:right;color:var(--pp-txt);overflow-wrap:anywhere}.construction-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.construction-kpis>div{padding:10px;border:1px solid var(--pp-line);min-width:0}.construction-kpis small{display:block;color:var(--pp-muted);font:11px/1.4 Arial,sans-serif}.construction-kpis strong{font:700 16px/1.5 Arial,sans-serif;color:var(--pp-gold);overflow-wrap:anywhere}
.construction-preview{padding:12px;border:1px solid var(--pp-line);margin-bottom:16px;background:var(--pp-panel);min-width:0}.construction-preview:empty{display:none}.construction-preview-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.construction-preview-head strong{font:700 11px/1.4 'Barlow Condensed',sans-serif;letter-spacing:.12em;color:var(--pp-gold)}.construction-preview-head button{font:12px Arial,sans-serif;color:var(--pp-gold);padding:7px 10px;border:1px solid var(--pp-line);background:transparent;cursor:pointer}.construction-preview-note{color:var(--pp-muted);font:12px/1.6 Arial,sans-serif;margin:9px 0}.construction-preview-scroll{max-height:380px;overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--pp-line)}.construction-preview-table{min-width:660px;width:100%}.construction-preview-table td:first-child{min-width:165px}.construction-preview-table td small{display:block;color:var(--pp-muted)}.construction-preview-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px;font:11px/1.55 Arial,sans-serif;color:var(--pp-muted)}.construction-preview-footer span:last-child{color:var(--pp-gold)}
@media(max-width:650px){.construction-inner{padding:10px}.construction-hub .pp-overview,.construction-hub .construction-mirror{padding:13px}.construction-hub .pp-nav{gap:5px}.construction-hub .pp-nav button{font-size:12px}.construction-hub .pp-actions .pp-btn{flex:1 1 125px}.construction-caption{max-width:48%;font-size:10px}.construction-kv{flex-direction:column;gap:2px}.construction-kv strong{text-align:left}.construction-preview{padding:10px}.construction-preview-head strong{flex:1}}
/* At phone widths, display bid and quantity beside the cost code without requiring a sideways swipe.
   Approved and remaining are intentionally not shown until a contract is executed. */
@media(max-width:650px){
 .construction-preview-scroll{max-height:440px;overflow-y:auto;overflow-x:hidden}
 .construction-preview-table{min-width:0;width:100%;table-layout:fixed}
 .construction-preview-table thead{display:none}
 .construction-preview-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(95px,auto);column-gap:7px;padding:8px 5px;border-bottom:1px solid var(--pp-line)}
 .construction-preview-table tbody td{display:block;border:0!important;padding:2px!important;min-width:0!important;overflow-wrap:anywhere}
 .construction-preview-table tbody td:first-child{grid-column:1;grid-row:1 / span 2;font-size:12px}
 .construction-preview-table tbody td:nth-child(2){grid-column:2;grid-row:1;text-align:right;color:var(--pp-muted);font-size:11px}
 .construction-preview-table tbody td:nth-child(3){grid-column:2;grid-row:2;text-align:right;font-size:11px;color:var(--pp-gold)}
 .construction-preview-table tbody td:nth-child(4),.construction-preview-table tbody td:nth-child(5){display:none}
}

/* v365 — a single unobtrusive status-only refresh control in the owner header. */
.construction-owner-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.construction-owner-heading .construction-owner-title{margin-bottom:0}
.construction-hub button.construction-refresh-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;border:1px solid var(--pp-line);border-radius:50%;background:transparent;color:var(--pp-gold);padding:7px;cursor:pointer;touch-action:manipulation}
.construction-hub button.construction-refresh-btn:hover,.construction-hub button.construction-refresh-btn:focus-visible{border-color:var(--pp-gold);outline-offset:2px}

/* v366: show the editor alone while creating or editing a saved draft. */
.construction-hub[data-construction-editing="true"] [data-construction-panel="contract"] > .construction-mirror,
.construction-hub[data-construction-editing="true"] [data-construction-panel="contract"] .construction-owner-heading,
.construction-hub[data-construction-editing="true"] [data-construction-panel="contract"] [id^="pcc-body-"] > .pcc-hint,
.construction-hub[data-construction-editing="true"] [data-construction-panel="contract"] [id^="pcc-body-"] > .pcc-list{display:none!important}
.construction-hub[data-construction-editing="true"] [data-construction-panel="contract"] .construction-owner-tools{border-top:0;margin-top:0;padding-top:0}
/* One Design Documents card owns the single selector and upload controls. */
.construction-design-card .dset-root{border:0;margin:0;display:block!important;background:transparent}
.construction-design-card .dset-root > summary{display:none!important}
.construction-design-card .dset-root > .pcc-inner{padding:0}
.construction-design-card .dset-panel{padding:0}
.construction-design-card .dset-root select{width:100%}
.construction-hub .construction-design-card .pp-actions{margin:10px 0 6px}

/* v368 — required sequential Construction stages: Design > Pricing > Contract. */
.construction-hub .construction-nav button[disabled],
.construction-hub .construction-nav button[aria-disabled="true"]{
  opacity:.38;filter:grayscale(1);background:repeating-linear-gradient(135deg,#151515 0,#151515 7px,#202020 7px,#202020 13px);
  border-color:#444;box-shadow:none;color:#b2b2b2;cursor:not-allowed;
}
.construction-hub .construction-nav button[aria-current="page"]:not([disabled]){background:var(--pp-gold);color:#111}
.construction-tab-lock{display:inline-block;font-size:11px;filter:grayscale(1);margin-left:2px}
.construction-tab-lock[hidden]{display:none!important}
.construction-gate-message{font:12px/1.5 Arial,sans-serif;color:var(--pp-muted);padding:0 2px 15px;margin-top:-5px;min-height:28px}
.construction-stage-card{border-top:1px solid var(--pp-line);padding-top:17px;margin-top:18px}
.construction-stage-card label{display:block;font:600 12px/1.5 Arial,sans-serif;color:var(--pp-txt);margin:12px 0 6px}
.construction-stage-card select{display:block;width:100%;min-height:44px;padding:10px 12px;color:var(--pp-txt);background:var(--pp-panel);border:1px solid var(--pp-line);font:16px Arial,sans-serif;border-radius:2px}
.construction-stage-card p{font:12px/1.6 Arial,sans-serif;color:var(--pp-muted);margin:10px 0}
.construction-stage-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.construction-stage-state{font:12px/1.5 Arial,sans-serif;color:var(--pp-gold)!important}
.construction-hub .construction-stage-card .construction-stage-actions .pp-btn:first-child{flex:1 1 185px}
.construction-hub .construction-stage-card .construction-stage-actions .pp-btn:last-child{width:42px;flex:0 0 42px}
@media(max-width:650px){.construction-tab-lock{font-size:10px;margin-left:0}.construction-hub .construction-nav button{min-width:0;padding:10px 2px}}
