/* =============================================================================
   Inventory (Inventory audit, 13 Nov 2026) — the Item Card list and window, the
   item and stock adjustment forms, the Forklifts and Pallet Trucks registers,
   the machine window, and the Shipments list and window.

   Its own sheet, not acc-app.css: that one is exported to web/. Every rule is
   scoped to the ledger (body.acc-fullscreen), and reads acc-app.css's --acc-*
   palette rather than restating it.
   ============================================================================= */

/* ---------- the lists: one width per column, so every figure is on screen ---------- */
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) table.acctable{table-layout:fixed;width:100%}
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) .acctable td{max-width:none;vertical-align:middle}
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) .acctable td:not(.t-num):not(.t-act):not(.t-rn){white-space:normal;overflow-wrap:anywhere}
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) .acctable :is(td,th).t-act{white-space:nowrap}
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) .acctable .t-rn{white-space:nowrap}
/* A code, a VIN and a number are read one character at a time: they never break mid-way. */
/* (As specific as the voucher sheet's wrapping rule, which would otherwise win on a phone.) */
body.acc-fullscreen .it-screen .acctable td.t-ltr:not(.t-num):not(.t-act):not(.t-rn){white-space:nowrap;overflow-wrap:normal;overflow:hidden;text-overflow:ellipsis}
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) .acctable .accpill{white-space:nowrap}
body.acc-fullscreen .it-screen .acctable td.it-type .accpill{margin-block:1px}
/* The filters sit beside the search box and wrap under it on a narrow screen. */
body.acc-fullscreen .it-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
body.acc-fullscreen .it-filters select{min-width:150px}
/* A second, smaller line under a cell's value: the plate under the VIN, the model
   under the item, the supplier's invoice under our bill, the sales invoice under
   the price, the bill of lading under the container, "received" under a date. */
body.acc-fullscreen .un-sub{display:block;margin-top:2px;font-size:calc(11.5px * var(--acc-fs, 1));
  font-weight:500;color:var(--acc-ink-mute);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.acc-fullscreen .t-num .un-sub{text-align:end}
body.acc-fullscreen .un-screen tr.un-tr{cursor:pointer}
body.acc-fullscreen .un-screen td.un-vin b{font-variant-numeric:tabular-nums;letter-spacing:.01em}
/* The total row's caption carries the count; it stays on one line. */
body.acc-fullscreen :is(.it-screen,.un-screen,.sh-screen) tr.t-total > td:first-of-type{white-space:nowrap}

/* ---------- the item window ---------- */
body.acc-fullscreen .mdl--itview .accview > :is(.acckpis,.it-kpis){grid-column:1 / -1}
body.acc-fullscreen .mdl--itview .it-kpis{margin:0}
body.acc-fullscreen .mdl--itview .it-doc{white-space:normal;overflow-wrap:anywhere}
body.acc-fullscreen .mdl--itview table.acctable{table-layout:fixed;width:100%}
body.acc-fullscreen .it-tally{display:flex;flex-wrap:wrap;gap:8px;padding:12px 16px 4px}
body.acc-fullscreen .it-tally__b{display:inline-flex;align-items:baseline;gap:6px;padding:4px 10px;border-radius:999px;
  border:1px solid var(--acc-line);background:var(--acc-band, #eff4fa);font-size:calc(12px * var(--acc-fs, 1));color:var(--acc-ink-soft)}
body.acc-fullscreen .it-tally__b b{color:var(--acc-ink);font-variant-numeric:tabular-nums}
/* The window's buttons wrap rather than squeeze; Close keeps its place at the start. */
body.acc-fullscreen :is(.mdl--itview,.mdl--unview) .mdl__f--win{flex-wrap:wrap;row-gap:8px}
body.acc-fullscreen :is(.mdl--itview,.mdl--unview) .mdl__f--win > button{white-space:nowrap;min-width:0;padding-inline:16px}
body.acc-fullscreen :is(.mdl--itview,.mdl--unview) .mdl__f--win > .accwin__close{min-width:88px}
body.acc-fullscreen .mdl--unview .accview > :is(.acckpis,.accview__meta){grid-column:1 / -1}
/* How the cost is built and the documents, side by side; one under the other on a narrow screen. */
body.acc-fullscreen .mdl--unview .accview > .acccard{grid-column:span 6;margin:0}
@media (max-width:900px){ body.acc-fullscreen .mdl--unview .accview > .acccard{grid-column:1 / -1} }

/* ---------- the forms ---------- */
/* Quantities and money read left to right in either language, aligned as figures are. */
body.acc-fullscreen .mdl--vch-stock :is(#sa-qty,#sa-cost,#sa-amt),
body.acc-fullscreen .mdl--vch-ship #sh-fee{text-align:end;font-variant-numeric:tabular-nums}
body.acc-fullscreen :is(.mdl--vch-item,.mdl--vch-stock,.mdl--vch-unit) .mdl__f{flex-wrap:wrap;row-gap:8px}
/* The shipment form's other actions (Enter VINs, Receive…) are quieter than Save:
   one primary button per form. Enter VINs read as plain text; Receive was a second
   solid red button beside Save. */
body.acc-fullscreen .mdl--vch-ship .mdl__f{flex-wrap:wrap;row-gap:8px}
body.acc-fullscreen .mdl--vch-ship .mdl__f .accbtn{
  min-height:40px;padding:0 18px;border-radius:10px;font-weight:600;cursor:pointer;
  background:var(--acc-surface, #fff);color:var(--acc-ink-2);box-shadow:inset 0 0 0 1px var(--acc-line-firm, #b9c4d4);border:0;
}
body.acc-fullscreen .mdl--vch-ship .mdl__f .accbtn:hover{background:var(--acc-hover)}
body.acc-fullscreen .mdl--vch-ship .mdl__f .accbtn.accbtn--p{
  background:color-mix(in srgb, var(--win-accent, var(--acc-accent)) 8%, #fff);
  color:var(--win-accent, var(--acc-accent-deep));
  box-shadow:inset 0 0 0 1.5px var(--win-accent, var(--acc-accent-deep));
}
body.acc-fullscreen .mdl--vch-ship .sh-dup{margin:0 24px 12px}

@media (max-width:760px){
  body.acc-fullscreen .it-filters,
  body.acc-fullscreen .it-filters select{width:100%;min-width:0}
  /* On a phone the lists keep their columns and scroll sideways, as the journal does. */
  body.acc-fullscreen .it-screen table.acctable{table-layout:auto;min-width:860px}
  body.acc-fullscreen :is(.un-screen,.sh-screen) .acccard{overflow-x:auto}
  body.acc-fullscreen .un-screen table.acctable{table-layout:auto;min-width:980px}
  body.acc-fullscreen .sh-screen table.acctable{table-layout:auto;min-width:900px}
  body.acc-fullscreen .mdl--itview table.acctable{table-layout:auto;min-width:760px}
  body.acc-fullscreen .mdl--vch-ship .sh-dup{margin:0 12px 10px}
}
