* {
    font-family: sans-serif;
}

html,
body {
    box-sizing: border-box;
    color-scheme: dark light;
    padding: 0px;
    margin: 0px;
}

body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    /* grid-template-rows: auto auto; */
    overflow-x: hidden;
    background-image: linear-gradient(#7e75d6, #cfb4ef, #5e72e1);
    padding: 1rem;
    height: 100dvh;
}

.navbar a {
    text-decoration: none;
}

#sidebar {
    background-color: black;
    border: 1px solid white;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;

    #logo {
        width: 20rem;
        aspect-ratio: 1/1;
        border: 1px solid white;
        border-radius: 100%;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        /* background-color: #a7dfc6; */

        img {
            width: inherit;
            height: inherit;
            object-fit: cover;
            object-position: center;
        }
    }

    #navbar {
        text-decoration: none;
        padding: 0px;
        margin: 0px;
        width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;

        a {
            text-decoration: none;
        }

        .nav-items {
            padding: 10px;
            width: 100%;
            text-align: center;
            list-style: none;
            background-color: white;
            color: black;
            font-weight: 600;
            font-size: 1.6rem;
            cursor: pointer;
            transition: 300ms;

            outline: none;
            border: 2px solid transparent;
        }

        .nav-items:hover {
            background-color: #a7dfc6;
        }

        .item-active,
        .nav-items:focus {
            border: 2px solid lightcyan;
            background-color: #a7dfc6;
        }
    }
    #logout-btn {
        text-align: center;
        font-weight: 600;
        font-size: 1.6rem;
        cursor: pointer;
        transition: 300ms;
        background-color: transparent;
        text-decoration: underline;
        border: none;
        outline: none;
    }

    #logout-btn:hover,
    #logout-btn:focus {
        color: lightcoral;
    }
}

#modile-navbar {
    display: none;

    background-color: black;
    padding: 10px;
    margin-bottom: 0.8rem;
    align-items: center;
    justify-content: space-between;

    #logo {
        width: 6rem;
        height: auto;

        img {
            width: inherit;
            height: inherit;
        }
    }

    .navbar {
        display: none;
        transition: 300ms;

        position: fixed;
        top: 0;
        right: 0;
        width: 47%;
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
        background-color: black;

        .nav-items,
        #close-button {
            width: 100%;
            background-color: transparent;
            color: white;
            font-weight: 600;
            font-size: 1.1rem;
            cursor: pointer;
            transition: 300ms;

            outline: none;
            border: 2px solid transparent;
        }

        #close-button {
            background-color: transparent;
            text-align: right;
            margin-block: 10px;
            font-size: 1.5rem;
        }

        .nav-items {
            padding: 10px;
            border-top: 1px solid white;
        }

        .nav-items:hover {
            background-color: #a7dfc6;
        }

        .item-active,
        .nav-items:focus {
            background-color: #a7dfc6;
            color: black;
        }
    }

    .navbar-active {
        display: flex;
    }

    #logout-btn {
        margin-top: auto;
        margin-inline: auto;
        width: 90%;
        margin-bottom: 1rem;

        background-color: transparent;
        color: white;
        font-weight: 600;
        font-size: 1.1rem;
        cursor: pointer;
        transition: 300ms;
        text-decoration: underline;

        outline: none;
        border: 2px solid transparent;
    }

    #logout-btn:hover,
    #logout-btn:focus {
        color: lightcoral;
    }

    #hambar-button {
        background-color: transparent;
        outline: none;
        border: none;
        font-size: 1.5rem;
        padding: 1px;
        border-radius: 5px;
        border: 2px solid transparent;
    }

    #hambar-button:focus,
    #hambar-button:hover {
        border: 2px solid #a7dfc6;
    }
}

#dashboard {
    grid-column-start: 2;
    grid-column-end: 5;
    gap: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: white;

    .dashboard-items {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
        background-color: black;
        border: 1px solid white;

        .icon {
            font-size: 5rem;
        }

        a {
            color: white;
            text-decoration: none;
            font-size: 2rem;
        }

        a:hover {
            text-decoration: underline;
        }
    }
}

@media screen and (max-width: 1024px) {
    body {
        grid-template-columns: 1.3fr 1fr 1fr;
        gap: 0.8rem;
    }

    #sidebar {
        #logo {
            width: 18rem;
        }

        #navbar {
            .nav-items {
                font-size: 1.5rem;
            }
        }
        #logout-btn {
            font-size: 1.5rem;
        }
    }

    #dashboard {
        gap: 0.8rem;

        .dashboard-items {
            .icon {
                font-size: 4rem;
            }

            a {
                font-size: 1.8rem;
            }
        }
    }
}

@media screen and (max-width: 858px) {
    #sidebar {
        #logo {
            width: 14rem;
        }

        #navbar {
            .nav-items {
                font-size: 1.4rem;
            }
        }
        #logout-btn {
            font-size: 1.4rem;
        }
    }

    #dashboard {
        grid-template-columns: 1fr;

        .dashboard-items {
            .icon {
                font-size: 3rem;
            }

            a {
                font-size: 1.6rem;
            }
        }
    }
}

@media screen and (max-width: 624px) {
    body {
        display: block;
    }

    #sidebar {
        display: none;
    }

    #modile-navbar {
        display: flex;
    }

    #dashboard {
        display: grid;
        grid-template-rows: 1fr 1fr 1fr 1fr;
        height: 100%;
    }
}
