/* ==========================================================================
   modules/login.css - Modulo: Ingreso (login cinematico TITAN CORE)
   Login y sesion, login corporativo, cinematico v1 + v2 (fondo vivo).
   Fase 1: movido TAL CUAL (orden preservado => cascada identica).
   OJO Fase 3: incluye 1 regla no-login (.main-nav .nav-hidden, utilidad de
   permisos de nav) a reclasificar a utilities/layout. Falta la "capa final
   liquid glass" que sigue mas abajo en tqc.css (login disperso historicamente).
   ========================================================================== */
/* Login y sesión */
.container-login {
  max-width: 760px;
}
.login-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.login-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  padding: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.login-brand img {
  width: 92px;
  height: auto;
  object-fit: contain;
}
.login-brand h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #111827;
}
.login-brand p {
  margin: 6px 0 0;
  color: #64748b;
}
.login-form {
  grid-template-columns: 1fr;
}
.full-width {
  width: 100%;
  justify-content: center;
}
.login-footnote {
  color: #64748b;
  font-size: 0.88rem;
  margin: 18px 0 0;
  line-height: 1.45;
}
.logout-link {
  border-color: rgba(255, 255, 255, 0.35) !important;
}
.logout-link:hover {
  color: #FFC000 !important;
}

/* ===== Login corporativo ===== */
/* (.main-nav .nav-hidden se movio a utilities.css en Fase 3) */
.container-login {
  max-width: none;
  width: 100%;
  min-height: calc(100vh - 84px);
  margin: 0;
  padding: 0 18px 48px;
  background:
    radial-gradient(circle at top left, rgba(255, 192, 0, .18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(31, 93, 187, .28), transparent 34%),
    linear-gradient(135deg, #061733 0%, #0B2D5C 52%, #071B3A 100%);
}

.container-login .messages {
  width: min(100%, 760px);
  margin: 0 auto 16px;
  padding-top: 18px;
}

.login-shell {
  min-height: calc(100vh - 120px);
  padding: 46px 0;
}

.login-card {
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .30);
}

.login-brand {
  align-items: center;
}

.login-logo-box {
  width: 138px;
  min-width: 138px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  background: linear-gradient(135deg, #071B3A 0%, #0B2D5C 100%);
  border: 1px solid rgba(255, 192, 0, .35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 26px rgba(7, 27, 58, .20);
}

.login-logo-box img {
  width: 100%;
  max-height: 52px;
  object-fit: contain;
  display: block;
}

.login-brand > img {
  display: none;
}

.login-card .btn.primary,
.login-card button.primary,
.login-card button[type="submit"] {
  background: linear-gradient(135deg, #123f8c 0%, #0B2D5C 100%);
  box-shadow: 0 10px 22px rgba(18, 63, 140, .24);
}

.login-footnote {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

@media (max-width: 620px) {
  .login-brand {
    flex-direction: column;
    text-align: center;
  }
  .login-logo-box {
    width: 158px;
    min-width: 158px;
  }
}

/* ===== Login cinematico TITAN CORE ===== */
.container-login {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 192, 0, .20), transparent 26%),
    radial-gradient(circle at 88% 20%, rgba(35, 181, 211, .18), transparent 24%),
    radial-gradient(circle at 66% 86%, rgba(31, 93, 187, .34), transparent 30%),
    linear-gradient(138deg, #030713 0%, #071b3a 38%, #0b2d5c 66%, #050b18 100%);
}

.container-login::before,
.container-login::after {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -2;
  pointer-events: none;
}

.container-login::before {
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.13) 44%, transparent 52%),
    radial-gradient(ellipse at 38% 46%, rgba(255, 192, 0, .16), transparent 28%),
    radial-gradient(ellipse at 58% 48%, rgba(255,255,255,.10), transparent 24%);
  filter: blur(8px);
  opacity: .76;
  animation: loginMetalDrift 15s ease-in-out infinite alternate;
}

.container-login::after {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.45) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,192,0,.38) 0 1px, transparent 1.8px);
  background-size: 72px 72px, 118px 118px;
  background-position: 0 0, 28px 42px;
  opacity: .42;
  animation: loginParticleField 34s linear infinite;
}

