/**
 * auth.css
 * Styles for authentication pages: login, register, reset-password.
 * These pages use a full-page centered layout, no sidebar.
 * Depends on: variables.css, base.css, components.css
 */

/* ── Auth page shell ─────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(197, 160, 89, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(138, 154, 91, 0.16) 0%, transparent 48%),
    linear-gradient(145deg, var(--color-bg), var(--color-bg-soft));
  position: relative;
}

/* Background decorative pattern */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(138,154,91,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(197,160,89,0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Auth theme toggle ───────────────────────────────────────────────────── */
.auth-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
}

/* ── Auth card ───────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--color-card);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  position: relative;
  z-index: 1;
}

/* ── Auth brand ──────────────────────────────────────────────────────────── */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: center;
}

.auth-brand-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.auth-brand-icon svg {
  width: 24px; height: 24px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.auth-brand-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  line-height: 1;
}

.auth-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* ── Auth form ───────────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.auth-form .form-label a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-primary);
}

.auth-form .form-label a:hover { color: var(--color-accent); }

.auth-form .btn-primary { margin-top: 6px; }

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

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── OAuth social buttons ────────────────────────────────────────────────── */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: var(--color-panel);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.social-btn:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-primary);
}
.social-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Auth page footer ────────────────────────────────────────────────────── */
.auth-page-footer {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  color: var(--color-text-light);
  text-align: center;
  z-index: 0;
}

/* ── Password strength indicator ─────────────────────────────────────────── */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 100px;
  background: var(--color-border-mid);
  transition: background var(--transition);
}
.strength-bar.weak   { background: var(--color-danger); }
.strength-bar.medium { background: var(--color-warning); }
.strength-bar.strong { background: var(--color-success); }

/* ── Terms checkbox ──────────────────────────────────────────────────────── */
.terms-check {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.terms-check a { color: var(--color-primary); font-weight: 500; }
.terms-check a:hover { color: var(--color-accent); }

/* ── Reset success state ─────────────────────────────────────────────────── */
.reset-success {
  text-align: center;
  padding: 16px 0;
}
.reset-success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-success-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.reset-success-icon svg { width: 26px; height: 26px; stroke: var(--color-success); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
