/* One payment register layout owner; no global selectors or important rules. */
.tv-payment-register-view { min-width:0; color:#19364a; font-size:14px; line-height:1.5; }
.tv-payment-register-view * { box-sizing:border-box; }
.tv-payment-grid-scroll { width:100%; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; border-bottom:1px solid #dce4ea; container:tv-payment-grid / inline-size; }
.tv-payment-grid-scroll:focus-visible { outline:3px solid #007ac2; outline-offset:2px; }
.tv-payment-grid { width:100%; min-width:1160px; table-layout:fixed; border-collapse:collapse; }
.tv-payment-grid th,.tv-payment-grid td { padding:12px; text-align:left; vertical-align:top; border-bottom:1px solid #dce4ea; overflow-wrap:anywhere; }
.tv-payment-grid th { background:#f4f7fa; font-size:13px; font-weight:600; color:#365268; }
.tv-payment-grid [data-pay-column="payment"] { width:24%; }
.tv-payment-grid [data-pay-column="customer"] { width:18%; }
.tv-payment-grid [data-pay-column="status"] { width:19%; }
.tv-payment-grid [data-pay-column="applied"] { width:16%; }
.tv-payment-grid [data-pay-column="amount"] { width:13%; }
.tv-payment-grid [data-pay-column="actions"] { width:10%; }
.tv-payment-grid [data-pay-column="applied"],.tv-payment-grid [data-pay-column="amount"] { text-align:right; font-variant-numeric:tabular-nums; }
.tv-payment-grid tbody tr:hover { background:#f7fafc; }
.tv-payment-grid tbody tr:focus-within { background:#edf5fb; }
.tv-pay-cell,.tv-pay-status,.tv-pay-actions { display:grid; min-width:0; gap:6px; }
.tv-pay-cell > strong { font-size:14px; font-weight:650; }
.tv-pay-cell > span,.tv-pay-reference,.tv-pay-posting { font-size:13px; color:#435c70; }
.tv-pay-cell > small,.tv-pay-status > small,.tv-pay-identity > small { font-size:12px; color:#435c70; }
.tv-pay-cell > *, .tv-pay-status > *, .tv-pay-identity > * { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.tv-pay-identity { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 8px; align-items:start; }
.tv-pay-identity .tv-pay-cell > strong { white-space:nowrap; overflow-wrap:normal; }
.tv-pay-reference,.tv-pay-identity > small { grid-column:1 / -1; }
.tv-pay-badge { width:fit-content; padding:3px 8px; border:1px solid #c9d5df; border-radius:5px; background:#f3f6f9; color:#304e64; font-size:12px; line-height:1.5; }
.tv-pay-badge[data-tone="success"] { background:#eef7f1; color:#245e3d; border-color:#bdd8c8; }
.tv-pay-badge[data-tone="warning"] { background:#fff6e3; color:#76500c; border-color:#e4cd98; }
.tv-pay-badge[data-tone="danger"],.tv-pay-badge[data-tone="inactive"] { background:#fff0f0; color:#8a3030; border-color:#e6bcbc; }
.tv-pay-button,.tv-pay-sort { appearance:none; min-width:0; max-width:100%; min-height:44px; border:1px solid #aabcca; border-radius:6px; padding:8px 10px; background:#fff; color:#174f76; font:inherit; line-height:1.4; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
.tv-pay-primary { background:#1261ba; border-color:#1261ba; color:#fff; font-weight:650; }
.tv-pay-customer { border:0; padding:0; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.tv-payment-grid .tv-pay-customer { background:transparent; border:0; border-radius:0; box-shadow:none; color:#174f76; overflow-wrap:break-word; word-break:normal; }
.tv-payment-grid .tv-pay-customer { white-space:normal; overflow-wrap:normal; word-break:normal; }
.tv-pay-copy { padding:6px; font-size:12px; }
.tv-payment-grid .tv-pay-primary { padding:8px 9px; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.tv-pay-sort { border:0; border-radius:3px; padding:0; min-height:32px; background:transparent; color:inherit; font-weight:600; text-align:inherit; }
.tv-payment-grid th[aria-sort="ascending"] .tv-pay-sort::after { content:" ↑"; }
.tv-payment-grid th[aria-sort="descending"] .tv-pay-sort::after { content:" ↓"; }
.tv-payment-register-view :focus-visible { outline:3px solid #007ac2; outline-offset:3px; }
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:20px; min-width:0; margin:0 0 14px; padding:20px 22px;
  border:1px solid var(--tv-border,#c7d4e2); border-radius:16px;
  background:var(--tv-surface,#fff); box-shadow:0 2px 8px #122d260f;
}
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-copy { min-width:0; }
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-copy h2 {
  margin:0; color:var(--tv-text,#122c46); font-size:26px; line-height:1.2; letter-spacing:-.025em;
}
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-copy > p {
  max-width:70ch; margin:7px 0 0; color:var(--tv-text-muted,#4d6178); font-size:14px; line-height:1.5;
}
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .tv-route-context { margin-top:10px; }
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
  gap:8px; min-width:0; max-width:100%;
}
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions > :is(.btn,details) { min-width:0; }
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions .btn {
  min-height:44px; white-space:normal; text-align:center; overflow-wrap:anywhere;
}
.tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions .btn-primary { box-shadow:0 2px 5px #073b371c; }
@media(max-width:980px) {
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero {
    grid-template-columns:minmax(0,1fr); align-items:start; gap:14px; padding:18px;
  }
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions { justify-content:flex-start; }
}
@media(max-width:520px) {
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero { gap:12px; padding:15px; }
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-copy h2 { font-size:22px; }
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions > [data-action-rank="primary"] { grid-column:1/-1; }
  .tv-receipt-page-frame[data-route-id="payments"] > .workspace-hero .workspace-hero-actions > :is(.btn,details) { width:100%; }
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-toolbar {
  display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch;
  gap:12px; min-width:0; padding:16px; border-bottom:1px solid #dce4ea;
  background:#f4f7fa;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-search,
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-filter-disclosure,
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-search input {
  display:grid; width:100%; min-width:0; max-width:none;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-search { gap:6px; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-search > span,
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-filter > span {
  color:#435c70; font-size:12px; font-weight:650; line-height:1.35;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-search input,
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-filter :is(input,select) {
  box-sizing:border-box; min-height:44px; padding:9px 12px; border:1px solid #aabcca;
  border-radius:6px; background:#fff; color:#19364a; font:inherit;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-advanced-filters {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end;
  gap:12px; min-width:0; padding:4px 0 0;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-filter { display:grid; gap:6px; min-width:0; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-filter > span { overflow-wrap:anywhere; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-advanced-filters > .btn {
  min-width:0; min-height:44px; white-space:normal;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-filter-disclosure > summary {
  display:flex; width:100%; min-width:0; min-height:44px; align-items:center;
  justify-content:space-between; gap:12px; padding:8px; color:#174f76;
  font-size:13px; cursor:pointer;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-filter-disclosure > summary small {
  margin-left:auto; color:#435c70; font-size:12px;
}
.tv-pay-sort-controls { display:flex; flex-wrap:wrap; gap:12px; padding:12px; border-bottom:1px solid #dce4ea; }
.tv-pay-sort-controls label { display:grid; gap:4px; font-size:12px; font-weight:600; min-width:0; }
.tv-pay-sort-controls select { min-width:0; max-width:100%; min-height:44px; padding:8px; border:1px solid #aabcca; border-radius:6px; background:white; color:#19364a; font:inherit; font-size:14px; }
.tv-pay-screenreader { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
/* Filters use one native disclosure at every width. Its trigger never disappears
   when a formerly narrow viewport becomes wide. The register owner preserves
   open/closed state across reads without a resize observer. */
.tv-payment-filter-disclosure { min-width:0; width:100%; grid-column:1 / -1; }
.tv-payment-filter-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:8px; color:#174f76; font-size:13px; cursor:pointer; }
.tv-payment-filter-disclosure > summary::before { content:'▸'; }
.tv-payment-filter-disclosure[open] > summary::before { content:'▾'; }
.tv-payment-filter-disclosure > summary small { margin-left:auto; font-size:12px; color:#435c70; }
.tv-payment-filter-disclosure :focus-visible { outline:3px solid #007ac2; outline-offset:3px; }
@container tv-payment-grid (max-width:1159px) {
  .tv-payment-grid { min-width:0; }
  .tv-payment-grid,.tv-payment-grid tbody { display:block; width:100%; }
  .tv-payment-grid thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .tv-payment-grid tbody tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); margin:12px; border:1px solid #cbd8e2; border-radius:8px; }
  .tv-payment-grid td[data-pay-column] { display:block; width:auto; min-width:0; padding:12px; text-align:left; }
  .tv-payment-grid td::before { content:attr(data-label); display:block; margin-bottom:6px; color:#435c70; font-size:12px; font-weight:650; }
  .tv-payment-grid td[data-pay-column="payment"],.tv-payment-grid td[data-pay-column="status"],.tv-payment-grid td[data-pay-column="actions"] { grid-column:1 / -1; }
  .tv-payment-grid td[data-pay-column="customer"] { grid-column:1 / -1; }
  .tv-payment-grid td[data-pay-column="actions"] { border-bottom:0; }
  .tv-pay-actions { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
}
@media(max-width:420px) {
  .tv-payment-grid tbody tr { display:block; margin:8px; }
  .tv-pay-sort-controls { display:grid; grid-template-columns:minmax(0,1fr); }
}
@media(max-width:640px) {
  .tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-toolbar { padding:12px; }
  .tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-advanced-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-advanced-filters > .btn { grid-column:1/-1; width:100%; }
}
/* The payment register is the sole presentation owner for its register-level
   notices and coverage disclosure too. Keep these route-scoped rules beside
   the table instead of loading a second late cascade layer from the shell. */
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-list { min-width:0; overflow:visible; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-list-rows { min-width:0; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-list--compact .tv-attention-row {
  grid-template-columns:auto minmax(0,1fr) auto;
  grid-template-areas:"badge copy action" "badge value action";
  align-items:center; min-width:0; min-height:0; gap:8px 12px; padding:14px 16px;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row > .badge { grid-area:badge; align-self:center; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row .tv-attention-copy { grid-area:copy; min-width:0; overflow:visible; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row .tv-attention-copy > span {
  display:block; overflow:visible; white-space:normal; text-overflow:clip;
  -webkit-line-clamp:unset; -webkit-box-orient:initial; overflow-wrap:anywhere;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row .tv-attention-value { grid-area:value; justify-self:start; text-align:left; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row > .btn { grid-area:action; white-space:normal; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure {
  min-width:0; margin:10px 0 14px; overflow:hidden;
  border:1px solid var(--tv-border,#c7d4e2); border-radius:12px;
  background:var(--tv-surface,#fff);
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > summary {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px;
  min-width:0; min-height:48px; padding:12px 16px;
  cursor:pointer; color:var(--tv-text,#19364a);
  font-size:14px; font-weight:650; line-height:1.45;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > summary::before { content:'▸'; color:var(--tv-brand,#1261ba); }
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure[open] > summary::before { content:'▾'; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure[open] > summary { border-bottom:1px solid var(--tv-border,#dce4ea); }
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > .tv-route-summary {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0;
  padding:0; border:0; border-radius:0; background:transparent; box-shadow:none;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell {
  display:grid; align-content:start; gap:5px; min-width:0; padding:14px 16px;
  border:0; border-right:1px solid var(--tv-border,#dce4ea); border-bottom:1px solid var(--tv-border,#dce4ea);
  background:transparent;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell:nth-child(2n) { border-right:0; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell > span {
  color:var(--tv-text-muted,#526579); font-size:11px; font-weight:700; letter-spacing:.04em; line-height:1.35; text-transform:uppercase;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell > strong {
  color:var(--tv-text,#19364a); font-size:22px; font-weight:750; font-variant-numeric:tabular-nums; line-height:1.15; overflow-wrap:anywhere;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell > small {
  color:var(--tv-text-muted,#526579); font-size:12px; line-height:1.45; overflow-wrap:anywhere;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-toggle {
  grid-column:1/-1; justify-self:start; margin:10px 14px 12px;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-hint {
  display:inline-block; margin-inline-start:12px; color:var(--tv-text-muted,#526579);
  font-size:12px; font-weight:500; line-height:1.4;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > summary:focus-visible {
  outline:3px solid var(--tv-focus,#007ac2); outline-offset:-3px;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > .tv-route-summary { margin:0; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-register-meta {
  display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; min-width:0;
  padding:12px 16px; border-bottom:1px solid #dce4ea; color:#435c70; font-size:13px; line-height:1.45;
}
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-register-meta > span { min-width:0; }
.tv-receipt-page-frame[data-route-id="payments"] .tv-receipt-register-meta > .invoice-register-count { color:#19364a; font-weight:700; font-variant-numeric:tabular-nums; }
@media(max-width:760px) {
  .tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure > .tv-route-summary { grid-template-columns:minmax(0,1fr); }
  .tv-receipt-page-frame[data-route-id="payments"] .tv-payment-summary-disclosure .tv-route-summary-cell { border-right:0; }
  .tv-receipt-page-frame[data-route-id="payments"] .tv-attention-list--compact .tv-attention-row {
    grid-template-columns:auto minmax(0,1fr); grid-template-areas:"badge copy" "badge value" "action action";
    align-items:start;
  }
  .tv-receipt-page-frame[data-route-id="payments"] .tv-attention-row > .btn { justify-self:stretch; }
}
