/* Admin Sidebar Styling */

/* General sidebar styling */
.main-sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    width: 280px; /* Increased from default 250px to show full text */
}

/* Nav item styling */
.nav-sidebar .nav-item {
    margin-bottom: 2px;
}

.nav-sidebar .nav-link {
    border-radius: 0;
    transition: all 0.3s ease;
    /* padding: 0.75rem 1rem; */
    color: #495057;
    font-weight: 500;
}

.nav-sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
    border-right: 3px solid #0056b3;
}

/* Icon styling */
.nav-sidebar .nav-icon {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Submenu styling - first level */
.nav-treeview {
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
}

.nav-treeview .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.nav-treeview .nav-link:hover {
    background-color: #e9ecef;
    color: #495057;
}

.nav-treeview .nav-link.active {
    background-color: #e3f2fd;
    color: #007bff;
    border-right: none;
}

/* Nested submenu styling - second level (submenu within submenu) */
.nav-treeview .nav-treeview {
    background-color: #f1f3f4;
    border-left: 3px solid #ced4da;
    margin-left: 1rem;
}

.nav-treeview .nav-treeview .nav-link {
    padding-left: 2rem;
    font-size: 0.85rem;
    color: #868e96;
}

.nav-treeview .nav-treeview .nav-link:hover {
    background-color: #e2e6ea;
    color: #495057;
}

.nav-treeview .nav-treeview .nav-link.active {
    background-color: #d9edf7;
    color: #31708f;
}

/* Nested submenu styling - third level (deep nesting) */
.nav-treeview .nav-treeview .nav-treeview {
    background-color: #e9ecef;
    border-left: 3px solid #adb5bd;
    margin-left: 1rem;
}

.nav-treeview .nav-treeview .nav-treeview .nav-link {
    padding-left: 5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.nav-treeview .nav-treeview .nav-treeview .nav-link:hover {
    background-color: #d6d8db;
    color: #495057;
}

.nav-treeview .nav-treeview .nav-treeview .nav-link.active {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Header styling */
.nav-sidebar .nav-header {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Menu item with submenu indicator - target existing icon */
.nav-sidebar .nav-item.has-treeview > .nav-link .right {
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.nav-sidebar .nav-item.has-treeview.menu-open > .nav-link .right {
    transform: rotate(-90deg);
}

/* Active parent menu item styling */
.nav-sidebar .nav-item.menu-open > .nav-link {
    background-color: #f8f9fa;
    color: #007bff;
    font-weight: 600;
}

/* Custom classes for specific menu items */
.nav-item-dashboard .nav-link {
    background-color: rgba(0, 123, 255, 0.05);
}

.nav-item-orders .nav-link {
    background-color: rgba(40, 167, 69, 0.05);
}

.nav-item-products .nav-link {
    background-color: rgba(255, 193, 7, 0.05);
}

.nav-item-customers .nav-link {
    background-color: rgba(23, 162, 184, 0.05);
}

.nav-item-sellers .nav-link {
    background-color: rgba(108, 117, 125, 0.05);
}

.nav-item-finance .nav-link {
    background-color: rgba(111, 66, 193, 0.05);
}

.nav-item-newsletter .nav-link {
    background-color: rgba(220, 53, 69, 0.05);
}

.nav-item-marketing .nav-link {
    background-color: rgba(253, 126, 20, 0.05);
}

.nav-item-analytics .nav-link {
    background-color: rgba(32, 201, 151, 0.05);
}

.nav-item-business .nav-link {
    background-color: rgba(108, 117, 125, 0.05);
}

.nav-item-system .nav-link {
    background-color: rgba(52, 58, 64, 0.05);
}

.nav-item-account .nav-link {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Divider styling */
.nav-item-divider {
    border-bottom: 1px solid #dee2e6;
    margin: 1rem 0;
    height: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-sidebar .nav-link {
        padding: 0.6rem 0.8rem;
    }
    
    .nav-treeview .nav-link {
        padding-left: 2.5rem;
    }
    
    .nav-treeview .nav-treeview .nav-link {
        padding-left: 3.5rem;
    }
    
    .nav-treeview .nav-treeview .nav-treeview .nav-link {
        padding-left: 4.5rem;
    }
    
    /* Mobile sidebar background */
    .main-sidebar {
        background: linear-gradient(135deg, #f8fafc, #f1f5f9);
        border-right: 1px solid #e2e8f0;
    }
    
    .nav-sidebar {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 0.5rem;
        padding: 0.75rem;
        margin: 0.5rem;
    }
    
    .nav-sidebar .nav-link {
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid #e2e8f0;
        margin-bottom: 0.375rem;
        border-radius: 0.375rem;
    }
    
    .nav-sidebar .nav-link:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .nav-sidebar .nav-link.active {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        border-color: #2563eb;
        color: white !important;
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    }
    
    .nav-treeview {
        background: rgba(248, 250, 252, 0.8);
        border-left: 2px solid #e2e8f0;
        border-radius: 0.25rem;
        margin: 0.25rem 0;
    }
    
    .nav-treeview .nav-link {
        background: transparent;
        border: none;
    }
    
    .nav-treeview .nav-link:hover {
        background: rgba(241, 245, 249, 0.8);
    }
    
    .nav-treeview .nav-link.active {
        background: rgba(59, 130, 246, 0.1);
        color: #2563eb !important;
        border-right: 2px solid #2563eb;
    }
    
    .nav-header {
        background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
        border: 1px solid #cbd5e1;
        border-radius: 0.375rem;
        margin: 0.75rem 0;
        padding: 0.75rem 1rem;
    }
}

/* Dark mode support */
.sidebar-dark-primary .nav-sidebar .nav-link {
    color: #c2c7d0;
}

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

.sidebar-dark-primary .nav-sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
}

.sidebar-dark-primary .nav-treeview {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(255, 255, 255, 0.1);
}

.sidebar-dark-primary .nav-treeview .nav-treeview {
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(255, 255, 255, 0.08);
}

.sidebar-dark-primary .nav-treeview .nav-treeview .nav-treeview {
    background-color: rgba(255, 255, 255, 0.02);
    border-left-color: rgba(255, 255, 255, 0.06);
}
