/* Modern SaaS Sidebar Styles */
.sidebarstyle1 {
    width: 210px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile styles */
@media (max-width: 601px) {
    .sidebarstyle1 {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 210px !important;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
    }
    
    .sidebarstyle1:not(.sidebar-closed) {
        transform: translateX(0) !important;
    }
    
    .sidebar-closed {
        transform: translateX(-100%) !important;
    }
}

/* Sidebar toggle animation */
#mySidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease;
    margin-top: 45px;
}

/* Collapsed sidebar */
.sidebarstyle2 {
    background: var(--primary-color);
    width: 70px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebarstyle2 .side-list-label,
.sidebarstyle2 .sidenav-inner-text span:not(.fontx) {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.sidebarstyle2 .sidebar-brand-text {
    opacity: 0;
}

/* Main navigation list */
.jslist {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

/* Remove all list markers from all levels of navigation */
.jslist, .jslist ul, .jslist ul ul, .jslist ul ul ul {
    list-style: none !important;
}

.jslist > li { 
    position: relative;
    padding: 0;
    margin: 0;
}

/* REMOVED GRAY LINE - Original divider is removed */
.jslist > li:not(:last-child)::after {
    display: none;
}
/* EXTREME LEFT ALIGNMENT - Move main items all the way to left edge */
.jslist > li > .side-list-title {
    padding-left: 4px !important;
    margin-left: 0px !important; /* Negative margin for extreme left */
    border-radius: 0 8px 8px 0 !important; /* Adjust border radius */

}

/* Force remove all list markers and left space for all list items in navigation */
.jslist li {
    list-style-type: none !important;
    list-style: none !important;
    marker: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Move the active indicator line to edge */
.jslist > li > .side-list-title.active::before {
    left: -2px !important; /* Extend beyond the item slightly */
    width: 4px !important;
}
/* Side list title - COMPACT STYLING */
.side-list-title {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin: 1px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: black;
    position: relative;
    overflow: hidden;
    min-height: 32px;
    line-height: 1.2;
}

.side-list-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.side-list-title:hover {
    background: rgba(var(--primary-color-rgb, 59, 130, 246), 0.08);
    color: var(--primary-color);
    transform: translateX(3px);
}

.side-list-title:hover .fontx {
    transform: translateX(1px);
}

.side-list-title.active {
    background: rgba(var(--primary-color-rgb, 59, 130, 246), 0.12);
    color: var(--primary-color);
    font-weight: 600;
}

.side-list-title.active::before {
    transform: scaleY(1);
}

/* Icons - COMPACT SIZE */
.side-list-title .fontx {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
}

.side-list-title .fontx.fx-chevron-down {
    font-size: 14px;
    margin-left: auto;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.jsl-open .side-list-title .fontx.fx-chevron-down {
    transform: rotate(180deg);
}

/* Side list label */
.side-list-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
    padding-left: 4px;
}

/* Submenu - COMPACT SPACING */
.jslist ul {
    list-style: none;
    padding-left: 8px;
    margin: 2px 0;
    position: relative;
}

.jslist ul::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(var(--primary-color-rgb, 59, 130, 246), 0.15) 10%, 
        rgba(var(--primary-color-rgb, 59, 130, 246), 0.15) 90%, 
        transparent 100%);
}

/* Submenu items - COMPACT STYLING */
.sidenav-inner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12.5px;
    color: black;
    margin: 1px 4px;
    position: relative;
    min-height: 30px;
    line-height: 1.2;
}

.sidenav-inner-text::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--primary-color-rgb, 59, 130, 246), 0.3);
    opacity: 0;
    transition: all 0.3s ease;
}

.sidenav-inner-text:hover {
    background: rgba(var(--primary-color-rgb, 59, 130, 246), 0.06);
    color: var(--primary-color);
    padding-left: 18px;
}

.sidenav-inner-text:hover::before {
    opacity: 1;
    left: -14px;
}

.sidenav-inner-text.active {
    background: rgba(var(--primary-color-rgb, 59, 130, 246), 0.06) !important;
    color: var(--primary-color1) !important;
    font-weight: 500;
    border-left: 2px solid var(--primary-color1) !important;
    padding-left: 14px !important;
    margin-left: 2px !important;
}

.sidenav-inner-text.active::before {
    opacity: 1;
    left: -14px;
    background: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 59, 130, 246), 0.2);
}

.sidenav-inner-text .fontx {
    font-size: 14px;
    min-width: 18px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidenav-inner-text:hover .fontx {
    transform: scale(1.05);
}

/* Nested list animation */
.jsl-closed > ul {
    display: block;
    opacity: 0;
    max-height: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jsl-open > ul {
    display: block;
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Deep nested lists - INCREASED INDENTATION FOR FINAL LEVEL */
.sidenav-inner-most-list {
    padding-left: 24px !important; /* Increased from default for more indentation */
}

/* SPECIFIC STYLE FOR THE FINAL/LAST LEVEL <li> ELEMENTS - PUSH THEM MORE TO THE RIGHT */
.jslist ul ul ul .sidenav-inner-text {
    padding-left: 0px !important; /* More padding for deeper levels */
    margin-left: 0px !important; /* Additional margin for visual separation */
}

/* Even more indentation for the deepest levels */
.jslist ul ul ul ul .sidenav-inner-text {
    padding-left: 28px !important;
    margin-left: 6px !important;
}

/* Adjust the vertical line for deeper nesting */
.sidenav-inner-most-list::before {
    left: 16px; /* Adjust vertical line position */
}

.jslist ul ul ul::before {
    left: 28px; /* Move vertical line further right for deeper levels */
}

/* Hover effects for deeply nested items */
.jslist ul ul ul .sidenav-inner-text:hover {
    padding-left: 26px !important; /* Adjust hover effect for deeper levels */
}

/* Adjust the dot indicator for deeper levels */
.jslist ul ul ul .sidenav-inner-text::before {
    left: -14px; /* Position dot indicator further right */
}

.jslist ul ul ul .sidenav-inner-text:hover::before {
    left: -10px; /* Adjust hover position for deeper levels */
}

/* Hover effects */
.jslist li {
    transition: all 0.3s ease;
}

.jslist li:hover > .side-list-title {
    color: var(--primary-color);
}

/* Scrollbar styling */
.sidebarstyle1::-webkit-scrollbar {
    width: 4px;
}

.sidebarstyle1::-webkit-scrollbar-track {
    background: transparent;
}

.sidebarstyle1::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.sidebarstyle1::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Badge for notifications */
.nav-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: auto;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Overlay for mobile */
#myOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Active item indicator */
.side-list-title::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-list-title.active::after {
    opacity: 1;
}

/* Tooltip for collapsed state */
.sidebarstyle2 .side-list-title:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebarstyle2 .side-list-title:hover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1e293b;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebarstyle2 .side-list-title:hover::after,
.sidebarstyle2 .side-list-title:hover::before {
    opacity: 1;
}

/* Specific styling for the last/final <li> elements in each section */
.jslist > li > ul > li:last-child > .sidenav-inner-text,
.jslist > li > ul > li:last-child > .side-list-title {
    margin-bottom: 2px !important; /* Slight extra spacing before next main section */
}

/* Visual indicator for the deepest nesting levels */
.jslist ul ul ul .sidenav-inner-text {
    background-color: rgba(0, 0, 0, 0.01); /* Very subtle background for deepest items */
    border-left: 1px solid rgba(0, 0, 0, 0.05); /* Subtle left border for deepest items */
    margin-left: 8px; /* Additional indentation */
}