/* ============================================================
   WorkPally — Auth Pages (Login, Register, Forgot Password)
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   Auth Shell
──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--bg-base);
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

/* Animated background */
.auth-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}
.auth-bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(240,121,90,0.18), transparent 70%);
  top: -150px; right: -100px;
  animation-delay: 0s;
}
.auth-bg-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(79,195,247,0.12), transparent 70%);
  bottom: -100px; left: -80px;
  animation-delay: 3s;
}
.auth-bg-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(182,156,247,0.1), transparent 70%);
  top: 40%; left: 30%;
  animation-delay: 5s;
}
.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 20px) scale(0.97); }
}

/* ────────────────────────────────────────────────────────────
   Auth Split Layout (left panel + right card)
──────────────────────────────────────────────────────────── */
.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Left brand panel */
.auth-brand-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-12) 5vw;
  position: relative;
  background: linear-gradient(145deg, rgba(240,121,90,0.06) 0%, transparent 60%);
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-12);
  text-decoration: none;
}
.auth-brand-logo img { width: 48px; height: 48px; object-fit: contain; }
.auth-brand-logo-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}
.auth-brand-logo-text span { color: var(--primary); }

.auth-brand-headline {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--sp-5);
  color: var(--text-primary);
}

.auth-brand-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 380px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}
.auth-feature:hover { background: rgba(240,121,90,0.07); border-color: rgba(240,121,90,0.2); transform: translateX(4px); }
.auth-feature-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  border: 1px solid rgba(240,121,90,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}
.auth-feature-text { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.auth-feature-sub  { font-size: 0.775rem; color: var(--text-muted); margin-top: 1px; }

/* Right card panel */
.auth-card-panel {
  width: 480px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-6);
  flex-shrink: 0;
}

.auth-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.auth-card-header { margin-bottom: var(--sp-8); text-align: center; }
.auth-card-title  { font-size: 1.7rem; font-weight: 800; margin-bottom: var(--sp-2); }
.auth-card-sub    { font-size: 0.875rem; color: var(--text-muted); }

.auth-submit { width: 100%; margin-top: var(--sp-6); padding: 14px; font-size: 0.95rem; }

.auth-footer {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-footer a { font-weight: 600; }

/* Social login */
.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}
.auth-social-btn:hover { border-color: rgba(255,255,255,0.2); background: var(--bg-elevated); color: var(--text-primary); transform: translateY(-2px); }
.auth-social-btn i { font-size: 1rem; }
.auth-social-btn .fa-google { color: #EA4335; }
.auth-social-btn .fa-microsoft { color: #00A4EF; }

/* ────────────────────────────────────────────────────────────
   Multi-Step Registration Form
──────────────────────────────────────────────────────────── */
.auth-page.register-page .auth-card { max-width: 560px; }
.auth-page.register-page .auth-card-panel { width: 600px; }

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-8);
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
}
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}
.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.step-dot.completed {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.step-connector {
  height: 2px;
  width: 60px;
  background: var(--border);
  transition: background var(--transition-base);
}
.step-connector.active { background: var(--primary); }
.step-connector.completed { background: var(--success); }

.step-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.step-dot.active   .step-label,
.step-dot.completed .step-label { color: var(--text-secondary); }

.step-indicator-wrap { margin-bottom: var(--sp-10); }

/* Step panels */
.step-panels { position: relative; overflow: hidden; }
.step-panel {
  display: none;
  animation: fadeInUp 0.4s ease both;
}
.step-panel.active { display: block; }

.step-nav {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.step-nav .btn { flex: 1; }

/* ────────────────────────────────────────────────────────────
   Account type selector
──────────────────────────────────────────────────────────── */
.account-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.account-type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  position: relative;
  background: var(--bg-surface);
}
.account-type-card:hover {
  border-color: rgba(240,121,90,0.4);
  background: var(--primary-subtle);
  transform: translateY(-3px);
}
.account-type-card.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.account-type-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
  color: var(--primary);
}
.account-type-name  { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: var(--sp-1); }
.account-type-desc  { font-size: 0.75rem; color: var(--text-muted); }
.account-type-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  display: none; align-items: center; justify-content: center;
}
.account-type-card.selected .account-type-check { display: flex; }

/* ────────────────────────────────────────────────────────────
   Password strength
──────────────────────────────────────────────────────────── */
.password-strength { margin-top: var(--sp-2); }
.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  transition: background var(--transition-base);
}
.strength-bar.weak    { background: var(--danger); }
.strength-bar.fair    { background: var(--warning); }
.strength-bar.good    { background: var(--info); }
.strength-bar.strong  { background: var(--success); }
.strength-label { font-size: 0.73rem; color: var(--text-muted); }

/* ────────────────────────────────────────────────────────────
   Forgot Password
──────────────────────────────────────────────────────────── */
.forgot-illustration {
  text-align: center;
  margin-bottom: var(--sp-6);
}
.forgot-icon-wrap {
  width: 80px; height: 80px;
  border-radius: var(--radius-xl);
  background: var(--primary-subtle);
  border: 2px solid rgba(240,121,90,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  margin: 0 auto var(--sp-4);
  animation: float 3s ease-in-out infinite;
}

/* Success state */
.auth-success-state {
  text-align: center;
  padding: var(--sp-6) 0;
  display: none;
}
.auth-success-state.show { display: block; animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.auth-success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  color: var(--success);
  margin: 0 auto var(--sp-5);
}

/* ────────────────────────────────────────────────────────────
   Responsive Auth
──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-brand-panel { display: none; }
  .auth-card-panel  { width: 100%; padding: var(--sp-6) var(--sp-4); }
  .auth-card        { padding: var(--sp-6); }
}
@media (max-width: 480px) {
  .account-type-grid { grid-template-columns: 1fr; }
  .step-connector    { width: 30px; }
  .auth-social       { grid-template-columns: 1fr; }
}
