/* Google Fonts Import Link */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  overflow: hidden;
  background-color: #f0f0f0; /* Color de fondo opcional */
  box-sizing: border-box; /* Asegura que el padding y border se incluyan en el tamaño total del elemento */

}
.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 260px;
  background: #265da3;
  z-index: 100;
  transition: all 0.5s ease;
  
}
.sidebar.close{
  width: 78px;
}
.sidebar .logo-details{
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
}
.sidebar .logo-details i{
  font-size: 39px;
  color: #fff;
  height: 50px;
  min-width: 78px;
  text-align: center;
  line-height: 50px;
}
.sidebar .logo-details .logo_name{
  font-size: 22px;
  color: #fff;
  font-weight: 600;
  transition: 0.3s ease;
  transition-delay: 0.1s;
}
.sidebar.close .logo-details .logo_name{
  transition-delay: 0s;
  opacity: 0;
  pointer-events: none;
}
.sidebar .nav-links{
  height: 100%;
  padding: 20px 0 150px 0;
  overflow-y: auto;
}
.sidebar.close .nav-links{
  overflow: visible;
}
.sidebar .nav-links::-webkit-scrollbar{
  display: none;
}
.sidebar .nav-links li {
  position: relative;
  list-style: none;
  transition: all 0.4s ease;
}
/* Hover del menú principal */
.sidebar .nav-links li:hover {
  border-radius: 16px;
  background: #1d1b31;
  color: rgb(255, 255, 255);
}

/* SweetAlert2: forzar botón de confirmación azul (evita estilo morado por defecto) */
.swal2-styled.swal2-confirm,
.swal2-confirm.swal2-styled {
  background-color: #265da3 !important;
  border-color: #265da3 !important;
}

.swal2-styled.swal2-confirm:hover,
.swal2-confirm.swal2-styled:hover {
  background-color: #1d4a8c !important;
}

.swal2-styled.swal2-confirm:focus,
.swal2-confirm.swal2-styled:focus,
.swal2-styled.swal2-confirm:active,
.swal2-confirm.swal2-styled:active {
  box-shadow: 0 0 0 3px rgba(38, 93, 163, 0.35) !important;
}



/* No aplicar hover a los submenús dentro del menú principal */
.sidebar .nav-links li .sub-menu2 li:hover {
  background: #265da3; /* Cambia el fondo al pasar el ratón sobre un item del submenú */
  color: #020202; /* Asegúrate de que el texto sea legible */
  border-radius: 16px;
}

/* Ajustes de hover solo para los elementos principales del menú (sin afectar el submenú) */
.sidebar .nav-links li:hover > .sub-menu2 {
  display: block; /* Asegura que el submenú aparezca al hacer hover sobre el li */
  opacity: 1;
  pointer-events: auto;
}



/* Hover de los elementos de la lista dentro del submenú */
.sidebar .nav-links li .sub-menu2 li a {
  padding: 8px 12px ;
  color: #000000;
  text-decoration: none;
  width: 100%;
}

/* Hover dentro del submenú */
.sidebar .nav-links li .sub-menu2 li a:hover {
  background: #265da3; /* Fondo del submenú al pasar el ratón */
  color: #050505;
  border-radius: 16px;
}



.sidebar .nav-links li .iocn-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar.close .nav-links li .iocn-link{
  display: block
  
}
.sidebar .nav-links li i{
  height: 50px;
  min-width: 78px;
  text-align: center; /* centrar el icono en el menu */
  line-height: 50px;
  color: #fff;
  font-size: 22px;   /* Tamaño de icono del mennu */
  cursor: pointer;

  

}

/* Sub menu 2 */
div.group{
height: 30px;


}

.sidebar .nav-links li  .sub-menu2 {
  margin-bottom: 0; /* Elimina el margen inferior */
  padding: 8px 6px 10px 80px; /* Reduce el padding inferior */
  margin-top: -45px; /* Reduce el margen superior */
  background:  #ffffff;
  display: flex;
  overflow-wrap: normal;
  line-height: 1.2; /* Espacio entre líneas para mejorar la legibilidad */
  border: solid;
  margin-left: -18px;
  
   
}
.sidebar.close .nav-links li .sub-menu2 li {
  
  margin-bottom: 0; /* Elimina el margen inferior de los elementos del submenú */
}

