@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=Instrument+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --bank-primary: #29594b;
  --bank-primary-dark: #1a3d32;
  --bank-primary-light: #3a7563;
  --bank-accent: #9edd05;
  --bank-accent-dark: #7eb804;
  --bank-surface: #ffffff;
  --bank-muted: #64748b;
  --bank-border: #e2e8f0;
  --bank-bg: #f1f5f4;
  --bank-danger: #dc3545;
  --bank-success: #16a34a;
  --bank-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  --bank-radius: 16px;
  --bank-radius-sm: 10px;
  --bank-font: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bank-font);
  color: #0f172a;
  background: var(--bank-bg);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 44%) 1fr;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(158, 221, 5, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(160deg, var(--bank-primary-dark) 0%, var(--bank-primary) 55%, #234a3e 100%);
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-brand__inner {
  position: relative;
  z-index: 1;
}

.auth-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.auth-brand__logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

.auth-brand__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand__headline {
  margin: 3rem 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.auth-brand__sub {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38ch;
}

.auth-trust {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.auth-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--bank-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.auth-trust__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(158, 221, 5, 0.2);
  color: var(--bank-accent);
  font-size: 0.95rem;
}

.auth-trust__title {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.auth-trust__text {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.auth-brand__footer {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bank-primary);
  color: #fff;
}

.auth-topbar__logo img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-content--wide {
  align-items: flex-start;
  padding-top: 1.5rem;
}

.auth-card {
  width: min(100%, 440px);
  background: var(--bank-surface);
  border-radius: var(--bank-radius);
  box-shadow: var(--bank-shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 2rem;
}

.auth-card--wide {
  width: min(100%, 920px);
  padding: 0;
  overflow: hidden;
}

.auth-card__header {
  margin-bottom: 1.75rem;
}

.auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: rgba(41, 89, 75, 0.08);
  color: var(--bank-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.auth-card__desc {
  margin: 0;
  color: var(--bank-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.auth-alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--bank-radius-sm);
  background: rgba(41, 89, 75, 0.07);
  border: 1px solid rgba(41, 89, 75, 0.12);
  color: var(--bank-primary-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-alert i {
  margin-top: 0.15rem;
  color: var(--bank-primary);
}

.auth-field {
  margin-bottom: 1.15rem;
}

.auth-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 3rem;
  padding: 0 0.95rem;
  border: 1.5px solid var(--bank-border);
  border-radius: var(--bank-radius-sm);
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--bank-primary);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.12);
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input--lg {
  height: 3.25rem;
  font-size: 1rem;
}

.auth-toggle-pass {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--bank-muted);
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
}

.auth-toggle-pass:hover {
  color: var(--bank-primary);
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-link {
  color: var(--bank-primary);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--bank-primary-dark);
  text-decoration: underline;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: var(--bank-radius-sm);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.auth-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bank-primary) 0%, var(--bank-primary-dark) 100%);
  box-shadow: 0 8px 20px rgba(41, 89, 75, 0.25);
}

.auth-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(41, 89, 75, 0.3);
}

.auth-btn--secondary {
  color: var(--bank-primary);
  background: #fff;
  border: 1.5px solid var(--bank-border);
}

.auth-btn--secondary:hover:not(:disabled) {
  border-color: var(--bank-primary);
  background: rgba(41, 89, 75, 0.04);
}

.auth-btn--ghost {
  width: auto;
  min-height: auto;
  padding: 0.5rem 0.85rem;
  background: transparent;
  color: var(--bank-muted);
  border: 1px solid var(--bank-border);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.35rem 0;
  color: var(--bank-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bank-border);
}

.auth-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.auth-captcha {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 3rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--bank-radius-sm);
  background: var(--bank-primary);
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.35rem;
  user-select: none;
}

.auth-captcha span {
  display: inline-block;
  transform: rotate(var(--rot, 0deg));
}

.auth-otp {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.auth-otp input {
  width: 3.25rem;
  height: 3.25rem;
  border: 2px solid var(--bank-border);
  border-radius: var(--bank-radius-sm);
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bank-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-otp input:focus {
  outline: none;
  border-color: var(--bank-primary);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.12);
}

.auth-result {
  margin-top: 0.5rem;
}

.auth-footer-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--bank-muted);
}

