/* Login Modal Styles - using same as deposit modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: #0a0e27;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.modal-subtitle {
  margin: -10px 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #94a3b8;
}

.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ffffff;
}

/* Forgot Password Link - positioned below login button, aligned left */
.forgot-password-link {
  margin-top: 12px;
  text-align: left;
  width: 100%;
}

.forgot-link {
  color: #60a5fa;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
}

.forgot-link:hover {
  color: #93c5fd;
  text-decoration: underline;
  transform: translateX(2px);
}

/* Split login screen — Cryptonic green */
#loginModal.modal-overlay,
#loginModal.cnh-auth-overlay {
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  background: #050806 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 4000 !important;
}

#loginModal .modal-content,
#loginModal .cnh-auth-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #050806 !important;
}

#loginModal .cnh-auth-promo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 7vw, 80px);
  color: #052e16;
  background:
    radial-gradient(ellipse 80% 70% at 20% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(160deg, #115e59 0%, #14b8a6 48%, #5eead4 100%);
}

#loginModal .cnh-auth-promo__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
}

#loginModal .cnh-auth-promo__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#loginModal .cnh-auth-promo__mark svg {
  width: 22px;
  height: 22px;
}

#loginModal .cnh-auth-promo__title {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  max-width: 440px;
}

#loginModal .cnh-auth-promo__lead {
  margin: 0 0 36px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

#loginModal .cnh-auth-promo__stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

#loginModal .cnh-auth-promo__stats strong {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

#loginModal .cnh-auth-promo__stats span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
}

#loginModal .cnh-auth-pane {
  position: relative;
  background: #070b08;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

#loginModal .cnh-auth-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 2;
  width: 40px !important;
  height: 40px !important;
  font-size: 28px !important;
  color: #94a3b8 !important;
}

#loginModal .cnh-auth-pane__inner {
  width: 100%;
  max-width: 400px;
}

#loginModal .cnh-auth-pane__title {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

#loginModal .cnh-auth-pane__sub {
  margin: 0 0 28px;
  color: #94a3b8;
  font-size: 14px;
}

#loginModal .field {
  margin-bottom: 16px;
}

#loginModal .field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

#loginModal .input-with-icon input {
  width: 100%;
  box-sizing: border-box;
  background: #101814 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 13px 44px 13px 42px !important;
  font-size: 14px !important;
}

#loginModal .input-with-icon input::placeholder {
  color: #64748b;
}

#loginModal .input-with-icon input:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

#loginModal .cnh-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
}

#loginModal .cnh-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
}

#loginModal .cnh-remember input {
  accent-color: #14b8a6;
  width: 15px;
  height: 15px;
}

#loginModal .forgot-password-link {
  margin: 0;
  width: auto;
  text-align: right;
}

#loginModal .forgot-link {
  color: #2dd4bf !important;
  font-size: 13px;
  font-weight: 700;
}

#loginModal .forgot-link:hover {
  color: #5eead4 !important;
  transform: none;
}

#loginModal .input-icon {
  left: 14px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#loginModal .input-icon svg {
  display: block;
}

#loginModal .cnh-auth-submit,
#loginModal .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 14px 22px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #052e16 !important;
  background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%) !important;
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.28);
}

#loginModal .register-signin-link {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

#loginModal .signin-link {
  color: #2dd4bf !important;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 860px) {
  #loginModal .modal-content,
  #loginModal .cnh-auth-shell {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }

  #loginModal .cnh-auth-promo {
    display: none !important;
  }

  #loginModal .cnh-auth-pane {
    padding: 24px 20px 40px;
    align-items: flex-start;
    min-height: 100dvh;
  }
}
