#wrapper {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 70px;
}

#sidebar-wrapper {
    min-height: calc(100vh - 70px); /* Subtract navbar height */
    margin-left: -250px;
    width: 250px;
    z-index: 1000;
    background-color: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

/* Class for animated transitions - only applied when user initiates actions */
.sidebar-animated {
    -webkit-transition: all .25s ease-out;
    -moz-transition: all .25s ease-out;
    -o-transition: all .25s ease-out;
    transition: all .25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1rem 1.25rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .sidebar-menu {
        padding: 0.5rem 0;
        overflow-y: auto;
        max-height: calc(100vh - 60px);
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    }

    @media (max-width: 767.98px) {
        .sidebar-menu {
            max-height: calc(100vh - 70px);
        }
    }

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    color: #495057;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    width: calc(100% - 1rem);
}

.sidebar-item-content {
    display: flex;
    align-items: center;
}

.sidebar-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    text-decoration: none;
    transform: translateX(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border-left: 3px solid #0d6efd;
    font-weight: 600;
}

.sidebar-dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.sidebar-item[aria-expanded="true"] .sidebar-dropdown-icon {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding: 0.5rem 0;
    /* background-color: rgba(0, 0, 0, 0.02); */
    border-left: 2px solid rgba(13, 110, 253, 0.15);
    margin-left: 2rem;
    border-radius: 0 0 0.25rem 0.25rem;
    /* box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03); */
}

/* Class for animated collapse transitions */
.collapse-animated {
    transition: height 0.2s ease;
}

/* Override Bootstrap's default transition for non-animated collapses */
.collapse:not(.collapse-animated),
.collapsing:not(.collapse-animated) {
    transition: none !important;
}

.sidebar-submenu-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
}

.sidebar-submenu-item:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    text-decoration: none;
    transform: translateX(2px);
}

.sidebar-submenu-item.active {
    color: #0d6efd;
    font-weight: 500;
}

.sidebar-submenu-item i {
    font-size: 0.8rem;
    margin-right: 0.75rem;
}

#page-content-wrapper {
    min-width: 100vw;
    display: flex;
    flex-direction: column;
}

body.sb-sidenav-toggled #wrapper #sidebar-wrapper {
    margin-left: 0;
}

/* Main content layout */
.content-wrapper {
    display: flex;
    flex: 1;
}

/* Navbar styling */
.navbar-cus {
    height: 70px;
    z-index: 1050;
    background-color: #ffffff !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.navbar-cus .container-fluid {
    background-color: #ffffff !important;
    padding: 0 15px;
}

/* Responsive navbar adjustments */
@media (max-width: 767.98px) {
    .navbar-shortcuts {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 5px;
    }
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    body.sb-sidenav-toggled #wrapper .content-wrapper #sidebar-wrapper {
        margin-left: -250px;
    }
}

/* Mobile styles */
@media (max-width: 767.98px) {
    #wrapper {
        position: relative;
        min-height: 100vh;
    }
    
    #sidebar-wrapper {
        margin-left: -250px;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        min-height: calc(100vh - 70px);
        z-index: 1030;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    body:not(.sb-sidenav-toggled) #wrapper .content-wrapper #sidebar-wrapper {
        margin-left: -250px;
    }

    body.sb-sidenav-toggled #wrapper .content-wrapper #sidebar-wrapper {
        margin-left: 0;
    }
    
    #page-content-wrapper {
        width: 100%;
        position: relative;
    }
    
    .content-wrapper {
        position: relative;
        min-height: calc(100vh - 70px);
    }
    
    /* Add overlay when sidebar is open on mobile */
    body.sb-sidenav-toggled .content-wrapper::before {
        content: "";
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1020;
    }
}

/* What's New Modal Styles */
.whats-new-modal .modal-dialog {
    max-width: 800px;
}

.whats-new-modal .modal-header {
    background: linear-gradient(135deg, #3498db 0%, #4b6cb7 100%);
    color: white;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.whats-new-modal .modal-title {
    font-size: 1.4rem;
    font-weight: 500;
}

.whats-new-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.whats-new-modal .btn-close:hover {
    opacity: 1;
}

.whats-new-modal .modal-body {
    padding: 2rem;
}

.whats-new-modal .feature-icon {
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.whats-new-modal .feature-content {
    flex: 1;
}

.whats-new-modal .feature-content h6 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.whats-new-modal .feature-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #6c757d;
}

.whats-new-modal .feature-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background-color: #fff;
}

.whats-new-modal .modal-footer {
    padding: 1.25rem;
    background-color: #f8f9fa;
}

.whats-new-modal .whats-new-image {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
