/* Arena de Vendas — fiel ao Figma "Proposta A" (1920×1080). Tokens extraídos do arquivo P1XxEgixC0Wk9xu3Xkx2yb. */
:root {
  --fundo: #00050d;
  --azul: #0063f2;
  --azul-claro: #80b4ff;
  --verde: #00ffaa;
  --laranja: #ff9f40;
  --laranja-escuro: #c46a12;
  --branco: #ffffff;
  --txt-2: rgba(255, 255, 255, 0.6);
  --txt-3: rgba(255, 255, 255, 0.5);
  --borda: rgba(255, 255, 255, 0.08);
  --borda-2: rgba(255, 255, 255, 0.05);
  --card: rgba(255, 255, 255, 0.04);
  --item: rgba(255, 255, 255, 0.03);
  --mola: cubic-bezier(0.34, 1.56, 0.64, 1);
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--fundo); }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--branco); -webkit-font-smoothing: antialiased; }
p { line-height: normal; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Palco fixo de 1920×1080, escalado para caber em qualquer tela */
#palco { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; background: var(--fundo); transform-origin: 0 0; }

.luz-azul { position: absolute; left: 360px; top: 300px; width: 1200px; height: 800px; pointer-events: none; animation: deriva 18s ease-in-out infinite alternate; }
.luz-azul img { position: absolute; left: -26.67%; top: -40%; width: 153.34%; height: 180%; display: block; }
@keyframes deriva { from { transform: translate(-60px, 10px) scale(1); opacity: .85; } to { transform: translate(60px, -30px) scale(1.08); opacity: 1; } }

.conteudo { position: absolute; left: 40px; top: 32px; width: 1840px; height: 1016px; display: flex; flex-direction: column; gap: 24px; }

.card { border: 1px solid var(--borda); border-radius: 28px; background: var(--card); position: relative; overflow: hidden; }

/* Entrada da página */
.entra { opacity: 0; transform: translateY(18px); animation: entra .9s var(--suave) forwards; }
@keyframes entra { to { opacity: 1; transform: none; } }

/* ---------- Cabeçalho ---------- */
.header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.marca { display: flex; align-items: center; gap: 24px; }
.logo { display: block; width: 139.482px; height: 30px; }
.divisor { width: 1px; height: 36px; background: rgba(255, 255, 255, 0.15); }
.titulo { display: flex; flex-direction: column; gap: 2px; }
.titulo .t1 { font-weight: 700; font-size: 24px; }
.titulo .t2 { font-size: 14px; color: var(--txt-2); }
.acoes { display: flex; align-items: center; gap: 16px; }
.ao-vivo { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 100px; background: rgba(0, 255, 170, 0.12); color: var(--verde); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; transition: background .4s, color .4s; }
.ao-vivo .ponto { position: relative; width: 8px; height: 8px; }
.ao-vivo .ponto img { position: absolute; inset: -100%; width: 300%; height: 300%; animation: pulsa 1.6s ease-in-out infinite; }
.ao-vivo.atraso { background: rgba(255, 159, 64, 0.14); color: var(--laranja); }
.ao-vivo.atraso .ponto img { filter: hue-rotate(-120deg) saturate(1.4); }
@keyframes pulsa { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.relogio { display: flex; flex-direction: column; align-items: flex-end; }
.relogio .hora { font-weight: 700; font-size: 26px; }
.relogio .atualizado { font-size: 12px; color: var(--txt-3); }

/* ---------- Corrida da meta ---------- */
.corrida { flex-shrink: 0; padding: 24px 32px; display: flex; flex-direction: column; gap: 18px; border-color: rgba(128, 180, 255, 0.18);
  background-image: linear-gradient(90deg, rgba(0, 99, 242, 0.18) 0%, rgba(0, 99, 242, 0.02) 100%), linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)); }
.corrida .topo { display: flex; align-items: flex-end; justify-content: space-between; }
.valores { display: flex; flex-direction: column; gap: 4px; }
.rotulo { font-weight: 700; font-size: 13px; letter-spacing: 1.56px; color: var(--azul-claro); }
.montante { display: flex; align-items: baseline; gap: 14px; }
.montante .grande { font-weight: 800; font-size: 56px; font-variant-numeric: tabular-nums; }
.montante .grande .unid { font-size: 40px; }
.montante .de { font-weight: 500; font-size: 22px; color: rgba(255, 255, 255, 0.55); }
.status { display: flex; align-items: center; gap: 12px; }
.falta { padding: 12px 22px; border-radius: 100px; background: rgba(0, 255, 170, 0.12); border: 1px solid rgba(0, 255, 170, 0.35); }
.falta p { font-weight: 700; font-size: 22px; color: var(--verde); }
.projecao { padding: 8px 16px; border-radius: 100px; background: rgba(128, 180, 255, 0.16); }
.projecao p { font-weight: 600; font-size: 16px; color: var(--azul-claro); }

