/* PixyLiv Auth — Dark Intelligence Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-deep:      #0b0e1a;
  --bg-panel:     #0f1221;
  --bg-card:      #141829;
  --bg-input:     #1a1f35;
  --bg-input-hov: #1e2540;
  --border:       #242a45;
  --border-focus: #3d4b7a;
  --accent:       #e8472a;
  --accent-hover: #d43c20;
  --brand-blue:   #4f6ef7;
  --text-primary: #eef0f8;
  --text-sec:     #8892b0;
  --text-muted:   #4a5278;
  --green-check:  #22c55e;
  --feature-icon: #4f6ef7;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
}

/* ═══════════════════════════════════════
   LAYOUT — two-column split
═══════════════════════════════════════ */
.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* LEFT — hero panel */
.auth-hero {
  flex: 0 0 42%;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 36px;
  position: relative;
  overflow: hidden;
}

/* subtle grid lines */
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,110,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,110,247,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

.hero-logo-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg,#1A56FF,#5F26FF,#A31DFF,#FF2079);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,71,42,.15);
  border: 1px solid rgba(232,71,42,.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 20px;
}

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

.hero-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin-bottom: 10px;
  max-width: 380px;
}
.hero-headline .accent { color: var(--accent); }

.hero-subline {
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 360px;
  font-weight: 400;
}

.hero-features { display: flex; flex-direction: column; gap: 14px; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon-wrap {
  width: 32px; height: 32px;
  background: rgba(79,110,247,.12);
  border: 1px solid rgba(79,110,247,.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--feature-icon);
}

.feature-icon-wrap svg { width: 15px; height: 15px; }

.feature-text-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.92);
  margin-bottom: 2px;
}
.feature-text-desc {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
}

.hero-footer {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.security-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.security-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* RIGHT — form panel */
.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  background: #ffffff;
  overflow-y: auto;
  position: relative;

  /* Scoped light-theme overrides — everything inside .auth-panel uses
     these instead of the dark :root variables */
  --text-primary: #0f172a;
  --text-sec:     #475569;
  --text-muted:   #94a3b8;
  --bg-card:      #f8fafc;
  --bg-input:     #f8fafc;
  --bg-input-hov: #f1f5f9;
  --border:       #e2e8f0;
  --border-focus: #cbd5e1;
  --green-check:  #16a34a;
}

.back-link {
  position: absolute;
  top: 28px; left: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  text-decoration: none;
  transition: color .18s ease;
}
.back-link:hover { color: var(--text-primary); }
.back-link svg { width: 14px; height: 14px; }

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

.form-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-subtitle {
  font-size: 13.5px;
  color: var(--text-sec);
  margin-bottom: 34px;
  line-height: 1.55;
}

/* FORM ELEMENTS */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-sec);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex; align-items: center;
  pointer-events: none;
}
.input-icon svg { width: 15px; height: 15px; }

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  padding: 11px 14px 11px 40px;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--brand-blue);
  background: var(--bg-input-hov);
  box-shadow: 0 0 0 3px rgba(79,110,247,.15);
}

.form-input.no-icon { padding-left: 14px; }

.input-action {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center;
  padding: 4px;
  transition: color .2s;
}
.input-action:hover { color: var(--text-sec); }
.input-action svg { width: 16px; height: 16px; }

/* label row with inline link */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.label-row .form-label { margin-bottom: 0; }

.form-link {
  font-size: 12px;
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
}
.form-link:hover { text-decoration: underline; }

/* REMEMBER ME */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--brand-blue);
  cursor: pointer;
}
.checkbox-row label {
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
}

/* CAPTCHA */
.captcha-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 17px;
  margin-bottom: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.captcha-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: 0.1px;
}
.captcha-label svg { width: 14px; height: 14px; color: var(--green-check); }

.captcha-regen {
  font-size: 11.5px;
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  letter-spacing: 0.2px;
}
.captcha-regen:hover { text-decoration: underline; }

.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.captcha-challenge {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  min-width: 90px;
  text-align: center;
  font-family: 'Inter', monospace;
}
.captcha-eq {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
}
.captcha-answer {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.captcha-answer:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(79,110,247,.15);
}
.captcha-answer::placeholder { color: var(--text-muted); }

.captcha-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 9px;
  line-height: 1.5;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
  padding: 13px;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.15);
}
.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15,23,42,.2);
}
.btn-primary:active { transform: scale(.98); }

.btn-google {
  width: 100%;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn-google:hover {
  border-color: var(--border-focus);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.google-logo {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* divider */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-divider span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* bottom link */
.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-sec);
}
.form-footer a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}
.form-footer a:hover { text-decoration: underline; }

/* error message */
.form-error {
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #dc2626;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* REGISTER — role cards */
.register-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.step-item.active { color: var(--text-primary); }
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
}
.step-item.active .step-num {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
.step-sep {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 0 6px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.role-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.role-card:hover { border-color: var(--border-focus); }
.role-card.selected {
  border-color: var(--brand-blue);
  background: rgba(79,110,247,.08);
}
.role-card svg { width: 22px; height: 22px; color: var(--brand-blue); }
.role-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.role-card-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* FORGOT PASSWORD */
.lock-icon-wrap {
  width: 52px; height: 52px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.lock-icon-wrap svg { width: 24px; height: 24px; color: var(--text-sec); }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.privacy-note svg { width: 14px; height: 14px; color: var(--green-check); flex-shrink: 0; margin-top: 1px; }

/* VERSION BADGE */
.version-badge {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ALERTS */
.alert-success {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.25);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #15803d;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .auth-hero { display: none; }
  .auth-panel { padding: 32px 24px; }
}