
/* =========================
   Login GLPI - versión clara (BLANCO)
   ========================= */

/* Fondo SOLO en la página de login */
body.welcome-anonymous {
  margin: 0;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Aseguramos altura completa sin romper GLPI */
body.welcome-anonymous .page-anonymous {
  min-height: 100vh;
}

/* ======== CARD PRINCIPAL DEL LOGIN (BLANCA) ======== */
body.welcome-anonymous #login.card {
  background: #ffffff !important;
  border: 0;
  border-radius: 32px !important;   /* <-- MÁS REDONDO (antes era 16px) */
  overflow: hidden;                 /* <-- CLAVE para esquinas limpias */
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Espaciado interno del card */
body.welcome-anonymous #login .card-body {
  padding: 34px 30px;
  background: #ffffff !important;
}

/* Encabezado del login */
body.welcome-anonymous .card-header {
  background: #ffffff !important;
  border-bottom: none;
}

body.welcome-anonymous .card-header h2 {
  color: #111;
  font-weight: 700;
}

/* ======== INPUTS (BLANCOS) ======== */
body.welcome-anonymous #login input[type="text"],
body.welcome-anonymous #login input[type="password"],
body.welcome-anonymous #login select {
  width: 100%;
  background: #ffffff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
}

/* Focus de inputs */
body.welcome-anonymous #login input[type="text"]:focus,
body.welcome-anonymous #login input[type="password"]:focus,
body.welcome-anonymous #login select:focus {
  outline: none;
  border-color: #1e90ff;
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18);
}

/* ======== BOTÓN (AZUL MODERNO) ======== */
body.welcome-anonymous #login button.btn.btn-primary {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
}

body.welcome-anonymous #login button.btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

/* Enlaces */
body.welcome-anonymous #login a {
  color: #1e90ff;
}

/* Errores */
body.welcome-anonymous #login .alert-danger {
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 500px) {
  body.welcome-anonymous #login .card-body {
    padding: 26px 18px;
  }
}

/* =========================
   FIX: inputs/select oscuros (forzar estilo claro)
   ========================= */

body.welcome-anonymous #login label.form-label,
body.welcome-anonymous #login .form-check-label {
  color: #111 !important;
  font-weight: 600;
}

/* Inputs y selects de GLPI/Bootstrap */
body.welcome-anonymous #login .form-control,
body.welcome-anonymous #login .form-select,
body.welcome-anonymous #login select,
body.welcome-anonymous #login input[type="text"],
body.welcome-anonymous #login input[type="password"] {
  background: #fff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  height: auto !important;
  box-shadow: none !important;
}

/* Placeholder */
body.welcome-anonymous #login .form-control::placeholder,
body.welcome-anonymous #login input::placeholder {
  color: rgba(17,17,17,0.45) !important;
}

/* Focus bonito */
body.welcome-anonymous #login .form-control:focus,
body.welcome-anonymous #login .form-select:focus,
body.welcome-anonymous #login select:focus,
body.welcome-anonymous #login input:focus {
  border-color: #1e90ff !important;
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18) !important;
  outline: none !important;
}

/* Select: flecha y padding */
body.welcome-anonymous #login .form-select,
body.welcome-anonymous #login select {
  padding-right: 40px !important;
}

/* Checkbox “Recuérdame” */
body.welcome-anonymous #login .form-check-input {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
}

body.welcome-anonymous #login .form-check-input:checked {
  background-color: #1e90ff;
  border-color: #1e90ff;
}

/* Separación entre bloques */
body.welcome-anonymous #login .mb-3,
body.welcome-anonymous #login .mb-4 {
  margin-bottom: 16px !important;
}

/* Link de “¿Olvidó su contraseña?” más elegante */
body.welcome-anonymous #login .form-label-description a,
body.welcome-anonymous #login a {
  color: #1e90ff !important;
  font-weight: 600;
  text-decoration: none;
}

body.welcome-anonymous #login a:hover {
  text-decoration: underline;
}
/* =========================
   Hacer que el SELECT sea igual a los inputs
   ========================= */