.login-shell {
  position: relative;
  min-height: calc(100vh - 120px);
  overflow: hidden;
}

.login-orbit,
.login-liquid,
.login-particles {
  position: absolute;
  pointer-events: none;
}

.login-orbit {
  width: clamp(260px, 34vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 34px rgba(255, 255, 255, .08),
    0 0 52px rgba(35, 181, 211, .12);
  opacity: .56;
}

.login-orbit::before,
.login-orbit::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffc000;
  box-shadow: 0 0 22px rgba(255, 192, 0, .86);
}

.login-orbit::before { top: 16%; left: 18%; }
.login-orbit::after { right: 21%; bottom: 15%; background: #23b5d3; box-shadow: 0 0 22px rgba(35, 181, 211, .86); }

.login-orbit-one {
  left: -140px;
  top: 8%;
  animation: loginSpin 24s linear infinite;
}

.login-orbit-two {
  right: -170px;
  bottom: -120px;
  transform: scale(.82);
  animation: loginSpin 32s linear infinite reverse;
}

.login-liquid {
  width: clamp(220px, 30vw, 430px);
  aspect-ratio: 1.45;
  border-radius: 44% 56% 58% 42% / 42% 38% 62% 58%;
  background:
    linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.02) 48%),
    radial-gradient(circle at 34% 30%, rgba(255, 192, 0, .28), transparent 26%),
    radial-gradient(circle at 66% 64%, rgba(35, 181, 211, .24), transparent 34%),
    rgba(255,255,255,.06);
  filter: blur(.2px);
  box-shadow:
    inset 0 0 38px rgba(255,255,255,.16),
    inset 18px -24px 54px rgba(7, 27, 58, .42),
    0 26px 80px rgba(0,0,0,.20);
  opacity: .62;
  mix-blend-mode: screen;
}

.login-liquid-one {
  top: 12%;
  right: 10%;
  animation: loginLiquidFloat 12s ease-in-out infinite alternate;
}

.login-liquid-two {
  left: 8%;
  bottom: 8%;
  transform: scale(.78) rotate(-18deg);
  animation: loginLiquidFloat 16s ease-in-out infinite alternate-reverse;
}

.login-particles {
  inset: 0;
  z-index: 0;
}

.login-particles span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 0 18px rgba(255,255,255,.70);
  animation: loginSpark 5s ease-in-out infinite;
}

.login-particles span:nth-child(1) { left: 17%; top: 24%; animation-delay: -.4s; }
.login-particles span:nth-child(2) { left: 28%; top: 76%; width: 4px; height: 4px; animation-delay: -1.7s; background: rgba(255,192,0,.92); }
.login-particles span:nth-child(3) { left: 64%; top: 17%; animation-delay: -2.6s; }
.login-particles span:nth-child(4) { left: 78%; top: 70%; width: 6px; height: 6px; animation-delay: -3.1s; background: rgba(35,181,211,.90); }
.login-particles span:nth-child(5) { left: 43%; top: 34%; width: 3px; height: 3px; animation-delay: -4.2s; }
.login-particles span:nth-child(6) { left: 52%; top: 84%; animation-delay: -2s; background: rgba(255,192,0,.86); }

.login-card {
  position: relative;
  z-index: 1;
  max-width: 540px;
  padding: clamp(24px, 4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.34);
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(245,249,255,.94)),
    rgba(255,255,255,.94);
  box-shadow:
    0 30px 90px rgba(0,0,0,.38),
    0 0 0 1px rgba(255,255,255,.18),
    inset 0 1px 0 rgba(255,255,255,.78);
  backdrop-filter: blur(16px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,192,0,.80), rgba(35,181,211,.34), rgba(255,255,255,.10));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.login-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 44%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform: rotate(18deg);
  animation: loginCardSheen 7s ease-in-out infinite;
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  gap: 20px;
  margin-bottom: 26px;
}

