:root{

    --color-primary: #7380ec;
    --color-danger:#ff7782;
    --color-success:#41f1b6;
    --color-warning:#ffbb55;
    --color-white:#ffff;
    --color-info-dark:rgb(85, 85, 85);
    --color-info-light: #ffff;
    --color-dark: #18191f;
    --color-light: rgba(132,139,200, 0.18);
    --color-primary-variant: #111e88;
    --color-dark-variant: #677483;
    --color-background:#f6f6f9;


    --card-border-radius: 2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;
    --border-radius-3: 1.2rem;

    --transition: all 300ms ease;
    

    --container-lg: 96%;

    --card-padding:1.8rem;
    --padding-1: 1.2rem;

    --box-shadow: 0 2rem 3rem var(var(--color-light));
    --box-shadow-2: 0 1rem 1rem rgba(0, 0, 0, 0.4);


}


/*---- DARK THEME VARIABLES ------*/
.dark_theme{    
    --color-background:#181a1e;
    --color-white:#202528;
    --color-dark:#edeffd;
    --color-dark-variant:#a3bdcc;
    --color-light:rgba(0,0,0,0.4);
    --box-shadow-2:0 1rem 1rem rgba(7, 0, 0, 0.795);
    --color-info-dark:rgb(216, 212, 212);

}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar{
    width: 0.8rem;
    background: var(--color-danger);
}

::-webkit-scrollbar-thumb{
    width: 100%;
    background: var(--color-primary-variant);
    border-radius: 0.15rem;
}