.pista { position: relative; width: 1776px; height: 78px; flex-shrink: 0; }
.pista .trilho { position: absolute; left: 0; top: 24px; width: 1776px; height: 24px; border-radius: 100px; background: rgba(255, 255, 255, 0.07); }
.preenchimento { position: absolute; left: 0; top: 24px; height: 24px; width: 0; border-radius: 100px; overflow: hidden;
  background: linear-gradient(90deg, var(--azul), var(--azul-claro)); box-shadow: 0 0 20px rgba(0, 99, 242, 0.6); transition: width 1.6s var(--suave); }
.preenchimento .brilho { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.35) 45%, transparent 60%); transform: translateX(-100%); animation: brilho 3.2s ease-in-out infinite; }
@keyframes brilho { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.marco { position: absolute; top: 20px; width: 2px; height: 32px; background: rgba(255, 255, 255, 0.22); }
.marco-txt { position: absolute; top: 58px; font-weight: 500; font-size: 13px; color: var(--txt-3); transform: translateX(-50%); }
.marco-txt.fim { left: auto; right: 0; transform: none; color: rgba(255, 255, 255, 0.9); }
.ritmo { position: absolute; top: 20px; width: 3px; height: 32px; border-radius: 2px; background: rgba(255, 255, 255, 0.95); transition: left 1.6s var(--suave); }
.ritmo-txt { position: absolute; top: 0; font-weight: 500; font-size: 12px; color: rgba(255, 255, 255, 0.75); transform: translateX(calc(-100% + 2px)); transition: left 1.6s var(--suave); }
.indicador { position: absolute; top: 19px; width: 34px; height: 34px; margin-left: -17px; transition: left 1.6s var(--suave); }
.indicador img { position: absolute; inset: -52.94%; width: 205.88%; height: 205.88%; }
.indicador-txt { position: absolute; top: 0; font-weight: 800; font-size: 13px; transform: translateX(24px); transition: left 1.6s var(--suave); }

/* ---------- Meio ---------- */
.meio { flex: 1 0 0; min-height: 0; display: flex; gap: 24px; }
.cab .h { font-weight: 700; font-size: 22px; }
.cab .s { font-size: 13px; color: var(--txt-2); margin-top: 2px; }

.podio-card { width: 1100px; flex-shrink: 0; padding: 24px 28px 0; display: flex; flex-direction: column; gap: 12px;
  background-image: linear-gradient(0deg, rgba(0, 99, 242, 0.1) 0%, rgba(0, 99, 242, 0) 100%), linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)); }
.podio-card .cab { display: flex; align-items: center; justify-content: space-between; }
.aviso { padding: 8px 16px; border-radius: 100px; background: rgba(128, 180, 255, 0.14); }
.aviso p { font-weight: 600; font-size: 13px; color: var(--azul-claro); }

