:root {
    --clr-primary: #7310ac;
    --clr-danger: #ff7782;
    --clr-success: #41f1b6;
    --clr-white: #ffffff;
    --clr-info-dark: #7d8da1;
    --clr-info-light: #dce1eb;
    --clr-dark: #363949;
    --clr-warning: #ff44ec;
    --clr-light: rgba(132, 139, 200, 0.18);
    --clr-primary-variant: #111e88;
    --clr-dark-variant: #677483;
    --clr-color-background: #f6f6f9;
        --card-border-radius: 2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;
    --border-radius-3: 1.2rem;

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

    --box-shadow: 0 2rem 3rem var(--clr-light);
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style-type: none;
    appearance: none;
    border: 0;
}

body{
    font-family:"Poppins", sans-serif;
    width: 100vw;
    height: 100vh;
    font-size: 0.88rem;
    -webkit-user-select: none;
    user-select: none;
    overflow-x: hidden;
    background-color: var(--clr-color-background);

}
.dark-theme-variables {
  --clr-color-background: #181a1e; /* A very dark grey/black for the background */
  --clr-white: #202528; /* A dark grey, likely representing what would be "white" in a light theme, but is now a dark color */
  --clr-light: rgba(0, 0, 0, 0.4); /* A semi-transparent black, often used for subtle overlays or shadows */
  --clr-dark: #deeffd; /* A very light blue/off-white, likely used for text or elements that need to stand out */
  --clr-dark-variant: #677483; /* A medium-dark grey/blue, possibly for secondary text or less prominent elements */
  --box-shadow: 0 2rem 3rem var(--clr-light); /* A box shadow with a vertical offset of 2rem, a blur of 3rem, and using the --clr-light variable for its color */
}
.container{
    display: grid;
    grid-template-columns: 16rem auto 16rem;
    width:96% ;
    margin:0 auto;
    column-gap: 1.8rem;
}

a{
    color:var( --clr-dark);
}

h1{
    font-weight: 800;
    font-size: 1.8rem;
}
h2{
    font-size: 1.4rem;
}
h3{
    font-size: 0.87rem;
}
h4{
    font-size: 0.8rem;
}
h5{
    font-size: .77rem;
}

h6{
    font-size: .75rem;
}

.profile-photo img{
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    overflow: hidden;
}

.text-muted{
    color: var(--clr-info-dark);
}
p{
    color:var(--clr-dark-variant)
}

b{
    color:var(--clr-dark)
}
/* primary  */
.primary{
    color: var(--clr-primary);
}
/* warning*/
.warning{
    color: var(--clr-warning);
}
/* sucess */
.success{
    color: var(--clr-success);
}
/* danger */
.danger{
    color: var(--clr-danger);
}

/* aside */
aside{
    height: 100vh;
}

aside .top{
    background-color: var(--clr-info-light);
    display: flex;
    align-items: center;
    margin-top: 1.4rem ;
}

aside .logo{
    text-align: start;
    margin-bottom: .5rem;
    padding-block: .5rem;
    width: 100%;
    background-color: var(--clr-white);
}

aside .top .close{
    display: inline-block;
    margin-bottom: .5rem;
    padding: .78rem;
    font-size: medium;
    display: none;
    background-color: var(--clr-white);
}

/* ************ sidebare ************* */
aside .sideBar{
    background-color: var(--clr-white);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    padding: 1.2rem 0;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
    position: relative;
}


aside .sideBar a{
    display: flex;
    align-items: center;   
    column-gap: 1.2rem;
    color: var(--clr-info-dark);
    margin-left:2rem ;
    height: 3.2rem;
    transition: all 0.1s ease-in;
} 
aside  .sideBar a h3{
    font-weight: 500;
}

aside .sideBar a i{
    font-size: 1.6rem;
    transition: all 0.1s ease-in;
}

aside .sideBar a:last-child{
    position: absolute;
    bottom: 1rem;
}

