:root{--purple:#714b67;--teal:#017e84;--bg:#f5f6f8;--line:#d9dde3;--line2:#eef0f3;--text:#1f2937;--muted:#6b7280;--danger:#b42318;--green:#067647;--navh:48px}*{box-sizing:border-box}html,body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,"Noto Nastaliq Urdu",sans-serif;font-size:12px;color:var(--text);background:var(--bg)}a{text-decoration:none;color:inherit}.topbar{height:var(--navh);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1000;padding:0 14px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.brand-row{display:flex;align-items:center;gap:10px}.brand{display:flex;align-items:center;gap:8px;font-weight:700;color:#111827;white-space:nowrap}.brand-mark{display:inline-grid;place-items:center;width:30px;height:26px;border-radius:6px;background:var(--purple);color:#fff;font-size:11px}.mobile-menu-btn{display:none;border:1px solid var(--line);background:#fff;border-radius:5px;padding:6px 9px;font:inherit}.main-menu{display:flex;align-items:center;gap:2px;overflow:auto}.main-menu a{padding:15px 10px 14px;color:#374151;white-space:nowrap;border-bottom:2px solid transparent}.main-menu a.active,.main-menu a:hover{color:var(--purple);border-bottom-color:var(--purple);background:#faf7fa}.top-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}.lang-link,.logout{border:1px solid var(--line);border-radius:4px;padding:4px 7px;background:#fff;color:#374151}.lang-link.active{background:#f3eef2;color:var(--purple);border-color:#e0d1db}.user-name{color:#4b5563}.app-main{min-height:calc(100vh - var(--navh))}.content{padding:0}.actionbar{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;background:#fff;border-bottom:1px solid var(--line)}.action-title{display:flex;align-items:center;gap:10px}.btn-new,.primary{background:var(--purple);color:#fff;border:1px solid var(--purple);border-radius:5px;padding:6px 11px;font:inherit;cursor:pointer}.secondary,.muted-btn{background:#fff;color:#111827;border:1px solid var(--line);border-radius:5px;padding:6px 10px;font:inherit;cursor:pointer}.danger{background:#fff;color:var(--danger);border:1px solid #f2c4bd;border-radius:5px;padding:6px 10px;font:inherit}.page-title strong{display:block;font-size:18px;font-weight:500;line-height:1.1}.page-title span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.filter-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#fff;border-bottom:1px solid var(--line);padding:7px 14px}.pill{border:1px solid var(--line);background:#fff;border-radius:15px;padding:5px 10px;color:#374151}.pill.active{background:#eefafa;border-color:#b9e4e6;color:#015f64}.searchbar{display:flex;align-items:center;margin-left:auto;min-width:280px;border:1px solid var(--line);border-radius:5px;background:#fff;overflow:hidden}.searchbar input{width:100%;border:0;outline:0;padding:7px 8px;font:inherit}.searchbar button{border:0;border-left:1px solid var(--line);background:#f8f9fb;padding:7px 10px;font:inherit}.table-shell{background:#fff;overflow:auto;width:100%;border-bottom:1px solid var(--line)}.smart-table{border-collapse:collapse;width:100%;min-width:1450px}.smart-table th,.smart-table td{border-bottom:1px solid var(--line2);padding:6px 8px;text-align:left;vertical-align:middle;white-space:nowrap}.smart-table th{background:#f7f8fa;position:sticky;top:0;z-index:2;font-size:11px;color:#4b5563;font-weight:700;text-transform:uppercase;letter-spacing:.02em}.smart-table td{font-size:12px;height:36px}.smart-table tbody tr:hover{background:#fafafa}.smart-table tfoot th{background:#f4f5f7;padding:5px;position:sticky;bottom:0;z-index:2}.col-search{width:100%;height:25px;border:1px solid #d4d8de;border-radius:4px;padding:3px 5px;font-size:11px}.num{text-align:right!important;font-variant-numeric:tabular-nums}.muted{color:var(--muted)}.strong-link{font-weight:650;color:#111827}.tag{border-radius:20px;padding:2px 7px;font-size:11px;border:1px solid var(--line);background:#fff}.tag.green{color:var(--green);background:#ecfdf3;border-color:#abefc6}.tag.red{color:var(--danger);background:#fff1f0;border-color:#fecdca}.tag.purple{color:var(--purple);background:#f3eef2;border-color:#e1d2dd}.actions-mini{display:flex;gap:4px}.actions-mini a,.actions-mini button{border:1px solid var(--line);background:#fff;border-radius:4px;padding:4px 6px;font:inherit;color:#111827;cursor:pointer}.actions-mini .danger{color:var(--danger);border-color:#f2c4bd}.form-shell{max-width:1180px;margin:12px auto 30px;padding:0 12px}.form-sheet,.profile-sheet,.card{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 22px rgba(17,24,39,.04)}.form-head,.record-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff;border-radius:8px 8px 0 0}.form-head h1,.record-topbar h1{font-size:20px;font-weight:500;margin:0}.smart-form,.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px 18px;padding:16px}.section-title{grid-column:1/-1;border-bottom:1px solid var(--line2);padding-bottom:6px;font-weight:700;color:#111827}.field,.form-field{grid-column:span 4}.field.wide,.form-field.wide{grid-column:span 6}.field.full,.form-field.full{grid-column:1/-1}.field label,.form-field label{display:block;font-size:11px;font-weight:700;color:#374151;margin-bottom:4px}.field input,.field select,.field textarea,.form-field input,.form-field select,.form-field textarea{width:100%;border:0;border-bottom:1px solid #cfd4da;background:#fff;border-radius:0;padding:7px 2px;font:inherit;font-size:12px;outline:none}.field input:focus,.field select:focus,.field textarea:focus,.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-bottom-color:var(--teal);box-shadow:0 1px 0 var(--teal)}.metric-mini{grid-column:span 4;background:#f8fafc;border:1px solid var(--line2);border-radius:6px;padding:8px}.metric-mini span{display:block;color:var(--muted);font-size:11px}.metric-mini strong{display:block;font-size:15px;margin-top:2px}.checkbox-card{grid-column:span 4;border:1px solid var(--line2);border-radius:6px;padding:9px}.checkbox-card label{display:flex;align-items:center;gap:8px;font-weight:700}.checkbox-card input{width:auto}.form-actions,.slim-actions{grid-column:1/-1;display:flex;gap:7px;border-top:1px solid var(--line);padding:12px 16px;margin:0}.summary-strip,.kpi-row{display:grid;grid-template-columns:repeat(5,1fr);gap:0;background:#fff;border-bottom:1px solid var(--line)}.summary-card,.kpi{padding:12px 16px;border-right:1px solid var(--line)}.summary-card span,.kpi span{display:block;color:var(--muted);font-size:11px}.summary-card strong,.kpi b{display:block;font-size:18px;font-weight:600;margin-top:3px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:0}.info-card{padding:16px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.info-card h3{font-size:13px;text-transform:uppercase;margin:0 0 10px;letter-spacing:.03em}.kv{display:grid;grid-template-columns:150px 1fr;gap:7px 14px}.kv .k{color:#4b5563;font-weight:700}.doc-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line2);padding:8px 0}.profile-sheet{margin:14px}.profile-main{display:grid;grid-template-columns:76px 1fr;gap:18px;padding:20px}.profile-avatar{width:76px;height:76px;border-radius:8px;background:linear-gradient(135deg,var(--purple),#b66a9e);color:#fff;font-size:34px;font-weight:700;display:grid;place-items:center}.profile-main h1{font-size:28px;font-weight:400;margin:4px 0 6px}.contact-lines{display:flex;gap:15px;flex-wrap:wrap}.tabs{display:flex;gap:0;margin:0 14px;border-bottom:1px solid var(--line);overflow:auto}.tab{border:1px solid var(--line);border-bottom:0;background:#f8f9fb;padding:8px 13px;font:inherit;cursor:pointer}.tab.active{background:#fff;color:var(--purple);box-shadow:inset 0 3px 0 var(--purple)}.tab-panel{display:none;margin:0 14px 20px;background:#fff;border:1px solid var(--line);border-top:0;padding:14px}.tab-panel.active{display:block}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:100%;max-width:380px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 20px 50px rgba(0,0,0,.08);padding:24px}.login-card h1{margin:0 0 8px;font-size:24px}.login-card .field{grid-column:1/-1;margin-top:14px}.alert{padding:9px 12px;border-radius:6px;margin:10px 0;background:#fff1f0;border:1px solid #fecdca;color:var(--danger)}.empty-row{text-align:center!important;color:var(--muted);padding:24px!important}.note-card{white-space:pre-wrap}.rtl-text{font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif}.sortable{cursor:pointer}.sortable:after{content:' ↕';color:#9ca3af}body[dir="rtl"] .smart-table th,body[dir="rtl"] .smart-table td{text-align:right}body[dir="rtl"] .num{text-align:left!important}body[dir="rtl"] .summary-card,body[dir="rtl"] .kpi,body[dir="rtl"] .info-card{border-left:1px solid var(--line);border-right:0}@media(max-width:900px){:root{--navh:auto}.topbar{display:block;height:auto;padding:8px 10px}.brand-row{justify-content:space-between}.mobile-menu-btn{display:inline-flex}.main-menu{display:none;flex-direction:column;align-items:stretch;margin-top:8px;border:1px solid var(--line);border-radius:7px;overflow:hidden}.main-menu.open{display:flex}.main-menu a{padding:10px;border-bottom:1px solid var(--line2)}.top-actions{margin-top:8px;justify-content:space-between}.actionbar{align-items:flex-start;flex-direction:column}.searchbar{margin-left:0;width:100%;min-width:0}.smart-table{min-width:1250px}.smart-form,.form-grid{grid-template-columns:1fr}.field,.field.wide,.field.full,.form-field,.form-field.wide,.form-field.full,.metric-mini,.checkbox-card{grid-column:1/-1}.summary-strip,.kpi-row{grid-template-columns:1fr 1fr}.detail-grid{grid-template-columns:1fr}.info-card{border-right:0}.kv{grid-template-columns:1fr}.profile-main{grid-template-columns:1fr}.profile-main h1{font-size:24px}.form-head,.record-topbar{align-items:flex-start;flex-direction:column}.page-title strong{font-size:17px}}

.customer-picker-field{grid-column:1/-1}.select-plus{display:flex;gap:6px;align-items:flex-start}.select-plus select{flex:1}.searchable-select{flex:1;position:relative}.searchable-select input{width:100%;border:0;border-bottom:1px solid #cfd4da;background:#fff;border-radius:0;padding:7px 2px;font:inherit;font-size:12px;outline:none}.searchable-select input:focus{border-bottom-color:var(--teal);box-shadow:0 1px 0 var(--teal)}.searchable-select select.native-search-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important}.searchable-options{display:none;position:absolute;left:0;right:0;top:32px;z-index:1300;max-height:230px;overflow:auto;background:#fff;border:1px solid #cfd6df;border-radius:7px;box-shadow:0 14px 36px rgba(16,24,40,.16)}.searchable-options.show{display:block}.searchable-options button{display:block;width:100%;border:0;border-bottom:1px solid #eef2f6;background:#fff;text-align:left;padding:8px 10px;font:inherit;cursor:pointer}.searchable-options button:hover{background:#f6f8fb}.searchable-options button .ss-main{display:block}.searchable-options button .ss-addr{display:block;font-size:11px;color:#8a909c;margin-top:1px;white-space:normal;line-height:1.35}.searchable-empty{padding:9px 10px;color:#667085}.searchable-addr{font-size:11.5px;color:#667085;margin-top:4px;padding-top:4px;border-top:1px dashed #e4e9ef;line-height:1.4}.mini-add{border:1px solid #cfd6df;background:#fff;border-radius:6px;min-width:30px;height:32px;font-weight:700;cursor:pointer}.mini-add:hover{background:#f2f6fb}.customer-active-sales{font-size:12px;margin-top:8px;border:1px solid #dde4ed;border-radius:8px;padding:8px;background:#fafcff}.customer-summary-strip{display:flex;align-items:center;gap:8px;white-space:nowrap;overflow:auto}.customer-summary-strip div{flex:1 0 0;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1px solid #edf1f5;border-radius:6px;padding:7px 10px;min-width:145px}.customer-summary-strip span{color:#667085;font-size:11px}.customer-summary-strip b{font-size:14px}.customer-active-sales table{width:100%;border-collapse:collapse;margin-top:4px}.customer-active-sales th,.customer-active-sales td{padding:4px 6px;border-bottom:1px solid #edf1f5;text-align:left}.copy-line{display:flex;gap:8px}.copy-line input{flex:1}.smart-table.compact td,.smart-table.compact th{padding:7px 9px}.form-field small{color:#667085}.num{text-align:right}
/* 2026-06-04 payments + polished modal revision */
.copy-mini{border:1px solid #cfd6df;background:#fff;border-radius:6px;padding:5px 9px;font-size:12px;cursor:pointer;color:#111827}.copy-mini:hover{border-color:#7c4d73;color:#7c4d73}.danger-text{color:#b42318;font-weight:700}.danger-kpi b{color:#b42318}.sub{font-size:12px;color:#6b7280;margin-top:2px}.payment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.payment-grid .full{grid-column:1/-1}.payment-summary{grid-column:1/-1;border:1px solid #d8dde6;background:#fbfcff;border-radius:10px;padding:14px}.payment-summary.empty{color:#6b7280;background:#fafafa}.summary-head{display:flex;gap:16px;align-items:center;margin-bottom:10px}.summary-head b{font-size:18px}.summary-head span{color:#6b7280}.summary-strip.tiny{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.summary-strip.tiny div{background:#fff;border:1px solid #e4e7ec;border-radius:8px;padding:10px}.summary-strip.tiny span{display:block;color:#667085;font-size:12px}.summary-strip.tiny b{font-size:16px}.suggestions-box{position:absolute;z-index:50;background:#fff;border:1px solid #cfd6df;border-radius:8px;box-shadow:0 12px 30px rgba(16,24,40,.12);width:100%;max-height:300px;overflow:auto;margin-top:4px}.sale-ref-field{position:relative}.suggestions-box button{display:grid;grid-template-columns:120px 1fr 120px;gap:10px;align-items:center;width:100%;border:0;background:#fff;border-bottom:1px solid #eef2f6;text-align:left;padding:10px 12px;cursor:pointer}.suggestions-box button:hover{background:#f6f8fb}.suggestions-box span{color:#475467}.suggestions-box em{font-style:normal;text-align:right;font-weight:700}.no-suggestions{padding:12px;color:#667085}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:1000;align-items:center;justify-content:center;padding:20px}.modal-backdrop.show{display:flex}.modal-card{background:#fff;border-radius:14px;box-shadow:0 25px 80px rgba(15,23,42,.28);width:min(520px,96vw);overflow:hidden}.modal-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eaecf0;padding:14px 18px}.modal-head h3{margin:0;font-size:18px}.modal-x{border:0;background:#f2f4f7;border-radius:8px;font-size:22px;line-height:1;padding:3px 10px;cursor:pointer}.modal-form{padding:18px;display:grid;gap:12px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:6px}.error-box{background:#fff1f3;border:1px solid #fecdd6;color:#a50f2d;padding:10px 12px;border-radius:8px;margin:8px 0}.result-card{background:#fff;border:1px solid #e4e7ec;border-radius:14px;padding:20px}.filter-row .searchbar.wide{flex-wrap:wrap}.filter-row .searchbar.wide input{min-width:160px}.num{text-align:right;white-space:nowrap}.smart-table td,.smart-table th{vertical-align:middle}.smart-table tfoot input{font-size:13px;padding:6px 8px}.table-shell{overflow:auto;max-width:100%}@media(max-width:800px){.payment-grid{grid-template-columns:1fr}.summary-strip.tiny{grid-template-columns:repeat(2,minmax(0,1fr))}.suggestions-box button{grid-template-columns:1fr}.suggestions-box em{text-align:left}.modal-card{width:100%}}
.sale-summary-strip{grid-template-columns:repeat(6,1fr)}.sale-summary-strip small{display:block;margin-top:2px;color:#912018;font-size:11px;white-space:nowrap}.advance-row{background:#f6fffb}.advance-row td{border-bottom-color:#d6f3e5!important}

/* Payments revision: compact Odoo-like submenus, cleaner search/form and ledger */
.main-menu .menu-group{position:relative;display:flex;align-items:center;height:100%}
.main-menu .menu-group>a{display:flex;align-items:center;height:100%;padding:0 10px;color:#111827;text-decoration:none;border-bottom:3px solid transparent}
.main-menu .menu-group.active>a{color:var(--purple);border-bottom-color:var(--purple);background:#f7f2f6}
.menu-drop{display:none;position:absolute;top:100%;left:0;min-width:160px;background:#fff;border:1px solid var(--line);box-shadow:0 14px 34px rgba(16,24,40,.14);border-radius:0 0 8px 8px;z-index:100}
.menu-drop a{display:block;padding:9px 12px;color:#111827;text-decoration:none;white-space:nowrap;font-size:13px}.menu-drop a:hover{background:#f7f2f6;color:var(--purple)}.menu-group:hover .menu-drop{display:block}
.subnav{display:flex;gap:6px;border-bottom:1px solid var(--line);padding:8px 16px;background:#fff;overflow:auto}.subnav a{border:1px solid var(--line);border-radius:6px;padding:7px 12px;color:#111827;text-decoration:none;font-size:13px;background:#fff}.subnav a.active{background:var(--purple);border-color:var(--purple);color:#fff}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#fbfcff;border-bottom:1px solid var(--line)}.toolbar-summary{font-size:13px;color:#475467;white-space:nowrap}.toolbar-summary b{color:#111827}.toolbar-summary span{margin-left:12px}.toolbar-search{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.search-field{height:34px;border:1px solid #cfd6df;border-radius:7px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 10px}.search-field.grow{min-width:340px}.search-field input{border:0;outline:0;font:inherit;width:100%;min-width:0}.date-field{height:34px;border:1px solid #cfd6df;border-radius:7px;padding:0 9px;font:inherit;width:130px}.toolbar-search button{height:34px;border:1px solid var(--purple);background:var(--purple);color:#fff;border-radius:7px;padding:0 13px;font:inherit;cursor:pointer}.mini-link{border:1px solid var(--line);background:#fff;border-radius:5px;padding:4px 8px;text-decoration:none;color:#111827}.strong-amount{font-weight:700}.payments-table{font-size:13px}.payments-table th,.payments-table td{height:34px;padding:7px 9px}.payment-card{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 28px rgba(16,24,40,.05);overflow:visible}.payment-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:#fbfcff}.payment-card-head h1{margin:0;font-size:22px;font-weight:500}.payment-card-head p{margin:3px 0 0;color:#667085;font-size:13px}.head-actions{display:flex;gap:7px}.payment-sale-picker{padding:16px 18px 10px}.payment-sale-picker label{display:block;font-size:12px;font-weight:700;margin-bottom:6px;color:#344054}.big-search{height:44px;border:1px solid #9fcbd3;border-radius:8px;background:#fff;display:flex;align-items:center;padding:0 12px;gap:10px}.big-search span{font-size:22px}.big-search input{border:0;outline:0;font:inherit;font-size:16px;width:100%;background:transparent}.payment-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;padding:16px 18px 18px}.payment-form-grid .full{grid-column:1/-1}.payment-form-grid .field{grid-column:auto}.payment-form-grid .field.full{grid-column:1/-1}.payment-summary{margin:10px 18px 0}.summary-strip.tiny b{font-size:15px}.suggestions-box button{grid-template-columns:110px 1fr 145px;font-size:13px}.ledger-card{margin:14px 0;background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}.ledger-card h3{font-size:15px;text-align:center;margin:0;padding:11px;background:#fbfcff;border-bottom:1px solid var(--line)}.ledger-table{width:100%;border-collapse:collapse;font-size:14px}.ledger-table th{background:#fafafa;color:#111827;font-weight:700;border-bottom:1px solid var(--line);padding:10px;text-align:right}.ledger-table td{padding:10px;border-bottom:1px solid #eef2f6;text-align:right}.ledger-table th:first-child,.ledger-table td:first-child{text-align:left;font-weight:700}.ledger-table .received-amount{font-weight:700}.ledger-balance{font-weight:800}.rtl-text .ledger-table{font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif}
@media(max-width:900px){.main-menu .menu-group{display:block;height:auto}.main-menu .menu-group>a{height:auto;padding:10px;border-bottom:1px solid var(--line2)}.menu-drop{position:static;box-shadow:none;border:0;border-radius:0;background:#fafafa;margin-left:12px}.menu-group:hover .menu-drop,.menu-group.active .menu-drop{display:block}.list-toolbar{align-items:stretch;flex-direction:column}.toolbar-search,.head-actions,.payment-card-head{align-items:stretch;flex-direction:column}.search-field.grow{min-width:0;width:100%}.date-field{width:100%}.payment-form-grid{grid-template-columns:1fr}.big-search input{font-size:14px}}

/* Dashboard status filters and chart tooltip */
.dashboard-status-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#fff;border-bottom:1px solid var(--line)}
.dashboard-status-tabs{display:flex;align-items:center;gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.dashboard-status-tabs a{height:34px;display:inline-flex;align-items:center;padding:0 18px;border-right:1px solid var(--line);color:#344054;font-size:14px}
.dashboard-status-tabs a:last-child{border-right:0}
.dashboard-status-tabs a.active{color:var(--purple);background:#fbf7fa;box-shadow:inset 0 -3px 0 var(--purple);font-weight:650}
.dashboard-status-note{font-size:14px;color:#667085}
.dashboard-status-note b{color:#111827}
.chart-card{position:relative}
.dashboard-chart-tooltip{position:fixed;z-index:6000;display:none;min-width:320px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 12px 32px rgba(16,24,40,.18);padding:10px 14px;color:#000;pointer-events:none;font-size:20px;line-height:1.24}
.dashboard-chart-tooltip.show{display:block}
.dashboard-chart-tooltip .dash-tip-title{font-weight:800;font-size:24px;padding-bottom:8px;margin-bottom:6px;border-bottom:1px solid #e4e7ec}
.dashboard-chart-tooltip div:not(.dash-tip-title){display:grid;grid-template-columns:1fr auto;gap:18px;align-items:baseline}
.dashboard-chart-tooltip span{white-space:nowrap}
.dashboard-chart-tooltip b{font-weight:800;text-align:right}
@media(max-width:700px){.dashboard-status-row{align-items:flex-start;flex-direction:column}.dashboard-status-tabs{width:100%}.dashboard-status-tabs a{flex:1;justify-content:center}.dashboard-chart-tooltip{min-width:260px;font-size:16px}.dashboard-chart-tooltip .dash-tip-title{font-size:19px}}

/* ===== v2 revision 3 polish ===== */
.topbar{grid-template-columns:auto minmax(0,1fr) auto;overflow:visible}.main-menu{overflow:visible;min-width:0}.main-menu>a{font-size:12px}.global-search-wrap{position:relative;margin-left:auto;min-width:260px;max-width:420px;flex:1;display:flex;align-items:center;border:1px solid var(--line);border-radius:5px;background:#fff;height:30px}.global-search-icon{padding:0 8px;color:#667085}.global-search-wrap input{border:0;outline:0;width:100%;font:inherit;height:28px;padding:0 8px 0 0;background:transparent}.global-search-results{display:none;position:absolute;right:0;left:auto;top:34px;width:min(620px,92vw);background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 18px 48px rgba(16,24,40,.18);z-index:2000;max-height:70vh;overflow:auto}.global-search-results.show{display:block}.global-label{font-size:11px;text-transform:uppercase;color:#667085;background:#f7f8fa;border-bottom:1px solid var(--line2);padding:6px 10px;font-weight:700}.global-item{display:block;padding:8px 10px;border-bottom:1px solid var(--line2);color:#111827}.global-item:hover{background:#f8fbff}.global-item b{display:block;font-size:12px}.global-item span{display:block;font-size:11px;color:#667085;margin-top:2px}.global-empty{padding:12px;color:#667085}.menu-group,.menu-drop{display:none!important}.subnav{display:flex;gap:5px;padding:7px 14px;background:#fff;border-bottom:1px solid var(--line)}.subnav a{border:1px solid var(--line);border-radius:5px;padding:6px 10px;background:#fff}.subnav a.active{background:#f3eef2;color:var(--purple);border-color:#d8c6d2}.payments-toolbar{align-items:center}.compact-payment-search{display:flex;align-items:center;gap:7px;margin-left:auto;flex-wrap:wrap}.compact-payment-search label{display:flex;align-items:center;gap:5px;color:#667085}.date-field{height:30px;border:1px solid #d4d8de;border-radius:5px;padding:4px 7px;font:inherit}.refined-payment-card{overflow:visible}.payment-top-grid{padding-bottom:0}.compact-big-search{height:36px}.compact-big-search input{height:34px}.suggestions-box{position:absolute;z-index:1200;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 16px 40px rgba(16,24,40,.14);width:min(780px,calc(100vw - 40px));overflow:hidden}.suggestions-box button{display:grid;grid-template-columns:110px 1fr 165px;width:100%;gap:10px;align-items:center;border:0;border-bottom:1px solid var(--line2);background:#fff;text-align:left;padding:8px 10px;cursor:pointer}.suggestions-box button:hover{background:#f8fbff}.suggestions-box em{font-style:normal;color:#667085;text-align:right}.highlight-row{background:#fff4cc!important;animation:hilite 2.4s ease-out 1}@keyframes hilite{0%{background:#ffe08a}100%{background:#fff4cc}}.notice.success{margin:8px 14px;padding:9px 12px;background:#ecfdf3;border:1px solid #abefc6;border-radius:6px;color:#067647}.mini-link{border:1px solid var(--line);border-radius:4px;padding:3px 6px;background:#fff;display:inline-block}.mini-link.danger{color:var(--danger);border-color:#f2c4bd}.ledger-table th:last-child,.ledger-table td:last-child{text-align:center;width:90px}.payments-table{min-width:1350px}.payments-table th,.payments-table td{font-size:12px}.smart-table td,.smart-table th{vertical-align:middle}.num{text-align:right!important}.actions-mini{white-space:nowrap}
@media(max-width:900px){.topbar{grid-template-columns:1fr auto}.brand-row{grid-column:1/3;justify-content:space-between}.mobile-menu-btn{display:inline-flex}.main-menu{display:none;grid-column:1/3;flex-direction:column;align-items:stretch;background:#fff;border-top:1px solid var(--line);padding:4px 0;max-height:72vh;overflow:auto}.main-menu.open{display:flex}.main-menu>a{padding:10px 12px;border-bottom:1px solid var(--line2)}.global-search-wrap{margin:8px 12px;min-width:0;width:auto;max-width:none;flex:none}.top-actions{grid-column:1/3;justify-content:flex-end;border-top:1px solid var(--line2);padding:5px 0}.actionbar{align-items:flex-start}.payments-toolbar,.compact-payment-search{align-items:stretch;flex-direction:column}.compact-payment-search label,.date-field,.search-field.grow{width:100%}.suggestions-box{width:calc(100vw - 24px)}.suggestions-box button{grid-template-columns:1fr}.suggestions-box em{text-align:left}.table-shell{overflow:auto}.smart-table{min-width:1200px}}


/* ===== revision 4: compact grouped menu + dashboard chart ===== */
.topbar.compact-topbar{position:sticky;top:0;z-index:1500;background:#fff;box-shadow:0 1px 0 #e5e7eb;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;min-height:46px;overflow:visible}.brand{font-size:14px;font-weight:700}.brand-mark{width:28px;height:28px;border-radius:7px;font-size:12px}.main-menu{display:flex;align-items:center;height:46px;gap:0;overflow:visible!important;min-width:0}.main-menu>a,.nav-root{height:46px;display:flex;align-items:center;padding:0 11px;border-bottom:3px solid transparent;font-size:13px;color:#111827}.main-menu>a.active,.nav-group.active>.nav-root{background:#f7f2f6;color:var(--purple);border-bottom-color:var(--purple)}.nav-group{position:relative;height:46px;display:flex!important;align-items:center}.nav-drop{display:none;position:absolute;top:46px;left:0;background:#fff;min-width:180px;border:1px solid #d9dde3;border-radius:0 0 8px 8px;box-shadow:0 18px 45px rgba(16,24,40,.16);z-index:3000;overflow:hidden}.nav-group:hover .nav-drop,.nav-group.open .nav-drop{display:block}.nav-drop a{display:block;padding:9px 12px;font-size:13px;color:#111827;white-space:nowrap}.nav-drop a:hover{background:#f7f2f6;color:var(--purple)}.chev{font-size:10px;margin-left:4px}.global-search-wrap{height:30px;min-width:260px;max-width:440px;margin-left:8px}.global-search-results{z-index:5000}.dashboard-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin:14px 16px;box-shadow:0 2px 5px rgba(16,24,40,.18)}.kpi-card{min-height:96px;color:#fff;display:flex;flex-direction:column-reverse;align-items:center;justify-content:center;text-align:center;text-shadow:0 2px 2px rgba(0,0,0,.25)}.kpi-card strong{font-size:26px;line-height:1.2}.kpi-card span{font-size:14px;margin-top:7px}.kpi-card.blue{background:#438dca}.kpi-card.green{background:#74c84b}.kpi-card.purple{background:#c525ca}.kpi-card.cyan{background:#438dca}.kpi-card.teal{background:#5bbbd0}.kpi-card.red{background:red}.small-kpis{grid-template-columns:repeat(8,minmax(0,1fr));box-shadow:none;gap:10px}.mini-kpi{background:#fff;border:1px solid #e4e7ec;border-radius:9px;padding:12px;display:flex;align-items:center;justify-content:space-between}.mini-kpi span{color:#667085}.mini-kpi b{font-size:18px}.chart-card{background:#fff;border:1px solid #d9dde3;margin:14px 16px;border-radius:2px;overflow:hidden}.card-title{display:flex;align-items:center;gap:10px;border-bottom:1px solid #e4e7ec;padding:12px 16px;font-size:17px;color:#3d8ad3}.chart-icon{border:1px solid #d9dde3;padding:4px 7px;color:#2e7cc4}.chart-card canvas{display:block;width:100%;background:#fff}.chart-legend{text-align:center;font-weight:700;padding:8px 0 15px;font-size:13px}.chart-legend span{display:inline-block;margin-left:20px;margin-right:5px;vertical-align:middle}.chart-legend .bar{width:16px;height:12px;background:linear-gradient(90deg,#2b6da7,#8ebbe5,#2b6da7)}.chart-legend .dot{width:10px;height:10px;border:2px solid #c36b21;border-radius:50%}.chart-legend .diamond{width:10px;height:10px;border:2px solid #5abf4b;transform:rotate(45deg)}.chart-legend .square{width:10px;height:10px;border:2px solid #c36b21}.chart-legend .triangle{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid #4150b5}.dashboard-actions{margin:14px 16px;display:flex;gap:8px}.ledger-table .danger-text{color:#b42318}.payment-menu-fix{overflow:visible}.subnav.payments-subnav,.subnav.sales-subnav,.subnav.people-subnav{position:relative;z-index:2;overflow:visible;white-space:nowrap}.table-shell{overflow:auto!important}.smart-table{width:max-content;min-width:100%}
@media(max-width:1000px){.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.small-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar.compact-topbar{grid-template-columns:1fr auto}.brand-row{grid-column:1/3}.mobile-menu-btn{display:inline-flex}.main-menu{display:none;grid-column:1/3;height:auto;flex-direction:column;align-items:stretch;overflow:auto!important;max-height:72vh}.main-menu.open{display:flex}.main-menu>a,.nav-root{height:auto;padding:10px 12px;border-bottom:1px solid #eef0f3}.nav-group{height:auto;display:block!important}.nav-drop{display:block;position:static;box-shadow:none;border:0;border-radius:0;background:#fafafa;margin-left:14px}.global-search-wrap{margin:8px 12px;width:auto;max-width:none;min-width:0}.top-actions{grid-column:1/3}.kpi-card strong{font-size:22px}}

/* ===== r5 compact navigation and investor module ===== */
.topbar.compact-topbar{min-height:48px;height:auto;align-items:stretch}.main-menu{overflow:visible!important;min-width:0}.main-menu>a,.nav-root{font-size:12px;padding-left:9px;padding-right:9px}.top-actions{font-size:12px}.global-search-wrap{flex:1 1 240px;min-width:220px;max-width:360px}.subnav{display:flex;gap:0;align-items:center;background:#fff;border-bottom:1px solid var(--line);padding:0 14px;overflow:visible!important;white-space:nowrap}.subnav a{display:inline-flex;align-items:center;height:40px;padding:0 13px;border-bottom:3px solid transparent;color:#344054;font-size:12px}.subnav a.active,.subnav a:hover{color:var(--purple);background:#faf7fa;border-bottom-color:var(--purple)}.list-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;background:#fff;border-bottom:1px solid var(--line);flex-wrap:wrap}.toolbar-search{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.search-field{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:5px;background:#fff;padding:0 7px}.search-field input{border:0;outline:0;height:30px;min-width:230px;font:inherit}.date-field{height:30px;border:1px solid var(--line);border-radius:5px;padding:0 6px}.toolbar-summary{font-size:12px;color:#475467}.toolbar-summary b{color:#111827}.smart-table th:first-child,.smart-table td:first-child{position:sticky;left:0;z-index:3;background:inherit}.smart-table th:first-child{background:#f7f8fa}.smart-table td:first-child{background:#fff}.smart-table tr:hover td:first-child{background:#fafafa}.ledger-table tr.highlight-row,.ledger-table tr.highlight-row td{background:#fff3c4!important}.ledger-table tbody tr{height:45px}.ledger-table td,.ledger-table th{font-size:13px}.received-amount{font-weight:800}.danger-text{color:#b42318;font-weight:700}.investor-filter{margin:12px 14px;padding:12px;display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:12px;align-items:end}.investor-filter .form-field{grid-column:auto}.investor-filter-actions{display:flex;gap:8px}.investor-dark{margin:14px;background:#0b1220;color:#e5e7eb;border-radius:14px;padding:14px;box-shadow:0 18px 40px rgba(0,0,0,.18)}.investor-head{display:flex;justify-content:space-between;gap:12px;align-items:center;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px 14px;margin-bottom:12px}.investor-head h2{font-size:18px;margin:0 0 4px}.investor-head span,.investor-head small{display:block;color:#aab6c9}.investor-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.investor-kpis>div{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px}.investor-kpis span{display:block;color:#aab6c9;font-size:12px}.investor-kpis b{display:block;font-size:21px;margin-top:6px;color:#f8fafc}.investor-kpis small{display:block;color:#aab6c9;margin-top:4px}.investor-message{margin-top:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px}.message-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.message-head small{display:block;color:#aab6c9}.investor-message textarea{width:100%;min-height:280px;background:#090f1d;color:#f8fafc;border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:10px;font-family:Consolas,monospace;font-size:12px}.investor-audit,.investor-history{margin:14px;padding:12px}.investor-audit h3,.investor-history h3{margin:0 0 10px;font-size:15px}@media(max-width:900px){.investor-filter{grid-template-columns:1fr}.investor-kpis{grid-template-columns:1fr}.main-menu{overflow:auto!important}.subnav{overflow:auto!important}.smart-table th:first-child,.smart-table td:first-child{position:static}}


/* ===== r6 investor cleanup: no users tab, light report UI ===== */
.investors-subnav a[href*="page=users"]{display:none!important}
.investor-dark{background:#fff!important;color:#111827!important;border:1px solid var(--line)!important;box-shadow:0 8px 24px rgba(17,24,39,.06)!important}
.investor-head{background:#fbfcfd!important;border:1px solid var(--line)!important}
.investor-head span,.investor-head small{color:#667085!important}
.investor-kpis>div{background:#fff!important;border:1px solid #e4e7ec!important;box-shadow:0 1px 2px rgba(16,24,40,.03)!important}
.investor-kpis span{color:#667085!important}
.investor-kpis b{color:#111827!important}
.investor-kpis small{color:#667085!important}
.profit-detail-boxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.profit-detail-boxes>div{background:#fff;border:1px solid #e4e7ec;border-radius:12px;padding:14px 18px;box-shadow:0 1px 2px rgba(16,24,40,.03)}.profit-detail-boxes span{display:block;color:#667085;font-size:13px}.profit-detail-boxes b{display:block;color:#111827;font-size:26px;line-height:1.2;margin-top:6px}.profit-detail-boxes small{display:block;color:#667085;margin-top:6px}
@media(max-width:900px){.profit-detail-boxes{grid-template-columns:1fr}}
.investor-history-table{min-width:2800px}
.ajax-pager{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px}.ajax-pager span{color:#667085;margin-left:8px}.pager-controls{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.pager-controls a{border:1px solid var(--line);background:#fff;border-radius:5px;padding:5px 8px;color:#111827}.pager-controls a.active{background:var(--purple);border-color:var(--purple);color:#fff}.pager-controls a.disabled{opacity:.45;pointer-events:none}.pager-size select{height:28px;border:1px solid var(--line);border-radius:5px;background:#fff;font:inherit}.ajax-list.loading{opacity:.6;pointer-events:none}@media(max-width:800px){.ajax-pager{align-items:flex-start;flex-direction:column}.pager-controls{width:100%}}
.customer-table-shell{max-height:calc(100vh - 230px);overflow:auto}.customer-table{table-layout:fixed;min-width:1060px}.customer-table.inactive-customer-table{min-width:1320px}.customer-table thead th{position:sticky;top:0;z-index:5}.customer-table th,.customer-table td{padding:5px 6px;overflow:hidden;text-overflow:ellipsis}.customer-table th:nth-child(1),.customer-table td:nth-child(1){width:82px}.customer-table th:nth-child(2),.customer-table td:nth-child(2){width:95px}.customer-table th:nth-child(3),.customer-table td:nth-child(3){width:55px}.customer-table th:nth-child(4),.customer-table td:nth-child(4){width:230px}.customer-table th:nth-child(5),.customer-table td:nth-child(5){width:115px}.customer-table th:nth-child(6),.customer-table td:nth-child(6){width:115px}.customer-table th:nth-child(7),.customer-table td:nth-child(7){width:180px}.customer-table th:nth-child(8),.customer-table td:nth-child(8){width:75px}.customer-table th:nth-child(9),.customer-table td:nth-child(9),.customer-table th:nth-child(10),.customer-table td:nth-child(10){width:95px}.customer-table th:nth-child(11),.customer-table td:nth-child(11){width:75px}.inactive-customer-table th:nth-child(11),.inactive-customer-table td:nth-child(11),.inactive-customer-table th:nth-child(12),.inactive-customer-table td:nth-child(12){width:120px}.inactive-customer-table th:nth-child(13),.inactive-customer-table td:nth-child(13){width:75px}.customer-name-cell,.customer-address-cell{max-width:0}.customer-table .actions-mini{gap:3px}.customer-table .actions-mini a{padding:3px 5px}.customer-table .tag{padding:2px 6px}.return-cell b{display:block;color:#2f6b0b;font-size:13px}.return-cell small{display:block;color:#667085;font-size:11px}
.sortable:after{content:""!important}.sortable.sorted-asc:after{content:" ↑"!important;color:#667085}.sortable.sorted-desc:after{content:" ↓"!important;color:#667085}
.customer-table th:nth-child(8),.customer-table td:nth-child(8){width:150px}.accounts-cell{font-size:12px;color:#344054;white-space:nowrap}
.customer-table th:first-child{left:auto!important;position:sticky!important;top:0}.customer-table td:first-child{position:static!important}
.customers-titlebar{padding-right:14px}.customers-titlebar .customer-title-totals{max-width:none;justify-content:flex-start}.customers-filter-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;flex-wrap:nowrap;overflow:hidden}.customers-filter-row .customer-tabs{flex:0 0 auto}.customers-filter-row .customer-tabs a{height:32px;display:inline-flex;align-items:center;padding:0 10px}.customers-filter-form{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:nowrap;min-width:0}.customers-filter-form .toolbar-field.book-field{width:72px;flex:0 0 72px;height:32px}.customers-filter-form .search-field.grow{width:260px;flex:0 1 260px;height:32px;min-width:140px}.customers-filter-form .search-field input{height:30px;min-width:0;width:100%;font-size:13px}.customers-filter-form button,.customers-filter-form .toolbar-clear{height:32px;min-height:32px;padding:0 10px;font-size:13px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;white-space:nowrap}.customer-export-modal{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:6000;display:grid;place-items:center;padding:16px}.customer-export-modal[hidden]{display:none}.customer-export-card{width:min(720px,96vw);background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 24px 70px rgba(16,24,40,.24);overflow:hidden}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font-size:16px}.modal-head button{border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:#667085}.export-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;padding:14px}.export-columns label{display:flex;align-items:center;gap:7px;border:1px solid #eef0f3;border-radius:6px;padding:7px 8px;background:#fafafa}@media(max-width:1000px){.customers-filter-row{overflow:auto}.customer-title-totals{max-width:100%;justify-content:flex-start}.export-columns{grid-template-columns:1fr 1fr}}
.customer-table{min-width:1220px}.customer-table.inactive-customer-table{min-width:1500px}.customer-table th:nth-child(11),.customer-table td:nth-child(11){width:170px}.customer-table th:nth-child(12),.customer-table td:nth-child(12){width:155px}.inactive-customer-table th:nth-child(13),.inactive-customer-table td:nth-child(13){width:180px}.inactive-customer-table th:nth-child(14),.inactive-customer-table td:nth-child(14){width:155px}.customer-time-cell{font-size:11px;line-height:1.35;color:#344054}.customer-time-cell small{display:block;color:#667085;margin-top:2px}
.inactive-customer-table th:nth-child(11),.inactive-customer-table td:nth-child(11),.inactive-customer-table th:nth-child(12),.inactive-customer-table td:nth-child(12){width:120px}
.customer-phone-cell{white-space:normal!important;line-height:1.35}.customer-phone-cell span{display:flex;align-items:center;gap:5px;margin:1px 0}.customer-phone-cell b{font-weight:500}.wa-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#22c55e;border:1px solid #16a34a;color:#fff;line-height:1;box-shadow:0 1px 2px rgba(16,24,40,.12)}.wa-btn svg{width:15px;height:15px;fill:currentColor;display:block}
.whatsapp-status-select{display:block;width:130px;height:27px;margin-top:4px;border:1px solid #d4d8de;border-radius:5px;background:#fff;padding:0 5px;font:inherit;font-size:12px}.whatsapp-status-select.saving{opacity:.55}.whatsapp-status-select.save-error{border-color:#f04438;background:#fff1f0}
.app-toast{position:fixed;right:18px;bottom:18px;z-index:7000;background:#101828;color:#fff;border-radius:8px;padding:10px 13px;box-shadow:0 14px 40px rgba(16,24,40,.24);font-size:13px;font-weight:650;opacity:0;transform:translateY(10px);pointer-events:none;transition:opacity .22s ease,transform .22s ease}.app-toast.show{opacity:1;transform:translateY(0)}.app-toast.error{background:#b42318}
.success-alert{background:#ecfdf3!important;border-color:#abefc6!important;color:#067647!important}
.reset-debug{margin:12px 0;padding:10px;border:1px solid #d0d5dd;background:#f8fafc;border-radius:7px;font-size:12px}.reset-debug b{display:block;margin-bottom:6px}.reset-debug dl{margin:0;display:grid;grid-template-columns:110px minmax(0,1fr);gap:5px 8px}.reset-debug dt{text-transform:capitalize;color:#667085;font-weight:700}.reset-debug dd{margin:0;word-break:break-all;color:#111827}
.customer-table .customer-name-col,.customer-table .customer-name-cell{width:300px!important}.customer-table .customer-address-col,.customer-table .customer-address-cell{width:220px!important}
.customers-filter-form .toolbar-field.whatsapp-filter-field{width:150px;flex:0 0 150px;height:32px}
.customer-table{min-width:1420px}.customer-table th:nth-child(8),.customer-table td:nth-child(8),.customer-table th:nth-child(9),.customer-table td:nth-child(9){width:120px}
.profile-kpis{display:none}.profile-kpis.active{display:grid}
.sales-table{table-layout:fixed;min-width:1160px}.sales-table th,.sales-table td{padding:5px 6px;overflow:hidden;text-overflow:ellipsis}.sales-table th:nth-child(1),.sales-table td:nth-child(1){width:128px}.sales-table th:nth-child(2),.sales-table td:nth-child(2){width:54px}.sales-table th:nth-child(3),.sales-table td:nth-child(3){width:88px}.sales-table th:nth-child(4),.sales-table td:nth-child(4){width:84px}.sales-table th:nth-child(5),.sales-table td:nth-child(5){width:90px}.sales-table th:nth-child(6),.sales-table td:nth-child(6){width:160px}.sales-table th:nth-child(7),.sales-table td:nth-child(7){width:160px}.sales-table th:nth-child(8),.sales-table td:nth-child(8),.sales-table th:nth-child(9),.sales-table td:nth-child(9){width:105px}.sales-table th:nth-child(10),.sales-table td:nth-child(10),.sales-table th:nth-child(11),.sales-table td:nth-child(11),.sales-table th:nth-child(12),.sales-table td:nth-child(12),.sales-table th:nth-child(13),.sales-table td:nth-child(13),.sales-table th:nth-child(14),.sales-table td:nth-child(14){width:86px}.sales-table th:nth-child(15),.sales-table td:nth-child(15){width:82px}.sales-table .actions-mini{gap:3px}.sales-table .actions-mini a{padding:3px 5px}
.profit-text{color:#2f6b0b;font-weight:700}.sales-table{min-width:1540px}.sales-table th:nth-child(1),.sales-table td:nth-child(1){width:128px}.sales-table th:nth-child(2),.sales-table td:nth-child(2){width:54px}.sales-table th:nth-child(3),.sales-table td:nth-child(3){width:88px}.sales-table th:nth-child(4),.sales-table td:nth-child(4){width:84px}.sales-table th:nth-child(5),.sales-table td:nth-child(5){width:90px}.sales-table th:nth-child(6),.sales-table td:nth-child(6),.sales-table th:nth-child(7),.sales-table td:nth-child(7){width:150px}.sales-table th:nth-child(8),.sales-table td:nth-child(8),.sales-table th:nth-child(9),.sales-table td:nth-child(9){width:95px}.sales-table th:nth-child(10),.sales-table td:nth-child(10),.sales-table th:nth-child(11),.sales-table td:nth-child(11),.sales-table th:nth-child(12),.sales-table td:nth-child(12),.sales-table th:nth-child(13),.sales-table td:nth-child(13),.sales-table th:nth-child(14),.sales-table td:nth-child(14),.sales-table th:nth-child(15),.sales-table td:nth-child(15),.sales-table th:nth-child(16),.sales-table td:nth-child(16),.sales-table th:nth-child(17),.sales-table td:nth-child(17){width:84px}.sales-table th:nth-child(18),.sales-table td:nth-child(18){width:150px}.sales-table th:nth-child(19),.sales-table td:nth-child(19){width:82px}.sales-time-note{display:block;margin-top:2px;font-size:10px;line-height:1.15;white-space:normal}
.clickable-row{cursor:pointer}.clickable-row .actions-mini,.clickable-row a,.clickable-row button,.clickable-row input{cursor:auto}
.sales-table-shell{max-height:calc(100vh - 210px);overflow:auto}.sales-table thead th{position:sticky;top:0;z-index:6}.sales-table thead th:first-child{z-index:8}
.sales-filter-form{flex:1;display:grid;grid-template-columns:145px 145px 145px 92px 180px minmax(210px,1fr) 86px 76px;gap:8px;align-items:center}.sales-filter-form .search-field.grow{min-width:0}.sales-filter-form .search-field input{min-width:0}.toolbar-field{height:34px;border:1px solid var(--line);border-radius:6px;background:#fff;display:flex;align-items:center;gap:6px;padding:0 8px;min-width:0}.toolbar-field span{font-size:10px;text-transform:uppercase;color:#667085;font-weight:700;flex:0 0 auto}.toolbar-field input,.toolbar-field select{border:0;outline:0;height:28px;font:inherit;background:transparent;min-width:0;width:100%}.toolbar-field.feature-field select,.toolbar-field.book-field select{min-width:0}.toolbar-clear{height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 12px}
@media(max-width:1200px){.sales-filter-form{grid-template-columns:repeat(4,minmax(120px,1fr)) 86px 76px}.sales-filter-form .search-field.grow{grid-column:1/-3}.toolbar-field.feature-field{grid-column:1/3}}
@media(max-width:760px){.sales-filter-form{grid-template-columns:1fr 1fr}.sales-filter-form .search-field.grow{grid-column:1/-1}.sales-filter-form button,.sales-filter-form .toolbar-clear{width:100%}}
.investor-message{background:#fff!important;border:1px solid #e4e7ec!important}
.message-head small{color:#667085!important}
.investor-message textarea{background:#fbfcfd!important;color:#101828!important;border:1px solid #d0d5dd!important}
.investor-filter.card{background:#fff!important;border:1px solid var(--line)!important}

/* Original Recovery App embed inside v2 */
.legacy-recovery-shell{height:calc(100vh - 130px);display:flex;flex-direction:column;background:#fff;border-top:1px solid var(--line,#d8dee8)}
.legacy-recovery-note{display:flex;gap:10px;align-items:center;padding:8px 14px;font-size:13px;color:#475569;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.legacy-recovery-note strong{color:#0f172a}
.legacy-recovery-note code{font-size:12px;background:#eef2f7;border:1px solid #dbe3ee;border-radius:5px;padding:1px 5px}
.legacy-recovery-frame{width:100%;height:100%;border:0;background:#fff;display:block}
@media(max-width:800px){.legacy-recovery-shell{height:calc(100vh - 105px)}.legacy-recovery-note{display:none}}

/* ===== 2026-06-10 global typography scale aligned with recovery app ===== */
html,body{font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,"Noto Nastaliq Urdu",sans-serif;font-size:15px;line-height:1.5}
.topbar,.main-menu>a,.nav-root,.nav-drop a,.subnav a,.actionbar,.filter-row,.list-toolbar,.toolbar-search,.search-field input,.toolbar-field input,.toolbar-field select,.btn-new,.primary,.secondary,.muted-btn,.danger,.pill,.lang-link,.logout,.actions-mini a,.actions-mini button,.pager-controls a,.pager-size select,.date-field,.toolbar-clear{font-size:13px}
.row-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}.row-actions form{margin:0}.row-actions .mini{display:inline-flex;align-items:center;justify-content:center;height:28px;padding:0 8px;font-size:12px;line-height:1}.inventory-table th:last-child,.inventory-table td:last-child{width:130px}.inventory-summary-strip .summary-card strong a{color:var(--purple)}
.stock-unit-rows{display:grid;gap:7px}.stock-unit-row{display:grid;grid-template-columns:44px repeat(4,minmax(120px,1fr));gap:7px;align-items:center}.stock-unit-row b{color:#667085}.stock-unit-row input,.inventory-search-form input,.inventory-filter-row>input{border:1px solid var(--line);border-radius:7px;padding:8px 10px;font:inherit;background:#fff}.inventory-filter-row>input{min-width:163px;box-shadow:0 1px 2px rgba(16,24,40,.04)}.inventory-search-form{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.inventory-search-form input{min-width:280px}.inventory-table th{cursor:pointer}.inventory-table th.sort-asc:after{content:' ↑';color:var(--purple)}.inventory-table th.sort-desc:after{content:' ↓';color:var(--purple)}.purchase-items{display:grid;gap:12px;margin-bottom:10px}.purchase-item-card{border:1px solid #d9dde7;border-radius:9px;background:#fbfcff;padding:12px}.purchase-item-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.purchase-item-title{font-size:14px}.purchase-item-grid{display:grid;grid-template-columns:2fr 1.5fr 120px 150px;gap:10px;margin-bottom:10px}.purchase-item-grid label{display:grid;gap:4px;font-size:11px;font-weight:700;color:#475467}.purchase-item-grid input,.purchase-item-grid select{border:1px solid var(--line);border-radius:7px;padding:8px 9px;font:inherit;background:#fff}.duplicate-entry{border-color:#d92d20!important;background:#fff5f5!important;box-shadow:0 0 0 2px rgba(217,45,32,.12)}.inventory-inline-error{color:#b42318;font-weight:700;margin-top:7px;min-height:17px}@media(max-width:900px){.stock-unit-row,.purchase-item-grid{grid-template-columns:1fr}.inventory-search-form input,.inventory-filter-row>input{min-width:0;width:100%}}
.green-text{color:#067647}.inventory-summary-strip{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.inventory-product-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;padding:10px 14px;background:#fff;border-bottom:1px solid var(--line)}.inventory-product-summary>div{border:1px solid #e4e7ec;border-radius:8px;background:#fbfcff;padding:10px}.inventory-product-summary b,.inventory-product-summary span,.inventory-product-summary strong,.inventory-product-summary small{display:block}.inventory-product-summary b{font-size:13px}.inventory-product-summary span,.inventory-product-summary small{color:#667085}.inventory-product-summary strong{font-size:18px;margin:4px 0;color:#111827}
[hidden],.purchase-item-grid label[hidden],#manualSupplierField[hidden],#manualProductField[hidden]{display:none!important}
.brand{font-size:15px}.brand-mark{font-size:12px}.page-title strong{font-size:20px}.page-title span{font-size:13px}.toolbar-summary,.ajax-pager{font-size:13px}
.field label,.form-field label,.payment-sale-picker label{font-size:12px}.field input,.field select,.field textarea,.form-field input,.form-field select,.form-field textarea,.searchable-select input{font-size:14px}
.smart-table td{font-size:13px;height:40px}.smart-table th{font-size:11.5px}.smart-table tfoot input,.col-search{font-size:12px;height:29px}
.summary-card span,.kpi span,.metric-mini span,.toolbar-field span{font-size:12px}.summary-card strong,.kpi b{font-size:20px}.metric-mini strong{font-size:16px}
.info-card h3{font-size:13px}.kv,.detail-grid,.ledger-table{font-size:14px}.ledger-table td,.ledger-table th{font-size:14px}.tag{font-size:12px}
.customer-table{min-width:1180px}.customer-table td,.sales-table td{font-size:13px}.customer-table th,.sales-table th{font-size:11.5px}.customer-table th,.customer-table td,.sales-table th,.sales-table td{padding:6px 7px}
.sales-table{min-width:1720px}.sales-table th:nth-child(6),.sales-table td:nth-child(6),.sales-table th:nth-child(7),.sales-table td:nth-child(7){width:165px}.sales-table th:nth-child(10),.sales-table td:nth-child(10),.sales-table th:nth-child(11),.sales-table td:nth-child(11),.sales-table th:nth-child(12),.sales-table td:nth-child(12),.sales-table th:nth-child(13),.sales-table td:nth-child(13),.sales-table th:nth-child(14),.sales-table td:nth-child(14),.sales-table th:nth-child(15),.sales-table td:nth-child(15),.sales-table th:nth-child(16),.sales-table td:nth-child(16),.sales-table th:nth-child(17),.sales-table td:nth-child(17){width:92px}.sales-table th:nth-child(18),.sales-table td:nth-child(18){width:170px}.sales-time-note{font-size:11px}
.sales-filter-form{grid-template-columns:150px 150px 150px 96px 190px minmax(240px,1fr) 90px 80px}.toolbar-field{height:36px}.toolbar-field input,.toolbar-field select{height:30px}.search-field{height:36px}.search-field input{height:34px}
@media(max-width:1300px){.sales-filter-form{grid-template-columns:repeat(4,minmax(135px,1fr)) 90px 80px}.sales-filter-form .search-field.grow{grid-column:1/-3}.toolbar-field.feature-field{grid-column:1/3}}

/* ===== 2026-06-10 sales screen space efficiency ===== */
.sales-subnav{min-height:34px;padding:0 14px}.sales-subnav a{height:34px;padding:0 13px}
.actionbar:has(+ .sales-subnav){min-height:44px;padding:5px 14px}.actionbar:has(+ .sales-subnav) .btn-new{padding:5px 12px}.actionbar:has(+ .sales-subnav) .page-title strong{font-size:19px}.actionbar:has(+ .sales-subnav) .page-title span{font-size:12px;margin-top:0}
.sales-subnav + .ajax-list .list-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:6px 14px;background:#fff}
.sales-subnav + .ajax-list .toolbar-summary{min-width:96px}
.sales-filter-form{grid-template-columns:145px 145px 145px 120px 180px minmax(260px,1fr) 72px 72px;gap:6px}
.sales-filter-form .toolbar-field,.sales-filter-form .search-field{height:32px;border-radius:6px}
.sales-filter-form .toolbar-field input,.sales-filter-form .toolbar-field select,.sales-filter-form .search-field input{height:30px}
.sales-filter-form .toolbar-field span,.sales-filter-form .search-field span{font-size:11px}
.sales-filter-form button,.sales-filter-form .toolbar-clear{height:32px;padding:0 10px}
.sales-table-shell{max-height:calc(100vh - 156px)}
@media(max-width:1450px){.sales-filter-form{grid-template-columns:126px 126px 126px 90px 150px minmax(180px,1fr) 66px 66px}.sales-filter-form .toolbar-field,.sales-filter-form .search-field{padding:0 7px}.sales-filter-form .search-field span{display:none}}
@media(max-width:1050px){.sales-subnav + .ajax-list .list-toolbar{grid-template-columns:1fr}.sales-filter-form{grid-template-columns:repeat(4,minmax(120px,1fr)) 72px 72px}.sales-filter-form .search-field.grow{grid-column:1/-3}.toolbar-field.feature-field{grid-column:1/3}.sales-table-shell{max-height:calc(100vh - 230px)}}

/* ===== 2026-06-10 sales filters beside tabs ===== */
.sales-controlbar{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:8px;padding:5px 14px;background:#fff;border-bottom:1px solid var(--line)}
.sales-tabs{display:flex;align-items:center;gap:0;white-space:nowrap}
.sales-tabs a{display:inline-flex;align-items:center;height:32px;padding:0 11px;border:1px solid var(--line);border-right:0;color:#344054;background:#fff;font-size:13px}
.sales-tabs a:first-child{border-radius:6px 0 0 6px}.sales-tabs a:last-child{border-right:1px solid var(--line);border-radius:0 6px 6px 0}
.sales-tabs a.active,.sales-tabs a:hover{color:var(--purple);background:#faf7fa;box-shadow:inset 0 -3px 0 var(--purple)}
.sales-controlbar .toolbar-summary{min-width:86px;font-size:13px;white-space:nowrap}
.sales-controlbar .sales-filter-form{display:grid;grid-template-columns:112px 112px 112px 78px 128px 230px 62px 60px;gap:5px;align-items:center;justify-content:end}
.sales-controlbar .toolbar-field,.sales-controlbar .search-field{height:30px;padding:0 6px}.sales-controlbar .toolbar-field input,.sales-controlbar .toolbar-field select,.sales-controlbar .search-field input{height:28px}.sales-controlbar .search-field span{display:none}
.sales-controlbar .search-field.grow{min-width:0;width:230px}.sales-controlbar .search-field input{min-width:0}
.sales-controlbar button,.sales-controlbar .toolbar-clear{height:30px;padding:0 8px}
.sales-table-shell{max-height:calc(100vh - 122px)}
@media(max-width:1550px){.sales-controlbar{grid-template-columns:auto minmax(0,1fr);gap:5px 8px}.sales-controlbar .toolbar-summary{grid-column:1;grid-row:2}.sales-controlbar .sales-filter-form{grid-column:2;grid-row:1 / span 2;grid-template-columns:104px 104px 104px 72px 116px 190px 58px 58px}.sales-controlbar .toolbar-field span{display:none}.sales-controlbar .search-field.grow{width:190px}}
@media(max-width:1120px){.sales-controlbar{grid-template-columns:1fr}.sales-controlbar .toolbar-summary,.sales-controlbar .sales-filter-form{grid-column:auto;grid-row:auto}.sales-controlbar .sales-filter-form{grid-template-columns:repeat(4,minmax(105px,1fr)) 62px 62px;justify-content:stretch}.sales-controlbar .sales-filter-form .search-field.grow{grid-column:1/-3;width:auto}.sales-controlbar .toolbar-field.feature-field{grid-column:1/3}.sales-table-shell{max-height:calc(100vh - 190px)}}

/* Force Sales controls into one efficient row. */
.sales-controlbar{display:flex!important;align-items:center;gap:7px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:5px 10px}
.sales-controlbar .toolbar-summary{flex:0 0 auto;min-width:auto}
.sales-view-note{flex:1 1 180px;min-width:140px;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475467;font-size:13px}
.sales-controlbar .sales-filter-form{display:flex!important;align-items:center;justify-content:flex-end;gap:5px;flex:1 1 auto;min-width:0;flex-wrap:nowrap}
.sales-controlbar .toolbar-field{flex:0 0 112px;min-width:0}
.sales-controlbar .toolbar-field.book-field{flex-basis:76px}
.sales-controlbar .toolbar-field.feature-field{flex-basis:130px}
.sales-controlbar .search-field.grow{flex:0 0 220px;width:220px;min-width:0}
.sales-controlbar button{flex:0 0 60px}.sales-controlbar .toolbar-clear{flex:0 0 58px}
.sales-table-shell{max-height:calc(100vh - 118px)}
@media(max-width:1400px){.sales-tabs a{padding:0 9px}.sales-controlbar{gap:5px}.sales-controlbar .toolbar-field{flex-basis:100px}.sales-controlbar .toolbar-field.book-field{flex-basis:70px}.sales-controlbar .toolbar-field.feature-field{flex-basis:118px}.sales-controlbar .search-field.grow{flex-basis:190px;width:190px}.sales-controlbar .toolbar-summary{display:none}}

/* ===== 2026-06-10 sales list actions removed + footer search normal scroll ===== */
.smart-table tfoot th{position:static!important;bottom:auto!important;z-index:auto!important}
.smart-table tfoot select.col-search{appearance:auto;background:#fff}
.sales-table{min-width:1600px}
.sales-table th:nth-child(1),.sales-table td:nth-child(1){width:54px}
.sales-table th:nth-child(2),.sales-table td:nth-child(2){width:88px}
.sales-table th:nth-child(3),.sales-table td:nth-child(3){width:84px}
.sales-table th:nth-child(4),.sales-table td:nth-child(4){width:90px}
.sales-table th:nth-child(5),.sales-table td:nth-child(5),.sales-table th:nth-child(6),.sales-table td:nth-child(6){width:165px}
.sales-table th:nth-child(7),.sales-table td:nth-child(7),.sales-table th:nth-child(8),.sales-table td:nth-child(8){width:95px}
.sales-table th:nth-child(9),.sales-table td:nth-child(9),.sales-table th:nth-child(10),.sales-table td:nth-child(10),.sales-table th:nth-child(11),.sales-table td:nth-child(11),.sales-table th:nth-child(12),.sales-table td:nth-child(12),.sales-table th:nth-child(13),.sales-table td:nth-child(13),.sales-table th:nth-child(14),.sales-table td:nth-child(14),.sales-table th:nth-child(15),.sales-table td:nth-child(15),.sales-table th:nth-child(16),.sales-table td:nth-child(16){width:92px}
.sales-table th:nth-child(17),.sales-table td:nth-child(17){width:170px}.sales-table th:nth-child(18),.sales-table td:nth-child(18){width:82px}
.sale-detail-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:8px 14px;background:#fff;border-bottom:1px solid var(--line)}
.record-topbar:has(+ .summary-strip + .sale-detail-actions)>div:first-child{display:none}

/* ===== 2026-06-10 sales top horizontal scroll + sticky reference ===== */
.table-top-scroll{overflow-x:auto;overflow-y:hidden;height:16px;background:#fff;border-bottom:1px solid var(--line)}
.table-top-scroll>div{height:1px}
.sales-table th:first-child,.sales-table td:first-child{position:static!important;left:auto!important;z-index:auto!important;background:inherit!important}
.sales-table th:nth-child(4),.sales-table td:nth-child(4){position:sticky;left:0;z-index:7;background:#fff;box-shadow:2px 0 0 rgba(217,221,227,.85)}
.sales-table thead th:nth-child(4){z-index:10;background:#f7f8fa}
.sales-table tfoot th:nth-child(4){z-index:7;background:#f4f5f7}
.sales-table tr:hover td:nth-child(4){background:#fafafa}

/* ===== 2026-06-12 sales title viewing note ===== */
.sales-titlebar{align-items:center;justify-content:space-between;gap:14px;padding-right:14px}
.sales-titlebar .action-title{min-width:0}
.sales-titlebar .page-title strong{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.sales-title-view{font-size:13px;font-weight:500;color:#475467;line-height:1.2}
.sales-title-view:before{content:"Viewing: "}
.sales-title-totals{margin-left:auto;display:flex;align-items:stretch;justify-content:flex-end;gap:7px;flex-wrap:nowrap;overflow-x:auto;max-width:62vw;padding:2px 0}
.sales-title-totals span{min-width:112px;border:1px solid #e4e7ec;background:#fff;border-radius:7px;padding:6px 9px;display:grid;gap:1px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.sales-title-totals em{font-style:normal;text-transform:uppercase;letter-spacing:.02em;color:#667085;font-size:10px;font-weight:800;line-height:1}
.sales-title-totals b{font-size:15px;color:#111827;font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums}
.sales-title-totals .is-short{border-color:#fecaca;background:#fff7f7}.sales-title-totals .is-short b{color:#b42318}
.sales-title-totals .is-profit{border-color:#bbf7d0;background:#f6fef9}.sales-title-totals .is-profit b{color:#067647}
@media(max-width:1100px){.sales-titlebar{align-items:flex-start;flex-direction:column}.sales-title-totals{max-width:100%;width:100%;justify-content:flex-start}}

/* ===== 2026-06-13 payments filters + stats ===== */
.payments-titlebar{padding-right:14px}
.payments-title-totals{max-width:820px}
.payments-tabs-filter-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;background:#fff;border-bottom:1px solid var(--line);min-width:0;overflow:hidden;white-space:nowrap}
.payments-tabs-filter-row .payments-subnav{padding:0;border:0;background:transparent;flex:0 0 auto}
.payments-tabs-filter-row .payments-subnav a{height:32px;display:flex;align-items:center;padding:0 9px;font-size:13px}
.payments-inline-summary{font-size:13px;color:#475467;white-space:nowrap;padding:5px 14px;background:#fff;border-bottom:1px solid var(--line)}
.payments-inline-summary span{margin-left:8px}
.enhanced-payments-toolbar{display:block;padding:8px 14px}
.enhanced-payment-search{flex:1 1 auto;min-width:0;width:auto;display:flex;align-items:center;justify-content:flex-end;gap:4px;flex-wrap:nowrap;margin-left:auto}
.enhanced-payment-search input,.enhanced-payment-search select{height:32px;border:1px solid #d4d8de;border-radius:6px;background:#fff;padding:0 7px;font:inherit;font-size:13px;min-width:0}
.enhanced-payment-search input[type="month"]{width:112px;flex:0 0 112px}
.enhanced-payment-search input[type="date"]{width:108px;flex:0 0 108px}
.enhanced-payment-search select[name="book"]{width:64px;flex:0 0 64px}
.enhanced-payment-search select[name="method"]{width:98px;flex:0 0 98px}
.enhanced-payment-search select[name="investor"],.enhanced-payment-search select[name="recovery"]{width:104px;flex:0 0 104px}
.enhanced-payment-search .payment-main-search{min-width:140px;flex:1 1 190px;height:32px;padding-left:7px}
.enhanced-payment-search .payment-main-search span{font-size:13px}
.enhanced-payment-search .payment-main-search input{height:30px;font-size:13px}
.enhanced-payment-search button{height:32px;min-height:32px;padding:0 10px;font-size:13px;display:flex;align-items:center;justify-content:center;border-radius:6px;white-space:nowrap;flex:0 0 auto}
.payments-toolbar .toolbar-summary{padding:0 0 7px}
@media(max-width:900px){.payments-tabs-filter-row{padding-bottom:7px}.enhanced-payment-search{margin-left:8px}.payments-inline-summary{margin:0}}

/* ===== 2026-06-13 compact received payments table ===== */
.payments-table{table-layout:fixed!important;min-width:100%!important}
.payments-table th,.payments-table td{height:33px!important;padding:5px 7px!important;font-size:13px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payments-table th:nth-child(1),.payments-table td:nth-child(1){width:88px}
.payments-table th:nth-child(2),.payments-table td:nth-child(2){width:120px}
.payments-table th:nth-child(3),.payments-table td:nth-child(3){width:92px}
.payments-table th:nth-child(4),.payments-table td:nth-child(4){width:190px}
.payments-table th:nth-child(5),.payments-table td:nth-child(5){width:92px}
.payments-table th:nth-child(6),.payments-table td:nth-child(6){width:190px}
.payments-table th:nth-child(7),.payments-table td:nth-child(7),.payments-table th:nth-child(8),.payments-table td:nth-child(8){width:120px}
.payments-table th:nth-child(9),.payments-table td:nth-child(9){width:88px}
.payments-table .other-unpaid-cell{color:#b42318;font-weight:650}
.payments-table-shell{max-height:calc(100vh - 180px);overflow:auto}
.payments-table thead th{position:sticky;top:0;z-index:6}

/* ===== 2026-06-12 payment detail page ===== */
.payment-view-head .record-actions{display:flex;gap:7px;flex-wrap:wrap}
.payment-view-hero{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:12px 14px;background:#fff;border-bottom:1px solid var(--line)}
.payment-view-hero>div{border:1px solid #e4e7ec;border-radius:8px;background:#fff;padding:12px 14px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.payment-view-hero span{display:block;color:#667085;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.payment-view-hero strong{display:block;font-size:24px;line-height:1.15;margin-top:5px;color:#111827}
.payment-view-hero small{display:block;color:#667085;margin-top:5px}
.payment-view-hero .advance-kpi{background:#f7fbff;border-color:#bfdbfe}
.payment-view-hero .profit-kpi{background:#f6fef9;border-color:#bbf7d0}
.payment-view-hero .profit-kpi strong,.profit-text{color:#067647!important}
.payment-view-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:12px;padding:14px}
.payment-links-card{border-left:4px solid var(--purple)}
.payment-link-list{display:grid;gap:8px}
.payment-link-list a{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #e4e7ec;border-radius:7px;padding:9px 10px;background:#fbfcff}
.payment-link-list a:hover{border-color:#c9b4c4;background:#faf7fa}
.payment-link-list b{color:#111827}.payment-link-list span{color:#667085;text-align:right}
.whatsapp-receipt-btn{display:inline-flex!important;align-items:center;gap:6px;border-color:#bbf7d0!important;background:#f0fdf4!important;color:#067647!important;font-weight:700}
.whatsapp-receipt-btn svg{width:17px;height:17px;fill:#16a34a;display:block}
.mini-wa-receipt{height:28px;min-height:28px;padding:3px 8px;border-radius:6px;font-size:12px;text-decoration:none;white-space:nowrap}
.mini-wa-receipt:hover{cursor:pointer;filter:brightness(.98);box-shadow:0 0 0 2px rgba(22,163,74,.12)}
.customer-wise-payments-table .customer-wise-accounts{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recoveryman-date-filter input{height:32px;border:1px solid #d4d8de;border-radius:6px;padding:0 8px;font:inherit}
.recoveryman-report-grid{margin:14px;gap:14px}
.recoveryman-report-grid .info-card{border:1px solid var(--line);border-radius:8px;background:#fff;overflow:hidden}
.recoveryman-report-table{min-width:760px}
.recoveryman-report-table tbody tr{cursor:pointer}
.recoveryman-report-table tbody tr:hover{background:#f8fbff}
.users-table-shell{max-height:calc(100vh - 185px);overflow:auto!important}
.users-table{table-layout:fixed;min-width:980px;width:100%}
.users-table th,.users-table td{padding:7px 10px;overflow:hidden;text-overflow:ellipsis}
.users-table th:first-child,.users-table td:first-child{position:static!important;left:auto!important;z-index:auto!important;background:inherit!important;width:70px}
.users-table th:nth-child(2),.users-table td:nth-child(2){width:230px}
.users-table th:nth-child(3),.users-table td:nth-child(3){width:160px}
.users-table th:nth-child(4),.users-table td:nth-child(4){width:130px}
.users-table th:nth-child(5),.users-table td:nth-child(5){width:150px}
.users-table th:nth-child(7),.users-table td:nth-child(7){width:105px}
.users-table tbody tr{cursor:pointer}
.user-profile-grid{margin:14px;gap:14px}
.user-profile-grid .info-card{border:1px solid var(--line);border-radius:8px;background:#fff}
.user-profile-actions{margin-top:14px}
.disabled-link{display:inline-flex;align-items:center;color:#98a2b3!important;background:#f8fafc!important;cursor:not-allowed}
@media(max-width:1000px){.payment-view-hero,.payment-view-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.payment-view-hero,.payment-view-grid{grid-template-columns:1fr}}

/* ===== 2026-06-17 WhatsApp queue manager ===== */
.whatsapp-subnav{padding:0 14px}.notice{margin:10px 14px;padding:10px 12px;border:1px solid #d0d5dd;background:#fff;border-radius:7px}.notice.success{background:#f6fef9;border-color:#abefc6;color:#067647}
.whatsapp-status-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:10px 14px;background:#fff;border-bottom:1px solid var(--line)}
.whatsapp-status-grid>div{border:1px solid #e4e7ec;border-radius:7px;background:#fff;padding:9px 11px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.whatsapp-status-grid span{display:block;color:#667085;text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.02em}
.whatsapp-status-grid b{display:block;margin-top:3px;font-size:18px;color:#111827}.whatsapp-status-grid .ok b{color:#067647}.whatsapp-status-grid .bad b{color:#b42318}
.whatsapp-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 14px;background:#fff;border-bottom:1px solid var(--line)}
.whatsapp-filter{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}.whatsapp-filter select,.whatsapp-filter input{height:32px;border:1px solid #d4d8de;border-radius:6px;background:#fff;padding:0 8px;font:inherit}.whatsapp-filter input{width:270px}
.whatsapp-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.whatsapp-actions form,.whatsapp-table .actions-mini form{display:inline-flex;margin:0}.whatsapp-actions button{height:32px}
.whatsapp-table{min-width:1820px}.whatsapp-table th,.whatsapp-table td{font-size:12.5px;padding:6px 7px}.whatsapp-table td:nth-child(9),.whatsapp-table td:nth-child(15),.whatsapp-table td:nth-child(16){max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whatsapp-table-shell{max-height:calc(100vh - 240px)}
@media(max-width:1000px){.whatsapp-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.whatsapp-toolbar{align-items:stretch;flex-direction:column}.whatsapp-filter{flex-wrap:wrap}.whatsapp-filter input{width:100%}.whatsapp-actions{justify-content:flex-start}}

/* ===== 2026-06-18 guarantor/settings polish ===== */
.guarantor-table{min-width:1260px!important}
.guarantor-table th:nth-child(6),.guarantor-table td:nth-child(6){width:185px!important}
.guarantor-table th:nth-child(8),.guarantor-table td:nth-child(8){width:82px!important}
.guarantor-table .accounts-cell{white-space:normal;line-height:1.35}
.account-link{display:block;font-weight:700;color:#344054}
.account-link:hover{color:var(--purple);text-decoration:underline}
.accounts-cell small{display:block;color:#667085;margin-top:2px}
.settings-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.settings-links a{display:inline-flex;align-items:center;height:32px}
.main-menu>a,.nav-root{font-size:13.5px!important}
.header-quick-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border-radius:8px;font-weight:850;font-size:13px;border:1px solid transparent;box-shadow:0 5px 14px rgba(16,24,40,.08);white-space:nowrap;line-height:1}
.header-quick-btn span{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:50%;background:rgba(255,255,255,.72);font-size:15px;font-weight:900;line-height:1}
.header-quick-btn.payment{background:#f3eef2;color:var(--purple);border-color:#d9c7d4}
.header-quick-btn.sale{background:#ecfdf3;color:#067647;border-color:#abefc6}
.header-quick-btn:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(16,24,40,.12)}
.top-actions>.header-quick-btn,.top-actions>.lang-link,.top-actions>.user-name,.top-actions>.logout{display:none!important}
.account-menu{position:relative;display:flex;align-items:center}
.account-menu-btn{height:30px;width:32px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#344054;font-size:20px;line-height:1;cursor:pointer}
.account-menu-drop{display:none;position:absolute;right:0;top:34px;min-width:165px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 18px 42px rgba(16,24,40,.16);z-index:6000;overflow:hidden}
.account-menu:hover .account-menu-drop,.account-menu:focus-within .account-menu-drop{display:block}
.account-menu-drop a,.account-menu-name{display:block;padding:9px 12px;font-size:13px;color:#111827;border-bottom:1px solid var(--line2)}
.account-menu-name{font-weight:800;background:#fbfcff;color:#475467}
.account-menu-drop a:hover,.account-menu-drop a.active{background:#faf7fa;color:var(--purple)}
.inventory-table{min-width:900px}
.main-menu .global-search-wrap{height:34px!important;min-width:199px!important;max-width:760px!important;flex:1 1 560px!important;margin-left:12px}
.main-menu .global-search-wrap input{height:32px;font-size:14px}

/* ===== 2026-06-18 inventory action menus ===== */
.purchases-table{min-width:1180px}
.purchase-units-panel{margin-top:0}
.purchase-units-table{min-width:980px}
.inventory-action-menu{position:relative;display:inline-block}
.inventory-action-menu summary{list-style:none;display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 10px;border:1px solid #cfd6df;border-radius:5px;background:#2f6f9f;color:#fff;font-weight:750;cursor:pointer}
.inventory-action-menu summary::-webkit-details-marker{display:none}
.inventory-action-menu summary:after{content:'▾';font-size:10px;opacity:.9}
.inventory-action-panel{position:absolute;right:0;top:34px;z-index:80;min-width:190px;background:#fff;border:1px solid var(--line);border-radius:7px;box-shadow:0 18px 42px rgba(16,24,40,.16);overflow:hidden}
.inventory-action-panel a,.inventory-action-panel button{display:block;width:100%;border:0;border-bottom:1px solid var(--line2);background:#fff;color:#111827;text-align:left;padding:9px 12px;font:inherit;cursor:pointer}
.inventory-action-panel a:hover,.inventory-action-panel button:hover{background:#f7f9fc;color:var(--purple)}
.inventory-action-panel form{margin:0}
.inventory-action-panel button{color:var(--danger)}

/* ===== 2026-06-18 sleek purchases list ===== */
.inventory-titlebar{min-height:54px}
.compact-inventory-actions{padding:6px 14px;gap:6px}
.compact-inventory-actions a{height:30px;display:inline-flex;align-items:center;padding:0 10px}
.sleek-purchase-filter{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;padding:8px 14px;overflow:auto}
.sleek-purchase-filter input,.sleek-purchase-filter select,.sleek-purchase-filter button,.sleek-purchase-filter a{height:34px;border-radius:7px;font-size:13px;white-space:nowrap}
.sleek-purchase-filter input,.sleek-purchase-filter select{border:1px solid #d4d8de;background:#fff;padding:0 10px}
.sleek-purchase-filter .purchase-search{width:360px;flex:1 1 300px;min-width:240px}
.sleek-purchase-filter .mini-select{width:140px;flex:0 0 140px}
.sleek-purchase-filter .mini-date{width:122px;flex:0 0 122px}
.sleek-purchase-filter button,.sleek-purchase-filter a{display:inline-flex;align-items:center;justify-content:center;padding:0 12px}
.purchases-table{width:max-content!important;min-width:100%!important}
.purchases-table th,.purchases-table td{height:34px!important;padding:5px 8px!important;font-size:13px!important}
.purchases-table th:nth-child(1),.purchases-table td:nth-child(1){width:112px;min-width:112px}
.purchases-table th:nth-child(2),.purchases-table td:nth-child(2){width:92px}
.purchases-table th:nth-child(3),.purchases-table td:nth-child(3){width:135px}
.purchases-table th:nth-child(4),.purchases-table td:nth-child(4){width:150px}
.purchases-table th:nth-child(5),.purchases-table td:nth-child(5){width:170px}
.purchases-table th:nth-child(6),.purchases-table td:nth-child(6){width:70px}
.purchases-table th:nth-child(7),.purchases-table td:nth-child(7),.purchases-table th:nth-child(8),.purchases-table td:nth-child(8),.purchases-table th:nth-child(9),.purchases-table td:nth-child(9),.purchases-table th:nth-child(10),.purchases-table td:nth-child(10){width:105px}
.purchases-table th:nth-child(11),.purchases-table td:nth-child(11),.purchases-table th:nth-child(12),.purchases-table td:nth-child(12){width:105px}
.purchases-table th:nth-child(13),.purchases-table td:nth-child(13){min-width:150px;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.purchases-table th:first-child,.purchases-table td:first-child{position:sticky!important;left:0!important;z-index:25!important;background:#fff!important;box-shadow:1px 0 0 var(--line)}
.purchases-table th:first-child{background:#f7f8fa!important;z-index:35!important}
.purchases-table tr:hover td:first-child{background:#fafafa!important}
.purchase-actions-cell{overflow:visible!important}
.purchase-row-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}
.mini-action{display:inline-flex;align-items:center;justify-content:center;height:26px;min-width:42px;padding:0 7px;border-radius:6px;border:1px solid #d4d8de;background:#fff;color:#344054;font-weight:750;font-size:12px;line-height:1}
.mini-action.view{background:#f7f2f6;border-color:#d8c6d2;color:var(--purple)}
.mini-action.pay{background:#ecfdf3;border-color:#abefc6;color:#067647}
.mini-action.muted-action{background:#f8fafc;color:#475467}
.mini-action:hover{box-shadow:0 1px 4px rgba(16,24,40,.12);transform:translateY(-1px)}
.purchase-action-select{height:28px;width:108px;border:1px solid #cfd6df;border-radius:7px;background:#fff;color:#344054;font:inherit;font-size:12px;font-weight:750;padding:0 6px;cursor:pointer}
.purchase-action-select:hover,.purchase-action-select:focus{border-color:var(--purple);box-shadow:0 0 0 2px rgba(113,75,103,.10);outline:0}
.inventory-summary-strip{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:1100px){.sleek-purchase-filter{flex-wrap:wrap}.sleek-purchase-filter .purchase-search{width:100%;flex-basis:100%}}

/* ===== 2026-06-18 purchase identity toggle ===== */
.identity-toggle{display:inline-flex;align-items:center;gap:8px;margin:8px 0 10px;color:#344054;font-weight:750}
.identity-toggle input{width:auto!important}
.purchase-item-card .stock-unit-rows:empty{display:none}
.inventory-sale-items{display:grid;gap:7px;margin-bottom:8px}
.inventory-sale-row{display:grid;grid-template-columns:minmax(260px,1fr) 90px 78px;gap:7px;align-items:center}
.inventory-sale-row select,.inventory-sale-row input{height:34px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 9px;font:inherit}
.inventory-sale-row .mini{height:34px;padding:0 10px}
@media(max-width:800px){.inventory-sale-row{grid-template-columns:1fr}}

.form-sheet.sale-form-soft{background:linear-gradient(180deg,#ffffff 0,#fbfcff 100%)}
.sale-form-soft .smart-form{gap:18px;padding:18px}
.sale-form-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(12,1fr);gap:14px 18px;border:1px solid #dde7f1;border-radius:12px;padding:14px;background:#f8fbff;box-shadow:0 8px 22px rgba(16,24,40,.035)}
.sale-people-panel{background:#fbf8ff;border-color:#eadff0}
.sale-price-panel{background:#f6fbf8;border-color:#dbeee8}
.sale-docs-panel{background:#fffaf3;border-color:#f4e4cc}
.sale-form-soft .section-title{border:1px solid #e6edf5;border-radius:8px;padding:9px 12px;background:#f4f8fb;color:#122033}
.sale-people-panel .section-title{background:#f5eef8;border-color:#eadff0}
.sale-price-panel .section-title{background:#eef9f2;border-color:#dbeee8}
.sale-docs-panel .section-title{background:#fff4e5;border-color:#f4e4cc}
.sale-form-soft .field,.sale-form-soft .checkbox-card,.sale-form-soft .metric-mini{border:1px solid #edf1f6;border-radius:8px;background:rgba(255,255,255,.86);padding:10px;box-shadow:0 1px 2px rgba(16,24,40,.025)}
.sale-form-soft .field input,.sale-form-soft .field select,.sale-form-soft .field textarea{background:transparent}
.sale-form-soft .metric-mini{background:#f8fbff}
.sale-form-soft .metric-mini:nth-of-type(2n){background:#fbf8ff}
.locked-panel{background:#f7f8fb!important;border-color:#dde3ec!important}
.lock-note{border:1px solid #d7e3ef;background:#f3f8fc;color:#475467;border-radius:8px;padding:8px 10px;margin:0 0 8px;font-size:12px}
.sale-form-soft input[readonly],.sale-form-soft select:disabled,.inventory-sale-row button:disabled{color:#667085;background:#f2f4f7!important;cursor:not-allowed}
.finish-early-card{margin:14px 0;background:#fbfcff;border:1px solid #d8e1ec;border-radius:10px;padding:14px}
.finish-early-card h3{margin:0 0 10px;font-size:14px}
.finish-early-form{display:grid;grid-template-columns:150px 150px 140px minmax(180px,1fr) auto;gap:8px;align-items:end}
.finish-early-form label{display:block;font-size:11px;font-weight:700;color:#475467;margin-bottom:4px}
.finish-early-form input{width:100%;border:1px solid var(--line);border-radius:7px;padding:7px 9px;font:inherit;background:#fff}
@media(max-width:900px){.finish-early-form{grid-template-columns:1fr}}
@media(max-width:900px){.sale-form-panel{grid-template-columns:1fr}.sale-form-panel .field,.sale-form-panel .field.wide,.sale-form-panel .field.full,.sale-form-panel .metric-mini,.sale-form-panel .checkbox-card{grid-column:1/-1}}

/* ===== 2026-06-19 module-wise global search results ===== */
.search-results-title{align-items:center;gap:16px}
.search-results-form{max-width:640px;margin-left:auto}
.search-results-form input{min-width:360px}
.search-results-page{display:grid;gap:14px;padding:14px}
.search-result-section{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.search-result-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#f7f8fa;border-bottom:1px solid var(--line)}
.search-result-heading h2{margin:0;font-size:17px;line-height:1.2}
.search-result-heading span{color:#667085;font-weight:750}
.search-result-list{display:grid}
.search-result-item{display:grid;gap:4px;padding:12px 14px;border-bottom:1px solid #eef2f6;color:inherit;text-decoration:none}
.search-result-item:last-child{border-bottom:0}
.search-result-item:hover{background:#fbf8fb}
.search-result-item b{font-size:15px;color:#101828}
.search-result-item span{color:#667085;font-size:13px}
.search-result-item.people-first{border-left:4px solid var(--purple);padding-left:10px}
@media(max-width:700px){.search-results-form{max-width:none;width:100%;margin-left:0}.search-results-form input{min-width:0;width:100%}.search-results-title{align-items:stretch}.search-result-heading{align-items:flex-start;flex-direction:column;gap:3px}}

/* ===== 2026-06-19 global mobile app presentation ===== */
@media(max-width:1000px){
  :root{--navh:56px}
  html,body{font-size:14px;background:#eef2f6;overflow-x:hidden}
  body{padding-bottom:18px}
  .topbar.compact-topbar{position:sticky;top:0;z-index:5000;display:grid;grid-template-columns:1fr auto;gap:0;padding:0;background:#fff;border-bottom:1px solid #d9dee7;box-shadow:0 8px 22px rgba(16,24,40,.10)}
  .brand-row{grid-column:1/3;height:56px;padding:0 12px;display:flex;align-items:center;justify-content:space-between}
  .brand{font-size:15px}.brand-mark{width:34px;height:30px;border-radius:9px}
  .mobile-menu-btn{display:inline-flex!important;align-items:center;justify-content:center;width:40px;height:38px;border-radius:10px;font-size:20px;background:#f8fafc}
  .main-menu{grid-column:1/3;display:none!important;position:fixed;left:10px;right:10px;top:62px;max-height:calc(100vh - 78px);overflow:auto!important;flex-direction:column;align-items:stretch;padding:8px;background:#fff;border:1px solid #d9dee7;border-radius:14px;box-shadow:0 24px 70px rgba(16,24,40,.24)}
  .main-menu.open{display:flex!important}
  .main-menu>a,.nav-root{height:42px!important;display:flex!important;align-items:center;padding:0 12px!important;border-radius:10px;border-bottom:0!important;font-size:15px!important}
  .main-menu>a.active,.nav-group.active>.nav-root{background:#f3eef2;color:var(--purple)}
  .nav-group{display:block!important;height:auto!important}.nav-drop{position:static!important;display:block!important;min-width:0!important;border:0!important;box-shadow:none!important;background:#f8fafc!important;border-radius:10px!important;margin:0 0 6px 10px!important;overflow:hidden}
  .nav-drop a{height:38px!important;display:flex!important;align-items:center;padding:0 12px!important;font-size:14px!important;border-bottom:1px solid #eef2f6!important}
  .main-menu .global-search-wrap{order:-1;width:100%!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;margin:0 0 8px!important;height:42px!important;border-radius:12px!important}
  .main-menu .global-search-wrap input{height:40px!important;font-size:15px!important}.global-search-results{left:0!important;right:0!important;width:100%!important;top:46px!important}
  .top-actions{position:absolute;right:58px;top:10px;margin:0!important;border:0!important;padding:0!important}.account-menu-btn{height:36px;width:38px;border-radius:10px}.account-menu-drop{right:0;top:42px}

  .app-main{min-height:calc(100vh - 56px)}.content{padding:0}
  .actionbar,.record-topbar,.form-head{min-height:0;align-items:stretch!important;flex-direction:column!important;padding:12px!important;gap:10px;background:#fff}
  .action-title{width:100%;align-items:center;gap:9px}.page-title strong{font-size:21px;line-height:1.15}.page-title span{font-size:13px}
  .btn-new,.primary,.secondary,.muted-btn,.danger,.toolbar-clear,.copy-mini,.mini,.mini-action{min-height:40px;border-radius:10px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;font-size:14px}
  .filter-row,.list-toolbar,.payments-tabs-filter-row,.whatsapp-toolbar,.inventory-actions-row,.inventory-filter-row{padding:8px 10px!important;gap:8px!important;overflow-x:auto!important;white-space:nowrap;background:#fff}
  .pill,.subnav a,.sales-tabs a,.customer-tabs a{height:38px;border-radius:999px!important;padding:0 14px!important;display:inline-flex;align-items:center;font-size:14px!important}
  .subnav{padding:8px 10px!important;overflow-x:auto!important;gap:6px!important}
  .toolbar-search,.customers-filter-form,.sales-filter-form,.enhanced-payment-search,.sleek-purchase-filter,.inventory-search-form,.whatsapp-filter,.recoveryman-date-filter{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:7px!important;overflow-x:auto!important;width:100%!important;margin:0!important}
  .toolbar-field,.search-field,.date-field,.toolbar-search input,.toolbar-search select,.filter-row input,.filter-row select,.enhanced-payment-search input,.enhanced-payment-search select,.sleek-purchase-filter input,.sleek-purchase-filter select,.whatsapp-filter input,.whatsapp-filter select{height:40px!important;min-width:150px!important;border-radius:11px!important;font-size:14px!important;flex:0 0 auto!important}
  .search-field.grow,.payment-main-search,.sleek-purchase-filter .purchase-search{min-width:235px!important;flex:0 0 250px!important}
  .search-field input{height:38px!important;min-width:0!important;font-size:14px!important}
  .toolbar-search button,.filter-row button,.sleek-purchase-filter button{height:40px!important;border-radius:11px!important;flex:0 0 auto!important}

  .sales-titlebar,.payments-titlebar,.customers-titlebar,.inventory-titlebar{gap:10px!important}
  .sales-titlebar .page-title strong{display:block}.sales-title-view{display:block;margin-top:3px;font-size:13px}
  .sales-title-totals{width:100%;max-width:100%;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(126px,1fr);overflow-x:auto;gap:8px;padding-bottom:2px}
  .sales-title-totals span{min-width:126px;border-radius:12px;padding:9px 11px}.sales-title-totals b{font-size:18px}.sales-title-totals em{font-size:11px}
  .dashboard-grid,.small-kpis,.payment-view-hero,.payment-view-grid,.detail-grid,.user-profile-grid,.recoveryman-report-grid,.investor-kpis,.whatsapp-status-grid,.inventory-summary-strip{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:10px!important;margin:0!important}
  .kpi-card,.mini-kpi,.summary-card,.kpi,.payment-view-hero>div,.info-card,.card,.form-sheet,.profile-sheet{border-radius:14px!important;border:1px solid #d9dee7!important;box-shadow:0 6px 20px rgba(16,24,40,.06)!important;background:#fff!important}
  .kpi-card strong,.payment-view-hero strong{font-size:24px}.mini-kpi{padding:12px 14px}

  .form-shell{max-width:none;margin:10px;padding:0}.form-sheet{overflow:hidden}
  .smart-form,.form-grid,.payment-form-grid,.sale-form-panel,.purchase-item-grid,.stock-unit-row,.inventory-sale-row,.finish-early-form{display:grid!important;grid-template-columns:1fr!important;gap:11px!important;padding:12px!important}
  .field,.field.wide,.field.full,.form-field,.form-field.wide,.form-field.full,.metric-mini,.checkbox-card{grid-column:1/-1!important}
  .field input,.field select,.field textarea,.form-field input,.form-field select,.form-field textarea,.purchase-item-grid input,.purchase-item-grid select,.inventory-sale-row input,.inventory-sale-row select{height:44px!important;border:1px solid #d4d8de!important;border-radius:11px!important;padding:0 11px!important;background:#fff!important;font-size:15px!important}
  .field textarea,.form-field textarea{height:auto!important;min-height:92px!important;padding-top:10px!important}
  .field label,.form-field label{font-size:13px!important}.section-title{border-radius:11px!important;margin:0!important;font-size:15px!important}
  .profile-sheet{margin:10px!important}.profile-main{grid-template-columns:54px 1fr!important;gap:12px!important;padding:14px!important}.profile-avatar{width:54px;height:54px;border-radius:14px;font-size:24px}.profile-main h1{font-size:25px;margin:2px 0 5px}.contact-lines{gap:7px;display:grid}
  .tabs{margin:0 10px;overflow-x:auto}.tab{height:42px;white-space:nowrap;border-radius:10px 10px 0 0;padding:0 13px;font-size:14px}.tab-panel{margin:0 10px 12px;padding:10px;border-radius:0 0 14px 14px}

  .table-top-scroll{display:none!important}
  .table-shell,.customer-table-shell,.sales-table-shell,.payments-table-shell,.whatsapp-table-shell,.users-table-shell{max-height:none!important;overflow:visible!important;background:transparent!important;border:0!important}
  table.smart-table,table.data-table,.smart-table,.customer-table,.sales-table,.payments-table,.inventory-table,.users-table,.whatsapp-table,.purchases-table,.recoveryman-report-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;background:transparent!important}
  .smart-table thead,.smart-table tfoot,.data-table thead{display:none!important}
  .smart-table tbody,.data-table tbody{display:grid!important;gap:10px!important}
  .smart-table tr,.data-table tr{display:block!important;background:#fff!important;border:1px solid #d9dee7!important;border-radius:14px!important;box-shadow:0 5px 18px rgba(16,24,40,.055)!important;overflow:hidden!important;margin:0 10px!important}
  .smart-table td,.data-table td{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;width:auto!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:38px!important;padding:9px 12px!important;border-bottom:1px solid #eef2f6!important;white-space:normal!important;text-align:right!important;position:static!important;left:auto!important;z-index:auto!important;background:transparent!important;box-shadow:none!important;font-size:14px!important}
  .smart-table td:last-child,.data-table td:last-child{border-bottom:0!important}
  .smart-table td:before,.data-table td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:#667085;font-weight:800;text-transform:uppercase;letter-spacing:.02em;font-size:11px;line-height:1.35}
  .smart-table td.num,.data-table td.num{text-align:right!important}
  .smart-table .empty-row{justify-content:center!important;text-align:center!important}.smart-table .empty-row:before{display:none}
  .clickable-row{cursor:pointer}.clickable-row .actions-mini,.clickable-row a,.clickable-row button,.clickable-row input{cursor:pointer}
  .row-actions,.actions-mini,.purchase-row-actions,.whatsapp-actions{justify-content:flex-end;flex-wrap:wrap;gap:6px}
  .tag{font-size:12px;padding:3px 8px}.copy-line{display:grid;grid-template-columns:1fr;gap:8px}.copy-line input{height:42px;border:1px solid #d4d8de;border-radius:10px;padding:0 10px}
  .modal-card{width:calc(100vw - 20px)!important;max-height:calc(100vh - 24px);overflow:auto;border-radius:16px!important}
}

/* async totals placeholder */
.totals-loading{display:inline-block;min-width:120px;height:16px;border-radius:6px;background:linear-gradient(90deg,#ececec,#f6f6f6,#ececec);background-size:200% 100%;animation:tlsh 1.1s ease-in-out infinite}
@keyframes tlsh{0%{background-position:200% 0}100%{background-position:-200% 0}}
/* Quick-add (customer / guarantor) modal — clean 2-column scrollable card */
#quickAddModal .modal-card{width:min(680px,96vw);max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
#quickAddModal .modal-form{grid-template-columns:1fr 1fr;gap:14px 16px;overflow:auto;min-height:0;align-content:start}
#quickAddModal .modal-form .form-field{display:flex;flex-direction:column;gap:5px;margin:0}
#quickAddModal .modal-form .form-field label{font-size:12px;font-weight:600;color:#475467;margin:0}
#quickAddModal .modal-form .form-field input,#quickAddModal .modal-form .form-field textarea{width:100%;border:1px solid #d0d5dd;border-radius:8px;padding:9px 11px;font-size:14px;background:#fff;box-shadow:none}
#quickAddModal .modal-form .form-field input:focus,#quickAddModal .modal-form .form-field textarea:focus{outline:none;border-color:#7c4d73;box-shadow:0 0 0 3px rgba(124,77,115,.12)}
#quickAddModal .modal-form .form-field:has(textarea){grid-column:1/-1}
#quickAddModal .modal-actions{grid-column:1/-1;margin-top:2px}
@media(max-width:560px){#quickAddModal .modal-form{grid-template-columns:1fr}}