/*===== GENERAL STYLING =====*/
*{
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

body{
    font-family: sans-serif;
    width: 100vw;
    height: 100vh;
    background: var(--color-background);
    color: var(--color-dark);
    line-height: 1.5;
    user-select: none;
    overflow-x: hidden;

}
html{
    scroll-behavior: smooth;
}

.container{
    width: var(--container-lg);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 14rem auto 23rem;
    gap: 2rem;
}
img{
    display: block;
    width: 100%;
}
h1, h2, h3, h4, h5 {
    line-height: 1.2;
}
h1{
    font-weight: 800;
    font-size: 1.8rem;
}
h2{
    font-size: 1.4rem;
}
h3{
    font-size: 0.9rem;
}
small{
    font-size: 0.8rem;
}
a{
    color: var(--color-dark);
}
p{
    color: var(--color-dark-variant);
}
b{
    color: var(--color-dark);
}
.primary{
    color: var(--color-primary);
}
.danger{
    color: var(--color-danger);
}
.warning{
    color: var(--color-warning);
}
.success{
    color: var(--color-success);
}
.profile_photo{
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
}
.text_muted{
    color: var(--color-info-dark);
}

/*===== SIDEBAR STYLING =====*/

aside{
    height: 100vh;
    

}
aside .logo{
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
aside .logo img{
    width: 6rem;
}
aside .top{
    display: flex;
    background: var(--color-white);
    align-items: center;
    justify-content: space-between;
    margin-top: 1.3rem;
}
aside .nav_toggle-btn{
    display: none;
}
.sidebar{
    display: flex;
    flex-direction: column;
    height: 86vh;
    position: relative;
    top: 2.5rem;
}
.sidebar h3{
    font-weight: 500;
}
.sidebar a{
    display: flex;
    align-items: center;
    color: var(--color-info-dark);
    margin-left: 2rem;
    gap: 1rem;
    position: relative;
    height: 3.4rem;
    transition:var(--transition);
}
.sidebar a i{
    font-size: 1.1rem;
}
.sidebar a:nth-child(10){
    position: relative;
    margin-top: 1rem;
    width: 100%;
}
aside .sidebar a:active{
    background: var(--color-light);
    color: var(--color-primary);
    margin-left: 0;
    transition: all 400ms ease-in-out;
}
aside .sidebar a:active::before{
    content: "";
    width: 6px;
    height: 100%;
    background: var(--color-primary);

}
aside .sidebar a:active i{
    color: var(--color-primary);
    margin-left: calc(1rem -3px);
}
aside .sidebar a:hover{
    color: var(--color-dark);
}
aside .sidebar a:hover i{
    margin-left: 1rem;
    transition: var(--transition);
}
.message_count{
    background: var(--color-danger);
    color: white;
    border-radius: var(--border-radius-1);
    font-size: 11px;
    padding: 2px 10px;
}


/*===== MAIN STYLING =====*/
main{
    margin-top: 1.5rem;
}
main .date{
    display: inline-block;
    background: var(--color-light);
    border-radius: var(--border-radius-1);
    margin-top: 1rem;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
}
main .date input{
    background: transparent;
    color: var(--color-dark);
    cursor: pointer;
}
.insight{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.insight > div{
    background: var(--color-white);
    padding: var(--padding-1);
    border-radius: var(--card-border-radius);
    margin-top: 1rem;
    box-shadow: var(--box-shadow-2);
    transition: var(--transition);
}
.insight > div:hover{
    box-shadow: none;
}
.insight > div i{
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--color-primary-variant);
    color: white;
    font-size: 1.2rem;
}
.insight .expenses i{
    background: var(--color-danger);
}
.insight .income i{
    background: var(--color-success);
}
.insight .middle{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.insight .middle h3{
    margin: 1rem 0 0.6rem;
    font-size: 1rem;
}
.insight .middle .progress{
    position: relative;
    width: 91px;
    height: 91px;
    border-radius: 50%;
}
.insight .middle .progress .number{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.insight .middle svg{
    width: 6rem;
    height: 6rem;
}
.insight  svg circle{
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 13;
    stroke-linecap: round;
    transform: translate(5px, 5px);
    stroke-dasharray: 110;
    stroke-dashoffset: 92;

}
.insight .sales svg circle{
    stroke-dashoffset: -30;
    stroke-dasharray: 200;
}
.insight .expenses svg circle{
    stroke-dashoffset: 20;
    stroke-dasharray: 80;
}
.insight .income svg circle{
    stroke-dashoffset: 40;
    stroke-dasharray: 110;
}


main .recent_orders{
    margin-top: 3rem;
}
main .recent_orders h2{
    margin-bottom: 0.7rem;
}
main .recent_orders table{
    width: 100%;
    background:var(--color-white);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    text-align: center;
    box-shadow: var(--box-shadow-2);
    transition: var(--transition);
}
main .recent_orders table:hover{
    box-shadow: none;
}
main  table tbody td{
    height: 2.8rem;
    border-bottom: 1px solid var(--color-info-light);
    color: var(--color-dark);
}
main  table tbody tr:last-child td{
    border: none;
}
main .recent_orders a{
    text-align: center;
    display: block;
    margin: 1.5rem auto;
    color: var(--color-dark);
}

/*===== PROFILE/RIGHT STYLING =====*/

.right{
    margin-top: 1.1rem;
}
.right .top{
    display: flex;
    justify-content: end;
    gap: 1.6rem;
}
.right .top button{
    display: none;
}
.right .top .theme_toogle_btn{
    background: var(--color-dark);
    display: flex;
    align-items: center;
    cursor: pointer;
    height: 1.5rem;
    width: 4rem;
    border-radius: 4px;
}
.right .top .theme_toogle_btn i{
    font-size: 1.1rem;
    color: var(--color-white);
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top .theme_toogle_btn i.active{
    background:var(--color-primary);
    color: white;
    border-radius: var(--border-radius-1);
}
.profile{
    display: flex;
    gap: 1.7rem;
    text-align: right;
}
.recent_updates{
    margin-top: 1.3rem;
}
.recent_updates h2{
    margin-bottom: 1rem;
}
.recent_updates .updates{
    background: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow-2);
    transition: var(--transition);
}
.recent_updates .updates .update{
    display: grid;
    grid-template-columns: 2.6rem auto;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

/* SALE ANALYTICS */
.sales_analytics{
    margin-top: 1.7rem;
}
.sales_analytics h2{
    margin-bottom: 1rem;
}
.sales_analytics .item{
    background: var(--color-white);
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.7rem;
    padding: 1.4rem var(--card-padding);
    border-radius: var(--border-radius-3);
    box-shadow: var(--box-shadow-2);
    transition: var(--transition);
}
.sales_analytics .item:hover{
    background: wheat;
    color:black;
}
.sales_analytics .item .right{
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin: 0;
    width: 100%;
}
.sales_analytics .item :hover .text_muted{
    color: black!important;
}
.sales_analytics .item .icon{
    color: white;
    padding: 0.6rem;
    border-radius: 50%;
    background: var(--color-primary-variant);
    display: flex;

}
.sales_analytics .item.offline .icon{
    background:var(--color-danger);
}
.sales_analytics .item.customer .icon{
    background:var(--color-success);
}
.sales_analytics .add_product{
    background:transparent;
    border:2px dashed var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
}
.sales_analytics .add_product > div{
    display: flex;
    gap: 1rem;
}
.sales_analytics .add_product > div h3{
    font-weight: 600;
}


/* //====== MEDIA QUERIES (MEDIUM DEVICES) ======// */

@media screen and (max-width: 1200px){
    .container{
        width: 94%;
        grid-template-columns: 7rem auto 23rem;
    }
    .logo h2{
        display: none;
    }
    .sidebar h3{
        display: none;
    }
    .sidebar a{
        width: 5.4rem;
    }
    .insight{
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }
    main .recent_orders{
        width: 93%;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 7rem 0 0 8.8em;
    }
    main .recent_orders table{
        width: 83vw;
    }
}
  

/* * //====== MEDIA QUERIES (MEDIUM DEVICES) ======// */ 

@media screen and (max-width: 768px){
    .container{
        width:100%;
        grid-template-columns: 1fr;
    }
    aside{
        position: fixed;
        left: -100%;
        animation: showMenu 400ms ease forwards;
        background: var(--color-white);
        width: 18rem;
        z-index: 3;
        box-shadow: var(--box-shadow-2);
        height: 100vh;
        padding-right: var(--card-padding);
        display: none;
    }

    @keyframes showMenu {
        to{
            left: 0;
        }
        
    }
    aside .logo{
        margin-left: 1rem;
    }
    .logo h2{
        display: inline;
    }
    .sidebar h3{
        display: inline;
    }
    .sidebar a{
        width: 100%;
        height: 3.4rem;
    }
    .sidebar a:last-child{
       position: absolute;
       bottom: 5rem;
    }
    #close_nav_btn{
        display: inline-block!important;
        cursor: pointer;
        font-size: 2rem;
    }
    main{
        margin-top: 7rem;
        padding:0 1rem;
    }
    main .recent_orders{
        position: relative;
        margin: 3rem 0 0 0;
        width: 100%;
    }
    main .recent_orders table{
        width: 100%;
        margin: 0;
    }
    .right{
        width: 94%;
        margin: 0 auto 4rem;
    }
    .right .top{
        position: fixed;
        left: 0;
        top: 0;
        align-items: center;
        padding: 0 0.9rem;
        height: 4.6rem;
        background:var(--color-white);
        width: 100%;
        margin: 0;
        z-index: 2;
        box-shadow: var(--box-shadow-2);
    }
    .right .top .theme_toogle_btn{
        width: 4.4rem;
        position: absolute;
        left: 61%;
    }
    .right .top .info{
        display: none;
    }
    .right .top button{
        display: inline-block;
        background: transparent;
        cursor: pointer;
        color: var(--color-dark);
        position: absolute;
        left: 1.7rem;
    }
    .right .top button i{
        font-size: 2rem;
    }


}