﻿/* Sidebar para móvil */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: #f8f9fa;
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

    .mobile-sidebar.show {
        left: 0;
    }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #1c5fa9;
    background-color: #afc4db;
    position: relative;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.sidebar-nav {
    padding: 1rem 0;
}

    .sidebar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .sidebar-nav .nav-link,
    .sidebar-nav .nav-btn {
        padding: 0.75rem 1.5rem !important;
        color: #495057;
        text-decoration: none;
        display: block;
        border-radius: 0;
        transition: background-color 0.2s;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
    }

        .sidebar-nav .nav-link:hover {
            background-color: #e9ecef;
            color: #212529;
        }

    .sidebar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: #f1f3f4;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .sidebar-nav .dropdown-item {
        padding: 0.5rem 2rem;
        color: #6c757d;
    }

        .sidebar-nav .dropdown-item:hover {
            background-color: #e9ecef;
            color: #212529;
        }

    .sidebar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }

/* Navbar personalizado */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

/* Mostrar sidebar solo en móvil */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
    }
}

/* Ocultar sidebar en desktop */
@media (min-width: 992px) {
    .mobile-sidebar, .sidebar-overlay {
        display: none !important;
    }
}

/* Mejoras visuales */
.navbar-brand h4 {
    margin: 0;
    font-weight: 600;
}

.mobile-sidebar .navbar-brand h4 {
    color: #212529;
}