body.welcome-anonymous #login .form-select,
body.welcome-anonymous #login select {
  appearance: none;               /* Quita estilo nativo del navegador */
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: #ffffff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  height: auto !important;
  font-size: 15px !important;
  box-shadow: none !important;

  /* Flecha personalizada */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23111' d='M2 0L0 2h4zM2 5L0 3h4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 10px !important;
}

/* Focus igual que los inputs */
body.welcome-anonymous #login .form-select:focus,
body.welcome-anonymous #login select:focus {
  border-color: #1e90ff !important;
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18) !important;
  outline: none !important;
}

}

/* =========================
   FIX definitivo: "Origen del inicio de sesión"
   (cuando GLPI usa Tom Select)
   ========================= */

body.welcome-anonymous #login .ts-wrapper {
  width: 100% !important;
}

/* Caja visible (lo que ahora ves oscuro) */
body.welcome-anonymous #login .ts-control {
  background: #fff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  min-height: 44px !important;
  box-shadow: none !important;
}

/* Texto seleccionado / input interno */
body.welcome-anonymous #login .ts-control .item,
body.welcome-anonymous #login .ts-control input {
  color: #111 !important;
  font-size: 15px !important;
}

/* Flecha del control */
body.welcome-anonymous #login .ts-control::after {
  border-color: #111 transparent transparent transparent !important;
}

/* Dropdown de opciones */
body.welcome-anonymous #login .ts-dropdown {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
}

/* Opciones */
body.welcome-anonymous #login .ts-dropdown .option {
  background: #fff !important;
  color: #111 !important;
  padding: 10px 12px !important;
}

body.welcome-anonymous #login .ts-dropdown .option.active,
body.welcome-anonymous #login .ts-dropdown .option:hover {
  background: rgba(30,144,255,0.10) !important;
}

/* Focus igual que inputs */
body.welcome-anonymous #login .ts-wrapper.focus .ts-control {
  border-color: #1e90ff !important;
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18) !important;
}
/* =========================
   FIX Select2 (Origen del inicio de sesión)
   ========================= */

/* Contenedor select2 en login */
body.welcome-anonymous #login .select2-container {
  width: 100% !important;
}

/* Caja cerrada (lo que se ve como input) */
body.welcome-anonymous #login .select2-container--default .select2-selection--single {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 12px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
}

/* Texto seleccionado */
body.welcome-anonymous #login .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #111 !important;
  padding-left: 14px !important;
  padding-right: 40px !important;
  line-height: 44px !important;
  font-size: 15px !important;
}

/* Flecha */
body.welcome-anonymous #login .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
  right: 10px !important;
}

/* Dropdown (lista desplegable) */
body.welcome-anonymous .select2-container--open .select2-dropdown {
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
}

/* Opciones */
body.welcome-anonymous .select2-results__option {
  padding: 10px 12px !important;
  font-size: 15px !important;
  color: #111 !important;
  background: #fff !important;
}

/* Hover / seleccionado */
body.welcome-anonymous .select2-results__option--highlighted[aria-selected] {
  background: rgba(30,144,255,0.10) !important;
  color: #111 !important;
}

/* Focus (cuando haces click) */
body.welcome-anonymous #login .select2-container--default.select2-container--focus .select2-selection--single,
body.welcome-anonymous #login .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #1e90ff !important;
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18) !important;
}
/* =========================
   Select2 dropdown (lista) en BLANCO
   ========================= */

/* El contenedor del dropdown (cuando está abierto) */
body.welcome-anonymous .select2-container--open .select2-dropdown {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18) !important;
}

/* La lista de resultados */
body.welcome-anonymous .select2-results {
  background: #fff !important;
}

/* Cada opción */
body.welcome-anonymous .select2-results__option {
  background: #fff !important;
  color: #111 !important;
}

/* Hover / activa */
body.welcome-anonymous .select2-results__option--highlighted[aria-selected] {
  background: rgba(30,144,255,0.12) !important;
  color: #111 !important;
}

/* Seleccionada */
body.welcome-anonymous .select2-results__option[aria-selected="true"] {
  background: rgba(0,0,0,0.04) !important;
  color: #111 !important;
}
