/* Profit, UPI QR, route map, attendance, rating (growth.js) */
.pl-row { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; gap: 12px; }
.pl-row span { min-width: 0; }
.pl-row.b { border-bottom: 0; border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 15px; }
.pl-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin: 8px 0 10px; }
.pl-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; min-width: 0; font-size: 11px; }
.pl-col span { color: var(--muted); }
.pl-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.pl-pair i { width: 40%; max-width: 18px; min-height: 2px; border-radius: 6px 6px 2px 2px; }
.pl-pair .inc, .dot.inc { background: var(--ok); }
.pl-pair .cost, .dot.cost { background: var(--danger); opacity: .75; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; }

.qr-box { background: #fff; border-radius: 16px; padding: 10px; width: min(260px, 100%); margin: 6px auto 12px; box-shadow: var(--shadow); }
.qr-box svg { display: block; width: 100%; height: auto; }
.mt-xs { margin-top: 6px; }

.route-map { height: 340px; width: 100%; background: var(--bg2); }
#modal .route-map { height: 60vh; border-radius: 12px; }
.stop-no, .map-no span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad, var(--brand)); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.map-no { background: none; border: 0; }
.map-no span { box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 2px solid #fff; }

.att-card { border-left: 3px solid var(--brand); }
.chip-lg { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--brand-soft); color: var(--brand); }
.chip-lg.ok { background: var(--ok-soft); color: var(--ok); }
.chip-lg .i { width: 22px; height: 22px; }
.att-btn { cursor: pointer; white-space: nowrap; }
.att-btn.busy { opacity: .6; pointer-events: none; }
.att-selfie { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; margin-top: 4px; }
.promise-today { border-left: 3px solid var(--sky); }
.promise-today .item { box-shadow: none; }

.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px;
  font-size: 12px; font-weight: 800; vertical-align: middle; background: var(--tone-soft); color: var(--tone); }