.login-logo-box {
  position: relative;
  overflow: hidden;
  width: 152px;
  min-width: 152px;
  height: 82px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 24% 24%, rgba(255,255,255,.20), transparent 28%),
    linear-gradient(135deg, #071b3a 0%, #123f8c 52%, #061733 100%);
  border-color: rgba(255, 192, 0, .62);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.login-logo-box::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -54%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.70), transparent);
  transform: rotate(18deg);
  transition: left .42s ease;
}

.login-logo-box:hover,
.login-logo-box:focus-visible {
  transform: translateY(-3px) scale(1.03);
  border-color: #ffc000;
  outline: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 16px 32px rgba(7, 27, 58, .28),
    0 0 34px rgba(255,192,0,.34);
}

.login-logo-box:hover::after,
.login-logo-box:focus-visible::after {
  left: 112%;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #0b2d5c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f7b45;
  box-shadow: 0 0 0 4px rgba(15,123,69,.12), 0 0 18px rgba(15,123,69,.40);
}

.login-brand h1 {
  color: #071b3a;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 330px;
  color: #526178;
  font-size: .96rem;
}

.login-form {
  position: relative;
  z-index: 1;
  gap: 16px;
}

.login-form label {
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-form input {
  min-height: 48px;
  margin-top: 7px;
  border-color: #c9d5e7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.login-form input:focus {
  border-color: #123f8c;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(18,63,140,.12), inset 0 1px 0 rgba(255,255,255,.70);
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 126px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 104px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(18,63,140,.16);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
  color: #123f8c;
  box-shadow: 0 6px 14px rgba(18,63,140,.10);
  font-size: 12px;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, #123f8c 0%, #0b2d5c 100%);
  color: #ffffff;
  outline: 0;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(18,63,140,.22);
}

.password-toggle-icon {
  position: relative;
  width: 17px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50% / 62%;
}

.password-toggle-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.password-toggle[aria-pressed="true"] .password-toggle-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 2px;
  height: 19px;
  border-radius: var(--radius-pill);
  background: currentColor;
  transform: rotate(42deg);
}

.login-card .btn.primary,
.login-card button.primary,
.login-card button[type="submit"] {
  min-height: 50px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,.22);
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), transparent 32%),
    linear-gradient(135deg, #123f8c 0%, #071b3a 68%, #051226 100%);
  box-shadow: 0 15px 28px rgba(7, 27, 58, .28), 0 0 24px rgba(255,192,0,.12);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.login-card .btn.primary:hover,
.login-card button.primary:hover,
.login-card button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 18px 34px rgba(7, 27, 58, .34), 0 0 30px rgba(255,192,0,.22);
}

.login-footnote {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-top-color: rgba(18,63,140,.12);
  color: #5d6b80;
}

.login-footnote::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #eef5ff;
  color: #123f8c;
  font-size: 12px;
  font-weight: 900;
}

@keyframes loginMetalDrift {
  from { transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(3%, 2%, 0) rotate(3deg) scale(1.05); }
}

@keyframes loginParticleField {
  from { background-position: 0 0, 28px 42px; }
  to { background-position: 240px -180px, -180px 260px; }
}

@keyframes loginSpin {
  to { transform: rotate(360deg); }
}

@keyframes loginLiquidFloat {
  from { border-radius: 44% 56% 58% 42% / 42% 38% 62% 58%; transform: translate3d(0, 0, 0) rotate(-3deg); }
  to { border-radius: 60% 40% 38% 62% / 52% 60% 40% 48%; transform: translate3d(18px, -14px, 0) rotate(5deg); }
}

@keyframes loginSpark {
  0%, 100% { opacity: .28; transform: translateY(0) scale(.86); }
  50% { opacity: 1; transform: translateY(-12px) scale(1.18); }
}

@keyframes loginCardSheen {
  0%, 54% { transform: translateX(-80%) rotate(18deg); opacity: 0; }
  62% { opacity: .75; }
  78%, 100% { transform: translateX(360%) rotate(18deg); opacity: 0; }
}

