/* auth.css — auth and password-flow pages (Zodiac mode only) */

/* ── Page shell ──────────────────────────────────────────────────── */
.auth-shell {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 7rem 1.25rem 3rem;
  min-height: 80vh;
}
.auth-shell::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(128,99,255,.11) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Auth card ───────────────────────────────────────────────────── */
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 2.6rem 2.8rem;
  box-shadow: 0 32px 80px rgba(0,0,0,.5), 0 0 0 1px var(--line);
}
.auth-card--wide { max-width: 600px; }
@media (max-width: 520px) {
  .auth-card { padding: 2rem 1.4rem; }
}

/* ── Heading block ───────────────────────────────────────────────── */
.auth-eyebrow { margin-bottom: .85rem; }

.auth-title {
  font-family: 'Noto Serif', Georgia, serif;
  font-weight: 300; font-style: italic;
  font-size: 1.95rem; color: var(--text);
  margin: 0 0 .4rem;
  line-height: 1.15; letter-spacing: -.01em;
}
.auth-sub {
  font-family: 'Noto Serif', serif; font-style: italic;
  font-size: .95rem; color: var(--muted);
  margin: 0 0 2rem; line-height: 1.55;
}

/* ── Form label (overrides cosmic.css within .auth-card) ─────────── */
.auth-card .form-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .7rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .45rem;
  display: flex; align-items: center; gap: .35rem;
}
.auth-card .form-label .req {
  color: var(--accent);
  font-size: .65rem; letter-spacing: 0; line-height: 1;
}

/* Flex row for label + inline action (e.g. "Forgot?" beside Password) */
.form-label-row {
  display: flex; align-items: center;
  margin-bottom: .45rem;
}
.form-label-row .form-label { margin-bottom: 0; }

/* ── Input overrides inside .auth-card ──────────────────────────── */
.auth-card input[type=text],
.auth-card input[type=email],
.auth-card input[type=password] {
  display: block; width: 100%;
  height: 48px;
  border-radius: var(--r-md);
  padding: 0 1rem;
  background: var(--surface-low);
  border: 1px solid var(--line);
  font-family: 'Manrope', sans-serif;
  font-size: .94rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
}
.auth-card input[type=text]::placeholder,
.auth-card input[type=email]::placeholder,
.auth-card input[type=password]::placeholder { color: var(--muted); }
.auth-card input[type=text]:hover:not(:focus),
.auth-card input[type=email]:hover:not(:focus),
.auth-card input[type=password]:hover:not(:focus) { border-color: var(--line-strong); }
.auth-card input[type=text]:focus,
.auth-card input[type=email]:focus,
.auth-card input[type=password]:focus {
  border-color: var(--primary-deep);
  background: var(--surface-hi);
}
.auth-card input.is-error {
  border-color: rgba(255,119,153,.6) !important;
  box-shadow: 0 0 0 3px rgba(255,119,153,.12) !important;
}
.auth-card input:disabled {
  opacity: .4; cursor: not-allowed;
  background: var(--surface-low) !important;
  box-shadow: none !important;
  border-color: var(--line) !important;
}

/* ── Inline error message ────────────────────────────────────────── */
.form-error {
  margin-top: .4rem;
  font-size: .78rem; color: var(--rose);
  display: flex; align-items: center; gap: .35rem; line-height: 1.4;
}
.form-error::before {
  content: '✕';
  font-size: .6rem; font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0; line-height: 1;
}

/* ── Two-column row ──────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 460px) { .form-row { grid-template-columns: 1fr; } }

/* ── Section divider ─────────────────────────────────────────────── */
.form-divider {
  border: none; height: 1px;
  background: var(--line); margin: 1.6rem 0;
}

/* ── Submit button ───────────────────────────────────────────────── */
.form-submit {
  display: block; width: 100%;
  padding: 0; height: 52px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #1a0f40;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  border: none; cursor: pointer;
  margin-top: 2rem;
  transition: opacity .2s, box-shadow .2s;
  box-shadow: 0 8px 24px rgba(128,99,255,.28);
  text-align: center; text-decoration: none;
  line-height: 52px;
}
.form-submit:hover {
  opacity: .9;
  box-shadow: 0 12px 36px rgba(128,99,255,.45);
  color: #1a0f40;
  text-decoration: none;
}
.form-submit:active { opacity: .8; }

