/* Credit Billing: branch-scoped patient accounts and permanent FIFO recovery records. */
.credit-view { max-width: 1540px; }
.credit-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:20px; }
.credit-heading h1 { margin:3px 0 7px; color:#244f3d; font-size:clamp(27px,2.5vw,36px); letter-spacing:-1px; }
.credit-heading p:not(.eyebrow) { margin:0; max-width:650px; color:#788f83; font-size:12px; line-height:1.6; }
.credit-heading-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; padding-top:5px; }
.credit-view .button,.credit-dialog .button { min-height:36px; font-size:11px; padding-inline:12px; white-space:nowrap; }
.credit-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.credit-metric { position:relative; min-width:0; padding:19px 17px; overflow:hidden; }
.credit-metric::after { content:""; position:absolute; right:-24px; bottom:-38px; width:105px; height:105px; border:1px solid #e2eee7; border-radius:50%; pointer-events:none; }
.credit-metric > span { display:block; margin-bottom:13px; color:#728b7d; font-size:9px; font-weight:800; letter-spacing:.65px; text-transform:uppercase; }
.credit-metric strong { display:block; position:relative; z-index:1; overflow-wrap:anywhere; color:#28513e; font-size:clamp(21px,1.9vw,29px); line-height:1.2; font-variant-numeric:tabular-nums; letter-spacing:-.7px; }
.credit-metric small { display:block; position:relative; z-index:1; margin-top:8px; color:#8a9d94; font-size:9px; line-height:1.5; }
.credit-metric--outstanding { border-color:#c8dfd0; background:linear-gradient(125deg,#eef9f1,#fff); }
.credit-metric--outstanding strong { color:#16664c; }
.credit-status { margin:12px 0; min-height:17px; color:#7a8e83; font-size:10px; line-height:1.5; }
.credit-status.is-error,.credit-payment-status.is-error { color:#b24f49; }
.credit-status.is-success,.credit-payment-status.is-success { color:#277b57; }
.credit-workspace { display:grid; grid-template-columns:minmax(255px,.38fr) minmax(0,1fr); align-items:start; gap:17px; }
.credit-directory,.credit-statement-panel { min-width:0; padding:0; overflow:hidden; }
.credit-panel-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:20px 20px 16px; border-bottom:1px solid #e6eee8; }
.credit-panel-heading .eyebrow { font-size:8px; margin-bottom:6px; }
.credit-panel-heading h2 { margin:0; color:#315442; font-size:18px; letter-spacing:-.45px; overflow-wrap:anywhere; }
.credit-panel-heading .soft-badge { flex:0 0 auto; }
.credit-account-search { display:flex; gap:7px; padding:15px 15px 11px; }
.credit-account-search input { min-width:0; height:36px; padding-inline:10px; font-size:11px; }
.credit-filter-tabs { display:flex; gap:3px; margin:0 15px 11px; padding:4px; border-radius:8px; background:#f0f6f2; }
.credit-filter-tabs button { flex:1; border:0; padding:8px 5px; border-radius:6px; color:#789080; background:transparent; font-size:10px; font-weight:750; }
.credit-filter-tabs button.is-active { color:#245d43; background:#fff; box-shadow:0 2px 6px rgb(37 75 54 / 8%); }
.credit-accounts-list { display:grid; align-content:start; max-height:730px; min-height:235px; overflow:auto; overscroll-behavior:contain; }
.credit-account { width:100%; border:0; border-top:1px solid #edf2ee; border-left:3px solid transparent; padding:15px 16px; color:#315541; background:#fff; text-align:left; }
.credit-account:hover { background:#f7fbf8; }
.credit-account.is-active { border-left-color:#53a77a; background:#eaf6ef; }
.credit-account-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.credit-account-name { display:block; font-size:12px; font-weight:800; overflow-wrap:anywhere; line-height:1.4; }
.credit-account-balance { flex:0 0 auto; color:#3d6550; font-size:12px; font-weight:850; font-variant-numeric:tabular-nums; }
.credit-account-phone { display:block; margin-top:4px; color:#89a092; font-size:10px; }
.credit-account-meta { display:flex; gap:8px; align-items:center; margin-top:9px; color:#8a9e92; font-size:9px; }
.credit-account-meta > span:last-child { margin-left:auto; }
.credit-isolated-badge { display:inline-block; border:1px solid #f0dfb9; border-radius:5px; padding:2px 5px; color:#ab823e; background:#fff7e5; font-size:8px; font-weight:700; }
.credit-directory-note { padding:0 16px 15px; margin:0; color:#9aaba1; font-size:9px; line-height:1.6; }
.credit-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 18px; color:#85988a; font-size:10px; border-top:1px solid #e9f0eb; }
.credit-pager > div { display:flex; gap:6px; }
.credit-pager .button { min-height:29px; padding:5px 10px; font-size:9px; }
.credit-directory-pager { margin-bottom:10px; }
.credit-patient-details { margin:7px 0 0; max-width:560px; color:#849a8d; font-size:10px; line-height:1.55; overflow-wrap:anywhere; }
.credit-statement-column { min-width:0; }
.credit-isolation-note { margin:14px 20px 0; padding:10px 12px; border:1px solid #efdfbd; border-radius:7px; color:#9a793f; background:#fff8e8; font-size:10px; line-height:1.55; }
.credit-statement-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:17px 20px; border:1px solid #dfebe3; border-radius:9px; background:#f6faf7; }
.credit-statement-summary > div { padding:13px 15px; min-width:0; border-right:1px solid #e0ebe4; }
.credit-statement-summary > div:last-child { border:0; }
.credit-statement-summary span,.credit-review-summary span { display:block; color:#8a9f91; font-size:9px; font-weight:750; }
.credit-statement-summary strong { display:block; margin-top:7px; overflow-wrap:anywhere; color:#335e47; font-size:21px; letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
.credit-statement-summary > div:last-child strong { color:#ac752a; }
.credit-empty { padding:30px 18px; margin:0; color:#8da193; font-size:11px; text-align:center; line-height:1.7; }
.credit-statement-empty { display:grid; justify-items:center; align-content:center; min-height:430px; }
.credit-statement-empty > span { width:54px; height:54px; display:grid; place-items:center; border:1px solid #dfebe3; border-radius:14px; background:#f0f7f2; color:#6ba682; font-size:27px; margin-bottom:16px; }
.credit-statement-empty b { color:#4b725a; font-size:16px; }
.credit-statement-empty p { max-width:300px; margin:7px 0 0; color:#96a99b; font-size:11px; line-height:1.7; }
.credit-payment-section { padding:17px 20px 18px; background:linear-gradient(100deg,#f2f9f4,#fcfefd); border-top:1px solid #e1ece5; border-bottom:1px solid #e1ece5; }
.credit-section-heading { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; margin-bottom:15px; }
.credit-section-heading h3,.credit-history-heading h3 { margin:0 0 4px; font-size:15px; color:#38634b; }
.credit-section-heading p,.credit-history-heading p { margin:0; max-width:480px; color:#88a092; font-size:10px; line-height:1.5; }
.credit-fifo-badge { display:block; flex:0 0 auto; padding:5px 7px; border-radius:5px; color:#619174; background:#e5f1e8; font-size:8px; font-weight:850; letter-spacing:.3px; }
.credit-payment-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:12px; }
.credit-view label,.credit-dialog label { min-width:0; gap:6px; color:#6c8877; font-size:10px; }
.credit-payment-grid label { display:block; }
.credit-payment-grid label > input,.credit-payment-grid label > select { margin-top:6px; }
.credit-view input,.credit-view select,.credit-dialog input,.credit-dialog select { height:38px; min-width:0; font-size:12px; border-radius:7px; }
.credit-payment-notes { grid-column:span 2; }
.credit-form-hint { max-width:600px; margin:11px 0 0; color:#8fa394; font-size:9px; line-height:1.6; }
.credit-payment-status { min-height:0; margin:9px 0 0; color:#75917f; font-size:10px; line-height:1.6; }
.credit-payment-status:empty { display:none; }
.credit-payment-actions { display:flex; justify-content:flex-end; margin-top:11px; }
.credit-statement-tabs { display:flex; gap:18px; align-items:center; padding:0 20px; border-bottom:1px solid #e4eee7; }
.credit-statement-tabs button { display:flex; gap:7px; align-items:center; min-height:48px; border:0; border-bottom:2px solid transparent; padding:0 2px; color:#90a396; background:transparent; font-size:11px; font-weight:800; }
.credit-statement-tabs button.is-active { color:#2e6c4a; border-bottom-color:#3c9968; }
.credit-statement-tabs button span { min-width:19px; padding:2px 5px; border-radius:5px; background:#f0f5f1; color:#7f9a88; font-size:9px; }
.credit-table-scroll { overflow:auto; overscroll-behavior:contain; }
.credit-view table,.credit-dialog table { width:100%; border-collapse:collapse; table-layout:auto; font-variant-numeric:tabular-nums; }
.credit-view th,.credit-dialog th { padding:11px 13px; color:#88a092; background:#f7faf8; border-bottom:1px solid #e6eee8; font-size:8px; font-weight:850; text-align:left; text-transform:uppercase; letter-spacing:.45px; white-space:nowrap; }
.credit-view td,.credit-dialog td { padding:13px; color:#5f806b; border-bottom:1px solid #ecf2ee; font-size:10px; vertical-align:top; }
.credit-bills-table { min-width:610px; }
.credit-bills-table td:not(:first-child),.credit-bills-table th:not(:first-child) { text-align:right; }
.credit-bills-table strong,.credit-allocation-table strong { display:block; color:#3d6750; font-size:10px; overflow-wrap:anywhere; }
.credit-bills-table small,.credit-allocation-table small { display:block; margin-top:4px; color:#96a89b; font-size:9px; line-height:1.5; }
.credit-bills-table .credit-medicine-detail { max-width:260px; font-size:8px; }
.credit-status-badge { display:inline-block; border-radius:5px; padding:4px 7px; color:#a6782e; background:#fff4dc; font-size:8px; font-weight:850; white-space:nowrap; }
.credit-status-badge.is-settled { color:#3c8b62; background:#e9f6ed; }
.credit-status-badge.is-reduced { color:#9f793c; background:#fff4de; }
.credit-payment-history { display:grid; gap:10px; padding:15px 19px; }
.credit-payment-record { border:1px solid #e1ece5; border-radius:8px; overflow:hidden; }
.credit-payment-record summary { display:flex; gap:12px; align-items:flex-start; cursor:pointer; padding:13px; color:#52785f; list-style:none; }
.credit-payment-record summary::-webkit-details-marker { display:none; }
.credit-payment-record summary::before { content:"›"; font-size:20px; line-height:1; color:#9cb3a3; transform:rotate(0); }
.credit-payment-record[open] summary::before { transform:rotate(90deg); }
.credit-payment-record summary > span { flex:1; min-width:0; }
.credit-payment-record summary b { display:block; color:#406c51; font-size:11px; overflow-wrap:anywhere; }
.credit-payment-record summary small { display:block; margin-top:5px; color:#8fa695; font-size:9px; line-height:1.5; }
.credit-payment-record summary > strong { flex:0 0 auto; color:#2c875b; font-size:13px; font-variant-numeric:tabular-nums; }
.credit-payment-record .credit-table-scroll { border-top:1px solid #e9f0eb; }
.credit-payment-record-note { margin:0; padding:0 13px 13px 32px; color:#96aa9b; font-size:9px; overflow-wrap:anywhere; line-height:1.5; }
.credit-allocation-table { min-width:520px; }
.credit-allocation-table td:not(:first-child),.credit-allocation-table th:not(:first-child) { text-align:right; }
.credit-dialog { width:min(900px,calc(100vw - 28px)); max-height:calc(100vh - 34px); padding:0; border:1px solid #cee1d5; border-radius:15px; color:#355e46; background:#fff; box-shadow:0 22px 65px rgb(21 60 43 / 28%); }
.credit-dialog::backdrop { background:rgb(14 45 33 / 44%); backdrop-filter:blur(2px); }
.credit-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid #e3eee6; padding:21px 23px 17px; }
.credit-dialog-heading h2 { margin:0 0 6px; color:#315b43; font-size:23px; letter-spacing:-.6px; }
.credit-dialog-heading p:not(.eyebrow) { margin:0; color:#8da393; font-size:11px; line-height:1.6; }
.credit-dialog-heading .icon-button { flex:0 0 auto; }
.credit-review-summary { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:20px 23px; background:#f3f9f5; }
.credit-review-summary strong { display:block; margin-top:7px; color:#326b4c; font-size:27px; letter-spacing:-.7px; }
.credit-review-notes { padding:0 23px; color:#8ca493; font-size:11px; line-height:1.6; }
.credit-review-check { display:flex !important; align-items:flex-start; gap:10px !important; padding:19px 23px 0; line-height:1.65; }
.credit-review-check input { width:16px; height:16px; flex:0 0 auto; margin:1px 0 0; accent-color:#31875d; }
.credit-dialog > .credit-payment-status { padding:0 23px; }
.credit-dialog-actions { display:flex; justify-content:flex-end; gap:8px; padding:18px 23px 23px; }
.credit-recovery-filters { display:grid; grid-template-columns:1fr 1fr 1fr auto; align-items:end; gap:12px; padding:18px 23px 0; }
.credit-recovery-dialog > .credit-status { margin-inline:23px; }
.credit-recovery-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 23px 19px; }
.credit-recovery-metrics > div { border:1px solid #e2ede6; border-radius:9px; padding:14px 16px; background:#f6faf7; }
.credit-recovery-metrics span { display:block; color:#8ba391; font-size:9px; font-weight:750; }
.credit-recovery-metrics strong { display:block; margin-top:8px; color:#3b7653; font-size:24px; letter-spacing:-.7px; }
.credit-recovery-metrics small { display:block; color:#a0b1a5; margin-top:5px; font-size:9px; }
.credit-recovery-table { min-width:700px; }
.credit-recovery-table th:not(:first-child),.credit-recovery-table td:not(:first-child) { text-align:right; }
.credit-history-heading { padding:20px 23px 0; }
.credit-recovery-dialog .credit-payment-history { padding-inline:23px; }
.credit-recovery-dialog .credit-pager { padding-inline:23px; }
.credit-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media(max-width:1250px) { .credit-heading { flex-direction:column; gap:10px; }.credit-heading-actions { justify-content:flex-start; padding:0; }.credit-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.credit-workspace { grid-template-columns:270px minmax(0,1fr); }.credit-statement-summary strong { font-size:18px; }.credit-payment-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.credit-payment-notes { grid-column:auto; }.credit-payment-grid label:last-child { grid-column:1/-1; }.credit-section-heading { flex-direction:column; gap:8px; } }
@media(max-width:950px) { .credit-workspace { grid-template-columns:1fr; }.credit-accounts-list { max-height:320px; min-height:150px; }.credit-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.credit-statement-empty { min-height:230px; } }
@media(max-width:600px) { .credit-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.credit-metric { padding:16px 12px; }.credit-metric strong { font-size:22px; }.credit-metric > span { font-size:8px; }.credit-metric:last-child { grid-column:span 2; }.credit-heading-actions { gap:7px; }.credit-heading-actions .soft-badge { width:100%; }.credit-panel-heading { flex-direction:column; padding:18px 15px; }.credit-statement-summary { margin:13px; }.credit-statement-summary > div { padding:12px 9px; }.credit-statement-summary strong { font-size:17px; }.credit-payment-section { padding:16px 14px; }.credit-payment-grid { grid-template-columns:1fr; gap:10px; }.credit-payment-grid label:last-child { grid-column:auto; }.credit-recovery-filters { grid-template-columns:1fr 1fr; padding-inline:15px; }.credit-recovery-metrics { margin-inline:15px; gap:7px; }.credit-recovery-metrics > div { padding:12px 10px; }.credit-recovery-metrics strong { font-size:19px; }.credit-dialog-heading { padding-inline:16px; }.credit-review-summary { padding-inline:16px; }.credit-review-summary strong { font-size:23px; }.credit-review-check,.credit-dialog-actions { padding-inline:16px; }.credit-statement-tabs { padding-inline:15px; gap:14px; }.credit-statement-tabs button { font-size:10px; }.credit-pager { padding-inline:13px; }.credit-payment-history { padding-inline:13px; } }
.credit-ledger-note { margin:0; padding:13px 20px 8px; color:#93a799; font-size:9px; line-height:1.55; }
.credit-ledger-table { width:100%; min-width:480px; table-layout:fixed; }.credit-ledger-table th:first-child { width:43%; }.credit-ledger-table th:not(:first-child) { width:19%; white-space:normal; }.credit-ledger-table th,.credit-ledger-table td { padding-inline:10px; }.credit-ledger-table td { overflow-wrap:anywhere; }.credit-ledger-table td:not(:first-child),.credit-ledger-table td:not(:first-child) strong { font-size:11px; }.credit-ledger-table td:not(:first-child),.credit-ledger-table th:not(:first-child) { text-align:right; }.credit-ledger-table strong { display:block; color:#3e6c50; font-size:10px; }.credit-ledger-table small { display:block; margin-top:4px; color:#96ab9d; font-size:9px; line-height:1.5; }.credit-ledger-table .credit-status-badge { margin-top:6px; }.credit-ledger-payment td { background:#fbfefc; }.credit-ledger-payment td:nth-child(3) { color:#378f60; font-weight:800; }
@media(max-width:600px) { .credit-statement-tabs { gap:10px; overflow-x:auto; }.credit-statement-tabs button { flex:0 0 auto; font-size:9px; }.credit-statement-tabs button span { font-size:8px; }.credit-ledger-note { padding-inline:14px; } }
.credit-print-dialog { width:min(1060px,calc(100vw - 30px)); }.credit-print-help { padding:0 22px; margin:14px 0; color:#819a8a; font-size:10px; line-height:1.6; }.credit-print-dialog iframe { display:block; width:calc(100% - 44px); height:55vh; min-height:270px; margin:0 22px; border:1px solid #dce8e0; border-radius:8px; background:#fff; }.credit-print-dialog a { text-decoration:none; }.credit-print-dialog a[aria-disabled="true"] { opacity:.5; pointer-events:none; }
@media(max-width:600px) { .credit-print-help { padding-inline:15px; }.credit-print-dialog iframe { width:calc(100% - 30px); margin-inline:15px; height:50vh; }.credit-print-dialog .credit-dialog-actions { flex-wrap:wrap; justify-content:stretch; }.credit-print-dialog a { flex:1; } }