/* ========================================================
   V2 AUTH PAGES — shared stylesheet
   Palette: sage (#4A5A50) + terracotta (#BD6338) + cream (#F5F0E8)
   Font: DM Sans throughout
   ======================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --v2-sage: #4A5A50;
  --v2-sage-hover: #5D6E60;
  --v2-earth: #1A1A1A;
  --v2-terracotta: #BD6338;
  --v2-cream: #F5F0E8;
  --v2-sand: #E8E3DC;
  --v2-white: #ffffff;
  --v2-border: rgba(26,26,26,0.1);
  --v2-border-focus: rgba(74,90,80,0.25);
  --v2-radius: 16px;
  --v2-radius-sm: 12px;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--v2-cream);
  color: var(--v2-earth);
  -webkit-font-smoothing: antialiased;
}

/* ── Shell ─────────────────────────────────────────────── */
.v2-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ────────────────────────────────────────────── */
.v2-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  background: var(--v2-white);
  border-bottom: 1px solid var(--v2-border);
}

.v2-auth-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--v2-earth);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.v2-auth-logo .logo-dot { color: var(--v2-terracotta); }

/* ── Content area ──────────────────────────────────────── */
.v2-auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 40px;
}

/* ── Auth card ─────────────────────────────────────────── */
.v2-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--v2-white);
  border-radius: var(--v2-radius);
  padding: 32px 28px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Typography ────────────────────────────────────────── */
.v2-auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--v2-earth);
  margin-bottom: 6px;
}

.v2-auth-subtitle {
  font-size: 0.9rem;
  color: rgba(26,26,26,0.55);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Feature bullets (signup only) ────────────────────── */
.v2-auth-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--v2-cream);
  border-radius: var(--v2-radius-sm);
}

.v2-auth-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(26,26,26,0.7);
  font-weight: 500;
}

.v2-auth-feature svg { color: var(--v2-sage); flex-shrink: 0; }

/* ── Error message ─────────────────────────────────────── */
.v2-auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--v2-radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #991B1B;
  margin-bottom: 18px;
  line-height: 1.5;
}

.v2-auth-error a {
  color: var(--v2-terracotta);
  font-weight: 600;
}

/* ── Form ─────────────────────────────────────────────── */
.v2-auth-form { display: flex; flex-direction: column; gap: 14px; }

.v2-form-group { display: flex; flex-direction: column; gap: 6px; }

.v2-form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--v2-earth);
  letter-spacing: 0.03em;
}

.v2-form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--v2-earth);
  background: var(--v2-white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.v2-form-input:focus {
  border-color: var(--v2-sage);
  box-shadow: 0 0 0 3px rgba(74,90,80,0.12);
}

.v2-form-input::placeholder { color: rgba(26,26,26,0.35); }

/* ── Primary submit button ─────────────────────────────── */
.v2-auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--v2-sage);
  color: #fff;
  border: none;
  border-radius: var(--v2-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 2px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(74,90,80,0.3);
}

.v2-auth-submit:hover {
  background: var(--v2-sage-hover);
  box-shadow: 0 4px 16px rgba(74,90,80,0.4);
}

.v2-auth-submit:active { transform: scale(0.99); }

/* Secondary outline variant */
.v2-auth-submit--secondary {
  background: transparent;
  color: var(--v2-sage);
  border: 2px solid var(--v2-sage);
  box-shadow: none;
}
.v2-auth-submit--secondary:hover {
  background: var(--v2-sage);
  color: #fff;
  box-shadow: 0 4px 16px rgba(74,90,80,0.4);
}

/* ── Divider ────────────────────────────────────────────── */
.v2-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: rgba(26,26,26,0.3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.v2-auth-divider::before,
.v2-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--v2-border);
}

/* ── Switch link ───────────────────────────────────────── */
.v2-auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: rgba(26,26,26,0.6);
}

.v2-auth-switch a {
  color: var(--v2-terracotta);
  font-weight: 600;
  text-decoration: none;
}

.v2-auth-switch a:hover { text-decoration: underline; }

/* ── Back link ──────────────────────────────────────────── */
.v2-auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.83rem;
  color: rgba(26,26,26,0.5);
  text-decoration: none;
  font-weight: 500;
}

