/* Tela de login da SophIA: mesma linguagem do painel (HUD escuro, vermelho da Universal, vidro). Tokens de DESIGN.md. */
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("fontes/rajdhani-600.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("fontes/rajdhani-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fontes/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fontes/inter-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fontes/jetbrains-500.woff2") format("woff2"); }

:root {
  --fundo: #0a0506;
  --fundo-2: #140a0b;
  --brilho: #ec3a40;
  --brilho-rgb: 236, 58, 64;
  --marca: #e3262f;
  --marca-clara: #ef3b42;
  --marca-escura: #c81f27;
  --champanhe: #f4d3c0;
  --vidro: rgba(26, 11, 13, 0.62);
  --linha: rgba(236, 58, 64, 0.16);
  --linha-forte: rgba(236, 58, 64, 0.42);
  --texto: #f7ece7;
  --texto-2: #bc9f98;
  --texto-3: #9a7f79;
  --ok: #4fe3a6;
  --critico-texto: #ff8fa3;
  --rotulo: "Rajdhani", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--fundo);
  color: var(--texto);
  font: 400 14.5px/1.6 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- fundo ---------- */
.fundo { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.grade {
  position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(var(--brilho-rgb), 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brilho-rgb), 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(900px) rotateX(58deg) translateY(12%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 62%);
}
.brilho {
  position: absolute; left: 50%; top: 42%; width: 900px; height: 900px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(180, 30, 40, 0.34), rgba(180, 30, 40, 0.08) 40%, transparent 68%);
  filter: blur(20px);
}
.anel {
  position: absolute; left: 50%; top: 46%; border-radius: 50%; transform: translate(-50%, -50%);
  border: 1px solid var(--linha);
}
.anel-1 { width: 620px; height: 620px; border-style: dashed; animation: girar 90s linear infinite; }
.anel-2 { width: 820px; height: 820px; border-color: rgba(var(--brilho-rgb), 0.08); animation: girar 140s linear infinite reverse; }
.varredura {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, rgba(var(--brilho-rgb), 0.05) 50%, transparent);
  height: 30%; animation: varrer 9s ease-in-out infinite;
}
@keyframes girar { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes varrer { 0% { transform: translateY(-40%); } 100% { transform: translateY(380%); } }

/* ---------- cartão ---------- */
.palco {
  position: relative; z-index: 1; min-height: 100%;
  display: grid; place-items: center; align-content: center; gap: 28px;
  padding: 24px 16px;
}
.cartao {
  position: relative; width: min(420px, 100%);
  padding: 40px 36px 28px;
  background: linear-gradient(180deg, rgba(30, 12, 14, 0.72), var(--vidro));
  border: 1px solid var(--linha);
  border-radius: 12px;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 60px -10px rgba(var(--brilho-rgb), 0.25);
  text-align: center;
  animation: surgir 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cartao::before {   /* fio de luz no topo, como a barra do painel */
  content: ""; position: absolute; left: 50%; top: -1px; width: 220px; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--brilho), transparent);
  box-shadow: 0 0 12px var(--brilho);
}
.canto { position: absolute; width: 14px; height: 14px; border-color: var(--linha-forte); border-style: solid; border-width: 0; }
.canto-se { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.canto-sd { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.canto-ie { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.canto-id { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
@keyframes surgir { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- marca ---------- */
.simbolo {
  width: 64px; height: 64px; display: block; margin: 0 auto 18px;
  filter: drop-shadow(0 0 18px rgba(var(--brilho-rgb), 0.55));
  animation: pulsar 4s ease-in-out infinite;
}
@keyframes pulsar { 50% { filter: drop-shadow(0 0 28px rgba(var(--brilho-rgb), 0.85)); } }
h1 {
  font: 700 34px/1 var(--rotulo);
  letter-spacing: 0.3em; margin-right: -0.3em;   /* compensa o espaçamento da última letra */
  color: var(--texto);
  text-shadow: 0 0 18px rgba(var(--brilho-rgb), 0.45);
}
h1 em { font-style: normal; color: var(--brilho); }
.sub {
  margin-top: 10px;
  font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.16em; color: var(--texto-3);
}
.divisor {
  height: 1px; margin: 26px 0 22px;
  background: linear-gradient(90deg, transparent, var(--linha-forte), transparent);
}
.convite { color: var(--texto-2); font-size: 14px; }

/* ---------- aviso de erro ---------- */
.aviso {
  margin-top: 18px; padding: 10px 14px;
  border: 1px solid rgba(255, 92, 122, 0.35); border-radius: 8px;
  background: rgba(255, 92, 122, 0.08);
  color: var(--critico-texto); font-size: 13px; text-align: left;
}

/* ---------- botão ---------- */
.botao {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 48px; padding: 12px 20px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, var(--marca-clara), var(--marca-escura));
  color: #fff; text-decoration: none;
  font: 700 15px/1 var(--rotulo); letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 10px 30px -8px rgba(var(--brilho-rgb), 0.6), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.botao:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 36px -8px rgba(var(--brilho-rgb), 0.75), 0 1px 0 rgba(255, 255, 255, 0.3) inset; }
.botao:active { transform: translateY(0) scale(0.99); }
.botao:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.botao .ms { width: 18px; height: 18px; flex: none; padding: 2px; background: #fff; border-radius: 3px; box-sizing: content-box; }
.botao.carregando { pointer-events: none; filter: saturate(0.7) brightness(0.9); }
.botao.carregando .ms { animation: girar-ms 1s linear infinite; }
@keyframes girar-ms { to { transform: rotate(360deg); } }

/* ---------- rodapé ---------- */
.rodape {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 11px/1 var(--rotulo); letter-spacing: 0.32em; color: var(--texto-3);
}
.ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: piscar 2.4s ease-in-out infinite; }
@keyframes piscar { 50% { opacity: 0.35; } }
.universal { opacity: 0.5; height: 22px; width: auto; filter: brightness(0) invert(1); }   /* logo vira silhueta clara sobre o fundo escuro */

@media (max-width: 480px) {
  .cartao { padding: 32px 22px 24px; }
  h1 { font-size: 28px; }
  .anel-1 { width: 420px; height: 420px; }
  .anel-2 { width: 560px; height: 560px; }
}

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