/* MegaVibes — cinza chumbo, MEGA branco, VIBES azul flúor, detalhes em degradê */
:root {
  --bg: #2a2c30;
  --bg2: #222428;
  --bg3: #1b1c20;
  --card: #33363c;
  --card2: #3b3e45;
  --line: #474a52;
  --text: #f3f4f6;
  --muted: #a8abb3;
  --vibes: #00e5ff;
  --vibes-d: #00b8d4;
  --purple: #7b5cff;
  --pink: #ff3ea5;
  --ok: #2ee59d;
  --warn: #ffc53d;
  --err: #ff5470;
  --grad: linear-gradient(90deg, #00e5ff 0%, #7b5cff 55%, #ff3ea5 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,229,255,.18), rgba(123,92,255,.18) 55%, rgba(255,62,165,.18));
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; min-height: 100vh; overflow-x: hidden; }
a { color: var(--vibes); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 16px; }

/* ---------- topo ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(34,36,40,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #0000; border-image: var(--grad) 1; }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.45rem; letter-spacing: .5px; color: #fff; }
.brand img { width: 46px; height: 40px; filter: drop-shadow(0 0 8px rgba(0,229,255,.35)); }
.brand .mega { color: #fff; }
.brand .vibes { color: var(--vibes); text-shadow: 0 0 14px rgba(0,229,255,.55); }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-weight: 600; }
.icon-btn:hover { border-color: var(--vibes); }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -6px; right: -6px; background: var(--pink); color: #fff; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.desk-only { display: inline-flex; }

/* barra inferior no celular */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .desk-only { display: none !important; }
  body { padding-bottom: 72px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(27,28,32,.97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--muted); padding: 4px 0; position: relative; }
  .bottom-nav a.on { color: var(--vibes); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .badge { top: -2px; right: calc(50% - 22px); }
  .brand { font-size: 1.25rem; }
  .brand img { width: 40px; height: 35px; }
}

/* ---------- títulos com degradê ---------- */
.title-cell { position: relative; display: inline-block; padding: 8px 16px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; font-size: 1.25rem; font-weight: 800; }
.sec-title::before { content: ''; width: 6px; height: 26px; border-radius: 3px; background: var(--grad); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-line { height: 3px; background: var(--grad); border-radius: 2px; }

/* ---------- cartões ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.glow { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }
.card h3 { font-size: 1.05rem; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- vitrine ---------- */
.hero { position: relative; margin: 16px 0 6px; border-radius: 18px; overflow: hidden; background: var(--bg3); box-shadow: var(--shadow); }
.hero-track { display: flex; transition: transform .5s ease; }
.hero-slide { flex: 0 0 100%; position: relative; aspect-ratio: 8 / 3; background-size: cover; background-position: center; }
.hero-slide.portrait { background-size: contain; background-repeat: no-repeat; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,21,24,.95) 0%, rgba(20,21,24,.2) 55%, transparent); }
.hero-info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; }
.hero-info h2 { font-size: clamp(1.2rem, 3.5vw, 2rem); margin: 6px 0 4px; }
.hero-dots { position: absolute; right: 14px; top: 12px; z-index: 3; display: flex; gap: 6px; }
.hero-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.4); }
.hero-dots i.on { background: var(--vibes); width: 20px; }
@media (max-width: 560px) { .hero-slide { aspect-ratio: 4 / 3; } }
.hero-empty { padding: 40px 20px; text-align: center; background: var(--grad-soft); }
.hero-empty img { width: 120px; margin: 0 auto 10px; }

.search { display: flex; gap: 8px; margin: 16px 0; }
.search input { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: .9rem; }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; }