.v2-auth-back:hover { color: var(--v2-earth); }

/* ── Success message ────────────────────────────────────── */
.v2-auth-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--v2-radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Mascot logo (below form) ──────────────────────────── */
.v2-auth-mascot {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 20px auto 0;
  object-fit: cover;
  border: 2px solid var(--v2-border);
  background: var(--v2-sand);
}

/* ── Password reset inline form ─────────────────────────── */
.v2-forgot-wrap {
  margin-top: 8px;
  text-align: right;
}

.v2-forgot-link {
  font-size: 0.82rem;
  color: var(--v2-terracotta);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.v2-forgot-link:hover { text-decoration: underline; }

.v2-reset-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: v2-reset-in 0.2s ease-out;
}

@keyframes v2-reset-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.v2-reset-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--v2-radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #166534;
  line-height: 1.5;
  animation: v2-reset-in 0.2s ease-out;
}

.v2-reset-confirm svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #16a34a;
}

.v2-reset-back-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(26,26,26,0.5);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  width: 100%;
}

.v2-reset-back-link:hover { color: var(--v2-earth); }

.v2-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.v2-form-row .v2-form-group { flex: 1; }

.v2-reset-submit-btn {
  padding: 13px 18px;
  background: var(--v2-sage);
  color: #fff;
  border: none;
  border-radius: var(--v2-radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  height: 48px;
  flex-shrink: 0;
}

.v2-reset-submit-btn:hover { background: var(--v2-sage-hover); }
.v2-reset-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Toast notification ──────────────────────────────────── */
.v2-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--v2-sage);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--v2-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(74,90,80,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.4s ease;
  max-width: 90vw;
  text-align: center;
}

.v2-toast.fade-out { opacity: 0; }

.v2-toast svg { flex-shrink: 0; }

/* ── Explorer mascot variant (larger, no circle crop) ──── */
.v2-auth-mascot--explorer {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--v2-sand);
  object-fit: cover;
}

/* ── Reset success modal ──────────────────────────────── */
.v2-reset-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.v2-reset-modal {
  position: relative;
  background: var(--v2-white);
  border-radius: var(--v2-radius);
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.15);
  animation: v2-modal-in 0.25s ease-out;
}

@keyframes v2-modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.v2-reset-modal-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.v2-reset-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--v2-earth);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.v2-reset-modal-text {
  font-size: 0.88rem;
  color: rgba(26,26,26,0.6);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 768px) {
  .v2-auth-content { padding: 48px 20px 60px; }
  .v2-auth-card { padding: 40px 36px; }
}

/* ── Promo code validation indicator ────────────────────── */
.v2-promo-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
  min-height: 20px;
}
.v2-promo-feedback.valid   { color: #16a34a; }
.v2-promo-feedback.invalid { color: #dc2626; }
.v2-promo-feedback.loading { color: rgba(26,26,26,0.4); }

/* ── Premium activation modal ────────────────────────────── */
.v2-premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.v2-premium-modal {
  position: relative;
  background: var(--v2-white);
  border-radius: var(--v2-radius);
  padding: 40px 32px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 56px rgba(0,0,0,0.18);
  animation: v2-modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes v2-modal-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.v2-premium-modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: v2-bounce 0.6s 0.2s both;
}

@keyframes v2-bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.v2-premium-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--v2-sage);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.v2-premium-modal-text {
  font-size: 0.9rem;
  color: rgba(26,26,26,0.65);
  line-height: 1.6;
  margin-bottom: 18px;
}

.v2-premium-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--v2-sage);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.v2-premium-modal-btn {
  width: 100%;
  padding: 14px;
  background: var(--v2-sage);
  color: #fff;
  border: none;
  border-radius: var(--v2-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(74,90,80,0.35);
}

.v2-premium-modal-btn:hover {
  background: var(--v2-sage-hover);
  box-shadow: 0 6px 20px rgba(74,90,80,0.45);
}

/* Close button for v2-premium-modal and v2-reset-modal */
.v2-premium-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(26,26,26,0.4);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.v2-premium-modal-close:hover {
  background: rgba(26,26,26,0.08);
  color: rgba(26,26,26,0.7);
}