/* Passaporte EAV — área do participante. Tema original do College Fair (mypassport).
   Cores do evento sobrescrevem: --bg (cor_primaria), --gold (cor_secundaria), --red (cor_acento). */
:root {
  --bg: #0D1B4B;
  --gold: #D4A017;
  --red: #CC2229;
  --red-h: color-mix(in srgb, var(--red) 82%, #000);
  --surf-deep: color-mix(in srgb, var(--bg) 78%, #000);      /* #091540 */
  --surf-deep2: color-mix(in srgb, var(--bg) 85%, #000);     /* #0a1640 */
  --surf: color-mix(in srgb, var(--bg) 80%, #3a5bbf);        /* #1a2d6b */
  --surf-b: color-mix(in srgb, var(--surf) 80%, #4d6fd0);    /* #253d82 */
  --surf-dark: color-mix(in srgb, var(--bg) 72%, #000);      /* #0a1e3d */
  --surf-hero: color-mix(in srgb, var(--bg) 88%, #1e3a8a);   /* #111e40 */
  --line: color-mix(in srgb, var(--surf) 85%, #000);         /* #1e3070 */
  --gold-dim: #c9a830;
  --t2: #7a91c4; --t3: #4a5f8a; --t4: #3a4f7a; --tc: #c0cce8;
  --green: #2A7B3E;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); font-family: sans-serif; min-height: 100vh; color: #fff; -webkit-text-size-adjust: 100%; }
body.centrado { display: flex; align-items: center; justify-content: center; padding: 20px; }
body.pagina { padding: 20px; }
a { color: var(--t2); }
button { font-family: inherit; }

/* ---- Card de autenticação (cadastro / entrar / avisos) ---- */
.card { background: var(--surf-deep); border-radius: 24px; padding: 32px 24px; width: 100%; max-width: 380px; }
.seal { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--gold); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 16px; overflow: hidden; }
.seal img { width: 100%; height: 100%; object-fit: cover; }
.seal span { color: var(--gold); font-size: 11px; font-weight: bold; text-align: center; line-height: 1.3; }
.card h1 { color: #fff; text-align: center; font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.card .sub { color: var(--t2); text-align: center; font-size: 13px; margin-bottom: 24px; line-height: 1.5; }
.field { margin-bottom: 14px; }
label { display: block; font-size: 11px; font-weight: 500; color: var(--t2); margin-bottom: 6px; letter-spacing: .05em; }
input, select { width: 100%; background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #fff; outline: none; font-family: sans-serif; }
input::placeholder { color: var(--t4); }
input:focus, select:focus { border-color: var(--gold); }
select option { color: #000; }
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-btn { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 10px; padding: 12px 8px; text-align: center; cursor: pointer; color: var(--t4); font-size: 12px; font-weight: 500; }
.type-btn.active { background: var(--surf-dark); border: 1.5px solid var(--gold); color: var(--gold-dim); }
.btn { width: 100%; background: var(--red); border: none; border-radius: 12px; padding: 14px; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; margin-top: 8px; }
.btn:hover { background: var(--red-h); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-secondary { width: 100%; background: #ffffff; border: none; border-radius: 12px; padding: 13px; color: var(--bg); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-secondary:hover { background: #e8ecf5; }
.link { text-align: center; margin-top: 12px; font-size: 12px; color: var(--t3); }
.link a { color: var(--t2); }
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; text-align: center; display: none; }
.msg.erro { display: block; background: #2d0a0a; color: #f09595; }
.msg.sucesso { display: block; background: #0a2d1a; color: #4caf7a; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider hr { flex: 1; border: none; border-top: 0.5px solid #2a3d6b; }
.divider span { font-size: 11px; color: var(--t2); }
.sent { text-align: center; }
.sent-icon { font-size: 48px; margin-bottom: 16px; }
.sent h2 { color: #fff; margin-bottom: 8px; font-weight: 500; }
.sent p { color: var(--t2); font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.sent .email { color: var(--gold); font-weight: 500; }
.btn-resend { background: #ffffff; border: none; border-radius: 99px; padding: 9px 24px; color: var(--bg); font-size: 12px; font-weight: 500; cursor: pointer; margin-top: 8px; }
.btn-resend:hover { background: #e8ecf5; }

/* ---- Home: lista de eventos ---- */
.home-title { color: #fff; font-size: 16px; font-weight: 500; margin: 20px 0 10px; }
.home-title small { display: block; color: var(--t2); font-size: 12px; font-weight: 400; margin-top: 2px; }
.evento-item { display: flex; align-items: center; gap: 12px; background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: #fff; }
.evento-item.completo { border-color: var(--gold); }
.evento-logo { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); background: var(--surf-dark); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; color: var(--gold); font-size: 11px; font-weight: bold; }
.evento-logo img { width: 100%; height: 100%; object-fit: cover; }
.evento-info { flex: 1; min-width: 0; }
.evento-nome { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.evento-meta { font-size: 11px; color: var(--t2); }
.evento-bar { background: var(--bg); border-radius: 99px; height: 4px; margin-top: 6px; }
.evento-bar div { background: var(--gold); border-radius: 99px; height: 4px; }
.evento-arrow { color: var(--t2); font-size: 18px; }
.vazio { color: var(--t3); font-size: 13px; text-align: center; padding: 24px 0; }
.btn-sair-topo { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 99px; padding: 6px 14px; color: var(--t2); font-size: 12px; cursor: pointer; }

/* ---- Passaporte ---- */
.header { background: var(--surf-deep); border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 16px; }
.header .seal { width: 64px; height: 64px; margin-bottom: 12px; }
.nome { color: #fff; font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.meta { color: var(--t2); font-size: 12px; }
.serie-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surf-dark); border: 1px solid rgba(212,160,23,0.4); border-radius: 99px; padding: 4px 12px; margin-top: 8px; }
.serie-label { font-size: 9px; color: var(--t2); letter-spacing: .08em; text-transform: uppercase; }
.serie-value { font-size: 12px; font-weight: 500; color: var(--gold); font-family: 'Courier New', monospace; letter-spacing: .06em; }
.aviso-encerrado { background: #2d1a00; border: 0.5px solid #6b3d00; color: var(--gold); border-radius: 10px; padding: 10px 14px; font-size: 12px; text-align: center; margin-bottom: 12px; }
.progress { background: var(--surf-deep2); border-radius: 12px; padding: 12px 20px; margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress-label span { font-size: 12px; color: var(--t2); }
.progress-label strong { font-size: 13px; color: var(--gold); }
.bar-bg { background: var(--surf); border-radius: 99px; height: 6px; }
.bar-fill { background: var(--gold); border-radius: 99px; height: 6px; transition: width .5s; }
.bar-fill.completo { background: var(--green); }
.stamps-title { font-size: 11px; font-weight: 500; color: var(--t2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 10px; }
.stamps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.dev-credit { text-align: center; font-size: 10px; color: rgba(212,160,23,0.4); letter-spacing: .04em; margin-bottom: 90px; }
.stamp { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 12px; padding: 10px 6px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; position: relative; }
.stamp.visited { background: var(--surf-dark); border: 1.5px solid var(--gold); }
.stamp-logo { width: 36px; height: 36px; border-radius: 8px; background: #111e40; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; color: #2a3a60; overflow: hidden; }
.stamp-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.stamp.visited .stamp-logo { background: #1a3060; color: var(--gold); border: 0.5px solid var(--gold); }
.stamp-name { font-size: 9px; font-weight: 500; color: var(--t3); line-height: 1.3; }
.stamp.visited .stamp-name { color: var(--gold-dim); }
.stamp-check { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--bg); }
.stamp-pending { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #2a3a60; }
.stamp-pts { position: absolute; top: 5px; right: 6px; font-size: 8px; font-weight: 600; color: var(--gold); }
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surf-deep); padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; border-top: 0.5px solid var(--line); z-index: 20; }
.btn-scan { flex: 1; background: var(--red); border: none; border-radius: 99px; padding: 12px; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.btn-scan:hover { background: var(--red-h); }
.btn-codigo { background: var(--surf); border: 0.5px solid var(--gold); border-radius: 99px; padding: 12px 14px; color: var(--gold); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn-sair { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 99px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--t2); font-size: 18px; text-decoration: none; cursor: pointer; }
.btn-ver-completo { width: 100%; background: var(--gold); border: none; border-radius: 12px; padding: 12px; color: var(--bg); font-size: 13px; font-weight: 500; cursor: pointer; margin: -74px 0 90px; position: relative; }

/* Scanner */
.scanner-overlay { display: none; position: fixed; inset: 0; background: #000; z-index: 200; flex-direction: column; align-items: center; justify-content: center; }
.scanner-overlay.open { display: flex; }
.scanner-box { position: relative; width: 280px; height: 280px; margin-bottom: 24px; }
#qr-video { width: 280px; height: 280px; object-fit: cover; border-radius: 16px; }
.scanner-corner { position: absolute; width: 24px; height: 24px; border-color: var(--gold); border-style: solid; }
.scanner-corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.scanner-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.scanner-corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.scanner-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.scanner-text { color: var(--t2); font-size: 13px; margin-bottom: 20px; text-align: center; }
.btn-fechar-scanner { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 99px; padding: 12px 32px; color: var(--tc); font-size: 14px; cursor: pointer; }

/* Meu código (modo monitor) */
.codigo-overlay { display: none; position: fixed; inset: 0; background: rgba(9,21,64,0.97); z-index: 250; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.codigo-overlay.open { display: flex; }
.codigo-overlay img { width: 240px; max-width: 80vw; border-radius: 12px; background: #fff; padding: 10px; margin: 16px 0; }
.codigo-overlay h2 { color: #fff; font-size: 18px; font-weight: 500; }
.codigo-overlay p { color: var(--t2); font-size: 13px; line-height: 1.6; max-width: 280px; }

/* Conclusão */
.conclusao-overlay { display: none; position: fixed; inset: 0; background: rgba(9,21,64,0.97); z-index: 300; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; text-align: center; overflow-y: auto; }
.conclusao-overlay.open { display: flex; }
.conclusao-seal { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--gold); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; animation: scaleIn .5s ease; overflow: hidden; flex-shrink: 0; }
.conclusao-seal img { width: 100%; height: 100%; object-fit: cover; }
@keyframes scaleIn { from{transform:scale(0)} to{transform:scale(1)} }
.conclusao-title { font-size: 26px; font-weight: 500; color: #fff; margin-bottom: 6px; }
.conclusao-nome { font-size: 17px; font-weight: 500; color: var(--gold); margin-bottom: 12px; }
.conclusao-serie { font-size: 13px; color: var(--t2); margin-bottom: 16px; font-family: 'Courier New', monospace; letter-spacing: .06em; }
.conclusao-serie span { color: var(--gold); font-weight: 500; }
.conclusao-badge { background: #0f3d25; border: 1.5px solid var(--green); border-radius: 12px; padding: 14px 24px; margin-bottom: 16px; }
.conclusao-badge p { color: #4caf7a; font-size: 13px; font-weight: 500; }
.conclusao-preview { width: 100%; max-width: 420px; border-radius: 8px; border: 1px solid rgba(212,160,23,0.3); margin-bottom: 16px; display: none; }
.share-btns { display: flex; gap: 8px; width: 100%; max-width: 420px; margin-bottom: 8px; }
.btn-download { flex: 1; background: var(--gold); border: none; border-radius: 12px; padding: 13px; color: var(--bg); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-download:hover { background: #b8890f; }
.btn-share { flex: 1; background: var(--red); border: none; border-radius: 12px; padding: 13px; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-share:hover { background: var(--red-h); }
.btn-email { width: 100%; max-width: 420px; background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 12px; padding: 12px; color: var(--tc); font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 8px; }
.btn-fechar-conclusao { width: 100%; max-width: 420px; background: transparent; border: 0.5px solid var(--surf-b); border-radius: 12px; padding: 11px; color: var(--t2); font-size: 13px; cursor: pointer; }
.share-btns button:disabled, .btn-email:disabled { opacity: .5; cursor: wait; }
.email-status { font-size: 11px; color: #4caf7a; text-align: center; margin: 6px 0; display: none; }
.generating { font-size: 11px; color: var(--t2); text-align: center; margin-bottom: 12px; }
.confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 299; }

/* Tour */
.tour-overlay { display: none; position: fixed; inset: 0; z-index: 400; }
.tour-overlay.open { display: block; }
.tour-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); }
.tour-highlight { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.75); z-index: 1; pointer-events: none; transition: all .35s ease; border: 2px solid var(--gold); }
.tour-card { position: absolute; background: var(--surf-deep); border: 1px solid var(--gold); border-radius: 16px; padding: 18px 20px; width: 280px; max-width: calc(100vw - 32px); z-index: 2; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.tour-step { font-size: 10px; color: var(--gold); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.tour-title { font-size: 15px; font-weight: 500; color: #fff; margin-bottom: 8px; }
.tour-text { font-size: 13px; color: var(--t2); line-height: 1.6; margin-bottom: 16px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; }
.tour-dots { display: flex; gap: 5px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surf-b); }
.tour-dot.active { background: var(--gold); }
.tour-btns { display: flex; gap: 8px; }
.btn-tour-skip { background: none; border: none; color: var(--t3); font-size: 12px; cursor: pointer; padding: 6px; }
.btn-tour-next { background: var(--red); border: none; border-radius: 8px; padding: 8px 18px; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.tour-arrow { position: absolute; width: 0; height: 0; }
.tour-arrow.up { border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 10px solid var(--gold); top: -10px; left: 24px; }
.tour-arrow.down { border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid var(--gold); bottom: -10px; left: 24px; }

/* ---- Estação ---- */
.topbar { background: var(--surf-deep2); padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 0.5px solid var(--line); }
.back { width: 32px; height: 32px; border-radius: 50%; background: var(--surf); border: 0.5px solid var(--surf-b); display: flex; align-items: center; justify-content: center; color: var(--t2); text-decoration: none; font-size: 16px; flex-shrink: 0; }
.topbar-title { font-size: 13px; font-weight: 500; color: #fff; }
.topbar-sub { font-size: 11px; color: var(--t2); }
.hero { background: var(--surf-hero); padding: 24px 20px 20px; text-align: center; border-bottom: 0.5px solid var(--line); }
.stand-logo { width: 72px; height: 72px; border-radius: 16px; background: var(--surf); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 16px; font-weight: 500; color: var(--gold); overflow: visible; position: relative; }
.stand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.visited-badge { position: absolute; bottom: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); border: 2px solid var(--surf-hero); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.stand-name { font-size: 20px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.stand-fullname { font-size: 12px; color: var(--t2); margin-bottom: 10px; }
.tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tag { font-size: 10px; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: #1a3060; color: var(--gold); border: 0.5px solid var(--gold); }
.body { padding: 16px; }
.section { margin-bottom: 16px; }
.section-label { font-size: 10px; font-weight: 500; color: var(--t2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; }
.section-text { font-size: 13px; color: #b0bedd; line-height: 1.6; white-space: pre-line; }
.courses { display: flex; flex-direction: column; gap: 6px; }
.course { background: var(--surf); border: 0.5px solid var(--surf-b); border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.course-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.course-name { font-size: 12px; color: var(--tc); }
.course-name small { color: var(--t2); }
hr.divider-line { border: none; border-top: 0.5px solid var(--line); margin: 0 0 16px; }
.action { background: var(--surf-deep); padding: 14px 16px 24px; border-top: 0.5px solid var(--line); }
.btn-stamp { width: 100%; background: var(--green); border: none; border-radius: 12px; padding: 14px; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; }
.btn-stamp:hover { background: #1f5c2e; }
.btn-stamp:disabled { opacity: .7; cursor: wait; }
.action .btn-scan { border-radius: 12px; margin-top: 10px; width: 100%; }
.stamp-hint { font-size: 11px; color: var(--t3); text-align: center; margin-top: 8px; }
.already { background: var(--surf-dark); border: 1.5px solid var(--gold); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.already-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.already-text { font-size: 14px; font-weight: 500; color: var(--gold-dim); margin-bottom: 2px; }
.already-sub { font-size: 11px; color: var(--t2); }
.btn-back { width: 100%; background: #ffffff; border: none; border-radius: 12px; padding: 11px; color: var(--bg); font-size: 13px; font-weight: 500; cursor: pointer; margin-top: 10px; }
.btn-back:hover { background: #e8ecf5; }
.no-qr { background: #1a1a2e; border: 1.5px solid var(--t4); border-radius: 12px; padding: 16px; text-align: center; }
.no-qr-icon { font-size: 32px; margin-bottom: 8px; }
.no-qr-title { font-size: 14px; font-weight: 500; color: var(--t2); margin-bottom: 6px; }
.no-qr-text { font-size: 12px; color: var(--t3); line-height: 1.6; }
.action .msg { margin-top: 10px; margin-bottom: 0; }

/* ---- Páginas de aviso ---- */
.aviso { text-align: center; max-width: 320px; }
.aviso .num { font-size: 72px; font-weight: 500; color: var(--gold); }
.aviso h1 { color: #fff; font-size: 20px; font-weight: 500; margin: 8px 0; }
.aviso p { color: var(--t2); font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.aviso a { display: inline-block; background: var(--red); color: #fff; text-decoration: none; padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.aviso a:hover { background: var(--red-h); }
