/* Account Statement (#/acct-statement) - printable family statement. Prefix acs-. */
.acs { container-type: inline-size; }
.acs-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 10px; }
.acs-tools .search-bar { flex: 1 1 260px; }
.acs-hint { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.acs-guide { border-radius: 999px; }
.acs-pay { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border: 1.5px solid var(--ink); }
.acs-pay-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; }
.acs-pay-txt { flex: 1; min-width: 0; }
.acs-pay-txt b, .acs-pay-txt small { display: block; }
.acs-pay-txt b { font-size: var(--fs-md); }
.acs-pay-txt small { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; line-height: 1.4; }
.acs-pay-btn { flex: none; gap: 6px; padding: 0 22px; }
@media (max-width: 560px) { .acs-pay { flex-wrap: wrap; } .acs-pay-btn { width: 100%; justify-content: center; } }
:root[data-theme="dark"] .acs-pay { border-color: #3A46A8; } :root[data-theme="dark"] .acs-pay-ic { background: #3A46A8; }
.acs-pick { padding: 0; overflow: hidden; }
.acs-cap { display: flex; justify-content: space-between; padding: 11px 16px; background: var(--surface-2); font-size: 10.5px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.acs-prow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 12px; align-items: center; width: 100%; padding: 10px 16px;
  border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.acs-prow:hover { background: var(--surface-2); }
.acs-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 12px; }
.acs-pn { display: flex; flex-direction: column; min-width: 0; } .acs-pn b { color: var(--ink); } .acs-pn small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.acs-none { padding: 18px 16px; color: var(--muted); font-weight: 600; }
.acs-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--muted); }