.auth-footer-note a {
  color: var(--bank-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-note a:hover {
  text-decoration: underline;
}

.auth-terms-box {
  width: 100%;
  min-height: 220px;
  max-height: 320px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--bank-border);
  border-radius: var(--bank-radius-sm);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
  resize: vertical;
}

.auth-terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-terms-actions .auth-btn {
  flex: 1;
  min-width: 140px;
}

.auth-back-home {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
}

.auth-back-home a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-back-home a:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Registration wizard */
.register-wizard-header {
  background: linear-gradient(135deg, var(--bank-primary) 0%, var(--bank-primary-dark) 100%);
  color: #fff;
  padding: 1.75rem 2rem;
  text-align: center;
}

.register-wizard-header img {
  max-width: 160px;
  margin-bottom: 1rem;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
}

.register-wizard-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.register-wizard-header p {
  margin: 0.5rem 0 0;
  opacity: 0.88;
  font-size: 0.92rem;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: #f8fafc;
  position: relative;
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: var(--bank-border);
  z-index: 0;
  transform: translateY(-50%);
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--bank-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 700;
  color: var(--bank-muted);
  transition: all 0.25s;
  font-size: 0.9rem;
}

.step.active .step-circle {
  background: var(--bank-primary);
  border-color: var(--bank-primary);
  color: #fff;
  transform: scale(1.06);
}

.step.completed .step-circle {
  background: var(--bank-success);
  border-color: var(--bank-success);
  color: #fff;
}

.step-label {
  font-size: 0.78rem;
  color: var(--bank-muted);
  font-weight: 500;
}

.step.active .step-label {
  color: var(--bank-primary);
  font-weight: 600;
}

.wizard-body {
  padding: 2rem;
}

.wizard-footer {
  padding: 0 2rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: authFadeIn 0.35s ease;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-body .form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.wizard-body .form-control,
.wizard-body .form-select {
  border-radius: var(--bank-radius-sm);
  border: 1.5px solid var(--bank-border);
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
}

.wizard-body .form-control:focus,
.wizard-body .form-select:focus {
  border-color: var(--bank-primary);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.12);
}

.wizard-body .form-control.is-valid,
.wizard-body .form-select.is-valid {
  border-color: var(--bank-success);
}

.wizard-body .form-control.is-invalid,
.wizard-body .form-select.is-invalid {
  border-color: var(--bank-danger);
}

.btn-wizard {
  padding: 0.7rem 1.35rem;
  border-radius: var(--bank-radius-sm);
  font-weight: 600;
  border: 0;
  font-size: 0.92rem;
  transition: all 0.2s;
}

.btn-wizard-primary {
  background: var(--bank-primary);
  color: #fff;
}

.btn-wizard-primary:hover {
  background: var(--bank-primary-dark);
}

.btn-wizard-secondary {
  background: #64748b;
  color: #fff;
}

.password-strength {
  height: 4px;
  border-radius: 999px;
  margin-top: 0.5rem;
  background: var(--bank-border);
  transition: all 0.25s;
}

.strength-weak {
  background: var(--bank-danger);
  width: 33%;
}

.strength-medium {
  background: #eab308;
  width: 66%;
}

.strength-strong {
  background: var(--bank-success);
  width: 100%;
}

.image-preview {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--bank-border);
  border-radius: var(--bank-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.upload-icon {
  font-size: 2.5rem;
  color: #cbd5e1;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-topbar {
    display: flex;
  }

  .auth-back-home {
    display: none;
  }

  .auth-content {
    padding: 1.25rem 1rem 2rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  }

  .step-indicator {
    padding: 1rem;
  }

  .step-indicator::before {
    left: 1rem;
    right: 1rem;
  }

  .step-label {
    font-size: 0.68rem;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .wizard-body,
  .wizard-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (max-width: 480px) {
  .auth-otp input {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
  }

  .auth-terms-actions {
    flex-direction: column;
  }

  .auth-terms-actions .auth-btn {
    width: 100%;
  }
}

/* ── Registration page (Algebris-style centered glass layout) ── */
body.reg-page {
  --reg-bg: #070b10;
  --reg-line: rgba(255, 255, 255, 0.08);
  --reg-text: #f4f7fb;
  --reg-muted: #8b97a8;
  background: var(--reg-bg);
  color: var(--reg-text);
}

.reg-page .reg {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 88px 18px 28px;
  overflow: hidden;
}

.reg-page .reg__glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(41, 89, 75, 0.45), transparent 60%),
    radial-gradient(ellipse 45% 40% at 100% 20%, rgba(158, 221, 5, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 45% at 0% 80%, rgba(41, 89, 75, 0.22), transparent 55%);
  animation: regDrift 14s ease-in-out infinite alternate;
}

.reg-page .reg__glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 15%, transparent 75%);
  opacity: 0.7;
}

