/* ─── Prelo Auth Pages CSS ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --violet:       #6B5CF6;
  --violet-light: #9B8FF9;
  --violet-dim:   rgba(107,92,246,0.14);
  --violet-glow:  rgba(107,92,246,0.28);
  --teal:         #0EC8A4;
  --teal-dim:     rgba(14,200,164,0.12);
  --bg:           #0E1117;
  --bg-surface:   #13161F;
  --bg-raised:    #191D28;
  --bg-overlay:   #1F2333;
  --border:       rgba(255,255,255,0.06);
  --border-md:    rgba(255,255,255,0.10);
  --border-hi:    rgba(255,255,255,0.18);
  --text-1:       #F2F4FF;
  --text-2:       #9BA3BC;
  --text-3:       #555E78;
  --green:        #22C55E;
  --green-dim:    rgba(34,197,94,0.12);
  --red:          #EF4444;
  --red-dim:      rgba(239,68,68,0.1);
  --amber:        #F59E0B;
  --r-sm:  5px; --r-md: 8px; --r-lg: 14px; --r-xl: 20px;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth layout ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
}

/* Left panel — brand */
.auth-left {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(107,92,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,92,246,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 20% 40%, black 30%, transparent 100%);
}
.auth-left-glow {
  position: absolute; top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(107,92,246,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.auth-left-content { position: relative; z-index: 1; }

/* Logo */
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 64px;
}
.auth-logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--violet);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(107,92,246,0.5);
}
.auth-logo-mark svg { width: 16px; height: 16px; }
.auth-logo-name {
  font-size: 18px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--text-1);
}
.auth-logo-name em { font-style: normal; color: var(--teal); }

.auth-headline {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700; letter-spacing: -1.5px;
  line-height: 1.1; color: var(--text-1);
  margin-bottom: 16px;
}
.auth-headline em { font-style: normal; color: var(--teal); }

.auth-tagline {
  font-size: 15px; color: var(--text-2);
  line-height: 1.7; max-width: 340px;
  margin-bottom: 48px;
}

/* Feature bullets */
.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-2);
}
.auth-feature-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.fi-violet { background: var(--violet-dim); }
.fi-teal   { background: var(--teal-dim); }
.fi-amber  { background: rgba(245,158,11,0.1); }

/* Testimonial */
.auth-testimonial {
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative; z-index: 1;
}
.auth-testimonial-text {
  font-size: 13px; color: var(--text-2);
  line-height: 1.7; font-style: italic;
  margin-bottom: 14px;
}
.auth-testimonial-author {
  display: flex; align-items: center; gap: 10px;
}
.author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--violet-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--violet-light);
}
.author-name { font-size: 12px; font-weight: 600; }
.author-role { font-size: 11px; color: var(--text-3); }

/* Right panel — form */
.auth-right {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 52px;
  background: var(--bg);
}

.auth-form-wrap { width: 100%; max-width: 360px; }

.auth-form-title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.8px;
  margin-bottom: 6px; color: var(--text-1);
}
.auth-form-sub {
  font-size: 13px; color: var(--text-2);
  margin-bottom: 32px; line-height: 1.6;
}
.auth-form-sub a { color: var(--violet-light); text-decoration: none; }
.auth-form-sub a:hover { text-decoration: underline; }

/* Form fields */
.f-group { margin-bottom: 16px; }
.f-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.f-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-family: var(--font); font-size: 14px;
  color: var(--text-1); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-dim);
}
.f-input::placeholder { color: var(--text-3); }
.f-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

/* Password wrapper */
.f-password-wrap { position: relative; }
.f-password-wrap .f-input { padding-right: 44px; }
.f-password-toggle {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 16px;
  transition: color 0.15s; padding: 0;
}
.f-password-toggle:hover { color: var(--text-2); }

/* Label row with link */
.f-label-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.f-label-link {
  font-size: 12px; color: var(--violet-light);
  text-decoration: none;
}
.f-label-link:hover { text-decoration: underline; }

/* Error banner */
.auth-error {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px; color: var(--red);
  display: none; align-items: center; gap: 8px;
  margin-bottom: 16px;
}

/* Success banner */
.auth-success {
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--r-md);
  padding: 16px;
  font-size: 13px; color: var(--green);
  display: none; flex-direction: column; gap: 6px;
  margin-bottom: 16px; text-align: center;
}
.auth-success-icon { font-size: 28px; margin-bottom: 4px; }

/* Submit button */
.auth-btn {
  width: 100%;
  background: var(--violet); color: #fff;
  border: none; border-radius: var(--r-md);
  padding: 12px; font-family: var(--font);
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 20px;
}
.auth-btn:hover   { background: #7D6FF8; box-shadow: 0 4px 16px var(--violet-glow); transform: translateY(-1px); }
.auth-btn:active  { transform: none; }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Spinner */
.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* Plan selector (signup) */
.plan-selector { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.plan-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-raised); border: 1px solid var(--border-md);
  border-radius: var(--r-md); padding: 12px 14px;
  cursor: pointer; transition: all 0.15s;
}
.plan-option:hover { border-color: var(--border-hi); }
.plan-option.selected {
  border-color: var(--violet);
  background: var(--violet-dim);
  box-shadow: 0 0 0 1px rgba(107,92,246,0.15);
}
.plan-option input[type=radio] { display: none; }
.plan-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border-hi); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.plan-option.selected .plan-radio {
  border-color: var(--violet); background: var(--violet);
}
.plan-option.selected .plan-radio::after {
  content: ''; width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
}
.plan-info { flex: 1; }
.plan-info-name  { font-size: 13px; font-weight: 600; color: var(--text-1); }
.plan-info-desc  { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.plan-info-price { font-size: 12px; font-weight: 700; color: var(--violet-light); margin-left: auto; }

/* Terms */
.auth-terms {
  font-size: 11px; color: var(--text-3);
  text-align: center; line-height: 1.6;
}
.auth-terms a { color: var(--text-2); text-decoration: none; }
.auth-terms a:hover { color: var(--violet-light); }

/* Step indicator */
.auth-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3);
  margin-bottom: 28px;
}
.step-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-hi);
}
.step-dot.done   { background: var(--teal); }
.step-dot.active { background: var(--violet); }

/* Password strength */
.pw-strength { margin-top: 8px; }
.pw-strength-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-bottom: 4px;
}
.pw-bar-seg { height: 3px; border-radius: 2px; background: var(--bg-overlay); transition: background 0.2s; }
.pw-bar-seg.weak   { background: var(--red); }
.pw-bar-seg.fair   { background: var(--amber); }
.pw-bar-seg.good   { background: var(--violet-light); }
.pw-bar-seg.strong { background: var(--green); }
.pw-strength-label { font-size: 11px; color: var(--text-3); }

/* Mobile */
@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left  { display: none; }
  .auth-right { padding: 32px 24px; }
}
