:root {
  --colorVerde: #8fd24c;
  --colorAzul: #186ed1;
  --colorRojo: #d62b2b;
  --colorAmalrillo: #d9cc0c;
  --colorGris: #efefef;
  --colorGrisOscuro: #c3c3c3;
  --colorAzulOscuro: #002855;
}

/* Modal and Backdrop Z-Index Priority */
.modal {
  z-index: 100005 !important;
}

.modal-backdrop {
  z-index: 100000 !important;
}

.datepicker {
  z-index: 100006 !important;
}

/* ------ */
p {
  margin: 0;
}

.form-control:focus {
  box-shadow: none;
}

.btn:focus {
  box-shadow: none;
}

.page-link:focus {
  box-shadow: none;
}

.custom-select:focus {
  box-shadow: none;
}

/* ------ */
.bg-textura {
  background: url(../img/textura.jpg);
}

.bg-login {
  background: url(../img/img1.jpg);
  background-repeat: no-repeat;
  background-position: 50% 90%;
  background-size: cover;
}

.bg-grises {
  background: linear-gradient(40deg,
      #f5fbfe 39%,
      #e6f1fd 39%,
      #e6f1fd 45%,
      #e0f0f5 45%,
      #e0f0f5 50%,
      #e6f1fd 50%,
      #e6f1fd 71%,
      #f5fbfe 71%);
  background-attachment: fixed;
}

.height-max {
  min-height: 100vh;
}

.width-max {
  width: 100%;
}

.bg-gris {
  background: #f3f3f3;
}

.borde-redius-izquierda {
  border-radius: 15px 0 0 15px;
}

.borde-redius-derecha {
  border-radius: 0 15px 15px 0;
}

@media screen and (max-width: 767px) {

  .borde-redius-derecha,
  .borde-redius-izquierda {
    border-radius: 15px;
  }

  #accordionSidebar {
    padding-top: 80px !important;
  }
}

.border-redius {
  border-radius: 15px;
}

.border-redondo {
  border-radius: 100%;
}

.border-circular {
  border-radius: 50px;
}

.btn-verde {
  background: var(--colorVerde);
}

.text-azul {
  color: var(--colorAzul);
}

.sombra {
  box-shadow: 0 3px 10px #0000004d;
}

.sombra-text {
  text-shadow: 0 3px 10px #0000004d;
}

.bg-verde {
  background: var(--colorVerde);
}

.gradiante-verde {
  background: radial-gradient(ellipse at center,
      rgba(102, 204, 153, 1) 0%,
      rgba(34, 139, 87, 1) 50%,
      rgba(20, 85, 52, 1) 100%);
}

.bg-amarillo {
  background: var(--colorAmalrillo);
}

.gradiante-amarillo {
  background: linear-gradient(288deg, rgba(253, 200, 48, 0.85), rgba(243, 115, 53, 1));
  -webkit-background: linear-gradient(288deg, rgba(253, 200, 48, 0.85), rgba(243, 115, 53, 1));
  -moz-background: linear-gradient(288deg, rgba(253, 200, 48, 0.85), rgba(243, 115, 53, 1));
}

.bg-rojo {
  background: var(--colorRojo);
}

.gradiante-rojo {
  background: linear-gradient(288deg, rgba(229, 38, 45, 0.85), rgba(239, 28, 45, 1));
  -webkit-background: linear-gradient(288deg, rgba(229, 38, 45, 0.85), rgba(239, 28, 45, 1));
  -moz-background: linear-gradient(288deg, rgba(229, 38, 45, 0.85), rgba(239, 28, 45, 1));
}

.bg-azul {
  background: var(--colorAzul);
}

.gradiante-azul {
  background: radial-gradient(ellipse at center,
      rgba(100, 149, 237, 1) 0%,
      rgba(41, 98, 155, 1) 50%,
      rgba(25, 60, 95, 1) 100%);
}

.bg-azul-o {
  background: var(--colorAzulOscuro);
}

.bg-gris {
  background: var(--colorGris);
}

.bg-gris-o {
  background: var(--colorGrisOscuro);
}

.label-img {
  background: #c3c3c3;
  height: 80px;
  width: 100%;
}

.border-bot {
  border-bottom: 2px solid var(--colorAzul);
}

.border-solid {
  border: 1px solid #000;
}

/* ------------- CSS PERSONALIZADOS --------------- */
.carpeta {
  background: #fff;
  box-shadow: 0 3px 10px #0000004d;
  border-radius: 0 20px 20px 20px;
  position: relative;
  z-index: auto;
}

.carpeta:before {
  content: "";
  position: absolute;
  border-radius: 20px 20px 0 0;
  height: 30px;
  width: 60%;
  background: #fff;
  box-shadow: 0 -3px 5px #0000004d;
  top: -30px;
  left: 0;
  transition: all 0.3s ease;
}

/* ============================================
   14.5 AJUSTES DE IMAGENES CARPETA
   ============================================ */
.carpeta-img {
  height: 90px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .carpeta-img {
    height: 70px;
    /* Reducir un poco en móviles */
  }
}

/* ============================================
   15. MENÚ DE SOPORTE (CONFIGURACIÓN)
   ============================================ */

