/* auth.css — shared stylesheet for the consumer auth pages
 * (/signup /signin /forgot-password /reset-password /verify-email).
 *
 * Brand: the LANDING palette (client/landing.css) — these pages front the
 * public funnel, not the app shell. Light-only, like the landing page.
 * Served from /css/ so it rides the existing auth-gate asset exemption.
 */

:root {
  --navy: #061426;
  --teal: #006d70;
  --teal-dark: #00464b;
  --teal-soft: #e5f4f3;
  --ink: #071827;
  --muted: #5f7077;
  --line: #d9e3e4;
  --paper: #f8faf9;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --ok: #1e6b40;
  --ok-soft: #e7f4ec;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.auth-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  margin-bottom: 22px;
}
.auth-brand:hover { color: var(--teal-dark); }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 32px 28px;
  box-shadow: 0 10px 30px rgba(6, 20, 38, 0.06);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.auth-sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.auth-field { margin: 0 0 14px; }

.auth-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.auth-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.auth-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.auth-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.auth-check input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--teal);
}
.auth-check a { color: var(--teal-dark); font-weight: 600; }

.auth-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.auth-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.auth-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.auth-btn-secondary {
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.auth-btn-secondary:hover { background: #d5ebe9; }

/* Error / success panels (hidden until auth.js fills them). */
.auth-alert {
  display: none;
  margin: 0 0 16px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 8px;
}
.auth-alert.is-error   { display: block; background: var(--danger-soft); color: var(--danger); }
.auth-alert.is-success { display: block; background: var(--ok-soft); color: var(--ok); }
.auth-alert a { color: inherit; font-weight: 600; }

/* Post-submit swap state ("check your email", "verified", …). */
.auth-done { display: none; text-align: center; padding: 6px 0 2px; }
.auth-done.is-visible { display: block; }
.auth-done .auth-done-icon {
  width: 46px; height: 46px;
  margin: 2px auto 14px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 46px;
}
.auth-done h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--ink); }
.auth-done p  { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.auth-links {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.auth-links a { color: var(--teal); font-weight: 600; text-decoration: none; }
.auth-links a:hover { color: var(--teal-dark); text-decoration: underline; }

.auth-foot {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
}
.auth-foot a { color: inherit; }
/* A stuck user (verification not arriving, can't sign in) has no other route to
   a human from these pages — keep the link quiet but always present. */
.auth-foot-sep { opacity: .45; margin: 0 2px; }

/* Inline button styled as a link (e.g. "Resend the email" inside an alert). */
.auth-linklike {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Busy spinner on the submit button. */
.auth-btn.is-busy { position: relative; color: transparent; }
.auth-btn.is-busy::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 460px) {
  .auth-card { padding: 24px 20px 22px; }
}

/* ── Social login ─────────────────────────────────────────────────────────── */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 2px;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.auth-social-logo { flex: 0 0 auto; display: block; }
/* Slot for the official GIS-rendered Google button (shown only when GIS renders). */
.gis-slot { display: flex; justify-content: center; min-height: 40px; }
.gis-slot[hidden] { display: none; }
/* Google — official light button: unaltered 4-color "G" on a white background,
   #747775 border, #1F1F1F text (developers.google.com/identity/branding-guidelines). */
.auth-btn-google { background: #fff; border-color: #747775; color: #1f1f1f; }
.auth-btn-google:hover { background: #f7f9fa; box-shadow: 0 1px 3px rgba(6, 20, 38, .1); }
/* X — official black button, white logo + "Sign in with X" text (X Brand Toolkit). */
.auth-btn-x { background: #000; border-color: #000; color: #fff; }
.auth-btn-x:hover { background: #1a1a1a; }
.auth-social-pitch {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
}
.auth-social-note {
  margin: 10px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.auth-social-note a { color: var(--teal); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
