/* =========================================================================================================
   RADAR · tela de entrar (abre sem sessão: não pode usar /css/radar.css, que fica atrás da senha).
   Mesmos tokens e o mesmo HUD do painel: fundo navy, grade, auroras, vidro com cantoneiras, radar varrendo.
   ========================================================================================================= */
:root {
  --bg-1: #050913;
  --vidro-1: rgba(18, 33, 64, .7);
  --vidro-2: rgba(8, 15, 32, .82);
  --linha: rgba(120, 190, 255, .13);
  --linha-2: rgba(120, 190, 255, .26);
  --cantoneira: rgba(62, 230, 255, .62);
  --texto: #EAF3FF;
  --texto-2: #B3C3DA;
  --texto-3: #8498B6;
  --ciano: #3EE6FF;
  --lima: #C6FF3D;
  --coral: #FF6B7A;
  --ambar: #FFC857;
  --meta: #46B4FF;
  --tt: #FF4F9A;
  --tt-2: #25F4EE;
  --f-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mola: cubic-bezier(.34, 1.56, .64, 1);
  --giro: 5.2s;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg-1); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg-1); color: var(--texto);
  font: 400 15px/1.45 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
h1, p { margin: 0; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ciano); outline-offset: 2px; }
.sem-js { position: relative; z-index: 5; text-align: center; padding: 24px 16px; }

/* ---------------------------------------------------------------- fundo */
.fundo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 640px at 50% -10%, rgba(28, 92, 170, .38), transparent 62%),
    radial-gradient(700px 520px at 100% 100%, rgba(110, 60, 210, .18), transparent 60%),
    linear-gradient(180deg, #071022 0%, #04070F 60%, #03050B 100%);
}
.fundo-grade {
  position: absolute; inset: -88px;
  background-image: linear-gradient(rgba(90, 180, 255, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(90, 180, 255, .075) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
  animation: derivaGrade 30s linear infinite;
}
.aurora { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .5; }
.au1 { top: -34vmax; right: -24vmax; background: radial-gradient(circle, rgba(62, 230, 255, .2), transparent 62%); animation: deriva 26s ease-in-out infinite alternate; }
.au2 { bottom: -40vmax; left: -28vmax; background: radial-gradient(circle, rgba(198, 255, 61, .1), transparent 60%); animation: deriva 34s ease-in-out infinite alternate-reverse; }
.linhas-crt { position: fixed; inset: 0; z-index: 10; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 3px); }

/* ---------------------------------------------------------------- cena */
.cena {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.radar { position: fixed; left: 50%; top: 26%; width: min(124vw, 640px); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); opacity: .7; pointer-events: none; }
/* celular: a caixa desce e o radar aparece em cima dela */
@media (max-width: 959px) and (min-height: 700px) { .cena { align-items: end; } }
@media (min-width: 960px) {
  .cena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; max-width: 1180px; margin: 0 auto; }
  .radar { position: relative; left: auto; top: auto; transform: none; width: min(100%, 520px); opacity: 1; justify-self: end; }
  .caixa { justify-self: start; }
}