.sidebar .nav-links  .arrow-2 {
  text-align: center;
  line-height: 50px;
  color: #f1f0f0;
  font-size: 20px;
  cursor: pointer;
  position: relative; /* Permite ajustar la posición de la flecha */
  top: -40px; /* Mueve la flecha hacia arriba (ajusta según sea necesario) */
  right: -150px; /* Mueve la flecha hacia la derecha (ajusta según sea necesario) */
}

.sidebar.open .nav-links li.showSubMenu i.arrow-2{
  transform: rotate(-180deg);
}
.sidebar .nav-links li.showSubMenu .arrow-2 {
  transform: rotate(180deg); /* Asegúrate de usar 180deg para rotar */
}


.sidebar .nav-links li .sub-menu {
  margin-top: -5px; /* Ajustar o eliminar */
  padding: 10px 6px 8px 80px; /* Reducir el padding superior e inferior */
}

.sidebar .nav-links li .sub-menu li {
  margin-bottom: 0; /* Eliminar margen inferior */
}

.sidebar .nav-links li .sub-menu2 {
  margin-top: -10px; /* Ajustar este valor para reducir el espacio */
  padding: 6px 15px 8px 20px; /* Reducir el padding superior e inferior */
}

.sidebar .nav-links li .sub-menu2 li {
  margin-bottom: 0; /* Eliminar márgenes innecesarios */
}




/* Sub menu 2 */






.sidebar .nav-links li.showMenu i.arrow{
  transform: rotate(-180deg);
}
.sidebar.close .nav-links i.arrow{
  display: none;
  justify-content: flex-start;
}
.sidebar .nav-links li  a{
  display: flex;
  align-items: center;
  text-decoration: none;
  
}
.sidebar .nav-links li a .link_name{
  font-size: 13px;    /* tamaño de letra */
  font-weight: 400;
  color: #fff;
  transition: all 0.4s ease;
  margin-left: -15px;
  white-space: nowrap;
  
}
.sidebar.close .nav-links li a .link_name{
  opacity: 0;
  pointer-events: none;
}
.sidebar .nav-links li .sub-menu{
  padding: 6px 6px 14px 50px;
  margin-top: -5px;
  background: #1d1b31;
  display: none;
  max-height: 230px;
  overflow-y: scroll;
  border: solid;
 
}
.sidebar .nav-links li.showMenu .sub-menu{
  display: block;
}
.sidebar .nav-links li .sub-menu a{
 
  color: #ffffff;
  font-size: 14px;
  display: flex;
  white-space: normal;
  overflow-y: visible;
  width: 190px;
  opacity: 0.6;
  transition: all 0.3s ease;
  margin-left: -1px;
  margin-bottom: 5px;
  
 
 
}
.sidebar .nav-links li .sub-menu a:hover{
  opacity: 1;
}
.sidebar.close .nav-links li .sub-menu{
  position: absolute;
  left: 100%;
  top: -10px;
  margin-top: 0;
  padding: 10px 20px;
  border-radius: 0 6px 6px 0;
  opacity: 0;
  display: block;
  pointer-events: none;
  transition: 0s;
  margin-left: 0px;
  
 
}
.sidebar.close .nav-links li:hover .sub-menu{
  top: 0;
  opacity: 1;
  pointer-events: auto;
  transition: all 0.4s ease;
}
.sidebar .nav-links li .sub-menu .link_name{
  display: none;
}
.sidebar.close .nav-links li .sub-menu .link_name{
  font-size: 15px;
  opacity: 1;
  display: block;
  color: aqua;
  margin-left: -10px;
  
  
 
}
.sidebar .nav-links li .sub-menu.blank{
  opacity: 1;
  pointer-events: auto;
  padding: 3px 20px 6px 16px;
  opacity: 0;
  pointer-events: none;
  
  
 
  
}
.sidebar .nav-links li:hover .sub-menu.blank{
  top: 50%;
  transform: translateY(-50%);
}
.sidebar .profile-details{
  position: fixed;
  bottom: 0;
  width: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1d1b31;
  padding: 12px 0;
  transition: all 0.5s ease;
 
}
.sidebar.close .profile-details{
  background: none;
}
.sidebar.close .profile-details{
  width: 78px;
}
.sidebar .profile-details .profile-content{
  display: flex;
  align-items: center;
}
.sidebar .profile-details img{
  height: 52px;
  width: 52px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 14px 0 12px;
  background: #1d1b31;
  transition: all 0.5s ease;
}
.sidebar.close .profile-details img{
  padding: 10px;
}
.sidebar .profile-details .profile_name,
.sidebar .profile-details .job{
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}
.sidebar.close .profile-details i,
.sidebar.close .profile-details .profile_name,
.sidebar.close .profile-details .job{
  display: none;
}
.sidebar .profile-details .job{
  font-size: 12px;
}


