/* ══════════════════════════════════════════════════════════════
   Auth screens — shared by ambassador.html and admin.html.
   Covers: login, signup, verify, apply, pending, rejected, denied.
   ══════════════════════════════════════════════════════════════ */

/* ── Auth Screen ─────────────────────────────────────────── */
#auth-screen {
  display: none; align-items: center; justify-content: center;
  flex: 1; padding: 100px 24px 60px;
  flex-direction: column; gap: 24px;
  animation: fadeUp .6s ease both;
}

/* ── Heading ─────────────────────────────────────────────── */
.auth-heading { text-align: center; }
.auth-heading .title {
  font-size: 2.4rem; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.2;
}
.auth-heading .title span { color: var(--purple-light); }
.auth-heading .intro {
  color: var(--text-dim); font-size: .875rem;
  max-width: 400px; margin: 12px auto 0; line-height: 1.7;
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form-wrap { width: 320px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="url"] {
  width: 100%; height: 44px;
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 16px;
  color: var(--text); font-family: var(--brand); font-size: .875rem;
  outline: none; transition: border-color .2s;
}
.auth-form input:focus { border-color: var(--purple); }
.auth-form input::placeholder { color: var(--text-muted); }

.auth-form textarea {
  width: 100%; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  color: var(--text); font-family: var(--brand); font-size: .875rem;
  outline: none; resize: vertical; min-height: 80px;
  transition: border-color .2s;
}
.auth-form textarea:focus { border-color: var(--purple); }
.auth-form textarea::placeholder { color: var(--text-muted); }

/* Sign-up fields (name + confirm) — hidden in sign-in mode */
.auth-form .signup-fields {
  display: flex; flex-direction: column; gap: 12px;
  height: 0; overflow: hidden; opacity: 0;
  transition: height .25s ease, opacity .2s ease, margin .25s ease;
  margin-top: -12px;
}
.auth-form .signup-fields.visible {
  height: 100px; opacity: 1; margin-top: 0;
}

/* Forgot password row — hidden in sign-up mode */
.auth-form .forgot-row {
  display: flex; justify-content: flex-end;
  height: 32px; overflow: hidden; opacity: 1;
  transition: height .25s ease, opacity .2s ease;
}
.auth-form .forgot-row.hidden { height: 0; opacity: 0; }
.auth-form .forgot-link {
  background: none; border: none; color: var(--text-dim);
  font-family: var(--brand); font-size: .8rem;
  cursor: pointer; padding: 0;
}
.auth-form .forgot-link:hover { color: var(--purple-light); }

.auth-error {
  color: var(--red); font-family: var(--mono); font-size: .75rem;
  height: 1.2em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* ── Primary button ──────────────────────────────────────── */
.sign-in-btn {
  background: var(--purple); color: #fff; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 52px; padding: 0 24px;
  border-radius: var(--radius); font-family: var(--brand);
  font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: transform .15s, box-shadow .2s;
}
.sign-in-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--purple-dim);
}
.sign-in-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── Mode toggle ─────────────────────────────────────────── */
.auth-toggle {
  background: none; border: none; color: var(--text-dim);
  font-family: var(--brand); font-size: .85rem;
  cursor: pointer; padding: 12px 0; transition: color .2s;
}
.auth-toggle span { color: var(--purple-light); font-weight: 600; transition: color .2s; }
.auth-toggle:hover { color: var(--text); }
.auth-toggle:hover span { color: #fff; }

/* ── Divider ─────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 16px; margin: 20px 0;
  color: var(--text-muted); font-size: .75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── OAuth buttons ───────────────────────────────────────── */
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; }

.oauth-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; padding: 0 24px;
  border-radius: var(--radius); font-size: 16px; font-weight: 500;
  cursor: pointer; border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.oauth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.oauth-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.google-btn { background: #fff; color: rgba(0, 0, 0, 0.87); font-family: 'Roboto', sans-serif; }
.apple-btn  { background: #000; color: #fff; font-family: -apple-system, 'SF Pro Display', sans-serif; }
.apple-btn svg { fill: #fff; }

/* ── Centered screens (pending, rejected, denied, verify) ── */
.centered-screen {
  display: none; flex: 1; padding: 100px 24px 60px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  min-height: calc(100vh - 66px);
  animation: fadeUp .5s ease both;
}
.centered-screen.visible { display: flex; }

.status-icon { font-size: 3rem; line-height: 1; color: var(--purple-light); }
.status-title { font-size: 1.4rem; font-weight: 700; text-align: center; }
.status-text {
  color: var(--text-dim); font-size: .875rem;
  text-align: center; max-width: 400px; line-height: 1.7;
}

/* ── Ambassador perks ────────────────────────────────────── */
.apply-perks {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.perk-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 100px;
  border: 1px solid rgba(232, 168, 124, 0.2);
  background: rgba(232, 168, 124, 0.06);
  font-size: .85rem; color: var(--text-dim);
}
.perk-val { color: #E8A87C; font-weight: 700; }

/* ── Apply form ──────────────────────────────────────────── */
.apply-form-wrap { width: 360px; max-width: calc(100% - 32px); }
.form-section-label {
  font-family: var(--mono); font-size: .7rem; font-weight: 400;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Activate screen ─────────────────────────────────────── */
.activate-screen {
  display: none; flex: 1; padding-top: 66px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  animation: fadeUp .5s ease both;
}
.activate-screen.visible { display: flex; }
.activate-subtitle { color: var(--text-dim); font-size: .9rem; margin-bottom: 16px; }
.activate-card {
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 28px;
  width: 400px; max-width: calc(100% - 32px);
}
.activate-card h3 { font-weight: 700; margin-bottom: 16px; }
.activate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle);
}
.activate-row:last-of-type { border-bottom: none; }
.activate-label {
  font-family: var(--mono); font-size: .75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.activate-value {
  font-family: var(--mono); font-size: .85rem; color: var(--text); font-weight: 500;
}
.activate-code-label {
  font-family: var(--mono); font-size: .7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  display: block; margin-bottom: 6px;
}
.activate-code-input {
  width: 100%; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 14px; color: var(--text);
  font-family: var(--mono); font-size: .85rem; text-transform: uppercase; outline: none;
}
