/* CSS để cố định menu và cho phép scroll riêng */

/* Cố định menu bên trái */
.layout-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1080;
}

/* Đảm bảo nội dung trang có margin-left phù hợp */
@media (min-width: 1200px) {
    .layout-page {
        margin-left: 16rem;
        transition: margin-left 0.3s ease-in-out;
    }
    
    .layout-menu-collapsed .layout-page {
        margin-left: 5rem;
    }
}

/* Đảm bảo menu scroll riêng biệt */
.layout-menu .menu-inner {
    height: calc(100vh - 64px); /* Trừ đi chiều cao của app-brand */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Đảm bảo menu không bị che khuất bởi navbar */
.layout-navbar {
    z-index: 1070;
}

/* Đảm bảo overlay có z-index phù hợp */
.layout-overlay {
    z-index: 1075;
}

/* Đảm bảo menu-inner có scrollbar riêng */
.menu-inner::-webkit-scrollbar {
    width: 5px;
}

.menu-inner::-webkit-scrollbar-track {
    background: transparent;
}

.menu-inner::-webkit-scrollbar-thumb {
    background-color: rgba(67, 89, 113, 0.2);
    border-radius: 6px;
}

.menu-inner::-webkit-scrollbar-thumb:hover {
    background-color: rgba(67, 89, 113, 0.3);
}

/* Đảm bảo menu vẫn hoạt động tốt trên thiết bị di động */
@media (max-width: 1199.98px) {
    .layout-menu {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 1085;
    }
    
    body.layout-menu-expanded .layout-menu {
        transform: translateX(0);
    }
}