@media (max-width: 620px) {
  .container-login {
    padding-left: 14px;
    padding-right: 14px;
  }

  .login-shell {
    min-height: calc(100vh - 112px);
    padding: 30px 0;
  }

  .login-card {
    border-radius: var(--radius-lg);
  }

  .login-brand {
    gap: 14px;
  }

  .login-brand p {
    max-width: none;
  }

  .password-control input {
    padding-right: 112px;
  }

  .password-toggle {
    min-width: 92px;
    padding: 0 8px;
  }

  .password-toggle-text {
    font-size: 11px;
  }

  .login-orbit-one {
    left: -210px;
  }

  .login-orbit-two {
    right: -230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .container-login::before,
  .container-login::after,
  .login-orbit-one,
  .login-orbit-two,
  .login-liquid-one,
  .login-liquid-two,
  .login-particles span,
  .login-card::after {
    animation: none !important;
  }

  .login-logo-box,
  .password-toggle,
  .login-card .btn.primary,
  .login-card button.primary,
  .login-card button[type="submit"] {
    transition: none !important;
  }
}

/* ===== Login cinematico TITAN CORE v2: fondo vivo y acceso activo ===== */
.container-login {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 192, 0, .18), transparent 0 9%, transparent 26%),
    radial-gradient(circle at 50% 42%, rgba(35, 181, 211, .18), transparent 0 16%, transparent 38%),
    linear-gradient(145deg, #02050d 0%, #061733 36%, #0b2d5c 64%, #02050d 100%);
}

.container-login::before {
  background:
    conic-gradient(from 0deg at 50% 45%, transparent 0deg, rgba(255, 192, 0, .26) 42deg, transparent 84deg, rgba(35, 181, 211, .20) 138deg, transparent 206deg, rgba(255,255,255,.14) 266deg, transparent 330deg),
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle at 50% 44%, transparent 0 16%, rgba(255,192,0,.12) 17%, transparent 18% 100%);
  filter: blur(18px) saturate(1.2);
  opacity: .82;
  animation: titanCoreVortex 18s linear infinite;
}

.container-login::after {
  background-image:
    radial-gradient(circle at 11% 23%, rgba(255,255,255,.52) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 77%, rgba(255,192,0,.48) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 34%, rgba(35,181,211,.44) 0 1px, transparent 2px),
    radial-gradient(circle at 89% 68%, rgba(255,255,255,.40) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 51%, rgba(255,192,0,.34) 0 1px, transparent 2px);
  background-size: 149px 113px, 211px 167px, 173px 229px, 263px 191px, 307px 257px;
  opacity: .54;
  animation: titanOrganicDust 26s ease-in-out infinite alternate;
}

.login-shell {
  isolation: isolate;
}

.login-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 900px;
}

.login-spark-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  opacity: .92;
  mix-blend-mode: screen;
}

.login-stage::before {
  content: "";
  position: absolute;
  inset: 9% 18%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 1px rgba(255,192,0,.10),
    inset 0 0 70px rgba(35,181,211,.10),
    0 0 110px rgba(255,192,0,.14);
  transform: rotateX(66deg);
  animation: titanPulseRing 4.8s ease-in-out infinite;
}

.login-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(84vw, 860px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 34% 36%, rgba(255,255,255,.16), transparent 0 24%),
    radial-gradient(ellipse at 68% 58%, rgba(255,192,0,.15), transparent 0 27%),
    radial-gradient(ellipse at 52% 72%, rgba(35,181,211,.16), transparent 0 29%);
  filter: blur(24px);
  opacity: .62;
  transform: translate(-50%, -50%);
  animation: titanNebulaBloom 14s ease-in-out infinite alternate;
}

