/* ShahrVam v589 — deliberate UI refinement / readability pass */
:root{--v589-text:#15344d;--v589-muted:#5e7484;--v589-line:#d6e2e9;--v589-soft:#f6f9fb;--v589-navy:#123e61;--v589-blue:#246b9a;--v589-green:#176b52;--v589-amber:#8a5b0a;--v589-red:#963a3a}

/* Payment verification: compact, readable, strong hierarchy. */
body[data-page="reconciliation"] .pv-list{gap:12px}
body[data-page="reconciliation"] .pv-request{padding:14px 16px;border-radius:14px;border-color:#cfdee7;box-shadow:0 4px 14px rgba(18,62,97,.05);color:var(--v589-text)}
body[data-page="reconciliation"] .pv-request:hover{border-color:#a9c4d5;box-shadow:0 7px 18px rgba(18,62,97,.08)}
body[data-page="reconciliation"] .pv-request-summary{display:grid;grid-template-columns:minmax(210px,1.1fr) minmax(480px,2.5fr) auto;align-items:center;gap:14px}
body[data-page="reconciliation"] .pv-request-identity{display:grid;gap:3px;min-width:0}
body[data-page="reconciliation"] .pv-request-identity .pv-channel{font-size:12px;color:#235f88;font-weight:850}
body[data-page="reconciliation"] .pv-request-identity>b{font-size:17px;line-height:1.5;color:#102f47;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-page="reconciliation"] .pv-request-identity>small{font-size:13px;color:#526b7c;font-weight:650}
body[data-page="reconciliation"] .pv-request-keyfacts{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:7px}
body[data-page="reconciliation"] .pv-request-keyfacts>span{min-height:58px;border:1px solid #dbe6ec;background:#f7fafc;border-radius:10px;padding:8px 10px;display:grid;align-content:center;gap:2px}
body[data-page="reconciliation"] .pv-request-keyfacts small{font-size:12px;color:#5c7180;font-weight:750}
body[data-page="reconciliation"] .pv-request-keyfacts b{font-size:15px;color:#122f45;white-space:nowrap}
body[data-page="reconciliation"] .pv-request-keyfacts b em{font-style:normal;font-size:12px;color:#5e7484}
body[data-page="reconciliation"] .pv-status{padding:7px 11px;font-size:12px;line-height:1.35;white-space:nowrap;border:1px solid transparent}
body[data-page="reconciliation"] .pv-status.is-requested{background:#fff4d8;color:#6f4800;border-color:#edcf8b}
body[data-page="reconciliation"] .pv-status.is-approved,body[data-page="reconciliation"] .pv-status.is-invoice{background:#e9f3ff;color:#174f79;border-color:#c5dff4}
body[data-page="reconciliation"] .pv-status.is-final{background:#fff0d4;color:#764900;border-color:#eacb89}
body[data-page="reconciliation"] .pv-status.is-done{background:#e5f5ed;color:#195c45;border-color:#bfe2d0}
body[data-page="reconciliation"] .pv-status.is-returned{background:#fdeaea;color:#8a2f2f;border-color:#edc4c4}
body[data-page="reconciliation"] .pv-request-meta-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:9px 0 8px;gap:7px}
body[data-page="reconciliation"] .pv-request-meta-grid>div{padding:7px 10px;min-height:48px;background:#f9fbfc;border:1px solid #e4ebef}
body[data-page="reconciliation"] .pv-request-meta-grid span{font-size:11.5px;color:#617787}
body[data-page="reconciliation"] .pv-request-meta-grid b{font-size:13.5px;color:#18384f}
body[data-page="reconciliation"] .pv-match-card{margin-top:8px;border-radius:10px;padding:10px 12px;display:grid;grid-template-columns:145px 1fr;align-items:center;gap:12px;border:1px solid #d8e4ea;background:#f8fbfc}
body[data-page="reconciliation"] .pv-match-label{font-size:12px;font-weight:900;color:#294e69}
body[data-page="reconciliation"] .pv-match-card>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-width:0}
body[data-page="reconciliation"] .pv-match-card>div b{font-size:15px;color:#15374f}
body[data-page="reconciliation"] .pv-match-card>div span{font-size:12.5px;color:#425d70;font-weight:650}
body[data-page="reconciliation"] .pv-match-card.is-strong{background:#eaf7f1;border-color:#b9dfcc}.pv-match-card.is-strong .pv-match-label{color:#145f47}
body[data-page="reconciliation"] .pv-match-card.is-possible{background:#fff8e8;border-color:#ead6a5}.pv-match-card.is-possible .pv-match-label{color:#79500b}
body[data-page="reconciliation"] .pv-match-card.is-reserved{background:#edf5fb;border-color:#c7dce9}.pv-match-card.is-reserved .pv-match-label{color:#185a85}
body[data-page="reconciliation"] .pv-match-card.is-empty{background:#f7f9fa;color:#536b7a}
body[data-page="reconciliation"] .pv-no-bank.is-warning{background:#fff7e6;border-color:#e8cf96;color:#684607;font-size:13px}
body[data-page="reconciliation"] .pv-request-actions{margin-top:10px;justify-content:flex-start;gap:8px}
body[data-page="reconciliation"] .pv-request-actions .pv-btn{min-height:42px;padding:9px 14px;font-size:14px;border-radius:10px}
body[data-page="reconciliation"] .pv-btn-primary{background:#123e61;color:#fff!important;border-color:#123e61!important}.pv-btn-primary:hover{background:#0e3452}
body[data-page="reconciliation"] .pv-btn-muted{background:#eef3f6;color:#284c65;border-color:#cedde6}
body[data-page="reconciliation"] .pv-btn-success{background:#176b52;color:#fff}
body[data-page="reconciliation"] .pv-compare span{font-size:11.5px}.pv-compare b{font-size:14px}.pv-compare small,.pv-compare i{font-size:11px}

/* Sales report: remove KPI visual footprint and make filters/row controls minimal. */
body[data-page="sales-report"] .sales-report-page{gap:9px}
body[data-page="sales-report"] .v286-sales-report-tabs{padding:3px;border-radius:12px;box-shadow:none;margin-bottom:2px;background:#f5f8fa}
body[data-page="sales-report"] .v286-sales-report-tabs button{min-height:34px;border-radius:9px;font-size:13px}
body[data-page="sales-report"] .sales-report-filter-card{border:1px solid #d8e3ea;border-radius:13px;box-shadow:none;background:#fff}
body[data-page="sales-report"] .sales-report-section-head{min-height:44px;padding:7px 11px;border-bottom:1px solid #e7edf1}
body[data-page="sales-report"] .sales-report-section-head>span{width:30px;height:30px}.sales-report-section-head b{font-size:14px;color:#17384f}
body[data-page="sales-report"] .sales-report-filter-body{padding:9px 10px}
body[data-page="sales-report"] .sales-report-primary-filters{grid-template-columns:repeat(4,minmax(140px,1fr));gap:7px}
body[data-page="sales-report"] .sales-report-primary-filters .field label,body[data-page="sales-report"] .sales-bank-filter-grid .field label{font-size:12px;color:#39566b;font-weight:750}
body[data-page="sales-report"] .sales-report-primary-filters :is(select,input),body[data-page="sales-report"] .sales-bank-filter-grid :is(select,input){min-height:38px;border-radius:9px;color:#17364c;background:#fff;border-color:#cbdbe5;font-size:13px}
body[data-page="sales-report"] .sales-report-filter-actions{grid-column:auto;align-self:end}.sales-report-filter-actions .btn{min-height:38px;height:38px;border-radius:9px;font-size:13px}
body[data-page="sales-report"] .sales-bank-filter-panel{margin-top:6px;border:1px solid #e0e8ed;border-radius:9px}.sales-bank-filter-panel>summary{min-height:35px}
body[data-page="sales-report"] .sales-report-list-card{border:1px solid #d8e3ea;border-radius:13px;overflow:visible;background:#fff}
body[data-page="sales-report"] .sales-report-selection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid #e5ecef;background:#f9fbfc}
body[data-page="sales-report"] .sales-report-selection-main,body[data-page="sales-report"] .sales-report-selection-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body[data-page="sales-report"] .sales-report-page-size{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:750;color:#405d71}.sales-report-page-size select{height:36px;min-width:82px;border:1px solid #cbdbe5;border-radius:8px;background:#fff;color:#17364c;font:inherit;padding:0 8px}
body[data-page="sales-report"] .sales-report-selection-count{display:flex;align-items:baseline;gap:5px;padding:5px 9px;border-radius:8px;background:#edf4f8;color:#284e69}.sales-report-selection-count b{font-size:16px}.sales-report-selection-count span{font-size:12px;font-weight:700}
body[data-page="sales-report"] .sales-report-selection-actions .btn{min-height:36px;border-radius:8px;font-size:12.5px;padding:0 11px}.sales-report-export-selected{gap:6px}.sales-report-export-selected svg{width:16px;height:16px}
body[data-page="sales-report"] .sales-select-cell{width:42px!important;text-align:center!important}.sales-select-cell input{width:17px;height:17px;accent-color:#123e61;cursor:pointer}
body[data-page="sales-report"] .sales-report-table th{font-size:12px;color:#38556a;background:#f5f8fa}.sales-report-table td{font-size:13px;color:#17364c}
body[data-page="sales-report"] .sales-report-table th:nth-child(1){width:42px}.sales-report-table th:nth-child(2){width:52px}.sales-report-table th:nth-child(3){width:105px}

/* Lead inventory: requested simplification. */
body[data-page="lead-import"] .lead-v370-summary{gap:9px}
body[data-page="lead-import"] .lead-v370-kpi{min-height:78px;padding:12px 14px}.lead-v370-kpi small{font-size:12.5px;color:#476174;font-weight:800}.lead-v370-kpi b{font-size:26px;color:#173a53}.lead-v370-kpi>span{display:none!important}
body[data-page="lead-import"] .lead-v559-allocation-stats>header{padding:12px 14px;border-bottom:1px solid #e3eaee}.lead-v559-allocation-stats>header h2{font-size:16px;color:#173a53;margin:0}.lead-v559-allocation-stats>header :is(small,p){display:none!important}
body[data-page="lead-import"] .lead-v589-inventory-clean{padding-top:0;overflow:visible}.lead-v589-inventory-clean>.lead-v370-bulk:empty{display:none}.lead-v589-inventory-clean .lead-v370-table-wrap{margin-top:0}
body[data-page="lead-import"] .lead-v589-manager-requests{margin:0 0 10px;overflow:hidden;border:1px solid #cfdee7;border-radius:14px;box-shadow:none}.lead-v589-manager-requests>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;background:#f7fafc;border-bottom:1px solid #dfe8ed}.lead-v589-manager-requests h2{margin:0;font-size:16px;color:#153850}.lead-v589-manager-requests>header>span{font-size:12px;font-weight:800;color:#34596f;background:#e7f0f5;padding:5px 8px;border-radius:8px}
body[data-page="lead-import"] .lead-v589-manager-requests .data-table th{font-size:12px;background:#123e61;color:#fff}.lead-v589-manager-requests .data-table td{font-size:13px;color:#17364c;vertical-align:middle}
body[data-page="lead-import"] .lead-v589-request-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:nowrap}.lead-v589-request-btn{min-width:88px;min-height:36px;border-radius:9px;border:1px solid #cbd9e2;background:#fff;color:#234b65;font:inherit;font-size:13px;font-weight:800;cursor:pointer;padding:6px 12px;white-space:nowrap}.lead-v589-request-btn.is-send,.lead-v589-request-btn.is-approve{background:#123e61;border-color:#123e61;color:#fff}.lead-v589-request-btn.is-reject{background:#fff2f2;border-color:#e8c7c7;color:#8b3333}
body[data-page="lead-import"] .lead-v370-bulk{display:grid!important;grid-template-columns:auto minmax(240px,360px) auto;align-items:center;justify-content:start;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid #cfdde6;background:#f7fafc;margin:8px 0}.lead-v370-bulk:not(.is-visible){display:none!important}.lead-v376-selection-summary{display:flex;align-items:baseline;gap:5px;white-space:nowrap;color:#294e67}.lead-v376-selection-summary b{font-size:19px;color:#123e61}.lead-v376-selection-summary span{font-size:12.5px;font-weight:750}.lead-v376-manager-field{margin:0!important;min-width:0}.lead-v376-manager-field select{width:100%;height:42px;border-radius:9px;border:1px solid #bfd1dd;color:#17364c;background:#fff;font-size:14px}.lead-v559-selected-manager-stats{display:block;margin-top:3px;font-size:11px!important;color:#536d7f!important}.lead-v376-allocate-button{height:42px;min-width:118px;border-radius:9px!important;background:#123e61!important;color:#fff!important;font-size:14px!important;gap:6px;white-space:nowrap}.lead-v376-allocate-button:disabled{background:#92a9ba!important;color:#f7fafc!important;opacity:1!important;cursor:not-allowed}.lead-v376-allocate-button svg{width:17px;height:17px}

/* Sales conversion funnel: readable stage cards, no cramped arrows or low contrast. */
.sm585-conversion{padding:15px;border-radius:14px;background:#fff;color:#17364c}.sm585-conversion>header h3{font-size:17px;color:#153850}.sm585-conversion>header small{font-size:12px;color:#536b7b;font-weight:650}.sm585-conv-period{background:#edf3f6;border:1px solid #d6e2e9}.sm585-conv-period button{font-size:13px;color:#39566a;font-weight:750}.sm585-conv-period button.is-active{background:#123e61;color:#fff;box-shadow:none}
.sm585-conv-row{grid-template-columns:minmax(145px,185px) minmax(0,1fr);gap:12px;padding:11px 0}.sm585-conv-row.is-overall{background:#f7fafc;border-color:#d7e3e9;padding:12px}.sm585-conv-row header b{font-size:14.5px;color:#17364c}.sm585-conv-row header small{font-size:11.5px;color:#5c7282}
.sm585-conv-flow{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:7px}.sm585-conv-flow>i{display:none!important}.sm585-conv-stage{position:relative;min-height:84px;padding:10px 9px;border-radius:10px;border:1px solid #dbe5ea;background:#fff;display:grid;align-content:center;gap:2px;overflow:hidden}.sm585-conv-stage:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#7892a4}.sm585-conv-stage.is-blue:before{background:#3478a7}.sm585-conv-stage.is-teal:before{background:#16868a}.sm585-conv-stage.is-violet:before{background:#6859a8}.sm585-conv-stage.is-amber:before{background:#b37a18}.sm585-conv-stage.is-green:before{background:#2c7b5c}.sm585-conv-stage small{font-size:12px;color:#4c6576;font-weight:800;white-space:normal}.sm585-conv-stage b{font-size:20px;color:#102f47}.sm585-conv-stage span{justify-self:start;font-size:12px;font-weight:800;color:#195c45;background:#e5f4ec;padding:3px 7px;border-radius:7px}.sm585-conv-stage span.is-base{color:#245a7b;background:#e7f1f7}.sm585-conv-stage span.is-na{color:#7a4d0a;background:#fff3d9}

@media(max-width:1050px){body[data-page="reconciliation"] .pv-request-summary{grid-template-columns:1fr auto}.pv-request-keyfacts{grid-column:1/-1}.sm585-conv-row{grid-template-columns:1fr}.sm585-conv-flow{overflow-x:auto;grid-template-columns:repeat(5,minmax(135px,1fr));padding-bottom:4px}.sm585-conv-stage{min-width:135px}body[data-page="sales-report"] .sales-report-primary-filters{grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:760px){body[data-page="reconciliation"] .pv-request-summary{grid-template-columns:1fr}.pv-status{justify-self:start}.pv-request-keyfacts{grid-template-columns:1fr 1fr}.pv-request-meta-grid{grid-template-columns:1fr 1fr}.pv-match-card{grid-template-columns:1fr}.pv-match-card>div{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px}body[data-page="sales-report"] .sales-report-primary-filters{grid-template-columns:1fr 1fr}.sales-report-selection-toolbar{align-items:stretch}.sales-report-selection-main,.sales-report-selection-actions{width:100%}.sales-report-selection-actions .btn{flex:1 1 auto}body[data-page="lead-import"] .lead-v370-bulk{grid-template-columns:1fr}.lead-v376-allocate-button{width:100%}}
@media(max-width:520px){body[data-page="reconciliation"] .pv-request-keyfacts,body[data-page="reconciliation"] .pv-request-meta-grid{grid-template-columns:1fr}.pv-request-keyfacts>span{min-height:52px}body[data-page="sales-report"] .sales-report-primary-filters{grid-template-columns:1fr}.sales-report-filter-actions{grid-column:1/-1}.sales-report-selection-actions{display:grid;grid-template-columns:1fr}.lead-v589-manager-requests .table-wrap{overflow-x:auto}}

/* v589 sales-table column map: checkbox column shifted legacy nth-child rules. */
body[data-page="sales-report"] .sales-report-table th:nth-child(4){width:24%}
body[data-page="sales-report"] .sales-report-table th:nth-child(5){width:20%}
body[data-page="sales-report"] .sales-report-table th:nth-child(6){width:15%}
body[data-page="sales-report"] .sales-report-table th:nth-child(7){width:15%}
body[data-page="sales-report"] .sales-report-table th:nth-child(8){width:132px}
body[data-page="sales-report"] .sales-report-table th:nth-child(9){width:82px}
body[data-page="sales-report"] .sales-report-table .sales-actions-cell{display:table-cell;text-align:center}
@media(max-width:1180px){
  body[data-page="sales-report"] .sales-report-table td:nth-child(1){display:grid!important;grid-column:1/-1;min-height:42px!important;align-content:center;justify-content:start}
  body[data-page="sales-report"] .sales-report-table td:nth-child(2){display:none!important}
  body[data-page="sales-report"] .sales-report-table td:nth-child(4),
  body[data-page="sales-report"] .sales-report-table td:nth-child(5),
  body[data-page="sales-report"] .sales-report-table td:nth-child(7),
  body[data-page="sales-report"] .sales-report-table td:nth-child(8){grid-column:1/-1}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell{display:flex!important;align-items:center;justify-content:flex-start!important;min-height:48px}
}

/* v589 QA pass — readable type sizes and robust narrow layouts. */
body[data-page="reconciliation"] .pv-request-identity .pv-channel{font-size:13.5px}
body[data-page="reconciliation"] .pv-request-identity>b{font-size:18px}
body[data-page="reconciliation"] .pv-request-identity>small{font-size:14px}
body[data-page="reconciliation"] .pv-request-keyfacts small{font-size:13px}
body[data-page="reconciliation"] .pv-request-keyfacts b{font-size:16px}
body[data-page="reconciliation"] .pv-request-keyfacts b em{font-size:13px}
body[data-page="reconciliation"] .pv-status{font-size:13px}
body[data-page="reconciliation"] .pv-request-meta-grid span{font-size:13px}
body[data-page="reconciliation"] .pv-request-meta-grid b{font-size:14.5px}
body[data-page="reconciliation"] .pv-request-meta-grid b small{font-size:12.5px!important;color:#5d7383!important;font-weight:700!important}
body[data-page="reconciliation"] .pv-match-label{font-size:13.5px}
body[data-page="reconciliation"] .pv-match-card>div b{font-size:16px}
body[data-page="reconciliation"] .pv-match-card>div span{font-size:13.5px}

body[data-page="sales-report"] .sales-report-primary-filters .field label,
body[data-page="sales-report"] .sales-bank-filter-grid .field label{font-size:13.5px}
body[data-page="sales-report"] .sales-report-primary-filters :is(select,input),
body[data-page="sales-report"] .sales-bank-filter-grid :is(select,input){font-size:14px}
body[data-page="sales-report"] .sales-report-page-size{font-size:13px}
body[data-page="sales-report"] .sales-report-selection-count span{font-size:13px}
body[data-page="sales-report"] .sales-report-selection-actions .btn{font-size:13.5px}
body[data-page="sales-report"] .sales-report-table th{font-size:13px}
body[data-page="sales-report"] .sales-report-table td{font-size:14px;line-height:1.65}

body[data-page="lead-import"] .lead-v589-manager-requests>header>span{font-size:13px}
body[data-page="lead-import"] .lead-v589-manager-requests .data-table th{font-size:13px}
body[data-page="lead-import"] .lead-v589-manager-requests .data-table td{font-size:14px}
body[data-page="lead-import"] .lead-v589-request-btn{font-size:14px}
body[data-page="lead-import"] .lead-v370-kpi small{font-size:13.5px}
body[data-page="lead-import"] .lead-v559-allocation-stats>header h2{font-size:17px}
body[data-page="lead-import"] .lead-v559-allocation-stats .data-table th{font-size:13px}
body[data-page="lead-import"] .lead-v559-allocation-stats .data-table td{font-size:14px}
body[data-page="lead-import"] .lead-v376-selection-summary span{font-size:13.5px}
body[data-page="lead-import"] .lead-v376-manager-field select{font-size:14.5px}
body[data-page="lead-import"] .lead-v559-selected-manager-stats{font-size:12.5px!important}
body[data-page="lead-import"] .lead-v370-table th{font-size:13px}
body[data-page="lead-import"] .lead-v370-table td{font-size:14px}

.sm585-conversion>header small{font-size:13px}
.sm585-conv-row header b{font-size:15.5px}
.sm585-conv-row header small{font-size:12.5px}
.sm585-conv-stage small{font-size:13.5px}
.sm585-conv-stage span{font-size:13px}

@media(max-width:1180px){
  body[data-page="sales-report"] .sales-report-table tbody{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-page="sales-report"] .sales-report-table tr{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}
  body[data-page="sales-report"] .sales-report-table td{min-height:50px;padding:8px 10px!important;overflow:visible}
  body[data-page="sales-report"] .sales-report-table td::before{font-size:12.5px;color:#536d7e}
  body[data-page="sales-report"] .sales-report-table td:nth-child(1),
  body[data-page="sales-report"] .sales-report-table td:nth-child(4),
  body[data-page="sales-report"] .sales-report-table td:nth-child(7),
  body[data-page="sales-report"] .sales-report-table td:nth-child(8),
  body[data-page="sales-report"] .sales-report-table td:nth-child(9){grid-column:1/-1}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell{width:100%;overflow:visible!important}
  body[data-page="sales-report"] .sales-report-table .sales-row-actions{width:100%;justify-content:flex-start;overflow:visible}
}
@media(max-width:600px){
  body[data-page="sales-report"] .sales-report-table tbody{display:grid;grid-template-columns:1fr;gap:10px}
  body[data-page="sales-report"] .sales-report-table tr{display:grid;grid-template-columns:1fr;padding:9px;border-radius:13px}
  body[data-page="sales-report"] .sales-report-table td:not(:nth-child(2)){grid-column:1/-1!important;display:grid!important;min-height:50px}
  body[data-page="sales-report"] .sales-report-table td:nth-child(2){display:none!important}
  body[data-page="sales-report"] .sales-report-table td:nth-child(1){display:flex!important;align-items:center;justify-content:space-between;min-height:40px!important}
  body[data-page="sales-report"] .sales-report-table td:nth-child(1)::before{margin:0}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell{display:flex!important;align-items:center!important;justify-content:flex-start!important}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell>.btn{max-width:100%;white-space:normal}
}

@media(max-width:760px){
  body[data-page="lead-import"] .lead-v589-manager-requests .table-wrap{overflow:visible}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table{min-width:0;width:100%;display:block}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table thead{display:none}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody{display:grid;gap:8px;padding:8px}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d8e3e9;border-radius:11px;overflow:hidden;background:#fff}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table td{display:grid;gap:3px;min-width:0;padding:8px 10px!important;text-align:right;border-bottom:1px solid #edf2f5!important;white-space:normal}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table td::before{content:attr(data-label);font-size:12.5px;font-weight:800;color:#617887}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table td:first-child,
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table td:last-child{grid-column:1/-1}
  body[data-page="lead-import"] .lead-v589-request-actions{justify-content:stretch;width:100%}
  body[data-page="lead-import"] .lead-v589-request-btn{width:100%;min-height:42px}

  .sm585-conv-flow{overflow:visible;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-bottom:0}
  .sm585-conv-stage{min-width:0;min-height:92px}
  .sm585-conv-stage:last-child{grid-column:1/-1}
}
@media(max-width:430px){
  body[data-page="lead-import"] .lead-v589-manager-requests>header{align-items:flex-start}
  .sm585-conv-flow{grid-template-columns:1fr}
  .sm585-conv-stage:last-child{grid-column:auto}
}
@media(max-width:520px){
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table{min-width:0}
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table thead{display:none}
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d8e3e9;border-radius:10px;overflow:hidden}
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table td{display:grid;gap:2px;padding:8px!important;text-align:right;white-space:normal}
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table td::before{content:attr(data-label);font-size:12px;font-weight:800;color:#607787}
  body[data-page="lead-import"] .lead-v559-allocation-stats .data-table td:first-child{grid-column:1/-1}
}

/* v589 QA specificity overrides for legacy compact !important rules. */
body[data-page="sales-report"] .sales-report-table th{font-size:13px!important}
body[data-page="sales-report"] .sales-report-table td{font-size:14px!important;line-height:1.65!important}
body[data-page="sales-report"] .sale-buyer-cell b{font-size:14px!important}
body[data-page="sales-report"] .sale-buyer-cell small{font-size:12.5px!important}
body[data-page="sales-report"] .sales-amount-cell b{font-size:14.5px!important}
body[data-page="sales-report"] .sales-amount-cell small{font-size:12.5px!important}
body[data-page="lead-import"] #page-content .lead-v370-table>thead>tr>th,
body[data-page="lead-import"] .lead-v370-table>thead>tr>th{font-size:13px!important;line-height:1.4!important}
body[data-page="lead-import"] #page-content .lead-v370-table>tbody>tr>td,
body[data-page="lead-import"] .lead-v370-table>tbody>tr>td{font-size:14px!important;line-height:1.55!important}
body[data-page="lead-import"] .lead-v370-table .lead-v370-phone{font-size:14.5px!important}
body[data-page="lead-import"] .lead-v370-table .badge{font-size:12.5px!important}
body[data-page="lead-import"] .lead-v559-allocation-stats th{font-size:13px!important}
body[data-page="lead-import"] .lead-v559-allocation-stats td{font-size:14px!important;line-height:1.5!important}
body[data-page="lead-import"] .lead-v589-manager-requests .data-table th{font-size:13px!important}
body[data-page="lead-import"] .lead-v589-manager-requests .data-table td{font-size:14px!important}

@media(max-width:700px){
  body[data-page="sales-report"] .sales-report-table tbody{grid-template-columns:1fr!important}
  body[data-page="sales-report"] .sales-report-table tbody tr{grid-template-columns:1fr!important}
  body[data-page="sales-report"] .sales-report-table tbody td:not(:nth-child(2)){grid-column:1/-1!important}
  body[data-page="sales-report"] .sales-report-table tbody td:nth-child(1){display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:40px!important}
  body[data-page="sales-report"] .sales-report-table tbody td:nth-child(2){display:none!important}
  body[data-page="sales-report"] .sales-report-table tbody td::before{font-size:12.5px!important;color:#536d7e!important}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell{display:flex!important;grid-column:1/-1!important;overflow:visible!important}
}
@media(max-width:760px){
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table thead{display:none!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody{display:grid!important;gap:8px!important;padding:8px!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;height:auto!important;min-height:0!important;padding:0!important;overflow:hidden!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td{display:grid!important;height:auto!important;min-height:52px!important;padding:8px 10px!important;white-space:normal!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td:first-child,
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td:last-child{grid-column:1/-1!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td::before{display:block!important;content:attr(data-label)!important;font-size:12.5px!important;color:#617887!important;font-weight:800!important}
  body[data-page="lead-import"] .lead-v589-request-actions{width:100%!important;justify-content:stretch!important}
  body[data-page="lead-import"] .lead-v589-request-btn{width:100%!important;min-height:42px!important;font-size:14px!important}
}

/* v589 final QA: keep the credit queue compact and readable while preserving the national-code column. */
body[data-page="credit-assessment"] .credit-v116-table{min-width:900px}
body[data-page="credit-assessment"] .credit-v116-table th,body[data-page="credit-assessment"] .credit-v116-table td{font-size:13.5px;line-height:1.55}
body[data-page="credit-assessment"] .credit-v116-table th{font-weight:850;color:#27485f}
body[data-page="credit-assessment"] .credit-v116-table td{color:#17364c}
body[data-page="credit-assessment"] .credit-v116-table td:nth-child(5){direction:ltr;unicode-bidi:isolate}
@media(max-width:760px){body[data-page="credit-assessment"] .credit-v116-table{min-width:780px}}

/* v589 final visual QA — make mobile sales rows true readable cards (no label/value overlap). */
@media(max-width:700px){
  body[data-page="sales-report"] .sales-report-table tbody tr{height:auto!important;min-height:0!important;overflow:hidden!important;background:#fff!important}
  body[data-page="sales-report"] .sales-report-table tbody td:not(:nth-child(2)){
    display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;
    gap:5px!important;min-height:68px!important;height:auto!important;padding:9px 11px!important;white-space:normal!important;
    line-height:1.55!important;position:relative!important;overflow:visible!important
  }
  body[data-page="sales-report"] .sales-report-table tbody td::before{
    position:static!important;inset:auto!important;float:none!important;display:block!important;content:attr(data-label)!important;
    margin:0!important;padding:0!important;line-height:1.4!important;font-size:12.5px!important;font-weight:850!important;color:#5a7182!important
  }
  body[data-page="sales-report"] .sales-report-table tbody td.sales-select-cell{
    min-height:44px!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important
  }
  body[data-page="sales-report"] .sales-report-table .sale-buyer-cell{display:grid!important;gap:4px!important;min-width:0!important}
  body[data-page="sales-report"] .sales-report-table .sale-buyer-cell b{line-height:1.5!important}
  body[data-page="sales-report"] .sales-report-table .sales-amount-cell{align-items:flex-start!important}
  body[data-page="sales-report"] .sales-report-table .sales-status-cell{align-items:flex-start!important}
  body[data-page="sales-report"] .sales-report-table .sales-actions-cell{align-items:stretch!important}
  body[data-page="sales-report"] .sales-report-table .sales-row-actions{width:100%!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important}
}

/* v589 final visual QA — manager-request cards must expand fully on phones. */
@media(max-width:760px){
  body[data-page="lead-import"] .lead-v589-manager-requests{overflow:visible!important;height:auto!important;max-height:none!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .table-wrap{overflow:visible!important;height:auto!important;max-height:none!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table{display:block!important;width:100%!important;min-width:0!important;height:auto!important;table-layout:auto!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody{display:grid!important;height:auto!important;max-height:none!important;overflow:visible!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody tr{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;
    gap:4px!important;height:auto!important;min-height:58px!important;max-height:none!important;overflow:visible!important;white-space:normal!important
  }
  body[data-page="lead-import"] .lead-v589-manager-requests .data-table tbody td::before{
    position:static!important;display:block!important;margin:0!important;line-height:1.35!important
  }
  body[data-page="lead-import"] .lead-v589-manager-requests .lead-v589-request-actions{min-height:44px!important;align-items:stretch!important}
}
