/* ============================================================
   DocuAPI — Auth Pages Stylesheet (Login / Register / Forgot)
   ============================================================ */

/* ── Auth Page Layout ────────────────────────────────────────── */
.auth-page body,
body.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #f0f9ff 0%, #e8f4f8 40%, #f0fdf9 100%);
}

/* Hide the site navbar footer for auth pages — use the auth layout instead */
.auth-page .site-footer { display: none; }
.auth-page .navbar { position: relative; }

.auth-main {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  position: relative;
  overflow: hidden;
}

/* ── Auth Card ───────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10) var(--space-10);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  animation: fadeInUp .4s ease forwards;
}

.auth-card-wide { max-width: 600px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Auth Logo ───────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.auth-brand {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
}
.auth-brand strong { color: var(--color-primary); }

/* ── Auth Headings ───────────────────────────────────────────── */
.auth-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

/* ── Auth Form ───────────────────────────────────────────────── */
.auth-form { }

.auth-form .form-group:last-of-type { margin-bottom: var(--space-4); }

/* Override form-control padding for auth (with icon) */
.auth-form .form-control {
  padding-left: 2.75rem;
  height: 46px;
}

/* Submit button */
.auth-form .btn-full {
  margin-top: var(--space-2);
  height: 48px;
  font-size: var(--text-base);
}

/* ── Password Strength ───────────────────────────────────────── */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: calc(-1 * var(--space-3));
  margin-bottom: var(--space-4);
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition), background var(--transition);
  width: 0;
}

.strength-label {
  font-size: var(--text-xs);
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-light);
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── Switch link ─────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-6);
}
.auth-switch a {
  color: var(--color-accent);
  font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Success state ───────────────────────────────────────────── */
.auth-success-state { text-align: center; }

.success-icon {
  width: 80px; height: 80px;
  background: rgba(13,148,136,.1);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-6);
  font-size: 2rem;
  color: var(--color-accent);
}

.auth-success-state .auth-title { margin-bottom: var(--space-4); }
.auth-success-state .auth-subtitle { margin-bottom: var(--space-8); }
.auth-success-state .btn { margin: 0 auto; max-width: 280px; }

/* ── Decorative BG circles ───────────────────────────────────── */
.auth-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

.auth-bg-circle {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: .4;
}

.auth-bg-circle-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(13,148,136,.15) 0%, transparent 70%);
  top: -200px; right: -200px;
}

.auth-bg-circle-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(30,58,95,.1) 0%, transparent 70%);
  bottom: -150px; left: -150px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-card {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-xl);
  }
  .auth-card-wide { max-width: 100%; }
  .auth-title { font-size: var(--text-xl); }
  .form-row { grid-template-columns: 1fr; }
}
