/* Default Light Theme Variables */
:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --sidebar-bg: #f8f9fa;
    --sidebar-hover-bg: #e9ecef;
    --sidebar-active-bg: #dee2e6;
    --sidebar-color: #495057;
    --sidebar-active-color: #212529;
    --body-bg: #ffffff;
    --header-bg: #f8f9fa;
    --text-color: #000000;
    --border-color: #dee2e6;
    --primary-color: #82a06a;
    --primary-hover: #6a8355;
}

/* Dark Theme Variables */
.dark-theme {
    --sidebar-bg: #1e1e1e;
    --sidebar-hover-bg: #2c2c2c;
    --sidebar-active-bg: #3a3a3a;
    --sidebar-color: #b0b0b0;
    --sidebar-active-color: #ffffff;
    --body-bg: #212529;
    --header-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --primary-color: #82a06a;
    --primary-hover: #9aba82;
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    z-index: 1000;
}

    #sidebar.active {
        margin-right: calc(var(--sidebar-width) * -1);
    }


#content {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    top: 0;
    left: 0;
}

    #content.active {
        width: 100%;
    }



.header {
    height: var(--header-height);
    background: var(--header-bg);
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: calc(100% - var(--sidebar-width));
    z-index: 999;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
}

    .header.active {
        width: 100%;
    }

.logo-section {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

    .logo-section img {
        height: 40px;
        margin-left: 10px;
    }

.user-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--icon-hover-color);
    transition: border-color 0.3s ease;
    margin-left: 10px;
}

.main-content {
    padding-top: calc(var(--header-height) + 20px);
}

@media (max-width: 768px) {
    #sidebar {
        margin-right: calc(var(--sidebar-width) * -1);
    }

        #sidebar.active {
            margin-right: 0;
        }

    #content {
        width: 100%;
    }

        #content.active {
            width: calc(100% - var(--sidebar-width));
        }

    .header {
        width: 100%;
        padding: 0 10px;
    }

    .logo-section {
        justify-content: flex-start;
    }

        .logo-section img {
            margin-left: 5px;
        }

    .user-section {
        margin-right: auto;
    }
}

/* Rest of the sidebar styles (unchanged) */
.sidebar-sticky {
    height: calc(100vh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
}

    .sidebar-sticky::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar-sticky::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }

        .sidebar-sticky::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1rem 0.5rem;
    color: #6c757d;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--sidebar-color);
    transition: all 0.3s ease;
    border-radius: 0.25rem;
    margin: 0.2rem 0.5rem;
}

    .nav-link:hover {
        background-color: var(--sidebar-hover-bg);
        color: var(--sidebar-active-color);
    }

    .nav-link.active {
        background-color: var(--sidebar-active-bg);
        color: var(--sidebar-active-color);
        font-weight: 500;
    }

    .nav-link img {
        width: 20px;
        height: 20px;
        margin-left: 10px;
        object-fit: contain;
    }

    .nav-link .arrow {
        margin-right: auto;
        transition: transform 0.3s ease;
    }

    .nav-link[aria-expanded="true"] .arrow {
        transform: rotate(180deg);
    }

.submenu {
    padding-right: 2rem;
}

    .submenu .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

.sidebar-section {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

    .sidebar-section:last-child {
        border-bottom: none;
    }

.btn-light {
    background-color: var(--sidebar-hover-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

    .btn-light:hover {
        background-color: var(--sidebar-active-bg);
        border-color: var(--border-color);
        color: var(--sidebar-active-color);
    }
