* {
  box-sizing: border-box;
}


body {
  font-family: "Inter", sans-serif;
}

body {
    margin: 0;

    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;

    background: #f4f4f4;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #222222;
}

.login-container {
  width: 100%;
  min-height: 100vh;
  padding: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 1060px;
  min-height: 540px;

  background: #ffffff;
  border-radius: 28px;
  padding: 40px 46px;

  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 58px;
  align-items: center;

  box-shadow: 0 18px 60px rgba(0,0,0,0.04);
}

.login-image-panel {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-main-image {
  width: 100%;
  max-width: 460px;
  height: 650px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.login-form-panel {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.login-logo-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo {
  width: 105px;
  height: auto;
  object-fit: contain;
  display: block;
}

.login-form-panel h1 {
  margin: 0 0 26px;
  text-align: center;
  color: #222222;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
}

label {
  display: block;
  margin: 0 0 8px;
  color: #222222;
  font-size: 12px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border-radius: 8px;
  border: none;
  outline: none;

  background: #f5f5f5;
  color: #222222;

  font-size: 13px;
  margin-bottom: 18px;
}

input::placeholder {
  color: #b8b8b8;
}

input:focus {
  background: #f1f1f1;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.password-box {
  position: relative;
  width: 100%;
}

.password-box input {
  padding-right: 52px;
}

.toggle-password {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-75%);

  width: 38px;
  height: 38px;

  border: none;
  background: transparent;
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  background: #eeeeee;
}

.toggle-password img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  display: block;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.captcha-row img {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #f5f5f5;
  border: none;
  display: block;
}

.btn-refresh-captcha {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 10px;
  background: #1AB096;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-refresh-captcha:hover {
  background: #159b81;
}

.login-btn {
  width: 100%;
  height: 54px;
  margin-top: 0;

  border: none;
  border-radius: 8px;

  background: #202020;
  color: #ffffff;

  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn:hover {
  background: #000000;
}

/* MODAL DE ERROR */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 18px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  animation: modalEntrada 0.25s ease;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.modal-box h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 24px;
}

.modal-box p {
  color: #4b5563;
  font-size: 15px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.modal-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: #dc2626;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.modal-btn:hover {
  background: #b91c1c;
}

@keyframes modalEntrada {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

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

#modalMensaje {
  white-space: pre-line;
  text-align: left;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .login-card {
    max-width: 520px;
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px;
  }

  .login-main-image {
    max-width: 100%;
    height: 300px;
  }

  .login-form-panel {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .login-container {
    padding: 18px;
  }

  .login-card {
    padding: 22px;
    border-radius: 22px;
  }

  .login-main-image {
    height: 240px;
  }

  .login-form-panel h1 {
    font-size: 28px;
  }
}