/* ====================================================================
   Auth pages (login + create account) — slate-palette redesign.
   Shared by extensions/login/login_test.php and
   extensions/signup/signup_test.php. Built on the design tokens from
   extensions/index_new/styles.css (must be linked BEFORE this file so
   the --bg / --surface / --accent / --brand vars resolve).
   ==================================================================== */

/* Full-bleed cream stage that centers the card. The .mv-root base rule
   already paints var(--bg); this just owns the vertical centering and
   keeps the auth screen feeling focused between the site header/footer. */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
}

.auth-stack {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand lockup above the card */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-6);
}
.auth-brand .logo {
  width: 34px; height: 34px;
  background: var(--brand);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-fg);
}
.auth-brand .wordmark {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}

/* The card */
.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 38px 36px;
}

.auth-head {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.auth-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.mv-root .auth-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--text-1);
  margin: 0 0 8px;
}
.auth-title em { font-style: italic; font-weight: 500; color: var(--accent); }
.mv-root .auth-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 340px;
  margin: 0 auto;
}

/* Invite banner (signup) */
.auth-invite {
  background: linear-gradient(135deg, var(--accent-soft), transparent 75%), var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: var(--sp-6);
}
.mv-root .auth-invite-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 4px;
}
.mv-root .auth-invite-body { font-size: 13px; line-height: 1.5; color: var(--text-2); margin: 0; }
.auth-invite-decline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.mv-root .auth-invite-decline span {
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  transition: color .15s;
}
.mv-root .auth-invite-decline span:hover { color: var(--text-1); }

/* Fields */
.auth-field { margin-bottom: var(--sp-5); }
.auth-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.auth-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-1);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}
.auth-input::placeholder { color: var(--text-3); }
.auth-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Inline + top-level errors */
.mv-root .auth-error {
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
  margin: 6px 0 0;
}
.auth-alert {
  margin-bottom: var(--sp-5);
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  text-align: center;
}
.mv-root .auth-alert p { font-size: 13px; font-weight: 500; color: var(--danger); margin: 0; }

/* Primary submit — coral pill, full width. Extends .btn .btn-primary
   from styles.css; this just stretches it and centers the label. */
.auth-btn {
  width: 100%;
  justify-content: center;
  padding: 15px 22px;
  font-size: 15px;
  margin-top: var(--sp-2);
}
.auth-btn:hover { filter: brightness(1.04); }
.auth-btn .spin-animation { vertical-align: middle; margin-right: 8px; }

/* Footer links */
.auth-foot {
  text-align: center;
  margin-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mv-root .auth-foot a {
  font-size: 14px;
  color: var(--text-3);
  text-decoration: none;
  transition: color .15s;
}
.mv-root .auth-foot a:hover { color: var(--text-2); }
.auth-foot a .em { color: var(--accent); font-weight: 600; }

/* ====================================================================
   Status card — the transactional landing pages that report an outcome
   rather than collect input: auto_login, accept_friend, unsubscribe.
   Reuses .auth-card / .auth-title / .auth-sub / .auth-btn above; this
   block only adds the centered layout, the circular status glyph, and
   the optional avatar+badge lockup. Color variants tint ring + glyph.
   ==================================================================== */
.auth-card.is-status { text-align: center; }
.auth-card.is-status .auth-sub { margin-bottom: var(--sp-6); }

/* Circular status glyph above the heading */
.auth-icon {
  width: 66px; height: 66px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-5);
}
.auth-icon svg { width: 30px; height: 30px; }
.auth-icon.is-success { background: var(--success-soft); color: var(--success); }
.auth-icon.is-error   { background: color-mix(in oklab, var(--danger) 14%, var(--surface)); color: var(--danger); }
.auth-icon.is-warn    { background: var(--warning-soft); color: var(--warning); }
.auth-icon.is-info    { background: var(--accent-soft); color: var(--accent); }

/* Avatar lockup (accept_friend) — picture with a small corner badge */
.auth-avatar-wrap {
  position: relative;
  width: 78px; height: 78px;
  margin: 0 auto var(--sp-5);
}
.auth-avatar {
  width: 78px; height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-avatar-badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--surface);
}
.auth-avatar-badge svg { width: 15px; height: 15px; color: var(--brand-fg); }
.auth-avatar-badge.is-success { background: var(--success); }
.auth-avatar-badge.is-info    { background: var(--accent); }

/* Secondary text link under the primary button on status cards */
.auth-card.is-status .auth-secondary {
  display: inline-block;
  margin-top: var(--sp-4);
  font-size: 14px;
  color: var(--text-3);
  text-decoration: none;
  transition: color .15s;
}
.auth-card.is-status .auth-secondary:hover { color: var(--text-1); }

/* Tiny print under the card */
.mv-root .auth-legal {
  margin-top: var(--sp-6);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
  text-align: center;
  max-width: 360px;
}
.mv-root .auth-legal a { color: var(--text-2); text-decoration: none; }
.mv-root .auth-legal a:hover { color: var(--text-1); }

@media (max-width: 600px) {
  .auth-wrap { min-height: calc(100vh - 140px); padding: 40px 16px; }
  .auth-card { padding: 28px 22px; border-radius: var(--radius-lg); }
  .mv-root .auth-title { font-size: 28px; }
}

/* Phone portrait: hide the hero eyebrow/pill above the main H1 (section eyebrows stay). */
@media (max-width: 560px) { .mv-root .auth-eyebrow { display: none !important; } }
