/* Desafio VITA Natalino: identidade VITA (navy, cream, gold) com um toque de Natal (vermelho só na meta surpresa). */
@font-face { font-family: 'Gunterz'; src: url('/assets/fonts/Gunterz-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'New Black'; src: url('/assets/fonts/NewBlackTypeface-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'New Black'; src: url('/assets/fonts/NewBlackTypeface-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'New Black'; src: url('/assets/fonts/NewBlackTypeface-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #001422;
  --navy-2: #0b2333;
  --gold: #C39433;
  --gold-claro: #e2c27e;
  --cream: #F0EBDD;
  --sand: #e7e1d3;
  --texto: #1c2a33;
  --cinza: #5d6670;
  --vermelho: #8E1C22;
  --vermelho-2: #6f141a;
  --raio: 18px;
  --sombra: 0 6px 18px rgba(0, 20, 34, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'New Black', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
.carregando { padding: 40vh 24px 0; text-align: center; color: var(--cinza); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───── Login ───── */
.login { min-height: 100vh; background: var(--navy); color: var(--cream); padding: 40px 20px 32px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; }
.login::before { content: ''; position: absolute; inset: -40px -80px auto auto; width: 280px; height: 280px; background: url('/assets/vita-symbol-cream.png') no-repeat center / contain; opacity: .07; }
.login-marca { position: relative; }
.simbolo { width: 44px; height: auto; margin-bottom: 18px; }
.sobre { margin: 0; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: 13px; color: var(--gold-claro); }
.login h1 { font-family: 'Gunterz', sans-serif; font-weight: 900; font-size: 56px; line-height: .95; letter-spacing: -0.03em; margin: 6px 0 14px; color: var(--cream); }
.lema { font-size: 18px; line-height: 1.4; margin: 0 0 10px; max-width: 30ch; }
.datas { display: inline-block; margin: 0; padding: 6px 12px; border: 1px solid var(--gold); border-radius: 999px; font-size: 14px; color: var(--gold-claro); }
.cartao-login { background: var(--cream); color: var(--texto); border-radius: var(--raio); padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); position: relative; }
.alterna { display: grid; grid-template-columns: 1fr 1fr; background: var(--sand); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.alterna button { border: 0; background: transparent; padding: 10px 8px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--cinza); }
.alterna button.ativo { background: var(--navy); color: var(--cream); }
form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
form input { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border: 1px solid #d6cfbd; border-radius: 12px; background: #fff; font-size: 16px; }
form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
form small { display: block; font-weight: 400; color: var(--cinza); margin-top: 6px; font-size: 13px; line-height: 1.35; }

.botao { display: block; width: 100%; border: 0; border-radius: 999px; padding: 15px 18px; background: var(--gold); color: var(--navy); font-weight: 700; font-size: 16px; box-shadow: 0 8px 22px rgba(195,148,51,0.28); }
.botao:disabled { opacity: .6; }
.botao.claro { background: transparent; color: var(--cream); border: 1px solid var(--gold-claro); box-shadow: none; }
.botao.pequeno { width: auto; padding: 11px 16px; font-size: 14px; box-shadow: none; white-space: nowrap; }
.link { display: block; margin: 18px auto 0; background: none; border: 0; color: var(--cinza); text-decoration: underline; font-size: 14px; padding: 8px; }

/* ───── Topo ───── */
.topo { background: var(--navy); color: var(--cream); padding: 22px 20px 20px; border-radius: 0 0 24px 24px; position: relative; overflow: hidden; }
.topo::after { content: ''; position: absolute; right: -30px; bottom: -50px; width: 170px; height: 170px; background: url('/assets/vita-symbol-cream.png') no-repeat center / contain; opacity: .07; pointer-events: none; }
.topo-linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topo .titulo { font-family: 'Gunterz', sans-serif; font-size: 34px; letter-spacing: -0.03em; margin: 2px 0 0; line-height: 1; }
.pontos { background: rgba(195,148,51,.14); border: 1px solid var(--gold); border-radius: 14px; padding: 8px 14px; text-align: center; color: var(--cream); position: relative; z-index: 1; }
.pontos strong { display: block; font-size: 24px; line-height: 1; color: var(--gold-claro); }
.pontos span { font-size: 12px; letter-spacing: .06em; }
.ola { margin: 14px 0 0; font-size: 15px; opacity: .9; position: relative; z-index: 1; }

/* ───── Conteúdo ───── */
.conteudo { padding: 18px 16px 110px; }
.rotulo { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 700; margin: 22px 4px 10px; }
.rotulo span { font-weight: 600; color: var(--cinza); font-size: 14px; }
.nota { color: var(--cinza); font-size: 13px; margin: 10px 4px; line-height: 1.4; }
.bloco { background: #fff; border: 1px solid var(--sand); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); }
.bloco h2 { font-family: 'Gunterz', sans-serif; letter-spacing: -0.02em; font-size: 24px; margin: 0 0 8px; text-transform: uppercase; }
.bloco p { margin: 0 0 6px; line-height: 1.45; }
.cadeado, .minha-pos { text-align: center; }
.grande { font-size: 44px; font-weight: 700; margin: 4px 0 !important; color: var(--navy); }

/* Metas: feita = fundo navy + ✓ + texto riscado (não depende de cor) */
.meta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--sand); border-radius: 16px; padding: 16px; margin-bottom: 10px; box-shadow: var(--sombra); transition: background .15s ease, transform .1s ease; }
button.meta:active { transform: scale(.99); }
.meta .caixa { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.meta-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.meta-txt strong { font-size: 16px; font-weight: 700; }
.meta-txt small { color: var(--cinza); font-size: 13px; line-height: 1.35; }
.meta-pts { flex: none; font-size: 13px; font-weight: 700; color: var(--cinza); }
.meta.feita { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.meta.feita .caixa { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.meta.feita .meta-txt strong { text-decoration: line-through; text-decoration-thickness: 2px; }
.meta.feita .meta-txt small, .meta.feita .meta-pts { color: var(--gold-claro); }
.meta.anulada { opacity: .65; }
.meta.anulada .caixa { border-style: dashed; }
.meta.previa .meta-ico { font-size: 22px; }
.carregando-item { opacity: .55; pointer-events: none; }

/* Meta surpresa: o toque de Natal */
.surpresa { background: var(--vermelho); color: var(--cream); border-radius: var(--raio); padding: 20px; margin-top: 4px; box-shadow: 0 10px 26px rgba(142,28,34,.28); border: 2px solid var(--gold); position: relative; overflow: hidden; }
.surpresa::after { content: '✦'; position: absolute; right: 16px; top: 10px; color: var(--gold-claro); font-size: 22px; opacity: .8; }
.surpresa-tag { margin: 0 0 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: var(--gold-claro); }
.surpresa h2 { font-family: 'Gunterz', sans-serif; text-transform: uppercase; letter-spacing: -0.02em; font-size: 26px; line-height: 1.05; margin: 0 0 10px; }
.surpresa p { margin: 0 0 14px; line-height: 1.45; font-size: 15px; }
.surpresa.fechada { background: var(--vermelho-2); border-style: dashed; }
.surpresa.fechada p:last-child { margin-bottom: 0; }
.surpresa.feita { background: var(--navy); }
.surpresa-status { font-weight: 700; margin: 0 !important; }

/* Histórico */
.calendario { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.dia { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px; border-radius: 14px; background: #fff; border: 1px solid var(--sand); }
.dia .ds { font-size: 11px; text-transform: uppercase; color: var(--cinza); letter-spacing: .04em; }
.dia .dn { font-size: 20px; font-weight: 700; }
.dia .dst { font-size: 13px; font-weight: 700; min-height: 18px; }
.dia.completo { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.dia.completo .ds { color: var(--gold-claro); }
.dia.completo .dst { color: var(--gold-claro); font-size: 16px; }
.dia.vazio .dst { color: var(--cinza); }
.dia.futuro { opacity: .5; }
.dia.hoje { outline: 2px solid var(--gold); outline-offset: 1px; }
.dia.aberto { box-shadow: 0 0 0 3px var(--navy); }
.legenda { font-size: 12px; color: var(--cinza); margin: 10px 4px; line-height: 1.5; }

/* Ranking */
.ranking { list-style: none; padding: 0; margin: 16px 0 0; }
.ranking li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--sand); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.ranking .pos { width: 34px; font-weight: 700; color: var(--cinza); }
.ranking li:nth-child(-n+3) .pos { color: var(--gold); }
.ranking .nome { flex: 1; font-weight: 600; }
.ranking .nome em { font-style: normal; font-weight: 400; color: var(--cinza); }
.ranking .pts { font-weight: 700; }
.ranking li.eu { border: 2px solid var(--navy); }

/* Abas */
.abas { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--sand); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
.abas button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--cinza); padding: 6px; border-radius: 12px; }
.abas .ico { font-size: 20px; line-height: 1.1; }
.abas button.ativo { color: var(--navy); background: var(--cream); }
.abas button.ativo::after { content: ''; width: 18px; height: 3px; border-radius: 3px; background: var(--gold); margin-top: 2px; }

/* Folha "Como funciona" */
.folha-fundo { position: fixed; inset: 0; background: rgba(0,20,34,.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.folha { background: var(--cream); width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.folha h2 { font-family: 'Gunterz', sans-serif; text-transform: uppercase; letter-spacing: -0.02em; margin: 0 0 14px; font-size: 26px; }
.regras { padding-left: 20px; margin: 0 0 18px; }
.regras li { margin-bottom: 10px; line-height: 1.45; }
.agua { background: #fff; border: 1px solid var(--sand); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.agua p { margin: 0 0 10px; }
.linha { display: flex; gap: 8px; align-items: center; }
.linha input { margin: 0; flex: 1; min-width: 0; }
.folha-acoes .link { margin-top: 10px; }

/* Aviso */
.aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; background: var(--navy); color: var(--cream); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ───── Painel da equipe ───── */
body.equipe #equipe { max-width: 760px; margin: 0 auto; }
.eq { padding-bottom: 40px; }
.eq-abas { max-width: 360px; }
.eq-linha { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: left; padding: 0; }
.eq-ranking li { flex-direction: column; align-items: stretch; }
.eq-linha .nome small { display: block; font-weight: 400; color: var(--cinza); font-size: 12px; margin-top: 2px; }
.eq-detalhe { border-top: 1px solid var(--sand); margin-top: 12px; padding-top: 8px; }
.eq-dia { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--sand); }
.eq-dia strong { width: 74px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--sand); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 13px; color: var(--cinza); }
.chip.feita { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.chip.anulada { border-style: dashed; border-color: var(--vermelho); color: var(--vermelho); text-decoration: line-through; }
.eq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-acoes { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.eq-acoes .link { margin: 0; }
.eq-surpresa { margin-bottom: 12px; }
.eq-surpresa .surpresa-tag { color: var(--vermelho); }
.eq-surpresa.hoje { border: 2px solid var(--gold); }
.eq-surpresa h2 { font-size: 20px; }
