*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

:root {
  --primary: #2152e0;
  --primary-light: #4870e6;
  --primary-soft: #e3ebff;
  --accent-pink: #b84a8c;
  --accent-orange: #e0682b;
  --accent-green: #20b08a;
  --text-heading: #0c1826;
  --text-body: #2b3a55;
  --text-muted: #62748c;
  --border-light: #dde5ed;
  --surface: #ffffff;
  --bg-main: #f4f7fc;
  --error: #dc3545;
  --font-display: "DM Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", monospace;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --card-shadow: 0 8px 40px -12px rgba(0, 30, 80, 0.14);
}

body {
  font-family: var(--font-display);
  min-height: 100vh;
  display: flex;
  background: var(--bg-main);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: hidden;
}

/* ─── ambient bg ─── */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(33, 82, 224, 0.07) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse at 0% 80%,
      rgba(184, 74, 140, 0.04) 0%,
      transparent 40%
    ),
    linear-gradient(160deg, #edf3ff 0%, #f9fbff 60%, #ffffff 100%);
}

/* ═══════════════════════════════════════
       LEFT PANEL  — Form side
    ═══════════════════════════════════════ */
.auth-left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: auto;
  /* hide scrollbar track on all browsers */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.auth-left-panel::-webkit-scrollbar {
  display: none;
}

.form-shell {
  width: 100%;
  max-width: 460px;
}

/* mobile topbar (hidden on desktop) */
.mobile-topbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.mobile-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: white;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(33, 82, 224, 0.3);
}
.mobile-logo-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
}
.mobile-back {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: 2rem;
  background: white;
  transition: var(--transition);
  text-decoration: none;
}
.mobile-back:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ── Form card ── */
.auth-card {
  background: var(--surface);
  border-radius: 2rem;
  padding: clamp(1.8rem, 4vw, 2.5rem);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(210, 225, 245, 0.7);
  width: 100%;
}

.auth-card h1 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 0.4rem;
}
.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}
.auth-card .subtitle a {
  color: var(--primary);
  font-weight: 600;
}
.auth-card .subtitle a:hover {
  text-decoration: underline;
}

/* step dots */
.step-dots {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
}
.step-dot {
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  transition: var(--transition);
}
.step-dot.s1 {
  flex: 1.5;
  background: var(--primary);
}
.step-dot.s2 {
  flex: 1;
}
.step-dot.s3 {
  flex: 1;
}
.step-dot.done {
  background: var(--accent-green);
}
.step-dot.active {
  background: var(--primary);
}

/* social buttons */
.socials {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: 0.85rem;
  background: white;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(33, 82, 224, 0.12);
}

/* divider */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.divider span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ── Fields ── */
.field {
  margin-bottom: 1rem;
}

/* two-col name row */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.42rem;
}
.field-label-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-heading);
}

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

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}
.input-wrap:focus-within .input-icon {
  color: var(--primary);
}

.field input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border: 1.5px solid var(--border-light);
  border-radius: 0.9rem;
  font-size: 0.9rem;
  font-family: var(--font-display);
  color: var(--text-heading);
  background: var(--bg-main);
  transition: var(--transition);
  outline: none;
}
/* password field needs right padding for eye btn */
#password {
  padding-right: 2.8rem;
}

.field input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(33, 82, 224, 0.1);
}
.field input.error-field {
  border-color: var(--error);
}
.field input.error-field:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
.field input::placeholder {
  color: #aab4c4;
}

/* eye toggle — same fix as login.html */
.pwd-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  z-index: 2;
  width: 28px;
  height: 28px;
}
.pwd-toggle i {
  font-size: 0.85rem;
  pointer-events: none;
}
.pwd-toggle:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* password strength */
.pwd-strength {
  margin-top: 0.5rem;
}
.strength-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 0.28rem;
}
.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-light);
  transition: background 0.3s;
}
.strength-seg.weak {
  background: var(--error);
}
.strength-seg.fair {
  background: var(--accent-orange);
}
.strength-seg.good {
  background: #fbbf24;
}
.strength-seg.strong {
  background: var(--accent-green);
}
.strength-label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* field error */
.field-error {
  display: none;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  color: var(--error);
  font-family: var(--font-mono);
  margin-top: 0.35rem;
}
.field-error.show {
  display: flex;
}

/* terms */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
  margin-top: 0.2rem;
}
.terms-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  margin-top: 3px;
  cursor: pointer;
  flex-shrink: 0;
}
.terms-row label {
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}
.terms-row label a {
  color: var(--primary);
}
.terms-row label a:hover {
  text-decoration: underline;
}

