
/* Phase 1.8 Customers and Khata */
.khata-overview{margin-bottom:16px}.khata-overview .card{padding:18px;display:flex;flex-direction:column;gap:5px;max-width:360px}.khata-overview small,.khata-overview span,.customer-info small,.customer-balance small{color:var(--muted);font-size:12px}.khata-overview b{font-size:26px;color:var(--danger,#c2410c)}
.customer-panel{padding:16px}.customer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.customer-toolbar h3{margin:0}.customer-toolbar input{max-width:320px}
.customer-row{display:grid;grid-template-columns:40px minmax(130px,1fr) auto auto;align-items:center;gap:12px;padding:14px 4px;border-top:1px solid var(--line)}.customer-avatar{width:38px;height:38px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;font-weight:700}.customer-info{display:flex;flex-direction:column;gap:3px;min-width:0}.customer-info span,.customer-info small{overflow-wrap:anywhere}.customer-balance{text-align:right;display:flex;flex-direction:column;gap:3px}.customer-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.customer-actions .btn{padding:7px 9px;font-size:12px}
.customer-form{display:flex;flex-direction:column;gap:8px;padding:16px}.customer-form label{font-size:12px;font-weight:650;color:var(--muted)}.customer-form input,.customer-form textarea,.customer-form select{width:100%;padding:11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font:inherit}.customer-form-actions,.ledger-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.customer-ledger{width:min(620px,100%)}.khata-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px}.khata-stats>div{background:var(--surface-2);padding:12px;border-radius:12px;display:flex;flex-direction:column;gap:5px}.khata-stats small{color:var(--muted);font-size:11px}.khata-stats b{font-size:17px}.ledger-list{padding:0 14px;max-height:300px;overflow:auto}.ledger-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.ledger-row>div{display:flex;flex-direction:column;gap:4px}.ledger-row small{color:var(--muted);font-size:11px}.ledger-row strong{white-space:nowrap}.ledger-row strong.credit{color:var(--success,#15803d)}.ledger-row strong.debit{color:var(--danger,#c2410c)}.ledger-actions{padding:14px}
@media(max-width:680px){.customer-toolbar{align-items:stretch;flex-direction:column}.customer-toolbar input{max-width:none}.customer-row{grid-template-columns:36px minmax(0,1fr) auto}.customer-actions{grid-column:2/-1;justify-content:flex-start}.khata-stats{grid-template-columns:1fr}.customer-balance b{font-size:13px}}
