/* ============================================================
   SIDEBAR OSCURO — AteneaVD
   Reemplaza los estilos actuales de .sidebar en tu CSS principal
   ============================================================ */

.sidebar {
    width: 220px;
    min-height: 100vh;
    background: #1e2a3a;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
}

/* --- scrollbar discreta --- */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #2e4055; border-radius: 4px; }

/* --- header de la app (opcional: muestra nombre del sistema) --- */
.sidebar-header {
    background: #131e2b;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header .sb-logo {
    width: 30px;
    height: 30px;
    background: #4a9eff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-header .sb-appname {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}
.sidebar-header .sb-appname small {
    display: block;
    font-size: 10px;
    color: #6b8099;
    font-weight: 400;
}

/* --- etiquetas de sección (menu-title) --- */
.menu-title {
    padding: 10px 16px 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #6b8099;
    text-transform: uppercase;
    background: #131e2b;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* primera sección sin borde superior */
.menu-title:first-of-type {
    border-top: none;
}

/* --- ítem directo (sin submenú) --- */
.sidebar > a,
.sidebar a.menu-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    color: #c8d6e5;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar > a:hover,
.sidebar a.menu-link:hover {
    background: #2a3a4e;
    color: #fff;
}
.sidebar > a.active,
.sidebar a.menu-link.active {
    background: #263347;
    color: #4a9eff;
    border-left-color: #4a9eff;
}
.sidebar > a i,
.sidebar a.menu-link i {
    font-size: 15px;
    color: #5a8ab0;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar > a.active i,
.sidebar a.menu-link.active i {
    color: #4a9eff;
}
.sidebar > a:hover i,
.sidebar a.menu-link:hover i {
    color: #8ab8d8;
}

/* --- toggle (cabecera de submenú) --- */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    color: #c8d6e5;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.menu-toggle .toggle-left {
    display: flex;
    align-items: center;
    gap: 9px;
}
.menu-toggle .toggle-left i {
    font-size: 15px;
    color: #5a8ab0;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.menu-toggle .fa-angle-down {
    font-size: 12px;
    color: #6b8099;
    transition: transform 0.2s ease;
}
.menu-toggle:hover {
    background: #2a3a4e;
    color: #fff;
}
.menu-toggle:hover .toggle-left i {
    color: #8ab8d8;
}
.menu-toggle.open {
    background: #2a3a4e;
    color: #fff;
    border-left-color: #4a9eff;
}
.menu-toggle.open .toggle-left i {
    color: #4a9eff;
}
.menu-toggle.open .fa-angle-down {
    transform: rotate(180deg);
    color: #4a9eff;
}

/* --- submenú --- */
.submenu {
    display: none;
    background: #19242f;
    border-left: 3px solid #4a9eff;
    overflow: hidden;
}
.submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 38px;
    color: #9ab5cc;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    overflow: hidden;
}
.submenu a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.submenu a.active {
    color: #4a9eff;
    background: rgba(74,158,255,0.08);
}
.submenu a i {
    font-size: 13px;
    color: #4a6a7f;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.submenu a:hover i  { color: #7aaabf; }
.submenu a.active i { color: #4a9eff; }

/* --- ajuste del contenido principal para compensar el sidebar fijo --- */
.content-wrapper,
.main-content {
    margin-left: 220px;
}