/* assets/css/main.css */

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

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg-base:       #07070f;
  --bg-surface:    #0f0f1a;
  --bg-card:       #13131f;
  --bg-input:      #1a1a2a;
  --border:        rgba(255,255,255,.06);
  --border-active: rgba(99,102,241,.5);
  --primary:       #6366f1;
  --primary-light: #818cf8;
  --accent:        #a78bfa;
  --success:       #34d399;
  --danger:        #f87171;
  --warning:       #fbbf24;
  --text-primary:  #f0f0ff;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;
  --glow:          rgba(99,102,241,.25);
  --glow-strong:   rgba(99,102,241,.45);
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --transition:    .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background mesh ────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99,102,241,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(167,139,250,.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ── Auth Layout ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-branding { display: none; }
}

/* Branding panel */
.auth-branding {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0d1f 0%, #10102a 100%);
  border-right: 1px solid var(--border);
}
.auth-branding::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,.2) 0%, transparent 70%);
  top: -100px; left: -100px;
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}
.auth-branding::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,.15) 0%, transparent 70%);
  bottom: 50px; right: 50px;
  border-radius: 50%;
  animation: pulse-glow 8s ease-in-out infinite alternate-reverse;
}
@keyframes pulse-glow {
  from { transform: scale(1); opacity: .6; }
  to   { transform: scale(1.2); opacity: 1; }
}
.brand-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
  margin-bottom: 60px;
}
.brand-logo span { color: var(--primary-light); }
.brand-headline {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.brand-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  max-width: 360px;
  line-height: 1.7;
}
.brand-features {
  list-style: none;
  margin-top: 40px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: .95rem;
}
.brand-features li .icon {
  width: 32px; height: 32px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* Form panel */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  position: relative;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-box-header { margin-bottom: 36px; }
.auth-box-header h2 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-box-header p  { color: var(--text-secondary); font-size: .95rem; }

/* ── Form Components ─────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
  position: relative;
}
.form-label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .97rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--border-active);
  background: #1e1e30;
  box-shadow: 0 0 0 3px var(--glow);
}
.form-control.has-icon { padding-right: 44px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: color var(--transition);
}
.input-icon:hover { color: var(--primary-light); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 24px var(--glow);
}
.btn-primary:hover { box-shadow: 0 6px 32px var(--glow-strong); transform: translateY(-1px); }

.btn-google {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  margin-bottom: 24px;
}
.btn-google:hover {
  border-color: rgba(255,255,255,.15);
  background: var(--bg-input);
  transform: translateY(-1px);
}
.btn-google img { width: 20px; height: 20px; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--border-active); background: rgba(99,102,241,.06); }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { color: var(--text-muted); font-size: .82rem; white-space: nowrap; }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeSlide .3s ease;
}
@keyframes fadeSlide { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }
.alert-danger  { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.25); color: #fca5a5; }
.alert-success { background: rgba(52,211,153,.1);  border: 1px solid rgba(52,211,153,.25);  color: #6ee7b7; }
.alert-warning { background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.25);  color: #fde68a; }

/* ── Password strength ───────────────────────────────────────────────────── */
.pw-strength {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.pw-bar {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: var(--bg-input);
  transition: background .4s ease;
}
.pw-bar.weak   { background: var(--danger); }
.pw-bar.medium { background: var(--warning); }
.pw-bar.strong { background: var(--success); }

/* ── Steps indicator ─────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: all .3s;
}
.step.active .step-num  { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active { color: var(--text-primary); }
.step.done .step-num    { background: var(--success); border-color: var(--success); color: #fff; }
.step-line {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  min-width: 24px;
  margin: 0 4px;
}

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { pointer-events: none; }
.btn.loading .btn-text { opacity: .6; }

/* ── Footer link ─────────────────────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: .92rem;
}
.auth-footer a { color: var(--primary-light); font-weight: 600; }
.auth-footer a:hover { color: var(--accent); }

/* ── Page transitions ────────────────────────────────────────────────────── */
.page-enter {
  animation: pageEnter .4s cubic-bezier(.4,0,.2,1) both;
}
@keyframes pageEnter {
  from { opacity:0; transform: translateY(16px); }
  to   { opacity:1; transform: translateY(0); }
}
