/* ==========================================================================
   SoulSpeak Circle — Auth pages
   (extends css/style.css design system)
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 26px;
  padding: 48px 20px 40px;
  position: relative;
  overflow: hidden;
}
.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 12%, rgba(201, 164, 92, .14), transparent 42%),
    radial-gradient(circle at 8% 88%, rgba(48, 88, 88, .12), transparent 45%);
}

.auth-wrap { width: min(460px, 100%); position: relative; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 26px; }

/* Auth pages don't load main.js (which drives .reveal), so keep content visible */
.js .reveal { opacity: 1; transform: none; }

.auth-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 40px 38px 34px;
}

.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.auth-head p { font-size: .95rem; color: var(--muted); }

/* Alert */
.auth-alert {
  display: none;
  font-size: .88rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.auth-alert.show { display: block; opacity: 1; transform: none; }
.auth-alert.error { background: #FBEAE7; border-color: rgba(192, 57, 43, .3); color: #A93226; }
.auth-alert.success { background: var(--primary-tint); border-color: rgba(48, 88, 88, .3); color: var(--primary-dark); }

/* Form */
.auth-form .field { margin-bottom: 16px; }
.auth-form .btn { width: 100%; margin-top: 8px; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: .85rem;
  margin: -2px 0 4px;
}
.auth-row a { color: var(--primary); font-weight: 700; }
.auth-row a:hover { color: var(--accent-dark); }
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
}
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Divider + Google */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  margin: 24px 0 18px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.btn-google:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Switch / foot */
.auth-switch { text-align: center; margin-top: 24px; font-size: .92rem; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 700; }
.auth-switch a:hover { color: var(--accent-dark); }
.auth-foot { font-size: .8rem; color: var(--muted); text-align: center; }
.field-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* Success state */
.auth-success { text-align: center; padding: 12px 0 4px; }
.auth-success .success-ring {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  animation: pulse-mark 1.4s var(--ease) 2;
}
.auth-success .success-ring svg { width: 34px; height: 34px; }
.auth-success h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin-bottom: 10px; }
.auth-success p { color: var(--muted); font-size: .95rem; max-width: 340px; margin: 0 auto 26px; }

/* Loading state on buttons */
.btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after {
  content: "";
  width: 15px; height: 15px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-google.loading { opacity: .7; pointer-events: none; }

/* Reset password states */
.reset-checking {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 30px 0;
  color: var(--muted);
  font-size: .92rem;
}
.reset-checking .spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--primary-tint);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* Responsive */
@media (max-width: 520px) {
  .auth-card { padding: 32px 24px 28px; }
}