/* ============================================================
   Auth Pages — Login / Register / Forgot Password
   ============================================================ */

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Background decoration shapes */
.auth-body::before,
.auth-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.auth-body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366f1, transparent);
  top: -200px;
  right: -100px;
}

.auth-body::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  bottom: -100px;
  left: -100px;
}

/* ── Auth Layout (split screen on wide) ─────────────────────── */
.auth-container {
  display: flex;
  width: 100%;
  max-width: 960px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease forwards;
}

/* ── Left panel (branding) ───────────────────────────────────── */
.auth-brand-panel {
  flex: 1;
  background: linear-gradient(160deg, #6366f1 0%, #4f46e5 40%, #312e81 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  top: -80px;
  right: -80px;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  bottom: 40px;
  left: -60px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-logo-icon {
  width: 52px;
  height: 52px;
  background: transparent;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  backdrop-filter: none;
  border: none;
}

.brand-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-text {
  color: white;
}

.brand-logo-name {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.brand-logo-sub {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 3px;
}

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

.brand-headline {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
}

.brand-headline span {
  opacity: 0.7;
  font-weight: 400;
}

.brand-description {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 32px;
}

.brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
}

.brand-features li i {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  flex-shrink: 0;
}

.brand-stats {
  display: flex;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.brand-stat-item {
  text-align: center;
}

.brand-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.brand-stat-lbl {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

/* ── Right panel (form) ──────────────────────────────────────── */
.auth-form-panel {
  width: 380px;
  flex-shrink: 0;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-height: 90vh;
  overflow-y: auto;
}

.auth-form-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-form-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Form fields ─────────────────────────────────────────────── */
.auth-form .form-group { margin-bottom: 14px; }

.auth-form .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-form .form-control {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.9rem;
  background: #f8fafc;
  transition: all 0.2s;
}

.auth-form .form-control:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.auth-form .input-icon .form-control { padding-left: 42px; }

.auth-form .input-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

/* Password toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  font-size: 0.875rem;
  transition: color 0.2s;
  z-index: 2;
}

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

/* Auth submit button */
.auth-btn {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.auth-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.auth-btn:active { transform: translateY(0); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.auth-divider span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Links */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.78rem;
}

.auth-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

.auth-footer-text {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Role selector */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.role-option {
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
  text-align: center;
}

.role-option label i {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.role-option label span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.role-option label small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.role-option input:checked + label {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.role-option input:checked + label i,
.role-option input:checked + label span {
  color: var(--primary);
}

/* Alert messages */
.auth-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.auth-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.auth-alert.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-alert.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.auth-alert.info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Steps (register multi-step) */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.step-item {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.step-item.active .step-num { background: var(--primary); color: white; }
.step-item.done   .step-num { background: var(--success); color: white; }

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 6px;
  white-space: nowrap;
}

.step-item.active .step-label { color: var(--primary); font-weight: 600; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
}

.step-line.done { background: var(--success); }

/* Pending/Rejected pages */
.auth-status-page {
  text-align: center;
  padding: 48px 40px;
}

.auth-status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}

.auth-status-icon.pending  { background: #fef3c7; color: var(--warning); }
.auth-status-icon.rejected { background: #fee2e2; color: var(--danger); }
.auth-status-icon.success  { background: #d1fae5; color: var(--success); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-brand-panel { display: none; }
  .auth-form-panel  { width: 100%; padding: 40px 32px; }
  .auth-container   { max-width: 420px; }
}

@media (max-width: 480px) {
  .auth-form-panel { padding: 32px 24px; }
  .auth-body { padding: 16px; }
}
