/* =====================================================
   MENU LATERAL
===================================================== */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    backdrop-filter: blur(2px);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.ativo {
    display: block;
    opacity: 1;
}

.menu-lateral {
    position: fixed;
    top: 0;
    left: -320px;
    width: min(290px, 88vw);
    height: 100%;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    z-index: 999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 5px 0 25px var(--shadow-color);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-lateral.ativo {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0px;
    position: sticky;
    top: -20px;
    background: transparent;
    z-index: 2;
    padding-top: 7px;
}

/* =====================================================
   SEÇÕES DO MENU
===================================================== */

.menu-section-button {
    width: 100%;
    padding: 11px 12px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--secondary-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-size: 0.9rem;
    font-weight: bold;
}

.menu-section-button:hover {
    background: var(--hover-bg);
}

.menu-section-button .section-arrow {
    transition: transform 0.2s ease;
}

.menu-section-button.aberto .section-arrow {
    transform: rotate(90deg);
}

.menu-section-panel {
    display: none;
    padding-top: 8px;
}

.menu-section-panel.ativo {
    display: block;
    animation: aparecerConfig 0.18s ease;
}

/* =====================================================
   PERFIL DO MENU LATERAL
===================================================== */

.menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.menu-profile-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--secondary-bg);
    color: var(--text-color);
    font-size: 1.3rem;
}

.menu-profile-info {
    min-width: 0;
}

.menu-profile-name {
    font-weight: 600;
    color: var(--text-color);
}

.menu-profile-status {
    margin-top: 3px;
    font-size: 0.8rem;
    color: var(--muted-color);
}

#btnEditarPerfil {
    background: transparent;
    border: none;
    color: var(--muted-color);
    font-size: 0.85rem;
    padding: 6px 16px;
    text-align: left;
    opacity: 0.8;
}

#btnEditarPerfil:hover {
    opacity: 1;
}