.login-energy {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(92vw, 1040px);
  aspect-ratio: 1.55;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.login-energy-one {
  background:
    conic-gradient(from 18deg, transparent 0 13%, rgba(255,192,0,.46) 18%, transparent 26%, rgba(35,181,211,.28) 34%, transparent 49%, rgba(255,255,255,.24) 62%, transparent 72%, rgba(255,192,0,.28) 83%, transparent 100%);
  filter: blur(18px);
  opacity: .72;
  animation: titanEnergyTurn 16s linear infinite;
}

.login-energy-two {
  width: min(76vw, 820px);
  background:
    radial-gradient(ellipse at 38% 44%, rgba(255,192,0,.32), transparent 0 30%),
    radial-gradient(ellipse at 62% 56%, rgba(35,181,211,.32), transparent 0 34%),
    linear-gradient(105deg, transparent 20%, rgba(255,255,255,.18), transparent 72%);
  filter: blur(28px);
  opacity: .78;
  animation: titanLiquidBreath 8s ease-in-out infinite alternate;
}

.login-energy-three {
  width: min(64vw, 660px);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    inset 0 0 40px rgba(255,192,0,.14),
    0 0 70px rgba(35,181,211,.18);
  opacity: .70;
  transform: translate(-50%, -50%) rotateX(68deg);
  animation: titanPulseRing 3.6s ease-in-out infinite reverse;
}

.login-depth-lines {
  position: absolute;
  z-index: 1;
  inset: -20% -10%;
  background:
    radial-gradient(ellipse at 18% 36%, rgba(255,255,255,.14), transparent 0 22%),
    radial-gradient(ellipse at 76% 46%, rgba(255,192,0,.17), transparent 0 28%),
    radial-gradient(ellipse at 42% 74%, rgba(35,181,211,.16), transparent 0 24%),
    linear-gradient(118deg, transparent 0 26%, rgba(255,255,255,.08) 44%, transparent 68% 100%);
  filter: blur(22px);
  opacity: .60;
  transform: rotate(-7deg) scale(1.08);
  animation: titanMistFlow 13s ease-in-out infinite alternate;
}

.login-starfield {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.login-starfield span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 18px rgba(255,255,255,.78);
  animation: titanStarFloat 6s ease-in-out infinite;
}

.login-starfield span:nth-child(1) { left: 13%; top: 22%; animation-delay: -.4s; }
.login-starfield span:nth-child(2) { left: 21%; top: 81%; width: 6px; height: 6px; background: #ffc000; animation-delay: -1.2s; }
.login-starfield span:nth-child(3) { left: 44%; top: 14%; width: 3px; height: 3px; animation-delay: -2.4s; }
.login-starfield span:nth-child(4) { left: 61%; top: 76%; background: #23b5d3; animation-delay: -3.1s; }
.login-starfield span:nth-child(5) { left: 79%; top: 29%; width: 5px; height: 5px; animation-delay: -1.9s; }
.login-starfield span:nth-child(6) { left: 91%; top: 61%; background: #ffc000; animation-delay: -4.4s; }
.login-starfield span:nth-child(7) { left: 49%; top: 53%; width: 2px; height: 2px; animation-delay: -2.8s; }
.login-starfield span:nth-child(8) { left: 30%; top: 38%; width: 3px; height: 3px; background: #23b5d3; animation-delay: -5.2s; }

.login-card {
  z-index: 4;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(245,249,255,.68)),
    rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.44);
  backdrop-filter: blur(18px) saturate(1.16);
}

.login-logo-box {
  border-width: 1px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    0 12px 28px rgba(0,0,0,.18),
    0 0 0 rgba(255,192,0,0);
}

.login-logo-box img {
  transition: transform .22s ease, filter .22s ease;
}

.login-logo-box:hover,
.login-logo-box:focus-visible {
  transform: translateY(-4px) scale(1.06);
  border-color: #ffc000;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.30), transparent 30%),
    linear-gradient(135deg, #0b2d5c 0%, #123f8c 48%, #071b3a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 18px 38px rgba(7,27,58,.36),
    0 0 34px rgba(255,192,0,.62),
    0 0 70px rgba(35,181,211,.22);
}

.login-logo-box:hover img,
.login-logo-box:focus-visible img {
  filter: drop-shadow(0 0 11px rgba(255,255,255,.82)) drop-shadow(0 0 20px rgba(255,192,0,.48));
  transform: scale(1.05);
}

.password-control input {
  padding-right: 58px;
}

.password-toggle {
  right: 8px;
  top: 15px;
  width: 36px;
  min-width: 36px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #123f8c;
}

.password-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle[aria-pressed="true"] {
  background: #eef5ff;
  color: #071b3a;
  transform: none;
  box-shadow: 0 0 0 4px rgba(18,63,140,.10);
}

.password-toggle-icon {
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50% / 62%;
  transition: transform .18s ease, height .18s ease, border-radius .18s ease;
}

.password-toggle-icon::before {
  width: 6px;
  height: 6px;
  transition: transform .18s ease, opacity .18s ease;
}

.password-toggle[aria-pressed="true"] .password-toggle-icon {
  height: 4px;
  border-radius: var(--radius-pill);
  transform: rotate(0deg);
}

.password-toggle[aria-pressed="true"] .password-toggle-icon::before {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.1);
}

.password-toggle[aria-pressed="true"] .password-toggle-icon::after {
  display: none;
}

.login-submit {
  position: relative;
  overflow: hidden;
}

.login-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
  transform: translateX(-110%);
  transition: transform .46s ease;
}

.login-submit:hover::before,
.login-shell.is-launching .login-submit::before {
  transform: translateX(110%);
}

.login-shell.is-launching .login-stage::before,
.login-shell.is-launching .login-stage::after,
.login-shell.is-launching .login-energy {
  animation-duration: inherit !important;
}

.login-shell.is-launching .login-card {
  animation: titanLoginMistCard .66s ease forwards;
}

.login-shell.is-launching .login-stage::before,
.login-shell.is-launching .login-stage::after,
.login-shell.is-launching .login-energy,
.login-shell.is-launching .login-depth-lines,
.login-shell.is-launching .login-spark-canvas {
  animation-play-state: paused !important;
}

.login-shell.is-launching::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(255,255,255,.76), transparent 0 30%),
    radial-gradient(ellipse at 36% 46%, rgba(255,192,0,.26), transparent 0 28%),
    radial-gradient(ellipse at 66% 56%, rgba(35,181,211,.28), transparent 0 30%);
  filter: blur(30px);
  opacity: 0;
  animation: titanMistDissolve .66s ease forwards;
}

