/* Event check-in — calm, neutral, unbranded. Mobile-first. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2f6f6b;       /* muted teal, no Life Sublime branding */
  --brand-ink: #ffffff;
  --ok: #157347; --ok-bg: #e7f4ec;
  --warn: #9a6a00; --warn-bg: #fbf3e0;
  --err: #b02a37; --err-bg: #fbeaec;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 34rem; margin: 0 auto; padding: 1.4rem 1.1rem 3rem; }
h1 { font-size: 1.5rem; margin: .2rem 0 .5rem; }
h2.section { font-size: 1.05rem; margin: 1.8rem 0 .6rem; color: var(--muted); font-weight: 600; }
.lede { color: var(--muted); margin: 0 0 1.2rem; }
.muted { color: var(--muted); }
.req { color: var(--err); }
code { background: #eef0f2; padding: .05rem .3rem; border-radius: 5px; font-size: .9em; }

/* Cards & forms */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.field { display: block; margin-bottom: 1rem; }
.field-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=search] {
  width: 100%; padding: .7rem .75rem; font-size: 1rem;
  border: 1px solid #cbd2d9; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus { outline: 3px solid rgba(47,111,107,.25); border-color: var(--brand); }
.hint { display: block; color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.answer-input { max-width: 8rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: .2rem 0 1rem; }
.check input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.check.inline { align-items: center; margin: 0; }
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fineprint { color: var(--muted); font-size: .82rem; margin-top: 1.2rem; }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.2rem; border-radius: 10px; font-size: 1rem;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); width: 100%; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: #fff; border-color: #cbd2d9; color: var(--ink); }
.btn-small { padding: .45rem .7rem; font-size: .88rem; width: auto; }
.btn-danger { background: var(--err-bg); color: var(--err); border-color: #e6c4c9; }
.btn-row { margin: 1.1rem 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-row .btn-primary { width: auto; flex: 1 1 auto; }

/* Alerts */
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid; }
.alert-error { background: var(--err-bg); color: var(--err); border-color: #e6c4c9; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cc; }

/* Pass card */
.pass-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pass-event { color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.pass-qr { width: 260px; max-width: 78vw; height: auto; margin: .8rem auto .4rem; display: block;
  image-rendering: pixelated; }
.pass-name { font-size: 1.3rem; font-weight: 700; }
.pass-id { color: var(--muted); font-size: .85rem; letter-spacing: .08em; }
.save-hint { text-align: center; color: var(--muted); margin: 1rem 0 .3rem; }

/* Coordinator scan / result screens */
.stallbar { background: #eaf1f0; color: var(--brand); border-radius: 10px;
  padding: .55rem .85rem; font-size: .92rem; margin-bottom: 1rem; }
.tally { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; text-align: center; margin: 1rem 0; }
.tally-num { display: block; font-size: 2.2rem; font-weight: 800; color: var(--brand); }
.recent { list-style: none; padding: 0; margin: 0; }
.recent li { display: flex; justify-content: space-between; padding: .55rem .2rem;
  border-bottom: 1px solid var(--line); }
.recent time { color: var(--muted); font-size: .88rem; }

.result { text-align: center; border-radius: var(--radius); padding: 2rem 1.2rem; margin: 1rem 0; }
.result h1 { font-size: 1.7rem; }
.result .big { font-size: 1.35rem; font-weight: 700; margin: .3rem 0 .1rem; }
.result-icon { font-size: 2.4rem; width: 3.6rem; height: 3.6rem; line-height: 3.6rem;
  border-radius: 50%; margin: 0 auto .6rem; color: #fff; }
.result-ok { background: var(--ok-bg); color: var(--ok); }
.result-ok .result-icon { background: var(--ok); }
.result-dup { background: var(--warn-bg); color: var(--warn); }
.result-dup .result-icon { background: var(--warn); }
.result-invalid { background: var(--err-bg); color: var(--err); }
.result-invalid .result-icon { background: var(--err); }
.result-pending, .result-ready { background: #fff; border: 1px solid var(--line); }

/* Admin */
.adminnav { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .4rem; margin-bottom: 1.3rem; }
.adminnav a { text-decoration: none; color: var(--ink); padding: .45rem .7rem; border-radius: 7px;
  font-size: .92rem; }
.adminnav a.on { background: var(--brand); color: #fff; }
.adminnav a.right { margin-left: auto; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
  text-align: center; color: var(--muted); font-size: .9rem; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
.table th, .table td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--line);
  vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .03em; }
.table .num { text-align: right; }
.table-scroll { overflow-x: auto; }
.row-off { opacity: .55; }
.tag { background: #eee; color: var(--muted); font-size: .72rem; padding: .05rem .35rem;
  border-radius: 5px; }
.filters { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.filters input[type=search] { flex: 1 1 12rem; }
.pager { display: flex; gap: .8rem; align-items: center; justify-content: center; margin-top: 1rem; }
.table td form { margin: 0; }
