/* Stitch accounting/profit ledger screens; screen-only, independent of PDF templates. */
@media screen {
 .tv-stitch-ledger {padding:24px;background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text,#122c46);min-width:0;}
 .tv-stitch-ledger .workspace-hero {display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px;}
 .tv-stitch-ledger .workspace-hero h2 {font-size:26px;letter-spacing:-.03em;margin:0 0 8px;}
 .tv-stitch-ledger .workspace-hero p {color:var(--tv-text-muted,#4d6178);line-height:1.6;margin:0;}
 .tv-stitch-ledger .workspace-hero-actions {display:flex;gap:8px;flex-wrap:wrap;}
 .tv-stitch-ledger .tv-route-summary-toggle {display:none;}
 .tv-stitch-ledger .workspace-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0;}
 .tv-stitch-ledger .workspace-stat {display:grid;gap:10px;padding:18px;border:1px solid var(--tv-border,#c7d4e2);background:white;border-radius:12px;}
 .tv-stitch-ledger .workspace-stat > strong {font-size:24px;}
 .tv-stitch-ledger .workspace-stat :is(span,small) {color:var(--tv-text-muted,#4d6178);font-size:12px;line-height:1.5;}
 .tv-stitch-ledger .tv-managed-ledger-context {background:white;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;padding:20px;}
 .tv-stitch-ledger .tv-managed-ledger-context h2 {font-size:16px;margin:0 0 8px;}
 .tv-stitch-ledger .tv-managed-ledger-context p {font-size:13px;color:var(--tv-text-muted,#4d6178);line-height:1.6;margin:0 0 16px;}
 .tv-stitch-ledger .tv-managed-ledger-context-controls {display:flex;align-items:end;gap:12px;flex-wrap:wrap;}
 .tv-stitch-ledger .tv-managed-ledger-context-controls label {display:grid;gap:8px;font-size:12px;}
 .tv-stitch-ledger .tv-managed-ledger-context-controls input[type=search] {flex:1;min-width:180px;}
 .tv-stitch-ledger .tv-managed-ledger-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:20px 0;}
 .tv-stitch-ledger .tv-managed-ledger-tab {display:grid;gap:8px;text-align:left;padding:16px;border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;background:white;color:var(--tv-text-muted,#4d6178);}
 .tv-stitch-ledger .tv-managed-ledger-tab small {font-size:12px;line-height:1.5;font-weight:400;}
 .tv-stitch-ledger .tv-managed-ledger-tab.active {background:var(--tv-brand-soft,#e8f3fc);border-color:var(--tv-info-border,#8295aa);color:var(--tv-brand-hover,#005799);}
 .tv-stitch-ledger .tv-managed-ledger-group {margin:20px 0;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;background:white;overflow:hidden;}
 .tv-stitch-ledger .tv-managed-ledger-group-head {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px;border-bottom:1px solid var(--tv-border,#c7d4e2);}
 .tv-stitch-ledger .tv-managed-ledger-group-head h3 {margin:6px 0;font-size:19px;}
 .tv-stitch-ledger :is(.eyebrow,.tv-managed-ledger-group-head small) {font-size:12px;color:var(--tv-text-muted,#4d6178);}
 .tv-stitch-ledger .tv-managed-ledger-table-wrap {max-width:100%;overflow:auto;}
 .tv-stitch-ledger .tv-managed-ledger-table {width:100%;min-width:860px;}
 .tv-stitch-ledger .tv-managed-ledger-history-title {font-size:18px;margin-top:28px;}
 .tv-stitch-ledger .tv-managed-ledger-total-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0;}
 .tv-stitch-ledger .tv-managed-ledger-total {display:grid;gap:10px;background:white;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;padding:20px;}
 .tv-stitch-ledger .tv-managed-ledger-total-head {display:flex;justify-content:space-between;gap:12px;color:var(--tv-text-muted,#4d6178);}
 .tv-stitch-ledger .tv-managed-ledger-total > strong {font-size:24px;font-variant-numeric:tabular-nums;}
 .tv-stitch-ledger .numeric-cell {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
 .tv-stitch-ledger .tv-stitch-ledger-balances {padding:20px;display:grid;gap:16px;}
 .tv-stitch-ledger-currency h4 {font-size:12px;margin:0 0 12px;letter-spacing:.04em;}
 .tv-stitch-ledger-balance-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
 .tv-stitch-ledger-balance {display:grid;gap:12px;background:var(--tv-surface-muted,#f3f7fb);padding:16px;border:1px solid var(--tv-border,#c7d4e2);border-radius:8px;}
 .tv-stitch-ledger-balance span {font-size:12px;color:var(--tv-text-muted,#4d6178);}
 .tv-stitch-ledger-balance strong {font-variant-numeric:tabular-nums;font-size:18px;overflow-wrap:anywhere;}
 .tv-stitch-ledger-balance-closing_balance {background:var(--tv-brand-soft,#e8f3fc);border-color:var(--tv-info-border,#8295aa);}
}
@media screen {
  .tv-stitch-ledger[data-stitch-screen="267f4ecb1c9941c2996c1729cc839046"] {
    --ledger-ink:var(--tv-text,#122c46);
    --ledger-muted:var(--tv-text-muted,#4d6178);
    --ledger-line:var(--tv-border,#c7d4e2);
    background:var(--tv-surface-muted,#f3f7fb);
    color:var(--ledger-ink);
    padding:clamp(16px,2.4vw,32px);
  }
  .tv-stitch-ledger[data-stitch-screen="267f4ecb1c9941c2996c1729cc839046"] .tv-managed-ledger-profit {
    min-width:920px;
    border-collapse:separate;
    border-spacing:0;
  }
  .tv-stitch-ledger[data-stitch-screen="267f4ecb1c9941c2996c1729cc839046"] .tv-managed-ledger-profit :is(th,td) {
    padding:11px 12px;
    border-bottom:1px solid var(--ledger-line);
    vertical-align:top;
  }
  .tv-stitch-ledger[data-stitch-screen="267f4ecb1c9941c2996c1729cc839046"] .tv-managed-ledger-profit th {
    position:sticky;
    top:0;
    background:var(--tv-surface-muted,#f3f7fb);
    color:var(--ledger-muted);
  }
}
@media screen and (max-width:1000px){.tv-stitch-ledger .workspace-hero {flex-direction:column;}.tv-stitch-ledger-balance-grid,.tv-stitch-ledger .workspace-stats {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media screen and (max-width:540px){.tv-stitch-ledger {padding:12px;}.tv-stitch-ledger .tv-managed-ledger-context-controls {align-items:stretch;flex-direction:column;}.tv-stitch-ledger .tv-managed-ledger-tabs {grid-template-columns:1fr;}.tv-stitch-ledger .tv-managed-ledger-tab {padding:12px;}.tv-stitch-ledger .tv-managed-ledger-group-head {flex-direction:column;align-items:flex-start;}.tv-stitch-ledger-balance {padding:12px;}.tv-stitch-ledger-balance strong {font-size:16px;}}

/* Stitch detailed-ledger screen; this identity is emitted only for movement mode. */
@media screen {
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] {--ledger-ink:var(--tv-text,#122c46);--ledger-muted:var(--tv-text-muted,#4d6178);--ledger-line:var(--tv-border,#c7d4e2);background:var(--tv-surface-muted,#f3f7fb);color:var(--ledger-ink);padding:clamp(16px,2.4vw,32px);}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-hero {padding:0 0 18px;border-bottom:1px solid var(--ledger-line);margin-bottom:18px;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-hero h2 {color:var(--ledger-ink);font-size:clamp(22px,2vw,28px);letter-spacing:-.025em;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-hero p {color:var(--ledger-muted);}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stats {grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid var(--ledger-line);border-radius:10px;overflow:hidden;background:#fff;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stat {min-width:0;border:0;border-right:1px solid var(--ledger-line);border-radius:0;box-shadow:none;padding:16px;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stat:last-child {border-right:0;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stat > strong {font-size:clamp(16px,1.5vw,21px);overflow-wrap:anywhere;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-ledger-context {padding:14px 16px;border-radius:10px;box-shadow:none;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-ledger-context-controls {gap:10px;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger {display:grid;gap:14px;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger .tv-managed-ledger-table-wrap {border:1px solid var(--ledger-line);border-radius:10px;background:#fff;box-shadow:0 1px 2px rgb(16 35 56 / 4%);}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger table {min-width:760px;border-collapse:separate;border-spacing:0;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger thead th {position:sticky;top:0;z-index:1;background:var(--tv-surface-muted,#f3f7fb);color:var(--ledger-muted);border-bottom:1px solid var(--ledger-line);font-size:11px;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger tbody td {padding:11px 12px;border-bottom:1px solid var(--ledger-line);color:var(--tv-text,#122c46);vertical-align:top;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger tbody tr:last-child td {border-bottom:0;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger tbody tr:hover td {background:var(--tv-surface-muted,#f3f7fb);}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-managed-transaction-ledger .numeric-cell {font-variant-numeric:tabular-nums;white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] :is(button,a,input,select):focus-visible {outline:3px solid var(--tv-brief-focus,#005fcc);outline-offset:2px;}
}
@media screen and (max-width:760px) {
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stat:nth-child(2) {border-right:0;}
  .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .workspace-stat:nth-child(-n+2) {border-bottom:1px solid var(--ledger-line);}
}

@media screen {
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-ledger-movement-evidence {min-width:240px;max-width:640px;line-height:1.55;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-ledger-evidence-line {display:block;margin:6px 0 0;padding:7px 10px;border-left:3px solid #d4e1eb;background:#f3f7fb;color:#40546a;font-size:12px;overflow-wrap:anywhere;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-ledger-evidence-line.is-allocation {border-left-color:#247295;background:#edf6fa;color:#123f59;font-weight:600;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-ledger-evidence-line.is-exception {border-left-color:#b86d15;background:#fff6e9;color:#7d4511;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-ledger-detail {margin:20px 0;padding:18px;background:#fff;border:1px solid #d3dfeb;border-radius:12px;overflow:auto;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-ledger-detail > p {color:#40546a;line-height:1.55;margin:8px 0 16px;max-width:90ch;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table {display:block;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table table {width:100%;min-width:760px;border-collapse:collapse;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table th {padding:12px 10px;text-align:left;border-bottom:1px solid #cedae6;font-size:12px;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table td {padding:10px;border-bottom:1px solid #e0e7ee;font-size:13px;vertical-align:top;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table .numeric-cell {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table .tv-managed-ledger-print-row-invoice td {background:#153754;color:white;font-weight:700;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table .tv-managed-ledger-print-evidence td {padding:4px 10px 10px;}
 .tv-stitch-ledger[data-stitch-screen="9e7534eaf6bb479995f57d5a97f92a59"] .tv-invoice-application-table .tv-ledger-movement-evidence {max-width:none;min-width:0;}
}

/* Pending customer ledger: Stitch-inspired receivables layout. */
@media screen {
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] {--pending-ink:var(--tv-text,#122c46);--pending-muted:var(--tv-text-muted,#4d6178);--pending-line:var(--tv-border,#c7d4e2);padding:clamp(16px,2vw,28px);color:var(--pending-ink);background:var(--tv-surface-muted,#f3f7fb);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero {align-items:center;padding:0 0 18px;border-bottom:1px solid var(--pending-line);margin-bottom:18px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero h2 {margin:0 0 6px;color:var(--pending-ink);font-size:clamp(22px,2vw,28px);letter-spacing:-.025em;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero p {max-width:72ch;color:var(--pending-muted);line-height:1.55;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero-actions {justify-content:flex-end;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero-actions {align-items:flex-start;gap:10px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stats {grid-template-columns:1.2fr 1.2fr 1fr 1.15fr;gap:0;overflow:hidden;margin:16px 0;border:1px solid var(--pending-line);border-radius:10px;background:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat {min-width:0;min-height:92px;gap:7px;padding:13px 15px;border:0;border-right:1px solid var(--pending-line);border-radius:0;box-shadow:none;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat:last-child {border-right:0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat > strong {font-size:clamp(14px,1.25vw,18px);line-height:1.35;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat:last-child > strong {color:#9a4a00;font-size:clamp(17px,1.45vw,21px);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat > small {color:var(--pending-muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-context,.tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-group {border:1px solid var(--pending-line);border-radius:10px;background:#fff;box-shadow:0 1px 2px rgb(16 35 56 / 4%);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-context {padding:16px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-tabs,.tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-queue {margin:16px 0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-table-wrap {max-width:100%;overflow:auto;border:1px solid var(--pending-line);border-radius:10px;background:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table {min-width:1120px;border-collapse:separate;border-spacing:0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table thead th {position:sticky;top:0;z-index:1;padding:11px 12px;background:#f3f7fb;color:var(--pending-muted);border-bottom:1px solid var(--pending-line);font-size:11px;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table tbody td {padding:12px;border-bottom:1px solid #e7edf3;vertical-align:top;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table tbody tr:last-child td {border-bottom:0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table tbody tr:hover td {background:#f7faff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table .numeric-cell {font-variant-numeric:tabular-nums;white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table .tv-managed-ledger-outstanding {font-weight:700;color:#9a4a00;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] :is(button,a,input,select):focus-visible {outline:3px solid var(--tv-brief-focus,#005fcc);outline-offset:2px;}
}
@media screen and (max-width:900px) {
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat:nth-child(2) {border-right:0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat:nth-child(-n+2) {border-bottom:1px solid var(--pending-line);}
}
@media screen and (max-width:620px) {
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stats {grid-template-columns:minmax(0,1fr);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat {min-height:0;border-right:0;border-bottom:1px solid var(--pending-line);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-stat:last-child {border-bottom:0;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero {align-items:stretch;flex-direction:column;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .workspace-hero-actions {justify-content:flex-start;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-context-controls {align-items:stretch;flex-direction:column;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-tabs {grid-template-columns:1fr;}
}

/* Pending-ledger controls and payment handoff use the verified ledger screen owner. */
@media screen {
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-controls {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 12px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-filter-heading {display:flex;align-items:baseline;gap:12px;color:var(--pending-ink);}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filters {display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--pending-line);border-radius:9px;background:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filter {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:7px 11px;border:0;border-radius:6px;background:transparent;color:var(--pending-muted);font:inherit;font-size:12px;cursor:pointer;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filter small {display:inline-grid;min-width:20px;min-height:20px;place-items:center;border-radius:10px;background:#edf2f7;color:inherit;font-size:11px;font-variant-numeric:tabular-nums;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filter.is-active {background:#142a43;color:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filter.is-active small {background:#314861;color:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table {min-width:1220px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-customer-scope .tv-managed-ledger-open-table {min-width:920px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-invoice {display:grid;gap:5px;min-width:150px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-invoice small {color:var(--pending-muted);font-size:12px;white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-due {display:grid;min-width:140px;gap:7px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-open-table tbody tr.is-overdue td:first-child {box-shadow:inset 3px 0 #e66b32;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-row-actions {white-space:nowrap;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-managed-ledger-row-actions .btn {min-height:34px;padding:6px 9px;font-size:12px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-allocation-prompt {display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0;padding:20px;border:1px solid var(--pending-line);border-radius:10px;background:#fff;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-allocation-prompt h2 {margin:5px 0;color:var(--pending-ink);font-size:17px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-allocation-prompt p {max-width:76ch;margin:0;color:var(--pending-muted);line-height:1.55;}
}
@media screen and (max-width:620px) {
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-controls {align-items:stretch;flex-direction:column;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filters {display:grid;grid-template-columns:1fr;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-state-filter {justify-content:space-between;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-allocation-prompt {align-items:stretch;flex-direction:column;padding:16px;}
  .tv-stitch-ledger[data-stitch-screen="6837eebbf0c3454d958836b5b79db924"] .tv-pending-ledger-allocation-prompt .btn {width:100%;}
}

/* Accounting-ledger balance strip is independently reusable inside the
   customer ledger; the generated screen ID belongs to this exact component. */
@media screen {
  [data-stitch-screen="37faea319f4f45c885b8dd3cfc4eff5f"] {
    display:grid;
    gap:12px;
    min-width:0;
    padding:16px;
    border:1px solid var(--tv-border,#c7d4e2);
    border-radius:10px;
    background:#fff;
  }
  [data-stitch-screen="37faea319f4f45c885b8dd3cfc4eff5f"] > h4 {
    margin:0;
    color:var(--tv-text,#122c46);
    font-size:14px;
  }
}

/* Shared-payment details use labelled rows in both customer ledger surfaces. */
.tv-invoice-application-table .tv-ledger-payment-breakdown-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,25%);gap:16px;}
.tv-invoice-application-table .tv-ledger-payment-breakdown-amount {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
.tv-invoice-application-table .tv-ledger-payment-breakdown-meta {display:block;margin-top:3px;font-size:12px;font-weight:400;line-height:1.4;color:#40546a;overflow-wrap:anywhere;}
.tv-invoice-application-table .tv-ledger-payment-breakdown-title td {border-top:2px solid #153553;padding-top:12px;}
.tv-invoice-application-table .tv-ledger-payment-breakdown-balance td {background:#edf4f8;}
.tv-invoice-application-table .tv-ledger-payment-breakdown-warning td {color:#934a12;}
