.sidebar-menu a.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.sidebar-menu a.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: sidebar-loading 0.8s linear infinite;
}

@keyframes sidebar-loading {
    to {
        transform: rotate(360deg);
    }
}


/* Main content area styles */

main {
    min-height: 200px;
    position: relative;
    transition: opacity 0.3s ease;
}

main.loading {
    opacity: 0.5;
    pointer-events: none;
}


/* Ensure content is properly positioned */

main>* {
    position: relative;
    z-index: 1;
}


/* Add a loading overlay */

main.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 2;
}