/* =========================================
   CAREER OS - RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 1100px) {
    .sidebar {
        width: 210px;
    }

    .main {
        padding: 24px;
    }

    .grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .app {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 12px;
    }

    .brand {
        text-align: center;
        padding-bottom: 12px;
    }

    .navgroup {
        margin-bottom: 8px;
    }

    .navgroup .label {
        display: none;
    }

    .navitem {
        display: inline-flex;
        margin: 2px;
        padding: 8px 10px;
    }

    .main {
        width: 100%;
        padding: 20px 14px 40px;
    }

    .pagehead h2 {
        font-size: 22px;
    }

    .grid.cols-4,
    .grid.cols-3,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 14px;
        overflow-x: auto;
    }

    table {
        min-width: 650px;
    }
}

@media (max-width: 500px) {
    .sidebar {
        padding: 8px;
    }

    .brand h1 {
        font-size: 15px;
    }

    .navitem {
        font-size: 12px;
        padding: 7px 8px;
    }

    .main {
        padding: 16px 10px 30px;
    }

    .pagehead h2 {
        font-size: 20px;
    }

    .pagehead p {
        font-size: 12px;
    }

    .stat .num {
        font-size: 20px;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .tabbtn {
        white-space: nowrap;
    }
}


/* =========================================================
   CAREER OS — PROFESSIONAL RESPONSIVE NAVIGATION
   ========================================================= */

/* ---------- DESKTOP ---------- */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

.main {
    flex: 1;
    min-width: 0;
}


/* =========================================================
   TABLET + SMALL LAPTOP
   ========================================================= */

@media (max-width: 1000px) {

    .app {
        display: block;
    }


    .sidebar {
        position: fixed;
        top: 0;
        left: 0;

        width: 280px;
        min-width: 280px;
        height: 100vh;

        z-index: 1000;

        transform: translateX(-105%);
        transition:
            transform 280ms cubic-bezier(.22,.9,.3,1),
            box-shadow 280ms ease;

        box-shadow:
            10px 0 40px rgba(0,0,0,.35);

        overflow-y: auto;
    }


    .sidebar.open {
        transform: translateX(0);

        box-shadow:
            12px 0 50px rgba(0,0,0,.50);
    }


    .main {
        width: 100%;
        max-width: none;
        padding: 24px 28px 50px;
    }


    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 42px;
        height: 42px;

        padding: 0;

        border: 1px solid var(--line);
        border-radius: 9px;

        background: var(--panel-2);
        color: var(--text);

        font-size: 20px;
        line-height: 1;

        cursor: pointer;

        transition:
            background-color 180ms ease,
            border-color 180ms ease,
            color 180ms ease,
            transform 180ms ease;
    }


    .hamburger:hover {
        background: var(--panel);
        border-color: var(--accent-dim);
        color: var(--accent);
    }


    .hamburger:active {
        transform: scale(.95);
    }


    .hamburger:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 720px) {

    .main {
        padding:
            18px
            18px
            40px;
    }


    .topbar {
        gap: 10px;
    }


    .search {
        min-width: 0;
        flex: 1;
    }


    .search input {
        width: 100%;
    }


    .topbar-right {
        gap: 7px;
    }


    .streak-chip {
        display: none;
    }


    .sidebar {
        width: min(280px, 86vw);
        min-width: min(280px, 86vw);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .main {
        padding:
            14px
            14px
            32px;
    }


    .hamburger {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }


    .topbar {
        position: sticky;
        top: 0;

        z-index: 50;

        padding: 8px 0 12px;

        background:
            linear-gradient(
                180deg,
                var(--bg) 75%,
                transparent
            );
    }


    .topbar-right .avatar {
        width: 36px;
        height: 36px;
    }


    .sidebar {
        width: 86vw;
        min-width: 86vw;
    }


    .brand {
        padding-left: 4px;
        padding-right: 4px;
    }


    .navitem {
        min-height: 42px;
        padding: 10px 12px;
    }


    .navitem:hover {
        padding-left: 16px;
    }

}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1001px) {

    .hamburger {
        display: none;
    }

}

/* =========================================================
   CAREER OS — RESPONSIVE BRAND LOGO
   ========================================================= */

.brandmark {
    width: 64px;
    height: 64px;

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

    flex-shrink: 0;

    overflow: hidden;
}


.brandmark img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    border-radius: 14px;
}


/* ---------- TABLET ---------- */

@media (max-width: 1000px) {

    .brandmark {
        width: 60px;
        height: 60px;
    }

}


/* ---------- MOBILE ---------- */

@media (max-width: 520px) {

    .brandmark {
        width: 56px;
        height: 56px;
    }

    .brandmark img {
        border-radius: 12px;
    }

}