/* ── Auth pages & modal shared styles ─────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  animation: ageFadeIn 0.3s ease both;
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: var(--radius-lg); }
}
.auth-logo {
  display: block;
  font-family: 'Bebas Neue', 'Manrope', sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 24px;
}
.auth-logo span { color: var(--accent); }
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.auth-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.auth-field input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.auth-field input:focus { border-color: var(--border-light); }
.auth-field input::placeholder { color: var(--text-subtle); }
.auth-field input.error { border-color: var(--accent); }
.auth-field-hint {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 4px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-remember input { width: auto; accent-color: var(--accent); cursor: pointer; }
.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 4px;
  display: block;
  text-align: center;
  text-decoration: none;
}
.auth-btn:hover:not(:disabled) { background: var(--accent-hover); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-links a:hover { color: var(--accent); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-subtle);
  font-size: 11px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-msg-error {
  background: rgba(255,61,95,0.1);
  border: 1px solid rgba(255,61,95,0.3);
  color: #ff6b87;
}
.auth-msg-success {
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.3);
  color: #3ecf8e;
}
.auth-msg-info {
  background: rgba(100,160,255,0.1);
  border: 1px solid rgba(100,160,255,0.25);
  color: #80aaff;
}
/* Turnstile widget centering */
.cf-turnstile { margin: 16px 0; }

/* ── Auth modal overlay ────────────────────────────────────────────────── */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.auth-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.auth-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 32px 28px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: ageFadeIn 0.25s ease both;
  max-height: 90vh;
  overflow-y: auto;
}
@media (max-width: 480px) {
  .auth-modal { padding: 24px 18px 20px; border-radius: var(--radius-lg); }
}
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover { color: var(--text); background: var(--border); }

/* ── Verify banner (shown when logged in but unverified) ─────────────── */
.verify-banner {
  background: rgba(240,165,0,0.1);
  border-bottom: 1px solid rgba(240,165,0,0.25);
  padding: 8px 20px;
  font-size: 12px;
  color: #f0a500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.verify-banner button {
  background: none;
  border: 1px solid rgba(240,165,0,0.4);
  border-radius: 5px;
  color: #f0a500;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  padding: 2px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.verify-banner button:hover { background: rgba(240,165,0,0.15); }

/* ── Account avatar / header button states ───────────────────────────── */
.header-avatar-wrap { position: relative; }
.header-avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  min-width: 180px;
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.header-avatar-wrap.open .header-avatar-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.avatar-menu-user {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.avatar-menu-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-menu-email {
  font-size: 11px;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: left;
}
.avatar-menu-item:hover { background: var(--bg); color: var(--text); }
.avatar-menu-item.danger { color: var(--accent); }
.avatar-menu-item.danger:hover { background: var(--accent-glow); }
.avatar-menu-item .svg-icon { flex-shrink: 0; width: 16px; height: 16px; }