.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .events { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.ev-card { display: block; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); color: var(--text); transition: transform .15s, border-color .15s; }
.ev-card:hover { transform: translateY(-3px); border-color: var(--vibes); }
.ev-card .img { aspect-ratio: 1; background: var(--bg3) center / cover; position: relative; }
.ev-card .date { position: absolute; left: 8px; top: 8px; background: rgba(20,21,24,.85); border-radius: 10px; padding: 4px 8px; text-align: center; line-height: 1; border: 1px solid rgba(0,229,255,.4); }
.ev-card .date b { display: block; font-size: 1.2rem; color: var(--vibes); }
.ev-card .date span { font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; }
.ev-card .body { padding: 10px 12px 12px; }
.ev-card h3 { font-size: .98rem; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .where { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-card .price { margin-top: 6px; font-weight: 800; font-size: .9rem; }
.ev-card .price small { color: var(--muted); font-weight: 500; }

/* ---------- página do evento ---------- */
.ev-head { display: grid; grid-template-columns: 340px 1fr; gap: 22px; margin-top: 18px; }
@media (max-width: 820px) { .ev-head { grid-template-columns: 1fr; } }
.ev-banner { border-radius: 18px; overflow: hidden; background: var(--bg3); aspect-ratio: 8 / 3; background-size: cover; background-position: center; }
.ev-banner.portrait { aspect-ratio: 3 / 8; max-height: 70vh; background-size: contain; background-repeat: no-repeat; }
.ev-sq { border-radius: 18px; overflow: hidden; aspect-ratio: 1; background: var(--bg3) center / cover; box-shadow: var(--shadow); }
.facts { display: grid; gap: 10px; margin: 14px 0; }
.fact { display: flex; gap: 10px; align-items: flex-start; }
.fact svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--vibes); margin-top: 2px; }
.info-text { white-space: pre-wrap; color: #dcdde1; }
.lot { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); margin-bottom: 10px; }
.lot.onsale { border-color: rgba(0,229,255,.45); }
.lot .name { font-weight: 700; }
.lot .p { font-weight: 800; font-size: 1.1rem; }
.lot .p s { color: var(--muted); font-weight: 400; font-size: .85rem; margin-right: 4px; }
.qty { display: inline-flex; align-items: center; background: var(--bg3); border-radius: 12px; border: 1px solid var(--line); }
.qty button { width: 40px; height: 40px; background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--vibes); }
.qty button:disabled { color: var(--line); cursor: default; }
.qty span { min-width: 26px; text-align: center; font-weight: 800; }
.buy-bar { position: sticky; bottom: 0; z-index: 20; margin: 14px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(27,28,32,.97); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .buy-bar { bottom: 64px; } }

