/* The Rates card (ticket 2026-10-18, part 6; owner 2026-11-13: "change this receipt format from this preview and load page also", answered
   "Plain card, no receipt look"). It was drawn as a printed receipt - a perforated top, a torn foot, a rubber stamp, the amount in words. It is
   now a flat card like the others, on the load page and in the quick-peek drawer: a header (RATES, the invoice number, the invoice date), a muted
   small-caps label column against a right-aligned mono figure column, one hairline before what is owed, the margin on its own tint.
   This file is still the ONE place the receipt colours are written down: services/pdf.py reads the light values of the tokens below for the
   printed and emailed payment receipt (reportlab cannot read CSS rules, only these values), so those documents keep their paper, navy,
   stamp and dash colours. On screen the card uses only the ink, muted, edge, mono and margin tints; the paper, the navy and the stamp
   tokens are for the PDF. */
:root {
  --rc-paper: #FBFAF7;
  --rc-ink: #1d1f2b;
  --rc-body: #3a3d4d;
  --rc-muted: #7d8193;
  --rc-dash: #a3a8b8;
  --rc-edge: #d9dee6;
  --rc-navy: #1f2034;
  --rc-stamp: #d61f33;
  --rc-pos: #e2f4ec;
  --rc-neg: #fdecef;
  --rc-pos-ink: #0f7b5f;
  --rc-neg-ink: #b42318;
  --rc-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
html[data-bs-theme="dark"] {
  --rc-paper: #1d1b19;
  --rc-ink: #f1ede6;
  --rc-body: #d5d0c7;
  --rc-muted: #a39e94;
  --rc-dash: #6f6a60;
  --rc-edge: #34302b;
  --rc-navy: #12121a;
  --rc-stamp: #ff7480;
  --rc-pos: #173a2d;
  --rc-neg: #3f1f24;
  --rc-pos-ink: #5fd3a8;
  --rc-neg-ink: #ff8f99;
}

.rc { color: var(--rc-ink); }
.rc-sheet { padding-bottom: .85rem; }
/* the header: RATES, the invoice number, the invoice date, over a hairline */
.rc-strip { display: flex; align-items: center; gap: .6rem; padding: .65rem .95rem; border-bottom: 1px solid var(--rc-edge); color: var(--rc-ink); min-width: 0; }
.rc-strip-title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.rc-strip a.rc-strip-title, .rc-strip a.rc-strip-title:hover { color: var(--rc-ink); text-decoration: none; }
.rc-strip a.rc-strip-title .bi { font-size: .7rem; opacity: .6; margin-left: .2rem; }
.rc-strip-no { margin-left: auto; font-family: var(--rc-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.rc-strip-date { font-family: var(--rc-mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--rc-muted); white-space: nowrap; }
.rc-body { padding: .7rem .95rem 0; }
.rc-alert { display: flex; gap: .45rem; align-items: flex-start; margin-bottom: .55rem; padding: .4rem .55rem; border-radius: .5rem; font-size: 11.5px; font-weight: 600;
  background: var(--tat-amber-tint); color: var(--tat-amber); }
/* a row: the label in muted small caps on the left, the figure in mono on the right */
.rc-row { display: flex; align-items: baseline; gap: .5rem; padding: .22rem 0; min-width: 0; }
.rc-label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-amt { margin-left: auto; font-family: var(--rc-mono); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--rc-ink); text-align: right; white-space: nowrap; }
.rc-row.rc-sub { padding-left: .8rem; }
.rc-row.rc-sub .rc-label { text-transform: none; letter-spacing: .01em; font-size: 11.5px; font-weight: 500; color: var(--rc-body); }
.rc-row.rc-sub .rc-amt { font-size: 12px; font-weight: 500; }
.rc-row.rc-qp .rc-amt { color: var(--rc-pos-ink); }
.rc-chip { display: inline-block; margin-left: .35rem; padding: 0 .35rem; border-radius: .3rem; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  vertical-align: .08em; background: var(--rc-edge); color: var(--rc-body); }
.rc-chip.is-paid { background: var(--rc-pos); color: var(--rc-pos-ink); }
.rc-chip.is-invoiced { background: var(--tat-blue-tint); color: var(--tat-blue-ink); }
.rc-chip.is-cancelled { background: var(--rc-neg); color: var(--rc-neg-ink); }
.rc-chip.is-ar { background: var(--tat-blue-tint); color: var(--tat-blue-ink); }
.rc-chip.is-ap { background: var(--rc-pos); color: var(--rc-pos-ink); }
.rc-chip.is-tbd { background: var(--tat-amber-tint); color: var(--tat-amber); }
.rc-dash { border-top: 1px solid var(--rc-edge); margin: .5rem 0 .3rem; }
/* the total: heavier, under the one hairline */
.rc-total { padding-top: .15rem; }
.rc-total .rc-label { font-weight: 800; color: var(--rc-ink); letter-spacing: .1em; }
.rc-total .rc-amt { font-weight: 800; font-size: 14.5px; }
.rc-margin { margin: .35rem -.45rem 0; padding: .1rem .45rem; border-radius: .55rem; background: var(--tat-mist); }
.rc-margin.is-pos { background: var(--rc-pos); }
.rc-margin.is-neg { background: var(--rc-neg); }
.rc-margin .rc-amt { font-size: 16px; font-weight: 800; }
.rc-margin.is-pos .rc-amt { color: var(--rc-pos-ink); }
.rc-margin.is-neg .rc-amt { color: var(--rc-neg-ink); }
.rc-pct { display: inline-block; margin-left: .45rem; padding: .02rem .4rem; border-radius: 1rem; font-size: 10.5px; font-weight: 700; vertical-align: .1em; background: color-mix(in srgb, currentColor 13%, transparent); }
.rc-note.is-warn { color: var(--tat-amber); }
.rc-note { margin: .35rem 0 0; font-size: 11.5px; font-weight: 600; color: var(--rc-neg-ink); }
