/* ============================================================
   AUTH PAGES STYLES — TRADE MASTERS PREMIUM v3.0
   4D ANIMATED BRAND PANEL
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 45fr 55fr;
  background: var(--clr-bg-primary);
  overflow: hidden;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LEFT BRAND PANEL — 4D ANIMATED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-brand-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #04060E;
}

/* Animated 4D Canvas */
.auth-canvas-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
#auth-4d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

/* Deep atmosphere overlays */
.auth-canvas-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 15%, rgba(0,229,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 80%, rgba(157,110,255,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0,255,163,0.04) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}
.auth-canvas-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 30% 40%, black 10%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

/* Animated orbital rings */
.auth-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
  z-index: 3;
}
.auth-orbit-ring-1 {
  width: 320px; height: 320px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(0,229,255,0.08);
  box-shadow: inset 0 0 40px rgba(0,229,255,0.03), 0 0 40px rgba(0,229,255,0.03);
  animation: orbit-spin-1 18s linear infinite;
}
.auth-orbit-ring-2 {
  width: 500px; height: 500px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(157,110,255,0.06);
  box-shadow: inset 0 0 60px rgba(157,110,255,0.02), 0 0 60px rgba(157,110,255,0.02);
  animation: orbit-spin-2 28s linear infinite reverse;
}
.auth-orbit-ring-3 {
  width: 700px; height: 700px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(0,255,163,0.04);
  animation: orbit-spin-1 40s linear infinite;
}
@keyframes orbit-spin-1 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes orbit-spin-2 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Orbit dot accents */
.auth-orbit-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clr-cyan);
  box-shadow: 0 0 10px 3px rgba(0,229,255,0.5);
}
.auth-orbit-ring-1 .auth-orbit-dot { top: -3px; left: calc(50% - 3px); }
.auth-orbit-ring-2 .auth-orbit-dot {
  top: -3px; left: calc(50% - 3px);
  background: #9D6EFF;
  box-shadow: 0 0 10px 3px rgba(157,110,255,0.5);
}

/* Central glow orb */
.auth-center-orb {
  position: absolute;
  width: 180px; height: 180px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
}
.auth-center-orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.15) 0%, rgba(157,110,255,0.08) 40%, transparent 70%);
  filter: blur(18px);
  animation: orb-pulse 4s ease-in-out infinite;
}
.auth-center-orb::after {
  content: '';
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,163,0.1) 0%, transparent 70%);
  filter: blur(12px);
  animation: orb-pulse 4s ease-in-out infinite 2s;
}
@keyframes orb-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

/* Brand content stacked on top */
.auth-brand-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 100px 3rem 2rem 3rem;
}

.auth-brand-bottom {
  position: relative;
  z-index: 10;
  padding: 0 3rem 2.5rem 3rem;
}

/* Headline */
.auth-brand-headline {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  margin-bottom: var(--space-4);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(0,229,255,0.2);
}

.auth-brand-sub {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.75;
  max-width: 340px;
}

/* Animated floating metrics */
.auth-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: var(--space-6);
}
.auth-metric-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 0.875rem 0.75rem;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: card-float 6s ease-in-out infinite;
}
.auth-metric-card:nth-child(2) { animation-delay: 2s; }
.auth-metric-card:nth-child(3) { animation-delay: 4s; }
@keyframes card-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}
.auth-metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-brand, linear-gradient(90deg,#00E5FF,#9D6EFF,#00FFA3));
  opacity: 0.6;
}
.auth-metric-card:hover {
  border-color: rgba(0,229,255,0.2);
  box-shadow: 0 8px 32px rgba(0,229,255,0.08);
  transform: translateY(-6px);
}
.auth-metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  line-height: 1;
  margin-bottom: 4px;
}
.auth-metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

/* Live ticker strip */
.auth-ticker-strip {
  margin-top: var(--space-5);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.auth-ticker-item {
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.12);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--clr-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: ticker-glow 3s ease-in-out infinite;
}
.auth-ticker-item:nth-child(2) { animation-delay: 1s; }
.auth-ticker-item:nth-child(3) { animation-delay: 2s; }
@keyframes ticker-glow {
  0%, 100% { border-color: rgba(0,229,255,0.12); }
  50%       { border-color: rgba(0,229,255,0.28); box-shadow: 0 0 12px rgba(0,229,255,0.1); }
}
.auth-ticker-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--clr-emerald, #00FFA3);
  box-shadow: 0 0 6px var(--clr-emerald, #00FFA3);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Trust chips */
.auth-trust { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Legacy compatibility */
.auth-brand-glow,
.auth-brand-glow-2 { display: none; }

.auth-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.auth-stat {
  background: var(--clr-bg-glass);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
}
.auth-stat-val {
  font-size: var(--fs-xl);
  font-weight: 800;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}
.auth-stat-label {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RIGHT FORM PANEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px var(--space-8) var(--space-10);
  overflow-y: auto;
  min-height: 100vh;
  box-sizing: border-box;
  background: rgba(5,7,13,0.6);
}
.auth-form-inner {
  width: 100%;
  max-width: 440px;
}
.auth-form-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  text-decoration: none;
}
.auth-heading {
  font-size: var(--fs-3xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.auth-subheading {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}
.auth-divider { display: flex; align-items: center; gap: var(--space-4); margin-block: var(--space-6); }
.auth-divider-line { flex: 1; height: 1px; background: var(--clr-border); }
.auth-divider-text { font-size: var(--fs-xs); color: var(--clr-text-muted); }

/* OTP Input */
.otp-inputs {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin: var(--space-5) 0;
}
.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: var(--fs-2xl);
  font-weight: 700;
  background: var(--clr-bg-glass);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text-primary);
  outline: none;
  transition: all var(--transition-base);
  caret-color: var(--clr-neon-blue);
}
.otp-input:focus {
  border-color: var(--clr-neon-blue);
  box-shadow: 0 0 0 4px var(--clr-neon-blue-glow);
  background: rgba(0,212,255,0.03);
}

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--clr-bg-glass);
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: all var(--transition-base);
  flex-shrink: 0;
}
.step-dot.active {
  background: var(--grad-brand);
  border-color: var(--clr-cyan);
  color: #05070D;
  box-shadow: 0 0 20px rgba(0,229,255,0.4);
}
.step-dot.done {
  background: var(--clr-emerald);
  border-color: var(--clr-emerald);
  color: var(--clr-text-inverse);
}
.step-line { flex: 1; height: 2px; background: var(--clr-border); transition: background var(--transition-base); }
.step-line.done { background: var(--clr-emerald); }

