/*
 * Invoices & Statements — CR-A116-10 (invoices-statements-r1.html §1-2,5 +
 * statements-r1.html §1-3).
 *
 * Selectors + values are copied verbatim from the ratified cards' <style>
 * blocks wherever the card draws the element. `client-table.css` already
 * owns the LIST canon (page-head-row, chip-bar, table, pagination, phone
 * row-cards) — this file owns only what is NEW on this page: the page-level
 * pill tab bar (Invoices/Statements), the invoice status hues (a second,
 * separate palette from order-status badges — the card's own :root block
 * keeps them distinct), the ARTIFACT document ("paper") surface shared by
 * both the invoice and the statement, the statements filter row + aging
 * strip, and the states this page adds beyond client-table.css's generic
 * loading/empty/error (a 3-wide states row on invoices-statements-r1 §4, a
 * 4-wide one on statements-r1 §2 — both reuse client-table.css's
 * `.skel-row`/`.skel`/`.empty-state-mini`/`.es-*` primitives).
 */

.icon-sm { width: 12px; height: 12px; }

/* ================= invoice/statement status hues (LOCKED, card :root) =====
   A second, deliberately separate palette from the order-status badges in
   client-table.css (`--badge-*` there govern order lifecycle; these four
   govern money-document lifecycle) — byte-identical to invoices-statements-
   r1.html's :root block. */
:root {
  --paid-bg: #D1FAE5; --paid-ink: #047857;
  --overdue-bg: #FEE2E2; --overdue-ink: #B91C1C;
  --open-bg: #DBEAFE; --open-ink: #1D4ED8;
  --partial-bg: #FEF3C7; --partial-ink: #B45309;
  --statement-bg: #D1FAE5; --statement-ink: #047857;
}

.badge-open { background: var(--open-bg); color: var(--open-ink); }
.badge-overdue { background: var(--overdue-bg); color: var(--overdue-ink); }
.badge-paid { background: var(--paid-bg); color: var(--paid-ink); }
.badge-partial { background: var(--partial-bg); color: var(--partial-ink); }
/* Extension beyond the card (real data carries a `void` status the card
   never draws — see invoices.js file header decision #1): same neutral
   treatment as client-table.css's own out-of-card status extensions,
   reusing existing tokens, no new colors invented. */
.badge-void { background: var(--line-soft); color: var(--muted); }

/* ================= page-level pill tab bar (Invoices / Statements) =======
   invoices-statements-r1.html §1 "page-tabbar" — verbatim. */
.page-tabbar { display: flex; align-items: center; gap: 6px; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-full); padding: 4px; width: fit-content; margin-bottom: var(--sp-4); }
/* Drew's ruling, 2026-08-13: "۴۴ بمونه، همه جا یکدست بشه" ("44 stays, make it consistent everywhere") —
   min-height only, visual pill height/padding unchanged. */
.page-tab { display: flex; align-items: center; gap: 7px; height: 36px; min-height: 44px; padding: 0 18px; border-radius: var(--r-full); font-size: 13px; line-height: 1.45; text-align: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border: none; background: none; font-family: var(--font); }
.page-tab.active { background: var(--navy); color: #fff; }
.page-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* invoices-statements-r1.html:122 — the "R2" pill on the disabled Payments
   tab. Was entirely unstyled (rendered as plain text — the largest single
   pixel-fidelity deviation measured, CR-A116-integration-pixel-report §3.4). */
.page-tab .tab-soon { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--line-soft); color: var(--faint); padding: 2px 6px; border-radius: 999px; }

/* ================= cell formatting specific to the invoice list =========== */
.cell-inv .ref { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.cell-inv .site { font-size: 12px; color: var(--muted); }
.cell-date { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.cell-amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); font-size: 13.5px; }
.cell-bal { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 13.5px; }
.cell-bal.zero { color: var(--faint); }
.cell-bal.unknown { color: var(--faint); font-family: var(--font); font-style: italic; }

