
/* Sidebar Navigation Styling */
.sidebar-nav-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    margin-bottom: 30px;
    position: sticky;
    top: 80px; /* Adjust based on header height */
    z-index: 99;
}

.sidebar-nav-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    transition: all 0.2s;
}

.sidebar-nav-item:last-child {
    border-bottom: none;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #4b5563;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.sidebar-nav-link i {
    width: 24px;
    color: #9ca3af;
    transition: all 0.2s;
    font-size: 16px;
    margin-right: 8px;
    text-align: center;
}

.sidebar-nav-link:hover, 
.sidebar-nav-link.active,
.sidebar-nav-link.open {
    color: #2563eb;
    background: #f8fafc;
    padding-left: 25px; /* Slight slide effect */
}

.sidebar-nav-link:hover i,
.sidebar-nav-link.active i,
.sidebar-nav-link.open i {
    color: #2563eb;
}

/* Submenu Styling */
.sidebar-nav-item.has-children .sidebar-nav-link {
    justify-content: space-between;
}

.sidebar-nav-item.has-children .sidebar-nav-link::after {
    content: '\f078'; /* FontAwesome Chevron Down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    transition: transform 0.3s;
}

.sidebar-nav-link.open::after {
    transform: rotate(180deg);
}

/* Fix for icon alignment in has-children */
.sidebar-nav-item.has-children .sidebar-nav-link span {
    display: flex;
    align-items: center;
}

/* We need to wrap text in span in HTML or adjust CSS. 
   Current HTML: <i class="..."></i> Text 
   This is fine, we can use flex to push icon and text to left.
*/
.sidebar-nav-item.has-children .sidebar-nav-link {
    display: flex;
    justify-content: flex-start; /* Default start */
}

.sidebar-nav-item.has-children .sidebar-nav-link i {
    margin-right: 10px;
}

/* Push the chevron to the right */
.sidebar-nav-item.has-children .sidebar-nav-link::after {
    margin-left: auto;
}

.sidebar-submenu {
    display: none; /* Hidden by default */
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 5px 0;
}

.sidebar-submenu-link {
    display: block;
    padding: 10px 20px 10px 52px; /* Indent to align with text */
    color: #64748b;
    font-size: 13px;
    text-decoration: none !important;
    transition: all 0.2s;
}

.sidebar-submenu-link:hover {
    color: #2563eb;
    background: #eff6ff;
    padding-left: 56px;
}

/* Specific item highlights */
.sidebar-nav-link.text-danger:hover {
    color: #dc2626 !important;
    background: #fef2f2;
}

.sidebar-nav-link.text-danger:hover i {
    color: #dc2626 !important;
}