.grade.big { min-width: 52px; height: 52px; font-size: 26px; border-radius: 15px; flex: none; }
.g-ok { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.g-sky { --tone: var(--sky); --tone-soft: var(--sky-soft); }
.g-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.g-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.g-muted { --tone: var(--muted); --tone-soft: var(--bg2); }
.stmt table { font-size: 13px; }
/* phone par vivran (receipt no.) wrap ho, kate nahi */
.stmt td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 90px; }
@media (max-width: 600px) { .stmt { padding: 14px; } .stmt th, .stmt td { padding: 7px 4px; } .stmt table { font-size: 11.5px; } }
@media print { .stmt { font-size: 12px; } .stmt .grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- recovery.js: visits, notices, agreement, khata, PIN lock ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip-opt { position: relative; cursor: pointer; margin: 0; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line, #ddd); background: var(--card, #fff); font-weight: 600; font-size: 14px; }
.chip-opt input:checked + span { background: var(--brand, #4f46e5); border-color: var(--brand, #4f46e5); color: var(--on-brand, #fff); }
.bar-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr 36px; gap: 10px; align-items: center; margin-top: 8px; font-size: 14px; }
.bar-track { height: 10px; border-radius: 6px; background: var(--line, #eee); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--warn, #f59e0b); border-radius: 6px; }
.bar-row b { text-align: right; }
.wa-preview { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.5; background: #e7fbe0; color: #111; padding: 12px 14px; border-radius: 12px; margin: 0; overflow-wrap: anywhere; }
.steps { padding-left: 20px; line-height: 1.7; }
.link-btn { background: none; border: 0; box-shadow: none; color: var(--brand, #4f46e5); text-decoration: underline; padding: 6px; }

.notice, .agreement { max-width: 760px; margin: 0 auto; background: #fff; color: #111; line-height: 1.6; font-size: 15px; }
.notice h1, .agreement h1 { margin: 0; font-size: 22px; }
.notice h2, .agreement h2 { font-size: 16px; }
.notice p { margin: 10px 0; }
.notice .center, .agreement .center { text-align: center; }
.notice .right { text-align: right; }
.agr-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agr-party { display: flex; gap: 10px; border: 1px solid #ccc; border-radius: 8px; padding: 10px; font-size: 14px; overflow-wrap: anywhere; }
.agr-photo { width: 72px; height: 88px; object-fit: cover; border: 1px solid #bbb; flex: none; }
.agr-photo.empty { display: grid; place-items: center; color: #999; font-size: 12px; }
.agr-terms { width: 100%; border-collapse: collapse; font-size: 14px; }
.agr-terms td { border: 1px solid #ccc; padding: 6px 8px; vertical-align: top; }
.agr-terms td:first-child { width: 38%; color: #444; }
.agr-rules { padding-left: 20px; font-size: 14px; }
.agr-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; font-size: 13px; text-align: center; }
.sign-line { border-bottom: 1px solid #333; height: 36px; margin-bottom: 4px; }
@media (max-width: 560px) { .agr-parties { grid-template-columns: 1fr; } .agr-signs { grid-template-columns: 1fr 1fr; } }
@media print {
  .notice, .agreement { max-width: none; padding: 0; font-size: 13px; }
  .agr-parties { grid-template-columns: 1fr 1fr; } .agr-signs { grid-template-columns: repeat(3, 1fr); }
  .notice, .agreement { break-inside: auto; }
}

.khata { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 12px; }
.khata-head { display: flex; gap: 12px; align-items: center; }
.khata-head h1 { margin: 0; font-size: 20px; }
.khata-head .logo-big { width: 48px; height: 48px; font-size: 24px; margin: 0; }
.khata .grid { grid-template-columns: 1fr 1fr; gap: 10px; }

.pin-lock { position: fixed; inset: 0; z-index: 9999; background: var(--bg, #f5f6fb); display: grid; place-items: center; padding: 16px; }
.pin-box { width: 100%; max-width: 320px; text-align: center; }
.pin-box .logo-big { margin: 0 auto 8px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand, #4f46e5); }
.pin-dots i.on { background: var(--brand, #4f46e5); }
.pin-err { min-height: 20px; color: var(--danger, #dc2626); font-size: 14px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.pin-pad button { height: 60px; font-size: 22px; font-weight: 700; border-radius: 14px; }
.pin-pad button:disabled { visibility: hidden; }
.pin-box h2 { justify-content: center; text-align: center; margin: 8px 0 2px; }
.khata a.btn.block { display: flex; justify-content: center; width: 100%; }
.agr-terms { table-layout: fixed; }
.agr-terms td { white-space: normal; overflow-wrap: anywhere; }
.notice, .agreement { overflow-wrap: anywhere; }

/* ---------- kyc.js: signature pad, cheque photo, OCR fill ---------- */
.sig-pad { width: 100%; height: auto; aspect-ratio: 900 / 360; background: #fff; border: 2px dashed var(--line, #ccc); border-radius: 12px; touch-action: none; display: block; }
.sig-img { max-height: 60px; max-width: 100%; display: block; margin: 0 auto -6px; mix-blend-mode: multiply; }
.agr-signs .sign-line:has(.sig-img) { height: auto; min-height: 36px; display: flex; align-items: flex-end; justify-content: center; }
.chq-thumb { height: 48px; width: auto; border-radius: 6px; border: 1px solid var(--line, #ddd); object-fit: cover; }
.k-actions .sm { font-size: 13px; }
input.filled, textarea.filled { box-shadow: 0 0 0 2px var(--ok, #059669) inset; }
.mt-xs { margin-top: 6px; }

/* books.js: cash book, PAR report, quotation */
.cb-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line, #e5e7eb); font-size: 15px; }
.cb-line:last-child { border-bottom: 0; }
.cb-table td:not(.num) { white-space: normal; min-width: 70px; } .cb-table td:nth-last-child(6):not(.num), .cb-table td:first-child { min-width: 150px; font-size: 13px; }
.cb-line.in b, .cb-in { color: var(--ok, #059669); }
.cb-line.out b, .cb-out { color: var(--danger, #e11d48); }
.cb-line.total { border-top: 2px solid var(--text, #0f172a); border-bottom: 0; margin-top: 4px; padding-top: 9px; font-size: 17px; }
.par-bars .bar-row { grid-template-columns: minmax(100px, 34%) 1fr auto; }
.bar-track i.bk-current { background: var(--ok, #059669); }
.bar-track i.bk-d1_30 { background: #eab308; }
.bar-track i.bk-d31_60 { background: var(--warn, #c2410c); }
.bar-track i.bk-d61_90 { background: #dc2626; }
.bar-track i.bk-d90 { background: #7f1d1d; }
.quote { max-width: 460px; } .quote h2 { text-align: center; justify-content: center; } .q-actions { max-width: 460px; }
.q-big { text-align: center; margin: 14px 0; padding: 14px; border-radius: 14px; background: var(--ok-soft, #e3f8ef); }
.q-emi { font-size: 34px; font-weight: 800; color: var(--ok, #059669); line-height: 1.15; }
@media print {
  body.print-quote #netbar, body.print-quote main > *:not(.grid-2), body.print-quote #cf, body.print-quote .noprint { display: none !important; }
  body.print-quote .grid-2 { display: block; } body.print-quote .quote { box-shadow: none; border: 1px solid #ccc; margin: 0 auto; }
}

/* customer.js: borrower's own panel */
.cust .khata-head .grow { min-width: 0; }
.cust .list .item { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.cust-receipt .row { justify-content: space-between; padding: 4px 0; }
.cust-receipt h3 { margin: 6px 0 10px; letter-spacing: 2px; }
.login .cust-link { justify-content: center; margin-top: 14px; }
@media print {
  body.print-receipt #app { display: none; }
  body.print-receipt #modal { position: static; box-shadow: none; border: 0; max-width: 360px; margin: 0 auto; }
  body.print-receipt #modal::backdrop { display: none; }
}
.cust-actions { display: grid; gap: 8px; } .cust-actions > * { width: 100%; justify-content: center; }

/* Full loan agreement (recovery.js) */
.agreement h3 { font-size: 15px; margin: 18px 0 6px; }
.agr-sub { font-size: 13px; color: #444; }
.agr-title { margin: 14px 0 8px; text-align: center; font-size: 19px; font-weight: 800; letter-spacing: .08em; }
.agr-title small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.agreement h3 { color: #111; text-transform: none; letter-spacing: 0; }
.agr-photo.empty { font-size: 10.5px; text-align: center; overflow-wrap: normal; word-break: keep-all; }
.agr-meta { font-size: 13px; flex-wrap: wrap; gap: 6px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 6px 0; }
.agr-parties { grid-template-columns: 1fr; }
.agr-small { font-size: 11.5px; color: #555; }
.agr-blank { display: inline-block; border-bottom: 1px dotted #555; height: 1em; vertical-align: baseline; max-width: 100%; }
.agr-rules li { margin-bottom: 6px; text-align: justify; }
.agr-hindi { border: 1px solid #999; border-radius: 6px; padding: 10px 12px; margin: 14px 0; font-size: 14px; background: #fafafa; }
.agr-draft { text-align: center; font-weight: 800; letter-spacing: .2em; color: #b91c1c; border: 2px solid #b91c1c; padding: 4px; margin-bottom: 10px; }
.agr-annex { margin-top: 28px; }
.agr-sched { columns: 3 150px; column-gap: 18px; font-size: 12px; }
.agr-sched div { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px; break-inside: avoid; border-bottom: 1px dotted #ddd; padding: 1px 0; }
.agr-witness { margin-top: 28px; }
.agr-next { border-left: 4px solid var(--brand, #4f46e5); }
@media print {
  .agr-parties { grid-template-columns: 1fr; }
  .agr-annex { break-before: page; }
  .agr-rules li, .agr-sign-block, .agr-hindi { break-inside: avoid; }
  html, body, .shell, .content, #app { background: #fff !important; background-image: none !important; }
}

/* online loan application (apply.js) */
.apply-steps { display: flex; gap: 6px; }
.apply-steps a { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.apply-steps a.done { background: var(--ok); }
.apply-steps a.on { background: var(--brand); }
.apply-sum { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 14px; }
.apply-sum:first-child { border-top: 0; }
.apply-sum .row b { min-width: 0; overflow-wrap: anywhere; }
.apply textarea { width: 100%; }
.big-input { font-size: 22px !important; font-weight: 700; }

/* customer self-service (custdesk.js) */
.cd-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd-quick > * { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; box-shadow: none; }
.cd-quick .i { width: 24px; height: 24px; color: var(--brand); }
.cd-loan .row { gap: 6px; }
.cd-date { display: grid; place-items: center; min-width: 46px; padding: 4px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); line-height: 1.1; }
.cd-date b { font-size: 18px; }
.cd-date span { font-size: 11px; }
.cd-date.late { background: var(--danger-soft); color: var(--danger); }
.cd-date.today { background: var(--warn-soft); color: var(--warn); }
a.alert { display: block; }
.cd-check { border-left: 4px solid var(--warn, #f59e0b); }
.cd-check .t { font-weight: 600; }
.cd-qrcard .qr-box { width: min(220px, 100%); }
.cd-star { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft, #ede9fe); color: var(--primary, #6d28d9); flex: none; }
.cd-offer:not(.muted-offer) { background: linear-gradient(135deg, #fff7e6, #fff); border: 1px solid #fcd34d; }
.cd-offer:not(.muted-offer) .cd-star { background: #fde68a; color: #b45309; }
.cd-offer .t, #cd-install .t, #cd-remind .t { font-size: 15px; }
.cd-offer .s, #cd-install .s, #cd-remind .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cd-bar { height: 8px; border-radius: 99px; background: var(--line, #e5e7eb); overflow: hidden; }
.cd-bar i { display: block; height: 100%; background: var(--ok, #10b981); border-radius: 99px; }
.cd-steps { padding-left: 20px; line-height: 1.9; }

.alert.warn { background: var(--warn-soft); color: var(--warn); }
.fr-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.fr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-compare figure { margin: 0; text-align: center; }
.fr-compare img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--line, #eee); }
.fr-missing { border-left: 4px solid var(--danger); }
.fr-missing .item { gap: 6px; }

/* verify.js: online ID / bank check and agreement signing */
.vf-ok { color: var(--ok); } .vf-warn { color: var(--warn); } .vf-danger { color: var(--danger); } .vf-muted { color: var(--muted); }
.vf-apply { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.vf-sign-card { display: block; border-left: 4px solid var(--brand); color: inherit; text-decoration: none; }
.vf-agr { overflow-x: auto; }
.vf-agr .agreement { font-size: 13px; padding: 14px; }
.vf-agr .agr-parties, .vf-agr .agr-signs { grid-template-columns: 1fr; }
.vf-signed { border-left: 4px solid var(--ok); }
.agr-esign { border: 1px dashed var(--ok); border-radius: 8px; padding: 8px 10px; margin: 12px 0; font-size: 13px; }
