/* Inventory: one shared stylesheet (design 2026-11-18 "Visual system"). Light mode only. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/InterVariable.2bf3d951bf9d.woff2") format("woff2");
}

:root {
  --ink: #111111;
  --text-2: #3b3b3b;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --line-2: #d0d0d0;
  --wash: #f6f6f6;
  --wash-2: #efefef;
  --bar: #0b0b0b;
  --page: #ffffff;
  --menu: #fafafa;
  --ok: #107c41;
  --ok-bg: #e9f5ee;
  --error: #c42b1c;
  --error-bg: #fdecea;
  --warn: #8a5a00;
  --warn-bg: #fff4e0;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px;
  --radius: 6px;
  --radius-card: 8px;
  --bar-h: 48px;
  --menu-w: 220px;
  --base: 15px;
  --control-h: 40px;
  --button-h: 36px;
  --row-h: 34px;
  --row-font: 13px;
  --font: "Inter", system-ui, sans-serif;
  color-scheme: light;
}

/* ---------- Elements ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 var(--base)/1.5 var(--font);
}
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.25; }
h1 { font-size: 24px; margin: 0 0 var(--s4); }
h2 { font-size: 18px; margin: var(--s6) 0 var(--s3); }
h3 { font-size: 15px; margin: var(--s5) 0 var(--s2); }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s4); padding-left: var(--s5); }
li { margin: var(--s1) 0; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
strong, b { font-weight: 600; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Tables: compact by default; .touch pages and .table-touch get tablet rows */
table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s4); font-variant-numeric: tabular-nums; }
th, td { height: var(--row-h); padding: var(--s1) 10px; font-size: var(--row-font); text-align: left; vertical-align: middle; }
th {
  font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
td { border-bottom: 1px solid var(--line); }
th.num, td.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
td form { margin: 0; }

/* Forms: labels above fields, fields full width up to 32rem */
form { margin: 0 0 var(--s4); }
label { display: block; color: var(--ink); font-size: 14px; font-weight: 500; margin: 0 0 var(--s3); }
input, select, textarea, button { font: inherit; color: inherit; }
:where(input:not([type=checkbox], [type=radio], [type=hidden], [type=submit], [type=button], [type=file]), select, textarea) {
  display: block; width: 100%; max-width: 32rem; min-height: var(--control-h); margin-top: var(--s1);
  padding: 0 var(--s3); background: var(--page); color: var(--ink); font-size: var(--base); font-weight: 400;
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
textarea { min-height: 96px; padding: var(--s2) var(--s3); }
input::placeholder, textarea::placeholder { color: var(--muted); }
:where(input, select, textarea):focus-visible { border-color: var(--ink); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 0 var(--s2) 0 0; accent-color: var(--ink); vertical-align: -3px; }
input[type=file] { display: block; margin-top: var(--s1); font-size: 14px; }
label:has(> input[type=checkbox], > input[type=radio]) { display: flex; align-items: center; font-weight: 400; }
.helptext, form .helptext { display: block; color: var(--muted); font-size: 13px; margin-top: var(--s1); }
p > label { margin-bottom: var(--s1); }
p:has(> label) { margin-bottom: var(--s4); }
.errorlist, .error { color: var(--error); font-size: 13px; }
.errorlist { list-style: none; padding: 0; margin: var(--s1) 0 var(--s2); }
.errorlist li { margin: 0; }
/* GET forms are search / filter rows: fields side by side */
form[method=get] { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
form[method=get] :where(input:not([type=checkbox], [type=radio], [type=hidden]), select) { width: auto; min-width: 10rem; flex: 0 1 12rem; margin: 0; }

/* Buttons: secondary by default; .btn-primary black fill */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: var(--button-h); padding: 0 var(--s4); border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--page); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; vertical-align: middle;
}
button:hover, .btn:hover { background: var(--wash); }
button:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b2b2b; }
.btn-danger { color: var(--error); }
.btn-big { height: 48px; padding: 0 22px; font-size: 16px; }

