* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1a1d21; --muted: #6b7280; --border: #e3e6ea;
  --accent: #b8860b; --green: #15803d; --green-bg: #ecfdf3; --amber: #b45309; --amber-bg: #fffbeb;
  --red: #b91c1c; --red-bg: #fef2f2;
}
html, body { background: var(--bg); color: var(--ink); font-family: 'Segoe UI', Roboto, system-ui, sans-serif; font-size: 16px; }
body { padding-bottom: 24px; }

.hdr { background: linear-gradient(135deg, #1a1d21, #2c3038); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 10; }
.hdr-title { font-size: 17px; font-weight: 700; }
.hdr-sub { font-size: 12px; opacity: .7; }

.steps { display: flex; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 54px; z-index: 9; }
.step { flex: 1; border: none; background: none; padding: 11px 4px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.step.is-active { color: var(--accent); border-bottom-color: var(--accent); }

main { padding: 14px; max-width: 720px; margin: 0 auto; }
.screen { display: none; }
.screen.is-active { display: block; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.note { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.btn { border: 1px solid var(--accent); background: #fff; color: var(--accent); font-size: 15px; font-weight: 600; padding: 11px 16px; border-radius: 9px; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { border-color: var(--border); color: var(--muted); }
.btn.sm { font-size: 13px; padding: 7px 11px; }
.btn.block { display: block; width: 100%; margin-top: 10px; text-align: center; }
.btn:disabled { opacity: .5; }

.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 1px; right: 1px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 13px; line-height: 18px; text-align: center; cursor: pointer; }

input[type=text], textarea { width: 100%; font-size: 15px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; color: var(--ink); }
textarea { resize: vertical; }

.banner { padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.banner.err { background: var(--red-bg); color: var(--red); }
.banner.info { background: #eff6ff; color: #1e40af; }

.awb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; max-height: 130px; overflow-y: auto; }
.awb-chips span { font-family: Consolas, monospace; font-size: 11.5px; background: #f1f2f4; padding: 2px 7px; border-radius: 6px; }
.awb-list { margin-top: 8px; max-height: 240px; overflow-y: auto; }
.awb-list div { font-family: Consolas, monospace; font-size: 13px; padding: 5px 7px; border-bottom: 1px solid #f0f0f0; }
.warn { color: var(--red); }
.good { color: var(--green); }
.ok-card { background: var(--green-bg); color: var(--green); font-weight: 700; text-align: center; }

/* scanare */
.scan-stats { display: flex; gap: 8px; margin-bottom: 10px; }
.stat { flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 11px; color: var(--muted); }
.stat.ok b { color: var(--green); }
.stat.extra b { color: var(--red); }
.scan-feedback { text-align: center; font-weight: 700; padding: 12px; border-radius: 10px; margin-bottom: 10px; background: #fff; border: 1px solid var(--border); font-size: 15px; }
.scan-feedback.match { background: var(--green-bg); color: var(--green); }
.scan-feedback.duplicate { background: var(--amber-bg); color: var(--amber); }
.scan-feedback.extra { background: var(--red-bg); color: var(--red); }
.video-wrap { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.reticle { position: absolute; inset: 22% 12%; border: 3px solid rgba(255,255,255,.85); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0,0,0,.12); pointer-events: none; }
