.sidebar { background-color: white; min-height: 100vh; padding: 2rem; border-right: 1px solid #eee; }
.main-content { background-color: white; min-height: 100vh; padding: 4rem 3rem; }

/* Custom Tab Styling to match your image */
.nav-pills .nav-link {
    color: #6c757d;
    text-align: left;
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 500;
    margin-bottom: 5px;
    background: none;
    border: none;
}
.nav-pills .nav-link.active {
    background-color: #fff1eb !important;
    color: #f32121 !important;
}
.content-header { font-weight: 700; color: #0d1b2a; margin-bottom: 2rem; }
.section-title { font-weight: 700; font-size: 1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

@media (max-width: 767.98px) {
    /* --- General Mobile Layout Adjustments for Sidebar and Main Content --- */
    .sidebar {
        min-height: auto;
        padding: 1.5rem 1rem;
        border-right: none;
        border-bottom: 1px solid #eee; /* Adds a separator below the tabs */
    }
    .main-content {
        min-height: auto;
        padding: 2rem 1rem;
    }

    /* --- Tab Container (flex parent) for 2-Column Layout, LEFT ALIGNED --- */
    .sidebar .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start; /* <--- CHANGED: Align tabs to the left */
        /* To create a consistent gap between columns when using flex-start: */
        margin-right: -10px; /* <--- NEW: Negative margin to offset tab margins */
        overflow-x: hidden;
        padding-bottom: 0;
    }

    /* --- Individual Tab (flex item) Styling for 2-Column Layout --- */
    .nav-pills .nav-link {
        /* Each tab takes approx. 50% width minus the margin for the gap */
        flex: 0 0 calc(50% - 10px); /* <--- ADJUSTED: Takes into account margin-right */

        white-space: normal;
        overflow: visible;
        text-overflow: clip;

        margin-right: 10px;         /* <--- NEW: Horizontal spacing between tabs */
        margin-bottom: 10px;        /* Vertical spacing between rows of tabs */

        text-align: left;           /* <--- CHANGED: Align text inside button to the left */
        padding: 8px 30px;
        min-height: 48px;
        /* font-size: 0.9em; */
    }

    /* --- Remove the ::after element --- */
    /* It's no longer needed for balancing rows when using justify-content: flex-start */
    .sidebar .nav::after {
        display: none;
    }
}