aside .sideBar a.active{
    background-color: var(--clr-light);
    color:var(--clr-primary);
    margin-left: 0px;
    /* border-left:5px solid var(--clr-primary); */
}
aside .sideBar a.active::before{
    content:"";
    width: 6px;
    height: 100%;
    background-color: var(--clr-primary);
}
/* hover */
aside .sideBar a:hover{
    color:var(--clr-primary);
}
aside .sideBar a:hover i{
    margin-left:1rem;
    transition: .4s ease;
}

aside .sideBar a .badge{
    background-color: var(--clr-danger);
    color: var(--clr-white);
    padding: 2px 5px;
    font-size: 11px;
    border-radius: var(--border-radius-1);
}

/* start main */
main{
    margin-top: 1.4rem;
    width: auto;
}

main input{
    background-color: transparent;
    border: 0;
    outline: 0;
    color: var(--clr-dark);
}

main .date{
    display: inline-block ;
    background-color: var(--clr-white);
    border-radius: var(--border-radius-1);
    margin-top: 1rem;
    padding: .5rem 1.6rem;
}
main .insights{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    column-gap: 1rem;
}
main .insights>div{
    background-color: var(--clr-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    margin-top: 1rem;
    box-shadow: var(--box-shadow);
    transition: all .3s ease;
}

main .insights>div:hover{
    box-shadow: none;
}

main .insights>div i{
    padding: .7rem;
    border-radius: 50%;
    color:var(--clr-white);
    font-size: 2rem;
}

main .insights>div.sales i{
    background-color: coral
}
main .insights>div.expenses i{
    background-color:var(--clr-danger)
}

main .insights>div.income i{
    background-color:var(--clr-success)
}

main .insights .middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
main h1{
    color:var(--clr-dark)
}

main .insights h1,p,h3{
    color:var(--clr-dark)
}

main .insights .progress{
    position: relative;
    height: 4rem;
    width: 4rem;
    border-radius: 50px;
}

main .insights svg{
    height: 150px;
    width: 150px;
    position: absolute;
    top:0
}

main .insights svg circle{
    fill: none;
    stroke: var(--clr-primary);
    transform: rotate(270,80,80);
    stroke-width:5px;
}

main .insights .sales svg circle{
    stroke-dashoffset: 10;
    stroke-dasharray: 150;
}
main .insights .expenses svg circle{
    stroke-dashoffset: 0;
    stroke-dasharray: 150;
}
main .insights .income svg circle{
    stroke: var(--clr-success);
}

main .insights .number{
    position: absolute;
    top:50%;
    left:50%;
    transform: translateY(-50%,-50%);
}

main .recent-order{
    margin-top: 1.2rem;
}

main .recent-order h1{
    color:var(--clr-dark)
}
main .recent-order table{
    background-color: var(--clr-white);
    width: 100%;
    border-radius: var(--card-border-radius);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: all .3s ease;
    color:var(--clr-dark)
}

main .recent-order table td{
    padding:1rem;
    border-bottom: 2px solid var(--clr-dark-variant);
}

main .recent-order table tbody tr:last-child td{
    padding:1rem;
    border-bottom: 0px solid ;
}

main .recent-order table:hover{
    box-shadow: none;
}

/* right section */
.right{
    margin-top: 1.4rem;
}

.right h2{
    color:var(--clr-dark)
}

.right .top{
    display: flex;
    justify-content: start;
    column-gap: 2rem;
}

.right .top button{
    display: none;
}

.right .theme-togller {
    font-size: 1.2rem;
    width: 4.2rem;
    height: 2rem;
    display: flex;
    justify-content: space-between;
    background-color: var(--clr-white);
    border-radius: var(--border-radius-1);
}


.right .theme-togller i {
    font-size: 1.2rem;
    padding: .5rem;
}

.right .theme-togller i.active {
    background-color: var(--clr-primary);
    color:#fff
}

/* profile */
.right .top .profile{
    display: flex;
    column-gap: 2rem;
    text-align: center;
}

.right .info h3 ,.right .itme h3{
    color:var(--clr-dark)
}

/* recent updates */
.right .recent_updates{
    margin-top: 1rem;
    margin-left: -1.5rem;
}

.right .recent_updates .updates{
    background-color: var(--clr-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    transition: box-shadow .3s ease;
}

.right .recent_updates .updates:hover{
    box-shadow: none;
}

.right .recent_updates .updates .update{
    display: grid;
    grid-template-columns: 2.8rem auto;
    column-gap: 1rem;
    margin-bottom: 1rem;
}

/* sale analytical */
.right .sales_analytical{
    margin-top: 2rem;
}


.right .sales_analytical .item{
    background-color: var(--clr-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 1rem;
    margin: .8rem 0px;
    width: 100%;
    padding: 1.4rem var(--card-padding);
    border-radius: var(--border-radius-3);
    box-shadow: var(--box-shadow);
}

.right .sales_analytical .item:hover{
    box-shadow: none;
}


.right .sales_analytical .item .icon{
    border-radius: 50%;
    padding: 1rem .8rem;
    color:var(--clr-white);
    font-size: 1.5rem;
    background-color: coral;
    height: 3.5rem;
    width: 3.5rem;
}

.right .sales_analytical .item:nth-child(3) .icon{
    background-color: var(--clr-success);
}
.right .sales_analytical .item:nth-child(4) .icon{
    background-color: var(--clr-danger);
}

.add_products div{
    display: flex;
    height: 3.5rem;
    width:100% ;
    align-items: center;
    align-content: center;
    justify-content: center;
    border: 2px dashed var(--clr-dark-variant);
    color:var(--clr-dark-variant);
    margin-bottom: 3rem;
}

/* ===========================
   DASHBOARD MEDIA QUERIES (REM BASED)
============================== */

/* Large Desktop (≥ 75rem or 1200px) */
@media screen and (max-width: 75rem) { /* 1200px = 75rem */
  .container {
    width: 94%;
    grid-template-columns: 7rem auto 14rem; /* ~112px 1fr ~224px */
  }

  aside .sideBar h3 {
    display: none;
  }

  aside .sideBar a:last-child {
    position: relative;
    margin-top: 1.8rem;
  }

  main .insights {
    display: grid;
    grid-template-columns: repeat(1,1fr)
  }
}

/* Laptop / Small Desktop (< 75rem or 1200px) */
@media screen and (max-width: 75rem) {
  .container {
    width: 94%;
    grid-template-columns: 7rem auto 14rem; /* ~112px auto ~224px */
  }

  aside .sideBar h3 {
    display: none;
  }

  aside .sideBar a:last-child {
    position: relative;
    margin-top: 1.8rem;
  }

  main .insights {
    display: grid;
    grid-template-columns: 1fr; /* single column layout for narrower screens */
    gap: 1.6rem;
  }
}

/* Tablet and Below (< 48rem or 768px) */
@media screen and (max-width: 48rem) {
  .container {
    width: 100%;
    grid-template-columns: 1fr;
  }

  aside {
    position: fixed;
    width: 18rem; /* ~288px */
    z-index: 3;
    background-color: var(--clr-white);
    display: none;
    left: -20rem;
    animation: module 1s forwards .1s ;
  }

  @keyframes module {
    to{
        left: 0;
    }
  }

  aside .logo h2 {
    display: inline;
  }

  aside .sideBar h3 {
    display: inline;
  }

  aside .sideBar a {
    width: 100%;
    height: 3.4rem;
  }

  aside .top div.close{
    display: inline;
    position: absolute;
    right: 0;
    margin-right: 2rem;
    font-size: 1rem;
  }

  .right .top {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.8rem;
    background-color: var(--clr-white);
    width: 100%;
    z-index: 2;
    height: 4.6rem;
    box-shadow: 0 1rem 1rem var(--box-shadow);
    margin: 0;
  }

  main .insights {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 1.6rem;
    padding: 3rem;
  }

  main .recent-order {
    padding: 1.8rem;
    margin: 0 auto;
  }

  .right .profile {
    position: absolute;
    left: 70%;
  }

  .right .recent_updates,
  .right .sales_analytical,
  .add_products {
    padding: 1.875rem; /* 30px */
  }

  .right .top button{
    display: inline-block;
    background-color: transparent;
    cursor: pointer;
    color: var(--clr-dark);
    position: absolute;
    font-size: 1.5rem ;
    left: 1rem;
  }
}


