:root {
  --bg: #f6f2ed;
  --ink: #201a17;
  --muted: #756b63;
  --line: #ded4ca;
  --panel: #fffdf9;
  --primary: #111827;
  --accent: #f97316;
  --ok: #1f7a4d;
  --warn: #a36a00;
  --bad: #b42318;
  --shadow: 0 18px 60px rgba(33, 24, 18, .12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(120deg, rgba(17,24,39,.08), transparent 34%), linear-gradient(300deg, rgba(249,115,22,.10), transparent 40%), var(--bg);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px clamp(16px, 4vw, 46px); border-bottom: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.78); position: sticky; top: 0; z-index: 20; }
.brand-mark { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: white; font-weight: 900; border: 3px solid var(--accent); object-fit: cover; }
.brand-name { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-name { color: var(--muted); font-size: 13px; margin-top: 2px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn { border: 1px solid var(--line); background: white; color: var(--ink); min-height: 46px; border-radius: var(--radius); padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: white; }
.wrap { width: min(1040px, calc(100% - 28px)); margin: 0 auto; padding: clamp(22px, 5vw, 56px) 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr); gap: clamp(18px, 4vw, 42px); align-items: start; }
.headline { font-size: clamp(38px, 7vw, 78px); line-height: .92; letter-spacing: 0; margin: 0 0 18px; }
.lede { color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; margin: 0 0 24px; }
.pill { border: 1px solid var(--line); background: rgba(255,255,255,.58); padding: 8px 11px; border-radius: 999px; font-weight: 800; font-size: 13px; display: inline-flex; margin: 0 8px 8px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-panel { padding: clamp(18px, 3vw, 30px); }
.section-title { font-size: 28px; margin: 0 0 8px; font-weight: 900; }
.subtle { color: var(--muted); line-height: 1.5; }
.grid { display: grid; gap: 14px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 7px; font-weight: 850; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; background: white; color: var(--ink); min-height: 46px; font-size: 16px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.checkbox-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--muted); line-height: 1.45; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.58); text-transform: none; letter-spacing: 0; font-weight: 650; font-size: 15px; }
.checkbox-row input { min-height: 0; width: 18px; height: 18px; margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.full { width: 100%; }
.status { display: none; padding: 12px 14px; border-radius: var(--radius); margin-top: 14px; font-weight: 800; }
.status.show { display: block; }
.status.ok { background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6; }
.status.warn { background: #fffaeb; color: var(--warn); border: 1px solid #fedf89; }
.status.bad { background: #fef3f2; color: var(--bad); border: 1px solid #fecdca; }
.dashboard { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; }
.side { padding: 14px; height: fit-content; position: sticky; top: 88px; }
.side button { width: 100%; justify-content: flex-start; margin-bottom: 8px; }
.content-panel { padding: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: white; }
.stat strong { display: block; font-size: 26px; margin-top: 4px; }
.table { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; align-items: center; padding: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.badge { display: inline-flex; width: fit-content; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); align-items: center; font-size: 12px; font-weight: 900; }
.badge.ok { color: var(--ok); border-color: #abefc6; background: #ecfdf3; }
.badge.warn { color: var(--warn); border-color: #fedf89; background: #fffaeb; }
.scanner { width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; background: #111; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; }
.scanner video, .scanner canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner canvas { display: none; }
.scanner-frame { position: absolute; inset: 14%; border: 3px solid var(--accent); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
.scanner-hint { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,.62); color: white; font-weight: 800; text-align: center; }
.empty { border: 1px dashed var(--line); padding: 24px; text-align: center; color: var(--muted); border-radius: var(--radius); }
@media (max-width: 800px) { .topbar { align-items: flex-start; flex-direction: column; } .hero, .dashboard, .two, .three, .stats, .row { grid-template-columns: 1fr; } .side { position: static; } .headline { font-size: 42px; } }
@media (max-width: 560px) { .topbar { padding: 14px; gap: 12px; } .brand-mark { width: 100%; } .nav { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .nav .btn { padding: 0 8px; min-height: 42px; font-size: 13px; } .wrap { width: min(100% - 20px, 1040px); padding: 18px 0 30px; } .form-panel, .content-panel, .side { padding: 16px; } .headline { font-size: 36px; line-height: 1; } .lede { font-size: 17px; } .section-title { font-size: 24px; } .actions { display: grid; grid-template-columns: 1fr; width: 100%; } .actions .btn, .full { width: 100%; } }
