/* Billing pages of /next/ (pages/billing.js and pages/billing/*). Only what the shared components in next.css do not already draw: the invoice document
   ("the paper"), the invoice editor's line grid and totals, the timeline, filter bars and a few small helpers. Tokens only; no inline style anywhere
   (the /next/ CSP is style-src 'self'). The paper is always white like real paper (it carries .theme-light), in both themes. */

/* ---------- small helpers (the sub-line, error line, warning word, bar and tag are the shared parts in next.css) ---------- */
.bill-who { display: inline-flex; align-items: center; gap: var(--s-2); min-width: 0; }
.bill-who__name { min-width: 0; overflow-wrap: anywhere; }
.bill-late { color: var(--red); }
.bill-pad { padding: var(--s-2) var(--s-5) var(--s-5); }
.bill-amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bill-filters { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr); gap: var(--s-3); align-items: end; }
.bill-filters--1 { grid-template-columns: minmax(200px, 420px); }
.bill-filters--2 { grid-template-columns: minmax(200px, 420px) minmax(160px, 260px); }
.bill-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 52px; padding: var(--s-2) var(--s-5); border-top: 1px solid var(--line-soft); font-size: var(--t-13); }
.bill-narrow { max-width: 680px; display: flex; flex-direction: column; gap: var(--s-4); }
.bill-actions { align-items: center; }
.bill-actions__gap { flex: 1 1 var(--s-4); }
.bill-bigstatus .status { font-size: var(--t-15); }
.bill-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.bill-kv { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); font-size: var(--t-14); color: var(--ink-2); }
.bill-hint { font-size: var(--t-13); color: var(--muted); }
.bill-section-pad { padding: 0 var(--s-5) var(--s-5); }
.bill-num { font-variant-numeric: tabular-nums; text-align: right; }
.field__control--sm { height: var(--h-sm); border-radius: var(--r); font-size: var(--t-14); padding: 0 10px; }
.field__control.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.field__control[aria-invalid="true"] { border-color: var(--red); }

/* ---------- the invoice document ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.doc__paper { min-width: 0; container-type: inline-size; }
.doc__side { min-width: 0; }
/* The paper follows the invoice design (web/invoice-design-core.js, drawn by paper-core.js): the look is a set of classes on .paper
   (paper--h-plain|rule|band, --t-lines|zebra|boxed, --s-quiet|framed|strong, --a-amount|headings|all, --f-sans|serif|mono, --n-body|mono, --d-comfortable|compact,
   --logo-left|right|center and --logo-s|m|l) and its colours are custom properties set from validated data-c-* attributes (paper.js paint). Sizes follow the PDF
   at about 1.4 pixels per point, so the screen and the printed page look alike. */