.reg-page .reg__orb {
  position: fixed;
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  border-radius: 50%;
  border: 1px solid rgba(41, 89, 75, 0.28);
  top: 8%;
  right: -4%;
  opacity: 0.45;
  z-index: 0;
  animation: regSpin 40s linear infinite;
  pointer-events: none;
}

.reg-page .reg__orb::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px dashed rgba(158, 221, 5, 0.18);
}

.reg-page .reg__orb--alt {
  top: auto;
  right: auto;
  bottom: -8%;
  left: -6%;
  width: min(38vw, 440px);
  height: min(38vw, 440px);
  opacity: 0.28;
  animation-direction: reverse;
  animation-duration: 52s;
}

@keyframes regDrift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(18px) scale(1.04); }
}

@keyframes regSpin {
  to { transform: rotate(360deg); }
}

@keyframes regRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reg-page .reg__top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(7, 11, 16, 0.92), rgba(7, 11, 16, 0.35) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.reg-page .reg__top-brand img {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.reg-page .reg__top-link {
  color: var(--bank-accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.reg-page .reg__top-link:hover {
  opacity: 0.88;
}

.reg-page .reg__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  animation: regRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reg-page .reg__intro {
  text-align: center;
  margin-bottom: 22px;
}

.reg-page .reg__intro h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.9rem, 5.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--reg-text);
}

.reg-page .reg__intro h1 em {
  font-style: italic;
  color: var(--bank-accent);
}

.reg-page .reg__intro p {
  margin: 0;
  color: var(--reg-muted);
  font-size: 0.92rem;
}

.reg-page .reg__card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(10, 15, 22, 0.35) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 24px 20px 20px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 48px -16px rgba(0, 0, 0, 0.45),
    0 0 60px -20px rgba(41, 89, 75, 0.35);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  animation: regRise 0.85s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reg-page .reg__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  pointer-events: none;
}

@media (min-width: 480px) {
  .reg-page .reg__card {
    padding: 28px 26px 24px;
  }
}

.reg-page .reg-progress {
  margin-bottom: 18px;
}

.reg-page .reg-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.reg-page .reg-progress-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--reg-text);
}

.reg-page .reg-step-count {
  font-size: 0.72rem;
  color: var(--reg-muted);
  font-weight: 600;
}

.reg-page .reg-bar-wrap {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.reg-page .reg-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bank-primary-light), var(--bank-accent));
  transition: width 0.4s ease;
}

.reg-page .reg-tabs {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.reg-page .reg-tab {
  font-size: 0.64rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.reg-page .reg-tab.active {
  color: var(--bank-accent);
}

.reg-page .reg-tab.completed {
  color: #64748b;
}

.reg-page .reg-step-head {
  text-align: center;
  margin-bottom: 18px;
}

.reg-page .reg-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: rgba(41, 89, 75, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bank-accent);
  font-size: 1rem;
}

.reg-page .reg-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--reg-text);
  margin: 0 0 4px;
}

.reg-page .reg-step-sub {
  font-size: 0.78rem;
  color: var(--reg-muted);
  margin: 0;
  line-height: 1.45;
}

.reg-page .step-content {
  display: none;
}

.reg-page .step-content.active {
  display: block;
  animation: regRise 0.35s ease;
}

.reg-page .wizard-body {
  padding: 0;
}

.reg-page .wizard-body .form-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--bank-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.reg-page .wizard-body .form-control,
.reg-page .wizard-body .form-select {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--reg-line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--reg-text);
  font-size: 0.92rem;
}

.reg-page .wizard-body .form-control::placeholder {
  color: #475569;
}

.reg-page .wizard-body .form-control:focus,
.reg-page .wizard-body .form-select:focus {
  border-color: rgba(158, 221, 5, 0.45);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.25);
  background: rgba(0, 0, 0, 0.38);
  color: var(--reg-text);
}

.reg-page .wizard-body .form-select option {
  background: #0f1923;
  color: #e2e8f0;
}

.reg-page .wizard-body .form-control.is-valid,
.reg-page .wizard-body .form-select.is-valid {
  border-color: #22c55e;
}

.reg-page .wizard-body .form-control.is-invalid,
.reg-page .wizard-body .form-select.is-invalid {
  border-color: #ef4444;
}

