:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #667085; --line: #e3e6ec;
  --brand: #5b3df5; --brand-dark: #4529d6; --ok: #12875b; --warn: #b7791f; --bad: #c0392b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--brand); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar .brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--brand); }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.container { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
h1 { margin: 0 0 12px; font-size: 1.5rem; } h2 { margin: 0 0 12px; font-size: 1.15rem; }
label { display: block; margin-bottom: 12px; font-size: .92rem; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input[type=checkbox] { display: inline-block; width: auto; margin-right: 6px; }
.btn, button.btn { display: inline-block; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #eceefe; color: var(--brand); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.danger { background: #fdecea; color: var(--bad); }
button.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert-ok { background: #e7f6ef; color: #0b5c3e; } .alert-erro { background: #fdecea; color: #8e2a1f; }
.muted { color: var(--muted); font-size: .92rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--bg); border-radius: 10px; padding: 12px 14px; } .stat b { display: block; font-size: 1.6rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-confirmado { background: #e7f6ef; color: var(--ok); } .badge-pendente { background: #fdf3de; color: var(--warn); } .badge-recusado { background: #fdecea; color: var(--bad); }
.linkbox { display: flex; gap: 8px; } .linkbox input { flex: 1; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* convite + QR */
.ticket { text-align: center; } #qrcode { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.ticket .code { font-family: monospace; font-size: .8rem; color: var(--muted); word-break: break-all; }
/* scanner */
#reader { width: 100%; max-width: 480px; margin: 0 auto; }
#result { margin: 16px auto; max-width: 480px; padding: 16px; border-radius: 12px; text-align: center; font-size: 1.1rem; display: none; }
#result.ok { background: #e7f6ef; color: #0b5c3e; } #result.warn { background: #fdf3de; color: #7a5410; } #result.bad { background: #fdecea; color: #8e2a1f; }
#result strong { display: block; font-size: 1.4rem; }
@media (max-width: 600px) { .container { margin-top: 12px; } .topbar { padding: 10px 12px; } }
