/*
 * Login: paleta fixa alinhada à marca (ícone navy + gradiente ciano → magenta/roxo).
 * Escopo: html.page-auth — fundo bokeh + bolhas animadas subindo.
 */
html.page-auth {
  --accent: #3bdcff;
  --accent-hover: #6ae8ff;
  --accent-soft: rgba(59, 220, 255, 0.22);
  --bg: #03060d;
  --bg-elevated: #101a2e;
  --bg-hover: #1a2740;
  --gray-600: #243352;
  --border: rgba(59, 220, 255, 0.11);
  --border-focus: rgba(232, 121, 249, 0.4);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --text: #f0f4ff;
  --text-secondary: #94a8d4;
  --text-muted: #6b7fa8;
  --danger: #ff6b8a;
  --success: #34d399;
}

/* Fundo bokeh: topo uniforme (sem brilho forte à esquerda); profundidade na base */
html.page-auth body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #010206;
  background-image:
    radial-gradient(ellipse 100% 85% at 8% 0%, rgba(0, 75, 230, 0.32) 0%, rgba(20, 50, 140, 0.1) 42%, transparent 65%),
    radial-gradient(ellipse 100% 85% at 92% 100%, rgba(0, 75, 230, 0.32) 0%, rgba(20, 50, 140, 0.1) 42%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 8% 88%, rgba(30, 64, 175, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 55% at 48% 108%, rgba(15, 55, 160, 0.12) 0%, transparent 52%),
    linear-gradient(165deg, #03060f 0%, #020308 38%, #010205 100%);
  background-attachment: fixed;
}

html.page-auth .login-bg-bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

html.page-auth .auth-main-wrap {
  position: relative;
  z-index: 1;
}

html.page-auth .login-bubble {
  position: absolute;
  bottom: -15%;
  left: 50%;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0;
  will-change: transform, opacity;
  animation: loginBubbleRise linear infinite;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.12),
    0 0 1px rgba(255, 255, 255, 0.06);
}

@keyframes loginBubbleRise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.55);
    opacity: 0;
  }
  8% {
    opacity: 0.42;
  }
  50% {
    transform: translate3d(calc(var(--bubble-drift, 0px) * 0.4), -58vh, 0) scale(0.92);
    opacity: 0.32;
  }
  92% {
    opacity: 0.16;
  }
  100% {
    transform: translate3d(var(--bubble-drift, 0px), -128vh, 0) scale(1.06);
    opacity: 0;
  }
}

