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

:root {
  --bg: #050a14;
  --bg-deep: #03070f;
  --bg-card: rgba(6, 12, 22, 0.92);
  --border: rgba(0, 212, 255, 0.16);
  --border-strong: rgba(0, 212, 255, 0.35);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cyan: #00d4ff;
  --blue: #1a6fff;
  --green: #00e676;
  --error: #f87171;
  --grad: linear-gradient(135deg, #00d4ff 0%, #1a6fff 100%);
  --font-display: "Space Grotesk", sans-serif;
  --font-hero: Syne, "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.auth-page {
  font-family: var(--font-body);
  background: #03060e;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
}
body.auth-page a { color: inherit; text-decoration: none; }

/* Atmosphere — matches landing HUD */
.auth-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 52%;
  perspective: 320px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.auth-floor-grid {
  width: 100%;
  height: 180%;
  transform: rotateX(62deg);
  transform-origin: center top;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.14) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: authFloor 18s linear infinite;
}
.auth-scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.45) 2px 3px);
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.auth-orb-a {
  width: min(62vw, 560px);
  height: min(62vw, 560px);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.32), transparent 68%);
  top: -16%;
  left: -12%;
  animation: authOrb 16s ease-in-out infinite;
}
.auth-orb-b {
  width: min(50vw, 480px);
  height: min(50vw, 480px);
  background: radial-gradient(circle, rgba(26, 111, 255, 0.34), transparent 70%);
  bottom: 0;
  right: -14%;
  animation: authOrb 18s ease-in-out infinite reverse;
}
.auth-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, transparent 22%, rgba(3, 6, 14, 0.78) 100%),
    linear-gradient(180deg, rgba(3, 6, 14, 0.4) 0%, transparent 20%, transparent 70%, #03060e 100%);
}
.auth-frame {
  position: absolute;
  inset: 14px;
}
.auth-frame i {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(0, 212, 255, 0.5);
  border-style: solid;
}
.auth-frame i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
.auth-frame i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.auth-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.auth-frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.auth-shell.is-wide { max-width: 1240px; }
.auth-shell.is-onboard {
  max-width: 820px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
  flex-shrink: 0;
}
.auth-top .logo,
.auth-header .logo {
  font-family: var(--font-hero);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: #fff;
}
.auth-top .logo span,
.auth-header .logo span { color: var(--cyan); }
.auth-header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: rgba(0, 212, 255, 0.08);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.auth-header-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}
.auth-header-link:hover {
  color: #fff;
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.16);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.18);
  transform: translateY(-1px);
}
.auth-header-link:hover svg { transform: translateX(3px); }

.auth-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.auth-shell.is-wide .auth-stage {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
  padding-top: 8px;
}
.auth-shell.is-onboard .auth-stage {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding-top: 0;
}

.auth-rail { min-width: 0; }
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.1);
}
.auth-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: authPulse 2s infinite;
}
.auth-brand {
  font-family: var(--font-hero);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.055em;
  line-height: 0.88;
  margin-bottom: 14px;
  text-shadow: 0 0 60px rgba(0, 212, 255, 0.28);
}
.auth-brand span { color: var(--cyan); }
.auth-rail h1 {
  font-family: var(--font-hero);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 12ch;
  background: linear-gradient(90deg, #fff 20%, #00d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-rail-lead {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 34ch;
  line-height: 1.65;
  margin-bottom: 28px;
}
.auth-telemetry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(0, 212, 255, 0.18);
  border: 1px solid rgba(0, 212, 255, 0.18);
  max-width: 460px;
}
.auth-telemetry > div {
  background: rgba(4, 10, 20, 0.82);
  padding: 14px 12px;
}
.auth-telemetry span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.auth-telemetry strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: #fff;
}

/* Console panel */
.auth-console {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(12, 24, 42, 0.94) 0%, rgba(3, 8, 16, 0.97) 100%);
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 70px rgba(0, 212, 255, 0.08),
    0 40px 90px rgba(0, 0, 0, 0.5);
  padding: 28px 26px 24px;
}
.auth-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 12px 12px 0 -11px rgba(0, 212, 255, 0.4),
    inset -12px -12px 0 -11px rgba(0, 212, 255, 0.4);
  z-index: 2;
}
.auth-console-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.06) 48%, transparent 62%);
  animation: authSheen 8s ease-in-out infinite;
}
.auth-console > form,
.auth-console > .auth-footer-link,
.auth-console > .auth-body {
  position: relative;
  z-index: 3;
}

