/* Tela de entrada do painel (login por e-mail + código, 14/11/2026).
   Paleta oficial MPC em escuro: Deep Twilight, Midnight e Parchment. Montserrat sozinha. */
:root {
  --twilight-deep: #120B3A;
  --twilight: #1A1353;
  --midnight: #251A74;
  --parchment: #EEEDE9;
  --branco: #FFFFFF;
  --texto-suave: rgba(238, 237, 233, 0.66);
  --borda: rgba(238, 237, 233, 0.16);
  --perigo: #E8A196;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--branco);
  background: radial-gradient(120% 90% at 50% 0%, var(--midnight) 0%, var(--twilight) 38%, var(--twilight-deep) 78%);
  background-color: var(--twilight-deep);
  overflow-x: hidden;
}

.fundo-rede {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fundo-rede { --parch: var(--parchment); }
/* o feixe desenha o contorno (dash do tamanho do caminho, pathLength 1000) e deixa o traço aceso */
.fundo-rede .lm-traco {
  fill: none; stroke: var(--parch); stroke-width: 1.3; stroke-opacity: .30;
  stroke-linejoin: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation-name: desenha; animation-timing-function: cubic-bezier(.45, 0, .25, 1); animation-fill-mode: forwards;
}
/* a ponta do feixe: um trecho curto e brilhante que vai na frente do traço */
.fundo-rede .lm-ponta {
  fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 46 954; stroke-dashoffset: 1046; opacity: 0;
  animation-name: ponta; animation-timing-function: cubic-bezier(.45, 0, .25, 1); animation-fill-mode: forwards;
}
.fundo-rede .lm-halo {
  fill: none; stroke: var(--parch); stroke-width: 7; stroke-opacity: .30;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation-name: desenha; animation-timing-function: cubic-bezier(.45, 0, .25, 1); animation-fill-mode: forwards;
}
.fundo-rede .halo-brilho { opacity: 0; animation: surge .9s ease-out .7s forwards; }
/* raios: trechos curtos correndo pelo LM sem parar */
.fundo-rede .lm-raio {
  fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linecap: round; stroke-opacity: .75;
  stroke-dasharray: 48 952; stroke-dashoffset: 1000;
  animation-name: corre; animation-timing-function: linear; animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.fundo-rede .lm-raio.volta { animation-direction: reverse; }
/* feixes longos cruzando o fundo na diagonal */
.fundo-rede .feixes { transform: rotate(-24deg); transform-origin: 50% 50%; transform-box: view-box; }
.fundo-rede .feixes rect {
  opacity: .22;
  animation-name: atravessa; animation-timing-function: linear; animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
/* redesenho ao redimensionar: o LM aparece pronto, os raios seguem */
.fundo-rede.pronto .lm-traco, .fundo-rede.pronto .lm-halo { animation: none; stroke-dashoffset: 0; }
.fundo-rede.pronto .lm-ponta { display: none; }
.fundo-rede.pronto .halo-brilho { animation: none; opacity: 1; }
/* reduzir movimento: só o LM aceso, parado */
.fundo-rede.parado .lm-raio, .fundo-rede.parado .feixes { display: none; }

.entrar {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 48px 16px;
}

/* Wordmark: registro do kit (Montserrat 300, entreletra .26em, A em lambda chanfrado) */
.marca { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wm {
  display: inline-block;
  white-space: nowrap;
  font-weight: 300;
  font-size: clamp(30px, 7vw, 46px);
  letter-spacing: .26em;
  margin-right: -.26em;
  color: var(--parchment);
  line-height: 1;
}
.wm .l {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  animation: letra .5s cubic-bezier(.2, .7, .2, 1) forwards;
}
.wm .l:nth-child(1) { animation-delay: 0.03s; }
.wm .l:nth-child(2) { animation-delay: 0.07s; }
.wm .l:nth-child(3) { animation-delay: 0.10s; }
.wm .l:nth-child(4) { animation-delay: 0.14s; }
.wm .l:nth-child(5) { animation-delay: 0.17s; }
.wm .l:nth-child(6) { animation-delay: 0.21s; }
.wm .l:nth-child(7) { animation-delay: 0.24s; }
.wm .l:nth-child(8) { animation-delay: 0.28s; }
.marca-a { display: inline-block; width: .7517em; height: .7em; margin-left: .1061em; margin-right: .3606em; vertical-align: baseline; fill: currentColor; }
/* no wordmark o espaço do A vem das margens do kit, não do entreletra */
.wm .l-a { letter-spacing: 0; }

.traco {
  width: min(280px, 60vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--parchment), transparent);
  transform: scaleX(0);
  animation: risca .6s cubic-bezier(.4, 0, .2, 1) .35s forwards;
}
.sub {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--texto-suave);
  opacity: 0;
  animation: surge .5s ease-out .5s forwards;
}

.cartao {
  width: 100%;
  max-width: 400px;
  background: rgba(26, 19, 83, 0.72);
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 28px 24px 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(18px);
  animation: sobe .55s cubic-bezier(.2, .7, .2, 1) .3s forwards;
}
h1 { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.ajuda { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: var(--texto-suave); }
label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); margin-bottom: 8px; }
input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--branco);
  background: rgba(18, 11, 58, 0.7);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--parchment); box-shadow: 0 0 0 3px rgba(238, 237, 233, 0.14); }
#codigo { font-size: 26px; letter-spacing: .5em; text-align: center; padding-left: calc(14px + .5em); }
button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--twilight);
  background: var(--parchment);
  border: 0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: transform .15s, opacity .2s;
}
button[type="submit"]:hover { transform: translateY(-1px); }
button[type="submit"]:disabled { opacity: .6; cursor: wait; transform: none; }
button.link {
  display: block;
  margin: 14px auto 0;
  font: inherit;
  font-size: 13px;
  color: var(--texto-suave);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.aviso { min-height: 20px; margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--texto-suave); text-align: center; }
.aviso.erro { color: var(--perigo); }

form[hidden] { display: none; }
.troca { animation: troca .45s cubic-bezier(.2, .7, .2, 1); }

@keyframes letra { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes risca { to { transform: scaleX(1); } }
@keyframes surge { to { opacity: 1; } }
@keyframes sobe { to { opacity: 1; transform: none; } }
@keyframes desenha { to { stroke-dashoffset: 0; } }
@keyframes ponta { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: 46; } }
@keyframes corre { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes atravessa { from { transform: translateX(0); } to { transform: translateX(var(--viagem)); } }
@keyframes troca { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .wm .l, .traco, .sub, .cartao, .troca {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .fundo-rede path, .fundo-rede .halo-brilho { animation: none !important; stroke-dashoffset: 0; }
  .fundo-rede .halo-brilho { opacity: 1; }
  .fundo-rede .lm-ponta { display: none; }
}