.paper { --pp-accent: #19648f; --pp-fill: #19648f; --pp-onfill: #ffffff; --pp-onfillsoft: #d1e0e9; --pp-tint: #eef4f7; --pp-tint2: #dde9ef; --pp-tintline: #8cb2c7;
  --pp-label: #5c6672; --pp-title: #15191e; --pp-headrule: #15191e; --pp-thf: transparent; --pp-tht: #5c6672; --pp-zebra: transparent; --pp-grid: #c9cfd6;
  --pp-ink: #15191e; --pp-ink2: #38404a; --pp-grey: #5c6672; --pp-rule: #d5dae0; --pp-rule-soft: #e6e9ed;
  --pp-font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif; --pp-num: var(--pp-font); --pp-pad: 52px; --pp-gap: 28px; --pp-row: 9px;
  position: relative; max-width: 860px; margin: 0 auto; padding: 48px var(--pp-pad) 30px; background: #ffffff; color: var(--pp-ink); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); font-family: var(--pp-font); font-size: 13px; line-height: 1.45; overflow: hidden; }
.paper--f-serif { --pp-font: "Times New Roman", Times, "Liberation Serif", serif; }
.paper--f-mono { --pp-font: "Courier New", Courier, "Liberation Mono", monospace; }
.paper--n-mono { --pp-num: "Courier New", Courier, "Liberation Mono", monospace; }
.paper--d-compact { --pp-gap: 20px; --pp-row: 5px; font-size: 12.2px; }
.paper--void > :not(.paper__stamp) { opacity: .62; }
.paper__stamp { position: absolute; top: 150px; left: 38%; display: flex; flex-direction: column; align-items: center; padding: 4px 16px; color: #1a7a45; font: 700 44px/1 Helvetica, Arial, sans-serif; letter-spacing: .12em; transform: rotate(-10deg); opacity: .85; pointer-events: none; }
.paper__stamp small { font: 700 11px/1.4 "Courier New", monospace; letter-spacing: .12em; }
.paper__stamp--void { top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); color: #b2382d; font-size: 150px; opacity: .13; }
.paper b, .paper strong { font-weight: 700; }
.paper p { margin: 0; }

/* the letterhead */
.paper__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); }
.paper__brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.paper__logo { display: grid; place-items: center; flex: none; }
.paper__logo img { display: block; max-height: 53px; max-width: 210px; object-fit: contain; }
.paper--logo-s .paper__logo img { max-height: 36px; max-width: 154px; }
.paper--logo-l .paper__logo img { max-height: 76px; max-width: 280px; }
.paper__brandtext { display: flex; flex-direction: column; min-width: 0; }
.paper__brandtext b { font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.paper__brandtext b.paper__caps { font-size: 17.5px; letter-spacing: .14em; text-transform: uppercase; }
.paper__brandtext span { font-size: 12.3px; color: var(--pp-grey); }
.paper--a-all .paper__brandtext b { color: var(--pp-accent); }
.paper__co { display: flex; flex-direction: column; text-align: right; font-size: 11px; line-height: 1.33; color: var(--pp-grey); }
.paper__co b { font-size: 11.8px; color: var(--pp-ink); }
.paper--logo-right .paper__head { flex-direction: row-reverse; }
.paper--logo-right .paper__brand { flex-direction: row-reverse; text-align: right; }
.paper--logo-right .paper__co { text-align: left; }
.paper--logo-center .paper__head { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.paper--logo-center .paper__brand { flex-direction: column; gap: 10px; }
.paper--logo-center .paper__co { flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: center; gap: 0 4px; }
.paper--logo-center .paper__co > * + *::before { content: "·"; margin-right: 4px; }
.paper--h-rule .paper__head { padding-bottom: 16px; border-bottom: 4px double var(--pp-headrule); }
.paper--h-band { padding-top: 0; }
.paper--h-band .paper__head { margin: 0 calc(-1 * var(--pp-pad)); padding: 36px var(--pp-pad) 34px; background: var(--pp-fill); color: var(--pp-onfill); }
.paper--h-band .paper__brandtext b, .paper--h-band .paper__co b { color: var(--pp-onfill); }
.paper--h-band .paper__brandtext span, .paper--h-band .paper__co { color: var(--pp-onfillsoft); }
.paper--h-band .paper__logo { padding: 8px; background: #ffffff; border-radius: 6px; }

/* the title and the amount due */
.paper__titlerow { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); margin-top: calc(var(--pp-gap) + 6px); }
.paper__title { margin: 0; font-size: 36px; font-weight: 400; line-height: 1.1; letter-spacing: -.01em; color: var(--pp-title); }
.paper--h-band .paper__title { font-weight: 700; }
.paper--h-rule .paper__title { letter-spacing: .08em; }
.paper--d-compact .paper__title { font-size: 31px; }
.paper__num { margin-top: 8px; font-size: 13px; color: var(--pp-grey); }
.paper__mono { font-family: var(--pp-num); }
.paper__dot { margin: 0 8px; }
.paper__state { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pp-ink); }
.paper__state--quiet { color: var(--pp-grey); } .paper__state--warn { color: #8a5a00; } .paper__state--bad { color: #b2382d; } .paper__state--ok { color: #1a7a45; }
.paper__hero { display: flex; flex-direction: column; align-items: flex-end; min-width: 240px; text-align: right; }
.paper__hlabel { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pp-grey); }
.paper__hvalue { margin-top: 2px; font-family: var(--pp-num); font-size: 29px; font-weight: 700; line-height: 1.15; color: var(--pp-accent); font-variant-numeric: tabular-nums; }
.paper--d-compact .paper__hvalue { font-size: 25px; }
.paper__hsub { margin-top: 3px; font-size: 11.8px; color: var(--pp-grey); }
.paper--s-framed .paper__hero, .paper--s-strong .paper__hero { padding: 14px 17px 12px; border-radius: 7px; min-width: 280px; }
.paper--s-framed .paper__hero { background: var(--pp-tint); border: 1px solid var(--pp-accent); }
.paper--s-framed .paper__hlabel { color: var(--pp-ink2); }
.paper--s-strong .paper__hero { background: var(--pp-fill); }
.paper--s-strong .paper__hlabel, .paper--s-strong .paper__hsub { color: var(--pp-onfillsoft); }
.paper--s-strong .paper__hvalue { color: var(--pp-onfill); }

/* bill to, ship to and the details */
.paper__parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 258px); gap: 28px; margin-top: var(--pp-gap); }
.paper__party { display: flex; flex-direction: column; min-width: 0; font-size: 12.6px; line-height: 1.3; color: var(--pp-ink2); overflow-wrap: anywhere; }
.paper__pname { font-size: 14px; color: var(--pp-ink); margin-bottom: 2px; }
.paper__h { margin: 0 0 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--pp-label); }
.paper__soft { color: var(--pp-grey); }
.paper__meta { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.paper__meta > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.paper__meta dt { font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--pp-label); white-space: nowrap; }
.paper__meta dd { margin: 0; font-size: 12.6px; text-align: right; overflow-wrap: anywhere; }
.paper__meta dd.paper__strong { font-weight: 700; }
.paper--t-boxed .paper__meta { padding: 8px 10px; border: 1px solid var(--pp-grid); }
.paper--t-boxed.paper--a-all .paper__meta { background: var(--pp-tint); }