.auth-console-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.auth-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
}
.auth-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: authPulse 2s infinite;
}

/* Legacy container (if any leftover) */
.auth-container,
.auth-header,
.auth-bg { }

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background: rgba(0, 212, 255, 0.06);
}
.auth-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.form-step h3,
.auth-body > h3 {
  font-family: var(--font-hero);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: #fff;
}
.form-step > p,
.auth-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.progress-indicator { margin-bottom: 26px; }
.progress-bar-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
  transition: width 0.45s var(--ease);
}
.step-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.onboard-track ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 12px;
  position: relative;
}
.onboard-track ol::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.28), transparent);
  z-index: 0;
}
.onboard-track li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.onboard-track li i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid rgba(0, 212, 255, 0.24);
  color: var(--text-dim);
  background: rgba(3, 8, 16, 0.92);
  transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.onboard-track li span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.onboard-track li.is-current i {
  background: var(--grad);
  color: #041018;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.5);
  transform: scale(1.08);
}
.onboard-track li.is-current span { color: var(--cyan); }
.onboard-track li.is-done i {
  background: rgba(0, 230, 118, 0.16);
  border-color: rgba(0, 230, 118, 0.5);
  color: var(--green);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.18);
}
.onboard-track li.is-done span { color: rgba(0, 230, 118, 0.8); }

.auth-form-container { position: relative; }
#login-form .form-step,
#reset-form .form-step,
#verify-form .form-step { display: none; }
#login-form .form-step.active,
#reset-form .form-step.active,
#verify-form .form-step.active {
  display: block;
  animation: authIn 0.45s var(--ease);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

#registration-form .form-step,
#reset-form .form-step {
  position: absolute;
  width: 100%;
  top: 0; left: 0;
  opacity: 0;
  visibility: hidden;
  display: block;
  transform: translateX(24px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s 0.35s;
}
#registration-form .form-step.active,
#reset-form .form-step.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#registration-form .form-step.inactive-prev { transform: translateX(-24px); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) {
  .form-grid.two-columns { grid-template-columns: 1fr 1fr; }
  .form-grid .full-width { grid-column: 1 / -1; }
}

.form-group { position: relative; margin-bottom: 20px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
  display: block;
}
.form-group input,
.form-group select {
  width: 100%;
  height: 50px;
  background-color: #07111f;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 0;
  padding: 0 16px;
  font-size: 0.98rem;
  color: #e8eef7;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  color-scheme: dark;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #07111f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
.form-group select option,
.form-group select optgroup {
  background-color: #07111f;
  color: #e8eef7;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.14);
  background-color: #0b1a2e;
}
.form-group input::placeholder { color: var(--text-dim); }

#otp_code {
  font-family: var(--font-mono);
  letter-spacing: 0.42em;
  text-align: center;
  font-size: 1.2rem;
}

.form-group.floating { margin-bottom: 28px; }
.form-group.floating .form-icon {
  position: absolute;
  top: 16px;
  left: 14px;
  color: var(--text-dim);
  z-index: 1;
  font-size: 0.9rem;
}
.form-group.floating input {
  padding: 18px 16px 8px 42px;
  height: 56px;
}
.form-group.floating:not(:has(.form-icon)) input { padding-left: 16px; }
.form-group.floating label {
  position: absolute;
  top: 18px;
  left: 42px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-dim);
  pointer-events: none;
  transition: 0.2s ease all;
}
.form-group.floating:not(:has(.form-icon)) label { left: 16px; }
.form-group.floating input:focus ~ label,
.form-group.floating input:not(:placeholder-shown) ~ label {
  top: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}
.form-group.floating .focus-border { display: none; }

.password-group .password-toggle,
.form-group.floating .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  z-index: 2;
  padding: 6px;
}
.password-group .password-toggle:hover { color: var(--cyan); }

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -8px 0 22px;
  flex-wrap: wrap;
}
.form-group-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.form-group-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}
.forgot-password-link {
  font-size: 0.88rem;
  color: var(--cyan);
  font-weight: 500;
}
.forgot-password-link:hover { text-decoration: underline; }

