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

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

.auth-panel {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: '';
  position: absolute;
  width: 580px; height: 580px;
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, rgba(168,85,247,.08) 45%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(40px);
}

.auth-brand {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  text-decoration: none;
}

.auth-brand-icon {
  width: 56px; height: 56px;
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-glow);
}

.auth-brand-name {
  font-size: var(--text-3xl);
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tagline {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-md);
  max-width: 360px;
  line-height: 1.4;
}

.auth-subtagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  width: 100%;
  max-width: 360px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 13px 16px;
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  animation: fadeIn .5s ease forwards;
  opacity: 0;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.auth-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.12);
}

.auth-feature:nth-child(1) { animation-delay: .1s; }
.auth-feature:nth-child(2) { animation-delay: .2s; }
.auth-feature:nth-child(3) { animation-delay: .3s; }

.auth-feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.auth-feature-title { font-weight: 700; margin-bottom: 2px; font-size: var(--text-sm); }
.auth-feature-desc  { color: var(--text-muted); font-size: var(--text-xs); line-height: 1.4; }

/* Role Selector Button Tabs */
.role-btn {
  border: 1.5px solid var(--border) !important;
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
}

.role-btn:hover {
  background: var(--bg-hover) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  color: var(--text-primary) !important;
}

.role-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.22)) !important;
  border-color: #6366f1 !important;
  color: #818cf8 !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  font-weight: 800 !important;
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  overflow-y: auto;
}

.auth-form-box {
  width: 100%;
  max-width: 420px;
  animation: fadeIn .4s ease forwards;
}

/* Register page: keep both panels aligned from the same top offset across role changes. */
.auth-wrapper-register .auth-panel,
.auth-wrapper-register .auth-form-panel {
  justify-content: flex-start;
  padding-top: clamp(32px, 7vh, 84px);
}

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

.auth-form-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.auth-divider {
  display: flex; align-items: center; gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-panel   { display: none; }
  .auth-form-panel { min-height: 100vh; }
}

/* ---- Form Inputs & Groups ---- */
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font);
  transition: all var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder {
  color: var(--text-muted);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-group .form-input {
  padding-left: 38px;
}
.input-icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 10;
}

.password-wrap .form-input {
  padding-right: 38px;
}
.toggle-pass {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  z-index: 10;
}
.toggle-pass:hover {
  color: var(--text-primary);
}

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
  font-size: var(--text-sm);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-link {
  color: var(--primary-light);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.forgot-link:hover {
  color: var(--primary);
}

.auth-footer-text {
  margin-top: var(--space-xl);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.auth-footer-text a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-text a:hover {
  color: var(--primary);
}

.btn-full {
  width: 100% !important;
  justify-content: center;
}

/* ---- OTP Input Styling (2FA) ---- */
.otp-inputs {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.otp-input {
  width: 48px;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  outline: none;
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============================================================
   Light Mode Overrides for Login & Auth Pages
   ============================================================ */
[data-theme="light"] .auth-wrapper {
  background: #f8fafc !important;
}

[data-theme="light"] .auth-panel {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .auth-form-panel {
  background: #f8fafc !important;
}

[data-theme="light"] .auth-feature {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .auth-feature-title {
  color: #0f172a !important;
}

[data-theme="light"] .auth-feature-desc {
  color: #64748b !important;
}

[data-theme="light"] .auth-form-title {
  color: #0f172a !important;
}

[data-theme="light"] .auth-form-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .form-label {
  color: #1e293b !important;
  font-weight: 600 !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .otp-input {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .otp-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

[data-theme="light"] .auth-footer {
  color: #475569 !important;
}

[data-theme="light"] .auth-footer a {
  color: #0284c7 !important;
  font-weight: 700 !important;
}

