/* Troque --accent para a cor da sua marca. */
:root { --accent: #f5b428; --ink: #15151c; --bg: #f4f3ef; --card: #fff; --muted: #6d6d78; --line: #e4e2da; --good: #1d8a4c; --bad: #c0392b; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; }
h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; margin: 0 0 .6em; }
h3 { font-size: 1rem; margin: 1.2em 0 .4em; }
code { font-family: ui-monospace, Menlo, monospace; background: #0000000d; padding: .1em .4em; border-radius: 4px; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--ink); color: #fff; }
.top .brand { font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.top .brand small { font-weight: 400; opacity: .6; }
.top nav a { margin-left: 16px; text-decoration: none; font-size: .92rem; opacity: .85; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 32px 16px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.cols { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cols { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.hero { background: var(--ink) center/cover; color: #fff; padding: 56px 0 44px; }
.hero .meta { margin: 0 0 .3em; opacity: .9; }
.hero .btn { margin-top: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
section.card.narrow { margin-top: 32px; }
.center { text-align: center; }
.event-card { display: block; text-decoration: none; padding: 0; overflow: hidden; }
.event-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.event-card div { padding: 16px; }
.prose { white-space: normal; }

.btn { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 700; border: 0; border-radius: 10px; padding: 12px 20px; font-size: 1rem; text-decoration: none; cursor: pointer; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; border: 1.5px solid var(--ink); }
.btn:disabled { opacity: .6; }

label { display: block; font-size: .85rem; font-weight: 600; margin: 10px 0; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfcdc4; border-radius: 8px; background: #fff; margin-top: 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.two, .three { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } .three { grid-template-columns: repeat(3, 1fr); } }

.ticket { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px dashed var(--line); }
.ticket > div { display: flex; flex-direction: column; }
.ticket select { width: 76px; margin: 0; }
.ticket.off { opacity: .55; }
.price { font-weight: 700; margin-top: 2px; }
.total { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); padding-top: 12px; margin: 4px 0 0; font-size: 1.1rem; }

.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; background: #0000000f; }
.tag.on { background: #1d8a4c22; color: var(--good); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.alert, .ok { padding: 10px 14px; border-radius: 8px; font-size: .92rem; }
.alert { background: #c0392b14; color: var(--bad); }
.ok { background: #1d8a4c14; color: var(--good); }

.pass { display: flex; gap: 18px; align-items: center; border-left: 6px solid var(--accent); }
.pass h3 { margin: .3em 0; font-size: 1.15rem; }
.pass .qr img, .pass .qr canvas { display: block; width: 148px; height: 148px; }
.pass details { margin-top: 8px; font-size: .9rem; }
.pass details form { display: flex; gap: 8px; margin-top: 6px; }
.pass details input { margin: 0; }
@media (max-width: 480px) { .pass { flex-direction: column; text-align: center; } }

.bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.actions button:not(.btn) { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: inherit; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 12px; }
.stats b { display: block; font-size: 1.25rem; }
.stats span { font-size: .78rem; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.filters > * { flex: 1 1 160px; margin: 0; }
.filters .btn { flex: 0 0 auto; }
.result { font-size: 1.05rem; }
.result.good { background: var(--good); color: #fff; border-color: var(--good); }
.result.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.result h2 { font-size: 1.5rem; margin: 0; }
#reader { border-radius: 14px; overflow: hidden; margin-bottom: 12px; }

@media print { .top, .foot, .btn, details, .ok { display: none !important; } body { background: #fff; } .card { break-inside: avoid; } }