/* Estilo base del menú de SOPORTE */
.options-congi {
  border-radius: 12px;
  /* overflow: hidden; Removed to allow submenus to show */
  min-width: 200px;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  animation: slideDown 0.3s ease-out;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.1),
    0 5px 10px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  top: 50px;
  z-index: 99999;
  display: none;
}

/* Submenu support for the new glassmorphism menu */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  right: 100%;
  /* Opens to the left (dropleft) */
  left: auto;
  margin-right: 10px;
  background: #ffffff !important;
  opacity: 1 !important;
  backdrop-filter: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
  margin-top: 0 !important;
  top: 0 !important;
  transform: none !important;
}

/* Invisible bridge to prevent menu from closing when moving mouse across gap */
.dropdown-submenu .dropdown-menu::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 0;
  right: -20px;
  /* Extends 20px to the right to touch the main menu */
  width: 20px;
  height: 100%;
  background: transparent;
  z-index: 10;
}

/* Hide ::after to avoid visual artifacts */
.dropdown-submenu .dropdown-menu::after {
  display: none !important;
  content: none !important;
}

.dropdown-submenu .dropdown-menu .dropdown-item {
  color: #333333 !important;
  font-weight: 600;
}

.dropdown-submenu .dropdown-menu .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #007bff !important;
}

.dropdown-submenu:hover>.dropdown-menu {
  display: block;
}

/* Lista del menú SOPORTE */
.options-congi .list-group {
  margin-bottom: 0;
  list-style: none;
  padding: 0;
}

/* Items de la lista SOPORTE */
.options-congi .list-group li {
  border: none;
  padding: 0;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
}

/* Links dentro del menú SOPORTE - ELEGANTE */
.options-congi .list-group a.card-link {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  color: #334155 !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  margin: 2px 0 !important;
  font-size: 14px !important;
  width: 100% !important;
}

.options-congi .list-group a.card-link:hover {
  background-color: #f8fafc !important;
  color: #2563eb !important;
  transform: translateX(5px) !important;
}

.options-congi .list-group a.card-link i {
  font-size: 1.1rem !important;
  width: 20px !important;
  text-align: center !important;
}

/* Iconos dentro de los links del menú SOPORTE */
.options-congi .list-group span i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  transition: transform 0.3s ease;
  z-index: 1;
  color: #6b7280;
}

.options-congi .list-group a.card-link:hover span i {
  transform: translateX(2px);
  color: #2563eb;
}

/* Efecto de fondo gradiente en hover */
/* Efecto de fondo gradiente ELIMINADO para evitar desbordamiento visual
.options-congi .list-group li::before {
  display: none !important;
}
*/

/* Línea izquierda animada en hover */
/* Línea lateral ELIMINADA para evitar desbordamiento visual
.options-congi .list-group li::after {
  display: none !important;
}
*/

/* Reset de efectos excesivos para evitar "glow" desplazado */
.options-congi .list-group a.card-link:hover {
  background-color: #f8fafc !important;
  color: #2563eb !important;
  /* Eliminamos transformaciones bruscas */
  transform: none !important;
  padding-left: 16px !important;
  /* Mantenemos padding original */
}

/* Estado active (al hacer click) - Sin scale */
.options-congi .list-group a.card-link:active {
  transform: none !important;
  background: rgba(37, 99, 235, 0.1);
}

/* Borde especial para el primer item */
.options-congi .list-group .border-bot {
  border-bottom: 2px solid rgba(37, 99, 235, 0.2) !important;
  margin-bottom: 4px;
}

.options-congi .list-group .border-bot:hover {
  border-bottom-color: #2563eb !important;
}

/* Efecto hover para "Salir" (rojo) */
.options-congi .list-group li:has(a[href*="Salir"]):hover {
  background: rgba(220, 38, 38, 0.05);
}

.options-congi .list-group li:has(a[href*="Salir"]):hover::after {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
}

.options-congi .list-group li:has(a[href*="Salir"]):hover a {
  color: #dc2626 !important;
}

.options-congi .list-group li:has(a[href*="Salir"]):hover span i {
  color: #dc2626;
}

/* Animación de entrada del menú */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-buscar {
  right: 0px;
}

.padding-top {
  padding-top: 150px;
  padding-bottom: 100px;
}

@media screen and (max-width: 767px) {
  .btn-buscar {
    right: 30px;
  }

  .padding-top {
    padding-top: 180px;
  }
}

/* ---------------------------- */
input[type="checkbox"] {
  position: relative;
  width: 40px;
  height: 20px;
  -webkit-appearance: none;
  appearance: none;
  background: #c6c6c6;
  outline: none;
  border-radius: 20px;
  transition: 0.3s;
}

input:checked[type="checkbox"] {
  background: #03a9f4;
}

input[type="checkbox"]:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 20px;
  top: 0;
  left: 0;
  background: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

input:checked[type="checkbox"]:before {
  left: 20px;
}

/* Utilidades de elevación */
.hover-elevate {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-elevate:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
  z-index: 10;
}

.sombra-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

@media (max-width: 991.98px) {

  .sidebar .sidebar-brand,
  .sidebar .sidebar-brand img,
  .sidebar img.sidebar-brand-icon,
  div.sidebar-brand {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

.tooltip {
  z-index: 100010 !important;
}