/* ---------- formulários ---------- */
label { display: block; font-size: .85rem; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.field { margin-bottom: 14px; }
input, select, textarea { width: 100%; background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; min-height: 46px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--vibes); box-shadow: 0 0 0 3px rgba(0,229,255,.18); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--vibes); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-weight: 400; cursor: pointer; }
.radio-cards { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--bg3); display: flex; gap: 10px; }
.radio-card:has(input:checked) { border-color: var(--vibes); background: rgba(0,229,255,.07); }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.err-msg { color: var(--err); font-size: .9rem; margin: 8px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 800; letter-spacing: .2px; background: var(--card2); color: var(--text); border: 1px solid var(--line); text-align: center; }
.btn:hover { border-color: var(--vibes); }
.btn.primary { background: var(--vibes); color: #06232a; border-color: transparent; box-shadow: 0 6px 20px rgba(0,229,255,.25); }
.btn.primary:hover { background: #4ff0ff; }
.btn.grad { background: var(--grad); color: #fff; border: 0; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn.ok { background: var(--ok); color: #062b1c; border: 0; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--vibes); cursor: pointer; padding: 0; font-weight: 600; }

/* ---------- abas ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 16px; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 10px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-weight: 700; color: var(--muted); }
.tab.on { background: var(--grad); color: #fff; border-color: transparent; }
.tab .badge { position: static; display: inline-grid; margin-left: 6px; vertical-align: middle; }

/* ---------- estatísticas ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.45rem; font-weight: 900; margin-top: 4px; }
.stat .s { font-size: .78rem; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; overflow-x: auto; }
.bars .b { flex: 1 0 18px; min-width: 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars .b i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--grad); background-size: 100% 140px; min-height: 2px; }
.bars .b span { font-size: .62rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.meter { height: 10px; border-radius: 5px; background: var(--bg3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 5px; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--bg2); color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: 0; }
td.wrap-text { white-space: normal; min-width: 180px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--card2); border: 1px solid var(--line); }
.pill.ok { background: rgba(46,229,157,.14); color: var(--ok); border-color: rgba(46,229,157,.35); }
.pill.warn { background: rgba(255,197,61,.12); color: var(--warn); border-color: rgba(255,197,61,.35); }
.pill.err { background: rgba(255,84,112,.12); color: var(--err); border-color: rgba(255,84,112,.35); }
.pill.info { background: rgba(0,229,255,.12); color: var(--vibes); border-color: rgba(0,229,255,.35); }

/* ---------- ingresso ---------- */
.ticket { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: var(--text); }
.ticket .thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--bg3) center / cover; flex: 0 0 64px; }
.ticket.used, .ticket.canceled { opacity: .55; }
.qr-full { background: #fff; border-radius: 18px; padding: 14px; max-width: 360px; margin: 0 auto; }
.qr-full img { width: 100%; image-rendering: pixelated; }
.ticket-big { max-width: 420px; margin: 18px auto; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }
.ticket-big .head { padding: 16px; background: var(--grad-soft); }
.ticket-big .cut { border-top: 2px dashed var(--line); margin: 0 14px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; font-size: 1rem; }

/* ---------- avisos ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 74px; z-index: 200; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { padding: 12px 16px; border-radius: 12px; background: #16171a; border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .2s ease; font-weight: 600; }
.toast.ok { border-color: var(--ok); } .toast.err { border-color: var(--err); }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal { width: min(100%, 560px); max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-top: 3px solid; border-image: var(--grad) 1; }
@media (min-width: 700px) { .modal-bg { align-items: center; padding: 20px; } .modal { border-radius: 20px; border: 1px solid var(--line); } }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--line); }
.notice.err { background: rgba(255,84,112,.1); border-color: rgba(255,84,112,.4); }
.notice.ok { background: rgba(46,229,157,.1); border-color: rgba(46,229,157,.4); }

.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--vibes); animation: r 1s linear infinite; margin: 40px auto; }
@keyframes r { to { transform: rotate(360deg); } }

.footer { margin-top: 50px; padding: 26px 0 30px; background: var(--bg2); border-top: 1px solid transparent; border-image: var(--grad) 1; color: var(--muted); font-size: .88rem; }
.footer .brand { font-size: 1.1rem; }

/* ---------- portaria ---------- */
.scanner { position: relative; max-width: 480px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 14%; border: 3px solid var(--vibes); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-result { max-width: 480px; margin: 14px auto 0; padding: 18px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 1.5rem; }
.scan-result.ok { background: var(--ok); color: #062b1c; }
.scan-result.bad { background: var(--err); color: #fff; }
.scan-result.warn { background: var(--warn); color: #2b2000; }
.scan-result small { display: block; font-size: .95rem; font-weight: 600; margin-top: 6px; }

.file-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 14px; text-align: center; cursor: pointer; background: var(--bg3); position: relative; }
.file-drop:hover { border-color: var(--vibes); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .prev { margin: 8px auto 0; border-radius: 10px; background: center / cover; }
.lot-edit { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.counter { text-align: right; font-size: .78rem; color: var(--muted); }

.cta-org > .grow { min-width: 220px; }
/* no celular: banner deitado substitui a imagem quadrada; banner em pé dá lugar à quadrada */
@media (max-width: 820px) {
  .ev-page:not(.has-portrait) .ev-sq { display: none; }
  .ev-page.has-portrait .ev-banner { display: none; }
  .ev-page.has-portrait .ev-sq { max-width: 420px; margin: 0 auto; }
}
@media (min-width: 821px) { .ev-page.has-portrait .ev-banner { display: none; } .ev-page.has-portrait .ev-head > div:first-child { display: grid; gap: 14px; } }
.bars .b { max-width: 42px; }
.grid.g3.keep { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid.g3.keep .stat .v { font-size: 1.15rem; } .grid.g3.keep .stat .k { font-size: .72rem; } .grid.g3.keep { gap: 8px; } }
.link-row input { flex: 1 1 100%; }

/* menu do topo */
.menu .icon-btn { font-size: .78rem; letter-spacing: .6px; font-weight: 800; }
.menu .icon-btn.on { border-color: var(--vibes); color: var(--vibes); box-shadow: 0 0 0 1px rgba(0,229,255,.25) inset; }
.menu [data-account-icon] { display: inline-flex; }
@media (max-width: 800px) { .menu .lbl { display: none; } .menu .icon-btn { padding: 0; width: 42px; } }
@media (max-width: 420px) { .menu { gap: 4px !important; } .menu .icon-btn { width: 38px; min-width: 38px; height: 38px; } .top .wrap { gap: 6px; } .brand { font-size: 1.1rem; } .brand img { width: 34px; height: 30px; } }