.acs-printhead { display: none; }
.acs-owed { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; padding: 14px 18px; margin-bottom: 12px; border-left: 4px solid var(--violet); }
.acs-owed-fig { display: flex; flex-direction: column; min-width: 180px; }
.acs-owed-fig small, .acs-fig small, .acs-sum small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acs-owed-fig b { font-family: var(--font-display); font-size: 30px; color: var(--violet); line-height: 1.1; }
.acs-owed-txt { flex: 1 1 320px; } .acs-owed-txt p { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

.acs-card { padding: 0; overflow: hidden; margin-bottom: 14px; }
.acs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; background: linear-gradient(135deg, #1B2159 0%, #2A327A 100%); color: rgba(255,255,255,.85); }
.acs-photo { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; flex: none; border: 2px solid rgba(255,255,255,.3); }
.acs-init { display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; font-weight: 800; font-size: 17px; }
.acs-id { flex: 1 1 180px; min-width: 0; } .acs-id h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 22px; line-height: 1.15; }
.acs-id small { font-size: 12px; font-weight: 600; opacity: .85; } .acs-warn { color: #FCA5A5; }
.acs-fig { display: flex; flex-direction: column; text-align: right; } .acs-fig small { color: rgba(255,255,255,.75); }
.acs-fig b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.acs-fig b.pos { color: #86EFAC; } .acs-fig b.neg { color: #FCA5A5; }
.acs-due { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.2); } .acs-due b { color: #D4CCFF; } .acs-due span { font-size: 11px; opacity: .75; }
.acs-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.acs-sum > div { display: flex; flex-direction: column; padding: 10px 18px; border-right: 1px solid var(--line); }
.acs-sum b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.acs-note { margin: 12px 18px 4px; padding: 10px 14px; border-radius: 10px; background: #FFF7ED; border: 1px solid #FED7AA; color: #7C2D12; font-size: 13.5px; line-height: 1.5; }
.acs-note.ok { background: var(--surface-2); border-color: var(--line); color: var(--ink); }

.acs-table { margin-top: 8px; }
.acs-tr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px 96px 104px 76px; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.acs-tr.obl { grid-template-columns: 96px minmax(0, 1fr) 96px 96px 104px 110px 76px; }
.acs-tr .r { text-align: right; white-space: nowrap; }
.acs-th { background: var(--surface-2); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.acs-tf { background: var(--ink); color: #fff; font-weight: 800; border-bottom: 0; } .acs-tl { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.acs-tf .pos { color: #86EFAC; } .acs-tf .neg { color: #FCA5A5; } .acs-tf .acs-v { color: #D4CCFF; }
.acs-date { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.acs-tx { display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
.acs-tx > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.acs-tx b { color: var(--ink); font-weight: 700; } .acs-tx small { color: var(--muted); font-size: 11.5px; } .acs-tx i { color: var(--text-2); font-size: 11.5px; }
.acs-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; flex: none; background: var(--surface-2); }
.acs-badge { display: inline-block; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 4px; vertical-align: middle; }
.acs-badge.due { background: #EFECFF; color: #5A4FC4; } .acs-badge.paid { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.acs-badge.void { background: #FEF2F2; color: #991B1B; }
.acs-obl { background: #F7F5FF; } .acs-obl .acs-tx b { color: #4B3FB4; font-style: italic; }
.acs-void { background: #FDF7F7; color: #A08080; } .acs-void .acs-tx b { text-decoration: line-through; } .acs-was { color: #991B1B !important; }
.acs-dash { color: var(--faint); } .acs-v { color: var(--violet); font-weight: 800; }
.acs-ch { color: #B91C1C; font-weight: 700; } .acs-pa { color: #166534; font-weight: 700; }
.acs-run { font-weight: 800; } .acs .pos { color: #166534; } .acs .neg { color: #B91C1C; }
.acs-head .pos, .acs-tf .pos { color: #86EFAC; } .acs-head .neg, .acs-tf .neg { color: #FCA5A5; }
.acs-docs { display: flex; gap: 6px; flex-wrap: wrap; } .acs-docs a { display: inline-flex; gap: 3px; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.acs-legend { padding: 12px 18px 14px; font-size: 12px; color: var(--text-2); line-height: 1.55; border-top: 1px solid var(--line); background: var(--surface-2); }
.acs-legend p { margin: 0 0 6px; } .acs-legend ul { margin: 0 0 6px 18px; padding: 0; }
.acs-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 2px 24px; } .acs-foot small { color: var(--muted); font-weight: 600; }

/* Phones: each transaction becomes a small card. */
@container (max-width: 700px) {
  .acs-th { display: none; }
  .acs-tr, .acs-tr.obl { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 14px; }
  .acs-tr .acs-tx { grid-column: 1 / -1; order: -1; }
  .acs-tr .acs-date { grid-column: 1; }
  .acs-tr .acs-m { display: none; }
  .acs-tr .r[data-l]::before { content: attr(data-l) ' '; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
  .acs-tf .r[data-l]::before { color: rgba(255,255,255,.7); }
  .acs-tf .acs-tl { grid-column: 1 / -1; }
  .acs-tr .r { text-align: left; }
  .acs-docs { grid-column: 1 / -1; }
  .acs-fig { text-align: left; } .acs-due { border-left: 0; padding-left: 0; }
  .acs-head { gap: 10px 16px; }
}
:root[data-theme="dark"] .acs .pos, :root[data-theme="dark"] .acs-pa { color: #4ADE80; }
:root[data-theme="dark"] .acs .neg, :root[data-theme="dark"] .acs-ch { color: #F87171; }
:root[data-theme="dark"] .acs-obl { background: rgba(107,91,214,.12); } :root[data-theme="dark"] .acs-void { background: rgba(185,28,28,.08); }
:root[data-theme="dark"] .acs-note:not(.ok) { background: rgba(251,146,60,.12); color: #FED7AA; border-color: rgba(251,146,60,.3); }

/* Print: only the statement, letter size, each family on its own page. */
@page { size: letter; margin: 0.45in; }
@media print {
  html.acs-printing *, html.acs-printing *::before, html.acs-printing *::after { animation: none !important; transition: none !important; }
  html.acs-printing, html.acs-printing body { height: auto !important; overflow: visible !important; background: #fff !important; }
  html.acs-printing #app, html.acs-printing #pages { position: static !important; overflow: visible !important; inset: auto !important; height: auto !important; background: #fff !important; }
  html.acs-printing #drawer, html.acs-printing #tabbar, html.acs-printing #overlays, html.acs-printing #toasts, html.acs-printing #loader { display: none !important; }
  html.acs-printing .page:not([data-route="acct-statement"]) { display: none !important; }
  html.acs-printing .page[data-route="acct-statement"] { position: static !important; transform: none !important; animation: none !important; box-shadow: none !important; height: auto !important; overflow: visible !important; }
  html.acs-printing .page[data-route="acct-statement"]::after { display: none !important; }
  html.acs-printing .page-scroll { position: static !important; overflow: visible !important; height: auto !important; padding: 0 !important; }
  html.acs-printing .page-body { padding: 0 !important; }
  html.acs-printing .pg-head, html.acs-printing .pg-hero, html.acs-printing .pg-hero-img, html.acs-printing .ptr,
  html.acs-printing .acs-tools, html.acs-printing .dev-lock-note, html.acs-printing .acs-noprint { display: none !important; }
  html.acs-printing .acs { container-type: normal; color: #000; }
  html.acs-printing .acs-printhead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #1B2159; padding: 0 0 6px; margin-bottom: 10px; color: #1B2159; font-size: 11px; }
  html.acs-printing .acs-printhead b { font-size: 13px; }
  html.acs-printing .card { box-shadow: none !important; border: 1px solid #c9d1df !important; }
  html.acs-printing .acs-card { break-inside: auto; } html.acs-printing .acs-card + .acs-card { break-before: page; }
  html.acs-printing .acs-owed { break-inside: avoid; }
  html.acs-printing .acs-head { background: #fff !important; color: #1B2159; border-bottom: 2px solid #1B2159; }
  html.acs-printing .acs-id h2, html.acs-printing .acs-fig b { color: #1B2159 !important; }
  html.acs-printing .acs-id small, html.acs-printing .acs-fig small, html.acs-printing .acs-due span { color: #555 !important; opacity: 1; }
  html.acs-printing .acs-head .pos, html.acs-printing .acs-tf .pos { color: #166534 !important; } html.acs-printing .acs-head .neg, html.acs-printing .acs-tf .neg { color: #B91C1C !important; }
  html.acs-printing .acs-due { border-left-color: #c9d1df; } html.acs-printing .acs-due b { color: #4B3FB4 !important; }
  html.acs-printing .acs-photo { border-color: #c9d1df; } html.acs-printing .acs-init { background: #1B2159; color: #fff; }
  html.acs-printing .acs-tr { grid-template-columns: 76px minmax(0, 1fr) 72px 72px 80px; gap: 6px; padding: 5px 8px; font-size: 10.5px; break-inside: avoid; }
  html.acs-printing .acs-tr.obl { grid-template-columns: 76px minmax(0, 1fr) 72px 72px 80px 96px; }
  html.acs-printing .acs-tr > :last-child { display: none !important; }   /* Docs: links do nothing on paper */
  html.acs-printing .page, html.acs-printing .page-scroll, html.acs-printing .page-body { background: #fff !important; }
  html.acs-printing .acs-th { display: grid; font-size: 8.5px; }
  html.acs-printing .acs-tr .r { text-align: right; } html.acs-printing .acs-tr .r[data-l]::before { content: none; }
  html.acs-printing .acs-tr .acs-m { display: block; }
  html.acs-printing .acs-tf { background: #fff !important; color: #1B2159; border-top: 2px solid #1B2159; } html.acs-printing .acs-tf .acs-v { color: #4B3FB4; }
  html.acs-printing .acs-ic { display: none; } html.acs-printing .acs-tx small, html.acs-printing .acs-tx i, html.acs-printing .acs-date { font-size: 9.5px; }
  html.acs-printing .acs-docs a { display: none; } html.acs-printing .acs-legend { background: #fff; font-size: 9.5px; break-inside: avoid; }
  html.acs-printing .acs-sum > div { padding: 6px 10px; } html.acs-printing .acs-sum b { font-size: 13px; }
  html.acs-printing .acs-note { font-size: 11px; margin: 8px 10px 2px; padding: 6px 10px; }
  html.acs-printing .acs-obl { background: #F7F5FF !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.acs-printing .acs-void { background: #fff !important; }
}
