/* Configuração da Sidebar */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: var(--surface-color);
    overflow-x: hidden;
    transition: 0.3s;
    box-shadow: var(--shadow);
    border-right: 2px solid var(--primary-color);
}

/* Links dentro da Sidebar */
.sidebar-links a,
.sidebar-grupo-btn {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    transition: 0.3s;
    cursor: pointer;
}

.sidebar-links a {
    text-decoration: none;
    display: block;
}

.sidebar-links a:hover,
.sidebar-grupo-btn:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding-left: 35px;
}

/* Botão de fechar */
.sidebar .closebtn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 36px;
    text-decoration: none;
    color: var(--text-color);
}

/* Botão Hamburguer no Header */
.openbtn {
    font-size: 24px;
    cursor: pointer;
    background: none;
    color: var(--primary-color);
    border: none;
    padding: 10px;
    margin-right: 15px;
}

/* Ajustes no Header para alinhar os itens */
.header-left {
    display: flex;
    align-items: center;
}

/* Transição do conteúdo principal */
#main-content {
    transition: margin-left .3s, margin-right .3s, width .3s;
    width: 100%;
    min-height: 100vh;
}

.top-bar {
    background: var(--surface-color);
    border-bottom: 3px solid var(--primary-color);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    flex-wrap: wrap;
}

/* Botão de grupo com submenu */
.sidebar-grupo-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.sidebar-grupo-btn.aberto {
    color: var(--primary-color);
    background-color: var(--bg-color);
}

.sidebar-seta {
    font-size: 11px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Submenu */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-color);
    border-left: 1px solid var(--border-color);
    margin-left: 20px;
}

.sidebar-submenu.aberto {
    max-height: 1500px;
}

#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#sidebar-overlay.visivel {
    opacity: 1;
    pointer-events: all;
}

.banner-fechado-inline {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: -0.5rem;
    background: #ef4444;
    color: #fff;
    text-align: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    order: -1;
}

.banner-fecha-em-breve-inline {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: -0.5rem;
    background: #ef6c44;
    color: #fff;
    text-align: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    order: -1;
}



.sidebar .closebtn {
    display: none;
}

@media (max-width: 768px) {
    .sidebar.aberta {
        width: 100% !important;
    }

    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar .closebtn {
        display: block;
    }
}