/* 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: #009cde;
  --vibes-d: #00b8d4;
  --purple: #7b5cff;
  --pink: #ff3ea5;
  --ok: #2ee59d;
  --warn: #ffc53d;
  --err: #ff5470;
  --grad: linear-gradient(90deg, #009cde 0%, #7b5cff 55%, #ff3ea5 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,156,222,.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; overflow-x: clip; }
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.logo { height: 34px; width: auto; display: block; }
.brand .mega { color: #fff; }
.brand .vibes { color: var(--vibes); text-shadow: 0 0 14px rgba(0,156,222,.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 { will-change: transform; transition: opacity .15s; }
  .bottom-nav.nav-hide { opacity: 0; pointer-events: none; visibility: hidden; }
  .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: 9 / 4; 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: auto; padding-top: 44.44%; background-size: 100% auto; background-position: top center; background-repeat: no-repeat; background-color: var(--bg3); }
  .hero-slide::after { display: none; }
  .hero-info { position: static; padding: 12px 14px 14px; }
  .hero-info h2 { font-size: 1.15rem; }
  .hero-dots { top: 8px; right: 10px; }
}
.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,156,222,.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; }
.ev-card .promo-tag { margin-top: 6px; font-size: .8rem; line-height: 1.3; padding: 5px 8px; border-radius: 8px; background: var(--grad-soft); border: 1px solid rgba(255,62,165,.45); color: var(--text); }
.ev-card .promo-tag b:last-child { color: var(--pink); white-space: nowrap; }

/* ---------- 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: 9 / 4; 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,156,222,.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,156,222,.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,156,222,.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,156,222,.25); }
.btn.primary:hover { background: #1fb0ee; }
.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); scrollbar-width: thin; scrollbar-color: var(--vibes) var(--bg2); }
/* barra de rolagem lateral sempre visível nas tabelas largas */
.table-wrap::-webkit-scrollbar { height: 12px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg2); border-radius: 0 0 12px 12px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--grad); border-radius: 8px; border: 2px solid var(--bg2); }
.table-wrap::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }
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; max-width: 420px; overflow-wrap: anywhere; }
/* colunas de botões quebram em linhas em vez de esticar a tabela para fora da tela */
td:has(> .btn), td:has(> button) { white-space: normal; min-width: 170px; }
td > .btn, td > button { margin: 2px 2px 2px 0; }
.gear-btn { font-size: 1.1rem; line-height: 1; padding: 7px 10px; min-width: 0; }
td:has(> .gear-btn) { min-width: 0; width: 1%; padding-right: 0; }
/* sombra azul na borda quando a tabela continua para o lado (some quando chega no fim) */
.table-wrap {
  background:
    linear-gradient(to right, var(--bg) 40%, rgba(42,44,48,0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--bg) 40%, rgba(42,44,48,0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,156,222,.55), transparent) left / 16px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,156,222,.55), transparent) right / 16px 100% no-repeat scroll;
}

.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,156,222,.12); color: var(--vibes); border-color: rgba(0,156,222,.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: 28px 18px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 1.9rem; }
.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; }
.lot-edit.lot-locked { border-style: dashed; opacity: .95; }
.lot-edit.lot-locked p { margin: 8px 0; }
.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,156,222,.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; } }

@media (max-width: 760px) { .brand img.logo { height: 26px; } }
@media (max-width: 420px) { .brand img.logo { height: 21px; } }
.footer .brand img.logo { height: 28px; }

/* borboletas voando no fundo */
.bfly-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.bfly { position: absolute; left: 0; top: 0; margin: -20px 0 0 -20px; will-change: transform; pointer-events: none; }
.bfly img { width: 100%; height: 100%; animation: bfly-flap .3s ease-in-out infinite alternate; transform-origin: 50% 50%; filter: drop-shadow(0 0 6px rgba(0,156,222,.5)); }
.bfly-layer.lite .bfly img { filter: none; animation-duration: .5s !important; }
@keyframes bfly-flap { from { transform: scaleX(1); } to { transform: scaleX(.28); } }
#app, .footer { position: relative; z-index: 1; }