/* the lines */
.paper__lines { width: 100%; margin-top: var(--pp-gap); border-collapse: collapse; font-size: 12.9px; }
.paper__lines th { padding: 8px; font-size: 9.8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--pp-tht); text-align: left; white-space: nowrap; background: var(--pp-thf); }
.paper__lines td { padding: var(--pp-row) 8px; vertical-align: top; }
.paper--t-lines .paper__lines th { border-bottom: 1.3px solid var(--pp-headrule); }
.paper--t-lines .paper__lines td { border-bottom: 1px solid var(--pp-rule-soft); }
.paper--t-zebra .paper__lines tbody tr:nth-child(even) td { background: var(--pp-zebra); }
.paper--t-boxed .paper__lines th, .paper--t-boxed .paper__lines td { border: 1px solid var(--pp-grid); }
.paper__lines .is-num { text-align: right; font-family: var(--pp-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper__lines th.paper__tax { color: var(--pp-tht); font-size: 9.8px; }
.paper__lines .paper__tax { text-align: center; font-size: 10px; color: var(--pp-grey); white-space: nowrap; }
.paper__desc { overflow-wrap: anywhere; }
.paper__sub { display: block; margin-top: 2px; font-size: 11px; color: var(--pp-grey); }
.paper__lines td.paper__none { color: var(--pp-grey); text-align: center; padding: var(--s-6); }

/* totals, the pay panel and the thank-you line */
.paper__sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); column-gap: 40px; align-content: start; margin-top: 18px; }
.paper__totals { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
.paper__pay, .paper__thanks { grid-column: 1; }
.paper__t { display: flex; justify-content: space-between; gap: 16px; padding: 4px 8px; font-size: 12.6px; color: var(--pp-ink2); }
.paper__t dt { display: flex; flex-direction: column; }
.paper__t dt small { font-size: 10.4px; color: var(--pp-grey); }
.paper__t dd { margin: 0; font-family: var(--pp-num); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--pp-ink); }
.paper__t--pay, .paper__t--pay dd { color: var(--pp-grey); }
.paper__t--total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--pp-rule); font-weight: 700; color: var(--pp-ink); }
.paper__t--due { align-items: center; margin-top: 8px; padding: 12px 8px; border-top: 1.4px solid var(--pp-ink); font-size: 14.7px; font-weight: 700; color: var(--pp-ink); }
.paper__t--due dd { font-size: 19.6px; font-weight: 700; color: var(--pp-accent); }
.paper--s-framed .paper__t--due { padding: 12px 14px; border: 1.2px solid var(--pp-accent); border-radius: 4px; background: var(--pp-tint); }
.paper--s-strong .paper__t--due { padding: 13px 14px; border: 0; border-radius: 6px; background: var(--pp-fill); color: var(--pp-onfill); }
.paper--s-strong .paper__t--due dd { color: var(--pp-onfill); }
.paper__pay { display: flex; gap: 16px; align-items: flex-start; align-self: start; padding: 14px; border: 1px solid var(--pp-rule); border-radius: 7px; font-size: 11px; color: var(--pp-grey); }
.paper--a-all .paper__pay { background: var(--pp-tint); }
.paper__pay > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.paper__pay b { font-size: 13.7px; color: var(--pp-ink); }
.paper__qr { flex: none; display: block; width: 104px; height: 104px; fill: #15191e; shape-rendering: crispEdges; }
.paper__qr--none { border-radius: 3px; background: var(--pp-rule-soft); }
.paper__url { font-family: "Courier New", Courier, monospace; font-size: 9.3px; color: var(--pp-accent); overflow-wrap: anywhere; }
.paper__thanks { align-self: start; margin-top: 14px; font-size: 13.4px; font-style: italic; color: var(--pp-ink2); }
.paper__thanks--paid { font-style: normal; font-weight: 700; color: #1a7a45; }

/* how to pay, remit to, terms and notes */
.paper__foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; margin-top: var(--pp-gap); padding-top: 12px; border-top: 1px solid var(--pp-rule); font-size: 12px; line-height: 1.45; color: var(--pp-ink2); }
.paper__foot--1 { grid-template-columns: minmax(0, 1fr); }
.paper__foot--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.paper__foot p { white-space: pre-line; overflow-wrap: anywhere; }
.paper__fine { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--pp-rule); font-size: 10.4px; color: var(--pp-grey); }
@container (max-width: 620px) {
  .paper { --pp-pad: 20px; padding: 24px 20px 20px; font-size: 12.5px; }
  .paper--h-band { padding-top: 0; }
  .paper__head, .paper__titlerow { flex-direction: column; align-items: stretch; }
  .paper--logo-right .paper__head { flex-direction: column; }
  .paper__co, .paper--logo-right .paper__co { text-align: left; }
  .paper__hero { align-items: flex-start; text-align: left; min-width: 0; }
  .paper__stamp { top: 110px; font-size: 30px; }
  .paper__parties, .paper__foot, .paper__foot--3, .paper__sum { grid-template-columns: minmax(0, 1fr); }
  .paper__totals, .paper__pay, .paper__thanks { grid-column: 1; grid-row: auto; }
  .paper__pay { margin-top: 14px; }
  .paper__lines thead { display: none; }
  .paper__lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--pp-rule-soft); }
  .paper__lines td { border: 0 !important; padding: 0; background: none !important; }
  .paper__lines td.paper__desc { grid-column: 1 / -1; }
  .paper__lines td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--pp-grey); font-weight: 400; }
  .paper__lines td.paper__desc::before { display: none; }
  .paper__lines .is-num, .paper__lines .paper__tax { text-align: left; }
}

