/* The work-area visual language, shared by all interactive workspaces.
   Screen-only: issued quotations, application PDFs and reports retain their layouts. */
@media screen {
 :root{
  --bindr-section-gap:16px;
  --bindr-inner-gap:10px;
  --bindr-section-accent:#bbc3ce;
  --bindr-section-heading:#d7dce2;
  --bindr-section-edge:#bbc3ce;
  --bindr-section-orange:#ee791e;
  --bindr-section-footer:#edf0f4;
 }
 .app-shell .view :is(.panel,.crm-panel,.workflow-panel,.cvr-report-panel,.cvr-costing-box,.cvr-comparison-box,.qr-info-card,.qr-quote-card,.template-panel,.saved-card,.job-folder,.project-file-explorer,.vjf-overview-card){
  min-width:0;border:1px solid var(--bindr-section-edge);border-radius:7px;background:var(--bindr-card);box-shadow:none;
 }
 .app-shell .view :is(.crm-two-col,.business-setup-grid,.quote-template-layout,.template-layout,.cvr-report-panels,.saved-grid,.vjf-overview-grid){gap:var(--bindr-section-gap)}
 .app-shell .view :is(.metric-grid,.crm-kpis,.cvr-report-metrics,.ku-summary,.vjf-summary-grid){background:transparent;box-shadow:none;gap:10px}
 .app-shell .view :is(.metric-grid,.crm-kpis,.cvr-report-metrics,.vjf-summary-grid)>article,.app-shell .view .ku-summary>div{
  border:1px solid var(--bindr-section-edge);border-top:3px solid #596777;border-radius:7px;background:#fff;box-shadow:none;min-width:0;
 }
 /* Consistent headings identify the usable section without extra containers. */
 .app-shell .view :is(.panel>.section-heading,.crm-panel-heading,.workspace-section>.workspace-section-heading,.workflow-heading,.qr-section-heading,.qr-view-heading,.cvr-costing-heading,.cvr-report-panel-heading,.cvr-report-panel>h3,.cvr-comparison-box>h3,.vjf-overview-card>h3,.job-folder>summary,.qr-quote-card>summary),
 .app-shell .view .template-panel>:is(h3:first-child,.panel-title-row:first-child),
 .app-shell .view .material-library-layout :is(.material-library-main,.material-library-waiting)>.section-heading{
  background:var(--bindr-section-heading)!important;color:var(--bindr-text)!important;
  border-left:4px solid var(--bindr-section-orange)!important;border-bottom:1px solid var(--bindr-section-edge);
  padding:10px 14px;gap:8px 14px;box-shadow:none;
 }
 .app-shell .view :is(.crm-panel-heading,.section-heading,.workspace-section-heading,.workflow-heading,.qr-view-heading,.cvr-costing-heading,.cvr-report-panel-heading,.panel-title-row){flex-wrap:wrap;min-width:0}
 .app-shell .view :is(.crm-panel-heading,.section-heading,.workspace-section-heading,.workflow-heading,.qr-section-heading,.qr-view-heading,.cvr-costing-heading,.cvr-report-panel-heading,.panel-title-row) :is(h2,h3){
  font-size:1rem;line-height:1.4;font-weight:650;color:var(--bindr-text);margin:0;overflow-wrap:anywhere;
 }
 .app-shell .view :is(.crm-panel-heading,.section-heading,.cvr-costing-heading,.cvr-report-panel-heading)>:is(p,span,small){color:#4c5867;line-height:1.4}
 .app-shell .view :is(.crm-panel-heading,.section-heading,.cvr-costing-heading,.cvr-report-panel-heading) .top-actions{flex-wrap:wrap}
 .app-shell .view :is(.crm-panel,.cvr-report-panel,.cvr-costing-box,.cvr-comparison-box,.job-folder){margin-bottom:16px}
 .app-shell .view .crm-panel>.crm-table-wrap{border:0;margin:0;border-radius:0 0 7px 7px;box-shadow:none}
 .app-shell .view :is(.crm-filters,.cvr-report-filters,.estimate-link,.bindr-company-summary){border-color:var(--bindr-section-edge);box-shadow:none;border-radius:7px}
 /* Compact, alternating rows and quiet total bands are shared by registers. */
 .app-shell .view :is(.crm-table,.rate-table,.fx-table,.cvr-table,.job-saved-table,.material-buying-table) th{
  background:#e9edf2;color:#475463;border-bottom-color:#c7cfd9;font-size:.8125rem;line-height:1.4;
 }
 .app-shell .view :is(.crm-table,.rate-table,.fx-table,.cvr-table,.job-saved-table,.material-buying-table) tbody tr:not(.total):nth-child(even)>td{background:#f4f6f8}
 .app-shell .view :is(.crm-table,.rate-table,.fx-table,.cvr-table,.job-saved-table,.material-buying-table) tbody tr:hover>td{background:#eaf0f6}
 .app-shell .view :is(.crm-table,.rate-table,.fx-table,.cvr-table,.job-saved-table,.material-buying-table) td{border-bottom-color:#dce1e7}
 .app-shell .view :is(.pipeline-toolbar,.pipeline-pagination,.fx-toolbar,.fx-path,.fx-status){background:#edf0f4;border-color:#cbd3dd;color:#4c5867}
 .app-shell .view :is(.crm-table,.cvr-table,.job-saved-table) tfoot :is(td,th),.app-shell .view .cvr-report-total{
  background:var(--bindr-section-footer);border-top:1px solid var(--bindr-section-edge);color:var(--bindr-text);font-variant-numeric:tabular-nums;
 }
 /* Estimate cost sections use the same heading as the work areas above. */
 #estimateView #allowanceInputs .compact-cost-section,#estimateView #materialPricing,#estimateView .subcontract-panel{
  border:1px solid var(--bindr-section-edge);border-radius:7px;background:#fff;box-shadow:none;
 }
 #estimateView #allowanceInputs .compact-cost-section>.allowance-section-heading,#estimateView #materialPricing>.section-heading{
  border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);background:var(--bindr-section-heading)!important;color:var(--bindr-text);padding:10px 12px;gap:8px 14px;
 }
 #estimateView #allowanceInputs .cost-section-total{color:#252c35;font-variant-numeric:tabular-nums}
 #estimateView .estimate-profit-summary{background:var(--bindr-section-footer);border-color:var(--bindr-section-edge)}
 #estimateView .estimate-cost-card{background:#fff;border-color:var(--bindr-section-edge)}
 #estimateView .estimate-cost-card h3{padding:7px 10px;margin:-10px -12px 10px;border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);background:var(--bindr-section-heading);border-radius:4px 4px 0 0}
 /* Job and opportunity folders, including history, documents and recovery. */
 #recordView .vjf-content,#recordView .virtual-job-file .fx-main{background:var(--bindr-bg)}
 #recordView :is(.fx-folder-heading,.qr-view-heading){background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);padding:10px 14px;gap:8px 14px;flex-wrap:wrap}
 #recordView .vjf-overview-card{overflow:hidden}
 #recordView .vjf-overview-card>h3{margin:0;padding:10px 14px}
 #recordView :is(.record-details,.record-notes,.qr-readonly-estimate,.vjf-locked-estimate){border-color:var(--bindr-section-edge);background:#fff;box-shadow:none}
 #recordView .record-notes>h3{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);padding:8px 10px;margin:0 0 10px}
 #recordView :is(.qr-readonly-toolbar,.job-pricing-totals,.recovery-summary){background:var(--bindr-section-footer);border-color:var(--bindr-section-edge)}
 #recordView .recovery-summary article{border-color:#cbd3dd}
 .view .pipeline-column>header{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);padding:10px 12px;border-radius:6px 6px 0 0}
 .app-shell .view .crm-kpis>.crm-kpi-button{border:1px solid var(--bindr-section-edge);border-top:3px solid #596777;border-radius:7px;background:#fff;padding:10px 12px;box-shadow:none}
 .app-shell .view .crm-kpis>.crm-kpi-button:hover{background:#f0f4f8}
 .app-shell .view .crm-quote-hubs{gap:16px}
 .app-shell .view .crm-quote-hub{border:1px solid var(--bindr-section-edge);border-left:4px solid var(--bindr-section-orange);border-radius:7px;background:#fff;box-shadow:none;color:var(--bindr-text)}
 .app-shell .view .crm-quote-hub:hover{background:#f4f6f8;border-color:#8d9bab;border-left-color:var(--bindr-section-orange)}
 .app-shell .view .crm-quote-hub dl{border-top:1px solid #d6dde5}
 .app-shell .view .crm-quote-hub :is(.crm-quote-hub-label,.crm-quote-hub-action){color:#303f50}
 #recordView .vjf-overview-card>header{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);padding:10px 14px;gap:8px;flex-wrap:wrap}
 #recordView .vjf-overview-card>header h3{font-size:1rem;margin:0;color:var(--bindr-text)}
 /* Applications: draft details, valued lines, totals and history stay distinct. */
 #recordView .afp{background:var(--bindr-bg);padding:14px}
 #recordView .afp>fieldset{background:#fff;border:1px solid var(--bindr-section-edge)!important;border-radius:7px;padding:14px!important;margin:0 0 16px}
 #recordView .afp>fieldset>h3,#recordView .afp-history>h3{
  margin:-14px -14px 14px;padding:10px 14px;border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);border-radius:6px 6px 0 0;background:var(--bindr-section-heading);color:var(--bindr-text);font-size:1rem;
 }
 #recordView .afp-fields{gap:10px 14px;padding:0 0 12px;border-bottom:1px solid #dce1e7}
 #recordView .afp-table-wrap{border:1px solid var(--bindr-section-edge);border-radius:5px;background:#fff}
 #recordView .afp-table th{background:#e9edf2;color:#475463}
 #recordView .afp-table tbody tr:nth-child(even)>td{background:#f4f6f8}
 #recordView .afp-table :is(td,th){border-color:#dce1e7}
 #recordView .afp-history{margin-top:16px;padding:14px;background:#fff;border:1px solid var(--bindr-section-edge);border-radius:7px}
 #recordView .afp-totals{padding:12px 14px;border:1px solid var(--bindr-section-edge);border-radius:5px;background:var(--bindr-section-footer);gap:12px 22px}
 #recordView .afp-totals strong{color:#252c35;font-size:1.125rem;font-variant-numeric:tabular-nums}
 #recordView .afp-totals>span:last-child strong{border-bottom:2px solid var(--bindr-section-orange)}
 #recordView .afp-note,#recordView .afp-table small{color:#596574}
 #recordView .afp-status:empty{display:none}
 /* Daily cost sheet and commercial dialogs share section framing. */
 #cvrDialog{background:var(--bindr-bg)}
 #cvrForm .cvr-section{border:1px solid var(--bindr-section-edge);border-radius:7px;background:#fff;margin-bottom:16px}
 #cvrForm .cvr-section>.cvr-section-heading,#cvrForm>header{
  background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);color:var(--bindr-text);gap:8px 14px;
 }
 #cvrForm .cvr-section>.cvr-section-heading{padding:10px 12px}
 #cvrForm :is(.cvr-meta,.cvr-totals){border-color:var(--bindr-section-edge);border-radius:7px}
 #cvrForm .cvr-totals{background:var(--bindr-section-footer);font-variant-numeric:tabular-nums}
 #cvrForm .cvr-section table th{background:#e9edf2;color:#475463}
 #cvrForm .cvr-section table tbody tr:nth-child(even)>td{background:#f4f6f8}
 #cvrForm .cvr-work-package{border:1px solid var(--bindr-section-edge);border-radius:5px;margin-block:10px;background:#fff}
 #cvrForm .cvr-work-package>summary{padding:9px 12px;background:var(--bindr-section-footer);border-bottom:1px solid #d6dde5;color:#303f50}
 .backup-dialog>header{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);gap:10px;flex-wrap:wrap}
 .backup-list-row:nth-of-type(even){background:#f4f6f8}
 #crmForm .enquiry-inline-client{border:1px solid var(--bindr-section-edge);border-radius:6px;background:#f4f6f8}
 #crmForm .enquiry-inline-client legend{padding:4px 10px;border-left:4px solid var(--bindr-section-orange);background:var(--bindr-section-heading);color:var(--bindr-text)}
 dialog:not(.afp-preview){border-color:var(--bindr-section-edge);border-radius:8px;color:var(--bindr-text)}
 :is(#crmForm,#chaseDialog,.visit-dialog form)>header{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);padding:10px 14px;border-radius:5px 5px 0 0;flex-wrap:wrap}
 :is(#crmForm,.visit-dialog form)>footer{background:var(--bindr-section-footer);border-color:var(--bindr-section-edge);padding:10px 14px;gap:8px;flex-wrap:wrap}
 .afp-review h2{background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);padding:10px 14px;font-size:1rem}
 .afp-review th{background:#e9edf2;color:#475463}
 .afp-review td,.afp-review th{border-color:#dce1e7}
 .afp-review small{color:#596574}
 /* Optional Take-off keeps the drawing canvas untouched. */
 #takeoffView :is(.tw-panel-heading,.tw-detail-heading){background:var(--bindr-section-heading);border-left:4px solid var(--bindr-section-orange);border-bottom:1px solid var(--bindr-section-edge);padding:8px 10px;color:var(--bindr-text)}
 #takeoffView .tw-detail-section{border-color:var(--bindr-section-edge);background:#fff;box-shadow:none}
 #takeoffView .tw-area-group{border-color:var(--bindr-section-edge);box-shadow:none}
 #takeoffView .tw-area-content{background:var(--bindr-bg)}
 #knockUpView :is(.ku-toolbar,.ku-detail-controls){background:var(--bindr-section-heading);border-color:var(--bindr-section-edge);border-left:4px solid var(--bindr-section-orange)}
 #knockUpView .ku-area-head :is(td,th){background:var(--bindr-section-heading);color:var(--bindr-text)}
 @media(max-width:700px){
  :root{--bindr-section-gap:12px}
  .app-shell .view :is(.section-heading,.crm-panel-heading,.cvr-report-panel-heading,.qr-view-heading){padding:10px;gap:8px;align-items:flex-start}
  .app-shell .view :is(.section-heading,.crm-panel-heading,.cvr-report-panel-heading)>.top-actions{width:100%}
  #recordView .afp{padding:10px}
  #recordView .afp-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 }
 @media(max-width:440px){#recordView .afp-fields{grid-template-columns:minmax(0,1fr)}}
}