/* Password strength */
.password-strength {
  margin-top: var(--space-2);
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--clr-border);
  overflow: hidden;
}
.password-strength-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: all 0.4s ease;
  width: 0%;
}

/* Auth Footer Link */
.auth-footer-link {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
}
.auth-footer-link a {
  color: var(--clr-cyan);
  font-weight: 600;
  transition: opacity var(--t-fast);
}
.auth-footer-link a:hover { opacity: 0.8; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AUTH HEADER BAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  padding: 0 var(--space-8);
  display: flex;
  align-items: center;
  z-index: 100;
  background: linear-gradient(180deg, rgba(5,7,13,0.4) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.auth-header-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(0,229,255,0.5));
  animation: logo-float 4s ease-in-out infinite;
  flex-shrink: 0;
}
.logo-svg { width: 32px; height: 32px; display: block; }
@keyframes logo-float {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(0,229,255,0.5)); transform: translateY(0); }
  50%       { filter: drop-shadow(0 0 18px rgba(0,229,255,0.85)); transform: translateY(-2px); }
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--font-heading, sans-serif);
  font-weight: 800;
  font-size: var(--fs-lg);
  letter-spacing: -0.03em;
  color: var(--clr-text-primary);
}
.logo-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-back-home {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  color: var(--clr-text-secondary);
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  padding: 8px 16px;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.btn-back-home:hover {
  background: rgba(0,229,255,0.08);
  border-color: rgba(0,229,255,0.25);
  color: var(--clr-cyan);
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(0,229,255,0.1);
}
.back-link { display: none; }

/* Form error */
.form-error {
  font-size: var(--fs-xs);
  color: var(--clr-red);
  margin-top: var(--space-1);
  display: none;
}
.form-group.has-error .form-input { border-color: var(--clr-red); }
.form-group.has-error .form-error { display: block; }

/* Phone input */
.phone-prefix-select {
  position: absolute;
  left: 40px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--clr-text-primary);
  font-size: var(--fs-base);
  font-weight: 600;
  outline: none;
  cursor: pointer;
  width: 75px; height: 40px;
  padding-right: 4px;
  appearance: none;
  -webkit-appearance: none;
}
.phone-prefix-select option { background: #0D111C; color: #FFF; font-size: 14px; padding: 8px; }
.form-input.with-prefix { padding-left: 120px; }

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.custom-checkbox {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid var(--clr-border);
  background: var(--clr-bg-glass);
  flex-shrink: 0;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 2px;
  position: relative;
}
.custom-checkbox:checked { background: var(--clr-neon-blue); border-color: var(--clr-neon-blue); }
.custom-checkbox:checked::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 11px; font-weight: 800;
}

/* Phone row */
.phone-row { display: flex; gap: var(--space-4); margin-bottom: var(--space-5); }
.phone-dial-code-prefix-inline {
  position: absolute;
  left: var(--space-4); top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-primary);
  font-weight: 600;
  font-size: var(--fs-base);
  pointer-events: none;
  user-select: none;
}
.form-input.country-select {
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  padding-right: 36px; cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Password toggle buttons */
#toggle-pass, #toggle-reg-pass, #toggle-fp-pass {
  color: var(--clr-text-secondary) !important;
  opacity: 0.7;
  transition: opacity var(--t-fast), color var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
#toggle-pass:hover, #toggle-reg-pass:hover, #toggle-fp-pass:hover {
  color: var(--clr-cyan) !important; opacity: 1;
}
#toggle-pass svg, #toggle-reg-pass svg, #toggle-fp-pass svg {
  display: block; transition: transform var(--t-fast);
}
#toggle-pass:hover svg, #toggle-reg-pass:hover svg, #toggle-fp-pass:hover svg { transform: scale(1.1); }
#toggle-pass:active svg, #toggle-reg-pass:active svg, #toggle-fp-pass:active svg { transform: scale(0.95); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1023px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-header { padding: 0 var(--space-6); }
  .auth-form-panel {
    padding: var(--space-8) var(--space-6);
    padding-top: 120px !important;
    min-height: 100vh;
  }
}
@media (max-width: 479px) {
  .auth-header { padding: 0 var(--space-4); }
  .auth-form-panel {
    padding: var(--space-6) var(--space-4);
    padding-top: 100px !important;
  }
  .otp-input { width: 44px; height: 52px; font-size: var(--fs-xl); }
}