/* ---------- the timeline of a posted invoice ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl__item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: var(--s-3); padding: 0 0 var(--s-4); color: var(--muted); }
.tl__item:last-child { padding-bottom: 0; }
.tl__item::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl__item:last-child::before { display: none; }
.tl__dot { grid-row: 1 / span 2; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--control); background: var(--surface); }
.tl__item.is-on .tl__dot { border-color: var(--green); background: var(--green); }
.tl__word { font-weight: 600; color: var(--ink-2); }
.tl__item.is-on .tl__word { color: var(--ink); }
.tl__note { font-size: var(--t-13); overflow-wrap: anywhere; }
.paylink { margin: 0; padding: var(--s-2) var(--s-3); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r); font-size: var(--t-12); overflow-wrap: anywhere; }
/* invoice attachments (invoice.js attSection): name, size, Download / Remove; wraps on a phone */
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.att-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); border: 1px solid var(--line-soft); border-radius: var(--r); }
.att-row__name { flex: 1 1 160px; min-width: 0; font-size: var(--t-14); overflow-wrap: anywhere; }
.att-row__size { font-size: var(--t-13); color: var(--muted); white-space: nowrap; }

/* ---------- the invoice editor ---------- */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.ed__main { min-width: 0; }
.ed__side { position: sticky; top: calc(var(--top-h) + var(--s-4)); min-width: 0; }
.ed-fields { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ed-saved { font-size: var(--t-13); color: var(--muted); }
.ed-tools { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); padding: 0 var(--s-5) var(--s-4); }
.ed-tools > .field { flex: 1 1 280px; }
.ed-lines { container-type: inline-size; border-top: 1px solid var(--line-soft); }
.ed-lines__head, .ed-line { display: grid; grid-template-columns: 20px minmax(0, 1fr) 92px 120px 112px 150px 76px; gap: var(--s-3); align-items: start; padding: 0 var(--s-5) 0 var(--s-3); }
.ed-lines__head { padding-top: var(--s-2); padding-bottom: var(--s-2); font-size: var(--t-13); color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.ed-lines__head span:nth-child(3), .ed-lines__head span:nth-child(4), .ed-lines__head span:nth-child(5) { text-align: right; }
.ed-line { padding-top: var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.ed-line:last-child { border-bottom: 0; }
.ed-line.is-bad { background: var(--red-bg); }
.ed-line__grip { align-self: stretch; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; border-radius: var(--r-sm); }
.ed-line__grip:hover { color: var(--ink); background: var(--sunk); }
.ed-line.is-dragging { position: relative; z-index: 1; box-shadow: var(--shadow-pop); border-radius: var(--r); }
.ed-line.is-dragging .ed-line__grip { cursor: grabbing; color: var(--ink); }
.ed-lines.is-sorting { user-select: none; cursor: grabbing; }
.ed-line__desc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-line__desc .badge { align-self: flex-start; }
.ed-line__detail { font-size: var(--t-13); color: var(--ink-2); }
.ed-line__lbl { display: none; font-size: var(--t-12); color: var(--muted); }
.ed-line__amt { min-height: var(--h-sm); display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.ed-amt.is-pending { color: var(--ink-2); }
.ed-line__tax { min-height: var(--h-sm); display: flex; flex-direction: column; justify-content: center; font-size: var(--t-13); }
.ed-line__acts { display: grid; grid-template-columns: repeat(2, 36px); grid-template-rows: repeat(2, 36px); grid-auto-flow: column; gap: 4px; justify-content: end; }
.ed-mv { color: var(--muted); }
.ed-mv:hover:not(:disabled) { color: var(--ink); }
.ed-mv:disabled { opacity: .35; }
.ed-mv--down .ico { transform: rotate(180deg); }
.ed-line__err { grid-column: 1 / -1; margin: 0; font-size: var(--t-13); color: var(--red); font-weight: 500; }
.ed-line__err:empty { display: none; }
.ed-empty { padding: var(--s-6) var(--s-5); color: var(--muted); text-align: center; }
.ed-keys { margin: 0; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line-soft); font-size: var(--t-13); color: var(--muted); }
@container (max-width: 899px) {
  .ed-lines__head { display: none; }
  .ed-line { grid-template-columns: 20px repeat(4, minmax(0, 1fr)) 76px; row-gap: var(--s-2); }
  .ed-line__grip { grid-column: 1; grid-row: 1 / 3; }
  .ed-line__desc { grid-column: 2 / 6; grid-row: 1; }
  .ed-line__acts { grid-column: 6; grid-row: 1; }
  .ed-line__qty { grid-column: 2; grid-row: 2; } .ed-line__price { grid-column: 3; grid-row: 2; } .ed-line__amt { grid-column: 4; grid-row: 2; } .ed-line__tax { grid-column: 5 / 7; grid-row: 2; }
  .ed-line__lbl { display: block; margin-bottom: 4px; }
  .ed-line__amt { align-items: flex-start; justify-content: flex-start; }
  .ed-line__tax { justify-content: flex-end; }
}
@container (max-width: 520px) {
  .ed-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 76px; padding-left: var(--s-4); padding-right: var(--s-4); }
  .ed-line__grip { display: none; }
  .ed-line__desc { grid-column: 1 / 3; }
  .ed-line__acts { grid-column: 3; grid-row: 1; }
  .ed-line__qty { grid-column: 1; grid-row: 2; } .ed-line__price { grid-column: 2; grid-row: 2; }
  .ed-line__amt { grid-column: 1; grid-row: 3; } .ed-line__tax { grid-column: 2 / 4; grid-row: 3; }
  .ed-keys { padding-left: var(--s-4); padding-right: var(--s-4); }
}
/* touch screens: no dragging (Move up and Move down do it in one tap) */
@media (pointer: coarse) { .ed-line__grip { visibility: hidden; } }
/* the quote editor (pages/billing/quote.js): the first column numbers the lines instead of a drag handle */
.ed-line__grip.qe-num { cursor: default; font-size: var(--t-13); font-variant-numeric: tabular-nums; }
.ed-line__grip.qe-num:hover { background: none; color: var(--muted); }
@media (pointer: coarse) { .ed-line__grip.qe-num { visibility: visible; } }
/* the hint under a field that may hold a reset; a reset button that does not apply keeps its room, so nothing moves while saving */
.ed-note.is-bad { color: var(--red); font-weight: 500; }
.ed-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ed-link:hover { color: var(--accent-hover); }
.ed-link.is-off { visibility: hidden; }
.ed-addr { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5); }
.ed-addr__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); min-height: 24px; }
.ed-addr__title { margin: 0; font-size: var(--t-14); font-weight: 600; }
.ed-addr__head .ed-link { font-size: var(--t-13); }
.ed-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5); }
/* what stops posting: one calm card for every line that waits for a tax decision (or for a tax area), the choices once, line by line on request */
.ed-taxall { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--amber-line); border-radius: var(--r-lg); }
.ed-taxall__head { display: flex; align-items: flex-start; gap: var(--s-3); }
.ed-taxall__icon { flex: none; margin-top: 1px; color: var(--amber); }
.ed-taxall__words { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-taxall__title { margin: 0; font-size: var(--t-15); font-weight: 600; color: var(--ink); }
.ed-taxall__line { margin: 0; font-size: var(--t-14); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.ed-taxall__acts { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); }
.ed-taxall__acts > .ed-link { align-self: center; font-size: var(--t-13); padding: 6px 0; }
.ed-taxall__more { align-self: flex-start; font-size: var(--t-13); min-height: 32px; }
.ed-taxeach { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.ed-taxeach__row { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); }
.ed-taxeach__row:last-child { border-bottom: 0; padding-bottom: 0; }
.ed-taxeach__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--t-14); font-weight: 500; overflow-wrap: anywhere; }
.ed-seg { display: flex; flex-wrap: nowrap; width: 100%; }
.ed-seg .seg__item { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 6px; font-size: var(--t-13); white-space: normal; text-align: center; line-height: 1.15; }
.ed-seg .seg__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-seg .seg__item[aria-busy="true"] { opacity: .6; }
.ed-postbtns { justify-content: flex-end; }
.ed-postbtns .btn { flex: 1 1 auto; }

