/* ==========================================================================
   Auth pages — split-screen layout for Login, Register, Forgot Password
   ========================================================================== */

.auth-page {
  height: 100vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.auth-brand-panel {
  position: relative;
  flex: 1 1 46%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 4rem);
  background: linear-gradient(120deg, #2f5bff, #8b5cf6, #06d6e8, #2f5bff);
  background-size: 300% 300%;
  animation: auth-gradient-shift 18s ease infinite;
  color: #fff;
  overflow: hidden;
}
@keyframes auth-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.auth-grid-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 40%, transparent 90%);
  pointer-events: none;
}
.auth-brand-panel .nx-brand {
  color: #fff;
  position: relative;
  z-index: 2;
}
.auth-brand-copy {
  position: relative;
  z-index: 2;
  max-width: 460px;
}
.auth-brand-copy h2 {
  color: #fff;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
}
.auth-brand-copy p {
  color: rgba(255, 255, 255, 0.85);
}
.auth-brand-quote {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}
.auth-brand-quote img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.auth-form-panel {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--bg-body);
}
.auth-form-wrap {
  width: 100%;
  max-width: 440px;
  padding-block: 1rem;
}
.auth-form-wrap .nx-brand {
  display: none;
}

/* Tighter vertical rhythm than the default .form-floating-nx so the whole
   register form (name/email/phone/country/city/password) fits one screen
   on typical laptop heights without needing to scroll. */
.auth-form-wrap .form-floating-nx {
  margin-bottom: 1rem;
}
.auth-form-wrap h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.auth-social-btn:hover {
  border-color: var(--color-blue);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}
.auth-social-btn i {
  transition: color var(--transition-fast);
}
.auth-social-btn:hover i.fa-google { color: #ea4335; }
.auth-social-btn:hover i.fa-github { color: #6e5494; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-password-toggle {
  position: absolute;
  right: 1.1rem;
  top: 0.95rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
}

.password-strength {
  display: flex;
  gap: 5px;
  margin-top: 0.6rem;
}
.password-strength span {
  height: 4px;
  flex: 1;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-alt);
  transition: background var(--transition-fast);
}
.password-strength.level-1 span:nth-child(1) { background: var(--color-danger); }
.password-strength.level-2 span:nth-child(1),
.password-strength.level-2 span:nth-child(2) { background: var(--color-warning); }
.password-strength.level-3 span:nth-child(1),
.password-strength.level-3 span:nth-child(2),
.password-strength.level-3 span:nth-child(3) { background: var(--color-cyan); }
.password-strength.level-4 span { background: var(--color-success); }

.auth-floating-shape {
  position: absolute;
  z-index: 1;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---- Brand-mark glow ring (form panel logo) ---- */
.auth-logo-ring {
  position: relative;
  display: inline-flex;
}
.auth-logo-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.35;
  animation: auth-logo-pulse 2.4s ease-in-out infinite;
  z-index: -1;
}
@keyframes auth-logo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.18); opacity: 0.1; }
}

/* ---- Security / trust microcopy under the submit button ---- */
.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.auth-security-note i {
  color: var(--color-success);
}

/* ---- Animated trust stats row inside the brand panel ---- */
.auth-trust-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 1.75rem;
  flex-wrap: wrap;
}
.auth-trust-stats .hero-stat h3 {
  font-size: 1.5rem;
  color: #fff;
}
.auth-trust-stats .hero-stat span {
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 991.98px) {
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    flex: 1 1 100%;
  }
  .auth-form-wrap .nx-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
  }
}
