:root {
  --bg: #f5f6f8; --panel: #fff; --ink: #1d2433; --muted: #667085; --line: #e3e6ec;
  --brand: #1f5f8b; --brand-ink: #fff; --ok: #1e7b4f; --ok-bg: #e5f4ec; --warn: #9a6200; --warn-bg: #fdf3dc;
  --bad: #b42318; --bad-bg: #fdeceb; --info: #1f5f8b; --info-bg: #e7f0f7; --chip: #eef0f4;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; gap: 4px; padding: 0 16px; min-height: 52px; flex-wrap: wrap; }
header.top .brand { font-weight: 700; margin-right: 18px; letter-spacing: .3px; }
/* three-layer menu (like Katana): banner sections with icons, the section's pages below, each page's own tabs */
header.top .banner-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
header.top .banner-nav a { color: var(--brand-ink); padding: 8px 12px 7px; display: flex; flex-direction: column; align-items: center;
  gap: 3px; min-width: 72px; font-size: 13px; opacity: .8; white-space: nowrap; }
header.top .banner-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
header.top .banner-nav a.on { opacity: 1; background: rgba(255,255,255,.14); text-decoration: none; font-weight: 600; }
header.top .banner-nav a:hover { opacity: 1; text-decoration: none; }
nav.subnav { display: flex; gap: 2px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
nav.subnav a { padding: 11px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
nav.subnav a.on { color: var(--brand); border-bottom-color: var(--brand); }
nav.subnav a:hover { color: var(--brand); text-decoration: none; }
header.top .who { margin-left: auto; font-size: 13px; opacity: .9; }
header.top .who form { display: inline; }
header.top .who button { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: 4px 10px; margin-left: 8px; cursor: pointer; }
main { max-width: 1440px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.banner { padding: 12px 16px; font-weight: 600; }
.banner.cip { background: var(--bad); color: #fff; }
.banner.cip.plain { background: var(--warn-bg); color: var(--warn); }
.msg { border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.success { background: var(--ok-bg); color: var(--ok); }
.msg.warning { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-width: 130px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #fafbfc; position: sticky; top: 0; }
tr.click:hover td { background: #f3f7fb; cursor: pointer; }
/* Lot codes and delivery numbers stay on one line; wide tables scroll sideways instead */
td:first-child > a, td.code, .code { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--ink); white-space: nowrap; }
.chip.ok, .chip.pass, .chip.released, .chip.shipped, .chip.closed, .chip.complete { background: var(--ok-bg); color: var(--ok); }
.chip.warn, .chip.processed_hold, .chip.partially_shipped, .chip.in_process, .chip.received, .chip.unprocessed { background: var(--info-bg); color: var(--info); }
.chip.bad, .chip.fail, .chip.aborted, .chip.rejected, .chip.hold, .chip.required { background: var(--bad-bg); color: var(--bad); }
.chip.organic { background: #e9f6e5; color: #2f6b1f; }
.chip.allergen { background: var(--warn-bg); color: var(--warn); }
.chip.unreviewed { background: var(--bad-bg); color: var(--bad); }
.chip.noshow { background: var(--warn-bg); color: var(--warn); }   /* Receiving > Rejected: amber no show beside red rejected */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 8px; color: var(--ink); }
.tabs a.on { background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.tabs .spacer { flex: 1; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary { background: var(--panel); color: var(--brand); border: 1px solid var(--line); }
form.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; min-height: 44px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.fields > div > input, .fields > div > select { width: 100%; }
.lines td { padding: 6px; }
.lines input, .lines select { width: 100%; }
.muted { color: var(--muted); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.login { max-width: 380px; margin: 10vh auto; }
.login input { width: 100%; margin-bottom: 12px; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
@media (max-width: 640px) { header.top .banner-nav { width: 100%; order: 3; } header.top .banner-nav a { min-width: 64px; padding: 7px 8px; } main { padding: 14px 10px; } }
/* Floor board: readable at arm's length on a tablet */
.panel.alarm { border: 2px solid var(--bad); background: var(--bad-bg); }
.panel.alarm h2 { color: var(--bad); }
.panel.caution { border: 2px solid var(--warn); background: var(--warn-bg); }
.stat.warnstat { border-color: var(--warn); background: var(--warn-bg); }
tr.blocked td { color: var(--muted); }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.big { min-height: 56px; font-size: 18px; padding: 12px 28px; width: 100%; }
.floorforms .lines select, .floorforms .lines input { font-size: 17px; }
table.queue td { padding: 10px 8px; }
.lotcode { font-weight: 600; font-size: 16px; }
.small { font-size: 12px; }
td.big { font-size: 20px; font-weight: 600; }
.chip.reason { white-space: normal; display: inline-block; max-width: 220px; line-height: 1.3; padding: 4px 9px; }
/* Quality screen */
details { display: inline-block; vertical-align: top; margin: 2px 4px 2px 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { opacity: .7; }
form.stack { display: grid; gap: 8px; margin-top: 8px; min-width: 240px; }
.btn.danger { background: var(--bad); }
@media (max-width: 720px) {
  table.qa, table.qa tbody, table.qa tr, table.qa td { display: block; width: auto; }
  table.qa tr:first-child { display: none; }
  table.qa tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.qa td { border: 0; padding: 3px 0; text-align: left; }
  table.qa td.num[data-label]::before { content: attr(data-label) ": "; font-size: 13px; font-weight: normal; color: var(--muted); }
  table.qa input { max-width: 100%; }
  form.stack { min-width: 0; }
}
/* Shipping and certificates */
.cert-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 12px; }
.cert-head h1 { margin: 0; }
.cert-facility { text-align: right; font-size: 14px; }
.cert h2 { font-size: 15px; margin: 16px 0 8px; }
.cert-foot { margin-top: 18px; word-break: break-all; }
@media print {
  header.top, nav.subnav, .banner, .noprint, .msg.success { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  details { display: none; }
}
/* Customers and products */
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 4px; font-weight: normal; }
.row-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.row-item:last-of-type { border-bottom: 0; }
h3 { font-size: 15px; margin: 12px 0 8px; }

/* customer page: portal sign-ins */
.row-item .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.temp-password { font: 600 28px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.06em;
  padding: 12px 16px; background: #f4f7fa; border: 1px dashed #9aa9b8; border-radius: 6px; display: inline-block; user-select: all; }

/* a quantity with its unit (items / lb / pallets) */
.qty-unit { display: flex; gap: 6px; align-items: center; }
.qty-unit input { width: 7em; min-width: 0; }
td.num.qty-unit { justify-content: flex-end; }

/* sortable column headings (sort.js) */
th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
th button.sort:focus-visible { outline: 2px solid #0b5ea8; outline-offset: 2px; }
th button.sort::after { content: "↕"; opacity: .35; font-size: .85em; }
th[aria-sort="ascending"] button.sort::after { content: "▲"; opacity: .8; }
th[aria-sort="descending"] button.sort::after { content: "▼"; opacity: .8; }

/* sign-in: show / hide the password */
.password-field { display: flex; gap: 8px; align-items: stretch; }
.password-field input { flex: 1; min-width: 0; }
.password-field .password-toggle { flex: none; min-width: 72px; }
.login .password-field { margin-bottom: 12px; }
.login .password-field input { margin-bottom: 0; }

/* collector key, shown once (Maintenance > Machine uplink) */
code.key { display: block; padding: .6rem; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; word-break: break-all; user-select: all; font-size: .95rem; }
.tabs .tab-group { margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
details.inline { display: inline-block; }
details.inline[open] { display: block; width: 100%; }
form.inline-form { display: inline-flex; }
input.short { width: 170px; min-height: 40px; }
.tabs.pills a { padding: 5px 12px; font-size: 14px; }
.records-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.records-filters .inline-label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
/* Processing Floor: a lot's status, chosen from a menu (like Katana) */
details.status-menu { position: relative; display: inline-block; }
details.status-menu > summary { cursor: pointer; list-style: none; padding: 6px 12px; font-size: 14px; }
details.status-menu > summary::-webkit-details-marker { display: none; }
details.status-menu .menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 260px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 6px; }
details.status-menu .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px;
  padding: 10px 12px; font-size: 15px; cursor: pointer; color: var(--ink); min-height: 44px; }
details.status-menu .menu button:hover:not(:disabled) { background: var(--bg); }
details.status-menu .menu button.current { font-weight: 700; color: var(--brand); }
details.status-menu .menu button:disabled:not(.current) { color: var(--muted); cursor: not-allowed; }
details.status-menu .menu button .small { display: block; font-weight: 400; }
.chip.partrej { background: #f1e8fb; color: #6b2fa3; }   /* part of a delivery rejected at the dock */
/* Processing Floor: processing order (1 = next); hover beside a lot for the up/down arrows (always shown on touch) */
.queue th.rank-h, .queue td.rank { width: 64px; text-align: center; white-space: nowrap; position: relative; }
.queue td.rank .pos { display: block; font-size: 22px; font-weight: 700; color: var(--ink); }
.queue td.rank .next { margin-top: 2px; }
.queue tr.next-up td { background: var(--ok-bg); }
.queue td.rank .mover { display: flex; flex-direction: column; gap: 2px; position: absolute; left: -2px; top: 50%; transform: translateY(-50%);
  visibility: hidden; }
.queue tr:hover td.rank .mover, .queue td.rank:focus-within .mover { visibility: visible; }
.queue td.rank .mover button { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 5px;
  background: var(--panel); color: var(--brand); font-size: 12px; cursor: pointer; line-height: 1; }
.queue td.rank .mover button:hover { background: var(--brand); color: #fff; }
@media (hover: none) { .queue td.rank .mover { visibility: visible; position: static; transform: none; flex-direction: row; justify-content: center; }
  .queue td.rank .mover button { width: 40px; height: 40px; font-size: 16px; } }
.queue td.rank { padding-left: 34px; }
@media (hover: none) { .queue td.rank { padding-left: 8px; } }
button.is-busy { opacity: .6; cursor: progress; }
button[data-guarded] { cursor: progress; }

/* °F / °C switch in the top bar (migration 036) */
/* Settings: the gear in the top bar (migration 038) */
header.top .gear { margin-left: auto; margin-right: 10px; display: inline-flex; padding: 6px; border-radius: 6px; color: inherit; opacity: .8; }
header.top .gear:hover, header.top .gear:focus-visible { opacity: 1; background: rgba(255,255,255,.15); }
header.top .gear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-form { max-width: 460px; display: grid; gap: 14px; }
.settings-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0; }
.settings-form legend { font-weight: 600; padding: 0 4px; }
.settings-form label.choice { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); margin: 6px 0; }

/* Locations: history range, statistics, graph */
.range-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-bottom: 14px; }
.range-form .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.range-form label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.btn.on { background: var(--brand); color: var(--brand-ink); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--ink); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.ok { border-left: 4px solid var(--ok); } .stat.bad { border-left: 4px solid var(--bad); } .stat.none { border-left: 4px solid #98a2b3; }
.chip.big { font-size: 18px; padding: 4px 10px; }
.tchart { position: relative; margin: 12px 0 8px; }
.tchart-plot { width: 100%; outline: none; border-radius: 6px; }
.tchart-plot:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.tchart svg { display: block; width: 100%; height: auto; }
.tchart .grid { stroke: var(--line); stroke-width: 1; }
.tchart .tick { fill: var(--muted); font-size: 11px; }
.tchart .band { fill: var(--ok-bg); }
.tchart .band-edge { stroke: var(--ok); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.tchart .nodata { fill: #98a2b3; opacity: .18; }
.tchart .envelope { fill: var(--brand); opacity: .16; }
.tchart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tchart .line-dot { fill: var(--brand); }
.tchart .cross { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.tchart .cross-dot { fill: var(--brand); stroke: var(--panel); stroke-width: 2; }
.tchart-tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px; font-size: 13px; box-shadow: 0 2px 8px rgba(16,24,40,.12); white-space: nowrap; color: var(--muted); }
.tchart-tip strong { color: var(--ink); font-size: 15px; }
.tchart-tip .out { color: var(--bad); font-weight: 600; }
header.top .gear + .who { margin-left: 0; }

/* Day picker (migration 037) */
.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.day-nav .day-label { font-weight: 600; font-size: 16px; margin: 0; }
.day-nav .day-pick { display: flex; align-items: center; gap: 8px; }
.day-nav input[type=date] { padding: 4px 6px; }

/* Schedule: week and month calendars, the week strip on Home */
.calendar { display: grid; gap: 6px; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head div { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.cal-day { display: flex; flex-direction: column; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; color: var(--ink); text-decoration: none; min-height: 96px; min-width: 0; }
.calendar.week .cal-day { min-height: 150px; }
.cal-day:hover, .cal-day:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cal-day.today { border: 2px solid var(--brand); }
.cal-day.past { background: #fafbfc; }
.cal-day.other { opacity: .55; }
.cal-date { font-weight: 700; font-size: 13px; }
.cal-line { font-size: 12px; color: var(--muted); } .cal-line b { color: var(--ink); }
.cal-line.zero b { color: var(--muted); font-weight: 400; }
.cal-util { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px; font-size: 12px; }
.cal-util-name { color: var(--muted); }
.cal-util .bar { height: 6px; background: var(--chip); border-radius: 3px; overflow: hidden; }
.cal-util .fill { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.cal-util .fill.high { background: var(--warn); } .cal-util .fill.over { background: var(--bad); }
b.over { color: var(--bad); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 760px) {
  .cal-head { display: none; }
  .cal-week, .week-strip { grid-template-columns: 1fr; }
  .calendar.month .cal-day.other { display: none; }
  .cal-day { min-height: 0; }
}

/* A temperature: click (or Enter) to show it in the other unit, again to switch back (core/temps.js) */
.t { cursor: pointer; border-bottom: 1px dotted currentColor; white-space: nowrap; }
.t:hover { border-bottom-style: solid; }
.t:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }
.t.alt { font-style: italic; }

/* Denser tables, like Katana (user, 2026-10-15): one line per row, smaller type. The floor's tablet tables
   (table.queue, .lines) keep their own larger rows. */
table { font-size: 13.5px; }
th, td { padding: 6px 10px; }
th { font-size: 11px; }
table.dense td { white-space: nowrap; vertical-align: middle; }
table.dense .chip { padding: 1px 8px; font-size: 11.5px; }
tr.total td { background: #fafbfc; }
td.nowrap, .nowrap { white-space: nowrap; }
/* Processing Floor open lots: one line per lot like Ready to Process (user, 2026-10-17) */
table.queue.dense td { padding: 6px 10px; }
.queue.dense th.rank-h, .queue.dense td.rank { width: auto; text-align: left; padding-left: 50px; padding-right: 6px; }
.queue.dense td.rank .pos { display: inline; font-size: inherit; }
.queue.dense td.rank .mover { flex-direction: row; left: 4px; }
.queue.dense td.rank .mover button { width: 20px; height: 20px; font-size: 10px; }
.queue.dense details.status-menu > summary { padding: 1px 8px; font-size: 11.5px; }
.queue.dense .chip.reason { white-space: nowrap; max-width: none; padding: 1px 8px; }
.btn.rowbtn { padding: 2px 10px; font-size: 12px; line-height: 1.3; min-height: 0; vertical-align: middle; }
.queue.dense details.status-menu, .queue.dense .chip { vertical-align: middle; }
.queue.dense details.status-menu { margin: 0; }
.queue.dense th { white-space: nowrap; }
/* narrower screens (floor tablets): the Lot column drops out so Status and Record cycle stay in view; the batch # links
   to the lot (user, 2026-10-17) */
@media (max-width: 1279.98px) { .floorq .lotcol { display: none; } table.queue.dense.floorq th, table.queue.dense.floorq td { padding-left: 7px; padding-right: 7px; }
  .floorq .chip.reason { max-width: 190px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  .floorq td.rank .mover { left: 2px; padding: 2px; background: var(--panel); border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.18); z-index: 2; } }
@media (hover: none) { .queue.dense td.rank { padding-left: 10px; width: auto; }
  .queue.dense td.rank .mover { display: inline-flex; vertical-align: middle; margin-right: 6px; }
  .queue.dense td.rank .mover button { width: 34px; height: 30px; font-size: 13px; } }
.filters.records-filters input, .filters.records-filters select, .filters.records-filters .btn { padding: 5px 8px; font-size: 14px; min-height: 34px; }
.filters.records-filters input[type=search] { min-width: 310px; }
/* The three numbers of a lot (migration 038): the SO # (order), the customer lot # (theirs) and the batch # (ours) */
.idn { font-variant-numeric: tabular-nums; white-space: nowrap; }
.idn.so { color: #0b5ea8; }
.idn.batch { font-weight: 600; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
.idn.cust { color: #5b4a00; }
.idn.big { font-size: 1em; }
p.ids { margin: 2px 0 4px; font-size: 14px; }
.chip.split { background: #f1e8fb; color: #6b2fa3; }
.chip.dl-shipped { background: var(--ok-bg); color: var(--ok); }
.chip.dl-partial, .chip.dl-in_plant { background: var(--info-bg); color: var(--info); }
.chip.dl-closed { background: var(--chip); color: var(--muted); }
.chip.dl-order.st-cancelled, .chip.dl-order.st-declined, .chip.dl-order.st-rejected, .chip.dl-order.st-no_show { background: var(--bad-bg); color: var(--bad); }
.idn.batch.lotcode { font-size: 16px; }   /* the floor board: readable on a tablet */
/* Home > Schedule printed or saved as PDF (user, 2026-10-16): the calendar alone, landscape */
.print-only { display: none; }
@media print {
  @page { size: landscape; margin: 10mm; }
  .print-only { display: block; }
  .tabs a, .tabs button, p.sub, .day-nav { display: none !important; }
  .calendar a { color: #000; text-decoration: none; break-inside: avoid; }
  .calendar { font-size: 11px; }
}
.small-btn { min-height: 30px; padding: 4px 10px; font-size: 13px; }
td.actions { white-space: nowrap; }
td.actions form.inline, td.actions a { display: inline-block; margin-right: 4px; }
.prewrap { white-space: pre-wrap; }
.qty-unit select.temp-unit { width: auto; }
.chip.redlight { background: var(--bad-bg); color: var(--bad); }
.chip.greenlight { background: var(--ok-bg); color: var(--ok); }

/* Table settings and column information, like Katana (user, 2026-10-17; core/tables.js) */
.table-tools { display: flex; justify-content: flex-end; margin: 0 0 4px; }
.table-tools.in-heading { float: right; margin: -4px 0 0 12px; }
.table-tools .gear { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid transparent; border-radius: 6px; background: none; color: var(--brand); cursor: pointer; }
.table-tools .gear:hover, .table-tools .gear:focus-visible { background: var(--info-bg); border-color: var(--line); outline: none; }
.table-tools .gear.on { color: var(--warn); }                       /* some columns are hidden */
.table-tools .gear svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.col-off { display: none !important; }
.col-menu { position: fixed; z-index: 60; width: 260px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); padding: 6px 0; font-size: 14px; }
.col-menu .col-reset { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 14px; font: inherit;
  color: var(--ink); cursor: pointer; }
.col-menu .col-reset:hover { background: var(--bg); }
.col-menu input[type=search] { display: block; width: calc(100% - 24px); margin: 4px 12px 6px; padding: 6px 8px; font: inherit;
  border: 1px solid var(--line); border-radius: 6px; box-sizing: border-box; min-height: 34px; }
.col-menu .col-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 4px; }
.col-menu .col-list label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 14px; font-size: 14px; font-weight: 400; cursor: pointer; color: var(--ink); }
.col-menu .col-list label:hover { background: var(--bg); }
.col-menu .col-list input { width: 16px; height: 16px; min-height: 0; accent-color: var(--brand); margin: 0; flex: none; }
.col-menu .col-list input:disabled + * , .col-menu .col-list label[title] { color: var(--muted); cursor: default; }
th .col-info { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; margin-left: 4px; padding: 0;
  border: 0; border-radius: 50%; background: #b5bcc8; color: #fff; font: 700 9px/1 Georgia, serif; font-style: italic; cursor: help;
  vertical-align: 1px; text-transform: none; }
th .col-info:hover, th .col-info:focus-visible { background: var(--brand); outline: none; }
.col-info-pop { position: fixed; z-index: 70; width: 300px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); padding: 14px 16px 12px; }
.col-info-pop .col-info-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-weight: 700; font-size: 16px;
  color: var(--ink); }
.col-info-pop .col-info-close { background: none; border: 0; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.col-info-pop p { margin: 8px 0 0; font-size: 14px; color: var(--ink); line-height: 1.45; }
@media (hover: none) { th .col-info { width: 18px; height: 18px; font-size: 11px; } }
/* Filter row and column widths (user, 2026-10-17; core/tables.js) */
tr.filters th { position: static; background: var(--panel); padding: 4px 6px; text-transform: none; letter-spacing: 0; }
tr.filters .filter-box { display: flex; align-items: center; gap: 4px; }
tr.filters input { width: 100%; min-width: 50px; min-height: 0; height: 26px; padding: 2px 6px; font: 12.5px/1.2 inherit; font-family: inherit;
  border: 1px solid var(--line); border-radius: 4px; box-sizing: border-box; background: var(--panel); }
tr.filters input:focus { border-color: var(--brand); outline: none; }
tr.filters .filter-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; display: block; }
tr.filtered-out { display: none !important; }
table.filtering tr.filters input:not(:placeholder-shown) { border-color: var(--brand); background: var(--info-bg); }
th .col-resize { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
th .col-resize:hover, body.col-resizing th .col-resize:active { background: linear-gradient(to right, transparent 5px, var(--brand) 5px, var(--brand) 7px, transparent 7px); }
body.col-resizing { cursor: col-resize; user-select: none; }
table.resized { table-layout: fixed; }
table.resized td, table.resized th { overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
/* Column order: drag a heading by its six-dot handle (user, 2026-10-17; core/tables.js) */
th .col-move { float: left; display: flex; align-items: center; width: 9px; height: 14px; margin: 1px 5px 0 -3px;
  color: var(--muted); opacity: .35; cursor: grab; touch-action: none; }
th:hover .col-move { opacity: .75; }
th .col-move:hover { opacity: 1; color: var(--brand); }
th .col-move svg { width: 9px; height: 14px; fill: currentColor; display: block; }
body.col-moving, body.col-moving * { cursor: grabbing !important; user-select: none; }
th.col-dragging { background: var(--info-bg); }
.col-drop { position: fixed; z-index: 65; width: 3px; background: var(--brand); border-radius: 2px; pointer-events: none; }
/* Faint lines between columns, so each column's edges are easy to see (user, 2026-10-17) */
th, td { border-right: 1px solid #eceef2; }
th:last-child, td:last-child { border-right: 0; }
/* Table settings: drag a column's line by its handle to move the column (user, 2026-10-17) */
.col-menu .menu-move, .col-menu .menu-move-space { flex: none; width: 10px; height: 16px; margin-right: -2px; }
.col-menu .menu-move { color: var(--muted); opacity: .55; cursor: grab; touch-action: none; display: flex; align-items: center; }
.col-menu .menu-move:hover { opacity: 1; color: var(--brand); }
.col-menu .menu-move svg { width: 10px; height: 16px; fill: currentColor; }
.col-menu .col-list label.menu-dragging { background: var(--info-bg); box-shadow: 0 2px 8px rgba(16, 24, 40, .15); position: relative; z-index: 1; }