/* ---------- Page frame ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4);
  background: var(--bar); color: #fff; font-size: 14px;
}
.app-bar a { color: #fff; text-decoration: none; }
.app-name { display: flex; align-items: center; gap: var(--s2); font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.app-logo { display: block; height: 28px; width: auto; }
.app-label { font-size: 13px; font-weight: 500; opacity: .8; }
.app-bar .chip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #2a2a2a; color: #eee;
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-bar .sp { flex: 1; }
.app-bar .user-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
.avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink); font-size: 12px; font-weight: 600;
}
.app-bar form { margin: 0; }
.app-bar button { height: 32px; padding: 0 var(--s3); background: transparent; border-color: #3a3a3a; color: #fff; font-size: 13px; }
.app-bar button:hover { background: #222; }
.app-bar :focus-visible { outline-color: #fff; }
.menu-toggle { display: inline-flex; width: 40px; padding: 0; margin-left: calc(-1 * var(--s2)); }
.app-bar .menu-toggle { border-color: transparent; }
.menu-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

.app-shell { display: flex; min-height: calc(100vh - var(--bar-h)); }
.app-menu {
  flex: none; width: var(--menu-w); padding: var(--s2) 0 var(--s6);
  background: var(--menu); border-right: 1px solid var(--line); font-size: 14px;
}
.app-menu .grp {
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: var(--s4) 18px 6px;
}
.app-menu a {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 15px;
  color: var(--text-2); text-decoration: none; border-left: 3px solid transparent;
}
.app-menu a:hover { background: var(--wash); color: var(--ink); }
.app-menu a.on { background: var(--wash-2); color: var(--ink); font-weight: 600; border-left-color: var(--ink); }
.app-menu a:focus-visible { outline-offset: -2px; }
.app-menu svg {
  flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; opacity: .8;
}
.app-menu a.on svg { opacity: 1; }
.app-menu.closed { display: none; }  /* wide screens: auto-hidden after 30 s (static/js/menu.js) */

.app-content { flex: 1; min-width: 0; max-width: 80rem; padding: var(--s5) 28px 48px; overflow-x: auto; }

body.wide .app-content { max-width: none; }  /* list pages that use the whole content width */
body.wide .table-wrap table { width: 100%; }
.btn-sm { min-height: 30px; padding: 2px 10px; font-size: 13px; }

/* Content hierarchy: crumb -> title -> meta -> command bar -> content */
.page-head { margin-bottom: var(--s2); }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: var(--s1); }
.crumb a { color: var(--muted); }
.page-title { font-size: 24px; font-weight: 600; margin: 0 0 2px; }
.page-meta { font-size: 13px; color: var(--muted); margin: 0 0 var(--s3); }
.cmd-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  padding: var(--s2) 0 14px; margin-bottom: var(--s4); border-bottom: 1px solid var(--line);
}
.cmd-bar form { margin: 0; }
.card { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--s4); margin-bottom: var(--s4); }
.card > :last-child { margin-bottom: 0; }
.auth-card { max-width: 26rem; margin: var(--s7) auto; padding: var(--s6); }
.auth-card .page-title { margin-bottom: var(--s4); }
.login-logo { display: block; width: 100%; height: auto; margin-bottom: var(--s5); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 var(--s4); }
.table-wrap > table { margin: 0; }
/* A table with buttons in its last column keeps that column in view when it scrolls sideways */
.table-wrap table:has(tbody td:last-child :is(button, .btn)) :is(thead th, tbody td):last-child {
  position: sticky; right: 0; z-index: 1; background: var(--page);
}
.table-scroll table:has(tbody td:last-child :is(button, .btn)) thead th:last-child { z-index: 2; }
.table-dense th, .table-dense td { height: 34px; font-size: 13px; white-space: nowrap; }
.table-dense th { font-size: 12px; }
.table-touch th, .table-touch td { height: 52px; padding: var(--s1) var(--s2); font-size: 15px; white-space: nowrap; }
.table-touch th { font-size: 12px; }
/* Receipt lines: fits a 768px tablet without sideways scroll; controls stay readable and finger-sized */
.receipt-lines td { white-space: normal; vertical-align: middle; }
.receipt-lines td.item { min-width: 10rem; }
.receipt-lines input, .receipt-lines select, .receipt-lines button { min-height: 44px; margin: 0; }
.receipt-lines td select, .receipt-lines td input:not([type=hidden]) { width: 100%; max-width: none; }
.receipt-lines td.size select, .receipt-lines td.size { min-width: 4.5rem; }
.receipt-lines td.colour select, .receipt-lines td.colour { min-width: 6rem; }
.receipt-lines td.qty input, .receipt-lines td.qty { min-width: 4.5rem; }
.receipt-lines td.cat select, .receipt-lines td.cat { min-width: 7rem; }
.receipt-lines td.price input, .receipt-lines td.price { min-width: 5.5rem; }
.receipt-lines td.size input.new-name, .receipt-lines td.colour input.new-name { margin-top: var(--s1); }
.receipt-lines td .lower input:not([type=hidden]) { width: 3.5rem; flex: none; padding: 0 var(--s2); }
.receipt-lines .lower button { padding: 0 var(--s3); }
.receipt-lines .lower, .receipt-lines .print-row { flex-wrap: nowrap; gap: var(--s1); margin: 0; }
.receipt-lines .print-row { margin-top: var(--s1); }