.error-message {
  display: none;
  color: var(--error);
  font-size: 0.78rem;
  margin-top: 6px;
}
.form-group.has-error .error-message,
.plan-selection-grid.has-error .error-message { display: block; }
.form-group.has-error input,
.form-group.has-error select { border-color: rgba(248, 113, 113, 0.5); }
.auth-field-hint {
  margin: 0.45rem 0 0;
  color: var(--text-dim, #7c8ea3);
  font-size: 0.78rem;
  line-height: 1.45;
}
#network-group[hidden],
#network-group.is-off {
  display: none !important;
}
#network-group:not([hidden]):not(.is-off) {
  display: block !important;
}
.payout-nets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.payout-net {
  appearance: none;
  flex: 1 1 140px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: #07111f;
  color: #e8eef7;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.payout-net:hover,
.payout-net.is-on {
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.14);
  background: #0b1a2e;
}
#network-group select[data-payout-network] { display: none; }
.form-group.valid input { border-color: rgba(0, 230, 118, 0.4); }

.password-strength {
  margin-top: 10px;
  display: none;
  align-items: center;
  gap: 10px;
}
.password-strength.active { display: flex; }
.strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.strength-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 33%;
  height: 100%;
  transition: width 0.3s, background 0.3s;
}
.password-strength.strength-weak .strength-bar::before { width: 33%; background: #f87171; }
.password-strength.strength-medium .strength-bar::before { width: 66%; background: #fbbf24; }
.password-strength.strength-strong .strength-bar::before { width: 100%; background: var(--green); }
.strength-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  min-width: 56px;
  text-align: right;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: var(--grad);
  color: #041018;
  box-shadow: 0 10px 32px rgba(0, 212, 255, 0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s, border-color 0.2s, background 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
}
.btn-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.38) 48%, transparent 72%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn-nav:hover:not(:disabled)::before {
  animation: authBtnSheen 0.75s ease;
}
.btn-nav:hover:not(:disabled) {
  box-shadow: 0 16px 40px rgba(0, 212, 255, 0.42);
  filter: brightness(1.06);
}
.btn-nav:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}
.btn-nav:not(:disabled) {
  animation: authBtnGlow 2.8s ease-in-out infinite;
}
.btn-nav:disabled {
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
  filter: none;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(26, 111, 255, 0.2));
  color: rgba(248, 250, 252, 0.62);
  border-color: rgba(0, 212, 255, 0.16);
}
.btn-nav:disabled .btn-icon { opacity: 0.45; }
.btn-nav.btn-full { width: 100%; }
.btn-nav .btn-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.btn-nav .btn-icon svg {
  width: 18px;
  height: 18px;
}
.btn-nav.btn-next:hover:not(:disabled) .btn-icon { transform: translateX(4px); }
.btn-nav.btn-prev:hover:not(:disabled) .btn-icon { transform: translateX(-4px); }
.btn-nav.btn-prev {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(0, 212, 255, 0.22);
  box-shadow: none;
  animation: none;
  backdrop-filter: blur(10px);
}
.btn-nav.btn-prev::before { opacity: 0.35; }
.btn-nav.btn-prev:hover:not(:disabled) {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.12);
  filter: none;
}

.form-navigation {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}
.form-navigation .btn-prev { min-width: 132px; }
.form-navigation .btn-next { flex: 1; }

.btn-nav .loader { display: none; }
.btn-nav.loading .btn-text,
.btn-nav.loading .btn-icon { visibility: hidden; }
.btn-nav.loading .loader {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
}
.loader-svg {
  width: 100%;
  height: 100%;
  animation: authSpin 1.2s linear infinite;
}
.loader-circle {
  fill: none;
  stroke: #041018;
  stroke-width: 4;
  stroke-dasharray: 80;
  stroke-dashoffset: 60;
  stroke-linecap: round;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-footer-link {
  margin-top: 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.auth-footer-link a {
  color: var(--cyan);
  font-weight: 600;
}
.auth-footer-link a:hover { text-decoration: underline; }

.puzzle-container { margin: 12px 0 8px; }
.puzzle-slider {
  position: relative;
  height: 56px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 212, 255, 0.22);
  overflow: hidden;
  user-select: none;
  box-shadow: inset 0 0 24px rgba(0, 212, 255, 0.06);
}
.puzzle-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.28), rgba(26, 111, 255, 0.28));
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.2);
}
.puzzle-thumb {
  position: absolute;
  top: 4px; left: 4px;
  width: 48px; height: 48px;
  background: var(--grad);
  color: #041018;
  display: grid;
  place-items: center;
  font-weight: 700;
  cursor: grab;
  z-index: 2;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 212, 255, 0.38);
  animation: authThumbPulse 1.8s ease-in-out infinite;
  touch-action: none;
}
.puzzle-thumb:active { cursor: grabbing; }
.puzzle-slider > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}
.puzzle-slider.completed { border-color: rgba(0, 230, 118, 0.35); }
.puzzle-slider.completed .puzzle-fill {
  width: 100% !important;
  background: rgba(0, 230, 118, 0.18);
}
.puzzle-slider.completed .puzzle-thumb {
  background: var(--green);
  color: #041018;
  animation: none;
}
.puzzle-slider.completed > span { opacity: 0; }

