*{box-sizing:border-box}
:root{
  --bg:#f3f4f6;--card:#fff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;
  --primary:#111827;--soft:#eef2ff;--warn:#fff7ed;--danger:#fef2f2;--ok:#ecfdf5;
}
body{margin:0;background:var(--bg);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text)}
.topbar{position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid var(--line);padding:14px 18px;display:flex;justify-content:space-between;align-items:center}
.brand{font-weight:800;font-size:19px}.subtitle{font-size:12px;color:var(--muted);margin-top:2px}
.badge{background:#111827;color:#fff;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700}
main{max-width:820px;margin:18px auto;padding:0 14px 40px}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:14px;box-shadow:0 6px 22px rgba(0,0,0,.04)}
h1{font-size:25px;margin:0 0 8px}h2{font-size:19px;margin:0 0 6px}p{line-height:1.45}
.upload{display:block;border:2px dashed #cbd5e1;border-radius:16px;padding:24px;text-align:center;margin:18px 0;cursor:pointer;background:#fafafa;font-weight:700}
.upload input{display:none}.actions{display:flex;gap:10px;flex-wrap:wrap}
button{border:0;border-radius:12px;padding:12px 15px;font-weight:800;cursor:pointer}
button:disabled{opacity:.45;cursor:not-allowed}
.primary{background:var(--primary);color:#fff}.ghost{background:#eef2f7;color:#111827}
.muted{color:var(--muted);font-size:14px}.hidden{display:none}
.progress{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin:12px 0}
#progressBar{height:100%;width:0;background:#111827;transition:width .2s}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}
.stats div{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:12px;text-align:center}
.stats strong{display:block;font-size:22px}.stats span{font-size:11px;color:var(--muted)}
.section-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.delivery{border:1px solid var(--line);border-radius:16px;padding:14px;margin:10px 0}
.delivery .code{font-size:12px;color:var(--muted);font-family:ui-monospace,monospace}
.delivery .address{font-weight:800;margin:7px 0}
.delivery .meta{font-size:12px;color:var(--muted)}
.flag{display:inline-block;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;margin-top:8px}
.flag.ok{background:var(--ok);color:#047857}.flag.review{background:var(--warn);color:#c2410c}.flag.dupe{background:var(--soft);color:#4338ca}
.warning{padding:11px 12px;border-radius:12px;background:var(--warn);margin-bottom:10px;font-size:13px}
textarea{width:100%;min-height:68px;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;margin-top:8px}
footer{text-align:center;color:var(--muted);font-size:12px;padding:18px}
@media(max-width:600px){.stats{grid-template-columns:repeat(2,1fr)}h1{font-size:22px}.section-head{display:block}.section-head button{margin-top:8px}}