/* Messages and status */
.banners { margin-bottom: var(--s4); }
.banner {
  margin: 0 0 var(--s2); padding: 10px var(--s3); border-radius: var(--radius);
  font-size: 14px; font-weight: 500; background: var(--wash); color: var(--ink);
}
.banner-ok { background: var(--ok-bg); color: var(--ok); }
.banner-error { background: var(--error-bg); color: var(--error); }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner-info { background: var(--wash); color: var(--ink); }
.banner p { margin: 0; }
.banner ul { margin: var(--s1) 0 0; }
div.banner { margin-bottom: var(--s4); }
.pill-warn {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px var(--s2); border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); white-space: nowrap;
}

/* ---------- Polished screens ---------- */
/* A form laid out as the command bar: fields side by side, the action button at the end */
.cmd-form { align-items: flex-end; gap: var(--s3); }
.cmd-form p, .cmd-form .field { flex: 1 1 13rem; max-width: 22rem; margin: 0; }
.cmd-form label { margin: 0; }
.cmd-form .errorlist { flex-basis: 100%; margin: 0; }
.cmd-total { margin-left: auto; display: flex; align-items: baseline; gap: var(--s3); }
.cmd-total b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.inline-form input { width: 6rem; min-width: 0; margin: 0; }

/* Cards: home grid and titled sections */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s4); margin-bottom: var(--s4); }
.card-grid > .card { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: var(--s4); align-items: start; }
.grid-2 > .card { margin: 0 0 var(--s4); }
.card > h2:first-child { font-size: 15px; margin: 0 0 var(--s3); display: flex; align-items: center; gap: var(--s2); }
.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li { margin: 0; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.card-list li:last-child { border-bottom: 0; }
.touch .card-list li { min-height: 44px; display: flex; align-items: center; gap: var(--s2); }
.touch td > a:not(.btn), .touch .card-list li > a { display: inline-block; padding: 12px 0; }
.touch label:has(> input[type=checkbox]) { min-height: 44px; }

/* Home: centred icon tiles */
.tile-grid { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: var(--s3); margin: var(--s4) 0 var(--s5); }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 152px; min-height: 120px; padding: var(--s3); text-align: center; font-size: 15px; font-weight: 500;
  color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-card); text-decoration: none;
}
.tile:hover { background: var(--wash); }
.tile svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Scan card: big scan field, manual entry next to it, status line under it */
.scan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#scan-input {
  flex: 1 1 14rem; min-width: 0; max-width: none; height: 52px; margin: 0; padding: 0 14px;
  font-size: 18px; border: 2px solid var(--ink); border-radius: var(--radius-card);
}
.scan-hint { flex: none; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.scan-status { margin: var(--s3) 0 0; font-size: 15px; }
.scan-status:empty { margin: 0; padding: 0; }  /* stays rendered so the live region keeps announcing */
.manual-form { margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); }
.scan-extras { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s5); margin-top: var(--s3); }
.scan-extras label { margin: 0; }

