/* Estilos básicos */
body {
    min-height: 100vh;
}

/* ESTILOS DA SIDEBAR */
#sidebar {
    width: 250px;
    height: 100vh;
    background: #343a40;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s;
}

/* Quando a sidebar está contraída no desktop */
#sidebar.collapsed {
    width: 60px;
}

/* Quando a sidebar está escondida no mobile */
@media (max-width: 768px) {
    #sidebar {
        left: -250px; /* Esconder por padrão no mobile */
    }
    
    #sidebar.mobile-active {
        left: 0; /* Mostrar quando ativo no mobile */
    }
    
    .content-wrapper {
        margin-left: 0 !important; /* Sem margem no mobile */
    }
}

/* Esconder textos quando colapsado */
#sidebar.collapsed .sidebar-text {
    display: none;
}

/* Container do logo */
.sidebar-header {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--verde-logo);
}

/* Estilo para os itens do menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin: 2px 0;
    letter-spacing:-1px;
}

.sidebar-link {
    padding: 10px 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    line-height:1em;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background:#eee;

}

.sidebar-submenu.active {
    max-height: 1000px;
}

/* CONTEÚDO PRINCIPAL */
.content-wrapper {
    margin-left: 250px;
    transition: margin 0.3s;
    width: calc(100% - 250px);
}

.content-wrapper.collapsed {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* BOTÕES E OVERLAY */
.sidebar-toggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

.mobile-header {
    display: none;
    background: #343a40;
    color: white;
    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    justify-content: space-between;
    align-items: center;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .content-wrapper {
        padding-top: 60px;
        width: 100%;
    }
    
    .sidebar-header .close-sidebar {
        display: block !important;
    }
}

.sidebar-footer{
    padding:10px 10px 0 10px;
    border-top:1px solid var(--verde-logo);
    position: absolute;
    bottom: 0;
    width:100%;
}