/* ===== Invoices: the three templates and the designer (Settings › Invoices) =====
   The invoice is a .doc (app.css), so it prints with every document's rules. The palette arrives as --inv-accent (fills, rules),
   --inv-text (accent dark enough to read on the tint and on white), --inv-soft (pale tint) and --inv-on (text over a fill) on the .doc itself.
   Fills print as shown: colour on a colour printer and in a saved PDF. */

/* ---------- Shared invoice layout (Classic is this plus the boxed .doc tables) ---------- */
.doc.inv, .doc.inv * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc.inv .inv-head { margin-top: 0; }
.doc.inv .inv-from { width: 40%; vertical-align: top; }
.doc.inv .inv-biz { font-weight: 700; font-size: 12px; text-transform: uppercase; }
.doc.inv .inv-title { text-align: center; vertical-align: middle; }
.doc.inv .inv-title h1 { margin: 0; color: var(--inv-text); }
.doc.inv .inv-form { font-size: 9px; }
.doc.inv .inv-no { width: 26%; text-align: right; vertical-align: middle; }
.doc.inv .inv-no .barcode-big { text-align: right; font-size: 20px; }
.doc.inv .inv-meta td { min-width: 0.9in; }
.doc.inv .inv-parties td { width: 33.33%; }
.doc.inv .inv-lines th { background: var(--inv-soft); color: var(--inv-text); white-space: nowrap; }
.doc.inv .inv-lines td.nowrap { white-space: nowrap; }
/* A long unbroken word (a spec string, a part number typed as one token) breaks inside the description, so Amount stays on the page. */
.doc.inv .inv-lines td.inv-desc { overflow-wrap: anywhere; }
.doc.inv .inv-note { color: #333; margin-top: 1px; }
.doc.inv .inv-bottom { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; break-inside: avoid; page-break-inside: avoid; }
.doc.inv .inv-pay { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.doc.inv .inv-totals { width: 40%; flex: none; margin-top: 0; }
.doc.inv .inv-total td { border-top-width: 2px; }
.doc.inv .inv-balance td { background: var(--inv-soft); color: var(--inv-text); font-size: 12px; }
.doc.inv .inv-box { border: 1px solid #000; padding: 4px 6px; }
.doc.inv .inv-notes, .doc.inv .inv-footer { margin-top: 8px; break-inside: avoid; }
.doc.inv .inv-thanks { margin-top: 10px; text-align: center; font-weight: 700; font-size: 12px; color: var(--inv-text); white-space: pre-line; }

/* ---------- Classic: the boxed form; the palette colours the title, the column heads and the balance ---------- */
.doc.inv-classic .inv-head { border-top: 3px solid var(--inv-accent); }

/* ---------- Modern: a colour bar, open layout, filled column heads and balance ---------- */
.doc.inv-modern { border-top: 8px solid var(--inv-accent); }
.doc.inv-modern th, .doc.inv-modern td { border: 0; }
.doc.inv-modern .label { color: var(--inv-text); letter-spacing: .05em; }
.doc.inv-modern .inv-head td { padding: 4px 0 12px; vertical-align: top; }
.doc.inv-modern .inv-title { text-align: right; padding-right: 14px; }
.doc.inv-modern .inv-title h1 { font-size: 30px; letter-spacing: .08em; line-height: 1; }
.doc.inv-modern .inv-form { color: #767670; margin-top: 4px; }
.doc.inv-modern .inv-no { width: 22%; vertical-align: top; }
.doc.inv-modern .inv-no .barcode-big { font-size: 22px; line-height: 30px; }
.doc.inv-modern .inv-meta { border-top: 1px solid #d6d6d0; }
.doc.inv-modern .inv-meta + .inv-meta { border-top: 0; margin-top: 0; }
.doc.inv-modern .inv-meta td { padding: 6px 10px 6px 0; }
.doc.inv-modern .inv-parties { border-top: 1px solid #d6d6d0; border-bottom: 1px solid #d6d6d0; }
.doc.inv-modern .inv-parties td { padding: 8px 10px 8px 0; }
.doc.inv-modern .inv-lines { margin-top: 12px; }
.doc.inv-modern .inv-lines th { background: var(--inv-accent); color: var(--inv-on); padding: 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.doc.inv-modern .inv-lines td { padding: 6px; border-bottom: 1px solid #e2e2dc; }
.doc.inv-modern .inv-totals td { padding: 4px 6px; border-bottom: 1px solid #e2e2dc; }
.doc.inv-modern .inv-balance td { background: var(--inv-accent); color: var(--inv-on); font-size: 13px; padding: 6px; border: 0; }
.doc.inv-modern .inv-box { border: 0; background: var(--inv-soft); padding: 8px 10px; }
.doc.inv-modern .inv-thanks { font-size: 13px; }
.doc.inv-modern .doc-foot { border-top-color: #d6d6d0; }

/* ---------- Compact: small type, hairlines, no boxes: the most lines on a page ---------- */
.doc.inv-compact { font-size: 10px; line-height: 1.25; }
.doc.inv-compact table { margin-top: 5px; }
.doc.inv-compact th, .doc.inv-compact td { border: 0; border-bottom: 1px solid #cfcfc9; padding: 2px 4px; }
.doc.inv-compact .label { font-size: 8px; color: var(--inv-text); }
.doc.inv-compact .inv-head td { border-bottom: 2px solid var(--inv-accent); padding: 0 4px 6px 0; vertical-align: bottom; }
.doc.inv-compact .doc-logo { height: 30px; margin-bottom: 4px; }
.doc.inv-compact .inv-biz { font-size: 11px; }
.doc.inv-compact .inv-title { text-align: right; }
.doc.inv-compact .inv-title h1 { font-size: 16px; letter-spacing: .06em; }
.doc.inv-compact .inv-no .barcode-big { font-size: 15px; }
.doc.inv-compact .mono { font-size: 10px; }
.doc.inv-compact .inv-meta td, .doc.inv-compact .inv-parties td { border-bottom: 0; padding: 2px 8px 2px 0; }
.doc.inv-compact .inv-parties { border-bottom: 1px solid #cfcfc9; }
.doc.inv-compact .inv-lines th { background: none; color: var(--inv-text); border-bottom: 1.5px solid var(--inv-accent); font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; }
.doc.inv-compact .inv-lines td { padding: 2px 4px; }
.doc.inv-compact .inv-bottom { margin-top: 5px; }
.doc.inv-compact .inv-totals td { padding: 1px 4px; border-bottom: 0; }
.doc.inv-compact .inv-total td { border-top: 1px solid #cfcfc9; }
.doc.inv-compact .inv-balance td { background: none; color: var(--inv-text); border-top: 1.5px solid var(--inv-accent); font-size: 11px; }
.doc.inv-compact .inv-box { border: 0; border-left: 2px solid var(--inv-accent); padding: 1px 6px; }
.doc.inv-compact .inv-thanks { text-align: left; font-size: 10px; margin-top: 6px; }
.doc.inv-compact .doc-foot { margin-top: 8px; }

/* On a phone the invoice page and the portal copy stack the header and scroll the line table on its own; the designer's preview stays a page. */
@media (max-width: 600px) {
  .doc-actions ~ .doc.inv .inv-head td { display: block; width: auto; text-align: left; padding-right: 0; }
  .doc-actions ~ .doc.inv .inv-no .barcode-big { text-align: left; }
  .doc-actions ~ .doc.inv .inv-lines-wrap { overflow-x: auto; } .doc-actions ~ .doc.inv .inv-lines { min-width: 540px; }
  .doc-actions ~ .doc.inv .inv-bottom { flex-direction: column; align-items: stretch; } .doc-actions ~ .doc.inv .inv-totals { width: 100%; }
  .doc-actions ~ .doc.inv .inv-meta td { display: inline-block; border: 0; }
}

/* ---------- Designer: form | live preview ---------- */
.invd { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 16px; align-items: start; }
.invd-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.invd-preview { position: sticky; top: 12px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.invd-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invd-bar select { max-width: 100%; flex: 1 1 200px; height: 32px; }
.invd-paper { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; overflow: hidden auto; max-height: calc(100vh - 90px); }
.invd-doc { width: 8.5in; }
.invd-doc .doc { margin: 0; padding: .5in; overflow: visible; max-width: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.invd-doc.mail { width: auto; zoom: 1; }
.invd-mailhead { background: var(--surface); border: 1px solid var(--border); border-bottom: 0; padding: 8px 12px; font-size: 13px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.invd-mail { background: #fff; color: #1b1b19; padding: 24px 16px; border: 1px solid var(--border); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; overflow-x: auto; }
.invd-mail a { color: #1f5f8b; }
.invd-actions { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; background: var(--bg); border-top: 1px solid var(--border); }

/* Template choice: a drawn thumbnail of each, in the chosen palette's accent. */
.invd-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; --inv-accent: #1b1b19; }
.invd-tpl { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.invd-tpl input { position: absolute; opacity: 0; width: 0; height: 0; }
.invd-tpl:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.invd-tpl:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.invd-tpl-name { font-weight: 600; font-size: 13px; }
.invd-thumb { display: flex; flex-direction: column; gap: 3px; aspect-ratio: 8.5 / 7; padding: 6px; margin-bottom: 4px; background: #fff; border: 1px solid #c8c8c2; }
.invd-thumb b { display: block; height: 5px; background: #e2e2dc; }
.invd-thumb .h { height: 14px; background: #fff; }
.invd-thumb .tot { width: 45%; margin-left: auto; background: #cfcfc9; }
.invd-thumb.t-classic .h { border: 1px solid #555; border-top: 2px solid var(--inv-accent); background: linear-gradient(var(--inv-accent), var(--inv-accent)) center / 30% 4px no-repeat #fff; }
.invd-thumb.t-classic .m, .invd-thumb.t-classic .r { background: #fff; border: 1px solid #888; height: 6px; }
.invd-thumb.t-classic .th { border: 1px solid #888; height: 6px; background: color-mix(in srgb, var(--inv-accent) 18%, #fff); }
.invd-thumb.t-modern { border-top: 4px solid var(--inv-accent); }
.invd-thumb.t-modern .h { background: linear-gradient(#bbb, #bbb) left center / 34% 4px no-repeat, linear-gradient(var(--inv-accent), var(--inv-accent)) right center / 36% 7px no-repeat, #fff; }
.invd-thumb.t-modern .th { background: var(--inv-accent); height: 6px; }
.invd-thumb.t-modern .tot { background: var(--inv-accent); }
.invd-thumb.t-compact { gap: 2px; }
.invd-thumb.t-compact .h { height: 9px; border-bottom: 2px solid var(--inv-accent); background: linear-gradient(#bbb, #bbb) left top / 30% 3px no-repeat, linear-gradient(var(--inv-accent), var(--inv-accent)) right top / 22% 4px no-repeat, #fff; }
.invd-thumb.t-compact b:not(.h) { height: 3px; }
.invd-thumb.t-compact .th { background: #fff; border-bottom: 1.5px solid var(--inv-accent); height: 4px; }

/* Palette choice: a swatch (accent and its tint) and the name. */
.invd-pals { display: flex; flex-wrap: wrap; gap: 6px; }
.invd-pal { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; background: var(--surface); }
.invd-pal input { position: absolute; opacity: 0; width: 0; height: 0; }
.invd-pal i { width: 22px; height: 22px; border-radius: 2px; background: linear-gradient(135deg, var(--a) 55%, var(--s) 55%); border: 1px solid rgba(0, 0, 0, .15); }
.invd-pal:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); font-weight: 600; }
.invd-pal:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

#invd-jump { display: none; }
@media (max-width: 1100px) {
  .invd { grid-template-columns: minmax(0, 1fr); }
  .invd-preview { position: static; scroll-margin-top: 12px; }
  .invd-paper { max-height: none; }
  #invd-jump { display: inline-flex; }
}
.invd-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
@media (max-width: 600px) {
  .invd-tpls { gap: 6px; } .invd-tpl { padding: 6px; } .invd-tpl .small { display: none; }
  .invd-paper { padding: 6px; }
}
@media print { .invd-form, .invd-bar { display: none !important; } .invd { display: block; } .invd-paper { border: 0; padding: 0; background: none; } .invd-doc { zoom: 1 !important; } }

/* ===== Getting paid: payments, deposits and slips, credits, statements, the portal's pay page, expenses, receipts ===== */
/* Payments and credits on an invoice (above the printed document, never printed). */
.inv-settle { max-width: 8.5in; margin: 0 auto 16px; }
.settle-list { list-style: none; margin: 0; padding: 0; }
.settle-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.settle-list li:last-child { border-bottom: 0; }
/* Receive payment */
.pay-total { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.pay-total .field { width: 180px; } .pay-total input[name=amount] { font-size: 16px; font-weight: 600; }
.pay-sum { font-size: 13px; padding-bottom: 7px; min-height: 20px; }
.pay-total + .field.check { margin-top: 10px; }
.notice-pick, .notice-use, .billable-note, .portal-note { margin-top: 12px; padding: 8px 12px; border: 1px solid var(--info); border-left-width: 3px; border-radius: var(--radius); background: var(--info-soft); font-size: 13px; line-height: 1.45; }
.notice-pick .row { gap: 8px; margin-top: 6px; } .notice-pick .row > span { flex: 1 1 220px; min-width: 0; }
.billable-note ul { list-style: none; margin: 6px 0 8px; padding: 0; } .billable-note li { margin: 2px 0; }
.portal-note { max-width: 8.5in; margin: 0 auto 12px; } .portal-note > div + div { margin-top: 4px; } .portal-note svg { vertical-align: -3px; }
.more-box { margin-top: 12px; } .more-box > summary { cursor: pointer; color: var(--link); font-size: 13px; width: max-content; max-width: 100%; }
.pay-detail dl.props { grid-template-columns: max-content minmax(0, 1fr); }
/* Deposits */
.dep-pick td:first-child, .dep-pick th:first-child { text-align: center; }
.dep-pick input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; }
.dep-other { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 120px auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.dep-total { margin-right: auto; font-weight: 600; font-size: 14px; align-self: center; }
.doc-side { max-width: 8.5in; margin: 16px auto 0; }
/* The deposit slip and the credit memo: plain boxed documents like the rest. */
.doc .slip-totals { width: 45%; margin-left: auto; } .doc .slip-total td { border-top-width: 2px; font-size: 12px; }
.doc .barcode-big { display: block; }
/* The portal's pay page */
.remit-box + .remit-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.remit-box h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.remit-box .addr, .addr.pre { white-space: pre-line; overflow-wrap: anywhere; }
.remit-box .pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.remit-warn { display: flex; gap: 6px; align-items: flex-start; margin: 12px 0 0; } .remit-warn svg { flex: none; margin-top: 1px; }
@media (max-width: 600px) {
  .dep-other { grid-template-columns: minmax(0, 1fr) 110px auto; } .dep-other > .field:first-child { grid-column: 1 / -1; }
  .pay-total .field { width: 100%; }
  .doc .slip-totals { width: 100%; }
  .settle-list li { padding: 8px 12px; }
}
/* Expenses: one block per line (category, amount, what it was, line, the category's question, bill to). */
.exp-h { margin: 18px 0 8px; font-size: 14px; }
.exp-line { display: grid; grid-template-columns: minmax(0, 2fr) 130px minmax(0, 2fr) minmax(0, 1.4fr) auto; grid-template-areas: "cat amt desc cls del" "more more more more more"; gap: 8px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.exp-line:first-child { border-top: 0; padding-top: 0; }
.exp-line > .field:nth-child(1) { grid-area: cat; } .exp-line .exp-amt { grid-area: amt; } .exp-line .exp-desc { grid-area: desc; } .exp-line > .field:nth-child(4) { grid-area: cls; }
.exp-line .exp-more { grid-area: more; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; } .exp-line .exp-del { grid-area: del; margin-top: 20px; }
.exp-more > div:empty { display: none; } .exp-more .field { width: 260px; max-width: 100%; } .exp-line:not(:has(.exp-more > div:not(:empty))) { row-gap: 0; }
.exp-receipt .row { gap: 8px; } .exp-receipt select { max-width: 100%; flex: 1 1 260px; } .exp-receipt .fc-grid { margin-top: 8px; }
.rc-mini { width: 36px; height: 36px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
/* The receipt inbox: big buttons to snap, then the picture and the quick fields; tiles for the list. */
.rc-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.rc-big { min-height: 48px; padding: 0 18px; font-size: 15px; flex: 1 1 220px; justify-content: center; }
.rc-ready { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.rc-ready .form-actions { grid-column: 1 / -1; margin-top: 0; }
.rc-pick[hidden], .rc-ready[hidden], .rc-progress[hidden] { display: none; }
.rc-preview img { width: 100%; max-height: 220px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.rc-progress { grid-column: 1 / -1; } .rc-progress .fc-track { display: block; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; } .rc-progress i { display: block; height: 100%; width: 0; background: var(--primary); }
.rc-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .rc-fields .rc-note { grid-column: 1 / -1; }
.rc-snap-card { margin-bottom: 16px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rc-tile { display: flex; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); min-width: 0; }
.rc-tile:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface-2); }
.rc-thumb { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; } .rc-meta > * { overflow: hidden; text-overflow: ellipsis; }
.rc-type { font: 700 12px/1.2 var(--font); color: var(--text-2); letter-spacing: .04em; }
.rc-type.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; font-size: 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.rc-pic { text-align: center; } .rc-big-img { max-width: 100%; max-height: 70vh; border-radius: var(--radius-sm); background: #fff; }
.rc-acts { gap: 8px; }
@media (max-width: 860px) {
  .exp-line { grid-template-columns: minmax(0, 1fr) 120px auto; grid-template-areas: "cat amt del" "desc desc desc" "cls cls cls" "more more more"; } .exp-more .field { width: 100%; }
  .exp-line .exp-del { margin-top: 20px; }
}
@media (max-width: 600px) {
  .rc-ready { grid-template-columns: minmax(0, 1fr); } .rc-preview img { max-height: 260px; }
  .rc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-grid { grid-template-columns: minmax(0, 1fr); }
  .btn.rc-big { flex: 1 1 100%; }
}
/* Phone: the date and method ride under the customer; long buttons wrap; the Apply inputs stay on screen. */
.cash-phone { display: none; }
.btn.wrap { height: auto; min-height: 32px; padding-top: 6px; padding-bottom: 6px; line-height: 1.3; white-space: normal; text-align: center; max-width: 100%; }
th.pay-apply { width: 130px; }
@media (max-width: 600px) {
  .cash-phone { display: block; }
  th.pay-apply { width: 104px; }
}
td.cash-status { white-space: nowrap; }
table.data td [data-inv] { width: 100%; min-width: 72px; }
@media (max-width: 600px) {
  table.data td.cash-no .mono { white-space: nowrap; }
  td.cash-status { white-space: normal; } td.cash-status .badge { white-space: normal; text-align: left; }
}

/* ---------- Lists that download and page, invoice and statement batches, the bills list ---------- */
/* A batch (Print selected, Print all statements) is one document: one invoice or statement per printed page, spaced apart on screen. */
.doc-batch > .doc + .doc { margin-top: 24px; }
@media print {
  .doc-batch > .doc { page-break-after: always; break-after: page; }
  .doc-batch > .doc:last-child { page-break-after: auto; break-after: auto; }
  .doc-batch > .doc + .doc { margin-top: 0; }
}
/* A paged list dims while the next page loads, so a slow answer never looks like an empty list. */
table.data.lt-loading, .lt-loading table.data { opacity: .55; transition: opacity .15s; }
.lt-pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lt-pager .btn[disabled] { opacity: .5; }
/* The invoice date range and customer ride in the list's toolbar beside Filter; on a phone each gets its own line. */
.inv-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inv-range input[type=date] { width: 150px; }
.inv-range select, .inv-range .combo, .inv-range .ref-wrap { flex: 0 0 240px; width: 240px; min-width: 0; }
.stmt-date, .stmt-actions { flex-wrap: wrap; gap: 8px; margin: 0 0 12px; align-items: center; }
.stmt-card .card-body > p:first-child { margin-top: 0; }
.ap-from-po { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.ap-from-po[hidden] { display: none; }
.ap-chips { flex-wrap: wrap; gap: 8px 12px; }
@media (max-width: 600px) {
  .inv-range { flex: 1 1 100%; }
  .inv-range .inline-field { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .inv-range input[type=date] { width: 100%; min-width: 0; }
  .inv-range select, .inv-range .combo, .inv-range .ref-wrap { flex: 1 1 100%; width: 100%; }
  .lt-csv { flex: 1 1 auto; }
  .stmt-actions .btn { flex: 1 1 100%; }
}
