:root {
  --roxo: #6b2f8b;
  --roxo-escuro: #4a1d64;
  --tinta: #1b1524;
  --suave: #5e5668;
  --papel: #f4f1f6;
  --branco: #fffcfe;
  --linha: rgba(75, 29, 100, 0.12);
  --ok: #1c6b45;
  --ok-fundo: #e7f5ee;
  --alerta: #8a5a12;
  --alerta-fundo: #f8efdc;
  --erro: #8d2c3a;
  --sombra: 0 24px 60px rgba(43, 18, 58, 0.08);
  --raio: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--tinta);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(107, 47, 139, 0.08), transparent 60%),
    var(--papel);
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--roxo-escuro); }

.topo {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
  background: rgba(255, 252, 254, 0.92);
  border-bottom: 1px solid var(--linha);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
}
.logo-topo { height: 36px; width: auto; }
.topo nav { display: flex; gap: 18px; }
.topo nav a {
  color: var(--tinta);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 2px solid var(--roxo);
  padding-bottom: 2px;
}
.topo form { margin-left: auto; }
button, .botao {
  background: var(--roxo);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font: 600 0.95rem/1 "Segoe UI", sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .botao:hover { background: var(--roxo-escuro); }
button.link { background: transparent; color: var(--suave); padding: 0; }
button.perigo { background: transparent; color: var(--erro); padding-left: 0; }

main { max-width: 1080px; margin: 0 auto; padding: 36px 24px 72px; }
h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
h2 { font-size: 1.15rem; margin: 0; }
.olho {
  margin: 0 0 8px;
  color: var(--roxo);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.miudo { color: var(--suave); font-size: 0.95rem; }

.cartao {
  background: var(--branco);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 24px;
  margin: 22px 0;
}
.cabeca { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }

label { display: flex; flex-direction: column; gap: 7px; font-size: 0.84rem; font-weight: 650; color: var(--suave); }
input, select {
  font: 16px/1.3 "Segoe UI", sans-serif;
  color: var(--tinta);
  padding: 12px 12px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
}
input:focus, select:focus {
  outline: 3px solid rgba(107, 47, 139, 0.18);
  border-color: var(--roxo);
}
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 8px 0 16px; }
dt { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--suave); }
dd { margin: 2px 0 0; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--suave);
  padding: 10px 8px;
  border-bottom: 1px solid var(--linha);
}
td { padding: 14px 8px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
tr:hover td { background: rgba(107, 47, 139, 0.03); }
.selo { font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.aviso { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.aviso-ok { background: var(--ok-fundo); color: var(--ok); }
.aviso-erro { background: #fdecee; color: var(--erro); }
.voltar { margin: 0 0 8px; }
.inline { margin-top: 10px; }
.rodape-marca {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  color: var(--suave);
  font-size: 0.82rem;
}

.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 72px 64px;
  background: linear-gradient(165deg, #3d1656 0%, #552070 46%, #6b2f8b 100%);
  color: white;
}
.login-neural,
.login-neural-depth,
.login-neural-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-neural,
.login-neural-depth {
  background-image: url("/static/brand/neural-network.svg?v=7");
  background-repeat: no-repeat;
}
.login-neural {
  inset: -8%;
  opacity: 0.4;
  background-size: cover;
  background-position: center center;
  animation: neuralBreathe 12s ease-in-out infinite alternate;
}
.login-neural-depth {
  inset: -12%;
  opacity: 0.22;
  background-size: 145% 145%;
  background-position: 30% 70%;
  filter: blur(0.4px);
  animation: neuralDrift 18s ease-in-out infinite alternate;
}
.login-neural-vignette {
  background:
    radial-gradient(ellipse 55% 70% at 28% 52%, transparent 0%, rgba(49, 16, 70, 0.28) 72%),
    linear-gradient(180deg, rgba(49, 16, 70, 0.28) 0%, transparent 18%, transparent 78%, rgba(49, 16, 70, 0.34) 100%);
}
@keyframes neuralBreathe {
  from { opacity: 0.26; transform: scale(1); }
  to { opacity: 0.4; transform: scale(1.03); }
}
@keyframes neuralDrift {
  from { opacity: 0.1; transform: scale(1.04) translate(0, 0); }
  to { opacity: 0.2; transform: scale(1.1) translate(1.2%, 0.8%); }
}
.login-copy { position: relative; z-index: 1; max-width: 540px; }
.login-hero .olho { color: #f3ddff; margin-bottom: 18px; }
.login-hero h1 {
  font-size: clamp(2.6rem, 4.2vw, 3.55rem);
  font-weight: 450;
  line-height: 1.08;
  letter-spacing: -0.04em;
  max-width: 16ch;
  color: rgba(255, 255, 255, 0.78);
}
.login-hero h1 .destaque { color: #fff; font-weight: 720; }
.login-hero p { max-width: 44ch; color: rgba(255, 255, 255, 0.78); font-size: 1.08rem; }
.login-hero p .palavra { white-space: nowrap; }
.login-hero p .destaque { color: #fff; font-weight: 680; }
.palavra {
  display: inline-block;
  opacity: 0;
  animation: palavraSobe 6s cubic-bezier(0.16, 0.84, 0.32, 1) infinite;
  animation-delay: calc(var(--i) * 70ms);
}
.destaque { animation-name: palavraSobe, brilhoTexto; animation-duration: 6s, 6s; animation-delay: calc(var(--i) * 70ms), calc(var(--i) * 70ms); animation-fill-mode: none, none; animation-iteration-count: infinite, infinite; animation-timing-function: cubic-bezier(0.16, 0.84, 0.32, 1), ease-in-out; }
@keyframes palavraSobe {
  0% { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  14% { opacity: 1; transform: none; filter: none; }
  86% { opacity: 1; transform: none; filter: none; }
  100% { opacity: 0; transform: translateY(10px); filter: blur(4px); }
}
@keyframes brilhoTexto {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  50% { text-shadow: 0 0 22px rgba(255, 255, 255, 0.55); }
}
.rodape-marca img { height: 32px; width: auto; }
.rodape-marca img[alt="Taiqo"] { height: 64px; }
.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 36px 96px;
}
.logo-entrada { height: 86px; width: auto; margin: 8px auto 36px; }
.login-card { width: min(420px, 100%); }
.login-card h2 { font-size: 1.7rem; margin: 0 0 6px; }
.login-card form { display: grid; gap: 14px; margin-top: 24px; }
.marca-taiqo {
  position: absolute;
  right: 28px;
  bottom: 22px;
  height: 52px;
  width: auto;
}

@media (prefers-reduced-motion: reduce) {
  .login-neural, .login-neural-depth, .palavra, .destaque { animation: none; opacity: 1; }
}

@media (max-width: 1100px) {
  .login-hero { padding: 48px 36px; }
  .login-hero h1 { font-size: 2.6rem; }
  .logo-entrada { height: 74px; }
}

@media (max-width: 860px) {
  .login-body { grid-template-columns: 1fr; }
  .login-hero { min-height: 420px; padding: 48px 24px; }
  .login-neural { background-size: cover; }
  .login-neural-depth { background-size: 160% 160%; }
  .login-hero h1 { font-size: 2.35rem; max-width: 14ch; }
  .login-panel { padding: 32px 20px 24px; justify-content: flex-start; }
  .logo-entrada { height: 68px; margin: 8px auto 28px; }
  .login-card { width: min(440px, 100%); }
  .marca-taiqo { position: static; height: 46px; margin: 32px 0 0 auto; }
  .grade, .resumo { grid-template-columns: 1fr; }
  .topo { flex-wrap: wrap; padding: 14px 16px; }
  main { padding: 24px 16px 48px; }
}