/* Sidebar cerrada ajusta la sección home */
.sidebar.close ~ .home-section {
  left: 79px; /* Incrementado ligeramente */
  width: calc(100% - 90px); /* Ajustado para coincidir con el nuevo valor de left */
}

.sidebar.close ~ .home-section nav {
  width: calc(100% - 80px); /* Ajustado para coincidir con el nuevo valor de left */
}


/* Estilos generales para el contenido de la sección home */
.home-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Estilos para el ícono del menú y el texto en la sección home */
.home-section .home-content .bx-menu,
.home-section .home-content .text {
  color: #080707;
  font-size: 38px;
  cursor: pointer;
  display: flex;
}

/* Estilo específico del ícono del menú */
.home-section .home-content .bx-menu {
  cursor: pointer;
  margin-right: 10px;
}

/* Estilo específico del texto */
.home-section .home-content .text {
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

/* Estilos para la sección home */
.home-section {
  position: relative;
  background: #f5f5f5;
  min-height: 11vh;
  max-width: 100%;
  width: calc(100% - 280px); /* Incrementado ligeramente el ancho */
  left: 260px; /* Mueve la sección un poco más a la derecha */
  transition: all 0.5s ease;
}

/* Estilos para el nav dentro de la sección home */
.home-section nav {
  display: flex;
  justify-content: space-between;
  height: 70px;
  background: #fff;
  align-items: center;
  position: fixed;
  width: calc(100% - 260px); /* Ajustado para coincidir con el nuevo valor de left */
  z-index: 100;
  padding: 0 14px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
}

/* Estilos para el botón de la sidebar */
.home-section nav .sidebar-button {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 500;
}

/* Corregido el nombre de la clase de 'sidebar-butthon' a 'sidebar-button' */
.home-section nav .sidebar-button i {
  font-size: 35px;
  margin-right: 10px;
}



/* Ajuste para el campo de búsqueda y el ícono */
.home-section nav .search-box {
  height: 40px;
  width: 400px;
  margin: 0 10px;
  position: relative;
  margin-left: auto;
}

nav .search-box input {
  position: absolute;
  height: 100%;
  width: calc(100% - 40px);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  background: #f5f6fa;
  border: 2px solid #efeef1;
  outline: none;
}

nav .search-box .bx-search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  width: 30px;
  background: #0e3050;
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
}

#search-result {
  max-height: 400px;
  overflow-y: auto;
  width: calc(35% - 20px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: absolute; 
  top: 55px;
  left: 44%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none;
}

/* Responsive para pantallas medianas */
@media (max-width: 1024px) {
  #search-result {
    width: calc(50% - 20px);
  }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  #search-result {
    width: calc(80% - 20px);
  }
}

/* Responsive para móviles */
@media (max-width: 480px) {
  #search-result {
    width: calc(90% - 20px);
  }
}

