/* ============================================================
   BeatVault · Auth Pages CSS
   Syne (headings) + DM Sans (body) — loaded via Google Fonts
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

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

:root {
  --bg:        #0a0a10;
  --bg2:       #111119;
  --bg3:       #18181f;
  --bg4:       #1f1f28;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #eceaf5;
  --muted:     rgba(236,234,245,0.45);
  --hint:      rgba(236,234,245,0.28);
  --accent:    #7B6EF6;
  --accent2:   #9B8FF8;
  --accent-bg: rgba(123,110,246,0.12);
  --teal:      #3EC9A7;
  --error:     #F06060;
  --error-bg:  rgba(240,96,96,0.1);
  --success:   #3EC9A7;
  --success-bg:rgba(62,201,167,0.1);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius:    12px;
  --radius-sm: 8px;
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── Left panel (branding) ────────────────────────────────── */
.auth-left {
  background: var(--bg2);
  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;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,110,246,0.08) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}

.auth-left::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62,201,167,0.05) 0%, transparent 70%);
  bottom: -50px; right: -50px;
  pointer-events: none;
}

.bv-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 1;
}
.bv-logo span { color: var(--accent2); }

.auth-left-body {
  position: relative;
  z-index: 1;
}

.auth-tagline {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.auth-tagline em {
  font-style: normal;
  color: var(--accent2);
}

.auth-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 320px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.auth-feature-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.auth-left-footer {
  font-size: 11px;
  color: var(--hint);
  position: relative;
  z-index: 1;
}

/* ── Right panel (form) ───────────────────────────────────── */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth-box {
  width: 100%;
  max-width: 400px;
  animation: fadeUp .4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-box-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-box-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ── Form elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--hint); }

.form-input:focus {
  border-color: var(--accent);
  background: var(--bg4);
}

.form-input.error { border-color: var(--error); }

.form-error {
  font-size: 11px;
  color: var(--error);
  margin-top: 5px;
  display: none;
}
.form-error.show { display: block; }

/* Password field wrapper */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.toggle-pw {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--hint); cursor: pointer;
  font-size: 16px; padding: 2px;
  transition: color .15s;
}
.toggle-pw:hover { color: var(--muted); }

/* ── Strength meter ───────────────────────────────────────── */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.pw-bar {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--bg4);
  transition: background .3s;
}
.pw-bar.weak   { background: var(--error); }
.pw-bar.fair   { background: var(--accent); }
.pw-bar.strong { background: var(--teal); }

/* ── Submit button ────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover  { background: var(--accent2); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.btn-primary.loading .spinner { display: block; }
.btn-primary.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── Alert boxes ──────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  line-height: 1.5;
}
.alert.show { display: block; }
.alert.error   { background: var(--error-bg);   border: 1px solid rgba(240,96,96,0.25);   color: #F09090; }
.alert.success { background: var(--success-bg); border: 1px solid rgba(62,201,167,0.25);  color: var(--teal); }

/* ── Auth footer link ─────────────────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}
.auth-switch a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

.forgot-link {
  font-size: 12px;
  color: var(--accent2);
  text-decoration: none;
  float: right;
  margin-top: -2px;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Plan selector (register) ─────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  text-align: center;
  background: var(--bg3);
}
.plan-card:hover { border-color: var(--border2); }
.plan-card.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.plan-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.plan-name {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.plan-price {
  font-size: 11px;
  color: var(--muted);
}
.plan-price strong {
  font-size: 14px;
  color: var(--accent2);
  font-family: var(--font-head);
}
.plan-badge {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: .3px;
}

/* ── Terms checkbox ───────────────────────────────────────── */
.check-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.check-group input[type=checkbox] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check-group label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.check-group a { color: var(--accent2); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; align-items: flex-start; padding-top: 48px; }
}
