/* ==========================================================================
   Oikos · Glowing Horizon · auth pages
   Self-contained stylesheet for login, signup, forgot-password,
   reset-password and verify-email. Served as-is, no build step.
   ========================================================================== */

:root {
  color-scheme: light;
  --navy: #14335c;
  --navy-deep: #0d2544;
  --orange: #ffa62b;
  --orange-hover: #c76708;
  --ink: #22395a;
  --text: #5b6b80;
  --muted: #909cb0;
  --hero-sub: #f6d9a8;
  --paper: #ffffff;
  --bone: #fbf4e6;
  --bone-2: #fefaf1;
  --card-border: #ecdfc9;
  --card-border-cool: #dde8f4;
  --green: #43c69a;
  --green-tint: #e0f4ec;
  --blue: #2f6fae;
  --blue-tint: #dbeafc;
  --sh-card: 0 12px 40px rgba(20, 51, 92, 0.1);
  --sh-big: 0 24px 70px rgba(20, 51, 92, 0.16);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; box-sizing: border-box; }

/* Keep [hidden] winning even over explicit display rules (e.g. .au-submit). */
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-hover); text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 166, 43, 0.55);
  outline-offset: 2px;
}

/* ============ stage ============ */
.au-stage {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 56px 24px 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

/* The glow: two flat circles, solid orange inside a translucent ring. */
.au-horizon,
.au-halo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
}
.au-halo { width: 1700px; height: 1700px; bottom: -1560px; background: rgba(255, 166, 43, 0.16); }
.au-horizon { width: 1500px; height: 1500px; bottom: -1420px; background: var(--orange); }

.au-bub {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .au-bub { animation: none; }
  .au-submit { transition: none; }
}

/* ============ brand ============ */
.au-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}
.au-brand img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.au-brand small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-sub);
}

/* ============ step pill ============ */
.au-steplab {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-sub);
  background: var(--navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 12px;
}

/* ============ card ============ */
.au-card {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-radius: 26px;
  box-shadow: var(--sh-big);
  padding: 32px 30px 28px;
  width: 400px;
  max-width: 100%;
  text-align: left;
  flex-shrink: 0;
}
.au-center { text-align: center; }

.au-title {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
  text-wrap: balance;
}
.au-sub { font-size: 14.5px; color: var(--text); margin-bottom: 20px; }
.au-sub strong, .au-sub b { color: var(--ink); font-weight: 700; }

/* ============ fields ============ */
.au-field { margin-bottom: 15px; }
.au-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.au-input {
  width: 100%;
  background: var(--bone-2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
}
.au-input::placeholder { color: var(--muted); opacity: 1; }
.au-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 166, 43, 0.22);
}

/* ============ submit ============ */
.au-submit {
  display: block;
  width: 100%;
  background: var(--orange);
  color: #1c2f4e;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15.5px;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 14px;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 10px 26px rgba(255, 166, 43, 0.35);
  transition: background 0.18s, transform 0.18s var(--ease);
}
.au-submit:hover { background: var(--orange-hover); transform: translateY(-1px); }
.au-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ============ secondary lines ============ */
.au-alt { font-size: 13.5px; color: var(--text); text-align: center; margin-top: 15px; }
.au-alt a { color: var(--orange-hover); font-weight: 700; }
/* Quiet text action (e.g. resend link under the login error). */
.au-alt--quiet { text-align: left; font-size: 12.5px; margin: 0 0 12px; }
.au-alt--quiet a { font-weight: 700; }

.au-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; }

/* ============ password requirements ============ */
.pw-reqs {
  list-style: none;
  padding: 0;
  margin: 9px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pw-reqs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.pw-reqs li.met { color: #1d7a5c; }
.pw-req-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px dashed #ffcf8a;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.pw-reqs li.met .pw-req-icon {
  border: none;
  background: var(--green);
  color: #0d3a2b;
}
.pw-reqs li.met .pw-req-icon::before { content: "\2713"; }

/* ============ terms checkbox ============ */
.auth-terms {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
  margin: 4px 0 16px;
  cursor: pointer;
}
.auth-terms a { color: var(--orange-hover); font-weight: 700; }
.auth-terms input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--card-border);
  background: var(--bone-2);
  flex-shrink: 0;
  margin: 2px 0 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-terms input[type="checkbox"]:checked {
  background-color: var(--orange);
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2f4e' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

/* ============ error / notice ============ */
.auth-error {
  background: var(--bone-2);
  border: 1px solid rgba(255, 166, 43, 0.55);
  color: var(--orange-hover);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
}

/* ============ status icons (verify / success) ============ */
.au-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 4px auto 16px;
}
.au-icon--blue { background: var(--blue-tint); color: var(--blue); }
.au-icon--green { background: var(--green); color: #0d3a2b; font-size: 24px; font-weight: 800; }
.au-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ plan picker (signup step 3) ============ */
.plan-list { margin-bottom: 4px; }
.plan-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 13px 16px;
  margin-bottom: 10px;
  position: relative;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color 0.15s;
}
.plan-opt:hover { border-color: var(--orange); }
.plan-opt:disabled { opacity: 0.6; cursor: default; }
.plan-opt--popular {
  border-color: var(--orange);
  border-width: 2px;
  background: #fffaf0;
  /* Compensate the thicker border so rows align. */
  padding: 12.5px 15.5px;
}
.au-radio {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid #d5ddea;
  flex-shrink: 0;
}
.plan-opt--popular .au-radio {
  border-color: var(--orange);
  background: radial-gradient(circle, var(--orange) 45%, transparent 50%);
}
.au-poppill {
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--orange);
  color: #1c2f4e;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
}
.plan-opt-main { min-width: 0; }
.plan-opt-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16.5px;
  color: var(--ink);
  line-height: 1.2;
}
.plan-opt-tokens { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.plan-opt-price { margin-left: auto; text-align: right; flex-shrink: 0; }
.plan-opt-price b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.plan-opt-price small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }

/* ============ responsive ============ */
@media (max-width: 480px) {
  .au-stage { padding: 40px 16px 110px; }
  .au-card { width: 100%; padding: 26px 20px 24px; }
}