/* ---------- totals (the editor's side) ---------- */
.totals { margin: 0; font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: 6px 0; font-size: var(--t-14); }
.totals dt { display: flex; flex-direction: column; color: var(--ink-2); min-width: 0; }
.totals dt small { font-size: var(--t-12); color: var(--muted); }
.totals dd { margin: 0; white-space: nowrap; }
.totals__quiet dt, .totals__quiet dd { color: var(--muted); }
.totals > .totals__big { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--t-17); font-weight: 600; }
.totals__big dt { color: var(--ink); }

/* ---------- drawers: record payment, Pax8 lines, credit memo ---------- */
.rp-mode { display: flex; flex-direction: column; gap: 6px; }
.rp-lines, .px-list, .cm-lines { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.rp-line, .px-sub, .cm-line { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: var(--s-3); align-items: center; padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line-soft); }
.rp-line:first-child, .px-sub:first-child, .cm-line:first-child { border-top: 0; }
.rp-line .field__label, .cm-line .field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rp-line .field__control, .cm-line .field__control { height: var(--h-sm); text-align: right; }
.rp-line__text { display: flex; flex-direction: column; min-width: 0; }
.px-sub { grid-template-columns: minmax(0, 1fr) 220px; }
.px-list > .check { padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line-soft); }
.px-list > .check:first-child { border-top: 0; }

