﻿.layout-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#sidebar-container {
    position: fixed;
    top: 20px; 
    left: 0;
    width: 220px;
    margin-top:20px;
    overflow-x: hidden;
    
    height: calc(100vh - 84px); 
    overflow-y: auto;
    background: #222;
    z-index: 1050;
}

.main-container {
    padding-left: 220px;
    padding-top: 42px;
    background: #f9f9f9;
    flex-grow: 1;
}

    .main-container.home-index-style {
        padding-left: 280px;
        padding-top: 42px;
        background: white;
        flex-grow: 1;
    }


    .main-container.default-style {
        padding-left: 220px;
        padding-top: 42px;
        background: #f9f9f9;
        flex-grow: 1;
    }

#main-content {
    background: white;
    max-width: 100%;
    padding: 1rem 1rem;
    width: 100%;
}

footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid #eee;
    text-align: center;
    line-height: 64px;
    z-index: 1050;
}
header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    text-align: center;
    position: fixed; 
    top: 0; 
    height: 40px; 
    line-height: 20px;
    padding-bottom: 15px;
    z-index: 1051;
}
body.sidebar-collapsed #main-content {
    width: 100%;
    margin-left: -140px ;
}



@media (max-width: 767.98px) {
    #sidebar-container {
        position: fixed;
        left: 0;
        height: calc(100% - 64px);
        min-width: 220px;
        width: 100%;
        z-index: 1051;
        background: #222;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: block !important;
        margin-top: 0;
    }

        #sidebar-container.show {
            transform: translateX(0);
        }

    #main-content {
        width: 100%;
        margin-left: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin: 0 auto; 
        max-width: 100%; 
    }

    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        height: calc(100% - 64px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
    }

        #sidebar-overlay.active {
            display: block;
        }

    body.sidebar-open {
        overflow: hidden;
    }
}
