:root {
  --canvas: #f3f5f8;
  --tape: #ffffff;
  --ink: #1c2128;
  --muted: #5d6875;
  --line: #e3e7ec;
  --rail: #f7f8fa;
  --empty: #8b95a1;
  --in: #0c7a52;
  --mixed: #b45309;
  --select: #e7eef8;
  --select-bar: #1e4d86;
  --warn-bg: #fff4e5;
  --warn: #9a3412;
  --err-bg: #fdecec;
  --err: #9f1239;
  --top: 40px;
  --row: 26px;
  --bay: 22px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--select-bar); outline-offset: 2px; }

.app { height: 100%; display: flex; flex-direction: column; min-width: 960px; }
.top {
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
  flex: none;
}
.logo { height: 26px; width: auto; display: block; }
.brand { font-weight: 600; letter-spacing: 0.01em; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 8px; }
.spacer { flex: 1; }
.who { color: var(--muted); font-variant-numeric: tabular-nums; }
.who button { color: var(--ink); margin-left: 10px; text-decoration: underline; text-underline-offset: 2px; }

.body { flex: 1; min-height: 0; display: flex; }
.nav {
  width: 200px;
  flex: none;
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav button {
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-radius: 2px;
  width: 100%;
}
.aisle {
  min-height: 36px;
  height: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  border-radius: 2px;
  width: 100%;
}
.nav button[aria-current="page"], .aisle[aria-current="true"] { background: var(--ink); color: var(--tape); }
.stage { flex: 1; min-width: 0; position: relative; }
.tool {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 280px;
  background: var(--tape);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px 14px;
}
.kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool strong { display: block; font-size: 18px; font-weight: 600; margin: 6px 0 4px; }
.tool em { font-style: normal; color: var(--muted); }
.tool:hover { border-color: var(--ink); }

.icons {
  width: 48px;
  flex: none;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  gap: 4px;
}
.icons button {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  display: grid;
  place-items: center;
}
.icons button[aria-current="page"] { background: var(--ink); color: var(--tape); }
.icons svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.aisles {
  width: 160px;
  flex: none;
  background: var(--rail);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 6px;
}
.aisle b { font-weight: 600; }
.aisle small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.2;
  color: inherit;
  opacity: 0.8;
  white-space: nowrap;
}

.board { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.command {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--tape);
}
.command input {
  flex: 1;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--tape);
  border-radius: 2px;
  padding: 0 8px;
  font-family: "IBM Plex Mono", monospace;
}
.chips { display: flex; gap: 2px; }
.chips button, .textbtn {
  height: 26px;
  padding: 0 8px;
  border-radius: 2px;
  color: var(--muted);
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--tape); }
.textbtn { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }

.banner {
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--warn-bg);
  color: var(--warn);
  border-bottom: 1px solid var(--line);
}
.banner.error { background: var(--err-bg); color: var(--err); }

.cols {
  height: 22px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cols .gutter, .skuline .gutter { width: 8px; flex: none; }
.chev { width: 14px; flex: none; color: var(--muted); text-align: center; }
.binblock { width: 100%; }
.skuline {
  display: flex;
  align-items: center;
  height: var(--row);
  padding: 0 8px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
}
.name.count { color: var(--muted); }
.tape { flex: 1; min-height: 0; overflow: auto; background: var(--tape); position: relative; }
.win { position: relative; }
.bayline, .binline {
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.bayline {
  height: var(--bay);
  position: sticky;
  top: 0;
  background: var(--rail);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}
.binline { height: var(--row); background: var(--tape); }
.binline.selected { background: var(--select); box-shadow: inset 3px 0 0 var(--select-bar); }
.glyph {
  width: 8px;
  height: 8px;
  flex: none;
  border: 1.5px solid var(--empty);
}
.glyph.in { background: var(--in); border-color: var(--in); }
.glyph.mixed {
  border-color: var(--mixed);
  background: var(--mixed);
  box-shadow: inset -4px 0 0 var(--tape);
}
.code { font-family: "IBM Plex Mono", monospace; width: 148px; flex: none; }
.skus { font-family: "IBM Plex Mono", monospace; width: 220px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.qty { width: 72px; flex: none; text-align: right; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.empty-copy { color: var(--empty); }

.detail {
  width: 300px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--tape);
  overflow: auto;
  padding: 12px;
}
.detail h2 {
  margin: 4px 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 500;
}
.detail p { margin: 0 0 8px; color: var(--muted); }
.sku-block { border-top: 1px solid var(--line); padding: 8px 0; display: flex; gap: 8px; align-items: flex-start; }
.sku-copy { min-width: 0; }
.sku-block b { display: block; font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.thumb {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex: none;
  background: var(--rail);
  border: 1px solid var(--line);
}
.meta { color: var(--muted); margin-top: 2px; }
.detail label { display: block; margin: 8px 0 4px; color: var(--muted); }
.detail input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--tape);
  border-radius: 2px;
  padding: 0 8px;
  font-family: "IBM Plex Mono", monospace;
}
.primary {
  margin-top: 10px;
  height: 32px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--tape);
  border-radius: 2px;
}
.note { margin-top: 12px; color: var(--muted); font-size: 12px; }

.people { flex: 1; min-width: 0; padding: 16px 20px; overflow: auto; }
.people h1 { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.people .lead { color: var(--muted); margin: 0 0 14px; }
table { width: 100%; border-collapse: collapse; background: var(--tape); }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 6px 8px; height: 32px; }
th { font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
td.mid, th.mid { text-align: center; width: 90px; }
.add-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.add-row input[type="email"] {
  width: 260px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--tape);
  border-radius: 2px;
  padding: 0 8px;
}
.check { display: flex; align-items: center; gap: 4px; color: var(--muted); }

.login {
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--canvas);
}
.card {
  width: 360px;
  background: var(--tape);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px;
}
.card h1 { font-size: 20px; margin: 8px 0 4px; font-weight: 600; }
.card p { margin: 0 0 14px; color: var(--muted); }
.card label { display: block; margin: 10px 0 4px; color: var(--muted); }
.card input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--tape);
  border-radius: 2px;
  padding: 0 8px;
}
.card .primary { width: 100%; }
.form-error { margin-top: 8px; color: var(--err); min-height: 1.2em; }
.skeleton .binline { color: transparent; }
.skeleton .glyph, .skeleton .code, .skeleton .skus { background: var(--line); color: transparent; border-color: transparent; }
