/* Auth pages — shared shell aligned with landing-home tokens */
:root {
  --mint: #00D094;
  --mint-press: #00B37E;
  --primary: #00D094;
  --ink: #020911;
  --bg-deep: #020911;
  --bg-main: #050F16;
  --page: #050F16;
  --panel: #0B1620;
  --elev: #10202C;
  --bg-card: #0B1620;
  --bg-elevated: #10202C;
  --border: #1A2C3A;
  --line: #1A2C3A;
  --text: #F4F7F8;
  --text-primary: #F4F7F8;
  --text-secondary: #9AA8B0;
  --text-muted: #6B7882;
  --muted: #9AA8B0;
  --soft: #6B7882;
  --success: #00D094;
  --danger: #FF4D67;
  --warning: #F5B942;
}

body.ba-auth {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
  --iti-hover-color: rgba(0, 208, 148, 0.12);
  --iti-border-color: var(--border);
  --iti-country-selector-bg: var(--bg-elevated);
  --iti-icon-color: var(--text-muted);
}

.ba-auth-split {
  min-height: 100vh;
  min-height: 100dvh;
}

.ba-auth > .container-fluid {
  padding: 0;
}

.ba-auth-promo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg,
      rgba(5, 15, 22, .92) 0%,
      rgba(5, 15, 22, .78) 34%,
      rgba(5, 15, 22, .42) 62%,
      rgba(5, 15, 22, .18) 100%),
    linear-gradient(180deg, rgba(5, 15, 22, .55) 0%, rgba(5, 15, 22, .2) 45%, rgba(5, 15, 22, .72) 100%),
    url("../images/landing/hero-trader.png") center 18% / cover no-repeat,
    var(--page);
  border-right: 1px solid rgba(26, 44, 58, .65);
}

.ba-auth-promo-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
}

/* TradeWise pattern: left visual stays put; right form column scrolls */
@media (min-width: 992px) {
  body.ba-auth {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .ba-auth-split {
    height: 100%;
    min-height: 0;
  }

  .ba-auth-promo {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }

  .ba-auth-promo-inner {
    height: 100%;
  }

  .ba-auth-panel {
    align-self: stretch;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .08) transparent;
  }

  .ba-auth-panel::-webkit-scrollbar {
    width: 4px;
  }

  .ba-auth-panel::-webkit-scrollbar-track {
    background: transparent;
  }

  .ba-auth-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .08);
  }
}

.ba-auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.ba-auth-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  background: transparent;
  display: block;
}

.ba-auth-logo-full {
  height: 2.5rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  background: transparent;
  display: block;
}

.ba-auth-card-brand {
  text-decoration: none;
}

.ba-auth-eyebrow {
  color: var(--mint);
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ba-auth-title {
  font-family: Outfit, "DM Sans", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fff;
}

.ba-auth-title .accent,
.ba-auth-card h1 em {
  color: var(--mint);
  font-style: normal;
}

.ba-auth-card h1 {
  font-family: Outfit, "DM Sans", sans-serif;
  letter-spacing: -0.03em;
}

.ba-auth-intro,
.ba-auth-lede {
  color: var(--muted);
  max-width: 28rem;
}

.ba-auth-muted {
  color: var(--soft);
}

.ba-auth-secondary {
  color: var(--muted);
}

.ba-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(0, 208, 148, 0.4);
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mint);
  background: rgba(0, 208, 148, 0.1);
  flex-shrink: 0;
}

.ba-feature-icon-round {
  border-radius: 50%;
}

.ba-avatar-stack {
  display: flex;
  align-items: center;
}

.ba-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  margin-left: -0.45rem;
}

.ba-avatar:first-child {
  margin-left: 0;
}

.ba-phone-group {
  display: flex;
  gap: 0.5rem;
}

.ba-phone-group .ba-dial {
  width: 5.5rem;
  flex-shrink: 0;
  padding-left: 0.65rem;
  background: var(--elev);
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 3rem;
}

.ba-auth .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239AA8B0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.ba-auth .form-select:focus {
  background-color: var(--elev);
  border-color: var(--mint);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(0, 208, 148, 0.15);
}

.ba-stats-bar {
  background: rgba(11, 22, 32, 0.82);
  border: 1px solid rgba(0, 208, 148, 0.18);
  border-radius: 1.25rem;
  backdrop-filter: blur(10px);
}

.ba-risk-box {
  background: rgba(11, 22, 32, 0.7);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.ba-auth-panel {
  background: var(--page);
}

.ba-auth-card {
  background: rgba(11, 22, 32, 0.92);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.35);
}

.ba-auth-card-wide {
  max-width: 28rem;
}

