html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif, "Roboto",
    sans-serif !important;
}

body {
  background: url("../images/login/circuit-pattern.png") center center
      no-repeat,
    url("../images/login/solid-green-background.png") center center
      no-repeat;
  background-size: cover, cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px; /* para no tocar bordes */
  box-sizing: border-box;
}

.login-container {
  background-color: rgba(0, 43, 32, 0.96);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  padding: 40px 30px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  z-index: 2;
  box-sizing: border-box;
}

.logo {
  width: 80%;
  max-width: 300px;
  margin-bottom: 15px;
}

.tagline {
  color: #ffffff;
  font-weight: bold;
  font-size: 24px;
  margin-bottom: 25px;
}

.input-wrapper {
  position: relative;
  margin: 10px 0;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.input-wrapper input:focus {
  border: 3px solid #ccc;
  border-color: #4caf50;
  outline: none;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  font-size: 18px;
  text-decoration: none;
  display: none;
}

.input-wrapper input:not(:placeholder-shown) + .toggle-password {
  display: block;
}

.toggle-password:hover {
  color: #4caf50;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #014b30;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
}

button:hover {
  background-color: #017d56;
}

.divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #ccc;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ccc;
}

.divider:not(:empty)::before {
  margin-right: 0.75em;
}

.divider:not(:empty)::after {
  margin-left: 0.75em;
}

.footer {
  margin-top: 15px;
  font-size: 12px;
  color: #cccccc;
}

a {
  color: #cce0dd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.alt-button {
  background-color: #05523e;
}

.alt-button:hover {
  background-color: #09966f;
}

@media (max-width: 500px) {
  .login-container {
    padding: 25px 20px;
  }

  .tagline {
    font-size: 20px;
  }

  input,
  button {
    font-size: 14px;
    padding: 10px;
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 90vw;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
}

#reader {
  width: 100%;
  max-width: 360px;
  margin: auto;
}

.close-modal {
  margin: 15px auto 0;
  padding: 10px 20px;
  background-color: #ca4f4f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.close-modal:hover {
  background-color: #d66b6b !important;
}

/* ESTILOS PARA EL ALERTA DE QR INVÁLIDO */
.qr-alert {
  display: none;
  opacity: 0;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #ffdddd;
  color: #a00;
  border: 1px solid #a00;
  border-radius: 4px;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  transition: opacity 0.5s ease;
}

.qr-alert.show {
  display: flex;
  opacity: 1;
}

.qr-alert.hide {
  opacity: 0;
}
/* =====================================*/