@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

*{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root{
    /*==== colors ======*/
    --body-color: #e4e9f7;
    --sidebar-color: #fff;
    --primary-color: #695cfe;
    --primary-color-light: #f6f5ff;
    --toggle-color: #dddddd;
    --text-color: #707070;

    /*==== transition ====*/
    --tran-02: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.4s ease;
    --tran-05: all 0.5s ease;
}
body {
    height: 100vh;
    background: var(--body-color);
}
body.dark{
    --body-color: #18191a;
    --sidebar-color: #242526;
    --primary-color: #3a3b3c;
    --primary-color-light: #4a4b4c;
    --toggle-color: #fff;
    --text-color: #ccc;
}
/*==== sidebar ====*/
.sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 100;
}
.sidebar.close{
    width: 88px;
}
/*==== Resuable css ====*/
.sidebar .text{
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--tran-04);
    white-space: nowrap;
    opacity: 1;
}
.sidebar.close .text{
    opacity: 0;
}
.sidebar .image{
    min-width: 60px;
    display: flex;
    align-items: center;
}
.sidebar li{
    height: 50px;
    margin-top: 10px;
    list-style: none;
    display: flex;
    align-items: center;
}
.sidebar li .icon{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    font-size: 20px;   
}
.sidebar li .icon,
.sidebar li .text{
    color: var(--text-color);
    transition: var(--tran-02);
}
.sidebar header{
    position: relative;
}
.sidebar .image-text img{
    width: 40px;
    border-radius: 6px;
}
.sidebar header .image-text{
    display: flex;
    align-items: center;
}
header .image-text .header-text{
    display: flex;
    flex-direction: column;
}
.header-text .name{
    font-weight: 600;
}
.header-text .profession{
    margin-top: -2px;
}
.sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%);
    height: 25px;
    width: 25px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    transition: var(--tran-05);
}
.sidebar.close header .toggle{
    transform: translateY(-50%) rotate(180deg);
}
.sidebar .menu{
    margin-top: 35px;
}
.sidebar .search-box{
    background: var(--primary-color-light);
    border-radius: 6px;
    transition: var(--tran-05);
}
.search-box input{
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    background: var(--primary-color-light);
    transition: var(--tran-05);
}
.sidebar li a{
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--tran-04);
}
.sidebar li a:hover{
    background: var(--primary-color);
}
.sidebar li a:hover .icon,
.sidebar li a:hover .text{
    color: var(--sidebar-color);
}
.sidebar .menu-bar{
    height: calc(100% - 50px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.menu-bar .mode{
    position: relative;
    border-radius: 6px;
    background: var(--primary-color-light);
}
.menu-bar .mode .moon-sun{
    height: 50px;
    width: 60px;
    display: flex;
    align-items: center;
}
.menu-bar .mode i{
    position: absolute;
    transition: var(--tran-03);
}
.menu-bar .mode i.sun{
    opacity: 0;
}
body.dark .menu-bar .mode i.sun{
    opacity: 1;
}
body.dark .menu-bar .mode i.moon{
    opacity: 0;
}
.menu-bar .mode .toggle-switch{
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 60px;
    cursor: pointer;
    background: var(--primary-color-light);
    transition: var(--tran-05);
}
.toggle-switch .switch{
    position: absolute;
    height: 22px;
    width: 44px;
    border-radius: 25px;
    background: #67e067;

}
.switch::before{
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background: #fff;
    transition: var(--tran-03);
}
body.dark .switch::before{
    left: 24px;
}
.home{
    position: relative;
    height: 100vh;
    left: 250px;
    width: calc(100% - 250px);
    background: var(--body-color);
    transition: var(--tran-05);
}
.home .text{
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 40px;
}
.sidebar.close ~ .home{
    left: 88px;
    width: calc(100% - 88px);
}