/* ═══════════════════════════════════════════════════════
   ED VentGuide Pro — Auth Pages CSS
   Login, Register, Forgot Password, Reset
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --theme: #2563eb;
  --theme-rgb: 37, 99, 235;
  --theme-light: rgba(37, 99, 235, 0.08);
  --theme-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.16);
}

/* Dark mode */
.dark {
  --bg: #0b0f1a;
  --surface: #141929;
  --surface-2: #1a2236;
  --text: #f0f4ff;
  --text-2: #8899bb;
  --text-3: #4a5a7a;
  --border: #1e2d47;
  --theme-light: rgba(37, 99, 235, 0.15);
  --danger-bg: rgba(220,38,38,0.12);
  --danger-border: rgba(220,38,38,0.28);
  --success-bg: rgba(22,163,74,0.12);
  --warning-bg: rgba(217,119,6,0.12);
}

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

html, body {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Auth Layout ─────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Animated background blobs */
.auth-wrapper::before,
.auth-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.auth-wrapper::before {
  width: 400px; height: 400px;
  background: rgba(var(--theme-rgb), 0.3);
  top: -100px; right: -80px;
}
.auth-wrapper::after {
  width: 300px; height: 300px;
  background: rgba(var(--theme-rgb), 0.2);
  bottom: -60px; left: -60px;
  animation-delay: -4s;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -20px) scale(1.1); }
}

/* ── Auth Card ───────────────────────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  position: relative;
  z-index: 1;
  animation: cardSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

img, svg, video, canvas { max-width: 100%; height: auto; }
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo / Brand ────────────────────────────── */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.auth-app-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--theme);
  letter-spacing: -0.02em;
}
.auth-app-sub {
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 4px;
}

/* ── Page Title ──────────────────────────────── */
.auth-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Flash Messages ──────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.45;
  animation: flashIn 0.3s ease;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(22,163,74,0.2); }
.flash-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.flash-info    { background: var(--theme-light); color: var(--theme);  border: 1px solid rgba(var(--theme-rgb),0.2); }

/* ── Form Fields ─────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  transition: all 0.2s ease;
  outline: none;
}
.form-input::placeholder { color: var(--text-3); font-weight: 500; }
.form-input:focus {
  border-color: var(--theme);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.15);
}
.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  font-weight: 700;
  margin-top: 5px;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 5px;
}

/* Password visibility toggle */
.input-password-wrap {
  position: relative;
}
.input-password-wrap .form-input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: color 0.2s;
}
.password-toggle:hover { color: var(--text-2); }

/* Password strength meter */
.pwd-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.pwd-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.pwd-bar.active-weak   { background: var(--danger); }
.pwd-bar.active-medium { background: var(--warning); }
.pwd-bar.active-strong { background: var(--success); }
.pwd-label {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Checkbox ────────────────────────────────── */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--theme);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--theme);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--theme-rgb), 0.35);
}
.btn-primary:hover {
  background: var(--theme-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--theme-rgb), 0.45);
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--theme);
  color: var(--theme);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Links ───────────────────────────────────── */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.auth-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--theme);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--theme-hover); text-decoration: underline; }

/* ── Divider ─────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Footer Text ─────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.84rem;
  color: var(--text-3);
  font-weight: 500;
}
.auth-footer a {
  color: var(--theme);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── Status Badge ────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 16px auto;
}
.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(217,119,6,0.2);
}
.status-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22,163,74,0.2);
}

/* ── Dark Mode Toggle ────────────────────────── */
.dark-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  transition: all 0.2s;
}
.dark-toggle:hover { transform: scale(1.08); box-shadow: var(--shadow-md); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 480px) {
  .auth-wrapper { align-items:flex-start; padding:64px 12px 20px; }
  .auth-card { padding: 26px 18px; border-radius: var(--r-lg); max-width:100%; }
  .auth-logo { font-size: 2rem; }
  .auth-app-name { font-size: 1.15rem; }
  .auth-links { align-items:flex-start; flex-direction:column; gap:10px; }
  .btn { min-height:46px; }
  .dark-toggle { top:12px; right:12px; }
}

/* ── Subscribe page ──────────────────────────── */
.sub-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 20px;
}
.sub-info h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.sub-info p {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.55;
  font-weight: 500;
}
.plan-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.plan-card {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.plan-card:hover { border-color: var(--theme); transform: translateY(-1px); }
.plan-card.selected { border-color: var(--theme); background: var(--theme-light); }
.plan-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px; right: 14px;
  width: 22px; height: 22px;
  background: var(--theme);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}
.plan-name { font-size: 0.92rem; font-weight: 800; color: var(--text); }
.plan-price { font-size: 1.3rem; font-weight: 900; color: var(--theme); font-family: 'Space Mono', monospace; margin: 4px 0; }
.plan-duration { font-size: 0.78rem; color: var(--text-3); font-weight: 600; }