.login-shell.is-launching .login-stage {
  animation: titanStageMist .66s ease forwards;
}

.login-shell.is-launching .login-starfield span {
  animation: titanStarMist .66s ease forwards !important;
}

.login-shell.is-launching .login-submit {
  pointer-events: none;
  filter: brightness(1.12);
}

@keyframes titanCoreVortex {
  to { transform: rotate(360deg) scale(1.04); }
}

@keyframes titanParticleSweep {
  from { background-position: 0 0, 40px 80px, -180px 0; }
  to { background-position: 260px -220px, -180px 300px, 180px 0; }
}

@keyframes titanOrganicDust {
  0% {
    background-position: 0 0, 31px 54px, -28px 18px, 64px -42px, -70px 80px;
    transform: translate3d(-1%, 0, 0) scale(1);
  }
  50% {
    background-position: 62px -38px, -44px 108px, 36px -66px, 120px 24px, -12px 142px;
    transform: translate3d(1.2%, -1%, 0) scale(1.025);
  }
  100% {
    background-position: 122px -72px, -92px 168px, 92px -118px, 188px 58px, 48px 206px;
    transform: translate3d(-.4%, 1.1%, 0) scale(1.045);
  }
}

@keyframes titanPulseRing {
  0%, 100% { opacity: .34; transform: rotateX(66deg) scale(.92); }
  50% { opacity: .78; transform: rotateX(66deg) scale(1.08); }
}

@keyframes titanGridRotate {
  to { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg); }
}

