/* ==========================================================================
   SIGMA VISION — Tela de login
   Esquerda: marca (azul Sigma, grade tech, rede monitorada, emblema com radar).
   Direita: cartão de acesso. Animações só em CSS (CSP), desligadas com
   prefers-reduced-motion.
   ========================================================================== */
body.login-page {
  --lg-navy: #020b18;
  --lg-navy-2: #04172f;
  --lg-line: rgba(91, 156, 240, .14);
  overflow: auto; min-height: 100vh; background: var(--lg-navy);
}
.lg { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(400px, 1fr); min-height: 100vh; }

/* ------------------------------------------------------------------ marca */
.lg-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; padding: 34px 44px 28px;
  background:
    radial-gradient(900px 600px at 50% 46%, rgba(0, 70, 138, .55), transparent 65%),
    radial-gradient(500px 300px at 100% 100%, rgba(181, 18, 27, .16), transparent 70%),
    linear-gradient(160deg, var(--lg-navy-2), var(--lg-navy) 70%);
  border-right: 1px solid rgba(91, 156, 240, .18);
}
/* grade em perspectiva, deslizando */
.lg-grid {
  position: absolute; inset: 40% -50% -30%; z-index: -2;
  background-image: linear-gradient(var(--lg-line) 1px, transparent 1px), linear-gradient(90deg, var(--lg-line) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(520px) rotateX(62deg); transform-origin: 50% 0;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  animation: lg-grid 9s linear infinite;
}
@keyframes lg-grid { to { background-position: 0 56px, 0 0; } }
.lg-glow { position: absolute; left: 50%; top: 44%; width: 640px; height: 640px; z-index: -1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(91, 156, 240, .18), transparent 60%); animation: lg-breathe 6s ease-in-out infinite; }
@keyframes lg-breathe { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.08); } }

/* rede de dispositivos */
.lg-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.lg-net__links path { fill: none; stroke: rgba(91, 156, 240, .22); stroke-width: 1; }
.lg-net__pulses path { fill: none; stroke: #8fc1ff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 14 900; stroke-dashoffset: 914;
  filter: drop-shadow(0 0 4px rgba(143, 193, 255, .9)); animation: lg-pulse 4.2s linear infinite; }
.lg-net__pulses path:nth-child(2) { animation-delay: 1.1s; }
.lg-net__pulses path:nth-child(3) { animation-delay: 2.2s; }
.lg-net__pulses path:nth-child(4) { animation-delay: 3.1s; }
@keyframes lg-pulse { to { stroke-dashoffset: 0; } }
.lg-net__nodes circle { fill: #0b2747; stroke: #5b9cf0; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: lg-node 3.4s ease-in-out infinite; }
.lg-net__nodes circle:nth-child(odd) { animation-delay: 1.3s; }
.lg-net__nodes circle:nth-child(3n) { animation-delay: 2.1s; }
@keyframes lg-node { 50% { fill: #5b9cf0; transform: scale(1.35); } }

.lg-hero__top { display: flex; align-items: center; }
.lg-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-cond); font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #bcd6fb;
  background: rgba(0, 70, 138, .35); border: 1px solid rgba(91, 156, 240, .35); backdrop-filter: blur(6px); }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(36, 212, 139, .6); animation: lg-live 2s infinite; }
@keyframes lg-live { 70% { box-shadow: 0 0 0 8px rgba(36, 212, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(36, 212, 139, 0); } }

.lg-hero__center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }

/* emblema: placa branca com o símbolo Sigma + anéis em órbita + varredura de radar */
.lg-emblem { position: relative; width: clamp(170px, 18vw, 230px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 6px; }
.lg-emblem__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lg-emblem__rings circle { fill: none; transform-origin: 100px 100px; }
.lg-emblem__rings .r1 { stroke: rgba(91, 156, 240, .55); stroke-width: 1.2; stroke-dasharray: 3 7; animation: lg-spin 40s linear infinite; }
.lg-emblem__rings .r2 { stroke: #5b9cf0; stroke-width: 2; stroke-dasharray: 90 430; stroke-linecap: round; animation: lg-spin 7s linear infinite; }
.lg-emblem__rings .r3 { stroke: rgba(181, 18, 27, .75); stroke-width: 2; stroke-dasharray: 40 387; stroke-linecap: round; animation: lg-spin 5s linear infinite reverse; }
.lg-emblem__sweep { transform-origin: 100px 100px; animation: lg-spin 4s linear infinite; }
.lg-emblem__sweep path { fill: rgba(91, 156, 240, .12); }
@keyframes lg-spin { to { transform: rotate(360deg); } }
.lg-emblem__pulse { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(91, 156, 240, .7); animation: lg-ring 2.8s ease-out infinite; }
@keyframes lg-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.lg-emblem__plate {
  position: relative; width: 42%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 26%;
  background: #fff; box-shadow: 0 0 0 6px rgba(91, 156, 240, .12), 0 18px 50px -10px rgba(0, 70, 138, .95), 0 0 60px rgba(91, 156, 240, .35);
  animation: lg-float 6s ease-in-out infinite;
}
.lg-emblem__plate img { width: 60%; height: 80%; object-fit: contain; }
@keyframes lg-float { 50% { transform: translateY(-6px); } }

.lg-word { margin: 0; font-family: var(--font-cond); font-weight: 700; letter-spacing: .2em; color: #fff;
  font-size: clamp(34px, 4.2vw, 62px); line-height: 1; text-shadow: 0 6px 30px rgba(0, 70, 138, .8); }
.lg-word b { color: var(--sigma-blue-light); background: linear-gradient(90deg, #5b9cf0, #a9cdfb, #5b9cf0); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: lg-shine 6s linear infinite; }
@keyframes lg-shine { to { background-position: -200% 0; } }
.lg-word.sm { font-size: 22px; letter-spacing: .16em; text-shadow: none; }
.lg-tagline { margin: 0; max-width: 46ch; color: #a9bfd9; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.5; }
.lg-pillars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 10px; }
.lg-pillars li {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px;
  background: rgba(4, 23, 47, .7); border: 1px solid rgba(91, 156, 240, .22); color: #d6e5f7; font-size: 13px; white-space: nowrap;
  backdrop-filter: blur(6px); opacity: 0; animation: lg-in .6s ease-out forwards;
}
.lg-pillars li:nth-child(1) { animation-delay: .25s; } .lg-pillars li:nth-child(2) { animation-delay: .4s; }
.lg-pillars li:nth-child(3) { animation-delay: .55s; } .lg-pillars li:nth-child(4) { animation-delay: .7s; }
.lg-pillars .ico { color: var(--sigma-blue-light); }
@keyframes lg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lg-hero__foot { display: flex; align-items: center; gap: 18px; color: #7f97b5; font-size: 12.5px; }
.lg-hero__foot .lg-by { margin-left: auto; }
.lg-hero__foot .lg-by b { color: #fff; }
.lg-sec { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12); }
.lg-sec.on { color: #7ee2b4; border-color: rgba(36, 212, 139, .35); background: rgba(36, 212, 139, .08); }
.lg-sec.off { color: #ffb547; border-color: rgba(255, 181, 71, .35); background: rgba(255, 181, 71, .08); }
.lg-clock { font-size: 13px; color: #a9bfd9; }

/* ------------------------------------------------------------------ acesso */
.lg-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 28px 22px;
  background: radial-gradient(600px 400px at 50% 0%, rgba(0, 70, 138, .25), transparent 70%), #050c16;
}
.lg-mobile-brand { display: none; }
.lg-card {
  width: 100%; max-width: 400px; padding: 30px 30px 24px; border-radius: 16px; position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), #0a1422;
  border: 1px solid rgba(91, 156, 240, .18);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: lg-card .7s cubic-bezier(.2, .7, .2, 1);
}
.lg-card::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--sigma-blue-light), #b5121b, transparent); }
@keyframes lg-card { from { opacity: 0; transform: translateY(14px); } }
.lg-card h2 { margin: 4px 0 6px; font-family: var(--font-cond); font-weight: 700; font-size: 28px; letter-spacing: .03em; }
.lg-kicker { font-family: var(--font-cond); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sigma-blue-light); }
.lg-sub { margin: 0 0 18px; color: var(--text-2); font-size: 13.5px; }
.lg-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 12px;
  background: rgba(0, 70, 138, .35); color: var(--sigma-blue-light); border: 1px solid rgba(91, 156, 240, .3); }
.lg-card form { display: flex; flex-direction: column; gap: 14px; }
.lg-card .st-msg { margin: 0; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field > .input, .lg-input .input { height: 44px; font-size: 14.5px; background: #060e19; border-color: rgba(91, 156, 240, .2); }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > .ico { position: absolute; left: 13px; color: var(--text-2); pointer-events: none; transition: color .2s; }
.lg-input .input { width: 100%; padding-left: 40px; }
.lg-input .icon-btn { position: absolute; right: 6px; width: 32px; height: 32px; }
.lg-input:focus-within > .ico { color: var(--sigma-blue-light); }
.lg-card .input:focus { border-color: var(--sigma-blue-light); box-shadow: 0 0 0 3px rgba(91, 156, 240, .18); }
.lg-btn {
  position: relative; overflow: hidden; height: 46px; margin-top: 4px; border: 0; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-cond); font-weight: 700; font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #0a5bb0, #00468A 55%, #02305f);
  box-shadow: 0 10px 30px -10px rgba(0, 70, 138, .9), inset 0 1px 0 rgba(255, 255, 255, .15);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.lg-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); animation: lg-sweep 3.8s ease-in-out infinite; }
@keyframes lg-sweep { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.lg-btn:hover { filter: brightness(1.12); box-shadow: 0 14px 34px -10px rgba(0, 70, 138, 1), inset 0 1px 0 rgba(255, 255, 255, .2); }
.lg-btn:active { transform: translateY(1px); }
.lg-btn .ico { transition: transform .2s; }
.lg-btn:hover .ico { transform: translateX(3px); }
.lg-btn[disabled] { opacity: .6; cursor: wait; }
.lg-ghost { height: 40px; justify-content: center; }
.lg-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; padding: 10px 12px; border-radius: 8px;
  background: rgba(0, 70, 138, .16); border: 1px solid rgba(91, 156, 240, .16); color: #9fb6d1; font-size: 12px; line-height: 1.45; }
.lg-note .ico { color: var(--ok); flex: none; margin-top: 1px; }
.lg-help { margin: 14px 0 0; text-align: center; color: var(--text-2); font-size: 12px; }
.lg-foot { color: var(--text-3); font-size: 11.5px; }

/* ------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .lg-pillars { grid-template-columns: repeat(2, minmax(0, auto)); }
}
@media (max-width: 900px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .lg-hero { display: none; }
  .lg-mobile-brand { display: flex; align-items: center; gap: 12px; }
  .lg-side { justify-content: flex-start; padding-top: 48px;
    background: radial-gradient(500px 360px at 50% 0%, rgba(0, 70, 138, .55), transparent 70%), var(--lg-navy); }
}
@media (max-width: 480px) {
  .lg-card { padding: 24px 18px 20px; }
  .lg-side { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg *, .lg *::before, .lg *::after { animation: none !important; }
  .lg-pillars li { opacity: 1; }
}

/* verificação em duas etapas */
.lg-card--wide { max-width: 560px; }
.lg-card #mfaCode { font-size: 24px; letter-spacing: .32em; text-align: center; height: 52px; max-width: none; }
.lg-card #mfaCode.recovery { letter-spacing: .12em; font-size: 20px; }
.lg-card #mfaSetupHost { margin-bottom: 10px; }
.lg-card #mfaSetupHost .ac-form { gap: 10px; }