/* ================= DOCUMENT surface: the document "paper" =================
   Shared, byte-identical, by the invoice document (invoices-statements-r1
   §2) and the statement document (statements-r1 §1) — one paper language,
   per the card's own annotation ("a money artifact never has two faces").
   CR-A116-31: the frame around this paper (top bar, canvas, actions) moved
   to the shared assets/css/document.css (🟢 Document page card) — this file
   keeps only the paper's own inner layout. `.artifact-frame`/`.artifact-
   label`/`.back-to-list`/`.doc-type-pill` (superseded by document.css's
   `.doc-badge`) are retired — `grep` confirms zero remaining references in
   views/invoices.js. */
.paper { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); width: 860px; max-width: 100%; padding: 44px 48px; margin: 0 auto; }
/* ---- BF-490/BF-491: the SUPERSEDED round is deleted, not left behind -----
   `.paper-head`, `.paper-seller`, `.paper-doc-badge`, `.paper-meta-grid`,
   `.bill-to`, `.meta-row`, `.lines-table`, `.totals-block`, `.tot-row`,
   `.payment-strip`, `.paper-foot`, `.powered-by-paper`, `.txn-table` and
   `.paper .aging-section` are GONE from this file. Every one of them was
   used only by views/invoices.js (verified by grep across views/ and
   assets/js/ before removal — `.paper` itself and `.artifact-note` are kept
   precisely because views/packing-slips.js does use them).

   They are removed rather than left dormant BECAUSE leaving them is the bug.
   `invoice-document.html` still carries its own superseded `.paper`/
   `.paper-head`/`.paper-meta-grid`/`.totals-block` rules in its `<style>`
   block while its `<body>` renders none of them — and this file was built
   against that dead CSS, which is the documented root cause of BF-490 and
   BF-491. Dead style rules read as a spec to the next builder. ---- */

/* ================= INVOICE paper — `invoice-document.html` §1 ============
   Copied from the card's LIVE `.paper.pdf` / `.pdf-*` block (its
   lines 397-442), the markup its `<body>` actually renders. Drew, 2026-08-14:
   "the client's invoice must be the SAME document that is emailed. Mirrored
   from backend/templates/invoice.html" — the navy header row, zebra rows,
   `↳` sub-rows, "HST (13%):" and the Proudly-Canadian footer below are all
   cross-checked against that template (lines 201-312). */
/* The two cards are separate FILES, so each defines its own `.paper.pdf`
   with its own padding (invoice `34px 38px 26px`; statement `0 30px 24px`
   + `overflow:hidden`, because `.ad-band` bleeds edge-to-edge via
   `margin:0 -30px` and depends on a 30px gutter). Sharing one stylesheet
   needs one distinguishing hook, so the statement paper carries an extra
   `.ad` modifier — a build necessity, not a design deviation: the rendered
   geometry matches each card exactly. */
