/* Finance center: repair billing, POS billing and the combined debtor view. */
.billing-hub-grid{display:grid;grid-template-columns:minmax(310px,1fr) minmax(310px,1fr) minmax(330px,1.08fr);gap:12px;margin:14px 0}.billing-hub-panel{min-width:0;overflow:hidden;border:1px solid #ded8cc;border-radius:15px;background:#fff;box-shadow:0 6px 20px rgba(42,33,17,.05)}.billing-hub-panel.repair{border-top:4px solid #367bd7}.billing-hub-panel.pos{border-top:4px solid #eb7d25}.billing-hub-panel.debt{border-top:4px solid #20a160}.billing-hub-panel>header{display:grid;gap:10px;padding:13px 14px 11px;border-bottom:1px solid #ebe5da;background:linear-gradient(110deg,#fbfdff,#fff)}.billing-hub-panel.pos>header{background:linear-gradient(110deg,#fffaf4,#fff)}.billing-hub-panel.debt>header{background:linear-gradient(110deg,#f5fcf7,#fff)}.billing-hub-title{display:flex;align-items:center;gap:10px}.billing-hub-title>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#eaf2ff;color:#2d70ca;font-size:20px}.billing-hub-panel.pos .billing-hub-title>span{background:#fff0e3;color:#dc6d18}.billing-hub-panel.debt .billing-hub-title>span{background:#e9f8ee;color:#168748}.billing-hub-title h2{margin:0;font-size:15px}.billing-hub-title p{margin:2px 0 0;color:var(--muted);font-size:9px}.billing-hub-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.billing-hub-actions button{min-height:34px;padding:6px 8px;font-size:9.5px}.billing-hub-panel.debt .billing-hub-actions{grid-template-columns:1fr}.billing-hub-kpis{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid #ebe5da}.billing-hub-kpis>div{min-width:0;padding:10px 9px;border-left:1px solid #eee8de}.billing-hub-kpis>div:first-child{border-left:0}.billing-hub-kpis span,.billing-hub-kpis small,.billing-hub-kpis b{display:block}.billing-hub-kpis span{overflow:hidden;color:#766e63;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.billing-hub-kpis b{overflow:hidden;margin-top:4px;color:#1e1b17;font-size:15px;text-overflow:ellipsis}.billing-hub-kpis small{margin-top:2px;color:#8a8277;font-size:7.5px}.billing-hub-kpis>div:nth-child(2) b{color:#d23e34}.billing-hub-kpis>div:nth-child(3) b{color:#d97819}.billing-hub-kpis>div:nth-child(4) b{color:#168747}.billing-hub-recent>header{display:flex;align-items:center;justify-content:space-between;padding:9px 12px 6px}.billing-hub-recent>header b{font-size:10px}.billing-hub-recent>header button{padding:2px;border:0;background:transparent;color:#2f67b9;box-shadow:none;font-size:8.5px}.billing-hub-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;gap:8px;align-items:center;width:100%;min-height:47px;padding:6px 11px;border:0;border-top:1px solid #f0ebe3;border-radius:0;background:#fff;color:#24201a;box-shadow:none;text-align:left}.billing-hub-row:hover{background:#fffaf0}.billing-hub-doc{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#edf4ff;color:#3476cf}.billing-hub-doc.pos{background:#fff0e4;color:#dc711d}.billing-hub-row b,.billing-hub-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.billing-hub-row b{font-size:9.5px}.billing-hub-row small{margin-top:2px;color:#7d756a;font-size:7.8px}.billing-hub-row strong{color:#1f8550;font-size:10px;white-space:nowrap}.billing-hub-row em{padding:3px 5px;border-radius:5px;background:#eaf2ff;color:#346ab4;font-size:7px;font-style:normal}.billing-hub-row em.pos{background:#fff0e3;color:#c96518}.billing-hub-empty{margin:0;padding:30px 12px;color:#8a8277;font-size:9px;text-align:center}.billing-debt-total{display:grid;grid-template-columns:.75fr 1.2fr;padding:10px 12px;border-bottom:1px solid #e8e4dc}.billing-debt-total>div>span,.billing-debt-total>div>small,.billing-debt-total>div>b{display:block}.billing-debt-total>div>span{color:#756e63;font-size:8.5px}.billing-debt-total>div>b{margin-top:3px;font-size:18px}.billing-debt-total>div:nth-child(2)>b{color:#d83d34}.billing-debt-total>div>small{color:#81796d;font-size:7.5px}.billing-debt-split{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.billing-debt-split span{display:flex!important;align-items:center;gap:5px;padding:6px 8px;border-radius:7px;background:#f7f7f5}.billing-debt-split i{width:7px;height:7px;border-radius:50%;background:#377bd4}.billing-debt-split i.pos{background:#eb7c24}.billing-debt-split b{margin-left:auto;font-size:9px}.billing-debtor-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:center;min-height:43px;padding:6px 11px;border-top:1px solid #f0ebe3}.billing-debtor-row b,.billing-debtor-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.billing-debtor-row b{font-size:9px}.billing-debtor-row small,.billing-debtor-row>span:nth-child(2){color:#7e766a;font-size:7.5px}.billing-debtor-row strong{color:#c63830;font-size:9.5px}.billing-bank-compact{display:flex;align-items:center;gap:12px;overflow:auto;margin:0 0 10px;padding:7px 10px;border:1px solid #e3dac9;border-radius:9px;background:#fffaf0;color:#6f6659;font-size:8px;white-space:nowrap}.billing-bank-compact>span{color:#9a6807;font-weight:800}.billing-bank-compact>b{font-size:8px;font-weight:600}.billing-board{margin-top:10px}

.billing-debt-note{margin:0;padding:7px 11px;border-top:1px solid #ede8de;background:#faf9f6;color:#7d756a;font-size:7.5px}

/* The finance page follows the selected workspace instead of mixing both businesses. */
#billingModule[data-finance-context="store"] .billing-hub-grid,#billingModule[data-finance-context="repair"] .billing-hub-grid{grid-template-columns:minmax(360px,1.15fr) minmax(340px,.85fr)}
#billingModule[data-finance-context="store"] .billing-hub-panel.debt,#billingModule[data-finance-context="repair"] .billing-hub-panel.debt{grid-column:auto;display:block}
#billingModule[data-finance-context="store"] .billing-hub-panel.debt>header,#billingModule[data-finance-context="repair"] .billing-hub-panel.debt>header{grid-row:auto}
#billingModule[data-finance-context="store"] .billing-hub-panel.debt .debt-list,#billingModule[data-finance-context="repair"] .billing-hub-panel.debt .debt-list{border-left:0}
#billingModule[data-finance-context="store"] .billing-debt-split,#billingModule[data-finance-context="repair"] .billing-debt-split{grid-template-columns:1fr}
.billing-store-worklist{margin-top:10px}.billing-store-worklist .section-heading>div>span{color:#b76818;font-size:9px;font-weight:800}.billing-store-worklist .section-heading h2{margin-top:2px}.billing-store-worklist .table-wrap{max-height:430px}.billing-store-worklist tbody td{font-size:10px}.billing-store-worklist tbody b{font-size:11px}.sidebar-start-page{padding-top:7px;border-top:1px dashed #38332b}

/* Compact stock activity table: one movement per readable row. */
#stockModule #stockActivityFeed{display:block;padding:0 10px 10px}.stock-activity-head,#stockModule #stockActivityFeed .stock-activity-card{display:grid;grid-template-columns:minmax(125px,.8fr) minmax(220px,1.6fr) minmax(85px,.55fr) minmax(100px,.65fr) minmax(120px,.75fr) 65px;gap:10px;align-items:center}.stock-activity-head{min-height:30px;padding:5px 10px;border-bottom:1px solid #ddd4c5;background:#faf6ed;color:#776e60;font-size:8.5px;font-weight:700}.stock-activity-head span:nth-last-child(-n+2){text-align:right}#stockModule #stockActivityFeed .stock-activity-card{min-height:46px;padding:6px 10px;border:0;border-bottom:1px solid #ede6db;border-radius:0;box-shadow:none}#stockModule #stockActivityFeed .stock-activity-card:hover{background:#fffaf0}.stock-activity-type{display:flex;align-items:center;gap:7px}.stock-activity-type .stock-activity-icon{width:27px;height:27px;border-radius:7px;font-size:13px}.stock-activity-type b,.stock-activity-item b{overflow:hidden;font-size:9.5px;text-overflow:ellipsis;white-space:nowrap}.stock-activity-item small,.stock-activity-card time small{display:block;margin-top:1px;color:#81786b;font-size:7.5px}.stock-activity-card>strong{font-size:9.5px}.stock-activity-card>span,.stock-activity-card time{color:#514a40;font-size:8.5px}.stock-activity-card time{text-align:right}.stock-activity-card>div:last-child{text-align:right}.stock-activity-ok{display:inline-flex;padding:3px 7px;border-radius:999px;background:#e9f7ee;color:#198348;font-size:7.5px}

@media(max-width:1300px){.billing-hub-grid{grid-template-columns:1fr 1fr}.billing-hub-panel.debt{grid-column:1/-1;display:grid;grid-template-columns:minmax(270px,.7fr) 1fr}.billing-hub-panel.debt>header{grid-row:1/3}.billing-hub-panel.debt .billing-debt-total{border-bottom:0}.billing-hub-panel.debt .debt-list{border-left:1px solid #e8e4dc}}@media(max-width:850px){.stock-activity-head{display:none}#stockModule #stockActivityFeed .stock-activity-card{grid-template-columns:minmax(120px,.8fr) minmax(190px,1.4fr) auto auto}.stock-activity-card time,.stock-activity-card>div:last-child{display:none}#billingModule[data-finance-context="store"] .billing-hub-grid,#billingModule[data-finance-context="repair"] .billing-hub-grid{grid-template-columns:1fr}}@media(max-width:780px){.billing-hub-grid{grid-template-columns:1fr}.billing-hub-panel.debt{grid-column:auto;display:block}.billing-hub-panel.debt .debt-list{border-left:0}.billing-bank-compact{display:none}}@media(max-width:520px){#stockModule #stockActivityFeed .stock-activity-card{grid-template-columns:1fr auto}.stock-activity-item{grid-column:1}.stock-activity-card>span{display:none}}@media(max-width:430px){.billing-hub-kpis{grid-template-columns:1fr 1fr}.billing-hub-kpis>div:nth-child(3){border-left:0;border-top:1px solid #eee8de}.billing-hub-kpis>div:nth-child(4){border-top:1px solid #eee8de}}