/* ---------- lists and steps used by several Billing pages ---------- */
.bill-steps { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.bill-steps li { display: flex; align-items: center; gap: var(--s-2); height: var(--h-sm); padding: 0 var(--s-3); border-radius: 18px; background: var(--sunk); color: var(--ink-2); font-size: var(--t-14); }
.bill-steps li[aria-current="step"] { background: var(--selected); color: var(--selected-ink); font-weight: 600; }
.bill-steps li.is-done { color: var(--green); }
.bill-steps .badge { min-width: 22px; }
.bill-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: var(--s-4); border: 2px dashed var(--control); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); text-align: center; cursor: pointer; }
.bill-drop:hover, .bill-drop.is-over { border-color: var(--accent); background: var(--hover); }
.bill-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.bill-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.bill-prog { width: 100%; height: 10px; }
.bill-prog__track { fill: var(--sunk); }
.bill-prog__fill { fill: var(--accent-fill); }
.ws { display: flex; flex-direction: column; }
.ws__f { display: grid; grid-template-columns: 44px 72px minmax(0, 1.4fr) minmax(180px, 1fr) 140px; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line-soft); container-type: inline-size; }
.ws__f:first-child { border-top: 0; }
.ws__f.is-done { background: var(--green-bg); }
.ws__line { font-family: var(--mono); font-size: var(--t-13); color: var(--muted); }
.ws__label { min-width: 0; font-size: var(--t-14); }
.ws__label small { display: block; color: var(--muted); font-size: var(--t-12); }
.ws__value { display: flex; align-items: center; gap: var(--s-2); justify-content: flex-end; font-variant-numeric: tabular-nums; font-weight: 600; }
.ws__value .field__control { height: var(--h-sm); max-width: 150px; text-align: right; }
.ws__how { grid-column: 3 / -1; font-size: var(--t-13); color: var(--ink-2); }
.ws__how summary { cursor: pointer; color: var(--accent); min-height: 32px; display: flex; align-items: center; }
.ws__how ul { margin: 6px 0 0; padding-left: var(--s-4); }
.ws__f .check { padding: 0; min-height: 0; }
@media (max-width: 899px) {
  .ws__f { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; padding: var(--s-3) var(--s-4); }
  .ws__line { grid-column: 2; }
  .ws__label, .ws__value, .ws__state, .ws__how { grid-column: 2; }
  .ws__value { justify-content: flex-start; }
}

/* ---------- buttons that look like text or like a list row ---------- */
.bill-linkbtn { display: inline-flex; align-items: center; min-height: var(--h-sm); padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bill-linkbtn:hover { color: var(--accent); }
button.bill-rowbtn { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.bill-stepbtn { display: inline-flex; align-items: center; gap: var(--s-2); height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

/* ---------- the monthly run (pages/billing/run.js): steps, progress, the review rows, the sticky action bar and the row drawer's fixes ---------- */
.run-month { min-width: 220px; }
.run-steps { margin: var(--s-1) 0 var(--s-4); }
.run-panel { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.run-panel p { margin: 0; }
.run-panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.run-panel__head .bill-hint { flex: 1 1 auto; }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-row { display: flex; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line-soft); min-width: 0; }
.run-row:first-child { border-top: 0; }
.run-row.is-held { background: var(--surface-2); }
.run-row.is-held .run-row__main, .run-row.is-held .run-row__amt { opacity: .6; }
.run-row__pick { flex: none; }
.run-row__pick .check { min-height: 0; padding: 0; }
.run-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.run-row__main:hover .run-row__name { color: var(--accent); }
.run-row__who { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.run-row__names { display: flex; flex-direction: column; min-width: 0; }
.run-row__name { font-weight: 600; overflow-wrap: anywhere; }
.run-row__lines { padding-left: 44px; font-size: var(--t-13); color: var(--ink-2); overflow-wrap: anywhere; }
.run-row__tags { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 44px; }
.run-row__amt { flex: 0 0 160px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.run-row__state { flex: 0 0 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.run-bar { position: sticky; bottom: var(--s-3); z-index: 5; margin: 0 0 var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.run-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); }
.run-bar__btns { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.run-bar__hint { flex: 1 1 260px; margin: 0; font-size: var(--t-13); color: var(--muted); }
.run-fixes { display: flex; flex-direction: column; gap: var(--s-2); }
.run-fix { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); background: var(--surface); border: 1px solid var(--red-line); border-left-width: 4px; border-radius: var(--r-md); font-size: var(--t-14); }
.run-fix--warn { border-color: var(--amber-line); }
.run-fix--info { border-color: var(--line); }
.run-fix .btn-row, .run-fix .bill-hint, .run-fix .note { margin: 0; }
.run-fix__form { display: flex; flex-direction: column; gap: var(--s-2); }
.run-fix__why { margin: 0; padding-left: var(--s-5); font-size: var(--t-13); color: var(--ink-2); }
.run-fix__why li + li { margin-top: 2px; }
.run-drawer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0; font-size: var(--t-14); color: var(--ink-2); }
.run-lines { list-style: none; margin: 0; padding: 0; }
.run-lines li { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); padding: var(--s-2) var(--s-5); border-top: 1px solid var(--line-soft); font-size: var(--t-14); }
.run-lines li:first-child { border-top: 0; }
.run-lines__desc { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.run-lines__totals { padding: var(--s-2) var(--s-5) var(--s-4); border-top: 1px solid var(--line-soft); }
.run-outcomes { list-style: none; margin: 0; padding: 0; }
.run-outcomes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: var(--t-14); }
.run-outcomes__note { flex: 1 1 100%; font-size: var(--t-13); color: var(--muted); }
.run-outcomes__title { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-1) 0; font-size: var(--t-14); }
.run-notdue > summary { display: flex; align-items: center; gap: var(--s-2); min-height: var(--h); padding: var(--s-2) var(--s-5); font-weight: 600; cursor: pointer; }
.run-notdue__list { list-style: none; margin: 0; padding: 0 0 var(--s-2); }
.run-notdue__list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); padding: var(--s-2) var(--s-5); border-top: 1px solid var(--line-soft); font-size: var(--t-14); }
.run-notdue__list li a { color: var(--ink); }
@media (max-width: 719px) {
  .run-month { min-width: 0; width: 100%; }
  .run-panel { padding: var(--s-3) var(--s-4); }
  .run-row { flex-wrap: wrap; padding: var(--s-3) var(--s-4); }
  .run-row__main { flex: 1 1 calc(100% - 56px); }
  .run-row__lines, .run-row__tags { padding-left: 0; }
  .run-row__amt { flex: 1 1 40%; order: 3; align-items: flex-start; text-align: left; }
  .run-row__state { flex: 1 1 40%; order: 4; align-items: flex-end; text-align: right; }
  .run-bar { bottom: calc(var(--tab-h) + var(--s-2) + env(safe-area-inset-bottom, 0px)); }
  .ua-kb .run-bar { bottom: var(--s-2); }
  .run-bar__btns, .run-bar__btns .btn { flex: 1 1 auto; }
  .run-lines li, .run-lines__totals { padding-left: var(--s-4); padding-right: var(--s-4); }
  .run-notdue > summary, .run-notdue__list li { padding-left: var(--s-4); padding-right: var(--s-4); }
}