.search-link {
  display: block;
  font-size: 14px;
  text-align: left;
  padding: 12px 16px;
  text-decoration: none;
  color: #2d3748;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.search-link:last-child {
  border-bottom: none;
}

.search-link:hover,
.search-link.selected {
  background: linear-gradient(135deg, #004080  0%, #3763f5 100%);
  color: white;
  padding-left: 20px;
}

.search-link strong {
  font-weight: 600;
}

#search-result::-webkit-scrollbar {
  width: 6px;
}

#search-result::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#search-result::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

#search-result::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}






/* perfil 1  lateral derecho */






.home-section nav   .profile-details1{
 display: flex;
 align-items: center;
 height: 50px;
 min-width: 180px;
 background: #f5f6fa;
 border: 2px solid #efeef1;
 border-radius: 5px;
 padding: 0 15px 0 2px ;
 margin: 14px;

  

}
nav   .profile-details1 img{
 height: 40px;
 width: 40px;
 object-fit: cover;
 border-radius: 6px;


}
nav   .profile-details1 .admin_name{
font-size: 15px;
font-weight: 500;
color: #333;
margin: 0 10px;
white-space: nowrap;


}

nav   .profile-details1 i{

 color: #333;
 font-size: 25px;
 cursor: pointer;



}

.profile-details1 .sub-menu {
  display: none;
  width: 170px;
  position: absolute;
  top: 70px;
  right: 0;
  background-color: white;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  padding: 5px;
  z-index: 10;
  list-style: none;
  border-radius: 5px;
  right: 35px; /* Mueve la flecha hacia la derecha (ajusta según sea necesario) */

}

.profile-details1 .sub-menu li {
  margin: 5px 0;
}

.profile-details1 .sub-menu li a {
  text-decoration: none;
  color: black;
  padding: 5px 10px;
  display: block;
  border-radius: 5px;
  cursor: pointer;
}

.profile-details1 .sub-menu li a:hover {
  background-color: #f0f0f0;
}


.profile-details1.showSubMenu i.arrow {
  transform: rotate(180deg); /* Rotar la flecha cuando el submenú está visible */
}

/* perfil 1  lateral derecho */

.icons {
  display: flex;
  align-items: center;
  gap: 15px; /* Espacio entre los íconos */
  margin-right: 12px; /* Ajusta este valor si es necesario */
  margin-left: auto; /* Desplaza los íconos hacia la derecha */
}

.icons i {
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border: 1px solid rgba(9, 97, 212, 0.3); /* 👈 Borde más suave */
  border-radius: 50%;
  color: rgb(9, 97, 212);
}









@media screen and (max-width: 400px){

 
  
  .sidebar{
    width: 240px;
  }
  .sidebar.close{
    width: 78px;
  }
  .sidebar .profile-details{
    width: 240px;
  }
  .sidebar.close .profile-details{
    background: none;
  }
  .sidebar.close .profile-details{
    width: 78px;
  }
  .home-section{
    left: 240px;
    width: calc(100% - 240px);
  }
  .sidebar.close ~ .home-section{
    left: 78px;
    width: calc(100% - 78px);
  }
  


  
}
/* Ocultar el ítem del modo noche cuando el sidebar está cerrado */
.sidebar.close .dark-mode-li {
  display: none;
}

/* Mostrar cuando el sidebar está abierto */
.sidebar .dark-mode-li {
  display: block;
}

/* --- ESTILOS PARA MODO OSCURO --- */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

body.dark-mode nav {
  background-color: #1e1e1e;
  color: white;
}

body.dark-mode .sidebar {
  background: #1f1f1f;
}

body.dark-mode .sidebar .nav-links li:hover {
  background: #333;
}

body.dark-mode .sidebar .nav-links li .link_name,
body.dark-mode .sidebar .nav-links li i {
  color: #fff;
}

body.dark-mode .home-section {
  background: #1e1e1e;
  color: white;
}

body.dark-mode .profile-details1,
body.dark-mode .search-box input {
  background: #2c2c2c;
  border: 1px solid #444;
  color: white;
}