/* radar: anéis, mira, varredura em conic-gradient e blips que acendem quando a varredura passa */
.radar-disco {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, rgba(18, 64, 92, .6), rgba(8, 26, 46, .42) 70%, rgba(4, 12, 24, .2));
  box-shadow: inset 0 0 0 1.2px rgba(62, 230, 255, .5), 0 0 80px -20px rgba(62, 230, 255, .45);
}
.anel { position: absolute; border-radius: 50%; border: 1px solid rgba(62, 230, 255, .16); }
.a1 { inset: 14%; }
.a2 { inset: 28%; border-style: dashed; border-color: rgba(62, 230, 255, .2); }
.a3 { inset: 41%; border-color: rgba(62, 230, 255, .3); background: radial-gradient(circle, rgba(5, 12, 26, .9), rgba(5, 12, 26, .5)); }
.mira {
  position: absolute; inset: 6%;
  background: linear-gradient(rgba(62, 230, 255, .1), rgba(62, 230, 255, .1)) 50% 0 / 1px 100% no-repeat, linear-gradient(90deg, rgba(62, 230, 255, .1), rgba(62, 230, 255, .1)) 0 50% / 100% 1px no-repeat;
}
.varre {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from -72deg, rgba(62, 230, 255, 0) 0deg, rgba(62, 230, 255, .07) 40deg, rgba(62, 230, 255, .36) 71.5deg, rgba(185, 246, 255, .9) 72deg, rgba(62, 230, 255, 0) 72.6deg);
  animation: girar var(--giro) linear infinite;
}
.blip {
  --c: var(--meta);
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 14px 2px var(--c); opacity: .3;
  animation: blip var(--giro) linear infinite;
}
.b1 { left: 69.3%; top: 27%; animation-delay: -4.622s; }
.b2 { left: 85.7%; top: 63%; animation-delay: -3.611s; }
.b3 { --c: var(--tt); left: 55.7%; top: 71.3%; animation-delay: -2.817s; box-shadow: -2px -1.5px 0 var(--tt-2), 0 0 14px 2px var(--tt); }
.b4 { --c: transparent; left: 18.6%; top: 76.4%; animation-delay: -1.878s; border: 2px solid var(--ambar); box-shadow: 0 0 12px rgba(255, 200, 87, .7); }
.b5 { left: 23.7%; top: 40.4%; animation-delay: -1.011s; }
.b6 { --c: var(--lima); left: 32%; top: 18.8%; width: 12px; height: 12px; margin: -6px 0 0 -6px; animation-delay: -.433s; }
.hora { position: absolute; font: 500 11px/1 var(--f-mono); color: rgba(160, 182, 212, .9); }
.h00 { top: 3%; left: 50%; transform: translateX(-50%); }
.h12 { bottom: 3%; left: 50%; transform: translateX(-50%); }
.h06 { right: 3%; top: 50%; transform: translateY(-50%); }
.h18 { left: 3%; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- caixa de vidro com cantoneiras */
.caixa {
  position: relative; width: 100%; max-width: 400px; padding: 26px 22px 20px; border-radius: 24px; isolation: isolate;
  background: linear-gradient(180deg, var(--vidro-1), var(--vidro-2));
  border: 1px solid var(--linha-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 70px -30px rgba(0, 0, 0, .95), 0 0 70px -30px rgba(62, 230, 255, .5);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  animation: subir .8s var(--ease) backwards;
}
.caixa::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: .85;
  background:
    linear-gradient(var(--cantoneira), var(--cantoneira)) left 10px top 10px / 16px 1.5px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) left 10px top 10px / 1.5px 16px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) right 10px top 10px / 16px 1.5px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) right 10px top 10px / 1.5px 16px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) left 10px bottom 10px / 16px 1.5px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) left 10px bottom 10px / 1.5px 16px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) right 10px bottom 10px / 16px 1.5px,
    linear-gradient(var(--cantoneira), var(--cantoneira)) right 10px bottom 10px / 1.5px 16px;
  background-repeat: no-repeat;
}
.caixa::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, transparent, var(--ciano), var(--lima), transparent); opacity: .7;
}
.marca { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.logo { width: 40px; height: 40px; overflow: visible; filter: drop-shadow(0 0 12px rgba(62, 230, 255, .45)); }
.logo-varre { transform-origin: 20px 20px; animation: girar 4.2s linear infinite; }
.logo-blip { transform-origin: 27px 25px; animation: blipLogo 4.2s ease-out infinite; }
.marca-nome { font: 700 24px/1 var(--f-sans); letter-spacing: -.035em; background: linear-gradient(180deg, #fff 30%, #9FEFFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 { font: 600 23px/1.2 var(--f-sans); letter-spacing: -.025em; }
.sub { margin-top: 6px; font-size: 13.5px; color: var(--texto-2); }

/* ---------------------------------------------------------------- formulário */
.form { margin-top: 20px; display: flex; flex-direction: column; }
.rot { font: 600 12px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); margin-bottom: 8px; }
.campo {
  position: relative; display: flex; align-items: center; border-radius: 14px; border: 1px solid var(--linha-2); background: rgba(3, 8, 18, .72);
  transition: border-color .2s, box-shadow .25s;
}
.campo:focus-within { border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(62, 230, 255, .2), 0 0 26px -8px rgba(62, 230, 255, .8); }
.campo.erro { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 107, 122, .18); }
.campo.tremer { animation: tremer .45s; }
.campo input {
  flex: 1; min-width: 0; height: 54px; padding: 0 6px 0 16px; border: 0; background: transparent; outline: none;
  font: 500 18px/1 var(--f-mono); letter-spacing: .08em; color: var(--texto); caret-color: var(--lima);
}
.campo input::placeholder { color: var(--texto-3); letter-spacing: 0; }
.ver { flex: none; width: 48px; height: 48px; margin-right: 3px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 11px; background: transparent; color: var(--texto-3); cursor: pointer; }
.ver:hover { color: var(--texto); background: rgba(255, 255, 255, .05); }
.olho { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ver[aria-pressed="false"] .risco { display: none; }
.ver[aria-pressed="true"] { color: var(--ciano); }
.aviso { min-height: 22px; margin: 8px 2px 4px; font-size: 13.5px; font-weight: 500; color: var(--coral); }
.aviso.espera { color: var(--ambar); }
.aviso.ok { color: var(--lima); }
.entrar {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden;
  font: 700 16.5px/1 var(--f-sans); letter-spacing: -.01em; color: #02121A;
  background: linear-gradient(100deg, #8AF3FF, var(--ciano) 45%, var(--lima));
  box-shadow: 0 14px 34px -12px rgba(62, 230, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .15s, box-shadow .3s, filter .2s;
}
.entrar::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: brilho 3.6s ease-in-out 1.2s infinite; }
.entrar:hover { filter: brightness(1.06); box-shadow: 0 18px 40px -12px rgba(62, 230, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.entrar:active { transform: scale(.98); }
.entrar:disabled { cursor: progress; filter: saturate(.6) brightness(.85); }
.entrar.bloqueado { cursor: not-allowed; }
.entrar-seta { font: 600 18px/1 var(--f-mono); transition: transform .25s var(--mola); }
.entrar:hover .entrar-seta { transform: translateX(4px); }
.entrar.carregando .entrar-seta { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #02121A; border-right-color: transparent; font-size: 0; animation: girar .8s linear infinite; }
.rodape { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font: 500 11.5px/1.3 var(--f-mono); color: var(--texto-3); }
.ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--lima); animation: pulsoVivo 2s ease-out infinite; }
.demo-dica { margin-top: 10px; padding: 8px 10px; border-radius: 10px; text-align: center; font-size: 12px; color: #FFE3A8; background: rgba(255, 200, 87, .08); border: 1px dashed rgba(255, 200, 87, .45); }

/* entrou: o radar acende em lima e a caixa sai */
body.liberado .varre { background: conic-gradient(from -72deg, rgba(198, 255, 61, 0) 0deg, rgba(198, 255, 61, .4) 71.5deg, #F2FFC0 72deg, rgba(198, 255, 61, 0) 72.6deg); animation-duration: .9s; }
body.liberado .radar-disco { box-shadow: inset 0 0 0 1.5px rgba(198, 255, 61, .8), 0 0 120px -10px rgba(198, 255, 61, .6); }
body.liberado .caixa { animation: sair .55s .25s var(--ease) forwards; }

/* ---------------------------------------------------------------- keyframes */
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes derivaGrade { to { transform: translate3d(44px, 44px, 0); } }
@keyframes deriva { to { transform: translate3d(-8vmax, 6vmax, 0) scale(1.12); } }
@keyframes blip { 0% { opacity: 1; transform: scale(1.7); } 12% { opacity: .95; transform: scale(1); } 70%, 100% { opacity: .22; transform: scale(.85); } }
@keyframes blipLogo { 0%, 55% { opacity: .35; transform: scale(.8); } 62% { opacity: 1; transform: scale(1.5); } 100% { opacity: .5; transform: scale(1); } }
@keyframes pulsoVivo { 0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, .65); } 80%, 100% { box-shadow: 0 0 0 8px rgba(198, 255, 61, 0); } }
@keyframes subir { from { transform: translateY(18px) scale(.98); } }
@keyframes sair { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes tremer { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes brilho { 0% { left: -40%; } 45%, 100% { left: 130%; } }

/* ---------------------------------------------------------------- movimento reduzido: tudo parado e visível */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fundo-grade, .aurora, .varre, .logo-varre, .logo-blip, .ponto, .entrar::after { animation: none !important; }
  .varre { transform: rotate(300deg); }
  .blip { animation: none !important; opacity: .9; }
  .campo.tremer { animation: none; }
  body.liberado .caixa { animation: none; opacity: .4; }
}
