* {
  margin: 0;
  padding: 0;
}
@font-face {
  font-family: 'Poppins';
  src: url('/public/fonts/Poppins-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
h1, h2, h3, h4, h5, h6, p, span, img, div, a {
  user-select: none;
  caret-color: transparent;
}
a {
  text-decoration: none;
  color: #6639c5
}
.forms p {
  color: #101010;
  font-size: 15px;
  margin-top: 35px;
}
body {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  align-items: center;
  text-align: center;
  font-family: 'Poppins', system-ui, sans-serif;
}
main {
  position: relative;
  display: flex;
  overflow: hidden;
}
.forms {
  display: flex;
  width: 200%;
  border-radius: 0px 8px 8px 0px;
  transition: transform 2s ease;
  height: 100vh;
}
.forms h1 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 300;
  color: #4e4e4e;
  text-align: start;
}
.forms hr {
  border: none;
  height: 1px;
  background-color: #016e7c;
  margin-bottom: 20px;
}
.forms .logo {
  width: 180px;
  margin-bottom: 15px;
}
.lgn,
.rgs {
  width: 50%;
  margin-top: 35px;
}
.box {
  max-width: 450px;
  width: 85%;
  margin: auto;
}
.forms button {
  width: 90%;
  height: 40px;
  font-size: 20px;
  font-family: 'Poppins', system-ui, sans-serif;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #048d98, #6639c5);
  color: #f0f0f0;
  font-weight: 600;
}
.forms .inputs {
  display: flex;
  flex-direction: column;
}
.forms .input_box {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
label {
  text-align: start;
  cursor: pointer;
}
.checkbox {
 cursor: pointer; 
 margin-right: 6px;
}
.box .names_input_box {
  display: flex;
  justify-content: space-between;
  gap:10px;
  margin-bottom: 18px;
}
.box .names_input_box .name_box {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.politic_input_box {
  margin-bottom: 7px;
}
.forms .input_box input,
.rgs .names_input_box input {
  background-color: rgba(4, 141, 152, 0.2);
  border: none;
  height: 45px;
  color: #575757;
  font-size: 17px;
  border-radius: 3px;
  caret-color: #575757;
  font-weight: 100;
  padding: 0px 7px;
}
.forms .input_box #togglePassword, #togglePassword2 {
  position: absolute;
  right: 15px;
  top: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}
.eye {
  display: none;
  width: 30px;
}
.eye.active {
  display: block;
}
.forms .input_box .reset {
  text-align: end !important;
  text-decoration: none;
  color: #6639c5;
}
.forms input:focus {
  outline: none;
}
.remember_box {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}
.politic_inptu_box {
  margin-bottom: 25px;
}
.forms .btn_rst {
  width: 230px;
  height: 40px;
  padding: 0 16px;
  font-size: 18px;
  font-family: 'Poppins', system-ui, sans-serif;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  background: #f0f0f0;
  color: #048d98;
  font-weight: 600;
}
.overlay {
  position: absolute;
  top: 0;
  left: 50%;
  width: 200%;
  height: 100vh;
  transition: transform 2s ease;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  background: linear-gradient(90deg, #048d98, #482691);
  border-radius: 30px;
  box-shadow: 0px 0px 10px -1px rgba(0, 0, 0, 0.55);
}
.overlay h2 {
  color: #f0f0f0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 500;
}
.overlay p {
  color: #f0f0f0;
  font-size: clamp(1rem, 3vw, 1.3rem);
  margin-bottom: 20px;
}
.overlay button {
  width: auto;
  height: 40px;
  padding: 0 45px;
  font-size: 20px;
  font-family: 'Poppins', system-ui, sans-serif;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  background: transparent;
  border: 1px dashed #f0f0f0;
  color: #f0f0f0;
  font-weight: 600;
  transition: .5s ease;
}
.show_rst:hover {
  background:  #016e7c;
}
.show_lgn:hover {
  background:  #2b1657;
}
.overlay_left,
.overlay_right {
  width: 25%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
main.lgn_active .overlay {
  transform: translateX(0%);
}
main.rgs_active .overlay {
  transform: translateX(-100%);
}
@media (max-width: 950px) {
  main {
    height: 100vh;
    position: relative;
  }
  .forms {
    width: 100%;
    flex-direction: column;
    height: 200%;
  }
  .forms .input_box input, .rgs .names_input_box input {
    height: 40px;
  }
  .lgn,
  .rgs {
    width: 100%;
    height: 100vh;
    margin-top: 10px;
  }
  .forms button,
  .overlay button {
    font-weight: 100;
    font-size: 17px;
  }
  .overlay {
    position: absolute;
    width: 100%;
    left: 0;
    top: 75%;
    border-radius: 30px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150%;
  }
  .overlay_left,
  .overlay_right {
    width: 100%;
    height: 25vh;
  }
  main.lgn_active .overlay {
  transform: translateY(0%);
  }
  main.rgs_active .overlay {
    transform: translateY(-135%);
  }
  main.lgn_active .forms {
    transform: translateY(0%);
  }
  main.rgs_active .forms {
    transform: translateY(-38%);
  }
}


/* ── Errores de campo ──────────────────────────────── */
.field-error {
  display: none;
  font-size: 12px;
  color: #e03e3e;
  margin-top: 4px;
  text-align: left;
}
.field-error.visible {
  display: block;
}
.input_box.has-error input,
.name_box.has-error input {
  border: 1px solid #e03e3e;
}

/* ── Spinner en botones ────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toast ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #048d98; }
.toast.error   { background: #c0392b; }
.toast.info    { background: #6639c5; }

/* ── Modal OTP ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-box h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}
.modal-box p {
  color: #666;
  font-size: 14px;
  margin: 0;
}
.modal-email {
  font-weight: 600;
  color: #048d98;
  margin-bottom: 24px !important;
  word-break: break-all;
}
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}
.otp-digit {
  width: 48px;
  height: 56px;
  border: 2px solid #ccc;
  border-radius: 8px;
  text-align: center;
  font-size: 1.5rem;
  font-family: 'Poppins', sans-serif;
  color: #333;
  background: #f9f9f9;
  caret-color: #048d98;
  transition: border-color 0.2s;
}
.otp-digit:focus {
  outline: none;
  border-color: #048d98;
  background: #fff;
}
.otp-digit.filled {
  border-color: #6639c5;
}
.otp-digit.error {
  border-color: #e03e3e;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
.btn-verify {
  width: 100%;
  height: 46px;
  background: linear-gradient(90deg, #048d98, #6639c5);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 18px;
  transition: opacity 0.2s;
}
.btn-verify:disabled { opacity: 0.5; cursor: not-allowed; }
.resend-row {
  font-size: 13px !important;
  color: #888 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-resend {
  background: none;
  border: none;
  color: #6639c5;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-resend:disabled { opacity: 0.4; cursor: not-allowed; }
#resend-timer {
  color: #048d98;
  font-weight: 600;
}

/* ── Modal recuperar contraseña ────────────────────── */
.rst-input-box {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.rst-input-box input {
  background-color: rgba(4, 141, 152, 0.12);
  border: 1px solid #ddd;
  height: 45px;
  color: #575757;
  font-size: 15px;
  border-radius: 6px;
  caret-color: #575757;
  font-weight: 300;
  padding: 0 42px 0 10px;
  font-family: 'Poppins', system-ui, sans-serif;
  transition: border-color 0.2s;
}
.rst-input-box input:focus {
  outline: none;
  border-color: #048d98;
}
.rst-input-box.has-error input {
  border-color: #e03e3e;
}
.rst-input-box #toggleRstPsw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

/* ── sr-only (accesibilidad) ───────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 650px) {
  .forms .logo {
    width: 160px;
    margin-bottom: 10px;
  }
  .forms {
    width: 100%;
  }
  .field-error {
    font-size: 10px;
  }
}