:root {
    --sidebar-width: 250px;
    --navbar-height: 60px;
    --primary-color: #3b7ddd;
    --text-color: #495057;
    --bg-color: #f5f7fb;
    --sidebar-bg: #222E3C;
    --navbar-bg: #fff;
    --sidebar-text-color: #e9ebef;
}

body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.2;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1000;
    background: var(--sidebar-bg);
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-top: 2px solid #2AD806; /* Línea verde en el top */
}

.sidebar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
/* Add these styles to your existing CSS file */
.sidebar-logo {
    max-width: 80%;
    height: auto;
    transition: opacity 0.3s ease;
}

.full-logo {
    display: block;
}

.mini-logo {
    display: none;
    max-width: 30px; /* Adjust as needed */
}

.sidebar.collapsed .full-logo {
    display: none;
}

.sidebar.collapsed .mini-logo {
    display: block;
}

/* Update the existing .sidebar.collapsed styles */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0.5rem;
}



.sidebar-brand:hover .sidebar-logo {
    transform: scale(1.05);
}

.sidebar-nav {
    padding-left: 0;
    list-style: none;
}

.sidebar-item {
    position: relative;
    margin-bottom: 0.5rem;
    list-style: none;
}

.sidebar-item:first-child {
    margin-top: 1rem;
}

/* Estilos para el enlace activo en la sidebar */
.sidebar-link.active {
    background: linear-gradient(to right, rgb(9, 255, 0) 2%, rgba(79, 247, 36, 0.178) 2%, transparent);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-item.active > .sidebar-link {
    color: #fff;
    font-weight: bold;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 0.25rem;
    cursor: pointer;
}

.sidebar-link:hover {
    background-color: rgba(9, 255, 0, 0.2);
    color: #fff;
}

.sidebar-icon,
.sidebar-icon-sm {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-icon-sm {
    width: 1rem;
    height: 1rem;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:hover .sidebar-icon-sm {
    transform: scale(1.1);
    color: #fff;
}

.sidebar-text, .sidebar-text-sm {
    transition: color 0.2s ease;
}

.sidebar-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sidebar-link[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(180deg);
}
.sidebar {
    transition: all 0.3s ease-in-out;
}

.sidebar-dropdown {
    padding-left: 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    visibility: hidden;
}

.sidebar-dropdown.show {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

.sidebar.collapsed .sidebar-text {
    display: none; /* Oculta los textos */
}

.sidebar.collapsed .sidebar-arrow {
    display: none; /* Oculta las flechas de dropdown */
}

.sidebar.collapsed .sidebar-icon {
    margin-right: 0; /* Ajusta el margen para centrar los íconos */
    justify-content: center; /* Centra los íconos */
}

.sidebar.collapsed .sidebar-link {
    justify-content: center; /* Centra los enlaces */
    padding: 0.75rem; /* Ajusta el padding si es necesario */
}

.sidebar::-webkit-scrollbar {
    width: 8px; /* Ancho de la barra de desplazamiento */
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1; /* Color del fondo de la barra de desplazamiento */
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888; /* Color de la barra de desplazamiento */
    border-radius: 10px; /* Bordes redondeados */
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555; /* Color de la barra de desplazamiento al pasar el mouse */
}

.navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    z-index: 900;
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    width: calc(100% - var(--sidebar-width));
}

.sidebar.collapsed ~ .navbar {
    left: 60px; /* Ajusta el margen izquierdo al ancho minimizado */
    width: calc(100% - 60px); /* Recalcula el ancho */
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.navbar-collapse {
    display: flex;
    flex-grow: 1;
    align-items: center;
}

.navbar-align {
    margin-left: auto;
}

.sidebar-toggle {
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-color);
}
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease-in-out;
    padding-top: calc(var(--navbar-height) + 20px);
    padding: calc(var(--navbar-height) + 3vh) 10vh 10vh;
    transition: margin-left 0.3s ease-in-out;
    min-height: 100vh;
    box-sizing: border-box;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px; /* Ajusta el margen para la barra minimizada */
}
/* Utility Classes */
.align-middle {
    vertical-align: middle;
}


/* Icon and Image Styles */
.feather {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Dropdown Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: var(--text-color);
    text-align: left;
    list-style: none;
    background-color: var(--navbar-bg);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: var(--text-color);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}
/* Estilos para dispositivos móviles */
@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: 60px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    background-color: var(--sidebar-bg);
  }

  .sidebar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }
  .sidebar-item:first-child {
    margin-top: 0;
    }
  .sidebar-brand,
  .sidebar-nav > .sidebar-item > .sidebar-link > .sidebar-text,
  .sidebar-nav > .sidebar-item > .sidebar-link > .sidebar-arrow {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    width: 100%;
    padding: 0;
    margin: 0;
    justify-content: center;
  }

  .sidebar-nav > .sidebar-item {
    flex: 0 0 auto;
    margin: 0 5px;
    display: flex;
    align-items: center;
  }

  .sidebar-nav > .sidebar-item > .sidebar-link {
    padding: 0 15px;
    justify-content: center;
    align-items: center;
    height: 60px;
    display: flex;
  }

  .sidebar-icon {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .sidebar-dropdown {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background-color: var(--sidebar-bg);
    padding: 10px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    transform: translateY(100%);
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
  }

  .sidebar-dropdown.show {
    transform: translateY(0);
  }

  .sidebar-dropdown .sidebar-item {
    flex: 0 0 auto;
    margin-right: 15px;
    display: flex;
    align-items: center;
  }

  .sidebar-dropdown .sidebar-link {
    white-space: nowrap;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    height: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.267);
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 70px;
    padding-left: 0;
    padding-right: 0;
    padding-top: calc(var(--navbar-height) + 3vh);
  }

  .navbar {
    left: 0;
    width: 100%;
  }

  /* Hide scrollbar for Chrome, Safari and Opera */
  .sidebar-nav::-webkit-scrollbar,
  .sidebar-dropdown::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar for IE, Edge and Firefox */
  .sidebar-nav,
  .sidebar-dropdown {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
}

