/* css/pages/desk.css
   Owns: the Desk pages' own looks: Chemicals, Customers (and the printed statement), the Front desk
   (js/pages/desk/*.js); the shared parts are in kit.css, the narrower screens' in css/mobile.css. */

/* Tanks and alarms: 6-8 tiles a row at 1920, 4-5 at 1366. */
.chem .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.chem-pos { font-size: var(--fs-xs); color: var(--muted); }
.chem-bay + .chem-bay { margin-top: var(--s3); }
#chemInvSec.counting .dt td[data-col="tanks"], #chemInvSec.counting .dt th:last-child { display: none; }

/* Customers: the list (560 px, its own scroll) beside the open account (the rest, its own scroll); one under the other
   on narrow screens. */
.cus { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cus-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5) 0; }
.cus-top .sync-line { flex: 1 1 400px; margin: 0; }
.cus-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 560px minmax(0, 1fr); }
.cus-list { min-width: 0; overflow-y: auto; padding: var(--s3) var(--s4) var(--s6) var(--s5); border-right: 1px solid var(--line); }
.cus-detail { min-width: 0; overflow-y: auto; padding: var(--s3) var(--s5) var(--s6); }
.cus-reports { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s3) var(--s5) var(--s6); max-width: 1200px; }
.cus-pick { padding-top: var(--s6); }
.cus-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.cus-head h2 { margin: 0; font-size: 1.3rem; }
.big-num { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.lost-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); margin-bottom: var(--s3); }
.stmt-bar { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.stmt-month { display: flex; align-items: center; gap: var(--s2); color: var(--muted); }
.acct-statement > h3 { margin-top: 0; }
table.stmt { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
table.stmt th, table.stmt td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--row-line); vertical-align: top; }
table.stmt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media print {
  /* the monthly statement alone, black on white */
  body.printing-statement * { visibility: hidden; }
  body.printing-statement #cusStatement, body.printing-statement #cusStatement * { visibility: visible; color: var(--black) !important; background: none !important; }
  body.printing-statement #cusStatement { position: absolute; left: 0; top: 0; width: 100%; }
  body.printing-statement .noprint { display: none !important; }
}

/* Front desk: the till and the card search on top; the bays (4 across at 1920, 2 by 2 at 1366) beside the comps and
   what needs attention. */
.fd-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.fd-till { display: flex; align-items: center; gap: var(--s2); }
.fd-till .page-status { margin: 0; }
.fd-find input { height: var(--ctl-h); min-width: 22em; padding: 0 var(--s2); background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.fd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); align-items: start; }
.fd-side .kit-card + .kit-card { margin-top: var(--s4); }
.fd .tiles.fd-tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s3); }
.fd .tiles > .bay-tile { cursor: default; gap: var(--s2); padding: var(--s2) var(--s3) var(--s3); }
.fd .tiles > .bay-tile:hover { background: var(--panel); }
.bay-still { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--black); cursor: pointer; }
.bay-still:disabled { cursor: default; }
.bay-still img { display: block; width: 100%; height: 100%; object-fit: fill; }   /* fill: the stills are the whole 16:9 frame squeezed */
.bay-still img:not([src]) { visibility: hidden; }
.bay-still-none { position: absolute; inset: 0; display: grid; place-content: center; color: var(--muted); font-size: var(--fs-sm); }
.bay-display { margin: 0; min-height: 1.3em; font-family: var(--font-mono); color: var(--text-2); }
.bay-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--muted); }
.bay-acts { display: flex; flex-wrap: wrap; gap: var(--s1); }
.comps .comp { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }

/* Front desk, the counter (pages/desk/frontdesk.js): the sales buttons big, a card per bay with one plain word for its
   state, then the recent washes beside the comps. Bay service (pages/desk/bayservice.js) keeps the tiles above. */
.fd-sell { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.tbtn.fd-big { height: 52px; padding: 0 var(--s5); font-size: var(--fs-lg); font-weight: 600; }
.fd-sell .fd-find { flex: 1 1 18em; display: flex; }
.fd-sell .fd-find input { flex: 1; height: 52px; min-width: 0; font-size: var(--fs-lg); }
.fd-baycards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.fd-bay { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "still body" "acts acts"; gap: var(--s2) var(--s3);
  padding: var(--s3); background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--lvl-mid); border-radius: var(--radius); }
.fd-bay.t-ok { border-left-color: var(--lvl-good); }
.fd-bay.t-busy { border-left-color: var(--accent); }
.fd-bay.t-warn { border-left-color: var(--warn); }
.fd-bay.t-err { border-left-color: var(--lvl-bad); box-shadow: inset 0 0 0 1px var(--lvl-bad); }
.fd-bay-still { grid-area: still; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--black); cursor: pointer; }
.fd-bay-still:disabled { cursor: default; }
.fd-bay-still img { display: block; width: 100%; height: 100%; object-fit: fill; }
.fd-bay-still img:not([src]) { visibility: hidden; }
.fd-bay-body { grid-area: body; min-width: 0; }
.fd-bay-name { margin: 0; font-size: var(--fs-base); font-weight: 600; color: var(--text-2); }
.fd-bay-word { margin: 2px 0 0; font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.fd-bay.t-ok .fd-bay-word { color: var(--ok-fg); }
.fd-bay.t-warn .fd-bay-word { color: var(--warn-fg); }
.fd-bay.t-err .fd-bay-word { color: var(--err-fg); }
.fd-bay-sub { margin: 2px 0 0; min-height: 1.2em; font-size: var(--fs-sm); color: var(--muted); }
.fd-bay-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: var(--s2); }
.fd-bay-acts .tbtn { flex: 1 1 auto; height: 40px; font-size: var(--fs-base); }
.fd-counter .fd-grid { grid-template-columns: minmax(0, 1fr) 380px; }
.fd-counter .fd-grid > .kit-card { margin: 0; }
.fd-washes { margin: 0; }
.fd-wash { display: grid; grid-template-columns: 5.5em 9em minmax(0, 1fr) auto; align-items: center; gap: var(--s2);
  padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.fd-wash:last-child { border-bottom: 0; }
.fd-wash-at { font-variant-numeric: tabular-nums; color: var(--text-2); }
.fd-wash-bay { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-wash.odd .fd-wash-what { color: var(--warn-fg); }
.fd-wash-acts { display: flex; gap: var(--s1); }
.fd-comp { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.fd-comp:last-child { border-bottom: 0; }
.fd-comp-acts { display: flex; gap: var(--s1); flex: none; }
.comps .comp:last-child { border-bottom: 0; }
.comp-acts { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: 4px; }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
/* The till's count (actions/acw.js countBox): a box per bill, two to a row; the running total under them. */
.till-count { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
.till-total { margin: var(--s1) 0 var(--s2); }

/* Bay service › Card declines */
.cd-runs { margin: 0; }
.cd-run { padding: var(--s1) 0; border-bottom: 1px solid var(--line); }
.cd-run:last-child { border-bottom: 0; }
.cd-head { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.cd-at { font-variant-numeric: tabular-nums; color: var(--text-2); }
.cd-what { color: var(--text-2); }
.cd-run.multi .cd-what b { color: var(--warn-fg); }
.cd-paid { color: var(--ok-fg, inherit); }
