/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', sans-serif;
  background-color: white;
  color: #242424;
  transition: all 0.3s ease;
}

/* ===== SIDEBAR TOGGLE BUTTON ===== */
.sidebar-toggle {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1001;
  background-color: #2a7f00;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.125rem;
  display: none; /* Oculto en desktop */
  transition: all 0.3s ease;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
  background-color: #1e5c00;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 17.5rem;
  height: 100vh;
  background-color: #2a7f00;
  color: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0.125rem 0 0.625rem rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

/* ===== SIDEBAR HEADER ===== */
.sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.logos-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9375rem;
  margin-bottom: 0.9375rem;
}

.logo-jke,
.logo-sena {
  height: 3.125rem;
}

.logo-jke {
  border-radius: 0.625rem;
}

.titulo-header {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.9375rem 1.5625rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 0.1875rem solid transparent;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: white;
  padding-left: 0.9375rem;
  box-shadow: 0 0.375rem 0.625rem rgba(0, 0, 0, 0.25);
}

.nav-item i {
  width: 1.25rem;
  margin-right: 0.9375rem;
  font-size: 1rem;
}

.nav-item span {
  font-weight: 500;
}

/* ===== SIDEBAR UTILITIES ===== */
.sidebar-utilities {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.utility-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.3125rem;
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

.utility-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: white;
  padding-left: 0.9375rem;
  box-shadow: 0 0.375rem 0.625rem rgba(0, 0, 0, 0.25);
}

.utility-item i {
  width: 1.25rem;
  margin-right: 0.9375rem;
  font-size: 1rem;
}

.utility-item span {
  font-size: 0.875rem;
}


/* ===== SIDEBAR OVERLAY (solo móvil) ===== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* ==== MODO OSCURO SOLO main-content Y sidebar ==== */

/* Fondos de contenedores */
body.dark .sidebar,
body.dark .main-content {
  background-color: #1e1e1e;
  color: #ffffff;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.3); /* Darker shadow */
}

/* Cambios en textos dentro del sidebar */
body.dark .sidebar-nav .nav-item,
body.dark .sidebar-utilities .utility-item {
  color: #ffffff;
}

/* Hover en modo oscuro */
body.dark .nav-item:hover,
body.dark .utility-item:hover {
  background-color: #333;
}

/* ...puedes agregar aquí más reglas específicas si tienes más en tu CSS... */

/* Oculta el sidebar por defecto en móviles */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.sidebar-open {
    transform: translateX(0); /* Lo muestra */
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 22px;
    z-index: 1100;
    color:#2A7F00;
  }
}

/* 🔧 Forzar visibilidad y prioridad al botón hamburguesa en móvil */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block !important;
    position: fixed;
    top: 1rem;
    z-index: 1200; /* Más alto que filtros o headers */
    background-color: #2a7f00;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  }
}

    .sidebar {
        width: 260px;
        height: 100vh;
        background-color: #2A7F00;
        color: white;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .sidebar-toggle {
        display: none;
        position: fixed;
        top: 15px;
        left: 15px;
        background: #2A7F00;
        border: none;
        color: white;
        padding: 10px 12px;
        border-radius: 4px;
        font-size: 18px;
        z-index: 1100;
    }

    .sidebar-header {
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .logos-container {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-bottom: 10px;
    }

    .logo-jke, .logo-sena {
        height: 40px;
    }

    .titulo-header {
        font-size: 16px;
        font-weight: 600;
    }

    .sidebar-nav {
        padding: 10px 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .nav-item {
        color: white;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        border-radius: 6px;
        transition: background 0.3s;
    }

    .nav-item:hover {
        background: #237000;
    }

    .sidebar-utilities {
        margin-top: auto;
        padding: 10px 20px;
    }

    .utility-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        cursor: pointer;
        color: white;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 900;
    }

    /* Solo en móvil: sidebar cerrado por defecto y toggle visible */
    @media screen and (max-width: 768px) {
        .sidebar {
            transform: translateX(-100%);
        }

        .sidebar.sidebar-open {
            transform: translateX(0);
        }

        .sidebar-toggle {
            display: block;
        }

        .sidebar-overlay.active {
            display: block;
        }
    }