﻿/**
 * auth-premium.css v2 â€” Login/Cadastro igual mockup aprovado
 * PC tela cheia: painel esquerdo + card premium + fundo neon
 * Mobile: card full width
 */

/* ========== RESET / BASE AUTH ========== */
html.cig-auth-page,
body.cig-auth-page,
body:has(.auth-wrapper),
body:has(.login-card),
body:has(.register-card) {
  background: #05070e !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.cig-auth-page body,
body.cig-auth-page {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: static !important;
  height: auto !important;
  min-height: 100dvh !important;
}

/* Full-bleed scene */
body.cig-auth-page #ondagamesv1,
body:has(.auth-wrapper) #ondagamesv1,
body:has(.login-card) #ondagamesv1,
body:has(.register-card) #ondagamesv1 {
  min-height: 100dvh !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  background:
    radial-gradient(ellipse 80% 60% at 12% 18%, rgba(250, 204, 21, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 55% at 90% 82%, rgba(127, 29, 29, 0.38), transparent 52%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(250, 204, 21, 0.05), transparent 45%),
    linear-gradient(165deg, #0a1220 0%, #070b14 45%, #120808 100%) !important;
  overflow: visible !important;
}

/* Shell SPA nÃ£o pode colapsar */
body.cig-auth-page #ondagamesv1 > .relative,
body:has(.auth-wrapper) #ondagamesv1 > .relative,
body:has(.login-card) #ondagamesv1 > .relative,
body:has(.register-card) #ondagamesv1 > .relative {
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow: visible !important;
  transform: none !important;
}

/* Chrome fora */
body.cig-auth-page .navBtn,
body:has(.auth-wrapper) .navBtn,
body:has(.login-card) .navBtn,
body:has(.register-card) .navBtn,
body.cig-auth-page .btn-scroll-top,
body:has(.login-card) .btn-scroll-top,
body:has(.register-card) .btn-scroll-top,
body.cig-auth-page .footer-wrapper,
body:has(.auth-wrapper) .footer-wrapper,
body:has(.login-card) .footer-wrapper,
body:has(.register-card) .footer-wrapper,
body.cig-auth-page .bottom-nav-spacer,
body:has(.auth-wrapper) .bottom-nav-spacer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body.cig-auth-page .sidebar-shell,
body.cig-auth-page .sb-scrim,
body:has(.auth-wrapper) .sidebar-shell,
body:has(.login-card) .sidebar-shell,
body:has(.register-card) .sidebar-shell {
  display: none !important;
  pointer-events: none !important;
}

/* Header fino no topo (nÃ£o some o form) */
body.cig-auth-page .nav-menu,
body.cig-auth-page nav.nav-indexx,
body:has(.auth-wrapper) .nav-menu {
  position: relative !important;
  z-index: 20 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* ========== LAYOUT DESKTOP FULL ========== */
.auth-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: calc(100dvh - 64px) !important;
  margin: 0 auto !important;
  padding: 1.25rem 1rem 2rem !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 5 !important;
  gap: 0 !important;
}

.auth-inner {
  width: 100% !important;
  max-width: 480px !important;
  display: flex !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 6 !important;
}

/* Painel esquerdo injetado (PC) */
.cig-auth-side {
  display: none;
}

@media (min-width: 1024px) {
  .auth-wrapper {
    max-width: 1180px !important;
    justify-content: flex-end !important;
    padding: 2rem 4% 2.5rem 2% !important;
    gap: 2rem !important;
  }

  .auth-wrapper.has-cig-side {
    justify-content: space-between !important;
    align-items: center !important;
  }

  .cig-auth-side {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex: 1 1 42% !important;
    max-width: 420px !important;
    padding: 1rem 1.5rem 1rem 0.5rem !important;
    position: relative !important;
    z-index: 4 !important;
  }

  .cig-auth-side h2 {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.03em !important;
    color: #e8eef7 !important;
    margin: 0 0 12px !important;
  }

  .cig-auth-side h2 span {
    color: #facc15 !important;
    text-shadow: 0 0 28px rgba(250, 204, 21, 0.35) !important;
  }

  .cig-auth-side p {
    color: #94a3b8 !important;
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    margin: 0 0 1.25rem !important;
    max-width: 340px !important;
  }

  .cig-auth-side .stats {
    display: flex !important;
    gap: 1.35rem !important;
  }

  .cig-auth-side .stats strong {
    display: block !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #facc15 !important;
  }

  .cig-auth-side .stats span {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
  }

  .cig-auth-side .perks {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 1.25rem !important;
  }

  .cig-auth-side .perk {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 13px !important;
    color: #cbd5e1 !important;
    font-weight: 500 !important;
  }

  .cig-auth-side .perk i {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    display: grid !important;
    place-items: center !important;
    background: rgba(250, 204, 21, 0.12) !important;
    color: #facc15 !important;
    font-style: normal !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .auth-inner {
    flex: 0 0 auto !important;
    max-width: 460px !important;
    margin-right: 2% !important;
  }
}

/* ========== CARD PREMIUM ========== */
.login-card,
.register-card {
  position: relative !important;
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 auto !important;
  border-radius: 20px !important;
  border: 1px solid rgba(250, 204, 21, 0.22) !important;
  background:
    linear-gradient(
      165deg,
      rgba(26, 43, 74, 0.58) 0%,
      rgba(11, 20, 36, 0.95) 42%,
      rgba(8, 12, 22, 0.98) 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(250, 204, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  padding: 1.7rem 1.55rem 1.35rem !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 8 !important;
  overflow: visible !important;
  display: block !important;
  min-height: auto !important;
  height: auto !important;
}

.login-card::before,
.register-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 12% !important;
  right: 12% !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.8), transparent) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Textos */
.login-card .card-title,
.register-card .card-title,
.card-header-info .card-title {
  color: #fff !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

.login-card .card-subtitle,
.register-card .card-subtitle,
.card-header-info .card-subtitle {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.login-card .badge-highlight,
.register-card .badge-highlight,
.badge-highlight {
  color: #facc15 !important;
  border-color: rgba(250, 204, 21, 0.45) !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Inputs */
.login-card input,
.register-card input,
.auth-wrapper input[type="text"],
.auth-wrapper input[type="email"],
.auth-wrapper input[type="password"],
.auth-wrapper input[type="tel"],
.auth-wrapper input:not([type]),
#cig-reg-cpf-input {
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: rgba(7, 11, 20, 0.8) !important;
  color: #e8eef7 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.login-card input:focus,
.register-card input:focus,
.auth-wrapper input:focus,
#cig-reg-cpf-input:focus {
  border-color: rgba(250, 204, 21, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12) !important;
  outline: none !important;
}

.login-card input::placeholder,
.register-card input::placeholder,
#cig-reg-cpf-input::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

/* CTA ouro */
.login-card button[type="submit"],
.register-card button[type="submit"],
.auth-wrapper button.btn-primary,
.auth-wrapper .btn-primary,
.login-card .btn-primary,
.register-card .btn-primary {
  height: 50px !important;
  min-height: 50px !important;
  width: 100% !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 15.5px !important;
  color: #0a1220 !important;
  background: linear-gradient(180deg, #ffe14a 0%, #facc15 48%, #eab308 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 12px 32px rgba(250, 204, 21, 0.35) !important;
}

/* Links dourados */
.login-card a,
.register-card a,
.auth-wrapper a,
.auth-wrapper .terms-link,
.login-card .terms-link,
.register-card .terms-link {
  color: #facc15 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* CPF wrap no topo do formulÃ¡rio */
#cig-reg-cpf-wrap,
.cig-reg-cpf-wrap {
  width: 100% !important;
  margin: 0 0 12px !important;
  display: block !important;
  order: -20 !important;
}

#cig-reg-cpf-input.cig-ok {
  border-color: rgba(34, 197, 94, 0.55) !important;
}
#cig-reg-cpf-input.cig-err {
  border-color: rgba(248, 113, 113, 0.65) !important;
}
#cig-reg-cpf-msg {
  font-size: 12px !important;
  margin-top: 6px !important;
  color: #94a3b8 !important;
}
input.cig-name-autofilled,
input[data-cpf-autofilled="1"] {
  border-color: rgba(250, 204, 21, 0.45) !important;
  background: rgba(250, 204, 21, 0.07) !important;
}

/* Selos de confianÃ§a (injetados) */
.cig-auth-seals {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 18px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.cig-auth-seals .seal {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 10px !important;
  border-radius: 10px !important;
  background: rgba(7, 11, 20, 0.55) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
}
.cig-auth-seals .seal svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
  color: #22c55e !important;
}
.cig-auth-seals .seal.gold svg { color: #facc15 !important; }
.cig-auth-seals .seal.red svg { color: #f87171 !important; }

.cig-auth-note {
  margin-top: 12px !important;
  text-align: center !important;
  font-size: 10.5px !important;
  color: #64748b !important;
  line-height: 1.4 !important;
}

/* Mascote decorativo PC */
.cig-auth-mascot {
  display: none;
  pointer-events: none !important;
  position: fixed !important;
  right: -2% !important;
  bottom: -3% !important;
  width: min(42vw, 420px) !important;
  opacity: 0.07 !important;
  z-index: 1 !important;
  filter: drop-shadow(0 0 40px rgba(250, 204, 21, 0.12)) !important;
}
@media (min-width: 1024px) {
  body.cig-auth-page .cig-auth-mascot,
  body:has(.auth-wrapper) .cig-auth-mascot {
    display: block !important;
  }
}

/* Mobile */
@media (max-width: 1023.98px) {
  .auth-wrapper {
    min-height: calc(100dvh - 56px) !important;
    padding: 0.85rem 0.85rem 1.5rem !important;
    justify-content: flex-start !important;
    padding-top: 1rem !important;
  }
  .auth-inner {
    max-width: 100% !important;
  }
  .login-card,
  .register-card {
    max-width: 100% !important;
    border-radius: 18px !important;
    padding: 1.25rem 1rem 1.1rem !important;
  }
  .login-card input,
  .register-card input,
  #cig-reg-cpf-input {
    height: 46px !important;
    min-height: 46px !important;
  }
  .cig-auth-side {
    display: none !important;
  }
}

/* Evita padding-top forÃ§ado de outros patches no auth */
body.cig-auth-page #ondagamesv1 > div.relative,
body:has(.login-card) #ondagamesv1 > div.relative,
body:has(.register-card) #ondagamesv1 > div.relative,
body:has(.auth-wrapper) #ondagamesv1 > div.relative {
  padding-top: 0 !important;
}

/* ========== AUTH FIT + CENTER (v4) — sem cortar conteúdo ==========
 * Login/Cadastro: centraliza no PC, sobe um pouco o card, NÃO corta.
 * Mobile: permite scroll se o formulário for alto.
 * Visual (cores/textos/elementos) intacto.
 */

/* Página: altura mínima da tela, scroll só se precisar */
html.cig-auth-page,
body.cig-auth-page,
body:has(.auth-wrapper),
body:has(.login-card),
body:has(.register-card) {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}

html.cig-auth-page body,
body.cig-auth-page {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
}

body.cig-auth-page #ondagamesv1,
body:has(.auth-wrapper) #ondagamesv1,
body:has(.login-card) #ondagamesv1,
body:has(.register-card) #ondagamesv1 {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.cig-auth-page #ondagamesv1 > .relative,
body:has(.auth-wrapper) #ondagamesv1 > .relative,
body:has(.login-card) #ondagamesv1 > .relative,
body:has(.register-card) #ondagamesv1 > .relative {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: block !important;
}

/* Wrapper: flex center, sobe o card com padding (sem clip) */
body.cig-auth-page .auth-wrapper,
body:has(.auth-wrapper) .auth-wrapper,
body:has(.login-card) .auth-wrapper,
body:has(.register-card) .auth-wrapper {
  min-height: calc(100vh - 56px) !important;
  min-height: calc(100dvh - 56px) !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  /* sobe o conjunto visualmente (mais espaço embaixo) */
  padding: 2vh 1rem 8vh !important;
}

body.cig-auth-page .auth-inner,
body:has(.login-card) .auth-inner,
body:has(.register-card) .auth-inner {
  transform: translateY(-2vh) !important;
  max-width: 480px !important;
  width: 100% !important;
  flex: 0 1 480px !important;
}

body.cig-auth-page .login-card,
body.cig-auth-page .register-card,
body:has(.login-card) .login-card,
body:has(.register-card) .register-card {
  transform: none !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  width: 100% !important;
}

/* PC largo: painel + card lado a lado, centralizado na viewport */
@media (min-width: 1024px) {
  body.cig-auth-page .auth-wrapper,
  body:has(.auth-wrapper) .auth-wrapper {
    max-width: 1180px !important;
    min-height: calc(100dvh - 48px) !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 3vh 4% 7vh !important;
    gap: 2rem !important;
  }

  body.cig-auth-page .auth-wrapper.has-cig-side .cig-auth-side {
    display: flex !important;
    transform: translateY(-2vh) !important;
    flex: 1 1 40% !important;
    max-width: 420px !important;
  }

  body.cig-auth-page .auth-wrapper.has-cig-side .auth-inner {
    transform: translateY(-2vh) !important;
    flex: 0 0 460px !important;
    max-width: 460px !important;
    margin-right: 1% !important;
  }

  /* Login (card mais baixo): trava scroll da página se couber */
  body.cig-auth-page:has(.login-card) {
    overflow-y: hidden !important;
  }
  body.cig-auth-page:has(.login-card) #ondagamesv1,
  body.cig-auth-page:has(.login-card) .auth-wrapper {
    overflow: hidden !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
  }

  /* Cadastro: NÃO trava — formulário alto não pode cortar */
  body.cig-auth-page:has(.register-card) {
    overflow-y: auto !important;
  }
  body.cig-auth-page:has(.register-card) #ondagamesv1,
  body.cig-auth-page:has(.register-card) .auth-wrapper {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
  }
}

/* Tablet / mobile */
@media (max-width: 1023.98px) {
  body.cig-auth-page,
  body:has(.auth-wrapper) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    touch-action: pan-y !important;
    height: auto !important;
    max-height: none !important;
  }

  body.cig-auth-page #ondagamesv1,
  body.cig-auth-page #ondagamesv1 > .relative {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    min-height: 100dvh !important;
  }

  body.cig-auth-page .auth-wrapper,
  body:has(.auth-wrapper) .auth-wrapper {
    min-height: calc(100dvh - 52px) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 1.5vh 0.85rem 4vh !important;
  }

  body.cig-auth-page .cig-auth-side {
    display: none !important;
  }

  body.cig-auth-page .auth-inner {
    transform: translateY(0) !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  body.cig-auth-page .login-card,
  body.cig-auth-page .register-card {
    transform: none !important;
    margin-top: 1vh !important;
  }

  /* Login mobile: ainda centraliza se couber */
  body.cig-auth-page:has(.login-card) .auth-wrapper {
    justify-content: center !important;
    padding-top: 2vh !important;
    padding-bottom: 6vh !important;
  }
  body.cig-auth-page:has(.login-card) .auth-inner {
    transform: translateY(-2vh) !important;
  }
}
