/* ============================================================
   AUTH PAGES (Login / Signup / Forgot Password)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  padding-top: 80px;
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(2, 5, 51, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 0;
}

.auth-page::after {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(4, 6, 52, 0.18) 0%, rgba(4, 6, 52, 0.08) 35%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: authGlow 4s ease-in-out infinite alternate;
}

@keyframes authGlow {
  from { opacity: 0.7; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* Back to home utility button */
.auth-back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-back-btn:hover {
  color: var(--text-primary);
  background: #ffffff;
  border-color: rgba(2, 5, 51, 0.25);
  box-shadow: 0 4px 12px rgba(2, 5, 51, 0.08);
}

.auth-back-btn svg {
  transition: transform 0.2s ease;
}

.auth-back-btn:hover svg {
  transform: translateX(-3px);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease;
}

.auth-logo {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 20px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.auth-logo img {
  height: 220px;
  max-height: none;
  max-width: none;
  width: auto;
  margin-top: -90px;
  margin-bottom: -90px;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-logo:hover img {
  opacity: 0.85;
  transform: scale(1.02);
}

/* ===== SecureStack Logo Component ===== */

.securestack-logo__mark {
  height: 32px;      /* controls overall logo size */
  width: auto;
  flex-shrink: 0;
  display: block;
}

.securestack-logo__text {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;       /* ~24px, matches text-2xl */
  letter-spacing: -0.02em; /* tracking-tight */
  text-transform: lowercase;
}

/* Small variant, e.g. for a sidebar/nav */
.securestack-logo--sm .securestack-logo__mark { height: 20px; }
.securestack-logo--sm .securestack-logo__text { font-size: 1rem; font-weight: 400; }

.auth-card .card {
  padding: var(--space-2xl);
}

.auth-card h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-form .btn-primary {
  margin-top: var(--space-sm);
}

.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-extras a {
  font-size: 0.82rem;
  color: var(--brand-green);
}

.auth-social-buttons {
  display: flex;
  gap: var(--space-md);
}

.auth-social-buttons .btn-social {
  flex: 1;
}

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

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

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

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

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

/* Success State (Forgot Password) */
.auth-success {
  text-align: center;
  padding: var(--space-2xl);
  animation: fadeIn 0.5s ease;
}

.auth-success-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--brand-green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: var(--brand-green);
}

.auth-success h3 {
  margin-bottom: var(--space-sm);
}

.auth-success p {
  font-size: 0.88rem;
  margin-bottom: var(--space-xl);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-page {
    padding: var(--space-md);
    padding-top: 70px;
  }
  .auth-back-btn {
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .auth-card .card {
    padding: var(--space-lg);
  }
  .auth-social-buttons {
    flex-direction: column;
  }
}

/* ============================================================
   DARK MODE AUTH OVERRIDES
   ============================================================ */

[data-theme="dark"] .auth-page {
  background: var(--bg-dark);
}

[data-theme="dark"] .auth-back-btn {
  background: rgba(17, 23, 38, 0.85);
  border-color: var(--border);
  color: var(--text-primary);
}

[data-theme="dark"] .auth-back-btn:hover {
  background: #1A2337;
  border-color: #38BDF8;
}

[data-theme="dark"] .auth-card .card {
  background: #111726;
  border-color: #1E293B;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .btn-social {
  background: #151C2C;
  border-color: #26334D;
  color: #F8FAFC;
}

[data-theme="dark"] .btn-social:hover {
  background: #1A2337;
  border-color: #38BDF8;
}

[data-theme="dark"] .divider::before,
[data-theme="dark"] .divider::after {
  background: #26334D;
}
