.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-image: url("/assets/login-bg.webp");
  background-size: cover;
  background-position: center;
  padding: 40px 15px;
  box-sizing: border-box;
}

.modal-content {
  margin: auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 450px;
  animation: fadeIn 0.3s ease-in-out;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal header — repeats the full login page branding */
.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-logo {
  width: 80px;
  margin-bottom: 0.5rem;
}

.modal-header .brand-title {
  font-size: 1.2rem;
  color: #00d492;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}


.modal-header .modal-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 6px;
}


.modal-header .brand-subtitle {
  color: #ffffffd9;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}


.modal-header .modal-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 1rem;
}


/* Form group spacing, matching login form rhythm */
.modal-content .form-group {
  margin-bottom: 1.25rem;
}

/* Labels — mirrors .login-form label styling */
.modal-content label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffffffe6;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Form input — mirrors .login-form input exactly: transparent, themed border, white text */
.modal-content input[type="email"],
.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #006a4e;
  border-radius: 6px;
  font-size: 1rem;
  color: #ffffff;
  box-sizing: border-box;
  transition:
    border 0.3s,
    background 0.3s;
}

.modal-content input[type="email"]:focus,
.modal-content input[type="text"]:focus,
.modal-content input[type="password"]:focus {
  border-color: #00d492;
  outline: none;
}

.modal-content input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Button */
.modal-content button {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

/* Success message */
.text-success {
  font-size: 14px;
  color: #00d492;
  text-align: center;
}

.close-modal {
  cursor: pointer;
  color: #aaa;
}

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

.password-input {
  border: 1px solid #006a4e;
  transition: border-color 0.3s;
}

.password-input.weak {
  border-color: #e25555 !important;
}

.password-input.medium {
  border-color: orange !important;
}

.password-input.strong {
  border-color: #00d492 !important;
}

.checkPass {
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
  color: rgba(255, 255, 255, 0.8);
}

#strengthText {
  color: orange;
}

#matchText {
  font-weight: normal;
}

#matchText.match {
  color: #00d492;
}

#matchText.nomatch {
  color: #e25555;
}

.is-invalid {
  border-color: #e25555 !important;
  background-color: rgba(226, 85, 85, 0.15);
}

/* Cancel button — restyled for the dark theme (was black-on-transparent
   with a black border, which would be invisible against the new dark card) */
.button-cancel {
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff !important;
}

.button-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Submit/confirm buttons — themed to match .btn-login */
.btn-submit-modal {
  background-color: #006a4e;
  color: #ffffff;
}

.btn-submit-modal:hover {
  background-color: #005a42;
}

.btn-submit-modal:disabled {
  background-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.btn-submit-modal:disabled:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Segmented OTP input — 6 single-digit boxes, grouped 3-and-3 with a separator */
.otp-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.otp-box {
  width: 2.5rem;
  height: 3rem;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  background: transparent;
  border: 1px solid #006a4e;
  border-radius: 6px;
  color: #ffffff;
  padding: 0;
  transition: border 0.3s, background 0.3s;
}

.otp-box:focus {
  border-color: #00d492;
  outline: none;
  background: rgba(0, 106, 78, 0.15);
}

.otp-separator {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0 0.15rem;
}

/* Validity / informational note shown below the cancel button */
.modal-validity-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  text-align: center;
  margin-top: 1rem;
  line-height: 1.4;
}

.forgot-password-group {
  margin-bottom: 0 !important;
}
