/* ============================================================
   NexSub Auth — split-panel layout with brand panel + form
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100vh; overflow-x: hidden; }

.auth-layout {
  display: flex;
  flex: 1;
  min-height: 100vh;
}

/* ── Left brand panel ──────────────────────────── */
.auth-brand {
  flex: 0 0 45%;
  background: var(--hero-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 48px 40px;
  height: auto;
}

/* ── Animated orbs (brand colors) ──────────────── */
.auth-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 20s ease-in-out infinite;
}

.auth-orb--1 {
  width: 220px; height: 220px;
  background: #7C5CE0;
  top: -60px; left: -60px;
  animation-delay: 0s;
  opacity: 0.35;
}

.auth-orb--2 {
  width: 180px; height: 180px;
  background: #3B82F6;
  bottom: 40px; right: -40px;
  animation-delay: -7s;
  opacity: 0.30;
}

.auth-orb--3 {
  width: 160px; height: 160px;
  background: #5A3FB5;
  top: 50%; left: 55%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.35;
}

.auth-orb--4 {
  width: 140px; height: 140px;
  background: #6853C1;
  top: 25%; left: 80%;
  animation-delay: -3s;
  opacity: 0.25;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(12px, -16px) scale(1.05); }
  66%      { transform: translate(-8px, 12px) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-orb { animation: none !important; }
}

/* ── Brand content (above orbs) ────────────────── */
.auth-brand__content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand__content img {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  display: block;
}

.auth-brand-name {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: #F4F3FA;
}

.auth-brand-accent {
  background: linear-gradient(135deg, #7C5CE0, #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand__tagline {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  max-width: 260px;
  margin-top: 0;
}

.auth-brand .logo {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.auth-brand .logo span {
  background: linear-gradient(135deg, #FFFFFF, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Back link ─────────────────────────────────── */
.auth-brand__back {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
}

.auth-brand__back a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.60);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.auth-brand__back a:hover {
  color: rgba(255, 255, 255, 0.90);
}

/* ── Right form panel ──────────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 48px 40px;
  min-height: 100vh;
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
}

.auth-form-card .card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 40px 36px;
}

.auth-form-card__heading {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.auth-form-card__sub {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

/* ── Form inputs ───────────────────────────────── */
.auth-form-card input[type="text"],
.auth-form-card input[type="email"],
.auth-form-card input[type="password"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-card input:focus {
  border-color: #5A3FB5;
  box-shadow: 0 0 0 3px rgba(90, 63, 181, 0.18);
}

.auth-form-card input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.auth-form-card .form-group {
  margin-bottom: var(--space-5);
}

.auth-form-card .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ── Submit button ─────────────────────────────── */
.auth-form-card button[type="submit"],
.auth-form-card .btn--primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #5A3FB5, #3B82F6);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
}

.auth-form-card button[type="submit"]:hover,
.auth-form-card .btn--primary:hover {
  opacity: 0.92;
}

.auth-form-card button[type="submit"]:active,
.auth-form-card .btn--primary:active {
  transform: scale(0.99);
}

/* ── Footer links ──────────────────────────────── */
.auth-form-card__footer {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-6);
}

.auth-form-card__footer a {
  color: var(--text-link);
}

.auth-form-card__forgot {
  display: block;
  text-align: right;
  font-size: var(--text-xs);
  color: var(--text-link);
  margin-top: -10px;
  margin-bottom: var(--space-5);
}

.auth-form-card__forgot:hover {
  color: var(--text-link-hover);
}

/* ── Error box ──────────────────────────────────── */
.checkout-errors {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.checkout-errors__msg {
  font-size: var(--text-sm);
  color: var(--status-cancelled);
}

/* ── Mobile (≤768px) ───────────────────────────── */
@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
    overflow-y: auto;
  }

  .auth-brand {
    flex: 0 0 auto;
    min-height: 220px;
    padding: var(--space-6);
    width: 100%;
  }

  .auth-brand__content img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
  }

  .auth-brand-name {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .auth-brand__tagline {
    font-size: var(--text-xs);
    max-width: 260px;
  }

  .auth-orb--1, .auth-orb--4 { display: none; }
  .auth-orb--2 { width: 80px; height: 80px; top: 10%; right: 10%; bottom: auto; opacity: 0.25; }
  .auth-orb--3 { width: 60px; height: 60px; top: 50%; left: 80%; opacity: 0.25; }

  .auth-form-panel {
    width: 100%;
    flex: 1;
    padding: var(--space-6);
    min-height: auto;
    align-items: flex-start;
    padding-top: var(--space-8);
  }

  .auth-form-card .card {
    padding: var(--space-6);
  }
}