.plan-selection-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.plan-group-label {
  margin: 10px 0 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.plan-card-select {
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(0, 212, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.plan-card-select::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s;
}
.plan-card-select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.plan-card-select:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.plan-card-select.selected {
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.14);
}
.plan-card-select.selected::before { opacity: 1; }
.plan-card-select.selected::after {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23041018' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}
.plan-card-select h4 {
  font-family: var(--font-hero);
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.plan-card-select span { color: var(--text-muted); font-size: 0.88rem; }
.plan-card-select .bonus { color: var(--cyan); font-family: var(--font-mono); }

.interest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border: 1px solid rgba(0, 212, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.interest-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.06);
}
.interest-card:has(input:checked) {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(0, 212, 255, 0.1);
}
.interest-card input { accent-color: var(--cyan); width: 18px; height: 18px; }
.interest-card label { margin: 0; color: var(--text); cursor: pointer; }

.success-step .btn-nav { min-width: 220px; }

.info-box {
  padding: 12px 14px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.skip-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.skip-link:hover { color: var(--cyan); }

.success-step { text-align: center; padding: 20px 0; }
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  stroke: var(--cyan);
  stroke-width: 2;
}
.success-icon-circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: authCircle 0.6s ease forwards; }
.success-icon-check { stroke-dasharray: 48; stroke-dashoffset: 48; animation: authCheck 0.3s 0.5s ease forwards; }

@keyframes authCircle { to { stroke-dashoffset: 0; } }
@keyframes authCheck { to { stroke-dashoffset: 0; } }
@keyframes authPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}
@keyframes authOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, 4%) scale(1.08); }
}
@keyframes authFloor {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 56px, 56px 0; }
}
@keyframes authSheen {
  0%, 70% { transform: translateX(-40%); opacity: 0; }
  80% { opacity: 1; }
  100% { transform: translateX(60%); opacity: 0; }
}
@keyframes authBtnSheen {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}
@keyframes authBtnGlow {
  0%, 100% { box-shadow: 0 10px 32px rgba(0, 212, 255, 0.26); }
  50% { box-shadow: 0 16px 44px rgba(0, 212, 255, 0.5); }
}
@keyframes authThumbPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(0, 212, 255, 0.32); transform: translateX(0); }
  50% { box-shadow: 0 10px 28px rgba(0, 212, 255, 0.55); transform: translateX(3px); }
}

#google_translate_element { display: none !important; }

@media (max-width: 900px) {
  .auth-frame { display: none; }
  .auth-stage,
  .auth-shell.is-wide .auth-stage,
  .auth-shell.is-onboard .auth-stage {
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: stretch;
  }
  .auth-brand { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .auth-rail h1 { max-width: none; font-size: 1.45rem; }
  .auth-rail-lead { margin-bottom: 16px; }
  .auth-telemetry { max-width: none; }
  .auth-shell { padding: 12px 16px 28px; }
  .auth-console { padding: 22px 18px 20px; }
}

@media (max-width: 600px) {
  .onboard-track li span { display: none; }
  .onboard-track li i { width: 24px; height: 24px; font-size: 10px; }
  .onboard-track ol { gap: 2px; }
  .onboard-track ol::before { top: 12px; left: 6%; right: 6%; }
  .form-navigation .btn-prev { min-width: 108px; padding: 0 14px; }
}

@media (max-width: 520px) {
  .auth-telemetry {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: none;
    border: none;
  }
  .auth-telemetry > div {
    flex: 1 1 30%;
    min-width: 0;
    border: 1px solid rgba(0, 212, 255, 0.16);
    padding: 10px 12px;
  }
  .auth-top .logo { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
