/* ==========================================================================
   RMC AUTH PAGES — Login, Verification, Forgot/Reset Password
   ========================================================================== */

/* Ensure [hidden] works even when Flexbox is on the parent */
[hidden] { display: none !important; }

.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--rmc-bg);
}

/* ── Left Panel (Branding) ──────────────────────────────────────────────── */

.auth-branding {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 46%;
  min-height: 100vh;
  padding: var(--space-10);
  background: linear-gradient(160deg, #0f1c3f 0%, #0a1628 55%, #0d2240 100%);
  position: relative;
  overflow: hidden;
}

/* Large ambient glow top-right */
.auth-branding::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,132,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Bottom-left accent glow */
.auth-branding::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.auth-branding > * { position: relative; z-index: 1; }

/* Decorative blobs */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.auth-blob-1 {
  width: 260px; height: 260px;
  top: 18%; right: -70px;
  background: rgba(56,132,255,0.08);
  border: 1px solid rgba(56,132,255,0.12);
}
.auth-blob-2 {
  width: 160px; height: 160px;
  top: 42%; right: 40px;
  background: rgba(56,132,255,0.05);
  border: 1px solid rgba(56,132,255,0.08);
}
.auth-blob-3 {
  width: 200px; height: 200px;
  bottom: 14%; left: -50px;
  background: rgba(20,184,166,0.07);
  border: 1px solid rgba(20,184,166,0.1);
}

/* Dot grid pattern */
.auth-dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 30%, rgba(0,0,0,0.6) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 30%, rgba(0,0,0,0.6) 70%, transparent 100%);
}

/* Logo */
.auth-branding-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}

.auth-branding-logo img {
  height: 40px;
  width: auto;
}

.auth-branding-logo span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-md);
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
}

/* Main content block */
.auth-branding-content {
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.auth-branding-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #60a5fa;
  background: rgba(56,132,255,0.12);
  border: 1px solid rgba(56,132,255,0.2);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: var(--space-5);
}

.auth-branding-content h1 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin-bottom: var(--space-5);
  letter-spacing: -0.03em;
}

.auth-branding-content p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.75;
  margin-bottom: var(--space-7);
}

/* Feature list */
.auth-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.auth-feature-list li i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56,132,255,0.12);
  border: 1px solid rgba(56,132,255,0.18);
  border-radius: var(--radius-md);
  color: #60a5fa;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

/* Footer */
.auth-branding-footer {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.22);
  position: relative;
  z-index: 1;
}


/* ── Right Panel (Form) ─────────────────────────────────────────────────── */

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

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

.auth-logo-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-8);
}

.auth-logo-mobile img {
  height: 48px;
  width: auto;
}

.auth-card {
  background: var(--rmc-surface);
  border: 1px solid var(--rmc-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-8);
  animation: slideUp var(--duration-slow) var(--ease-out);
}

.auth-card-header {
  margin-bottom: var(--space-6);
}

.auth-card-header h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--rmc-text);
  margin-bottom: var(--space-2);
}

.auth-card-header p {
  font-size: var(--text-sm);
  color: var(--rmc-text-secondary);
  margin: 0;
}

/* Auth form inputs — slightly larger for login context */
.auth-card .form-group { margin-bottom: var(--space-5); }

.auth-card .form-control {
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.auth-card .input-group .form-control {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.auth-card .input-group-append {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  min-width: 46px;
  justify-content: center;
}

/* Auth actions row */
.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.auth-actions a {
  font-size: var(--text-sm);
  color: var(--rmc-primary);
  font-weight: 500;
}

.auth-actions a:hover {
  color: var(--rmc-primary-hover);
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-md);
  font-weight: 600;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.auth-submit-btn .spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: auth-spin 0.65s linear infinite;
}

@keyframes auth-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Auth alerts */
.auth-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}

.auth-alert-error {
  background: var(--rmc-danger-light);
  color: var(--rmc-danger);
  border: 1px solid #FECACA;
}

.auth-alert-success {
  background: var(--rmc-success-light);
  color: var(--rmc-success);
  border: 1px solid #A7F3D0;
}

.auth-alert-info {
  background: var(--rmc-info-light);
  color: var(--rmc-info);
  border: 1px solid #BAE6FD;
}

.auth-alert i { flex-shrink: 0; font-size: var(--text-md); }

/* Loading state for auth button */
.auth-card .btn-loading {
  color: transparent !important;
  pointer-events: none;
}

.auth-card .btn-loading .spinner {
  display: block;
}

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

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

/* OTP / Verification specific */
.otp-info {
  text-align: center;
  margin-bottom: var(--space-5);
}

.otp-info .countdown {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--rmc-text-muted);
  margin-top: var(--space-2);
}

.otp-info .countdown.expired { color: var(--rmc-danger); }

.otp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  letter-spacing: 0.3em;
  font-weight: 600;
}

/* Back link */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--rmc-text-secondary);
  margin-bottom: var(--space-5);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color var(--duration-fast);
}

.auth-back:hover { color: var(--rmc-primary); }


/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (min-width: 1024px) {
  .auth-branding { display: flex; }
  .auth-logo-mobile { display: none; }
}

@media (max-width: 640px) {
  .auth-form-panel { padding: var(--space-5); }
  .auth-card { padding: var(--space-6); border-radius: var(--radius-lg); }
}