/* Long tables scroll inside their own box: header and totals stay in view */
.table-scroll { max-height: 55vh; overflow: auto; border-bottom: 1px solid var(--line); }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--page); }
.table-scroll tfoot th { position: sticky; bottom: 0; z-index: 1; background: var(--wash); color: var(--ink); }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
tfoot th, .table-dense tfoot th, .table-touch tfoot th {
  color: var(--ink); font-size: var(--row-font); text-transform: none; letter-spacing: 0;
  border-top: 1px solid var(--line-2); border-bottom: 0;
}
.table-dense tfoot th { font-size: 13px; }
.table-touch tfoot th { font-size: 15px; }
/* on hand: Price, Count and Value (columns 8+) are numbers */
.on-hand thead th:nth-child(n+8), .on-hand tbody td:nth-child(n+8) { text-align: right; }

/* ---------- Touch density (counter, scan and home pages) ---------- */
.touch { --base: 16px; --control-h: 48px; --button-h: 48px; --row-h: 52px; --row-font: 15px; }
.touch button, .touch .btn { font-size: 15px; }
.touch .app-bar button { height: 36px; font-size: 13px; }

/* Touch screens (and tablet-width windows) on compact pages still get >= 44px targets */
@media (pointer: coarse), (max-width: 1023px) {
  :root { --control-h: 44px; --button-h: 44px; }
  .app-menu a { min-height: 44px; }
  .app-bar button, .touch .app-bar button { height: 44px; }
  .menu-toggle { width: 44px; }
}

