/* ---------- base ---------- */
:root {
  --bg: #f5f6f8; --panel: #fff; --ink: #1c2230; --muted: #6b7385; --line: #e2e5eb;
  --brand: #1f2a44; --accent: #2e8b57; --warn: #b7791f; --old: #c53030; --link: #2b6cb0;
  --po: #2b6cb0; --return: #805ad5; --built: #2e8b57;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 10px; }
h2 { font-size: 17px; margin: 26px 0 8px; }
h3 { font-size: 15px; margin: 0; }
main { padding: 24px; max-width: 1200px; margin: 0 auto; }

/* ---------- top bar ---------- */
/* Everything in the bar is one height (--bar-h) so links, search and buttons line up. */
.top { --bar-h: 36px; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--brand); color: #fff; flex-wrap: wrap; position: relative; z-index: 30; }
.top .brand { color: #fff; font-weight: 700; font-size: 17px; white-space: nowrap; }
.top .brand:hover { text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav > a, .navitem > a {
  display: inline-flex; align-items: center; gap: 5px; height: var(--bar-h); padding: 0 10px;
  border-radius: 6px; color: #cfd6e6; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.top nav > a.on, .top nav > a:hover, .navitem > a.on, .navitem:hover > a, .navitem:focus-within > a {
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none;
}
.navitem .caret { font-size: 10px; opacity: .8; transition: transform .15s; }
.navitem:hover .caret, .navitem:focus-within .caret { transform: rotate(180deg); }

/* The Locations tab still goes to the overview; hovering it opens the zones. :focus-within
   keeps it reachable from the keyboard. The menu sits flush under the tab and its top
   padding does the spacing, so the pointer never crosses a gap on the way down. */
.navitem { position: relative; display: inline-flex; }
.navmenu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 40;
  min-width: 200px; padding-top: 6px;
}
.navmenu-inner {
  display: block; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.navitem:hover .navmenu, .navitem:focus-within .navmenu { display: block; }
.top nav .navmenu a {
  display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap;
}
.top nav .navmenu a:hover, .top nav .navmenu a:focus-visible { background: #eef2f8; color: var(--brand); text-decoration: none; }
.navmenu .sep { display: block; border-top: 1px solid var(--line); margin: 6px 4px; }

.top .find { flex: 1; min-width: 140px; margin: 0; }
.top .find input { width: 100%; max-width: 340px; height: var(--bar-h); padding: 0 12px; border-color: transparent; }
.topbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.topbtns .btn { display: inline-flex; align-items: center; height: var(--bar-h); padding: 0 11px; font-size: 14px; }
.whoami { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; white-space: nowrap; }
.whoami .btn { height: var(--bar-h); padding: 0 11px; font-size: 14px; }

/* ---------- notices ---------- */
.flash { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: 6px; font-weight: 600; margin-bottom: 14px; }
.flash.ok { background: #e6f4ec; color: #1f6b43; }
.flash.err { background: #fdecec; color: var(--old); }
.flash.warn { background: #fdf3e1; color: #8a5a12; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; }
.field-error { color: var(--old); font-size: 13px; font-weight: 600; }
p.field-error { margin: 4px 0 8px; }

/* ---------- inputs + buttons ---------- */
input, select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label input, label select { color: var(--ink); font-size: 15px; }
label.scan input { font-size: 20px; padding: 10px 12px; }
.btn { display: inline-block; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: #f0f2f5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #267a4b; }
.btn.light { background: #fff; color: var(--brand); border-color: #fff; }
.btn.light:hover { background: #e8ecf3; }
.top .btn.on { box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--accent); }
.btn.danger { color: var(--old); border-color: #f1c4c4; }
.btn.danger:hover { background: #fdecec; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { font-size: 17px; padding: 12px 24px; }
button.rm { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 6px; }
button.rm:hover { color: var(--old); border-color: #f1c4c4; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.dim td { color: var(--muted); }
table.entry { border: 0; background: none; margin-bottom: 8px; }
table.entry th { background: none; }
table.entry td { padding: 4px 8px 4px 0; border: 0; vertical-align: middle; }
table.entry input { width: 100%; }
table.entry input.qty { width: 90px; }
table.entry.build td { border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.loose { margin-top: 8px; }
table.loose thead tr:first-child th { background: #f6f1fd; color: var(--return); }
.po-echo { font-weight: 600; min-width: 90px; }

/* Receive PO: SKU × pallet grid */
.scroll-x { overflow-x: auto; }
table.split input { min-width: 70px; }
table.split td:first-child input { min-width: 140px; }
table.split th.pallet-col { white-space: nowrap; background: #f4f6f9; border-radius: 6px 6px 0 0; }
table.split td.pallet-cell { background: #f9fafb; }
table.split tfoot th { background: none; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; }
table.split td.left, table.split .total-left { font-weight: 700; min-width: 60px; }
td.left.done { color: var(--accent); }
td.left.under { color: var(--warn); }
td.left.over, .total-left.over { color: var(--old); }
.link-btn { border: 0; background: none; color: var(--link); font: inherit; font-size: 12px; cursor: pointer; padding: 0 2px; text-transform: none; letter-spacing: 0; }
.rm-col { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 2px; }
.rm-col:hover { color: var(--old); }

/* ---------- layout + text helpers ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 12px 0; }
.panel.signin { max-width: 360px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; }
.panel.signin h1 { margin: 0; }
.panel.signin p { margin: 0; }
.panel.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.grid2 .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.head .actions { margin-top: 0; }
.head p { margin: 4px 0; }
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filters input[name=q] { min-width: 260px; }
.flow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; color: var(--muted); }
.flow a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink); font-weight: 600; font-size: 13px; }
.note { background: #fff8e6; border-left: 3px solid var(--warn); padding: 6px 10px; }
.r { text-align: right; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.small { font-size: 13px; }
.big { font-size: 18px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }
.old { color: var(--old); font-weight: 700; }

/* ---------- pills + chips ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #edf0f4; color: var(--muted); vertical-align: middle; text-transform: capitalize; }
.pill.po { background: #e6f0fa; color: var(--po); text-transform: none; }
.pill.return { background: #f1ebfb; color: var(--return); }
.pill.built { background: #e6f4ec; color: var(--built); }
.pill.mixed { background: #fff3e0; color: #b45309; text-transform: none; }
.chip form { display: inline; margin: 0; }
.chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 6px; }
.chip-x:hover { color: var(--old); }
.chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 10px; border-radius: 999px; background: #f0f3f7; border: 1px solid var(--line); font-size: 13px; }

/* ---------- drop-downs ---------- */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* Locations page: one section per zone */
.zone-sec { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 8px; margin-bottom: 12px; }
.z-receiving { border-left-color: var(--po); }
.z-warehouse { border-left-color: var(--warn); }
.z-workstation { border-left-color: var(--return); }
.z-outbound { border-left-color: var(--built); }
.zone-sec > summary { display: flex; align-items: center; gap: 18px; padding: 14px 18px; flex-wrap: wrap; }
/* A chevron drawn with borders: the ▸ character renders tiny in most fonts. */
.zone-sec > summary::before {
  content: ""; flex: none; width: 10px; height: 10px; margin: 0 4px 0 2px;
  border-right: 3px solid var(--muted); border-bottom: 3px solid var(--muted); border-radius: 1px;
  transform: rotate(-45deg); transition: transform .15s, border-color .15s;
}
.zone-sec > summary:hover::before { border-color: var(--ink); }
.zone-sec[open] > summary::before { transform: rotate(45deg); }
.zname { font-size: 18px; font-weight: 700; min-width: 130px; color: var(--ink); }
a.zname:hover { color: var(--link); }
.flow a:hover { border-color: #b8c0cc; text-decoration: none; }
.zstat { color: var(--muted); }
.zstat b { color: var(--ink); }
.zact { margin-left: auto; }
.zbody { padding: 0 18px 16px; }
.station { border-top: 1px solid var(--line); padding: 12px 0; }
.station-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.station-head .btn { margin-left: auto; }
.loclist { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.addloc { display: flex; gap: 6px; margin-left: auto; }
.addloc input { font-size: 13px; padding: 4px 8px; }

/* one pallet */
.pcard { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: #fcfcfd; }
.pcard > summary { display: grid; grid-template-columns: 90px 70px minmax(120px, 1.4fr) 90px 1fr 80px; gap: 12px; align-items: center; padding: 9px 14px; }
.pcard > summary:hover { background: #f4f6f9; }
.pcard[open] > summary { border-bottom: 1px solid var(--line); background: #f4f6f9; }
.pno { font-weight: 700; }
.pos { font-weight: 600; }
.units { color: var(--muted); font-size: 13px; }
.age { text-align: right; }
.pbody { padding: 10px 14px 12px; }
.pbody table.lines { max-width: 560px; }
.pbody p { margin: 8px 0 0; }

/* POs page: one row per PO */
.pogrid { display: grid; grid-template-columns: minmax(150px, 2fr) repeat(7, minmax(70px, 1fr)) minmax(130px, 1.6fr); gap: 12px; align-items: center; padding: 10px 16px; }
.skugrid { display: grid; grid-template-columns: minmax(110px, 1.4fr) repeat(8, minmax(64px, 1fr)) minmax(100px, 1.2fr); gap: 10px; align-items: center; padding: 10px 16px; }
.onhand { font-size: 16px; }
label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.pohead { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-bottom: 4px; }
.pohead span:first-child { padding-left: 14px; }
.porow { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.porow > summary { position: relative; padding-left: 30px; }
.porow > summary::before { content: "▸"; position: absolute; left: 12px; color: var(--muted); transition: transform .15s; }
.porow[open] > summary::before { transform: rotate(90deg); }
.porow > summary:hover, .porow[open] > summary { background: #f4f6f9; }
.pobody { padding: 12px 16px 16px; border-top: 1px solid var(--line); }


/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .pogrid, .skugrid { grid-template-columns: 1fr 1fr 1fr; }
  .pohead { display: none; }
}
@media (max-width: 700px) {
  main { padding: 16px; }
  .top { padding: 10px 16px; gap: 10px; }
  .top nav { flex-wrap: wrap; }
  .kpi-value { font-size: 24px; }
  .top .find input { max-width: none; }
  .topbtns { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .topbtns .btn { justify-content: center; }
  /* Wide tables scroll sideways inside themselves instead of dragging the page with them. */
  main table { display: block; max-width: 100%; overflow-x: auto; }
  main table th, main table td { white-space: nowrap; }
  .filters input[name=q] { min-width: 0; flex: 1 1 100%; }
  .panel.inline > * { flex: 1 1 100%; }
  .pcard > summary { grid-template-columns: 1fr 1fr; }
  .age { text-align: left; }
}

/* The "which PO?" window shown before the receiving grid. */
dialog.ask {
  border: 1px solid var(--line, #d7d7d7);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  padding: 1.25rem 1.5rem 1.5rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
}
dialog.ask::backdrop { background: rgba(0, 0, 0, .45); }
dialog.ask h2 { margin: 0 0 .25rem; }
dialog.ask label { display: block; margin: 1rem 0; }
dialog.ask input { width: 100%; font-size: 1.25rem; padding: .5rem .6rem; }
dialog.ask .actions { margin-bottom: 0; }

/* "Add loose stock" on the build page stays folded away until it is needed. */
details.addstock > summary {
  cursor: pointer;
  font-weight: 600;
  padding: .25rem 0;
}
details.addstock[open] > summary { margin-bottom: .75rem; }

/* ---------- zone pages ---------- */
.ztabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.ztabs a {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 600;
}
.ztabs a:hover { border-color: #b8c0cc; text-decoration: none; }
.ztabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.zstats { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 12px 16px; }
.zstats b { font-size: 17px; }
.zstats .grow { flex: 1; }

form.addspots .wide { display: block; }
form.addspots input[name=code] { width: 100%; font-size: 17px; padding: 9px 11px; }

table.spots td.holding { line-height: 1.9; }
table.spots td.holding a { margin-right: 6px; }
table.spots form { display: inline; margin: 0; }

button.chip-btn { cursor: pointer; font: inherit; font-size: 13px; }
button.chip-btn:hover { border-color: #b8c0cc; background: #e8edf4; }
form.restore { display: inline; margin: 0; }

/* Rename on a zone page: a small pop-over form under the button. */
details.rename { position: relative; display: inline-block; }
details.rename > summary.btn { list-style: none; }
details.rename[open] > summary.btn { background: #eef2f8; }
details.rename form {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex !important; gap: 6px;
  padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
details.rename input { width: 160px; font-size: 14px; padding: 5px 8px; text-transform: uppercase; }

/* ---------- history ---------- */
table.history tr.dayrow th { background: #eef1f5; color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: 0; padding: 6px 12px; }
.ev { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: #edf0f4; color: var(--muted); }
.ev-received { background: #e6f0fa; color: var(--po); }
.ev-transfer { background: #edf0f4; color: var(--brand); }
.ev-built { background: #e6f4ec; color: var(--built); }
.ev-dissolved { background: #fff3e0; color: #b45309; }
.ev-shipped { background: #e7f6f5; color: #0f766e; }
.ev-loose { background: #f1ebfb; color: var(--return); }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.kpi:hover { text-decoration: none; border-color: #b8c0cc; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 700; line-height: 1.15; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-grid .panel { margin: 0; }
.dash-chart, .dash-wide { grid-column: 1 / -1; }
.dash-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; font-size: 16px; }
.legend { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.sw-recv { background: #2a78d6; }
.sw-ship { background: #eb6834; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: #eceef2; stroke-width: 1; }
svg.chart .axis { stroke: #c9ced8; stroke-width: 1; }
svg.chart .tick { fill: var(--muted); font-size: 11px; }
svg.chart .bar-recv { fill: #2a78d6; }
svg.chart .bar-ship { fill: #eb6834; }
svg.chart .hit { fill: transparent; }
svg.chart .day:hover .hit { fill: #f2f4f8; }
.dash-table { margin-top: 8px; }
.dash-table table { max-width: 360px; margin-top: 8px; }
.zbar { display: grid; grid-template-columns: 110px 1fr 150px; align-items: center; gap: 12px; padding: 7px 4px; color: var(--ink); border-radius: 6px; }
.zbar:hover { background: #f4f6f9; text-decoration: none; }
.zbar-name { font-weight: 600; }
.zbar-track { width: 100%; height: 10px; display: block; }
.zbar-track .track { fill: #eef1f5; }
.zbar-track .fill.z-receiving { fill: var(--po); }
.zbar-track .fill.z-warehouse { fill: var(--warn); }
.zbar-track .fill.z-workstation { fill: var(--return); }
.zbar-track .fill.z-outbound { fill: var(--built); }
table.plain { border: 0; background: none; }
table.plain td { padding: 7px 4px; }
@media (max-width: 800px) {
  .dash-grid { grid-template-columns: 1fr; }
  .zbar { grid-template-columns: 90px 1fr; }
  .zbar-val { grid-column: 2; }
}

/* ---------- return condition grades ---------- */
.pill.grade { background: #f1ebfb; color: var(--return); text-transform: none; white-space: nowrap; }
.pill.hold { background: #fff3e0; color: #b45309; text-transform: none; white-space: nowrap; }
.pill.ready { background: #e6f4ec; color: var(--built); text-transform: none; white-space: nowrap; }
table.entry select { font-size: 14px; padding: 6px 8px; }

/* ---------- zone page ---------- */
.zone-kpis { margin-top: 4px; }
.spots-head { align-items: center; margin: 22px 0 8px; }
.spots-head h2 { margin: 0; }
#spot-filter input[type=search] { flex: 1 1 320px; max-width: 460px; }

/* Spot actions sit at the far right of each row, lined up on their right edge. */
table.spots td { vertical-align: middle; }
table.spots td.spot-actions { text-align: right; width: 1%; }
/* Let the Rename pop-up hang below the table on the last row instead of being cut off. */
table.spots { overflow: visible; }
table.spots thead th:first-child { border-top-left-radius: 8px; }
table.spots thead th:last-child { border-top-right-radius: 8px; }

/* Sortable column headings on the spots table. */
table.spots th button.sort {
  border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit;
  text-transform: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
table.spots th button.sort:hover { color: var(--ink); }
table.spots th button.sort::after { content: "↕"; opacity: .35; font-size: 11px; }
table.spots th[aria-sort] button.sort { color: var(--ink); }
table.spots th[aria-sort=ascending] button.sort::after { content: "▲"; opacity: 1; font-size: 9px; }
table.spots th[aria-sort=descending] button.sort::after { content: "▼"; opacity: 1; font-size: 9px; }

/* One spot's own page. */
.crumbs { margin: 0 0 6px; font-size: 14px; }
.mono-title { font-family: ui-monospace, Menlo, monospace; }
.mono-title .pill { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.pill.z-pill { text-transform: none; }
.pill.z-receiving { background: #e6f0fa; color: var(--po); }
.pill.z-warehouse { background: #fdf3e1; color: var(--warn); }
.pill.z-workstation { background: #f1ebfb; color: var(--return); }
.pill.z-outbound { background: #e6f4ec; color: var(--built); }

/* Grid panels may shrink below their content's width; wide tables inside scroll instead. */
.dash-grid > * { min-width: 0; }
@media (max-width: 700px) {
  /* table.spots lets the Rename pop-up overflow on wide screens; on a phone it must scroll. */
  main table.spots { overflow-x: auto; }
}

/* Warehouse "add a block" fields. */
.block-grid { display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); gap: 10px; margin-bottom: 6px; }
.block-grid input { width: 100%; }
input.upper { text-transform: uppercase; }
form.addspots h3 { margin: 12px 0 6px; }
@media (max-width: 700px) { .block-grid { grid-template-columns: repeat(2, 1fr); } }

/* Receive PO: CycleCrew packing slips to pick from. */
.slip-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 12px 0; }
.slip-list .slip { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.slip-list .slip:hover { background: #f0f2f5; text-decoration: none; }
.slip-list .slip .muted { grid-column: 1 / -1; }
.slip-list .slip.done { opacity: .6; }

/* Product details from CyclePower's catalog, under a SKU. */
.prod { font-family: system-ui, sans-serif; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; max-width: 40ch; }
.prod.inline { display: inline; margin-left: 8px; }
.prep { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pill.prep { background: #fdf3e1; color: #8a5a12; text-transform: none; font-family: system-ui, sans-serif; font-size: 11px; }
