*,
*::before,
*::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 62.5%;
}

.grid__wrapper{
    height: 100%;
    display: grid;
    grid-template-columns: minmax(10rem, 12vw) 1fr;
    grid-template-rows: minmax(2.4rem, 5vh) minmax(2rem, 4vh) 1fr;
    place-content: center;
}

header{
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    align-items: center;
    font-size: 1rem;
    border-bottom: 1px solid #ccc;
    
    .header__left, .header__right{
        display: flex;
        align-items: center;
        gap: 2rem;

        span{
            font-size: 1.2rem;
        }
        
        ul{
            display: flex;
            
            list-style-type: none;
            gap: 1rem;

            li > a{
                padding: .4rem 1rem;
                text-decoration: none;
                color: #666;
            }
        }
    }
}

aside{
    grid-column: 1;
    grid-row: span 2;
    background-color: #333;

    .nav{
        display: flex;
        flex-direction: column;
        gap: .8rem;
        margin-bottom: 1rem;

        .nav__title{
            font-size: .8rem;
            font-weight: 700;
            color: #fff;
            padding: .6rem 1rem;
        }

        a {
            text-decoration: none;
            font-size: .8rem;
            color: #fff;
            padding: .6rem 1rem;
        }

        &:not( &> .nav__title){
            padding: .4rem 0;
        }
    }
}

.tooltip{
    grid-column: 2/-1;
    display: flex;
    justify-content: space-between;
    padding: .4rem 1rem;
    align-items: center;
    font-size: .8rem;
    border-bottom: 1px solid #ccc;

    .breadcrumb{
        color: #666;

        span{

            &:not(:first-child){
                padding-left: 1rem;
            }

            &:not(:last-child)::after{
                content: '/';
                padding-left: 1rem;
                color: #666;
            }
        }

        .highlight{
            color: #4fb0ff;
        }
    }

    .options a{
        text-decoration: none;
        color: #666;
        padding: .4rem 1rem;
    }
}

main{
    padding: 1.6rem;
    background-color: #ddd;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    overflow-y: auto;

    .card__stats{
        display: flex;
        gap: 1.6rem;

        .card{
            flex: 1;
            aspect-ratio: 4 / 2;
            padding: 1.6rem;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            color: #fff;
            border-radius: .4rem;

            .card-info{
                
                .users{
                    font-size: 1.4rem;
                    padding-bottom: .6rem;
                }

                .user-type{
                    font-size: .8rem;
                }
            }

            .options{
                padding: .4rem;
                font-size: .8rem;
            }

            &:nth-child(1){
                background-color: #0e7cc5;
            }
            &:nth-child(2){
                background-color: #7abbe6;
            }
            &:nth-child(3){
                background-color: #f8cc54;
            }
            &:nth-child(4){
                background-color: #fc3e4e;
            }
        }
    }

    .traffic{
        background-color: #fff;
        display: flex;
        flex-direction: column;
        /* gap: 1rem; */
        color: #333;
        border: 1px solid #ccc;
        border-radius: .4rem;
        overflow: hidden;
        
        .content{
            padding: 1.6rem;

            .head{
                margin-bottom: 1rem;

                h2{
                    font-size: 1.2rem;
                }
            }
            
            .graph{
                height: clamp(10rem, 20vh, 22rem);
                background-color: #ccc;
            }
        }

        .stats{
            display: flex;
            background-color: #eee;
            padding: 1rem;
            border-top: 1px solid #ccc;

            .stats-card{
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: .6rem;

                .title{
                    font-size: .8rem;
                    color: #aaa;
                }

                .value{
                    font-weight: 600;
                    color: #333;
                    font-size: .8rem;
                }

                .progress-bar{
                    width: 100%;
                    height: .3rem;
                    border-radius: 1rem;
                    overflow: hidden;
                    
                    .progress-level{
                        border-radius: 1rem;
                        height: 100%;
                    }
                }

                &:nth-child(1){
                    .progress-bar .progress-level{
                        width: 40%;
                        background-color: #15a710;
                    }
                }
                &:nth-child(2){
                    .progress-bar .progress-level{
                        width: 25%;
                        background-color: #39c0e9;
                    }
                }
                &:nth-child(3){
                    .progress-bar .progress-level{
                        width: 60%;
                        background-color: #ffd208;
                    }
                }
                &:nth-child(4){
                    .progress-bar .progress-level{
                        width: 80%;
                        background-color: #fc3e4e;
                    }
                }
                &:nth-child(5){
                    .progress-bar .progress-level{
                        width: 40%;
                        background-color: #1060bb;
                    }
                }
            }
        }
    }

    .card__socials{
        display: flex;
        gap: 1.6rem;

        .card{
            flex: 1;
            aspect-ratio: 4/2;
            display: flex;
            flex-direction: column;
            border-radius: .4rem;
            overflow: hidden;

            .top{
                flex: 1;
            }

            .bottom {
                padding: 1rem;
                display: flex;
                background-color: #fff;

                .bottom-left, .bottom-right{
                    flex: 1;
                    text-align: center;

                    .value{
                        display: block;
                        font-size: 1.4rem;
                    }

                    .title{
                        font-size: .8rem;
                        text-transform: uppercase;
                        color: #aaa;
                    }
                }

                .bottom-left{
                    border-right: 2px solid #ccc;
                }
            }

            &:nth-child(1){
                .top{
                    background-color: #004b92;
                }
            }
            &:nth-child(2){
                .top{
                    background-color: #57a8f5;
                }
            }
            &:nth-child(3){
                .top{
                    background-color: #246caf;
                }
            }
            &:nth-child(4){
                .top{
                    background-color: #ff5f1f;
                }
            }
        }
    }
}