/* =========================
   RESET
========================= */

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

* {
    margin: 0;
}

:root {
    --primary-blue: #1992D4;
    --background: #E2E8F0;
    --white: #FFFFFF;
    --accent-yellow: #F0B734;
    --text: #2B2B2A;
    --text-secondary: #837F7D;
}

html,
body {
    min-height: 100%;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-color: var(--background);
    color: var(--text);
    font-family: "Roboto", Arial, sans-serif;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}


/* =========================
   PAGE GRID
========================= */

.container {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: 175px minmax(0, 1fr);

    width: 100%;
    min-height: 100vh;
}


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

.sidebar {
    grid-column: 1;
    grid-row: 1 / 3;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
    padding: 25px 25px;

    background: var(--primary-blue);
    color: white;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-header h1 {
    font-size: 25px;
}

.dash {
    width: 45px;
    height: 45px;
    filter: brightness(0) invert(1);
}

.sideOptions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 38px;
}

.sideOptions a {
    display: flex;
    align-items: center;
    gap: 18px;

    color: white;
    text-decoration: none;

    font-size: 20px;
    font-weight: 700;
}

.icons {
    width: 27px;
    height: 27px;
    filter: brightness(0) invert(1);
}

.secondary-options {
    margin-top: 42px;
}


/* =========================
   HEADER
========================= */

.header {
    grid-column: 2;
    grid-row: 1;

    display: grid;
    grid-template-rows: 70px 105px;

    min-width: 0;
    padding: 10px 25px;

    background: var(--white);
}


/* TOP ROW */

.top-header {
    display: flex;
    align-items: center;
    gap: 18px;

    min-width: 0;
}

.search-btn,
.notification-btn {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 30px;
}

.search-btn img,
.notification-btn img {
    width: 25px;
    height: 25px;
}

#searchbar {
    flex: 1 1 auto;

    width: auto;
    min-width: 0;
    height: 32px;

    border: 0;
    outline: 0;
    border-radius: 20px;

    padding: 0 15px;

    background: var(--background);
}

.profilepic {
    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    border-radius: 50%;
}

.top-name {
    white-space: nowrap;
    font-size: 25px;
}


/* BOTTOM ROW */

.bottom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-width: 0;
    gap: 20px;
}

.greeting {
    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
}

.profilelogo {
    width: 70px;
    height: 70px;

    flex: 0 0 70px;

    border-radius: 50%;
}

.greeting h3 {
    font-size: 17px;
}

.greeting h2 {
    font-size: 25px;
    white-space: nowrap;
}


/* HEADER BUTTONS */

.bottomheaderbutton {
    display: flex;
    align-items: center;
    gap: 18px;

    flex: 0 0 auto;
}

.bottomheaderbutton button {
    width: 95px;
    height: 40px;

    border-radius: 20px;

    background: var(--primary-blue);
    color: white;

    font-size: 16px;
    font-weight: 700;
}

.bottomheaderbutton button:hover {
    opacity: 0.85;
}


/* =========================
   MAIN
========================= */

.main-content {
    grid-column: 2;
    grid-row: 2;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;

    gap: 20px;

    min-width: 0;
    min-height: 0;

    padding: 0 15px 20px;
}


/* =========================
   PROJECTS
========================= */

.projList {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 45px repeat(3, minmax(150px, 1fr));

    gap: 0 10px;

    min-width: 0;
    min-height: 0;
}

.projList > h2 {
    grid-column: 1 / -1;

    align-self: start;

    margin-top: 10px;

    font-size: 24px;
}


/* PROJECT CARD */

.cards {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-width: 0;
    min-height: 0;

    margin: 10px 5px;
    padding: 18px;

    overflow: hidden;

    border-left: 7px solid var(--accent-yellow);
    border-radius: 8px;

    background: white;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.cards h3 {
    margin-bottom: 4px;

    font-size: 18px;
}

.cards p {
    color: var(--text-secondary);
    font-size: 15px;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;

    margin-top: 10px;
}

.card-actions button {
    font-size: 22px;
    color: var(--text);
}


/* =========================
   RIGHT COLUMN
========================= */

.trends {
    display: grid;

    grid-template-rows:
        45px
        minmax(250px, 1fr)
        45px
        minmax(220px, 1fr);

    min-width: 0;
    min-height: 0;
}

.trends > h2 {
    align-self: start;

    margin-top: 10px;

    font-size: 24px;
}

.announcement-box,
.trending-box {
    min-height: 0;
    margin: 10px 0;
    padding: 15px;

    border-radius: 8px;
    background: white;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

    overflow: auto;
}


/* ANNOUNCEMENTS */

.announcement-box article {
    padding: 10px 8px;
}

.announcement-box article + article {
    border-top: 1px solid #ddd;
}

.announcement-box h3 {
    font-size: 14px;
}

.announcement-box p {
    color: var(--text-secondary);
    font-size: 12px;
}


/* TRENDING */

.trend {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 5px;
}

.trend-avatar {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 40px;

    border-radius: 50%;

    background: var(--background);

    font-weight: bold;
}

.trend strong,
.trend span {
    display: block;
}

.trend strong {
    font-size: 13px;
}

.trend span {
    color: var(--text-secondary);
    font-size: 12px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .container {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .sidebar {
        padding: 25px 20px;
    }

    .sideOptions a {
        font-size: 18px;
    }

    .main-content {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .top-name {
        display: none;
    }

    .greeting h2 {
        font-size: 21px;
    }
}


@media (max-width: 850px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .trends {
        display: none;
    }
}


@media (max-width: 650px) {
    .container {
        display: block;
    }

    .sidebar {
        min-height: auto;
        padding: 15px;
    }

    .sideOptions {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 20px;
    }

    .secondary-options {
        margin-top: 20px;
    }

    .header {
        min-height: 175px;
    }

    .top-name {
        display: none;
    }

    .bottom-header {
        flex-wrap: wrap;
    }

    .greeting h2 {
        font-size: 18px;
        white-space: normal;
    }

    .bottomheaderbutton {
        width: 100%;
    }

    .projList {
        grid-template-columns: 1fr;
        grid-template-rows: 45px repeat(6, 180px);
    }

    .projList > h2 {
        grid-column: 1;
    }
}
