/* ===============================================
   LOGIN PAGE STYLES — STSL
   Archivo unificado: una sola declaración por selector.
   =============================================== */

/* -----------------------------------------------
   HTML / BODY
   ----------------------------------------------- */
html,
body {
  height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* AdminLTE agrega hold-transition al body; se libera el scroll aquí */
body.hold-transition.login-page {
  min-height: 100vh;
  background: #000; /* fallback mientras carga el fondo */
  overflow-y: auto;
}

/* -----------------------------------------------
   CONTENEDOR PRINCIPAL
   ----------------------------------------------- */
.main-cont {
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: row; /* columnas lado a lado */
  overflow: hidden;
}

/* -----------------------------------------------
   FONDO DE PANTALLA (pseudo-elemento en body)
   ----------------------------------------------- */
.login-page {
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/static/login/fondo-login-rojo.f42f5a613c99.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
  z-index: -1;
}

/* -----------------------------------------------
   COLUMNAS — COMPARTIDO
   ----------------------------------------------- */
.col-izquierda,
.col-derecha {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* -----------------------------------------------
   COLUMNA IZQUIERDA — panel del formulario
   ----------------------------------------------- */
.col-izquierda {
  position: relative;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgb(0, 0, 0) 0%, rgb(167, 37, 37) 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Scrollbar personalizada — Chrome / Safari / Edge */
.col-izquierda::-webkit-scrollbar {
  width: 6px;
}

.col-izquierda::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.col-izquierda::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.col-izquierda::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* -----------------------------------------------
   COLUMNA DERECHA — imágenes y descripción
   ----------------------------------------------- */
.col-derecha {
  color: white;
}

.col-derecha > div.row {
  width: 100%;
}

/* -----------------------------------------------
   LOGIN BOX — contenedor interno de la columna izquierda
   ----------------------------------------------- */
.login-box {
  width: 100%;
  padding: 15px;
  min-height: 100vh;
  height: auto;
  background: transparent; /* el fondo viene de .col-izquierda */
  position: relative;
  display: flex;
  align-items: center;
}

.login-box-front {
  width: 90%;
  padding-bottom: 30px;
}

/* -----------------------------------------------
   CARD DEL FORMULARIO
   ----------------------------------------------- */
.card-logo {
  background: rgba(255, 255, 255, 0);
  border-radius: 5px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 5px;
  color: white;
  height: auto;
}

.card-body {
  height: auto;
  display: block;
}

.login-card-body {
  background: transparent;
  color: white;
  backdrop-filter: blur(10px);
  padding: 15px;
}

/* -----------------------------------------------
   LOGO
   ----------------------------------------------- */
.login-logo {
  margin-bottom: 0;
}

.login-logo a {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.login-logo img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 220px;
  min-width: 200px;
  transition: all 0.3s ease;
}

/* -----------------------------------------------
   TEXTOS Y SUBTÍTULOS
   ----------------------------------------------- */
.subtitulo-login {
  color: white;
  margin-bottom: 5px;
  line-height: 1.2;
}

.row.row-subtitulo-bienvenido {
  margin-top: 5px;
  margin-bottom: 10px;
}

.login-box-msg {
  margin-bottom: 15px;
  padding: 0;
}

/* -----------------------------------------------
   SELECTOR DE IDIOMA
   ----------------------------------------------- */
.language-selector {
  margin-bottom: 15px;
}

.btn-group .btn {
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* -----------------------------------------------
   INPUTS
   ----------------------------------------------- */
.input-group .form-control {
  width: calc(100% - 45px) !important; /* necesario contra Bootstrap */
  background: transparent;
  color: white;
}

.input-group .input-group-text {
  width: 45px !important; /* necesario contra Bootstrap */
  color: white;
}

.input-group .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.input-group {
  margin-bottom: 10px;
}

.mb-3 {
  margin-bottom: 10px !important; /* override de Bootstrap spacing */
}

.form-text {
  margin-top: 5px;
  margin-bottom: 5px;
}

#id_email {
  font-size: 1.3rem;
}

#id_password {
  font-size: 1.3rem;
}

/* -----------------------------------------------
   BOTÓN DE ACCEDER
   ----------------------------------------------- */
#btn-ingresar {
  width: 95%;
  font-size: 1rem;
  height: 30px;
  background: linear-gradient(180deg, rgb(0, 0, 0) 0%, rgb(167, 37, 37) 100%);
}

#btn-ingresar:hover {
  width: 100%;
}

/* -----------------------------------------------
   LINKS
   ----------------------------------------------- */
#olvide-pass,
#solicitar-cuenta {
  color: #ffffff;
  font-weight: bold;
}

#olvide-pass:hover,
#solicitar-cuenta:hover {
  color: #e8f045;
}

/* -----------------------------------------------
   IMAGEN DE USUARIO
   ----------------------------------------------- */
.user-image {
  text-align: center;
  margin: 10px 0;
}

.user-image img {
  margin-top: 5px;
  opacity: 0.9;
  width: 60px;
  height: 60px;
  margin-bottom: 5px;
}

/* -----------------------------------------------
   SECCIÓN DE IMÁGENES (columna derecha)
   ----------------------------------------------- */
.section-imgs-nt img {
  width: 0;
  flex-grow: 1;
  object-fit: cover;
  opacity: 0.8;
  transition: 0.5s ease;
}

.section-imgs-nt img:hover {
  cursor: crosshair;
  width: 300px;
  opacity: 1;
  filter: contrast(120%);
}

/* -----------------------------------------------
   TEXTOS COLUMNA DERECHA
   ----------------------------------------------- */
.row-creditos {
  text-align: center;
  font-size: 1.1em;
}

.row-solicitar-cuenta {
  text-align: center;
  font-size: 1rem;
  margin-top: 1.5rem;
}

/* -----------------------------------------------
   MISCELÁNEOS
   ----------------------------------------------- */
.row.h-100 {
  height: 100%;
}

.row-empresas > div {
  text-align: center;
}

.cont-empresa {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-right: 0.8rem;
  padding-left: 0.8rem;
}

.login-logo-empresa {
  height: auto;
}

.link_empresa {
  color: #e56b9a;
  cursor: pointer;
  text-align: center;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

/* Tablet — max 768px */
@media (max-width: 768px) {
  .login-logo img {
    max-height: 60px;
    min-width: 100px;
  }

  .login-box {
    padding: 5px;
  }

  .login-box-front {
    width: 95%;
  }
}

/* Mobile — max 575.98px */
@media (max-width: 575.98px) {
  html {
    height: auto;
    overflow-y: auto;
  }

  body,
  body.login-page,
  body.hold-transition {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-cont {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .main-cont > .row {
    height: auto;
    min-height: auto;
  }

  .col-izquierda {
    min-height: auto;
    height: auto;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
  }

  .col-derecha {
    padding: 20px 15px;
  }

  .login-box {
    min-height: auto;
    margin-top: 20px;
  }

  .login-logo img {
    max-height: 50px;
    min-width: 80px;
  }

  .subtitulo-login {
    font-size: 1.1rem;
  }

  .row-subtitulo-bienvenido {
    font-size: 1rem;
    text-align: center;
  }

  .row-subtitulo-bienvenido > div > p {
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  .row-descripcion {
    font-size: 1rem;
  }

  .row-creditos {
    font-size: 1rem;
  }

  .row-solicitar-cuenta {
    margin-top: 0.8rem;
  }

  .row-empresas {
    margin-top: 0.8rem;
  }
}

/* Desktop grande — min 1200px */
@media (min-width: 1200px) {
  .login-logo img {
    max-height: 150px;
    min-width: 190px;
  }
}