.form-submit--ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--primary);
  box-shadow: none;
}
.form-submit--ghost:hover {
  background: rgba(128,99,255,.1);
  border-color: var(--primary);
  box-shadow: none;
  color: var(--primary);
  opacity: 1;
}

/* ── Secondary action link ───────────────────────────────────────── */
.form-alt {
  margin-top: 1.4rem; text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: .88rem; color: var(--muted);
}
.form-alt a {
  color: var(--primary); text-decoration: none;
  font-weight: 500; transition: color .2s;
}
.form-alt a:hover { color: var(--accent); }

/* ── Inline field-level action (e.g. "Forgot?") ─────────────────── */
.field-action {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-left: auto; flex-shrink: 0;
  transition: color .2s;
}
.field-action:hover { color: var(--accent); text-decoration: none; }

/* ── Custom checkbox ─────────────────────────────────────────────── */
.checkbox-group {
  display: flex; align-items: flex-start; gap: .7rem;
  cursor: pointer; user-select: none;
}
.checkbox-group input[type=checkbox] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.checkbox-box {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.checkbox-box::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #1a0f40;
  border-bottom: 2px solid #1a0f40;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0; transition: opacity .15s;
}
.checkbox-group input:checked ~ .checkbox-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  border-color: transparent;
  box-shadow: 0 0 12px rgba(128,99,255,.35);
}
.checkbox-group input:checked ~ .checkbox-box::after { opacity: 1; }
.checkbox-label {
  font-family: 'Manrope', sans-serif;
  font-size: .88rem; color: var(--muted); line-height: 1.4;
}

/* ── Success / confirmation state ────────────────────────────────── */
.success-glyph {
  font-size: 3rem; color: var(--accent);
  text-align: center;
  margin: 1rem 0 1.5rem;
  text-shadow: 0 0 28px rgba(201,168,76,.4);
  display: block;
}
.success-note {
  font-family: 'Noto Serif', serif; font-style: italic;
  font-size: .88rem; color: var(--muted);
  line-height: 1.6; text-align: center;
  margin: 0 0 .5rem;
}
.success-note b { font-style: normal; color: var(--text); font-weight: 500; }

/* Sent-state detail text (forgot password + verification) */
.sent-detail {
  font-family: 'Manrope', sans-serif;
  font-size: .84rem; color: var(--muted);
  line-height: 1.65; margin: 0 0 .35rem;
  text-align: center;
}
.sent-detail b { color: var(--text); font-weight: 500; }
.sent-email {
  display: block; text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: .82rem; color: var(--primary);
  letter-spacing: .04em; margin-bottom: 1.75rem;
  word-break: break-all;
}
.sent-divider {
  border: none; height: 1px;
  background: var(--line);
  margin: 1.75rem 0 1.5rem;
}

/* ── Password strength bar ───────────────────────────────────────── */
.pw-strength {
  display: flex; gap: .3rem; margin-top: .5rem;
}
.pw-strength__seg {
  flex: 1; height: 3px; border-radius: 99px;
  background: var(--line);
  transition: background .3s;
}
.pw-strength__seg.on-1 { background: var(--rose); }
.pw-strength__seg.on-2 { background: var(--accent); }
.pw-strength__seg.on-3 { background: var(--accent-2); }
.pw-strength__seg.on-4 { background: var(--cyan); }
.pw-strength-label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; letter-spacing: .06em;
  color: var(--muted); margin-top: .3rem; min-height: 1em;
}

/* ── OAuth divider + buttons ─────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.4rem 0;
  color: var(--muted-2); font-size: .78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1;
  border-top: 1px solid var(--line);
}
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: .65rem 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: transparent; color: var(--text);
  font-family: 'Space Grotesk', sans-serif; font-size: .88rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: .6rem;
}
.btn-oauth:hover { border-color: var(--accent); background: var(--surface-low); }

/* ── Terms / Privacy consent (signup) ──────────────────────────────── */
.form-consent { margin-bottom: 1.1rem; }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted-2);
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  margin-top: .15rem;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.consent-label a { color: var(--primary); text-decoration: underline; }