.reg-page .wizard-body small.text-muted {
  color: var(--reg-muted) !important;
}

.reg-page .wizard-body .input-group .btn-outline-secondary {
  border-color: var(--reg-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--reg-muted);
}

.reg-page .image-preview {
  border-color: var(--reg-line);
  background: rgba(0, 0, 0, 0.2);
}

.reg-page .upload-icon {
  color: #475569;
}

.reg-page .reg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--reg-line);
}

.reg-page .reg-nav .btn-wizard-primary {
  margin-left: auto;
}

.reg-page .btn-wizard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.reg-page .btn-wizard-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--reg-muted);
  border: 1px solid var(--reg-line);
}

.reg-page .btn-wizard-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--reg-text);
}

.reg-page .btn-wizard-primary {
  background: linear-gradient(135deg, var(--bank-primary), var(--bank-primary-dark));
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(41, 89, 75, 0.55);
}

.reg-page .btn-wizard-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(41, 89, 75, 0.65);
}

.reg-page .reg__footer {
  text-align: center;
  margin-top: 16px;
  color: var(--reg-muted);
  font-size: 0.88rem;
}

.reg-page .reg__footer a {
  color: var(--bank-accent);
  font-weight: 600;
  text-decoration: none;
}

.reg-page .reg__footer a:hover {
  text-decoration: underline;
}

.reg-page .reg__copy {
  text-align: center;
  margin-top: 20px;
  color: #4d5a6a;
  font-size: 0.75rem;
}

/* Gate / captcha page */
.reg-page .captcha-group {
  margin-bottom: 14px;
}

.reg-page .captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.reg-page .captcha-row .gate-captcha {
  flex: 1 1 52%;
  margin-bottom: 0;
  min-height: 3.25rem;
  padding: 0 10px;
  letter-spacing: 0.18rem;
  font-size: 1.05rem;
}

.reg-page .captcha-row .gate-input {
  flex: 1 1 48%;
  min-width: 0;
  height: 3.25rem;
  text-align: center;
}

.reg-page .gate-captcha {
  margin-bottom: 1rem;
  background: rgba(41, 89, 75, 0.55);
  border: 1px solid rgba(158, 221, 5, 0.2);
}

.reg-page .gate-input {
  height: 3.25rem;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid var(--reg-line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--reg-text);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.reg-page .gate-input:focus {
  outline: none;
  border-color: rgba(158, 221, 5, 0.45);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.25);
  background: rgba(0, 0, 0, 0.38);
}

.reg-page .auth-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--bank-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reg-page .auth-btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--bank-primary), var(--bank-primary-dark));
  box-shadow: 0 12px 24px -10px rgba(41, 89, 75, 0.55);
  transition: transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.reg-page .auth-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(41, 89, 75, 0.65);
}

.reg-page .auth-btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.reg-page .gate-success {
  text-align: center;
  padding: 2rem 1.5rem;
}

.reg-page .gate-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 1.5rem;
}

.reg-page .gate-success__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--reg-text);
}

.reg-page .gate-success__text,
.reg-page .gate-success__note {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--reg-muted);
}

.reg-page .gate-success__note a {
  color: var(--bank-accent);
  text-decoration: none;
  font-weight: 600;
}

.reg-page .gate-success__note a:hover {
  text-decoration: underline;
}

.reg-page .gate-success__btn {
  margin-top: 0.5rem;
}

/* Shared auth form controls (login, reset, 2FA) */
.reg-page .reg__panel--wide {
  width: min(100%, 520px);
}

.reg-page .reg-group {
  margin-bottom: 14px;
}

/* Floating-label fields (Algebris-style focus reaction) */
.reg-page .reg-field {
  position: relative;
  margin-bottom: 14px;
}

.reg-page .reg-field:last-child {
  margin-bottom: 0;
}

.reg-page .reg-field input,
.reg-page .reg-field select,
.reg-page .reg-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 26px 44px 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--reg-line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--reg-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.reg-page .reg-field textarea {
  min-height: 110px;
  padding-top: 28px;
  resize: vertical;
}

.reg-page .reg-field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b97a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.reg-page .reg-field input::placeholder,
.reg-page .reg-field textarea::placeholder {
  color: transparent;
}

.reg-page .reg-field label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
  transition: 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reg-page .reg-field input:focus,
