/* Proof of Attendance — warm, light, mobile-first. */
:root {
  --bg: #f6f1e7;          /* warm parchment */
  --card: #fffdf8;
  --ink: #2c2622;
  --muted: #6f6459;
  --line: #e7ddcb;
  --brand: #7c5cff;       /* soft violet accent, friendly not crypto */
  --brand-ink: #4f38c9;
  --gold: #c9992b;
  --ok: #2f8f5b;
  --ok-bg: #e7f5ec;
  --warn: #b4531f;
  --warn-bg: #fbeee2;
  --shadow: 0 6px 22px rgba(60, 45, 20, .10);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 18px 48px; }
.brandbar { display: flex; align-items: center; gap: 10px; padding: 6px 2px 18px; }
.brandbar .logo {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: linear-gradient(140deg, var(--brand), #a58bff);
  display: grid; place-items: center; color: #fff; font-size: 20px;
  box-shadow: var(--shadow);
}
.brandbar h1 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.brandbar small { color: var(--muted); display: block; font-weight: 500; font-size: 12.5px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin: 0 0 18px;
}
h2 { font-size: 21px; margin: 0 0 4px; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 0 0 18px; }

label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; color: #4a4038; }
input, select {
  width: 100%; font-size: 17px; padding: 14px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,92,255,.15); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  font-size: 18px; font-weight: 700; padding: 16px; border-radius: 14px;
  background: var(--brand); color: #fff; margin-top: 20px;
  box-shadow: 0 4px 14px rgba(124,92,255,.35); transition: transform .05s, filter .15s;
  min-height: 54px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { filter: grayscale(.5) opacity(.6); cursor: default; }
.btn.secondary { background: #fff; color: var(--brand-ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.small { font-size: 15px; padding: 11px 14px; min-height: 0; width: auto; margin: 0; display: inline-block; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; border: 1.5px solid var(--line); }

.note { color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.msg { padding: 12px 14px; border-radius: 12px; margin: 14px 0 0; font-size: 15px; }
.msg.err { background: var(--warn-bg); color: var(--warn); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }

.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill.open { background: var(--ok-bg); color: var(--ok); }
.pill.closed { background: #efe7d8; color: var(--muted); }

/* Confirmation splash */
.splash { text-align: center; padding: 8px 0 4px; }
.splash .check { font-size: 64px; line-height: 1; }
.splash h2 { font-size: 26px; margin: 12px 0 6px; }
.stats { display: flex; gap: 12px; justify-content: center; margin: 20px 0 4px; }
.stat { background: #faf4e7; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; min-width: 96px; }
.stat b { display: block; font-size: 30px; color: var(--brand-ink); line-height: 1; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* Lists / tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 13px 2px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list li:last-child { border-bottom: none; }
.list .name { font-weight: 600; }
.list .meta { color: var(--muted); font-size: 13px; }
.big-num { font-size: 46px; font-weight: 800; color: var(--brand-ink); line-height: 1; }

/* QR */
.qrbox { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.qrbox svg { width: 100%; max-width: 300px; height: auto; }
.qrbox .url { font-size: 12px; color: var(--muted); word-break: break-all; margin-top: 10px; }

.muted { color: var(--muted); }
.center { text-align: center; }
.hide { display: none !important; }
a { color: var(--brand-ink); }
.spread { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap: wrap; }

@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .card { box-shadow: none; border: none; }
}