/* destaque: ingresso entregue no WhatsApp */
.wa-badge { display: flex; gap: 12px; align-items: center; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: rgba(37,211,102,.1); border: 1px solid rgba(37,211,102,.45); color: var(--text); font-size: .95rem; line-height: 1.35; }
.wa-badge svg { flex: none; color: #25d366; }
.wa-badge b { color: #25d366; }
.btn.wa-btn { background: rgba(37,211,102,.14); border-color: rgba(37,211,102,.55); color: #25d366; font-weight: 800; white-space: normal; line-height: 1.25; }
.btn.wa-btn:hover { background: rgba(37,211,102,.24); }

/* ---------- caixa do bar (#/caixa) ---------- */
body.pos-mode .top, body.pos-mode .bottom-nav, body.pos-mode .footer, body.pos-mode .bfly-layer { display: none !important; }
body.pos-mode { padding-bottom: 0; }
body.pos-mode #app { max-width: 900px; padding-bottom: 170px; }
.pos-pair { max-width: 380px; margin: 40px auto; padding: 26px 20px; }
.pos-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.pos-item { position: relative; min-height: 96px; border-radius: 16px; border: 0; background: var(--c); color: #fff; font: inherit; font-weight: 800; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 12px; text-align: left; cursor: pointer; box-shadow: inset 0 -40px 40px -20px rgba(0,0,0,.35); }
.pos-item:active { transform: scale(.97); }
.pos-item.out { opacity: .35; }
.pos-name { font-size: 1.08rem; line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pos-price { font-size: .95rem; opacity: .95; }
.pos-stock { position: absolute; top: 8px; left: 10px; font-size: .72rem; background: rgba(0,0,0,.35); padding: 2px 7px; border-radius: 999px; }
.pos-q { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; border-radius: 999px; background: #fff; color: #111; display: grid; place-items: center; font-weight: 900; }
.pos-cart { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(27,28,32,.98); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 40; }
.pos-cart > * { max-width: 868px; margin-left: auto; margin-right: auto; }
.pos-lines { display: flex; gap: 6px; overflow-x: auto; min-height: 34px; align-items: center; }
.pos-method { padding: 18px 10px; font-size: 1.1rem; }
.big { font-size: 1.4rem; }
.fichas-print { display: none; }
@media print {
  body * { visibility: hidden !important; }
  .fichas-print, .fichas-print * { visibility: visible !important; }
  .fichas-print { display: block !important; position: absolute; left: 0; top: 0; width: 58mm; color: #000; background: #fff; font-family: Arial, sans-serif; }
  .ficha { width: 58mm; padding: 4mm 2mm 6mm; text-align: center; border-bottom: 1px dashed #000; page-break-after: always; break-after: page; }
  .f-ev { font-size: 10pt; font-weight: bold; }
  .f-bf-top { display: block; width: 16mm; margin: 0 auto 2mm; filter: brightness(0); }
  .f-bf { display: inline-block; width: 5mm; vertical-align: middle; margin: 0 2mm; filter: brightness(0); }
  .f-bf:last-child { transform: scaleX(-1); }
  .f-name { font-size: 20pt; font-weight: 900; margin: 3mm 0; }
  .f-meta, .f-foot { font-size: 8pt; }
  .f-code { font-family: monospace; font-size: 13pt; letter-spacing: 1px; margin-top: 2mm; }
  .recibo { text-align: left; }
  .recibo .f-ev, .recibo .f-meta, .recibo .f-foot { text-align: center; }
  .recibo hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
  .r-row { display: flex; justify-content: space-between; font-size: 9pt; }
  .r-b { font-weight: 900; font-size: 11pt; }
  @page { size: 58mm auto; margin: 0; }
}
.mf-logo { height: 26px; width: auto; display: block; }
.mf-tab { height: 13px; width: auto; display: inline-block; vertical-align: middle; }
.tab.on .mf-tab { filter: brightness(0) invert(1); }
.mf-card { border-color: rgba(0,156,222,.45); background: linear-gradient(135deg, rgba(0,156,222,.08), rgba(122,92,255,.06)); }

/* alerta de ingresso já validado (fraude) */
.scan-result.fraud { background: #b00020; color: #fff; border: 4px solid #ffd400; animation: fraudPulse 1s ease-in-out 4; }
.scan-result.fraud .fraud-title { font-size: 1.75rem; line-height: 1.15; }
.scan-result.fraud .fraud-sub { font-size: 1.3rem; color: #ffd400; margin-top: 4px; letter-spacing: .02em; }
@keyframes fraudPulse { 50% { transform: scale(1.03); box-shadow: 0 0 34px rgba(255,84,112,.8); } }
.fraud-steps { max-width: 480px; margin: 12px auto 0; padding: 14px 16px; border-radius: 14px; background: rgba(255,212,0,.08); border: 1px solid rgba(255,212,0,.4); font-size: .95rem; }
.fraud-steps ol { margin: 8px 0 0 18px; padding: 0; }
.fraud-steps li { margin: 6px 0; }
.fraud-actions { max-width: 480px; margin: 12px auto 0; display: grid; gap: 8px; }
.fraud-list, [data-panel] > .card { max-width: 480px; margin-left: auto; margin-right: auto; }
.fraud-list input { width: 100%; }
.fraud-row { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.fraud-row.hit { background: rgba(255,84,112,.15); border-radius: 8px; padding: 8px; }
[data-panel] textarea { width: 100%; margin-top: 8px; }
[data-result], [data-panel] { scroll-margin-top: 84px; }

/* lotes: promoção e adicionais */
.lot.lot-promo { border: 2px solid #ff4fa3; background: linear-gradient(135deg, rgba(255,79,163,.14), rgba(122,92,255,.12)); box-shadow: 0 0 22px rgba(255,79,163,.25); }
.promo-tag { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: linear-gradient(90deg, #ff4fa3, #ff8a3d); border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; }
.lot.lot-addon { border: 2px solid #00b4d8; background: linear-gradient(135deg, rgba(0,180,216,.14), rgba(0,119,182,.08)); }
.lot-desc { color: var(--text, #e8e8ea); opacity: .9; margin: 2px 0 4px; white-space: pre-line; }
.ticket-big.addon .head { background: linear-gradient(135deg, #00b4d8, #0077b6); color: #fff; }
.ticket-big.addon .qr-full { background: #00b4d8; padding: 10px; border-radius: 14px; }
.addon-rules { background: rgba(0,180,216,.12); border: 1px solid rgba(0,180,216,.5); border-radius: 12px; padding: 10px 12px; margin-top: 10px; white-space: pre-line; }
.ticket.addon { border-left: 4px solid #00b4d8; }
.scan-result.addon { background: #00b4d8; color: #03264a; border: 4px solid #0077b6; }
.pin-card { border: 1px solid rgba(0,156,222,.45); }
.pin-code { font-family: monospace; font-size: 1.5rem; font-weight: 900; letter-spacing: .12em; color: #009cde; min-width: 120px; text-align: center; }
.offline-bar { max-width: 480px; margin: 0 auto 10px; padding: 10px 14px; border-radius: 12px; background: #ff8a00; color: #231100; font-weight: 700; font-size: .95rem; }
.offline-bar small { font-weight: 600; }
.scan-offline { max-width: 480px; margin: 6px auto 0; text-align: center; font-size: .8rem; font-weight: 800; color: #ff8a00; }
.dup-card { border: 2px solid var(--err); background: rgba(255,84,112,.08); }
.pos-item { padding-top: 34px; }
.pos-item.has-img { background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.78) 100%), var(--img) center / cover no-repeat, var(--c); }
.prod-thumb { width: 72px; height: 72px; flex: none; border-radius: 12px; background: var(--bg3) center / cover no-repeat; display: grid; place-items: center; font-size: 1.6rem; border: 1px solid var(--line); }
.addon-hero { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: #fff; cursor: pointer; padding: 12px 16px; border-radius: 16px; border: 2px solid #7fe3ff;
  background: linear-gradient(120deg, #0077b6, #00b4d8 55%, #48cae4); box-shadow: 0 6px 24px rgba(0,180,216,.35); animation: addonGlow 2.4s ease-in-out infinite; }
.addon-hero b { display: block; font-size: 1.05rem; font-weight: 900; letter-spacing: .02em; line-height: 1.2; }
.addon-hero .small { display: block; opacity: .95; margin-top: 2px; }
.addon-hero-emoji { font-size: 2.1rem; line-height: 1; animation: addonBounce 1.6s ease-in-out infinite; }
.addon-hero-go { font-size: 1.8rem; font-weight: 900; opacity: .9; }
[data-addons] { scroll-margin-top: 90px; }
@keyframes addonGlow { 50% { box-shadow: 0 6px 34px rgba(0,180,216,.65); } }
@keyframes addonBounce { 50% { transform: translateY(-4px) rotate(-6deg); } }
.addon-offer { border: 2px solid #00b4d8; background: linear-gradient(135deg, rgba(0,180,216,.16), rgba(0,119,182,.08)); }
.addon-offer b:first-child { font-size: 1.05rem; }
.addon-warn { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: rgba(255,197,61,.12); border: 1px solid rgba(255,197,61,.45); color: #ffd978; font-weight: 700; }
.group-card, .group-box { border: 1px solid rgba(122,92,255,.45); }
.group-box { padding: 12px; border-radius: 14px; background: rgba(122,92,255,.07); }
.group-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.group-msg { padding: 10px 12px; border-radius: 12px; background: var(--bg3, #2a2c31); border-left: 3px solid #7a5cff; }
.group-msg.new { border-left-color: #ffc53d; background: rgba(255,197,61,.08); }
.group-body { white-space: pre-line; margin-top: 2px; }
.app-card { border: 1px solid rgba(0,156,222,.45); }
.app-steps { margin: 8px 0 0 18px; padding: 0; line-height: 1.6; }
.promo-code { display: flex; gap: 8px; margin-top: 10px; }
.promo-code input { flex: 1; text-transform: uppercase; }

/* Contabilidade da festa */
.acct-result { border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.acct-result.pos { background: linear-gradient(135deg, rgba(46,229,157,.16), rgba(46,229,157,.04)); border-color: rgba(46,229,157,.4); }
.acct-result.neg { background: linear-gradient(135deg, rgba(255,84,112,.16), rgba(255,84,112,.04)); border-color: rgba(255,84,112,.4); }
.acct-result .k { font-weight: 800; font-size: .85rem; letter-spacing: .04em; }
.acct-result.pos .k, .acct-result.pos .v { color: var(--ok); }
.acct-result.neg .k, .acct-result.neg .v { color: var(--err); }
.acct-result .v { font-size: 2.1rem; font-weight: 900; line-height: 1.15; margin: 4px 0; }
.acct-result .s { font-size: .82rem; color: var(--muted); }
.acct-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.acct-line.total { border-bottom: 0; font-size: 1rem; }
.acct-cat { margin-top: 10px; }
.acct-bar { height: 8px; background: var(--bg2); border-radius: 6px; margin-top: 4px; overflow: hidden; }
.acct-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.acct-kind { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-total { padding: 11px 12px; border-radius: 10px; background: var(--bg2); font-weight: 800; }
.pill-btn { cursor: pointer; font: inherit; font-size: .75rem; }
.nowrap { white-space: nowrap; }
.acct-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.acct-row:last-child { border-bottom: 0; }
.acct-row-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.search-orders { flex-wrap: wrap; }
.search-orders input { flex: 1 1 100%; }
.search-orders select { flex: 1; }
.order-card .row.between b { white-space: nowrap; }
.fin-filters select { width: 100%; }
.fin-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fin-side { text-align: right; white-space: nowrap; }
button.chip { font-family: inherit; }
.tabs.tabs-wrap { flex-wrap: wrap; overflow: visible; }
.tabs.tabs-wrap .tab { flex: 0 0 auto; }
.fin-filters .chips { flex-wrap: wrap; overflow: visible; }
.promo-saved { padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(46,229,157,.18), rgba(0,156,222,.12)); border: 1px solid rgba(46,229,157,.45); }
.code-hero { text-align: center; padding: 18px 16px; border-radius: var(--radius); background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.code-hero .code-big { font-size: 2.6rem; font-weight: 900; letter-spacing: .12em; line-height: 1.15; margin: 6px 0; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.code-hero .btn { background: rgba(0,0,0,.28); color: #fff; border-color: rgba(255,255,255,.35); font-weight: 800; }
.code-hero .code-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
