/* Wrapper spacing */
.form-group {
  margin-bottom: 14px;
}

#password-hint {
  margin-top: 6px;
  font-size: 13px;
  color: #27ae60;
}

.contact-message{
  font-size: 0.9rem;
  color: #281e1e;
  text-align: center;
  margin: 20px auto;
}

.success-message {
    background: #e8f9ee;
    color: #1c7c3c;
    border: 1px solid #b7ebc6;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.success-banner {
    background: #e8f9ee;
    color: #1b7f3b;
    border: 1px solid #b7ebc6;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.auth-modal {
    background: #ffffff;

    width: 90%;
    max-width: 420px;

    padding: 28px;

    border-radius: 14px;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    animation: popupFade 0.25s ease;
}

.auth-modal h2 {
    margin-bottom: 12px;
    color: #1b7f3b;
}

.auth-modal p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

.auth-modal-btn {
    margin-top: 20px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: #0056d2;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shared input + select styling */
.form-input {
  width: 100%;
  padding: 12px 14px;

  font-size: 15px;
  color: #31353de0;

  background-color: #fff;
  border: 1px solid #d0d7e2;
  border-radius: 8px;

  outline: none;
  cursor: pointer;

  /* Remove default select arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Custom arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, #6c63ff 50%),
    linear-gradient(135deg, #6c63ff 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 55%,
    calc(100% - 14px) 55%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover */
.form-input:hover {
  border-color: #121213;
}

/* Focus */
.form-input:focus {
  border-color: #121213;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* Placeholder-style first option */
.form-input option[value=""] {
  color: #999;
}

/* Disabled select */
.form-input:disabled {
  background-color: #f5f6fa;
  cursor: not-allowed;
  color: #999;

}


/* Error message text */
.field-error-msg {
  margin-top: 6px;
  font-size: 13px;
  color: #e53935;
}

.input-error {
  border: 1px solid #e53935 !important;
}

/* ===============================
   OTP VERIFICATION CARD
================================ */

.otp-card {
  display: none;
  /* controlled by JS */
  background: rgb(199 226 238 / 52%);
  border-radius: 14px;
  padding: 28px 26px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  animation: fadeSlideIn 0.35s ease-out;
}

/* Smooth entry animation */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* OTP info message */
.otp-card .message {
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

/* OTP input styling */
.otp-card input[name="otp"] {
  text-align: center;
  letter-spacing: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1.8px solid #dcdcdc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus state */
.otp-card input[name="otp"]:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}

/* Verify button spacing */
.otp-card .btn {
  width: 100%;
  margin-top: 14px;
}

/* Resend OTP link */
#resend-otp {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
  color: #6c63ff;
  font-weight: 500;
  cursor: pointer;
}

#resend-otp:hover {
  text-decoration: underline;
}


.signup-hint {
  font-size: 0.85rem;
  color: #666;
  margin: 6px 0 12px;
}


.input-error {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.field-error-msg {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 4px;
}

.error,
.message {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 6px;
}

.error {
  background: rgba(231, 76, 60, 0.06);
  color: #c0392b;
}

.message {
  background: rgba(46, 204, 113, 0.06);
  color: #27ae60;
}

/* Hero Section */
.hero {
  font-family: 'Poppins', system-ui, sans-serif;
  background: linear-gradient(87deg, rgb(205 201 237 / 50%), rgb(191 228 245 / 45%));
  padding: 20px 12px;
  text-align: center;
  position: relative;
  height: auto;
}

.hero-container {
  max-width: 1000px;
  margin: 0 auto;
}


.hero-description {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  max-width: 1000px;
  margin: 0px auto;
}



.auth-container {

  font-family: 'Poppins', system-ui, sans-serif;

  background: linear-gradient(
      87deg,
      rgb(205 201 237 / 50%),
      rgb(191 228 245 / 45%)
  );

  display: flex;
  flex-direction: column;

  align-items: stretch;

  width: min(92%, 450px);

  margin: 2rem auto;

  padding: 24px;

  border-radius: 20px;

  box-shadow: 0 8px 16px rgba(0,0,0,0.15);

  box-sizing: border-box;

  overflow: hidden;
}

.auth-container form {
  position: relative;
  /* 🔥 FIX */
}

.tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}


.tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.tabs button.active {
  border-bottom: 2px solid #007bff;
  font-weight: bold;
}

.auth-container form {
  display: none;
}

form.active {
  display: block;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  font-family: 'Poppins', system-ui, sans-serif;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  box-sizing: border-box;
}

.input-error {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.message {
  font-family: 'Poppins', system-ui, sans-serif;
  color: green;
  margin-bottom: 10px;
  text-align: center;
}

.error {
  font-family: 'Poppins', system-ui, sans-serif;
  color: red;
  margin-bottom: 10px;
  text-align: center;
}

.dropdown {
  font-family: 'Poppins', system-ui, sans-serif;
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[list] {
  font-family: 'Poppins', system-ui, sans-serif;
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn {
  font-family: 'Poppins', system-ui, sans-serif;
  background-color: #5835f2d8;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  margin: 15px auto 0 auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}

#signup-form,
#login-form {
  display: none;
}

#signup-form.active,
#login-form.active {
  display: block;
}

.hidden {
  display: none !important;
}


/* Forgot password link */
.signup-hint a {
  color: #6c63ff;
  font-weight: 500;
  cursor: pointer;
}

.signup-hint a:hover {
  text-decoration: underline;
}

/* Inputs inside OTP / Reset cards */
.otp-card input[type="email"],
.otp-card input[type="password"],
.otp-card input[type="text"] {
  text-align: center;
  font-size: 1rem;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1.8px solid #dcdcdc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.otp-card input:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}

/* Error box inside reset flow */
.otp-card .error {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
}

/* Disabled tabs during OTP / reset flow */
.tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-bottom-color: transparent;
}

/* Smooth card transition */
.otp-card {
  animation: fadeSlideIn 0.35s ease-out;
}

.Auth-modal-overlay-style {
  width: min(520px, 92vw);
  margin: 0px auto;
  top: 45%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 22px 22px 18px;
  position: relative;
}

.auth-modal-text {
  margin: 12px 0 18px;
  color: #333;
  font-size: 14px;
}

.duplicate-warning {
    display: none;
    margin-top: 6px;
    color: #ff9800;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.Modal-button {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.Modal-button-ok {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #2563eb;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
}

/* small helper styles (move to CSS file if preferred) */
.input-error {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.field-error-msg {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 4px;
}

.error,
.message {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 6px;
}

.error {
  background: rgba(231, 76, 60, 0.06);
  color: #c0392b;
}

.message {
  background: rgba(46, 204, 113, 0.06);
  color: #27ae60;
}


/* =========================
   RESPONSIVE - BELOW 1024px
========================= */
@media (max-width: 1024px) {

  .hero {
    padding: 10px;
    text-align: left;
  }

  .contact-message {
    text-align: left;
    margin: 10px;
  }



  form input[type="text"],
  form input[type="email"],
  form input[type="password"],
  form input[list] {

    padding: 5px;
    margin: 0px 0;
  }

  .btn {

    padding: 5px 10px;
    font-size: 14px;
    margin: 5px auto 0 auto;
  }

  /* Shared input + select styling */
  .form-input {
    padding: 5px 10px;
    font-size: 14px;
  }

  select option {
    width: auto;
    padding: 5px 10px;
    font-size: 14px;
    color: #333;
  }

  .form-group {
    width: 100%;
  }

  .form-input {
    width: 100%;
    max-width: 350px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .form-input option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* =========================
   RESPONSIVE - BELOW 768px
========================= */
@media (max-width: 768px) {

  
  .hero {
    padding: 10px;
    text-align: left;
  }

  .contact-message {
    text-align: left;
    margin: 10px;
  }



  form input[type="text"],
  form input[type="email"],
  form input[type="password"],
  form input[list] {

    padding: 5px;
    margin: 0px 0;
  }

  .btn {

    padding: 5px 10px;
    font-size: 14px;
    margin: 5px auto 0 auto;
  }

  /* Shared input + select styling */
  .form-input {
    padding: 5px 10px;
    font-size: 14px;
  }

  select option {
    width: auto;
    padding: 5px 10px;
    font-size: 14px;
    color: #333;
  }

  .form-group {
    width: 100%;
  }

  .form-input {
    width: 100%;
    max-width: 350px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .form-input option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }


}


/* =========================
   RESPONSIVE - BELOW 480px
========================= */
@media (max-width: 480px) {
  
  .hero {
    padding: 10px;
    text-align: left;
  }

  .contact-message {
    text-align: left;
    margin: 10px;
  }



  .hero-description {
    font-size: 0.7rem;
  }

  .contact-message {
    font-size: 0.7rem;
  }

  form input[type="text"],
  form input[type="email"],
  form input[type="password"],
  form input[list] {

    padding: 5px;
    margin: 0px 0;
  }

  .btn {

    padding: 5px 10px;
    font-size: 14px;
    margin: 5px auto 0 auto;
  }

  /* Shared input + select styling */
  .form-input {
    padding: 5px 10px;
    font-size: 14px;
  }

  select option {
    width: auto;
    padding: 5px 10px;
    font-size: 14px;
    color: #333;
  }

  .form-group {
    width: 100%;
  }

  .form-input {
    width: 100%;
    max-width: 350px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .form-input option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-container {
    width: 92%;
    max-width: 92%;
    padding: 14px;
    margin: 16px auto;
    box-sizing: border-box;
  }

  #forgot-password-form {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  #forgot-password-form input,
  #forgot-password-form button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #forgot-password-form .message {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
  }

  #verify-reset-otp-form {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    }

  #verify-reset-otp-form input,
  #verify-reset-otp-form button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #verify-reset-otp-form .message {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
  }

  #reset-password-form {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
  }
  #reset-password-form input,
  #reset-password-form button {
    max-width: 100%;
    box-sizing: border-box;
  }
  #reset-password-form .form-group {
    width: 100%;
  }
  #reset-password-form .message,
  #reset-password-form p {
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
  }
}