/* ---------- the agreement editor's lines ---------- */
.ag-lines { display: flex; flex-direction: column; gap: var(--s-3); }
.ag-line { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface-2); }
.ag-line__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

/* ---------- the ST-100 worksheet: the value field's own label is the row's label ---------- */
.ws__value .field { flex: 1 1 auto; }
.ws__value .field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws__how summary { list-style: none; }
.ws__how summary::-webkit-details-marker { display: none; }
.ws__how summary::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .12s var(--ease); }
.ws__how[open] summary::before { transform: rotate(45deg); }

/* ---------- page widths ---------- */
@media (max-width: 1099px) {
  .doc, .ed { grid-template-columns: minmax(0, 1fr); }
  .ed__side { position: static; }
}
@media (max-width: 719px) {
  .bill-filters, .bill-filters--1, .bill-filters--2 { grid-template-columns: minmax(0, 1fr); }
  .bill-more { padding: var(--s-2) var(--s-4); }
  .rp-line, .cm-line, .px-sub { grid-template-columns: minmax(0, 1fr); }
  .bill-actions .btn { flex: 1 1 auto; }
}

/* ---------- print: an invoice prints as its document only ---------- */
@media print {
  .bill .ph, .bill .tabs, .bill-actions, .doc__side, .bill > .banner { display: none !important; }
  .doc { display: block; }
  .paper { --pp-pad: 0px; box-shadow: none; border: 0; max-width: none; padding: 0; }
  .ws-print .ws__how summary { display: none; }
}

/* ---------- compact rows: a status and an amount on the right of a simple list row ---------- */
.bill-trail { display: inline-flex; align-items: center; gap: var(--s-3); white-space: nowrap; }
.bill-trail .bill-amt { min-width: 88px; text-align: right; }
.ed__side .facts, .doc__side .facts { grid-template-columns: 92px minmax(0, 1fr); }

/* ---------- setup pages: the catalog, tax setup, online payments, Pax8 (pages/billing/items.js, tax.js, paysettings.js, pax8.js) ---------- */
.bill-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.bill-list__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line-soft); min-width: 0; }
.bill-list__row:first-child { border-top: 0; }
.bill-list__row > span:first-child { min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.sheet__body .bill-list__row { padding-left: 0; padding-right: 0; }
.ps-copy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r); min-width: 0; }
.ps-copy .mono { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; font-size: var(--t-13); }
.ps-fee { margin: 0; padding: 0; border: 0; min-width: 0; }
.ps-fee legend { padding: 0; margin-bottom: var(--s-2); font-size: var(--t-14); font-weight: 600; }
.bill-pre { margin: 0; padding: var(--s-3); max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r); font-size: var(--t-12); white-space: pre-wrap; overflow-wrap: anywhere; }
.bill-steps-list { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-14); }

