/* Menu Lateral Responsivo BLUEDATA */
/* Ajustes específicos para o menu lateral em diferentes resoluções */

/* =============================================== */
/* MENU LATERAL BASE */
/* =============================================== */

#menu-lado {
    transition: all 0.3s ease !important;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%) !important;
    min-height: 100vh !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
}

/* Logo responsivo */
#logo1 {
    transition: all 0.3s ease !important;
    max-width: calc(140px * var(--scale-factor)) !important;
    height: auto !important;
    margin: calc(10px * var(--scale-factor)) auto !important;
}

/* Itens do menu */
.menu-lateral {
    padding: calc(12px * var(--scale-factor)) calc(15px * var(--scale-factor)) !important;
    margin: calc(5px * var(--scale-factor)) !important;
    border-radius: var(--border-radius) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.menu-lateral:hover {
    background-color: rgba(255,255,255,0.1) !important;
    transform: translateX(5px) !important;
}

/* Texto dos itens */
.texto-menu-lateral {
    font-size: calc(0.85rem * var(--scale-factor)) !important;
    font-weight: 600 !important;
    color: white !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Ícones do menu */
#ico-lateral {
    width: calc(18px * var(--scale-factor)) !important;
    height: calc(18px * var(--scale-factor)) !important;
    filter: brightness(0) invert(1) !important;
    transition: all 0.3s ease !important;
}

/* =============================================== */
/* AJUSTES POR RESOLUÇÃO */
/* =============================================== */

/* 1366px - Compacto */
@media screen and (max-width: 1366px) {
    #menu-lado {
        flex: 0 0 160px !important;
        max-width: 160px !important;
    }
    
    #logo1 {
        max-width: 120px !important;
    }
    
    .texto-menu-lateral {
        font-size: 0.75rem !important;
        line-height: 1.1 !important;
    }
    
    #ico-lateral {
        width: 16px !important;
        height: 16px !important;
    }
    
    .menu-lateral {
        padding: 8px 10px !important;
        margin: 3px !important;
    }
    
    /* Ajustar área de trabalho */
    #tela-trabalho-dash {
        flex: 0 0 calc(100% - 160px) !important;
        max-width: calc(100% - 160px) !important;
    }
}

/* 1600px - Médio */
@media screen and (min-width: 1367px) and (max-width: 1600px) {
    #menu-lado {
        flex: 0 0 180px !important;
        max-width: 180px !important;
    }
    
    #logo1 {
        max-width: 130px !important;
    }
    
    .texto-menu-lateral {
        font-size: 0.8rem !important;
    }
    
    #tela-trabalho-dash {
        flex: 0 0 calc(100% - 180px) !important;
        max-width: calc(100% - 180px) !important;
    }
}

/* 1920px+ - Padrão */
@media screen and (min-width: 1921px) {
    #menu-lado {
        flex: 0 0 200px !important;
        max-width: 200px !important;
    }
    
    #logo1 {
        max-width: 150px !important;
    }
    
    #tela-trabalho-dash {
        flex: 0 0 calc(100% - 200px) !important;
        max-width: calc(100% - 200px) !important;
    }
}

/* Ultra-wide 2560px+ */
@media screen and (min-width: 2560px) {
    #menu-lado {
        flex: 0 0 220px !important;
        max-width: 220px !important;
    }
    
    #logo1 {
        max-width: 170px !important;
    }
    
    .texto-menu-lateral {
        font-size: 1rem !important;
    }
    
    #ico-lateral {
        width: 22px !important;
        height: 22px !important;
    }
    
    .menu-lateral {
        padding: 15px 18px !important;
        margin: 6px !important;
    }
}

/* =============================================== */
/* MENU COLAPSÁVEL PARA TELAS MUITO PEQUENAS */
/* =============================================== */

@media screen and (max-width: 1024px) {
    /* Menu colapsado por padrão */
    #menu-lado {
        flex: 0 0 60px !important;
        max-width: 60px !important;
        overflow: hidden !important;
    }
    
    #menu-lado:hover {
        flex: 0 0 180px !important;
        max-width: 180px !important;
        z-index: 1000 !important;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3) !important;
    }
    
    /* Ocultar texto no estado colapsado */
    #menu-lado .texto-menu-lateral {
        opacity: 0 !important;
        transition: opacity 0.3s ease 0.1s !important;
    }
    
    #menu-lado:hover .texto-menu-lateral {
        opacity: 1 !important;
    }
    
    /* Logo menor */
    #logo1 {
        max-width: 40px !important;
        margin: 10px auto !important;
    }
    
    #menu-lado:hover #logo1 {
        max-width: 120px !important;
    }
    
    /* Ícones centralizados */
    #ico-lateral {
        margin: 0 auto !important;
    }
    
    /* Ajustar área de trabalho */
    #tela-trabalho-dash {
        flex: 0 0 calc(100% - 60px) !important;
        max-width: calc(100% - 60px) !important;
        transition: all 0.3s ease !important;
    }
}

/* =============================================== */
/* INDICADORES VISUAIS */
/* =============================================== */

/* Indicador de resolução atual */
#menu-lado::before {
    content: attr(data-resolution);
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

/* Mostrar indicador apenas no modo debug */
.debug-responsive #menu-lado::before {
    opacity: 1;
}

/* =============================================== */
/* ANIMAÇÕES SUAVES */
/* =============================================== */

.menu-lateral {
    position: relative;
    overflow: hidden;
}

.menu-lateral::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.menu-lateral:hover::before {
    left: 100%;
}

/* =============================================== */
/* ACESSIBILIDADE */
/* =============================================== */

/* Foco para navegação por teclado */
.menu-lateral:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
    background-color: rgba(255,255,255,0.15) !important;
}

/* Alto contraste */
@media (prefers-contrast: high) {
    #menu-lado {
        background: #000 !important;
        border-right: 3px solid #fff !important;
    }
    
    .texto-menu-lateral {
        color: #fff !important;
        text-shadow: 1px 1px 1px #000 !important;
    }
}

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    #menu-lado,
    .menu-lateral,
    #logo1,
    #ico-lateral {
        transition: none !important;
    }
    
    .menu-lateral:hover {
        transform: none !important;
    }
}