.ba-auth-tabs {
  border-bottom: 1px solid var(--line);
  gap: 1.25rem;
}

.ba-auth-tabs .nav-link {
  border: 0;
  border-radius: 0;
  color: var(--soft);
  padding: 0.65rem 0;
  background: transparent;
}

.ba-auth-tabs .nav-link.active {
  color: var(--mint);
  border-bottom: 2px solid var(--mint);
  background: transparent;
}

.ba-auth .form-control,
.ba-auth .form-select {
  background: var(--elev);
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 3rem;
  padding-left: 2.75rem;
  border-radius: 0.85rem;
}

.ba-auth .form-control:focus {
  background: var(--elev);
  border-color: var(--mint);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(0, 208, 148, 0.15);
}

.ba-auth .form-control::placeholder {
  color: var(--soft);
}

.ba-input-wrap {
  position: relative;
}

.ba-input-wrap .ba-input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--soft);
  pointer-events: none;
  z-index: 2;
}

.ba-input-wrap .ba-input-action {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--soft);
  z-index: 2;
}

.ba-auth .form-check-input:checked {
  background-color: var(--mint);
  border-color: var(--mint);
}

.ba-auth .form-check-input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 0.2rem rgba(0, 208, 148, 0.25);
}

.ba-auth .form-check-label {
  color: var(--muted);
}

.ba-auth .form-label {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ba-auth .form-text {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.ba-auth [id$="Feedback"]:empty {
  display: none;
}

.ba-auth [id$="Feedback"]:not(:empty) {
  margin-top: 0.25rem;
}

body.ba-auth .btn-primary {
  --bs-btn-color: #071018;
  --bs-btn-bg: var(--mint);
  --bs-btn-border-color: var(--mint);
  --bs-btn-hover-color: #071018;
  --bs-btn-hover-bg: var(--mint-press);
  --bs-btn-hover-border-color: var(--mint-press);
  --bs-btn-active-color: #071018;
  --bs-btn-active-bg: var(--mint-press);
  --bs-btn-active-border-color: var(--mint-press);
  --bs-btn-disabled-bg: var(--mint);
  --bs-btn-disabled-border-color: var(--mint);
  --bs-btn-disabled-color: #071018;
  --bs-btn-focus-shadow-rgb: 0, 208, 148;
}

.ba-alert-host:empty {
  display: none;
}

.ba-btn-auth {
  background-color: var(--mint);
  border-color: var(--mint);
  color: #071018;
  font-weight: 700;
  min-height: 3rem;
  border-radius: 999px;
}

body.ba-auth .btn-primary.ba-btn-auth:hover,
body.ba-auth .btn-primary.ba-btn-auth:focus,
body.ba-auth .btn-primary.ba-btn-auth:focus-visible,
.ba-btn-auth:hover,
.ba-btn-auth:focus,
.ba-btn-auth:focus-visible {
  background-color: var(--mint-press);
  border-color: var(--mint-press);
  color: #071018;
}

body.ba-auth :not(.btn-check) + .btn-primary:active,
body.ba-auth .btn-primary:first-child:active,
body.ba-auth .btn-primary.active,
body.ba-auth .btn-primary:active,
.ba-btn-auth:active,
.ba-btn-auth.active {
  background-color: var(--mint-press);
  border-color: var(--mint-press);
  color: #071018;
}

.ba-btn-social {
  background: var(--elev);
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 3rem;
  border-radius: 999px;
}

.ba-btn-social:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: var(--elev);
}

.ba-btn-outline-auth {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-weight: 600;
  min-height: 3rem;
  border-radius: 999px;
}

.ba-btn-outline-auth:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.ba-auth a.link-primary {
  color: var(--mint) !important;
  text-decoration: none;
}

.ba-auth a.link-primary:hover {
  text-decoration: underline;
}

.ba-auth .text-primary {
  color: var(--mint) !important;
}

.ba-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--soft);
  font-size: 0.85rem;
}

.ba-divider::before,
.ba-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.ba-logo-word {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ba-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 208, 148, 0.28);
  border-radius: 999px;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(0, 208, 148, 0.08);
}

.ba-auth-icon-circle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 208, 148, 0.12);
  color: var(--mint);
  font-size: 1.35rem;
  border: 1px solid rgba(0, 208, 148, 0.35);
}

body.ba-auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.ba-auth-topbar,
.ba-auth-footer {
  background: var(--page);
  border-color: var(--line);
}

.ba-auth-topbar {
  border-bottom: 1px solid var(--line);
}

.ba-auth-footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.ba-auth-body {
  flex: 1;
  min-height: 0;
}

.ba-footer-link {
  color: var(--soft);
  text-decoration: none;
}