/* submit */
.btn-submit {
  width: 100%;
  padding: 0.88rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(33, 82, 224, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}
.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(33, 82, 224, 0.4);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-submit.loading {
  pointer-events: none;
  opacity: 0.78;
}
.btn-text {
  position: relative;
  z-index: 1;
}
.btn-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}
.btn-submit:hover .btn-arrow {
  transform: translateX(3px);
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.btn-submit.loading .spinner {
  display: block;
}
.btn-submit.loading .btn-text,
.btn-submit.loading .btn-arrow {
  display: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* trust strip */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: 1.3rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.trust-item i {
  color: var(--accent-green);
  font-size: 0.68rem;
}

/* switch */
.auth-switch {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--primary);
  font-weight: 600;
}
.auth-switch a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════
       RIGHT PANEL  — Gradient brand side
       (same gradient + same components as login's left panel)
    ═══════════════════════════════════════ */
.auth-right-panel {
  width: 44%;
  flex-shrink: 0;
  background: linear-gradient(
    155deg,
    #1a3fcc 0%,
    #2152e0 45%,
    #3b60e8 75%,
    #b84a8c 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
  height: 100vh;
  overflow-y: auto;
  /* hide scrollbar track on all browsers */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.auth-right-panel::-webkit-scrollbar {
  display: none;
}

/* grid overlay */
.auth-right-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* radial glows */
.auth-right-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      circle at 85% 85%,
      rgba(184, 74, 140, 0.3) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 15% 10%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 40%
    );
}

/* deco rings */
.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  pointer-events: none;
  z-index: 1;
}
.ring-a {
  width: 440px;
  height: 440px;
  bottom: -160px;
  left: -160px;
}
.ring-b {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -90px;
}
.ring-c {
  width: 140px;
  height: 140px;
  top: 200px;
  left: 50px;
  background: rgba(255, 255, 255, 0.03);
}

/* all direct panel children above pseudo-elements */
.panel-top,
.panel-mid,
.panel-bot {
  position: relative;
  z-index: 2;
}

/* top: logo + back */
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.panel-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: white;
  font-family: var(--font-mono);
}
.panel-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.panel-logo-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}
.panel-logo-sub {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  padding: 0.35rem 0.85rem;
  transition: var(--transition);
  text-decoration: none;
  backdrop-filter: blur(6px);
}
.panel-back-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* eyebrow */
.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.8);
  }
}

.panel-heading {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 1rem;
}
.panel-heading .dim {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.panel-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 340px;
  margin-bottom: 2.2rem;
}

/* feature checklist */
.feat-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}
.feat-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
  background: rgba(32, 176, 138, 0.22);
  border: 1px solid rgba(32, 176, 138, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  font-size: 0.6rem;
}

/* stat cards — same as login */
.stat-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.1rem;
  padding: 0.85rem 1.1rem;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.stat-card:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(5px);
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.stat-info {
  flex: 1;
  min-width: 0;
}
.stat-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
  line-height: 1.2;
}
.stat-lbl {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.55);
}
.stat-badge {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  padding: 0.18rem 0.55rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

/* testimonial — same as login */
.testimonial {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.testi-ava {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
}
.testi-stars {
  color: #fbbf24;
  font-size: 0.6rem;
  letter-spacing: 2px;
  margin-bottom: 0.35rem;
}
.testi-quote {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.4rem;
  font-style: italic;
}
.testi-author {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.42);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: 2rem;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: var(--font-mono);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: var(--accent-green);
  color: white;
}
.toast.error {
  background: var(--error);
  color: white;
}

/* ── LOAD ANIMATION ── */
.auth-left-panel {
  animation: panelIn 0.5s ease both;
}
.auth-right-panel {
  animation: panelIn 0.5s 0.07s ease both;
}
@keyframes panelIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-card > * {
  animation: itemUp 0.4s ease both;
}
.auth-card > *:nth-child(1) {
  animation-delay: 0.1s;
}
.auth-card > *:nth-child(2) {
  animation-delay: 0.15s;
}
.auth-card > *:nth-child(3) {
  animation-delay: 0.2s;
}
.auth-card > *:nth-child(4) {
  animation-delay: 0.25s;
}
.auth-card > *:nth-child(5) {
  animation-delay: 0.3s;
}
.auth-card > *:nth-child(6) {
  animation-delay: 0.35s;
}
.auth-card > *:nth-child(7) {
  animation-delay: 0.4s;
}
.auth-card > *:nth-child(8) {
  animation-delay: 0.45s;
}
.auth-card > *:nth-child(9) {
  animation-delay: 0.5s;
}
.auth-card > *:nth-child(10) {
  animation-delay: 0.55s;
}
@keyframes itemUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════
       RESPONSIVE
    ══════════════════════════════ */
@media (max-width: 900px) {
  .auth-right-panel {
    display: none;
  }
  .auth-left-panel {
    padding: 2rem 1.5rem;
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .auth-left-panel::-webkit-scrollbar {
    display: none;
  }
  .mobile-topbar {
    display: flex;
  }
  .form-shell {
    max-width: 480px;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
}
@media (max-width: 600px) {
  .fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 480px) {
  .auth-left-panel {
    padding: 1.5rem 1rem;
  }
  .auth-card {
    padding: 1.6rem;
    border-radius: 1.4rem;
  }
  .socials {
    flex-direction: column;
  }
  .trust-strip {
    gap: 0.8rem;
  }
}
