:root {
    --sidebar-width: 260px;
}

body {
    background-color: #f4f6f9;
}

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

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width); /* <-- key fix: don't grow, don't shrink, base = fixed width */
    min-height: 100vh;
    position: fixed; /* was sticky */
    top: 0;
    left: 0;
    height: 100vh; /* was min-height */
    overflow-y: auto;
    background-color: #2d7a52; /* deep green */
}

.main-content {
    margin-left: var(--sidebar-width);
    min-width: 0; /* <-- key fix: lets content wrap/scroll instead of stretching and squashing the sidebar */
}

.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 0.5rem 0;
}

.sidebar-nav .nav-heading {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.45);
    padding: 0.75rem 1rem 0.25rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    border-radius: 0;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav .nav-link i {
    width: 1.25rem;
    display: inline-block;
    text-align: center;
    margin-right: 0.35rem;
}

.kpi-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 700;
}

.social-icon-link {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.timeline {
    border-left: 2px solid #dee2e6;
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: 0.2rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #0d6efd;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 1040;
        transition: left 0.2s ease-in-out;
    }
    .sidebar.show {
        left: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        left: -100%;
        transition: left 0.2s ease-in-out;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0; /* no offset on mobile, sidebar overlays instead */
    }
}