@font-face {
    font-family: "vazir";
    src: url("../fonts/Vazir.ttf") format("truetype");
}
*,
::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "vazir" !important;
    font-size: 0.8rem;
}
a {
    cursor: pointer;
    text-decoration: none;
    font-family: "vazir", sans-serif;
}
li {
    list-style: none;
}
#wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
    /* min-width: 250px; */
}
#main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    background-color: #d7dcdc;
    transition: margin-right 0.3s ease;
    height: 100vh;
}
#container {
    max-height: 100vh; /* حداکثر ارتفاع */
    overflow-x: auto;
    white-space: nowrap;
}
#main.expand {
    margin-right: -280px;
}

#top_menu {
    background-color: #f5f5f5;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    display: none;
}
#container {
    height: 100vh;
}

/* >>>>>>>>>>>>>>>>>> mobile menu */
#mobile_menu {
    position: absolute;
    width: 100vw;
    max-height: 50px;
    min-width: inherit;
    bottom: 0;
    z-index: 900;
}
#mobile_menu a {
    color: #7c7c7c;
    /* padding: 4px 8px; */
}
#mobile_menu i {
    color: #9a9a9a;
    /* padding: 4px 8px; */
}
#mobile_menu ul {
    background-color: #f3f3f3;
    height: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: rgb(58, 58, 58, 0.5) solid 2px;
    padding: 6px;
    margin-bottom: 0;
}
#mobile_menu ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav_item.active a {
    color: #333333 !important;
}
.nav_item.active i {
    color: #961f1f !important;
}
#mobile_menu i {
    width: 20px;
}

/*  mobile menu <<<<<<<<<<<<<<<<<<<<<<<<< */

/* >>>>>>>>>>>>>>>>>> sidebar  */

#sidebar {
    height: 100vh;
    width: 280px;
    z-index: 999;
    background-color: #fff;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    transform: translateX(0%);
}
#sidebar ul{
    padding-right: 0;
}
#sidebar.show {
    transform: translateX(100%);
}
.logo {
    display: flex;
    align-items: center;
    width: 64px;
    width: 100%;
    padding: 6px 24px;
}
.logo i {
    width: 48px;
}
.logo a {
    color: #404040;
}

#top_menu i {
    width: 28px;
    color: #646464;
}

.sidebar-link i {
    width: 20px;
}

.sidebar-item {
    width: 100%;
    padding: 6px 24px;
    font-size: 1.1rem;
}
.sidebar-usbitem {
    width: 100%;
    padding: 6px 24px;
    font-size: 0.85rem;
    cursor: pointer;

}
.sidebar-usbitem:hover {
    background-color: #e8e8e8;
}
.sidebar-item a {
    color: #515365;
}

.sidebar-item:hover {
    background-color: #f9f9f9;
}

.sidebar-link {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    color: #333333;
    gap: 6px;
}

#sidebar .sidebar-link[data-bs-toggle="collapse"]::after {
    content: "";
    border: solid;
    border-width: 0 0.075rem 0.075rem 0;
    display: inline-block;
    padding: 2px;
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    transform: rotate(45deg);
    transition: all 0.2s ease-out;
}
#sidebar .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    content: "";
    transform: rotate(135deg);
    transition: all 0.2s ease-out;
}
.sidebar-item.active>a::before{
    content: "";
    right: -12px;
    height: 80%;
    position: absolute;
    background-color: #2a8ef1;
    width: 4px;
    border-radius: 5px;
    transition: all .2s ease-in-out;
}
.sidebar-item.active{
    background-color: #cee6ff;
}

/*  sidebar <<<<<<<<<<<<<<<<<<<<<<<<< */

/* >>>>>>>>>>>>>>>show sidebar in mobile devies */
#showSidebar {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 100%;
    padding: 6px;
    z-index: 999;

    background-color: #7d7d7d;
}
#showSidebar a {
    color: #7c7c7c;
    cursor: pointer;
    font-size: 36px;
    line-height: 36px;
}
#showSidebar i {
    color: #d8d8d8;
}


#sidebar.showSidebar {
    transform: translateX(0);
    box-shadow: 0 0px 40px #00000066;
}

#showHideSidebar {
    font-size: 32px;
}

/* ================================================== */

@media (min-width: 768px) {
    #mobile_menu {
        display: none;
    }
    #top_menu {
        display: flex;
    }
}
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(+100%);
    }
    #top_menu {
        display: none;
    }
    #main {
        margin-right: -280px !important;
    }
    #showSidebar {
        display: block;
    }
}
