:root {
  --bg: #0c1016;
  --panel: #131a22;
  --panel-2: #19212b;
  --line: #26313f;
  --line-2: #313e4e;
  --text: #e8edf3;
  --muted: #8a97a8;
  --accent: #35c9e0;
  --accent-ink: #06222a;
  --accent-dim: rgba(53,201,224,.14);
  --pull: #34c471;
  --lot: #f0b23a;
  --skip: #6b7789;
  --err: #ff5c6a;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  background-image:
    linear-gradient(rgba(53,201,224,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,201,224,.025) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 22px 16px 72px; }

header.top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
header.top::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 44px; height: 2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); }
header.top h1 { font-size: 19px; margin: 0; letter-spacing: .2px; font-weight: 650; }
header.top h1 a { color: var(--text); }
header.top .sub { color: var(--muted); font-size: 12px; letter-spacing: .3px; text-transform: uppercase; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
h2 { font-size: 11px; margin: 0 0 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600; }
label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; letter-spacing: .3px; }
input[type=text], textarea {
  width: 100%; background: #0f151d; border: 1px solid var(--line);
  color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; resize: vertical;
}
input[type=text]:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea { min-height: 130px; font-size: 12.5px; line-height: 1.55; font-family: var(--mono); }

button {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px;
  padding: 10px 16px; font: inherit; font-weight: 650; cursor: pointer; letter-spacing: .2px;
  transition: transform .06s ease, filter .15s ease;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); font-weight: 500; }
button.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
button.danger { background: transparent; color: var(--err); border: 1px solid var(--line-2); font-weight: 500; }
button:disabled { opacity: .5; cursor: default; transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.batch-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
  color: var(--text); transition: border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.batch-item:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.batch-item h3 { margin: 0; font-size: 16px; font-weight: 620; }
.count { background: #0f151d; border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px;
  font-size: 11px; color: var(--muted); font-family: var(--mono); }

.qrrow { display: flex; gap: 14px; flex-wrap: wrap; }
.qrcard { flex: 1 1 260px; display: flex; gap: 14px; align-items: center;
  background: #0f151d; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.qrimg { width: 108px; height: 108px; border-radius: 8px; background: #fff; padding: 5px; flex: 0 0 auto; }
.qrmeta { min-width: 0; }
.qrlabel { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; }
.qrlabel.scan { color: var(--accent); }
.qrlabel.pull { color: var(--pull); }
.qrdesc { color: var(--muted); font-size: 12px; margin: 2px 0 10px; }
.qrbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { background: #131a22; color: var(--text); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 4px 10px; font-size: 12px; font-weight: 500; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.copied { color: var(--pull) !important; border-color: var(--pull) !important; }

.tag { display: inline-block; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 6px; letter-spacing: .4px; }
.tag.PULL { background: rgba(52,196,113,.18); color: var(--pull); }
.tag.SKIP { background: rgba(107,119,137,.22); color: #aab4c2; }
.tag.LOT  { background: rgba(240,178,58,.18); color: var(--lot); }
.tag.UNSURE { background: rgba(138,151,168,.16); color: var(--muted); }
.tag.pending { background: var(--accent-dim); color: var(--accent); }
.tag.error { background: rgba(255,92,106,.16); color: var(--err); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 5px; }
.chip { font-family: var(--mono); font-size: 11px; line-height: 1.7; padding: 1px 7px; border-radius: 6px;
  background: #0f151d; color: #cbd5e1; border: 1px solid var(--line); white-space: nowrap; }
.chip.part { color: #dfe9f5; font-weight: 600; }
.chip.sku { color: var(--accent); border-color: rgba(53,201,224,.35); background: var(--accent-dim); }
.chip.price { color: #8fe0b0; border-color: rgba(52,196,113,.35); }
.rat { font-size: 12.5px; color: #cbd5e1; white-space: pre-wrap; }

.feed { display: flex; flex-direction: column; gap: 8px; }
.empty { color: var(--muted); text-align: center; padding: 34px 0; font-size: 13px; }
.mini-feed { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.mini { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 9px;
  border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 7px; flex: 0 0 auto; background: #0b0e12; }
.mtxt { flex: 1; min-width: 0; }
.cardthumb { width: 54px; height: 54px; object-fit: cover; border-radius: 7px; flex: 0 0 auto; background: #0b0e12; }

.cam-wrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
video { width: 100%; display: block; }
.cam-wrap video { max-height: 62vh; object-fit: contain; background: #000; }
.flash { position: absolute; inset: 0; background: #fff; pointer-events: none; transition: opacity .1s; }
input[type=range] { accent-color: var(--accent); }

.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { flex: 0 0 258px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.colhead { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
  position: sticky; top: 0; }
.colhead .count { font-family: var(--mono); }
.colbody { display: flex; flex-direction: column; gap: 8px; min-height: 20px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px;
  transition: border-color .12s ease; }
.kcard:hover { border-color: var(--line-2); }
.kactions { display: flex; gap: 6px; margin-top: 9px; align-items: center; }
.mini-btn { background: #0f151d; color: var(--text); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 3px 9px; font-size: 11px; font-weight: 500; cursor: pointer; }
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.mini-btn.primary { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 650; }
.mini-btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.mini-btn.del { color: var(--muted); border-color: transparent; }
.mini-btn.del:hover { color: var(--err); border-color: transparent; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