@keyframes titanNebulaBloom {
  0% {
    opacity: .48;
    transform: translate(-52%, -49%) scale(.92) rotate(-6deg);
    border-radius: 44% 56% 58% 42% / 40% 48% 52% 60%;
  }
  50% {
    opacity: .72;
    transform: translate(-49%, -52%) scale(1.08) rotate(4deg);
    border-radius: 58% 42% 43% 57% / 55% 38% 62% 45%;
  }
  100% {
    opacity: .56;
    transform: translate(-51%, -48%) scale(1.0) rotate(9deg);
    border-radius: 51% 49% 62% 38% / 47% 57% 43% 53%;
  }
}

@keyframes titanEnergyTurn {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes titanLiquidBreath {
  from { transform: translate(-52%, -49%) scale(.94) rotate(-5deg); border-radius: 48% 52% 57% 43% / 47% 42% 58% 53%; }
  to { transform: translate(-48%, -52%) scale(1.07) rotate(6deg); border-radius: 62% 38% 42% 58% / 54% 62% 38% 46%; }
}

@keyframes titanDepthFlow {
  from { background-position: -120px 0, 80px 0, 0 0; opacity: .34; }
  to { background-position: 120px 0, -80px 0, 90px 0; opacity: .62; }
}

@keyframes titanMistFlow {
  0% {
    opacity: .42;
    transform: translate3d(-2%, 1%, 0) rotate(-9deg) scale(1.04);
  }
  45% {
    opacity: .68;
    transform: translate3d(2%, -1.6%, 0) rotate(-4deg) scale(1.14);
  }
  100% {
    opacity: .52;
    transform: translate3d(-.5%, 1.8%, 0) rotate(3deg) scale(1.09);
  }
}

@keyframes titanStarFloat {
  0%, 100% { opacity: .20; transform: translate3d(0, 0, 0) scale(.72); filter: blur(0); }
  35% { opacity: .90; transform: translate3d(9px, -14px, 0) scale(1.15); filter: blur(.2px); }
  68% { opacity: .52; transform: translate3d(-7px, 10px, 0) scale(.95); filter: blur(.5px); }
}

@keyframes titanLoginCommit {
  0% { transform: scale(1); box-shadow: 0 30px 90px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.18); }
  45% { transform: scale(1.018); box-shadow: 0 36px 100px rgba(0,0,0,.42), 0 0 60px rgba(255,192,0,.38); }
  100% { transform: scale(.985); box-shadow: 0 28px 78px rgba(0,0,0,.34), 0 0 36px rgba(35,181,211,.24); }
}

@keyframes titanLoginMistCard {
  0% { opacity: 1; filter: blur(0); transform: scale(1); }
  45% { opacity: .98; filter: blur(0); transform: scale(.997); }
  100% { opacity: .90; filter: blur(.35px); transform: scale(.988); }
}

@keyframes titanMistDissolve {
  0% { opacity: 0; transform: scale(.82); }
  28% { opacity: .86; transform: scale(.98); }
  70% { opacity: .54; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.34); }
}

@keyframes titanStageMist {
  0% { filter: blur(0) brightness(1); opacity: 1; }
  48% { filter: blur(1.2px) brightness(1.08); opacity: .94; }
  100% { filter: blur(2.2px) brightness(1.04); opacity: .84; }
}

@keyframes titanStarMist {
  0% { opacity: .85; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -24px, 0) scale(1.55); }
}

@media (max-width: 620px) {
  .login-stage::before {
    inset: 14% -18%;
  }

  .login-stage::after {
    width: 125vw;
  }

  .login-energy-one {
    width: 130vw;
  }

  .password-control input {
    padding-right: 54px;
  }

  .password-toggle {
    min-width: 34px;
    width: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-stage::before,
  .login-stage::after,
  .login-shell.is-launching::before,
  .login-energy-one,
  .login-energy-two,
  .login-energy-three,
  .login-depth-lines,
  .login-starfield span,
  .login-shell.is-launching .login-card {
    animation: none !important;
  }
}