html.page-auth .login-bubble:nth-child(1) {
  width: 52px;
  height: 52px;
  margin-left: -42vw;
  --bubble-drift: 18px;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.2), rgba(59, 220, 255, 0.14) 45%, rgba(59, 220, 255, 0.04) 68%, transparent 72%);
  animation-duration: 23s;
  animation-delay: -4s;
}
html.page-auth .login-bubble:nth-child(2) {
  width: 88px;
  height: 88px;
  margin-left: 38vw;
  --bubble-drift: -24px;
  background: radial-gradient(circle at 28% 32%, rgba(255, 255, 255, 0.15), rgba(96, 165, 250, 0.14) 42%, rgba(59, 130, 246, 0.06) 65%, transparent 70%);
  animation-duration: 29s;
  animation-delay: -11s;
}
html.page-auth .login-bubble:nth-child(3) {
  width: 36px;
  height: 36px;
  margin-left: -8vw;
  --bubble-drift: 10px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22), rgba(94, 234, 255, 0.16) 48%, transparent 72%);
  animation-duration: 19s;
  animation-delay: -1s;
}
html.page-auth .login-bubble:nth-child(4) {
  width: 72px;
  height: 72px;
  margin-left: 12vw;
  --bubble-drift: -14px;
  background: radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.12), rgba(147, 197, 253, 0.14) 44%, transparent 70%);
  animation-duration: 26s;
  animation-delay: -18s;
}
html.page-auth .login-bubble:nth-child(5) {
  width: 44px;
  height: 44px;
  margin-left: -28vw;
  --bubble-drift: 22px;
  background: radial-gradient(circle at 33% 27%, rgba(255, 255, 255, 0.18), rgba(59, 220, 255, 0.1) 50%, transparent 74%);
  animation-duration: 21s;
  animation-delay: -7s;
}
html.page-auth .login-bubble:nth-child(6) {
  width: 96px;
  height: 96px;
  margin-left: 22vw;
  --bubble-drift: -30px;
  background: radial-gradient(circle at 40% 25%, rgba(255, 255, 255, 0.1), rgba(56, 189, 248, 0.12) 40%, rgba(37, 99, 235, 0.08) 62%, transparent 72%);
  animation-duration: 32s;
  animation-delay: -22s;
}
html.page-auth .login-bubble:nth-child(7) {
  width: 58px;
  height: 58px;
  margin-left: -18vw;
  --bubble-drift: 8px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), rgba(45, 212, 191, 0.12) 46%, transparent 71%);
  animation-duration: 24s;
  animation-delay: -14s;
}
html.page-auth .login-bubble:nth-child(8) {
  width: 40px;
  height: 40px;
  margin-left: 32vw;
  --bubble-drift: -12px;
  background: radial-gradient(circle at 28% 38%, rgba(255, 255, 255, 0.2), rgba(59, 220, 255, 0.11) 48%, transparent 73%);
  animation-duration: 17s;
  animation-delay: -3s;
}
html.page-auth .login-bubble:nth-child(9) {
  width: 78px;
  height: 78px;
  margin-left: -35vw;
  --bubble-drift: 26px;
  background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.11), rgba(129, 140, 248, 0.13) 43%, transparent 69%);
  animation-duration: 27s;
  animation-delay: -9s;
}
html.page-auth .login-bubble:nth-child(10) {
  width: 48px;
  height: 48px;
  margin-left: 6vw;
  --bubble-drift: -18px;
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.17), rgba(34, 211, 238, 0.13) 47%, transparent 72%);
  animation-duration: 20s;
  animation-delay: -16s;
}
html.page-auth .login-bubble:nth-child(11) {
  width: 64px;
  height: 64px;
  margin-left: -12vw;
  --bubble-drift: 14px;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.14), rgba(96, 165, 250, 0.1) 45%, transparent 71%);
  animation-duration: 25s;
  animation-delay: -20s;
}
html.page-auth .login-bubble:nth-child(12) {
  width: 34px;
  height: 34px;
  margin-left: 28vw;
  --bubble-drift: -8px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22), rgba(94, 234, 255, 0.1) 52%, transparent 75%);
  animation-duration: 16s;
  animation-delay: -5s;
}
html.page-auth .login-bubble:nth-child(13) {
  width: 82px;
  height: 82px;
  margin-left: -5vw;
  --bubble-drift: 20px;
  background: radial-gradient(circle at 38% 26%, rgba(255, 255, 255, 0.12), rgba(129, 140, 248, 0.12) 44%, rgba(59, 220, 255, 0.06) 62%, transparent 72%);
  animation-duration: 30s;
  animation-delay: -25s;
}
html.page-auth .login-bubble:nth-child(14) {
  width: 56px;
  height: 56px;
  margin-left: 18vw;
  --bubble-drift: -22px;
  background: radial-gradient(circle at 31% 31%, rgba(255, 255, 255, 0.16), rgba(125, 211, 252, 0.1) 46%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -12s;
}

@media (prefers-reduced-motion: reduce) {
  html.page-auth .login-bg-bubbles {
    display: none;
  }
}

html.page-auth .login-tagline {
  margin: 0 0 1rem;
  text-align: center;
  color: #ffffff;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Login: título e subtítulo abaixo da logo */
html.page-auth .login-welcome-title {
  margin: 1.2rem 0 0.1rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html.page-auth .login-welcome-sub {
  margin: -0.08rem 0 1.15rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
}

/* Verificação: texto introdutório abaixo do cabeçalho */
html.page-auth .modal-glass > .login-tagline {
  margin-top: 1.15rem;
}

/* Cadastro: mais ar entre logo e frase */
html.page-auth .auth-brand .auth-brand-logo-link + .login-tagline {
  margin-top: 1.6rem;
  margin-bottom: 0.65rem;
}

html.page-auth .auth-brand-title {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html.page-auth .auth-brand:has(.login-tagline) .auth-brand-title {
  margin-top: 0.65rem;
}

/* Último campo + área de mensagem + botão: menos espaço vazio */
html.page-auth form#formRegister .form-group:last-of-type,
html.page-auth form#formVerify .form-group:last-of-type {
  margin-bottom: 0.35rem;
}

html.page-auth form#formRegister #msg,
html.page-auth form#formVerify #msg,
html.page-auth form#formLogin #msg {
  margin-top: 0;
  margin-bottom: 0.45rem;
  min-height: 1.125rem;
}

html.page-auth .auth-footer-line {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

/* Primeiro rodapé após o formulário: mais ar do botão */
html.page-auth .modal-glass > form + .auth-footer-line {
  margin-top: 1.75rem;
}

html.page-auth .auth-footer-line .btn-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

html.page-auth .auth-footer-line .btn-link:hover {
  color: var(--accent-hover);
}

html.page-auth .auth-footer-line a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

html.page-auth .auth-footer-line a:hover {
  color: var(--accent-hover);
}

html.page-auth .modal-glass.glass {
  background: linear-gradient(165deg, rgba(18, 28, 48, 0.96) 0%, rgba(12, 18, 34, 0.98) 100%);
  border-color: rgba(59, 220, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.07),
    0 24px 56px rgba(0, 0, 0, 0.5);
}

html.page-auth .auth-brand > .auth-brand-logo,
html.page-auth .auth-brand-logo-link .auth-brand-logo {
  box-shadow:
    0 0 32px rgba(59, 220, 255, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.45);
}

html.page-auth .auth-brand-logo-link:hover .auth-brand-logo {
  box-shadow:
    0 0 40px rgba(224, 64, 208, 0.18),
    0 14px 44px rgba(0, 0, 0, 0.5);
}

html.page-auth input,
html.page-auth select,
html.page-auth textarea {
  background: rgba(6, 10, 22, 0.85);
  border-color: rgba(59, 220, 255, 0.1);
}

html.page-auth input:focus,
html.page-auth select:focus,
html.page-auth textarea:focus {
  border-color: rgba(59, 220, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(59, 220, 255, 0.15);
}

html.page-auth .btn-primary {
  background: linear-gradient(168deg, #5cf0ff 0%, #2ec4e0 32%, #d946ef 72%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 20px rgba(59, 220, 255, 0.25);
}

html.page-auth .btn-primary:hover {
  background: linear-gradient(168deg, #7ef9ff 0%, #3bdcff 32%, #e879f9 72%, #8b5cf6 100%);
  filter: brightness(1.04);
  opacity: 1;
}

html.page-auth .btn-primary:active {
  filter: brightness(0.96);
}

html.page-auth a {
  color: #6ae8ff;
}

html.page-auth a:hover {
  color: #a5f3fc;
}

html.page-auth input[type="checkbox"] {
  accent-color: #3bdcff;
}
