/* BatOps look: black and white, simple, feels like software.
   Rules: Batops/06 Design/Design System.md. Change tokens here and every page follows. */
:root {
  --bg: #fafafa;          /* app background */
  --surface: #ffffff;     /* cards, tables, inputs */
  --surface-2: #f4f4f5;   /* hover rows, table header, subtle fills */
  --ink: #0a0a0a;         /* main text, primary buttons, top bar */
  --ink-2: #52525b;       /* secondary text */
  --ink-3: #a1a1aa;       /* placeholders, disabled */
  --line: #e4e4e7;        /* hairline borders */
  --line-strong: #d4d4d8; /* input borders */
  --radius: 6px;          /* controls */
  --radius-card: 10px;    /* cards */
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, .08), 0 0 0 1px #e4e4e7;
  font-family: Inter, "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 24px 0 10px; letter-spacing: -0.01em; }
.sub { color: var(--ink-2); margin: 0 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.reason { color: var(--ink-2); font-size: 12.5px; }
.flag { font-weight: 600; }
[hidden] { display: none !important; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 0 24px; min-height: 54px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 800; font-size: 14px; letter-spacing: 0.16em; text-decoration: none; color: #fff; }
.brand-x { color: #71717a; font-weight: 400; letter-spacing: 0; }
.brand img { height: 22px; width: auto; max-width: 140px; object-fit: contain; filter: brightness(0) invert(1); display: block; } /* the logo is black: shown white on the black bar */
.top nav { display: flex; align-items: stretch; gap: 2px; align-self: stretch; }
.top nav a { display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: #a1a1aa; border-bottom: 2px solid transparent; font-weight: 500; }
.top nav a:hover { color: #fff; }
.top nav a.on { color: #fff; border-bottom-color: #fff; }
.subnav .count { margin-left: 7px; padding: 0 7px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 18px; }
.top a.new-order { white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; font-weight: 500; align-self: center; height: 30px; margin-left: 12px; padding: 0 12px; border: 1px solid #52525b; border-radius: var(--radius); color: #fff; }
.top a.new-order:hover, .top a.new-order.on { background: #fff; color: var(--ink); border-color: #fff; }
.top .status { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 12.5px; color: #a1a1aa; }
.top button.link { color: #a1a1aa; }
.top button.link:hover { color: #fff; }
.sync::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; border: 1.5px solid #fff; vertical-align: 1px; }
.sync-ok::before { background: #fff; }
.sync-failed, .sync-check { color: #fff; font-weight: 700; }
.sync-failed::before, .sync-check::before { border-radius: 0; background: #fff; transform: rotate(45deg); }

main { padding: 28px 28px 80px; max-width: 1320px; margin: 0 auto; }

/* ── Page header ─────────────────────────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.page-head .sub { margin: 0; }
.crumbs { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.head-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
button, .btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--surface-2); }
.btn.primary, button[type="submit"]:not(.link):not(.btn) { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover, button[type="submit"]:not(.link):not(.btn):hover { background: #27272a; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
button.secondary { background: var(--surface); color: var(--ink); }
button.link { background: none; border: none; height: auto; padding: 0; color: var(--ink-2); text-decoration: underline; font-weight: 400; }
a.button { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--radius); background: var(--ink); color: #fff; text-decoration: none; font-weight: 500; }
form.inline { display: inline; }
.row-gap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ── Inputs ──────────────────────────────────────────────────────────── */
input, select, textarea { font: inherit; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
input[type="checkbox"], input[type="radio"] { height: auto; accent-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fields { display: grid; gap: 12px 14px; }
.fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.field input, .field select, .field textarea { width: 100%; font-weight: 400; font-size: 14px; }
.field.span-all { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px; margin-bottom: 16px; }
.card-head, .panel h2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; }
.card-head h2 { margin: 0; }
.panel.wide { grid-column: 1 / -1; }

/* ── Badges ──────────────────────────────────────────────────────────── */
.badge, .tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--ink); background: var(--surface); text-transform: none; letter-spacing: 0; }
.badge.solid, .tag.solid { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── Alerts / toasts ─────────────────────────────────────────────────── */
.alert, .box-flag { background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-card); padding: 12px 16px; margin: 0 0 16px; }
.alert ul, .box-flag ul { margin: 6px 0 0; padding-left: 18px; }
.toast, .ok-box { display: inline-flex; background: var(--ink); color: #fff; border-radius: 20px; padding: 6px 14px; margin: 0 0 16px; font-weight: 500; border: none; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.scroll, .table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.card .table-wrap { border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
/* On a narrow screen a table keeps a readable width and scrolls sideways inside its box, instead of squeezing names onto 3 lines. */
:is(.table-wrap, .scroll) > table:has(> thead) { min-width: 680px; }
:is(.table-wrap, .scroll) > table:has(> thead) td { white-space: nowrap; }
:is(.table-wrap, .scroll) > table td.wrap, :is(.table-wrap, .scroll) > table tr.detail-row td { white-space: normal; }
td.wrap { min-width: 200px; } /* long text (notes, look, activity) may wrap */
td .tag, td .pill, td time { white-space: nowrap; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
/* Bat table: one header row per order, status kept on one line */
table.bats tr.group td { background: var(--surface-2); padding: 7px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
table.bats tr.group td > * + * { margin-left: 14px; }
table.bats tr.group a { font-size: 13.5px; font-weight: 600; }
table.bats tbody tr.group:hover td { background: var(--surface-2); }
table.bats td.status { white-space: nowrap; }
table.bats td.status .reason { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; margin-left: 4px; cursor: help; }
table.plain td { padding: 10px 8px; }
table.plain td:first-child { padding-left: 0; }

/* ── Tabs + filter bar ───────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 12px 10px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 400; }
form.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
form.bar input[type="search"] { width: 300px; max-width: 100%; }
form.bar label { color: var(--ink-2); display: flex; gap: 6px; align-items: center; }

/* ── Dashboard ───────────────────────────────────────────────────────── */
.hello h1 { font-size: 32px; }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash .panel { margin: 0; }
.big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
td.big { width: 72px; }
.stat { margin: 6px 0; }
.barcell { width: 60%; }
div.bar { height: 10px; border-radius: 5px; background: repeating-linear-gradient(45deg, #fff 0 3px, #d4d4d8 3px 4px); border: 1px solid var(--ink); overflow: hidden; }
div.bar .ok { display: block; height: 100%; background: var(--ink); }
.key { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--ink); border-radius: 2px; vertical-align: -1px; margin: 0 4px 0 10px;
  background: repeating-linear-gradient(45deg, #fff 0 3px, #d4d4d8 3px 4px); }
.key.ok { background: var(--ink); margin-left: 0; }

/* ── Review / order blocks ───────────────────────────────────────────── */
.order-block { margin-bottom: 24px; }
.order-block h2 { margin: 0 0 8px; }
.order-block h2 .muted { font-weight: 400; margin-left: 8px; }

/* ── Order form ──────────────────────────────────────────────────────── */
.step { margin: 0 0 10px; font-size: 12.5px; }
.design-fields { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.design-fields .field:first-child select { font-weight: 600; }
.roster-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.roster-head .step { margin: 0; }
table.roster td { padding: 6px 8px; }
table.roster th { padding: 8px; }
table.roster input, table.roster select { height: 30px; font-size: 13px; padding: 0 8px; }
table.roster .w-player { width: 170px; }
table.roster .w-qty { width: 64px; text-align: right; }
table.roster .w-engraving { width: 160px; }
table.roster tr.has-problem td { background: #fafafa; }
.custom-row td { background: var(--surface-2); }
.custom-fields { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.paste-panel { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; background: var(--bg); }
.paste-panel textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; margin-bottom: 10px; }
.paste-preview .table-wrap { margin: 8px 0 10px; max-height: 320px; overflow: auto; }
.paste-preview select { height: 28px; font-size: 12px; }
.summary { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.summary-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.problem-count { margin: 0; font-weight: 600; }
.problem-count.bad::before { content: "◆ "; }
.totals { width: 320px; max-width: 100%; }
.totals div { display: flex; justify-content: space-between; gap: 30px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 17px; }
.design-line { margin: -4px 0 12px; color: var(--ink-2); }

/* Order status: Draft → Confirmed → Paid → Shipped */
.steps { display: flex; gap: 0; margin-bottom: 12px; }
.step-item { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 500; position: relative; }
.step-item:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); margin: 0 12px; }
.step-item .dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step-item.done { color: var(--ink-2); }
.step-item.done .dot { background: var(--surface-2); border-color: var(--ink-2); }
.step-item.now { color: var(--ink); }
.step-item.now .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-actions { margin-bottom: 4px; }
.confirm-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stats > div { display: flex; flex-direction: column; gap: 2px; }
.totals .commission { border-top: 1px dashed var(--line-strong); margin-top: 10px; padding-top: 8px; font-weight: 600; }
.from-client { display: flex; align-items: center; height: 34px; color: var(--ink); font-weight: 400; font-size: 14px; }
.field.span-3 { grid-column: span 3; }
a.plain-link { text-decoration: none; }
a.plain-link:hover { text-decoration: underline; }

/* ── Production board ────────────────────────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.board-col { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); text-decoration: none; }
.board-col:hover { border-color: var(--ink-3); }
.board-col.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ready-group { margin-bottom: 14px; }
.ready-group .check { margin-bottom: 6px; }
form.move select { height: 28px; font-size: 12px; padding: 0 6px; margin-left: 8px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── Station screen (shop): big, readable from a distance ────────────── */
.station-pick { max-width: 720px; margin: 20px auto; }
.station-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.station-btn { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); text-decoration: none; }
.station-btn strong { font-size: 24px; }
.station-btn:hover { border-color: var(--ink); }
.station { max-width: 980px; margin: 0 auto; }
.station-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.station-head h1 { font-size: 44px; margin: 0; }
#scan { width: 100%; height: 56px; font-size: 22px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.station-result { margin-top: 16px; border-radius: var(--radius-card); padding: 24px 28px; min-height: 220px; border: 2px solid var(--line); background: var(--surface); }
.station-result.ok { border-color: var(--ink); }
.station-result.bad { background: var(--ink); color: #fff; border-color: var(--ink); }
.station-result.bad .station-meta { color: #d4d4d8; }
.station-msg { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.station-model { font-size: 56px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.station-size { font-size: 34px; font-weight: 700; margin-top: 4px; }
.station-line { font-size: 24px; margin-top: 8px; }
.station-meta { font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.station-history { margin-top: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--ink-2); }
.history-line.bad { color: var(--ink); font-weight: 700; }

/* ── Login ───────────────────────────────────────────────────────────── */
.login { max-width: 400px; margin: 64px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.login h1 { font-size: 22px; margin-bottom: 12px; }
.login form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.login form.actions { flex-direction: row; justify-content: flex-end; }
.login input { height: 40px; font-size: 15px; }
.login input[name="code"] { font-size: 24px; height: 48px; letter-spacing: 0.3em; text-align: center; }
.login button { justify-content: center; height: 40px; }
.login .how-to { padding-left: 20px; line-height: 1.6; margin: 0 0 8px; }
.login .setup-key { display: block; margin: 6px 0; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius); font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: 0.05em; word-spacing: 0.3em; }
.login .codes { columns: 2; list-style: none; padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius); font-size: 15px; line-height: 1.9; }
.login .wrap { white-space: normal; word-break: break-all; }

/* ── Bat detail + fix form ───────────────────────────────────────────── */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 24px; margin: 0; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; }
pre.note { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.cols { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 40px; }
.fix { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 18px; margin-top: 8px; }
.fix .grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; align-items: center; }
.fix .grid label { color: var(--ink-2); }
.fix .grid input, .fix .grid select { width: 100%; max-width: 320px; }
.fix .actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.sizes span { display: inline-block; min-width: 34px; margin: 0 4px 2px 0; font-variant-numeric: tabular-nums; }

/* ── Small screens ───────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .fields.four, .design-fields { grid-template-columns: 1fr 1fr; }
  .custom-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .cols { grid-template-columns: 1fr; }
  .top { padding: 8px 16px; gap: 6px 16px; }
  .top .status { margin-left: 0; }
  main { padding: 18px 16px; }
}

/* ── Printing the order sheet: no top bar, no buttons ────────────────── */
@media print {
  body { background: #fff; }
  .top, .subnav, .noprint { display: none !important; }
  main { padding: 0; max-width: none; }
  .card, .table-wrap, .scroll { border: none; padding: 0; }
  th { position: static; background: none; border-bottom: 1px solid #000; }
}

/* Search box in the top bar */
.top-search input { height: 30px; width: 180px; background: #18181b; border-color: #3f3f46; color: #fff; }
.top-search input::placeholder { color: #71717a; }
.top-search input:focus { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.top a.link { color: #a1a1aa; text-decoration: underline; }
.top a.link:hover { color: #fff; }
.login .qr { width: 200px; margin: 8px 0; }
.login .qr svg { display: block; width: 100%; height: auto; }

/* Model search on the order form: the list of matches under the box */
.model-matches { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.model-matches li { padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 13.5px; color: var(--ink); font-weight: 400; }
.model-matches li.on, .model-matches li[data-model]:hover { background: var(--surface-2); }
.model-matches li.none { color: var(--ink-2); cursor: default; }
.top .read-only { align-self: center; margin-left: 12px; padding: 0 10px; height: 24px; line-height: 22px; border: 1px solid #52525b; border-radius: 12px; color: #a1a1aa; font-size: 12px; }
.field.span-2 { grid-column: span 2; }
.drop-grid td, .drop-grid th { text-align: center; }
.drop-grid td:first-child, .drop-grid th:first-child { text-align: left; }
h3.small { font-size: 13px; margin: 14px 0 6px; color: var(--ink-2); }

/* Groups page: one card per group */
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.group-card { display: block; text-decoration: none; color: inherit; margin: 0; }
.group-card:hover { border-color: var(--ink); }
.group-card h2 { margin: 0 0 8px; }
.group-card .big { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.group-card p { margin: 2px 0; }
.price-form { justify-content: flex-end; }
.price-form input { width: 90px; text-align: right; }
.drop-grid label.weight { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.signature-preview { max-height: 60px; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }

/* Layout of 2026-10-17: the tabs of the current section, under the black bar */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav a { display: flex; align-items: center; padding: 10px 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.subnav .count { background: var(--ink); color: #fff; }
.top .gear { color: #a1a1aa; text-decoration: none; font-size: 17px; line-height: 1; }
.top .gear:hover, .top .gear.on { color: #fff; }
.top .me { position: relative; }
.top .me summary { white-space: nowrap; cursor: pointer; list-style: none; color: #fff; font-weight: 500; }
.top .me summary::-webkit-details-marker { display: none; }
.top .me summary::after { content: " ▾"; color: #a1a1aa; }
.top .me-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 4px; z-index: 20; }
.top .me-menu a, .top .me-menu button[type="submit"] { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--ink); text-decoration: none; font: inherit; font-size: 13px; border-radius: 4px; cursor: pointer; height: auto; }
.top .me-menu a:hover, .top .me-menu button[type="submit"]:hover { background: var(--surface-2); }
.top .me-menu form { margin: 0; }
@media (max-width: 760px) { .subnav { padding: 0 8px; } .subnav a { padding: 8px; } }
.top .sync { white-space: nowrap; }
.top .status { flex-wrap: wrap; }

/* Review (2026-10-17): orders on the left, the chosen order's grid on the right */
.rv-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-queue { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; }
.rv-filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.rv-filters a { font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink-2); }
.rv-filters a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rv-filters .n, .rv-item .n { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rv-item { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.rv-item:hover { background: var(--surface-2); }
.rv-item.on { background: var(--surface-2); border-left-color: var(--ink); }
.rv-top { display: flex; justify-content: space-between; }
.rv-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px; min-width: 0; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rv-head h2 { margin: 0 0 2px; }
.rv-evidence { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; display: grid; gap: 6px; }
.rv-evidence pre.note { margin: 2px 0 0; white-space: pre-wrap; }
.rv-shared { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.rv-shared-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.rv-shared-fields, .rv-more-row .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.rv-shared-fields .field, .rv-more-row .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.rv-grid td { vertical-align: middle; }
.rv-grid .rv-line { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-grid .w-model { width: 120px; } .rv-grid .w-num { width: 64px; }
.rv-status.ok { font-weight: 600; }
.rv-more-row td { background: var(--surface-2); }
.rv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.kbd { font-size: 11px; opacity: .7; margin-left: 6px; font-weight: 400; }
@media (max-width: 900px) { .rv-layout { grid-template-columns: 1fr; } .rv-queue { position: static; max-height: 260px; } }
.rv-grid input, .rv-grid select { height: 30px; }
.rv-grid td { padding-top: 4px; padding-bottom: 4px; }
.rv-grid .w-player, .rv-grid .w-engraving { width: 120px; }
.rv-grid .w-model { width: 110px; }
.rv-grid .rv-line { max-width: 110px; }
.rv-grid .rv-status { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-item .muted { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-note { margin: 4px 0 0; color: var(--ink); font-weight: 500; }
.price-note:empty { display: none; }

/* Production pipeline (2026-10-17): the stage strip and the board grouped by order */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.pipe-step { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.pipe-step:hover { background: var(--surface-2); }
.pipe-step.on { border-color: var(--ink); }
.pipe-step.todo { background: var(--ink); color: #fff; border-color: var(--ink); }
.pipe-step.todo .muted { color: #d4d4d8; }
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pipe-col { background: var(--surface-2); border-radius: var(--radius-card); padding: 10px; min-height: 120px; }
.pipe-col h2 { font-size: 15px; margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.pipe-order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.pipe-order-head { padding: 6px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 6px; }
.pipe-card { padding: 8px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.pipe-card:last-child { border-bottom: 0; }
.pipe-card.back { border-left: 3px solid var(--ink); }
.pipe-note { font-size: 12px; font-weight: 600; }
.pipe-moves { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px; margin-top: 4px; }
.pipe-moves .btn { white-space: normal; height: auto; min-height: 28px; text-align: left; }
.pipe-moves summary { list-style: none; cursor: pointer; }
.pipe-moves summary::-webkit-details-marker { display: none; }
.pipe-back { display: grid; gap: 6px; margin-top: 6px; }
.pipe-back input { width: 100%; }
@media (max-width: 900px) { .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pipe { grid-template-columns: 1fr; } }

/* "Already made": kept quiet on purpose */
.quiet-actions { margin: 16px 0 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.quiet-actions button.link { font-size: 12.5px; }
.quiet-list { margin: 8px 0 24px; }
.quiet-list summary { cursor: pointer; }
.quiet-list form { display: grid; gap: 6px; margin-top: 8px; }

/* The shop's colour tags (2026-10-17): PRO orange, BIRCH yellow, NO CUP red. Colour means something here. */
.bat-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.bat-tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border: 2px solid #000; border-radius: 4px; color: #000; line-height: 1.3; }
.bat-tag.pro { background: #f97316; }
.bat-tag.birch { background: #facc15; }
.bat-tag.nocup { background: #dc2626; color: #fff; }
.bat-tags.big { margin: 10px 0 4px; gap: 8px; }
.bat-tags.big .bat-tag { font-size: 26px; padding: 4px 14px; border-width: 3px; }

/* Order form: "Check your order" before sending (2026-10-17) */
.review-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.review-box { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); padding: 20px 24px; width: min(440px, 100%); display: grid; gap: 8px; }
.review-box h2 { margin: 0 0 6px; }
.review-line { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.review-line.bad strong { background: var(--ink); color: #fff; padding: 0 6px; border-radius: 4px; }
.review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* Flag for review (2026-10-17): black, impossible to miss */
.flag-box { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 6px 10px; margin: 6px 0; font-size: 13px; }
.flag-box .small { color: #d4d4d8; }
.flag-form { margin: 6px 0; }
.flag-form summary { list-style: none; cursor: pointer; display: inline-flex; }
.flag-form summary::-webkit-details-marker { display: none; }
.flag-form form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.flag-form input[name=note] { flex: 1; min-width: 180px; }
.tag.flag { background: var(--ink); color: #fff; }
.deny-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.deny-box input { flex: 1; min-width: 200px; }

/* Steps inside In production (2026-10-17): a tag; one tap = next step */
.sub-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--ink-2); margin: -4px 4px 10px; }
.sub-row { display: flex; align-items: center; gap: 4px; }
.sub-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border: 2px dashed var(--ink-3); border-radius: 4px; background: var(--surface); color: var(--ink-2); height: auto; }
.sub-tag.on { border: 2px solid var(--ink); color: var(--ink); }
.sub-tag.tap { cursor: pointer; }
.sub-tag.tap:hover { background: var(--ink); color: #fff; }
.sub-next { font-weight: 500; font-size: 11px; opacity: .7; }
.sub-menu summary { list-style: none; cursor: pointer; padding: 2px 6px; border-radius: 4px; color: var(--ink-2); }
.sub-menu summary::-webkit-details-marker { display: none; }
.sub-menu form { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sub-menu .btn.on { background: var(--ink); color: #fff; }

/* TV mode (2026-10-17): the shop's main screen, read from across the room */
main:has(> .tv) { max-width: none; padding: 12px 16px; }
.tv { font-size: 18px; }
.tv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 22px; margin-bottom: 10px; }
.tv-count { margin-right: 22px; }
.tv-count strong { font-size: 30px; margin-left: 6px; }
.tv-problems { background: var(--ink); color: #fff; border-radius: var(--radius-card); padding: 10px 16px; margin-bottom: 12px; font-size: 22px; display: grid; gap: 4px; }
.tv-cols { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 12px; align-items: start; }
.tv-col { background: var(--surface-2); border-radius: var(--radius-card); padding: 10px; }
.tv-col h2, .tv-subcol h3 { display: flex; justify-content: space-between; margin: 0 4px 10px; font-size: 24px; }
.tv-subcol h3 { font-size: 18px; color: var(--ink-2); }
.tv-subcols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.tv-card.flagged { border: 3px solid var(--ink); }
.tv-top { display: flex; gap: 6px; flex-wrap: wrap; min-height: 4px; margin-bottom: 4px; }
.tv-model { font-size: 26px; font-weight: 800; line-height: 1.1; }
.tv-qty { font-size: 18px; color: var(--ink-2); }
.tv-size { font-size: 22px; font-weight: 700; }
.tv-line { font-size: 16px; }
.tv .bat-tag { font-size: 15px; padding: 2px 8px; }
.pipe .sub-row button.sub-tag[type="submit"] { background: var(--surface); color: var(--ink-2); border: 2px dashed var(--ink-3); height: auto; padding: 3px 8px; }
.pipe .sub-row button.sub-tag.on[type="submit"] { border: 2px solid var(--ink); color: var(--ink); }
.pipe .sub-row button.sub-tag[type="submit"]:hover { background: var(--ink); color: #fff; }

/* Click a row to see everything (2026-10-17) */
tr.expandable { cursor: pointer; }
tr.expandable:hover td { background: var(--surface-2); }
tr.expandable.open td { background: var(--surface-2); font-weight: 500; }
td.expander { width: 18px; color: var(--ink-3); padding-right: 0; }
tr.detail-row > td { background: var(--surface-2); padding: 0 12px 12px; border-top: 0; }
.detail-panel { display: grid; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin: 0; }
.mini-facts dt { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.mini-facts dd { margin: 0; font-size: 13px; }
.detail-lines { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.detail-lines span { font-size: 12.5px; background: var(--surface-2); border-radius: 4px; padding: 2px 6px; }
.detail-design { display: grid; gap: 2px; }
.detail-panel { position: sticky; left: 12px; max-width: calc(100vw - 96px); box-sizing: border-box; }

/* In-page "Are you sure?" (2026-10-17) */
.ask-bar { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 8px; padding: 4px 8px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--surface); font-size: 13px; font-weight: 500; }

/* Board: orders fold into one line, live search (2026-10-17) */
.board-search { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.board-search input { flex: 1; max-width: 420px; }
details.pipe-order > summary { list-style: none; cursor: pointer; }
details.pipe-order > summary::-webkit-details-marker { display: none; }
details.pipe-order > summary::before { content: "▸"; color: var(--ink-3); margin-right: 6px; }
details.pipe-order[open] > summary::before { content: "▾"; }
details.pipe-order:not([open]) > summary { border-bottom: 0; }
.pipe-order-head { align-items: center; flex-wrap: wrap; justify-content: flex-start; }
.pipe-order-head > span:first-of-type { flex: 1 1 0; min-width: 0; } /* the name stays next to the arrow */
.pipe-order-sum { margin-left: auto; }
.pipe-order-sum { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pipe-order-sum .small { background: var(--surface-2); border-radius: 4px; padding: 0 5px; }

/* Small screens (2026-10-17): the top bar scrolls away instead of covering a third of the screen, and drops what isn't needed. */
@media (max-width: 700px) {
  .top { position: static; padding: 6px 16px; gap: 6px 16px; }
  .top nav a { padding: 6px 8px; }
  .top .status { margin-left: 0; width: 100%; gap: 10px; }
  .top .top-search { flex: 1; }
  .top .top-search input { width: 100%; }
  .top .sync { display: none; }
  .top a.new-order { margin-left: 0; }
  main { padding-left: 16px; padding-right: 16px; }
}

/* TV mode on a smaller screen (2026-10-17): words never break mid-word, steps and stages stack instead of overlapping. */
.tv-model, .tv-size { overflow-wrap: normal; word-break: normal; }
.tv-col, .tv-subcol { min-width: 0; }
@media (max-width: 1500px) {
  .tv-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tv-col.wide { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .tv { font-size: 15px; }
  .tv-model { font-size: 20px; } .tv-size { font-size: 17px; } .tv-line { font-size: 14px; }
  .tv-head { font-size: 17px; } .tv-count strong { font-size: 22px; }
  .tv-col h2 { font-size: 19px; } .tv-subcol h3 { font-size: 15px; }
  .tv-subcols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tv-cols, .tv-subcols { grid-template-columns: minmax(0, 1fr); }
}

/* Review: "Already made? Skip review" (2026-10-17) */
.rv-made { margin-top: 14px; }
.rv-made-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin: 8px 0 10px; }

/* Colour lists per group / model (2026-10-17) */
.color-lists { display: grid; gap: 6px; }
.color-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--surface); }
.color-list > summary { cursor: pointer; }
.color-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin-top: 8px; }

/* Order form: a colour not offered for this model/group (2026-10-17) */
.design input.bad { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--surface-2); }
.design input:disabled { background: var(--surface-2); color: var(--ink-3); }

/* The client's form from a form link (2026-10-17): no prices except the total */
.client-mode label.field:has([data-f="unitPrice"]), .client-mode .price-note, .client-mode .totals > div:not(.grand) { display: none; }

/* Catalog → Library (2026-10-17) */
.lib-upload { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lib-item { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: var(--surface); }
.lib-thumb { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); flex: none; }
.lib-doc { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }

/* Settings → Company: the logo as it looks on the black top bar */
.logo-preview { display: inline-flex; align-items: center; background: var(--ink); padding: 10px 16px; border-radius: var(--radius); }
.logo-preview img { height: 28px; width: auto; max-width: 200px; object-fit: contain; filter: brightness(0) invert(1); }

/* Library files where they are used */
.client-logos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pattern-img { max-width: 220px; max-height: 120px; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius); }

/* Country flags next to clients in Orders (Zach, 2026-10-17: the one place with colour by choice) */
.region-flag { display: inline-flex; align-items: center; vertical-align: -2px; margin-left: 6px; }
.region-flag .flag { height: 12px; width: auto; border: 1px solid var(--line-strong); border-radius: 2px; display: block; }
.region-flag .flag.globe { height: 14px; border: 0; }

/* ── Look refresh (2026-10-18, trial on branch look-refresh) ─────────────
   Inter shipped with BatOps, calmer tables, one style of buttons and tags,
   Needs attention as tiles, floating "Saved" messages, empty boxes that explain. */
@font-face { font-family: Inter; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { font-family: Inter, "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
body { font-variant-numeric: tabular-nums; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
.top { min-height: 56px; }
.top-search input { background: #18181b; border-color: #3f3f46; color: #fff; height: 32px; width: 220px; }
.top-search input::placeholder { color: #71717a; }
.top-search input:focus { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.subnav { box-shadow: 0 1px 0 var(--line); }

/* Buttons: 3 kinds (black main, white second, quiet), 2 sizes */
button, .btn { height: 36px; border-radius: var(--radius); transition: background .12s, border-color .12s, color .12s; }
.btn.small, button.small { height: 28px; }
.btn.primary, button[type="submit"]:not(.link):not(.btn) { font-weight: 600; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.top a:focus-visible, .top button:focus-visible { outline-color: #fff; }

/* Status tags: solid = needs you, outline = moving, grey = done */
.badge, .tag { height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; }

/* Cards and tables */
.card, .panel { padding: 20px 24px; }
.card-head { margin-bottom: 14px; }
th { font-weight: 600; padding: 10px 14px; }
td { padding: 12px 14px; border-bottom-color: var(--surface-2); }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: #fafafa; }
.big { font-weight: 800; }

/* Home */
.hello h1 { font-size: 30px; }
.dash { gap: 24px; }
.attn { padding: 0; overflow: hidden; }
.attn .card-head { padding: 16px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.attn .empty { margin: 20px 24px; }
.attn-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.attn-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 24px 20px; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; transition: background .12s; }
.attn-tile:hover { background: var(--surface-2); }
.attn-count { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.attn-hint { font-size: 12.5px; color: var(--ink-2); }
.attn-open { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; }
.attn-tile:hover .attn-open { text-decoration: underline; }

/* Empty: one sentence in a dashed box, never a blank space */
.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius-card); padding: 18px 16px; text-align: center; color: var(--ink-2); margin: 0; }
.pipe-col .empty { background: transparent; }

/* Production board: small-caps column titles with a count, white cards on a light column */
.pipe { gap: 16px; }
.pipe-col { background: transparent; border: 1px solid var(--line); padding: 12px; }
.pipe-col h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; align-items: center; }
.pipe-col h2 > span { font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }
.pipe-order { border-radius: var(--radius-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.pipe-order-head { padding: 10px 12px; cursor: pointer; }
.pipe-order:not([open]) .pipe-order-head { border-bottom: 0; }
.pipe-card { padding: 10px 12px; }
.board-search input { height: 36px; }

/* "Saved." floats bottom right and fades away by itself */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; margin: 0; border-radius: 8px; padding: 12px 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toast-out .4s ease 5s forwards; }
.toast::before { content: "✓"; margin-right: 10px; font-weight: 700; }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); visibility: hidden; } }
.ok-box { border-radius: var(--radius-card); padding: 12px 16px; }
@media print { .toast { display: none; } }

/* Phone fixes found by the browser tests (2026-10-18): Home's columns and page-header buttons stay inside the screen */
.dash > * { min-width: 0; }
.dash .panel { overflow-x: auto; } /* a wide table scrolls inside its card */
.attn-tiles { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.head-actions { flex-wrap: wrap; }

/* The test BatOps (npm.cmd run test-app): a yellow band under the top bar on every page */
.test-banner { background: #facc15; color: #000; border-bottom: 2px solid #000; text-align: center; padding: 6px 16px; font-size: 13px; letter-spacing: .02em; }
.test-banner strong { letter-spacing: .08em; }
@media print { .test-banner { border: 2px solid #000; } }

/* Print check (2026-10-19): the bats that will get a ticket, before printing */
.print-check { width: min(520px, 100%); }
.print-check-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; }
.print-check-order { font-weight: 700; margin-top: 8px; }
.print-check-bat { font-size: 13px; padding: 3px 0 3px 12px; border-bottom: 1px solid var(--surface-2); }
.print-check-bat:last-child { border-bottom: 0; }

/* Filter pills (Clients by group, 2026-10-19): black = the one shown, the number = how many */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); text-decoration: none; font-size: 13px; font-weight: 500; }
.pill span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pill:hover { border-color: var(--ink-3); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill.on span { color: #d4d4d8; }

/* Groups a rep can sell to (Settings → person) */
.rep-groups { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0 8px; }
.rep-groups legend { font-weight: 600; padding: 0 6px; }
.rep-group-list { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px 24px; }

/* Addresses (2026-10-19) */
.address-fields { margin-top: 8px; }
.country-code { margin-top: 6px; }
.ship-to { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 8px; }
.ship-to-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ship-card p { margin: 0; line-height: 1.5; }

/* Printing from a distance (2026-10-19): tickets waiting at the shop's sticker printer */
.print-waiting { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; background: var(--ink); color: #fff;
  border-radius: var(--radius-card); padding: 14px 18px; margin: 0 0 16px; text-decoration: none; }
.print-waiting span { color: #d4d4d8; }
.print-waiting:hover span { color: #fff; text-decoration: underline; }

/* Suggestions & tasks (2026-10-20) */
.inbox-list { display: grid; gap: 12px; margin-bottom: 12px; }
.inbox-item .card-head h2 { font-size: 16px; }
.inbox-details { white-space: pre-wrap; margin: 8px 0; }
.inbox-answer { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.inbox-answer textarea { width: 100%; }
.inbox-reply { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; white-space: pre-wrap; }
@media (max-width: 640px) { .inbox-answer { grid-template-columns: 1fr; } }
