* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, sans-serif;
    background: #f4f5f7;
    color: #222;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: 250px;
    background: #111;
    color: white;

    padding: 22px 16px;
    overflow-y: auto;

    z-index: 1000;
}

.sidebar-brand {
    padding: 2px 10px 24px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.brand-title {
    font-size: 22px;
    font-weight: bold;
}

.brand-subtitle {
    margin-top: 5px;
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-heading {
    margin: 22px 12px 8px;
    color: #777;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 12px 14px;
    margin-bottom: 5px;

    color: #ddd;
    text-decoration: none;

    border-radius: 6px;
    transition: .2s;
}

.sidebar-link:hover {
    background: #292929;
    color: white;
}

.sidebar-link.active {
    background: #c62828;
    color: white;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 17px;
}


/* =========================================================
   MAIN APPLICATION AREA
========================================================= */

.app-main {
    margin-left: 250px;
    min-height: 100vh;
    width: calc(100% - 250px);
}


/* =========================================================
   TOP BAR
========================================================= */

.app-topbar {
    min-height: 75px;
    background: white;
    border-bottom: 1px solid #ddd;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 28px;

    position: sticky;
    top: 0;
    z-index: 500;
}

.page-title {
    margin: 0;
    font-size: 24px;
}

.page-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #777;
}


/* =========================================================
   CONTENT
========================================================= */

.app-content {
    padding: 28px;
}

.content-card {
    background: white;
    border-radius: 8px;
    padding: 24px;

    box-shadow:
        0 2px 8px rgba(0,0,0,.06);
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-block;

    padding: 10px 16px;

    border: none;
    border-radius: 5px;

    text-decoration: none;
    cursor: pointer;

    font-size: 14px;
}

.btn-red {
    background: #c62828;
    color: white;
}

.btn-dark {
    background: #222;
    color: white;
}

.btn-gray {
    background: #777;
    color: white;
}

.btn-blue {
    background: #2b5797;
    color: white;
}


/* =========================================================
   MOBILE
========================================================= */

.mobile-menu-button {
    display: none;

    background: #111;
    color: white;

    border: none;
    border-radius: 5px;

    padding: 9px 12px;

    cursor: pointer;

    margin-right: 12px;
}

.sidebar-overlay {
    display: none;
}


@media (max-width: 850px) {

    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-button {
        display: inline-block;
    }

    .app-topbar {
        padding: 14px 16px;
    }

    .app-content {
        padding: 15px;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;

        background: rgba(0,0,0,.4);

        z-index: 900;
    }

    .sidebar-overlay.show {
        display: block;
    }

}