/* ---------- Narrow screens: menu behind a button ---------- */
@media (max-width: 1023px) {
  .app-menu {
    display: none; position: fixed; top: var(--bar-h); bottom: 0; left: 0; z-index: 25;
    width: min(280px, 85vw); overflow-y: auto; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  }
  .app-menu.open { display: block; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }  /* the shadow dims the page behind the drawer */
  .app-menu a { min-height: 44px; }
  .app-content { padding: var(--s4) var(--s5) 40px; }
  .table-touch th, .table-touch td { padding-left: 6px; padding-right: 6px; }  /* basket fits 768px even with a scrollbar */
}
@media (max-width: 640px) {
  .app-bar { gap: var(--s2); padding: 0 var(--s3); }
  .app-bar .user-name { display: none; }
  .app-bar .chip { max-width: 7rem; }
  .app-content { padding: var(--s4) var(--s4) 32px; }
  .auth-card { margin: var(--s5) auto; padding: var(--s5); }
  /* receiving lines: one stacked card per line, so the entry row and its Add button fit the screen */
  .receipt-lines thead { display: none; }
  .receipt-lines, .receipt-lines tbody, .receipt-lines tr, .receipt-lines td { display: block; width: 100%; }
  .receipt-lines tr { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
  .receipt-lines td { height: auto; padding: 2px 0; border: 0; text-align: left; }
  .receipt-lines td[data-label] { display: inline-block; width: auto; min-width: 0; margin-right: var(--s3); }
  .receipt-lines td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  .receipt-lines #add-row-cells td { margin-bottom: var(--s1); }
}
@media (max-width: 420px) {  /* phone: the app bar fits the screen */
  .app-label { display: none; }
  .app-bar > * { flex: none; }
  .app-bar .chip { flex: 0 1 auto; min-width: 0; }
}
fieldset { min-width: 0; }  /* wraps inside narrow screens instead of overflowing */
.camera-video { display: block; width: 100%; max-width: 28rem; margin-top: .5rem; border-radius: 6px; }

/* ---------- Checkout (sale and return): two columns >= 1024px, sticky payment panel ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s5); align-items: start; }
.pos > section { min-width: 0; }
.panel { position: sticky; top: var(--s4); margin: 0; }
.totals > div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .due { font-size: 22px; font-weight: 700; border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s2); }
.discount { margin: var(--s2) 0 var(--s3); }
.discount > summary { display: block; text-align: center; cursor: pointer; list-style: none; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: var(--s3); }
.modes input, .mini input { position: absolute; opacity: 0; pointer-events: none; }
.modes label { display: flex; align-items: center; justify-content: center; height: 52px; margin: 0; padding: 0 var(--s1); text-align: center;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.modes input:checked + label, .mini input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.modes input:focus-visible + label, .mini input:focus-visible + label { outline: 3px solid #6aa1ff; outline-offset: 2px; }
.checkout .f { margin-bottom: var(--s2); }
.checkout .f label, .checkout .fields label { margin-bottom: var(--s1); }
.fixed { background: var(--wash); border-radius: var(--radius); padding: var(--s2) var(--s3); font-size: 14px; margin-bottom: var(--s2); }
.change { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; padding: var(--s2) var(--s3); border-radius: var(--radius);
  background: var(--ok-bg); color: var(--ok); margin-bottom: var(--s2); }
.change.short { background: var(--error-bg); color: var(--error); }
.split-row { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2); margin-bottom: 6px; }
.split-row .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.split-row input[type=text] { min-height: 38px; margin: 0; max-width: none; }
.split-row .ol { margin-top: 6px; }
.mini { display: flex; gap: var(--s1); flex-wrap: wrap; margin-bottom: 6px; }
.mini label { margin: 0; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.add { width: 100%; margin-bottom: var(--s2); }
.complete { width: 100%; height: 56px; font-size: 18px; font-weight: 700; margin-top: var(--s2); }
@media (max-width: 1023px) {
  .pos { grid-template-columns: 1fr; }
  .panel { position: static; }
}
/* Checkout fixes: lines table fits the left column; Discount button; helper bits */
.modes, .mini { position: relative; }
.pos .table-touch th, .pos .table-touch td { padding-left: 6px; padding-right: 6px; }
.pos .table-touch td { white-space: normal; vertical-align: top; padding-top: 8px; padding-bottom: 8px; height: auto; }
.pos .table-touch td.num { white-space: nowrap; }
.pos .table-touch td:first-child { font-family: ui-monospace, Consolas, monospace; font-size: 13px; white-space: nowrap; }
.pos .table-touch .sub, .totals .sub { color: var(--muted); font-size: 12.5px; }
.pills { margin-top: 2px; }
.pill { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); margin-right: 4px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }  /* full reason in title */
.pos .table-touch td.item { min-width: 14rem; }
tr.row-gone td { color: var(--muted); }  /* All sales: voided and cancelled stay listed, greyed */
/* Offline sales: cells wrap so Acknowledge stays on screen at 1366px */
.offline-list td { white-space: normal; vertical-align: top; height: auto; padding-top: 8px; padding-bottom: 8px; }
.offline-list td .sub { font-size: 12.5px; }
.offline-list td.ack input { width: 12rem; min-width: 0; }
.linkish { background: none; border: 0; padding: 0; min-height: 0; height: auto; font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.totals .sub { align-items: baseline; gap: var(--s2); }
.totals .sub form { margin: 0; }
.discount > summary { display: flex; align-items: center; justify-content: center; height: var(--button-h); padding: 0; }
.discount > summary::-webkit-details-marker { display: none; }
.discount[open] > summary { margin-bottom: var(--s3); }
/* Setup-screen polish: row actions, filter bars, fieldset cards */
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row-actions form { margin: 0; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.filter-bar label { display: inline-flex; align-items: center; gap: var(--s2); }
fieldset.card { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: var(--s3) var(--s4); margin: 0 0 var(--s3); }
fieldset.card legend { padding: 0 var(--s2); font-weight: 600; }
fieldset.card label { display: block; padding: 2px 0; }