.reg-page .reg-field input:not(:placeholder-shown),
.reg-page .reg-field input.is-filled,
.reg-page .reg-field select:focus,
.reg-page .reg-field select.is-filled,
.reg-page .reg-field textarea:focus,
.reg-page .reg-field textarea:not(:placeholder-shown) {
  border-color: rgba(158, 221, 5, 0.55);
  box-shadow:
    0 0 0 1px rgba(158, 221, 5, 0.35),
    0 0 22px -6px rgba(158, 221, 5, 0.35);
  background: rgba(0, 0, 0, 0.42);
}

.reg-page .reg-field input:focus + label,
.reg-page .reg-field input:not(:placeholder-shown) + label,
.reg-page .reg-field input.is-filled + label,
.reg-page .reg-field select:focus + label,
.reg-page .reg-field select.is-filled + label,
.reg-page .reg-field textarea:focus + label,
.reg-page .reg-field textarea:not(:placeholder-shown) + label {
  top: 8px;
  transform: none;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bank-accent);
}

.reg-page .reg-field__icon,
.reg-page .reg-field .toggle-pw,
.reg-page .reg-field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6b7a;
  font-size: 0.9rem;
}

.reg-page .reg-field__icon {
  pointer-events: none;
}

.reg-page .reg-field .toggle-pw,
.reg-page .reg-field__toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, background 0.15s;
}

.reg-page .reg-field .toggle-pw:hover,
.reg-page .reg-field__toggle:hover {
  color: var(--bank-accent);
  background: rgba(255, 255, 255, 0.04);
}

.reg-page .reg-field--captcha .reg-input,
.reg-page .reg-field--captcha input {
  text-align: left;
  letter-spacing: normal;
}

.reg-page .captcha-row .reg-field {
  flex: 1 1 48%;
  min-width: 0;
  margin-bottom: 0;
}

.reg-page .reg-meta--end {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.reg-page .reg-meta--end .reg-link {
  margin-left: auto;
}

.reg-page .wizard-body .reg-field {
  margin-bottom: 0;
}

.reg-page .wizard-body .reg-field input.is-invalid,
.reg-page .wizard-body .reg-field select.is-invalid,
.reg-page .wizard-body .reg-field textarea.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.reg-page .wizard-body .reg-field input.is-valid,
.reg-page .wizard-body .reg-field select.is-valid,
.reg-page .wizard-body .reg-field textarea.is-valid {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.reg-page .reg-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--bank-accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reg-page .reg-label .req {
  color: var(--bank-accent);
}

.reg-page .reg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.reg-page .reg-link {
  color: var(--bank-accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.reg-page .reg-link:hover {
  opacity: 0.88;
  text-decoration: underline;
}

.reg-page .reg-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--reg-line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--reg-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.reg-page .reg-input::placeholder {
  color: #475569;
}

.reg-page .reg-input:focus {
  border-color: rgba(158, 221, 5, 0.45);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.25);
  background: rgba(0, 0, 0, 0.38);
}

.reg-page .reg-input-icon {
  position: relative;
}

.reg-page .reg-input-icon .reg-input {
  padding-right: 44px;
}

.reg-page .reg-input-icon .ico {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6b7a;
  font-size: 0.9rem;
  pointer-events: none;
}

.reg-page .reg-input-icon .toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.reg-page .reg-input-icon .toggle-pw:hover {
  color: var(--bank-accent);
}

.reg-page .reg-otp {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.reg-page .reg-otp input {
  width: 3.25rem;
  height: 3.25rem;
  border: 2px solid var(--reg-line);
  border-radius: 14px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bank-accent);
  background: rgba(0, 0, 0, 0.28);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-page .reg-otp input:focus {
  border-color: rgba(158, 221, 5, 0.45);
  box-shadow: 0 0 0 3px rgba(41, 89, 75, 0.25);
}

.reg-page .auth-result {
  margin-bottom: 0.75rem;
}

.reg-page .auth-btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--reg-line);
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--reg-text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.reg-page .auth-btn--secondary:hover {
  border-color: rgba(158, 221, 5, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.reg-page .reg-terms-box {
  width: 100%;
  min-height: 200px;
  max-height: 280px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--reg-line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--reg-muted);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.55;
  resize: vertical;
}

.reg-page .reg-terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.reg-page .reg-terms-actions .auth-btn {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 480px) {
  .reg-page .reg-otp input {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
  }

  .reg-page .reg-terms-actions {
    flex-direction: column;
  }

  .reg-page .reg-terms-actions .auth-btn {
    width: 100%;
  }
}