.ba-footer-link:hover {
  color: var(--mint);
}

.ba-social {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft);
  font-size: 0.85rem;
}

.ba-req-box {
  background: rgba(0, 208, 148, 0.06);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}

.ba-req-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.ba-req-list li {
  color: var(--soft);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ba-req-list li i {
  color: var(--line);
}

.ba-req-list li.is-met {
  color: var(--muted);
}

.ba-req-list li.is-met i {
  color: var(--mint);
}

.ba-strength {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ba-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.ba-strength-bars span {
  height: 0.3rem;
  border-radius: 999px;
  background: var(--line);
}

.ba-strength-bars.level-1 span:nth-child(1) {
  background: var(--danger);
}

.ba-strength-bars.level-2 span:nth-child(-n + 2) {
  background: var(--warning);
}

.ba-strength-bars.level-3 span:nth-child(-n + 3) {
  background: var(--warning);
}

.ba-strength-bars.level-4 span {
  background: var(--success);
}

.ba-register-phone-field {
  position: relative;
  z-index: 30;
}

.ba-register-phone-field .iti {
  position: relative;
  z-index: 30;
}

.ba-auth-panel .iti {
  width: 100%;
  display: block;
}

.ba-auth-panel .iti .iti__tel-input,
.ba-auth-panel .iti input.form-control {
  width: 100%;
  min-height: 3rem;
  padding-right: 0.75rem;
  padding-left: 0;
  border-radius: 0.85rem;
  background: var(--elev);
  border: 1px solid var(--line);
  color: var(--text);
}

.ba-auth-panel .iti__selected-country-primary {
  padding-left: 0.75rem;
  padding-right: 0.35rem;
}

.ba-auth-panel .iti__selected-dial-code {
  color: var(--text);
  font-size: 0.95rem;
}

.ba-auth-panel .iti__arrow {
  border-color: var(--soft);
}

.ba-auth-panel .iti__country-list,
.ba-auth-panel .iti__country-selector {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
  color: var(--text);
  z-index: 1060;
}

.ba-auth-panel .iti__search-input-wrapper {
  border-color: var(--line);
}

.ba-auth-panel .iti__search-input {
  background: var(--panel);
  color: var(--text);
}

.ba-auth-panel .iti__country.iti__highlight,
body.ba-auth .iti__country.iti__highlight {
  background: rgba(0, 208, 148, 0.12);
}

body.ba-auth .iti--detached-country-selector .iti__country-selector,
body.ba-auth .iti--detached-country-selector .iti__country-list {
  background: var(--elev);
  border-color: var(--line);
  color: var(--text);
}

body.ba-auth .iti--detached-country-selector:not(.iti--fullscreen-popup) .iti__country-selector {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

body.ba-auth .iti--detached-country-selector .iti__search-input-wrapper {
  border-color: var(--line);
  background: var(--panel);
}

body.ba-auth .iti--detached-country-selector .iti__search-input {
  background: var(--panel);
  color: var(--text);
}

body.ba-auth .iti--detached-country-selector .iti__search-icon-svg {
  stroke: var(--soft);
}

body.ba-auth .iti--detached-country-selector .iti__country-check {
  color: var(--mint);
}

.iti--fullscreen-popup.iti--detached-country-selector {
  z-index: 2000;
}

.iti--fullscreen-popup .iti__country-selector {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--text);
  max-height: calc(100vh - 60px);
}

.iti--fullscreen-popup .iti__search-input-wrapper {
  border-color: var(--line);
}

.iti--fullscreen-popup .iti__search-input {
  background: var(--elev);
  color: var(--text);
}

.ba-register-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.ba-register-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--soft);
  font-size: 0.85rem;
}

.ba-register-step.is-active,
.ba-register-step.is-complete {
  color: var(--text);
}

.ba-register-step-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ba-register-step.is-active .ba-register-step-num {
  background: var(--mint);
  border-color: var(--mint);
  color: #071018;
}

.ba-register-step.is-complete .ba-register-step-num {
  background: rgba(0, 208, 148, 0.15);
  border-color: var(--mint);
  color: var(--mint);
}

.ba-register-step-line {
  flex: 1;
  max-width: 3.5rem;
  height: 1px;
  background: var(--line);
}

.ba-register-step-line.is-complete {
  background: var(--mint);
}

@media (max-width: 991.98px) {
  .ba-auth-promo {
    display: none !important;
  }

  .ba-auth-panel {
    flex: 0 0 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

@media (max-width: 575.98px) {
  .ba-register-step-label {
    display: none;
  }

  .ba-strength {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
  }

  .ba-phone-group .ba-dial {
    width: 4.75rem;
  }
}
