/* Sidebar Styles */
.sidebar {
    background-color: #1a1a1a !important;
}

.sidebar .nav-link {
    transition: all 0.3s ease;
    color: white !important;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: #667eea !important;
}

.collapse-icon {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* Mobile: Use Bootstrap offcanvas behavior */
@media (max-width: 767.98px) {
    .sidebar {
        width: 280px !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Desktop: Fixed sidebar (not offcanvas) */
@media (min-width: 768px) {
    /* Force sidebar to be visible and fixed */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        z-index: 1000 !important;
        display: block !important;
        visibility: visible !important;
        transform: none !important;
        border: none !important;
        overflow-y: auto !important;
    }
    
    /* Push main content to the right to avoid overlap */
    .main-content {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
        padding: 1.5rem !important;
        min-height: 100vh;
    }
    
    /* Ensure the parent flex container works properly */
    .d-flex {
        display: flex !important;
    }
    
    /* Add some padding to containers inside main-content */
    .main-content .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile header */
.mobile-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
}

.mobile-toggle-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
}

/* Stat cards responsive */
@media (max-width: 767.98px) {
    .stat-card {
        margin-bottom: 1rem;
    }
}
