/* 
   ==================================================================================
   KOPPERT SIDEBAR OVERRIDE - V11.2 FINAL FIX
   Este archivo se carga DESPUÉS de main.css para sobrescribir cualquier conflicto
   ==================================================================================
*/

/* === SIDEBAR BASE (OVERRIDE) === */
#sidebar {
    width: 320px !important;
    background: linear-gradient(160deg, #002e0c 0%, #001505 100%) !important;
    color: #f6f2e6 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-shrink: 0 !important;

    /* Hide scrollbar */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#sidebar::-webkit-scrollbar {
    display: none !important;
}

/* === DESKTOP MODE (> 1280px) === */
@media screen and (min-width: 1281px) {
    #sidebar {
        position: sticky !important;
        top: 0 !important;
        transition: margin-left 0.4s ease !important;
        margin-left: 0 !important;
    }

    body.sidebar-hidden #sidebar {
        margin-left: -320px !important;
    }
}

/* === MOBILE MODE (<= 1280px) === */
@media screen and (max-width: 1280px) {
    #wrapper {
        display: block !important;
    }

    #main>.inner {
        padding: 1.5em !important;
    }

    #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        height: 100% !important;
        z-index: 10000 !important;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15) !important;
        transition: left 0.4s ease !important;
    }

    body.sidebar-visible #sidebar {
        left: 0 !important;
    }
}