.paper.pdf { width: 700px; padding: 34px 38px 26px; border-radius: var(--r-md); box-shadow: 0 10px 15px -3px rgba(15, 23, 42, .10); color: #111827; }
.paper.pdf.ad { padding: 0 30px 24px; overflow: hidden; }
.pdf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 18px; }
.pdf-seller { display: flex; gap: 13px; align-items: flex-start; }
.pdf-logo { width: 42px; height: 42px; border-radius: 6px; background: var(--navy); color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pdf-ent { font-size: 15px; font-weight: 800; color: var(--navy); }
.pdf-addr { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.pdf-phone { font-size: 11.5px; color: var(--muted); }
.pdf-meta { text-align: right; }
.pdf-mrow { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 2px; }
.pdf-mrow span:first-child { color: var(--muted); margin-right: 5px; }
.pdf-mrow b { font-family: var(--mono); font-weight: 700; }
.pdf-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 16px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pdf-plabel { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.pdf-pname { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pdf-paddr { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.pdf-orderer { color: var(--faint); }
.pdf-lines { width: 100%; border-collapse: collapse; margin-top: 18px; }
.pdf-lines th { padding: 8px 12px; font-size: 11px; font-weight: 700; color: #fff; background: var(--navy); }
.pdf-lines th.l { text-align: left; }
.pdf-lines th.r { text-align: right; }
.pdf-lines td { padding: 9px 12px; font-size: 12px; color: var(--ink); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.pdf-lines td.r { text-align: right; }
.pdf-lines tr.alt td { background: #f9fafb; }
.pdf-lines tr.sub td { color: var(--muted); font-size: 11.5px; padding-top: 5px; padding-bottom: 5px; }
.pdf-note { font-size: 10.5px; color: var(--faint); }
.pdf-totals { display: flex; justify-content: flex-end; margin-top: 14px; }
.pdf-totals table { border-collapse: collapse; min-width: 260px; }
.pdf-totals td { padding: 5px 0; font-size: 12.5px; }
.pdf-totals .tl { color: var(--muted); text-align: right; padding-right: 22px; }
.pdf-totals .tv { text-align: right; font-weight: 700; color: var(--ink); }
/* BF-490 [S] — the card's grand-total rule is 2px solid var(--navy) at 15px;
   the superseded round drew var(--ink) at 22px. */
.pdf-totals tr.grand td { padding-top: 9px; border-top: 2px solid var(--navy); font-size: 15px; font-weight: 800; color: var(--navy); }
.pdf-terms { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pdf-terms p { font-size: 12px; color: var(--ink-soft); margin: 0 0 3px; }
.pdf-foot { margin-top: 26px; }
.pdf-thanks { text-align: center; padding-bottom: 14px; }
.pdf-cdn { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin: 0 0 3px; }
.pdf-ty { font-size: 12.5px; color: var(--ink-soft); margin: 0; font-weight: 600; }
.pdf-bar { display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pdf-pb { font-size: 10.5px; color: var(--faint); }
.pdf-ynet { font-size: 12px; font-weight: 800; color: var(--navy); }
.pdf-ynet span { color: var(--red, #EF4444); }

/* ================= STATEMENT paper — `statement-document.html` §1 ========
   Copied from that card's LIVE `.ad-*` block (its lines 373-417). Drew,
   2026-08-14: "the client's statement is the SAME document the admin prints
   ... NOT statement_service._build_html_body — the email body is a reduced
   version and drops the aging boxes (BF-96)." */
.ad-band { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 -30px 16px; padding: 16px 30px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-bottom: 2px solid #13265C; }
.ad-ent { display: flex; gap: 13px; align-items: flex-start; }
.ad-logo { width: 56px; height: 56px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--navy); flex-shrink: 0; }
.ad-name { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.ad-addr { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ad-phone { font-size: 11px; color: var(--muted); }
.ad-right { text-align: right; }
.ad-of { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.ad-kv { font-size: 11px; color: var(--ink-soft); }
.ad-kv span:first-child { color: var(--muted); }
.ad-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ad-box { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; }
.ad-blabel { font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-bname { font-size: 13px; font-weight: 700; color: var(--ink); }
.ad-bsub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ad-tx { width: 100%; border-collapse: collapse; }
.ad-tx th { padding: 7px 10px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--field); border-bottom: 1px solid var(--line); }
.ad-tx th.l { text-align: left; }
.ad-tx th.r { text-align: right; }
.ad-tx td { padding: 8px 10px; font-size: 11.5px; border-bottom: 1px solid var(--line-soft); }
.ad-tx td.r { text-align: right; }
.ad-aging { margin-top: 20px; }
.ad-atitle { font-size: 10px; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid #2563eb; }
.ad-arow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ad-acell { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 9px; text-align: center; }
.ad-acell.tot { background: #EFF6FF; border-color: #BFDBFE; }
.ad-al { font-size: 9.5px; color: var(--muted); margin-bottom: 3px; }
.ad-av { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.ad-av.over { color: #DC2626; }
.ad-acell.tot .ad-av { color: #1E3A8A; }
.ad-due { margin-top: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 26px; border-top: 2px solid var(--navy); padding-top: 10px; font-size: 15px; font-weight: 800; color: var(--navy); }
.ad-terms { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ad-terms p { font-size: 11.5px; color: var(--ink-soft); margin: 0 0 3px; }

/* Both cards' `.mono` helper (shared by `.pdf-*` and `.ad-*` cells). */
.paper.pdf .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.artifact-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; background: var(--field); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px 16px; max-width: 900px; }
.artifact-note .icon { color: var(--muted); margin-top: 1px; flex-shrink: 0; }
.artifact-note p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.artifact-note b { color: var(--ink); }

/* BF-491: the statement document's aging is now the card's own `.ad-aging`
   5-cell block (above), not the Statements LIST's `.aging-row`/`.metric-card`
   language borrowed into the paper. `.aging-row`/`.metric-card` stay defined
   further down — the LIST surface still uses them, untouched by this fix. */

/* ================= statements: filter row (statements-r1 §1) ============== */
.filter-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.filter-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* CR-A116-52: the picker now renders a server-driven month count (up to
   `limit`, default 12) instead of a hardcoded 3 — same chip, more instances.
   `overflow-x: auto` (previously mobile-only, line ~299) is extended to all
   widths so a full page of chips scrolls instead of wrapping/overflowing the
   filter row; no new component, same idiom the phone breakpoint already used. */
.month-picker { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
/* Drew's ruling, 2026-08-13: "۴۴ بمونه، همه جا یکدست بشه" ("44 stays, make it consistent everywhere") —
   same 32px clickable-chip language as .filter-chip/.status-opt; min-height
   only, visual chip height/padding unchanged. */
.month-chip { height: 32px; min-height: 44px; padding: 0 14px; border-radius: var(--r-full); border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); font-size: 12.5px; line-height: 1.45; text-align: inherit; font-weight: 600; display: flex; align-items: center; cursor: pointer; font-family: var(--font); }
.month-chip.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.month-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.year-select { height: 32px; min-height: 44px; padding: 0 10px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.year-select .icon { color: var(--faint); }
.custom-range-chip { height: 32px; min-height: 44px; padding: 0 14px; border-radius: var(--r-full); border: 1.5px dashed #BFDBFE; background: var(--blue-soft); color: var(--blue-deep); font-size: 12.5px; line-height: 1.45; text-align: inherit; font-weight: 700; display: flex; align-items: center; gap: 6px; font-family: var(--font); }
.custom-range-chip .icon { color: var(--blue-deep); }
.status-toggle { display: flex; border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
/* .status-opt is a real <button> in packing-slips.js (a <div> in invoices.js's
   read-only variant) — button needs its own reset, this file never gave it
   one, so it kept Chromium's UA border + font-family (measured: Arial with a
   2px top border vs the card's app-sans/borderless — pixel report §3.4). */
/* Drew's ruling, 2026-08-13: "۴۴ بمونه، همه جا یکدست بشه" ("44 stays, make it consistent everywhere") —
   min-height only, visual segmented-control height/padding unchanged. */
.status-opt { height: 32px; min-height: 44px; padding: 0 14px; border: none; background: none; font-size: 12.5px; line-height: 1.45; text-align: inherit; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; cursor: pointer; font-family: var(--font); }
.status-opt.active { background: var(--navy); color: #fff; }

/* ================= statements: aging vs statement scope =================== */
.aging-section { margin-bottom: var(--sp-6); }
.scope-tag { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.scope-tag .icon { color: var(--faint); }
.scope-tag b { color: var(--ink); font-weight: 700; }
.aging-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.metric-card .mc-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.metric-card .mc-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; color: var(--navy); }
.metric-card.zero .mc-value { color: var(--faint); }
.metric-card.flag { border-color: #FCA5A5; }
.metric-card.flag .mc-value { color: var(--overdue-ink); }
.scope-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.scope-divider .dl { flex: 1; height: 1px; background: var(--line); }
.scope-divider .dt { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

/* BF-491: `table.txn-table` (Date | Ref | Description | Amount | Balance,
   plus an in-table "Closing balance" total row) is removed — the statement
   card draws `.ad-tx` with SEPARATE Charges and Payments columns, no Ref
   column, and closes with `.ad-due` instead of a total row. Used by no other
   view (verified by grep before removal). */

/* ================= states (both pages reuse client-table.css primitives;
   these are the container widths the cards draw — 3-wide on invoices,
   4-wide on statements) ================= */
.states-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.states-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.state-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.state-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--field); }
.danger-box { background: var(--danger-soft); border: 1px solid #FCA5A5; border-radius: var(--r-md); padding: 22px 20px; text-align: center; margin: 16px; }
.danger-box .icon { color: var(--danger); width: 22px; height: 22px; margin: 0 auto 10px; }
.danger-box .dt { font-size: 13px; font-weight: 700; color: var(--danger); margin-bottom: 4px; }
.danger-box .ds { font-size: 11.5px; color: #991B1B; margin-bottom: 12px; }
.btn-retry { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--danger); color: var(--danger); font-size: 11.5px; font-weight: 700; padding: 8px 14px; border-radius: var(--r-md); cursor: pointer; font-family: var(--font); }
.btn-retry .icon { width: 12px; height: 12px; stroke: var(--danger); }
.btn-retry:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }

/* ================= phone: Statements list's compact aging grid — the
   ONLY phone-specific markup this page still owns after CR-A116-31 (the
   document itself is no longer reflowed for phone — document.css's
   .doc-canvas scrolls the same full-size paper instead; see that file's
   "the paper is not reflowed" block + this page's decision #7). `.p-doc-
   topbar`/`.p-doc-body`/`.p-paper`/`.p-doc-sticky` (the old compact-
   document markup) are retired with the JS that built them — `grep`
   confirms zero remaining references in views/invoices.js. */
.p-aging-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-metric { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.p-metric.flag { border-color: #FCA5A5; }
.p-metric .label { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.p-metric .value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; color: var(--navy); }
.p-metric.flag .value { color: var(--overdue-ink); }
.p-scope-label { font-size: 10.5px; color: var(--faint); margin: -2px 0 8px; }

/* ================= phone reflow (~480px, matches client-table.css's own
   breakpoint) ================= */
@media (max-width: 480px) {
  .filter-row { flex-direction: column; gap: 12px; }
  .aging-row { grid-template-columns: 1fr 1fr; }
  .states-row, .states-row-4 { grid-template-columns: 1fr; }
  /* CR-A116-31: the DOCUMENT paper is deliberately NOT reflowed at this
     width (scope item 7, "a viewport onto the real document ... do not
     reflow it") — document.css's `.doc-canvas` scrolls it instead. No
     `width` override here, so the paper keeps its natural 700px and the
     canvas around it (not this element) provides the horizontal scroll.
     BF-490/BF-491: the `.paper-meta-grid` single-column override that used
     to live here is gone with that element — and deliberately NOT replaced
     by `.pdf-parties`/`.ad-boxes` equivalents, because reflowing the paper
     is exactly what both cards forbid ("a viewport onto the same document,
     not a second layout"). */
  .month-picker { overflow-x: auto; }
  .page-tabbar { width: 100%; overflow-x: auto; }
}

/* ================= CR-A116-52: statement-document toast (success — "no
   silent saves"). Cloned verbatim from settings.css's `.toast`/`.t-icon`/
   `.t-x`/`.settings-toast-host` (account.js's showToast()) — same page-local
   toast convention, no shared component exists yet, so this file gets its
   own host class instead of reaching into settings.css. ==== */
.toast { display: inline-flex; align-items: center; gap: 10px; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 12px 16px 12px 14px; }
.toast.err { background: var(--danger-soft); border-color: #FCA5A5; }
.toast .t-icon { width: 20px; height: 20px; border-radius: 50%; background: #059669; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast.err .t-icon { background: var(--danger); }
.toast .t-icon .icon { width: 11px; height: 11px; }
.toast .t-text { font-size: 12.5px; font-weight: 700; color: #065F46; }
.toast.err .t-text { color: #991B1B; }
.toast .t-x { width: 20px; height: 20px; color: #059669; flex-shrink: 0; margin-left: 4px; cursor: pointer; }
.toast.err .t-x { color: var(--danger); }
.stmt-toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 40; }

/* ================= responsive markup toggle (build decision — see
   invoices.js file header #6 / the artifact-phone-typography note): the
   Statements list's "as of today" aging summary still renders TWO parallel
   markups (desktop grid + a compact phone grid), swapped via this same
   table-vs-row-cards technique client-table.css already uses for the LIST
   canon. CR-A116-31 retired the equivalent split for the DOCUMENT paper
   itself (invoicePaperCompactHtml/statementPaperCompactHtml/
   buildSlipPaperCompactHtml are gone — the paper is single-markup now,
   scrolled rather than reflowed; see document.css). Placed LAST in the
   cascade (deliberately, after every component rule in this file) so
   `display` always wins regardless of which other classes a `.desktop-
   only`/`.phone-only` element also carries. ==== */
.desktop-only { display: block; }
.phone-only { display: none; }
@media (max-width: 480px) {
  .desktop-only { display: none; }
  .phone-only { display: block; }
}
