.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    box-shadow: 5px 0px 5px -4px rgba(144, 143, 143, 0.5);
    width: 220px;
    z-index: 600;
    font-size: 0.8em;
    transition: 0.5s ease;
}

.sidebar.close {
    margin-left: -220px;
}

.sidebar.close~.toggle {
    margin-top: 10px;
    margin-left: 10px !important;
    transition: 0.5s ease;
}

.sidebar~.toggle {
    margin-top: 10px;
    margin-left: 230px !important;
    transition: 0.5s ease;
}

.sidebar.close~main {
    margin-left: 0px !important;
}

.sidebar~main {
    margin-left: 220px !important;
    transition: 0.5s ease;
}

.sidebar~main .welcome {
    position: fixed;
    width: calc(100% - 230px);
    top: 45%;
    text-align: center;
    transition: 0.5s ease;
}

.sidebar.close~main .welcome {
    position: fixed;
    width: calc(100% - 30px);
    top: 45%;
    text-align: center;
    transition: 0.5s ease;
}


/* ========================================== */

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar li .submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sidebar .nav-link {
    font-weight: 500;
    color: black;
    border-radius: 6px;
    margin: 0 5px;
}

.sidebar .nav-link:hover {
    background-color: #235101;
    color: white !important;
    transition: 0.5s;
}

.app-logo {
    display: flex;
}

.app-logo a {
    margin: 15px;
    max-width: 50px;
}

.app-logo a img {
    width: 100%;
}

.app-logo .title {
    padding-top: 10px;
}

.icon-submenu {
    float: right;
    font-size: 1.5em;
}

.openbtn {
    float: left;
    position: fixed;
    margin-left: 10px;
    margin-top: 10px;
    z-index: 999;
}

.loading {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    padding: 0 35%;
    margin-top: 13%;
    z-index: 9999;
}

.loading img {
    width: 100%;
}

@media (max-width: 1000px) {
    .sidebar {
        position: fixed;
        float: left;
        top: 0;
        bottom: 0;
        left: 0;
        box-shadow: none;
        width: 100%;
        z-index: 600;
        font-size: 0.8em;
        transition: 0.5s ease;
    }

    .sidebar.close {
        margin-left: -100% !important;
    }

    .sidebar.close~.toggle,
    .sidebar~.toggle {
        margin-top: 10px;
        margin-left: 10px !important;
    }

    .sidebar.close~main {
        margin-left: 0px !important;
    }

    .sidebar~main {
        position: absolute;
        margin-left: 100% !important;
        transition: 0.5s ease;
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
        width: 100% !important;
        height: calc(100vh - 48px);
        padding-top: 0.5rem;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .app-logo {
        margin-top: 40px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .app-logo a img {
        margin-left: -10px;
        margin-top: 10px;
        width: 50px;
    }

    .app-logo .title {
        font-size: 1.5em;
    }

    .sidebar .nav-link {
        font-size: 1.2em;
    }
}