:root {
  --auth-ink: #11172d;
  --auth-navy: #111b3d;
  --auth-muted: #7b849b;
  --auth-line: #e6eaf3;
  --auth-surface: #ffffff;
  --auth-page: #f5f7fc;
  --auth-accent: #6b5cf6;
  --auth-accent-dark: #5145d8;
  --auth-teal: #36d4c4;
  --auth-danger: #c83c58;
  --auth-shadow: 0 26px 80px rgba(30, 41, 88, 0.16);
  --auth-radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--auth-page);
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-ink);
  background: var(--auth-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 0.92fr) minmax(520px, 1.08fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 36px);
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px);
  color: #fff;
  background:
    radial-gradient(circle at 10% 10%, rgba(101, 125, 255, 0.28), transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(54, 212, 196, 0.18), transparent 28%),
    linear-gradient(150deg, #101632 0%, #182656 55%, #203d79 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--auth-radius);
  isolation: isolate;
}

.auth-showcase::before,
.auth-showcase::after {
  position: absolute;
  z-index: -1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.auth-showcase::before {
  top: 19%;
  right: -140px;
  width: 390px;
  height: 390px;
}

.auth-showcase::after {
  bottom: -180px;
  left: -120px;
  width: 390px;
  height: 390px;
  border-color: rgba(54, 212, 196, 0.17);
}

.brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8d7dff, #4a9dff);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 15px;
  box-shadow: 0 12px 28px rgba(65, 72, 190, 0.38);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.showcase-content {
  width: min(100%, 560px);
  margin: auto 0;
  padding: clamp(38px, 7vh, 92px) 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: var(--auth-teal);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(54, 212, 196, 0.12);
}

.showcase-copy h1 {
  max-width: 560px;
  margin: 20px 0 18px;
  color: #fff;
  font-size: clamp(38px, 4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.showcase-copy h1 em {
  color: var(--auth-teal);
  font-style: normal;
}

.showcase-copy p {
  max-width: 470px;
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 15px;
  line-height: 1.75;
}

.showcase-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.showcase-stat {
  padding: 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.showcase-stat strong {
  display: block;
  color: #fff;
  font-size: 17px;
}

.showcase-stat span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  line-height: 1.35;
}

.preview-card {
  width: min(100%, 390px);
  margin-top: 38px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(8, 14, 40, 0.25);
  backdrop-filter: blur(16px);
  transform: rotate(-2deg);
}

.preview-top,
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-top {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
}

.live-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: #7ff4dc;
  background: rgba(54, 212, 196, 0.12);
  border: 1px solid rgba(127, 244, 220, 0.18);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.live-pill::before {
  width: 5px;
  height: 5px;
  content: "";
  background: #7ff4dc;
  border-radius: 50%;
}

.preview-balance {
  margin: 23px 0 20px;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.preview-balance small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.preview-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 56px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.preview-bars i {
  display: block;
  flex: 1;
  min-height: 8px;
  background: linear-gradient(#82f0dc, #5e74ff);
  border-radius: 5px 5px 2px 2px;
  opacity: 0.9;
}

.preview-bars i:nth-child(1) { height: 32%; }
.preview-bars i:nth-child(2) { height: 52%; }
.preview-bars i:nth-child(3) { height: 43%; }
.preview-bars i:nth-child(4) { height: 74%; }
.preview-bars i:nth-child(5) { height: 64%; }
.preview-bars i:nth-child(6) { height: 94%; }

.preview-footer {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.preview-footer strong {
  color: #9af3e2;
}

.showcase-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.showcase-footer svg {
  color: var(--auth-teal);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(20px, 5vw, 76px);
  background: var(--auth-page);
}

.auth-panel-inner {
  width: min(100%, 520px);
}

.auth-panel-inner--wide {
  width: min(100%, 660px);
}

.mobile-brand {
  display: none;
  color: var(--auth-ink);
  margin-bottom: 38px;
}

.mobile-brand .brand-mark {
  color: #fff;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h2 {
  margin: 12px 0 9px;
  color: var(--auth-ink);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.auth-heading p {
  max-width: 470px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form {
  margin: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label,
.field > label {
  color: #3e4962;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.input-shell {
  position: relative;
}

.input-shell > svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  color: #9aa4ba;
  pointer-events: none;
  transform: translateY(-50%);
}

.input-shell input,
.input-shell select,
.field > input,
.field > select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  color: var(--auth-ink);
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  outline: 0;
  box-shadow: 0 4px 12px rgba(30, 41, 88, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input-shell input {
  padding-left: 45px;
}

.input-shell select {
  padding-left: 45px;
  appearance: auto;
}

.input-shell input::placeholder,
.field input::placeholder {
  color: #abb3c3;
}

.input-shell:focus-within input,
.input-shell:focus-within select,
.field > input:focus,
.field > select:focus {
  border-color: rgba(107, 92, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(107, 92, 246, 0.1), 0 8px 20px rgba(30, 41, 88, 0.06);
}

.field-help {
  margin: -2px 0 0;
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.45;
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0 23px;
  color: var(--auth-muted);
  font-size: 11px;
}

.form-meta a,
.auth-divider a {
  color: var(--auth-accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.form-meta a:hover,
.auth-divider a:hover {
  text-decoration: underline;
}

.security-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.security-hint svg {
  color: var(--auth-teal);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-button {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-accent), #4b8fff);
  box-shadow: 0 15px 26px rgba(89, 85, 224, 0.23);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  box-shadow: 0 18px 32px rgba(89, 85, 224, 0.3);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button-arrow {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-size: 16px;
}

.auth-message {
  min-height: 0;
  margin: 14px 0 0;
  padding: 0;
  color: var(--auth-danger);
  font-size: 12px;
  line-height: 1.5;
}

.auth-message:not(:empty) {
  padding: 11px 13px;
  background: #fff0f3;
  border: 1px solid #ffd6df;
  border-radius: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 34px;
  color: #a0a8b9;
  font-size: 10px;
}

.auth-footnote svg {
  color: var(--auth-teal);
}

.registration-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: -4px 0 28px;
}

.progress-item {
  display: grid;
  gap: 7px;
  color: #9aa4b8;
  font-size: 10px;
  font-weight: 800;
}

.progress-item::before {
  height: 4px;
  content: "";
  background: #e6eaf3;
  border-radius: 999px;
}

.progress-item.active {
  color: var(--auth-accent-dark);
}

.progress-item.active::before {
  background: linear-gradient(90deg, var(--auth-accent), var(--auth-teal));
}

.form-grid--registration {
  margin-bottom: 18px;
}

.full-field {
  grid-column: 1 / -1;
}

.notice,
.error {
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.5;
}

.notice {
  padding: 12px 14px;
  color: #26536a;
  background: #eafbf8;
  border: 1px solid #c8f0e9;
  border-radius: 13px;
}

.error {
  color: var(--auth-danger);
}

.hidden {
  display: none !important;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-card {
  display: flex;
  flex-direction: column;
  min-height: 184px;
  padding: 17px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  box-shadow: 0 7px 18px rgba(30, 41, 88, 0.035);
}

.verification-card--whatsapp {
  border-color: rgba(54, 212, 196, 0.35);
}

.verification-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.verification-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #15766c;
  background: #e8fbf6;
  border-radius: 12px;
}

.verification-card h3 {
  margin: 16px 0 5px;
  color: var(--auth-ink);
  font-size: 14px;
}

.verification-card p {
  flex: 1;
  margin: 0 0 15px;
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.55;
}

.verification-card p strong {
  color: var(--auth-ink);
}

.secondary-button {
  min-height: 42px;
  color: var(--auth-accent-dark);
  background: #f0efff;
  border: 1px solid #ddd9ff;
  box-shadow: none;
}

.verification-card .secondary-button,
.verification-card .primary-button {
  width: 100%;
}

.otp-panel,
.referral-panel {
  margin-top: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 17px;
}

.otp-panel label,
.referral-panel label {
  display: grid;
  gap: 8px;
  color: #3e4962;
  font-size: 12px;
  font-weight: 800;
}

.otp-panel input,
.referral-panel input {
  min-height: 49px;
  padding: 0 13px;
  color: var(--auth-ink);
  background: #fbfcff;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  outline: 0;
}

.otp-panel input:focus,
.referral-panel input:focus {
  border-color: rgba(107, 92, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(107, 92, 246, 0.1);
}

.countdown {
  margin: 10px 0;
  color: var(--auth-muted);
  font-size: 11px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.referral-panel h3 {
  margin: 0 0 6px;
  color: var(--auth-ink);
  font-size: 16px;
}

.referral-panel > p {
  margin: 0 0 15px;
  color: var(--auth-muted);
  font-size: 12px;
}

.referral-panel .primary-button,
.referral-panel .secondary-button {
  width: auto;
}

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: minmax(330px, 0.82fr) minmax(470px, 1.18fr);
  }

  .auth-showcase {
    padding: 38px;
  }

  .showcase-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-stat:last-child {
    display: none;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    display: block;
    padding: 0;
  }

  .auth-showcase {
    min-height: auto;
    padding: 28px clamp(22px, 6vw, 60px) 34px;
    border-radius: 0 0 28px 28px;
  }

  .showcase-content {
    padding: 40px 0 0;
  }

  .showcase-copy h1 {
    max-width: 580px;
    font-size: clamp(36px, 8vw, 54px);
  }

  .preview-card {
    margin-top: 28px;
  }

  .showcase-footer {
    margin-top: 34px;
  }

  .auth-panel {
    padding: 42px clamp(22px, 6vw, 60px) 60px;
  }

  .mobile-brand {
    display: none;
  }
}

@media (max-width: 580px) {
  .auth-showcase {
    padding: 22px 19px 26px;
    border-radius: 0 0 24px 24px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .showcase-content {
    padding-top: 34px;
  }

  .showcase-copy h1 {
    margin-top: 15px;
    font-size: 37px;
  }

  .showcase-copy p {
    font-size: 13px;
  }

  .showcase-stats {
    gap: 7px;
    margin-top: 24px;
  }

  .showcase-stat {
    padding: 11px;
  }

  .showcase-stat strong {
    font-size: 14px;
  }

  .showcase-stat span {
    font-size: 9px;
  }

  .preview-card {
    width: 100%;
    margin-top: 22px;
    padding: 15px;
  }

  .preview-balance {
    margin: 17px 0 14px;
    font-size: 29px;
  }

  .auth-panel {
    padding: 34px 19px 46px;
  }

  .auth-heading {
    margin-bottom: 23px;
  }

  .auth-heading h2 {
    font-size: 31px;
  }

  .field-grid,
  .verification-grid {
    grid-template-columns: 1fr;
  }

  .form-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .auth-divider {
    flex-wrap: wrap;
    margin-top: 22px;
  }

  .auth-footnote {
    align-items: flex-start;
    text-align: center;
  }

  .panel-actions {
    justify-content: stretch;
  }

  .panel-actions .secondary-button,
  .panel-actions .primary-button {
    flex: 1 1 150px;
  }
}

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

/* Mobile app auth layout: put the form in the first viewport. */
@media (max-width: 860px) {
  body.auth-page { min-height: 100dvh; background: #f5f7fc; }
  .auth-shell { min-height: 100dvh; display: block; padding: 0; }
  .auth-showcase { display: none; }
  .auth-panel { min-height: 100dvh; padding: 20px 16px 28px; display: flex; align-items: flex-start; justify-content: center; background: var(--auth-page); }
  .auth-panel-inner, .auth-panel-inner--wide { width: min(100%, 430px); padding: 22px 18px 24px; border: 1px solid var(--auth-line); border-radius: 24px; background: var(--auth-surface); box-shadow: 0 16px 40px rgba(30, 41, 88, .09); }
  .auth-heading { margin-bottom: 18px; }
  .auth-heading h2 { font-size: 27px; margin-top: 6px; }
  .auth-heading p { font-size: 12px; line-height: 1.45; }
  .auth-form { gap: 12px; }
  .field-grid, .form-grid--registration { gap: 11px; }
  .field { gap: 5px; }
  .field-help { margin-top: -4px; font-size: 10px; }
  .input-shell input, .input-shell select { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .primary-button { min-height: 46px; }
  .registration-progress { margin-bottom: 15px; }
  .auth-divider { margin-top: 17px; }
  .auth-footnote { margin-top: 15px; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 10px 10px 20px; }
  .auth-panel-inner, .auth-panel-inner--wide { padding: 18px 14px 20px; border-radius: 20px; }
  .auth-heading h2 { font-size: 24px; }
  .auth-form { gap: 10px; }
  .field-grid, .form-grid--registration { gap: 9px; }
}