.podio { flex: 1 0 0; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 24px; }
.coluna { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 300px; }
.avatar { display: flex; align-items: center; justify-content: center; border-radius: 200px; background: linear-gradient(0deg, var(--azul), var(--azul-claro)); font-weight: 800; color: #fff; flex-shrink: 0; transition: background .6s, box-shadow .6s, border-color .6s; }
.coluna .avatar { width: 88px; height: 88px; font-size: 28px; border: 3px solid rgba(255, 255, 255, 0.6); }
.coluna.p1 .avatar { width: 112px; height: 112px; font-size: 36px; border: 4px solid rgba(128, 180, 255, 0.9); box-shadow: 0 0 36px rgba(0, 99, 242, 0.7); animation: respira 3.4s ease-in-out infinite; }
.coluna.p3 .avatar { border-color: rgba(255, 159, 64, 0.8); }
@keyframes respira { 0%, 100% { box-shadow: 0 0 36px rgba(0, 99, 242, 0.7); } 50% { box-shadow: 0 0 56px rgba(0, 99, 242, 0.95); } }
.coluna .nome { font-weight: 700; font-size: 22px; }
.coluna .qtd { font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.coluna.p1 .qtd { font-size: 36px; }
.coluna .qtd .unid { font-size: .62em; font-weight: 700; color: rgba(255,255,255,.8); }
.selo { padding: 6px 14px; border-radius: 100px; background: rgba(128, 180, 255, 0.14); font-weight: 700; font-size: 14px; color: var(--azul-claro); transition: background .5s, color .5s; }
.coluna.p1 .selo { background: rgba(0, 255, 170, 0.14); color: var(--verde); }
.base { width: 300px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--borda); border-bottom: 0; border-radius: 24px 24px 0 0; font-weight: 800; font-size: 48px; color: rgba(255, 255, 255, 0.9); transition: background .6s; }
.coluna.p1 .base { height: 132px; font-size: 64px; background: linear-gradient(180deg, rgba(0, 99, 242, 0.6), rgba(0, 99, 242, 0.1)); }
.coluna.p2 .base { height: 96px; background: linear-gradient(180deg, rgba(128, 180, 255, 0.3), rgba(128, 180, 255, 0.04)); }
.coluna.p3 .base { height: 68px; background: linear-gradient(180deg, rgba(255, 159, 64, 0.28), rgba(255, 159, 64, 0.03)); }
.coluna.vazia { opacity: .35; }

/* destaque de quem acabou de vender (estado "Nova venda") */
.coluna.destaque .avatar { background: linear-gradient(0deg, #00c98a, var(--verde)); border-color: rgba(255,255,255,.6); color: #003322; box-shadow: 0 0 40px rgba(0, 255, 170, 0.6); animation: pop .9s var(--mola); }
.coluna.destaque .selo { background: rgba(0, 255, 170, 0.14); color: var(--verde); }
.coluna.destaque .base { background: linear-gradient(180deg, rgba(0, 255, 170, 0.28), rgba(0, 255, 170, 0.04)); border-color: rgba(0, 255, 170, 0.35); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

.demais { flex: 1 0 0; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.demais .cab { padding-bottom: 8px; }
.linhas { display: flex; flex-direction: column; gap: 8px; }
.linha { height: 60px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--item); border: 1px solid var(--borda-2); transition: background .5s, border-color .5s, box-shadow .5s; }
.linha .pos { width: 24px; text-align: center; font-weight: 700; font-size: 16px; color: rgba(255, 255, 255, 0.7); }
.linha .avatar { width: 36px; height: 36px; font-size: 12px; font-weight: 700; }
.linha .info { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.linha .info .n { font-weight: 600; font-size: 16px; }
.barra { height: 4px; border-radius: 100px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.barra .p { height: 4px; border-radius: 100px; background: linear-gradient(90deg, var(--azul), var(--azul-claro)); width: 0; transition: width 1.4s var(--suave); }
.barra .p.baixo { background: linear-gradient(90deg, var(--laranja-escuro), var(--laranja)); }
.linha .res { width: 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.linha .res .v { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.linha .res .m { font-weight: 600; font-size: 12px; }
.linha .res .m.baixo { color: var(--laranja); }
.linha.destaque { background: rgba(0, 255, 170, 0.08); border-color: rgba(0, 255, 170, 0.6); box-shadow: 0 0 24px rgba(0, 255, 170, 0.18); }
.linha.destaque .avatar { background: linear-gradient(0deg, #00c98a, var(--verde)); color: #003322; animation: pop .9s var(--mola); }
.sem-dados { color: var(--txt-3); font-size: 14px; padding: 12px 4px; }

/* ---------- Rodapé ---------- */
.rodape { flex-shrink: 0; display: flex; gap: 24px; align-items: stretch; }
.hoje { width: 520px; flex-shrink: 0; padding: 20px 28px; display: flex; flex-direction: column; gap: 10px; transition: border-color .6s, background .6s; }
.hoje .rotulo { font-size: 12px; letter-spacing: 1.44px; }
.montante-hoje { display: flex; align-items: baseline; gap: 10px; }
.montante-hoje .grande { font-weight: 800; font-size: 32px; font-variant-numeric: tabular-nums; }
.montante-hoje .grande .unid { font-size: 22px; }
.montante-hoje .de { font-weight: 500; font-size: 16px; color: rgba(255, 255, 255, 0.55); }
.barra-hoje { position: relative; width: 464px; height: 10px; }
.barra-hoje .trilho { position: absolute; inset: 0; border-radius: 100px; background: rgba(255, 255, 255, 0.08); }
.barra-hoje .fill { position: absolute; left: 0; top: 0; height: 10px; width: 0; border-radius: 100px; background: linear-gradient(90deg, var(--azul), var(--azul-claro)); transition: width 1.4s var(--suave), background .6s; }
.hoje-txt { font-weight: 600; font-size: 14px; color: var(--azul-claro); }
.hoje.batida { border-color: rgba(0, 255, 170, 0.35); background-image: linear-gradient(0deg, rgba(0,255,170,.06), rgba(0,255,170,.02)); }
.hoje.batida .fill { background: linear-gradient(90deg, #00c98a, var(--verde)); }
.hoje.batida .hoje-txt { color: var(--verde); }

.ultimas { flex: 1 0 0; min-width: 0; padding: 20px 28px; display: flex; align-items: center; gap: 16px; }
.titulo-ult { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.titulo-ult .h { font-weight: 600; font-size: 20px; }
.tempo-real { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; color: var(--verde); }
.tempo-real img { animation: pulsa 1.6s ease-in-out infinite; }
.lista-vendas { flex: 1 0 0; min-width: 0; display: flex; gap: 16px; overflow: hidden; }
.venda { flex: 1 0 0; min-width: 0; height: 60px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--item); border: 1px solid var(--borda-2); transition: background .6s, border-color .6s, box-shadow .6s; }
.venda .avatar { width: 36px; height: 36px; font-size: 12px; font-weight: 700; }
.venda .info { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.venda .info .n { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.venda .info .d { font-size: 13px; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; }
.venda .lado { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.venda .lado .v { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.venda .lado .h { font-weight: 500; font-size: 12px; color: var(--txt-3); }
.venda.nova { background: rgba(0, 255, 170, 0.08); border-color: rgba(0, 255, 170, 0.7); box-shadow: 0 0 22px rgba(0, 255, 170, 0.2); animation: chega .8s var(--mola); }
.venda.nova .avatar { background: linear-gradient(0deg, #00c98a, var(--verde)); color: #003322; }
.venda.nova .lado .v { color: var(--verde); }
.venda.nova .lado .h { color: var(--verde); }
@keyframes chega { from { opacity: 0; transform: translateX(-40px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Nova venda: glow nas bordas + toast ---------- */
.glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.glow.on { opacity: 1; }
.glow.on .contorno { animation: contorno 1.2s ease-in-out infinite alternate; }
.glow .g { position: absolute; }
.glow .g.topo { left: 0; top: 0; width: 1920px; height: 150px; background: linear-gradient(180deg, rgba(0,255,170,.28), rgba(0,255,170,0)); }
.glow .g.base { left: 0; top: 930px; width: 1920px; height: 150px; background: linear-gradient(0deg, rgba(0,255,170,.28), rgba(0,255,170,0)); }
.glow .g.esq { left: 0; top: 0; width: 150px; height: 1080px; background: linear-gradient(90deg, rgba(0,255,170,.28), rgba(0,255,170,0)); }
.glow .g.dir { left: 1770px; top: 0; width: 150px; height: 1080px; background: linear-gradient(270deg, rgba(0,255,170,.28), rgba(0,255,170,0)); }
.glow .contorno { position: absolute; inset: 0; border: 3px solid rgba(0, 255, 170, 0.7); filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.5)); }
@keyframes contorno { from { border-color: rgba(0,255,170,.45); } to { border-color: rgba(0,255,170,.9); } }

#confete { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }

.toast { position: absolute; left: 50%; top: 24px; display: flex; align-items: center; gap: 16px; padding: 16px 28px 16px 18px; border-radius: 24px;
  border: 1.5px solid rgba(0, 255, 170, 0.7); box-shadow: 0 0 36px rgba(0, 255, 170, 0.3);
  background-image: linear-gradient(90deg, rgba(0, 255, 170, 0.1), rgba(0, 255, 170, 0.1)), linear-gradient(90deg, rgba(2, 17, 12, 0.95), rgba(2, 17, 12, 0.95));
  transform: translate(-50%, -170px); opacity: 0; transition: transform .7s var(--mola), opacity .4s; z-index: 5; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast .icone { width: 48px; height: 48px; border-radius: 100px; background: var(--verde); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast.on .icone { animation: pop .8s var(--mola) .2s both; }
.toast .textos { display: flex; flex-direction: column; gap: 2px; }
.toast .k { font-weight: 700; font-size: 12px; letter-spacing: 1.44px; color: var(--verde); }
.toast .t { font-weight: 700; font-size: 22px; }
.toast .d { font-weight: 500; font-size: 14px; color: rgba(255, 255, 255, 0.7); }

/* número que acabou de mudar */
.salto { display: inline-block; animation: salto .7s var(--mola); }
@keyframes salto { 0% { transform: scale(1); } 40% { transform: scale(1.18); color: var(--verde); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
