/**
 * Login — atmosfera Visionários (visível, sem poluir o form).
 * Glow dourado full-bleed (radial suave) + orbes; sem crop retangular.
 * v=login0721l (byte-equivalent to login0721h — pre-CLS restore)
 */

:root {
  --vf-login-contrato-bg:
    radial-gradient(ellipse 160% 110% at 50% -5%, rgba(232, 197, 71, 0.28) 0%, rgba(232, 197, 71, 0.1) 32%, transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 22%, rgba(255, 220, 100, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #3a5c3d 0%, #2d4a2d 45%, #1e301f 100%);
}

.vf-login-shell,
.vf-auth-mobile.vf-login-shell,
html[data-vf-portal] .vf-auth-mobile.vf-login-shell {
  position: relative;
  isolation: isolate;
  /* Allow vertical scroll so footer stays reachable; clip only horizontal bleed */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #2d4a2d !important;
  background-image: var(--vf-login-contrato-bg) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

html.vf-mobile-app-only:has(.vf-auth-mobile):not([data-vf-portal="matriz"]),
html.vf-mobile-app-only:has(.vf-auth-mobile):not([data-vf-portal="matriz"]) body,
html.vf-mobile-app-only:has(.vf-auth-mobile):not([data-vf-portal="matriz"]) #root,
html.vf-mobile-app-only:has(.vf-auth-mobile):not([data-vf-portal="matriz"]) .vf-mobile-app-shell,
html.vf-mobile-app-only:has(.vf-auth-mobile):not([data-vf-portal="matriz"]) .app-shell {
  background-color: #2d4a2d !important;
  background-image: var(--vf-login-contrato-bg) !important;
  background-size: cover !important;
}

html[data-vf-portal="licenciado"]:has(.vf-auth-mobile):before {
  background-color: #2d4a2d !important;
  background-image: var(--vf-login-contrato-bg) !important;
}

/*
 * Halo dourado full-bleed — cobre 100% do shell.
 * Só radiais suaves (sem conic / sem caixa limitada) + blur alto
 * para bordas se dissolverem no verde.
 */
.vf-login-shell::before,
.vf-auth-mobile.vf-login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 85% at 50% 16%, rgba(255, 228, 120, 0.42) 0%, rgba(232, 197, 71, 0.2) 28%, transparent 58%),
    radial-gradient(ellipse 95% 70% at 50% 8%, rgba(255, 240, 170, 0.22) 0%, transparent 52%),
    radial-gradient(circle 70vmax at 50% 18%, rgba(232, 197, 71, 0.14) 0%, transparent 52%);
  filter: blur(36px);
  transform: none;
  animation: vf-login-halo 10s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

/* Partículas / orbes — círculos suaves, sem arestas */
.vf-login-shell::after,
.vf-auth-mobile.vf-login-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 18px at 12% 22%, rgba(255, 236, 150, 0.75) 0%, rgba(232, 197, 71, 0.22) 45%, transparent 72%),
    radial-gradient(circle 14px at 88% 18%, rgba(255, 240, 170, 0.7) 0%, rgba(184, 151, 62, 0.2) 48%, transparent 74%),
    radial-gradient(circle 22px at 78% 58%, rgba(255, 220, 100, 0.55) 0%, transparent 70%),
    radial-gradient(circle 16px at 18% 62%, rgba(255, 230, 140, 0.6) 0%, transparent 72%),
    radial-gradient(circle 12px at 42% 12%, rgba(255, 245, 190, 0.65) 0%, transparent 68%),
    radial-gradient(circle 13px at 64% 78%, rgba(232, 197, 71, 0.5) 0%, transparent 70%),
    radial-gradient(circle 15px at 30% 84%, rgba(255, 230, 140, 0.48) 0%, transparent 72%);
  filter: blur(1.5px);
  animation: vf-login-orbs 11s ease-in-out infinite alternate;
}

.vf-login-shell > *,
.vf-auth-mobile.vf-login-shell > * {
  position: relative;
  z-index: 1;
}

@keyframes vf-login-halo {
  0% {
    opacity: 0.55;
  }
  100% {
    opacity: 0.95;
  }
}

@keyframes vf-login-orbs {
  0% {
    transform: translate3d(0, 10px, 0);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(-14px, -22px, 0);
    opacity: 0.85;
  }
  100% {
    transform: translate3d(16px, -8px, 0);
    opacity: 0.7;
  }
}

.vf-auth-mobile .vf-auth-mobile-logo,
.vf-login-shell .vf-auth-mobile-logo,
.vf-auth-mobile .vf-animate-scale-in,
.vf-login-shell .vf-animate-scale-in {
  animation: vf-login-enter-down 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vf-auth-mobile .vf-login-mascot,
.vf-login-shell .vf-login-mascot {
  animation:
    vf-login-enter-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both,
    vf-login-mascot-breathe 4.8s ease-in-out 0.9s infinite;
  will-change: transform;
  filter: drop-shadow(0 0 22px rgba(232, 197, 71, 0.4));
}

.vf-auth-mobile .vf-login-form,
.vf-login-shell .vf-login-form {
  animation: vf-login-enter-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.vf-auth-mobile .vf-login-submit:not(:disabled):hover,
.vf-login-shell .vf-login-submit:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

/* Footer — sempre visível sob Entrar (contraste + sem clip) */
.vf-login-footer {
  display: block !important;
  margin: 28px 0 0;
  padding: 0 8px calc(10px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72) !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  animation: vf-login-enter-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

@keyframes vf-login-enter-down {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes vf-login-enter-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vf-login-mascot-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .vf-login-shell::before,
  .vf-auth-mobile.vf-login-shell::before,
  .vf-login-shell::after,
  .vf-auth-mobile.vf-login-shell::after,
  .vf-auth-mobile .vf-auth-mobile-logo,
  .vf-login-shell .vf-auth-mobile-logo,
  .vf-auth-mobile .vf-animate-scale-in,
  .vf-login-shell .vf-animate-scale-in,
  .vf-auth-mobile .vf-login-mascot,
  .vf-login-shell .vf-login-mascot,
  .vf-auth-mobile .vf-login-form,
  .vf-login-shell .vf-login-form,
  .vf-login-footer {
    animation: none !important;
    transform: none !important;
  }
  .vf-login-shell::before,
  .vf-auth-mobile.vf-login-shell::before {
    opacity: 0.75;
  }
}
