/* =============================================================================
   Invoices (Invoices audit, 12 Nov 2026) — the invoice form's line grid, the
   invoice window and the list's "days late".

   The form and the window wear the vouchers' clothes (acc-voucher.css: .mdl--vch,
   .vch-grid, .vch-nav, .vch-screen); this sheet only adds what an invoice has and
   a voucher does not — an item, a machine, a quantity and a price on every line.

   Its own sheet, not acc-app.css: that one is exported to web/. Every rule is
   scoped to the ledger (body.acc-fullscreen).
   ============================================================================= */

/* ---------- the form's line grid ----------
   Item and machine get shares of the dialog, so "Zoomlion Forklift 3 Ton 2 Stage
   4m" and a chassis number are readable rather than cut at 150px; the figures get
   fixed widths, wide enough for $1,000,000. */
@media (min-width:761px){
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-item{width:20%}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-unit{width:72px}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-qty{width:78px}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-rate{width:124px}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-disc{width:78px}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-vin{width:18%}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-net{width:116px}
  body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-c-del{width:46px}
}
body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-amt{
  text-align:end;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;
  direction:ltr;unicode-bidi:isolate;color:var(--acc-ink);
}
/* A forklift line sells one machine: its quantity is fixed, and looks it. */
body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-qty[readonly]{background:var(--acc-band, #eff4fa);color:var(--acc-ink-soft)}
body.acc-fullscreen .mdl--vch-invoice .vch-grid--inv .ln-unitsel:disabled{background:var(--acc-band, #eff4fa)}

/* ---------- days late ----------
   Under the due date in the list, beside it in the window: an overdue invoice
   says by how much, in the colour the Overdue pill already uses. */
body.acc-fullscreen .inv-late{
  display:inline-block;margin-inline-start:6px;padding:1px 7px;border-radius:999px;
  font-size:calc(11px * var(--acc-fs, 1));font-weight:600;line-height:1.5;white-space:nowrap;
  color:var(--acc-red, #b42318);background:var(--acc-red-soft, #fef3f2);
}
body.acc-fullscreen .acctable small.inv-late{display:table;margin:3px 0 0 auto}
body.acc-fullscreen.acc-rtl .acctable small.inv-late{margin:3px auto 0 0}

/* ---------- the list's filter ---------- */
body.acc-fullscreen .inv-screen .inv-filter select{min-width:220px}

/* ---------- the invoice window ---------- */
/* An empty Payments card is a sentence, not an empty table. */
body.acc-fullscreen .inv-view > .accf > .accempty{
  height:100%;min-height:96px;display:grid;place-items:center;text-align:center;
  border:1px dashed var(--acc-line-firm, #b9c4d4);border-radius:var(--acc-r, 10px);
  color:var(--acc-ink-mute);background:var(--acc-surface, #fff);padding:16px;
}
/* Up to eight actions on one line: each button as wide as its words, none
   squeezed onto two lines; on a narrow window the row wraps instead. */
body.acc-fullscreen .mdl--invview .mdl__f--win{flex-wrap:wrap;row-gap:8px}
body.acc-fullscreen .mdl--invview .mdl__f--win > button{white-space:nowrap;min-width:0;padding-inline:16px}
body.acc-fullscreen .mdl--invview .mdl__f--win > .accwin__close{min-width:88px}

@media (max-width:760px){
  body.acc-fullscreen .inv-view > .accf{grid-column:1 / -1}
}
