/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', system-ui, sans-serif; background: #0b041e; color: #1a1228; }

/* ── Full-page layout ─────────────────────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════════════
   LEFT BRAND PANEL
   ══════════════════════════════════════════════════════════════════════════ */
.auth-brand {
  flex: 1;
  background: linear-gradient(150deg, #0b041e 0%, #1e0847 40%, #4B2E83 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) { .auth-brand { display: none; } }

.brand-inner {
  position: relative;
  z-index: 2;
  max-width: 460px;
  width: 100%;
}

/* Brand logo mark at top of left panel */
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 52px;
}
.brand-mark-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #c4a8ff;
}
.brand-mark-text {
  font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -.2px;
}
.brand-mark-text span {
  display: block; font-size: 0.68rem; font-weight: 400;
  color: rgba(255,255,255,.45); letter-spacing: .5px; text-transform: uppercase;
}

.brand-headline {
  font-size: 2.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.brand-headline em { font-style: normal; color: #c4a8ff; }

.brand-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Feature pill tags */
.brand-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-pills span {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  border-radius: 20px; padding: 7px 14px;
  font-size: 0.81rem; font-weight: 500;
  backdrop-filter: blur(4px);
}
.brand-pills span i { font-size: 0.9rem; color: #c4a8ff; }

/* Decorative circles */
.brand-circles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.circle { position: absolute; border-radius: 50%; }
.c1 { width: 520px; height: 520px; top: -130px; right: -200px; border: 1px solid rgba(255,255,255,.05); }
.c2 { width: 340px; height: 340px; bottom: -80px; left: -110px; border: 1px solid rgba(255,255,255,.04); }
.c3 { width: 180px; height: 180px; top: 42%; right: -30px; background: radial-gradient(circle, rgba(123,79,208,.25) 0%, transparent 70%); }

/* ══════════════════════════════════════════════════════════════════════════
   RIGHT FORM PANEL
   ══════════════════════════════════════════════════════════════════════════ */
.auth-form-panel {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f3fc;
  padding: 40px 28px;
}
@media (max-width: 900px) {
  .auth-form-panel {
    max-width: 100%;
    background: #0b041e;
    padding: 32px 20px;
  }
}

/* ── Auth card ────────────────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 8px 48px rgba(75,46,131,.13), 0 1px 3px rgba(0,0,0,.06);
  position: relative;
}
@media (max-width: 900px) {
  .auth-card {
    background: #fff;
    box-shadow: 0 12px 60px rgba(0,0,0,.35);
    border-radius: 18px;
  }
}

/* ── Logo at top of card ──────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
}
.auth-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.auth-logo-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #4B2E83;
}
.auth-logo-fallback i { font-size: 1.3rem; color: #7B4FD0; }

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.auth-progress {
  width: 100%;
  height: 3px;
  background: #ede9f8;
  border-radius: 2px;
  margin-bottom: 30px;
  overflow: hidden;
}
.auth-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4B2E83, #7B4FD0);
  border-radius: 2px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════════════════════════════
   STEPS
   ══════════════════════════════════════════════════════════════════════════ */
.auth-step { display: none; }
.auth-step.active { display: block; }

.auth-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #100526;
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.auth-subtitle {
  font-size: 0.87rem;
  color: #6b5f8c;
  line-height: 1.6;
  margin-bottom: 26px;
}
.auth-subtitle strong { color: #4B2E83; }

/* Step icon (create password step) */
.step-icon {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, #f0ebff, #e6deff);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid #ddd5ff;
}
.step-icon i { font-size: 1.55rem; color: #4B2E83; }

/* ── Social buttons ───────────────────────────────────────────────────────── */
/* ── Field group ──────────────────────────────────────────────────────────── */
.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-size: 0.81rem;
  font-weight: 600;
  color: #3d3060;
  margin-bottom: 7px;
  letter-spacing: .1px;
}

/* ── Input wrap (icon left + optional toggle right) ───────────────────────── */
.input-wrap { position: relative; }
.input-wrap i.ri-mail-line,
.input-wrap i.ri-lock-line,
.input-wrap i.ri-user-line {
  position: absolute;
  left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: #a098c0;
  pointer-events: none; z-index: 1;
}
.input-wrap input {
  width: 100%;
  padding: 11px 42px 11px 40px;
  border: 1.5px solid #ddd8f0;
  border-radius: 10px;
  font-size: 0.91rem;
  color: #1a1228;
  background: #faf9ff;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
}
.input-wrap input:focus {
  border-color: #4B2E83;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75,46,131,.1);
}
.input-wrap input::placeholder { color: #b0a8c8; }

/* Eye toggle button */
.pw-toggle {
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: #a098c0; cursor: pointer;
  padding: 5px; border-radius: 6px;
  display: flex; align-items: center;
  font-size: 1rem; line-height: 1;
  transition: color .15s;
}
.pw-toggle:hover { color: #4B2E83; }

/* ── Password strength indicator ─────────────────────────────────────────── */
.pw-strength {
  font-size: 0.79rem;
  font-weight: 600;
  margin: 6px 0 10px;
  min-height: 18px;
  padding-left: 2px;
}

/* ── Primary button ───────────────────────────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #4B2E83 0%, #7B4FD0 100%);
  color: #fff;
  border: none; border-radius: 10px;
  font-size: 0.93rem; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(75,46,131,.3);
}
.btn-primary:hover  { opacity: .92; box-shadow: 0 6px 20px rgba(75,46,131,.38); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ── OTP digits ───────────────────────────────────────────────────────────── */
.otp-group {
  display: flex; gap: 10px; justify-content: center;
  margin: 22px 0;
}
.otp-digit {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 1.35rem; font-weight: 700;
  border: 2px solid #ddd8f0;
  border-radius: 12px; outline: none;
  color: #4B2E83; background: #faf9ff;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: monospace;
}
.otp-digit:focus {
  border-color: #4B2E83;
  box-shadow: 0 0 0 3px rgba(75,46,131,.12);
  background: #fff;
}
.otp-digit:not(:placeholder-shown) { background: #f0ebff; }

/* ── Error box ────────────────────────────────────────────────────────────── */
.otp-error {
  background: #fff0f0; border: 1px solid #fca5a5;
  color: #b91c1c; border-radius: 8px;
  padding: 10px 14px; font-size: 0.83rem;
  text-align: center; margin-bottom: 12px;
  display: none;
}

/* ── Resend row ───────────────────────────────────────────────────────────── */
.resend-row {
  text-align: center; font-size: 0.81rem;
  color: #9b91c0; margin-top: 18px;
}

/* ── Link button ──────────────────────────────────────────────────────────── */
.link-btn {
  background: none; border: none;
  color: #4B2E83; font-weight: 600;
  cursor: pointer; text-decoration: none;
  font-size: inherit; padding: 0;
  transition: color .15s;
}
.link-btn:hover { color: #7B4FD0; text-decoration: underline; }

/* ── Back button ──────────────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: #7B4FD0; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; margin-bottom: 18px; padding: 0;
  transition: color .15s;
}
.back-btn:hover { color: #4B2E83; }

/* ── Success ring ─────────────────────────────────────────────────────────── */
.success-ring {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #f0ebff, #e6deff);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 0 0 8px rgba(75,46,131,.08);
}
.success-ring i { font-size: 2.2rem; color: #4B2E83; }

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid #ede9f8;
  border-top-color: #4B2E83;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 24px auto 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.auth-footer {
  margin-top: 22px; text-align: center;
  font-size: 0.76rem; color: #a09ab8;
  line-height: 1.6;
}
.auth-footer a { color: #7B4FD0; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-form-panel { padding: 24px 16px; }
  .auth-card { padding: 28px 20px 24px; border-radius: 16px; }
  .auth-title { font-size: 1.25rem; }
  .brand-headline { font-size: 2.1rem; }
  .otp-digit { width: 40px; height: 50px; font-size: 1.2rem; gap: 7px; }
  .otp-group { gap: 7px; }
}
