/* ============================================================
   RD Vendora - Auth Pages (Login, Register, Forgot Password)
   ============================================================ */

.auth-page .auth-layout {
  min-height: calc(100vh - 72px);
  margin-top: 72px;
  display: flex;
}

/* ---- Auth Left Side (Visual) ---- */
.auth-visual {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-8) var(--space-12);
  overflow: hidden;
  background: var(--gradient-primary);
}

.auth-visual-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-visual-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -200px;
  left: -200px;
}

.auth-visual-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  bottom: -100px;
  right: -100px;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
}

.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: white;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.auth-visual-brand .rdv-brand-logo,
.rdv-brand-logo--auth {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-visual-brand-icon {
  width: 40px;
  height: 40px;
  background: #fff;
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-visual-body {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.auth-visual-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: white;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.auth-visual-text {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.auth-visual-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-visual-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255,255,255,0.9);
  font-size: var(--text-sm);
}

.auth-visual-feature svg {
  width: 20px;
  height: 20px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.auth-visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
}

.auth-visual-social {
  display: flex;
  gap: var(--space-4);
}

.auth-visual-social a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: white;
  transition: background var(--transition-fast);
}

.auth-visual-social a:hover {
  background: rgba(255,255,255,0.2);
}

/* ---- Auth Right Side (Form) ---- */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--bg-primary);
}

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

.auth-form-header {
  margin-bottom: var(--space-8);
}

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

.auth-form-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

/* ---- Social Login ---- */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.btn-social:hover {
  background: var(--bg-hover);
  border-color: var(--border-secondary);
}

.btn-social svg {
  width: 18px;
  height: 18px;
}

/* ---- Auth Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-primary);
}

/* ---- Password Input with Toggle ---- */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--text-primary);
}

/* ---- Remember Me & Forgot Password ---- */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.auth-forgot-link {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: var(--font-medium);
  transition: color var(--transition-fast);
}

.auth-forgot-link:hover {
  color: var(--primary-hover);
}

/* ---- Auth Footer ---- */
.auth-footer {
  text-align: center;
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: var(--font-medium);
}

.auth-footer a:hover {
  color: var(--primary-hover);
}

/* ---- Password Strength ---- */
.password-strength {
  margin-top: var(--space-2);
}

.strength-bar {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}

.strength-segment {
  flex: 1;
  height: 4px;
  background: var(--border-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.strength-segment.weak { background: var(--error); }
.strength-segment.fair { background: var(--warning); }
.strength-segment.good { background: var(--info); }
.strength-segment.strong { background: var(--success); }

.strength-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- Auth Success State ---- */
.auth-success {
  text-align: center;
  padding: var(--space-8) 0;
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--success-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.auth-success-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
}

.auth-success-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.btn-google {
  background: #fff;
  border: 1px solid var(--border-primary);
  color: #1f2937;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
}
.btn-google:hover {
  background: #f3f4f6;
}
.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.auth-alert.error { background: var(--error-light); border: 1px solid var(--error); color: var(--error-dark, #b91c1c); }
.auth-alert.success { background: var(--success-light); border: 1px solid var(--success); color: var(--success-dark); }

.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 3.5rem;
  opacity: 0.45;
}
.auth-step.is-active,
.auth-step.is-done {
  opacity: 1;
}
.auth-step-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--border-primary);
  color: var(--text-secondary);
  background: #fff;
}
.auth-step.is-active .auth-step-num {
  border-color: #071530;
  background: #071530;
  color: #d4af37;
}
.auth-step.is-done .auth-step-num {
  border-color: #d4af37;
  background: #071530;
  color: #fff;
}
.auth-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-step-line {
  flex: 1;
  max-width: 2.5rem;
  height: 2px;
  background: var(--border-primary);
  margin-bottom: 1.1rem;
}
.auth-step-line.is-done {
  background: #d4af37;
}
.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.auth-code-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
}
.auth-inline-form {
  margin-top: 0.75rem;
}
.auth-text-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: #071530;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.auth-text-btn:hover {
  color: #d4af37;
}
.auth-verified-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: var(--success-light);
  border: 1px solid var(--success);
  color: var(--success-dark);
  font-size: 0.875rem;
  font-weight: 500;
}
.auth-verified-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--success);
  flex-shrink: 0;
}
.auth-verified-change {
  margin: 0 0 0 auto;
}

.auth-page img.rdv-brand-logo {
  width: auto;
  height: 28px;
  max-width: 100px;
  object-fit: contain;
}
.auth-page .auth-visual-brand img.rdv-brand-logo {
  height: 36px;
  max-width: 120px;
}
.auth-page .footer-logo img.rdv-brand-logo {
  height: 32px;
  max-width: 120px;
}
.auth-page .auth-form-side {
  min-width: 0;
}
.auth-page .auth-form-container {
  width: 100%;
  max-width: 420px;
}
.auth-page .form-input,
.auth-page .btn.w-full,
.auth-page .btn-google {
  max-width: 100%;
  box-sizing: border-box;
}

/* ---- Responsive Auth ---- */
@media (max-width: 1024px) {
  .auth-visual {
    display: none;
  }
  
  .auth-form-side {
    padding: var(--space-6);
  }
}

@media (max-width: 767px) {
  .auth-page .auth-layout {
    margin-top: 64px;
    min-height: calc(100vh - 64px);
  }
  .auth-page .auth-form-side {
    padding: 1.25rem 1rem 2rem;
    align-items: flex-start;
  }
  .auth-page .auth-form-title { font-size: 1.35rem; }
  .auth-page .auth-options {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