/* ---------- the invoice designer (pages/billing/design.js): the choices at the left, the live paper at the right; stacked on a phone ---------- */
.dz { --dz-brand: #19648f; display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.dz__left, .dz__right { min-width: 0; }
.dz__controls { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.dz__sticky { position: sticky; top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.dz__previewhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.dz__previewhead .field { min-width: 220px; flex: 1 1 220px; }
.dz__preview { min-width: 0; container-type: inline-size; padding: var(--s-4); background: var(--sunk); border-radius: var(--r-lg); max-height: calc(100vh - 190px); overflow: auto; }
.dz__preview.is-scaled .paper { width: 860px; max-width: none; margin: 0; }
.dz__paper { min-width: 0; }
.dz-note { margin: 0 0 var(--s-2); }
.dz-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.dz-bar__state { margin-right: auto; font-size: var(--t-14); color: var(--muted); }
.dz-choice { display: flex; flex-direction: column; gap: var(--s-2); }
.dz-choice__label { font-size: var(--t-14); font-weight: 600; color: var(--ink); }
.dz-choice .seg { align-self: flex-start; }
.dz-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-3); }
.dz-preset { display: flex; flex-direction: column; gap: 4px; padding: var(--s-2); text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line-btn); border-radius: var(--r-md); font: inherit; cursor: pointer; }
.dz-preset:hover { border-color: var(--control); }
.dz-preset.is-on { border-color: var(--accent-fill); box-shadow: 0 0 0 1px var(--accent-fill); }
.dz-preset b { font-size: var(--t-14); }
.dz-preset > span:last-child { font-size: var(--t-12); color: var(--muted); line-height: 1.35; }
.dz-preset[disabled] { cursor: default; }
/* the little page of each preset: five strokes drawn in its own way (header, title, amount, table, total) */
.dz-thumb { position: relative; display: block; height: 74px; margin-bottom: 4px; background: #ffffff; border: 1px solid #e3e6ea; border-radius: 5px; overflow: hidden; }
.dz-thumb i { position: absolute; display: block; border-radius: 1px; }
.dz-thumb i:nth-child(1) { left: 8px; top: 8px; width: 34%; height: 5px; background: #15191e; }
.dz-thumb i:nth-child(2) { left: 8px; top: 20px; width: 26%; height: 7px; background: #c9cfd6; }
.dz-thumb i:nth-child(3) { right: 8px; top: 19px; width: 26%; height: 8px; background: var(--dz-brand); }
.dz-thumb i:nth-child(4) { left: 8px; right: 8px; top: 36px; height: 18px; background: repeating-linear-gradient(#ffffff 0 5px, #e6e9ed 5px 6px); border-top: 1.5px solid #15191e; }
.dz-thumb i:nth-child(5) { right: 8px; bottom: 7px; width: 36%; height: 7px; border-top: 1.5px solid #15191e; }
.dz-thumb--classic i:nth-child(1) { left: 22%; right: 22%; width: auto; height: 4px; box-shadow: 0 6px 0 -1px #15191e; }
.dz-thumb--classic i:nth-child(3) { background: #ffffff; border: 1.5px solid var(--dz-brand); }
.dz-thumb--classic i:nth-child(4) { border: 1px solid #b7bfc8; background: repeating-linear-gradient(#ffffff 0 5px, #b7bfc8 5px 6px); }
.dz-thumb--classic i:nth-child(5) { border: 1.5px solid var(--dz-brand); }
.dz-thumb--bold i:nth-child(1) { left: 0; top: 0; width: 100%; height: 15px; background: var(--dz-brand); border-radius: 0; }
.dz-thumb--bold i:nth-child(4) { border-top: 5px solid var(--dz-brand); background: repeating-linear-gradient(#ffffff 0 5px, #eef1f6 5px 10px); }
.dz-thumb--bold i:nth-child(5) { height: 9px; border: 0; background: var(--dz-brand); }
.dz-upload { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.dz-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-upload label.is-disabled { opacity: .5; pointer-events: none; }
.dz-color__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3); }
.dz-color__pick { width: 52px; height: var(--h); padding: 3px; border: 1px solid var(--line-btn); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.dz-color__hex { width: 112px; }
.dz-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
.dz-swatch { --sw: #19648f; width: 28px; height: 28px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px var(--line-btn); cursor: pointer; }
.dz-swatch.is-on { box-shadow: 0 0 0 2px var(--ink); }
.dz-shows { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
@media (max-width: 1099px) {
  .dz { grid-template-columns: minmax(0, 1fr); }
  .dz__sticky { position: static; }
  .dz__preview { max-height: none; }
}
@media (max-width: 719px) {
  .dz__preview { padding: 0; background: none; }
  .dz-preset > span:last-child { display: none; }
  .dz-thumb { height: 48px; }
  .dz-thumb i:nth-child(4) { top: 28px; height: 10px; }
}

/* automatic payment reminders (pages/billing/reminders-auto.js): the five steps, and the sample of the wording */
.rem-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.rem-step { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); }
.rem-step__when { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rem-step__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--t-13); }
.rem-step__words > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-step__subject { font-weight: 600; }
.rem-sample { padding: var(--s-3); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r); }
.rem-sample p { margin: 0 0 var(--s-2); }
.rem-sample__subject { font-weight: 600; overflow-wrap: anywhere; }
.rem-sample__message { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .rem-step { grid-template-columns: minmax(0, 1fr) auto; }
  .rem-step__words { grid-column: 1 / -1; grid-row: 2; }
  .rem-step__words > span { white-space: normal; }
}
