/* Wincos Sidebar Color Scheme - Blue Corporate Soft & Elegant */
/* Mengacu pada warna halaman login dengan dominasi biru corporate */

/* Sidebar Background - Blue Corporate Gradient */
.pe-app-sidebar {
    background: linear-gradient(180deg, #e0f2fe 0%, #b3e5fc 25%, #81d4fa 50%, #4fc3f7 100%) !important;
    border-right: 1px solid rgba(30, 64, 175, 0.15) !important;
}

/* Logo Section - Soft Blue */
.pe-app-sidebar-logo {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.95) 0%, rgba(179, 229, 252, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(30, 64, 175, 0.2) !important;
}

.pe-app-sidebar-logo a {
    color: #1e40af !important;
    font-weight: 600 !important;
}

/* Navigation Links - Blue Theme */
.pe-nav-link {
    color: #1e3a8a !important;
    background: rgba(224, 242, 254, 0.7) !important;
    border: 1px solid rgba(30, 64, 175, 0.15) !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
}

.pe-nav-link:hover {
    background: rgba(224, 242, 254, 0.95) !important;
    color: #1e40af !important;
    border-color: rgba(30, 64, 175, 0.3) !important;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1) !important;
}

.pe-nav-link.active {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    border-color: #1e40af !important;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25) !important;
}

/* Navigation Icons */
.pe-nav-icon {
    color: #1e3a8a !important;
}

.pe-nav-link:hover .pe-nav-icon {
    color: #1e40af !important;
}

.pe-nav-link.active .pe-nav-icon {
    color: #ffffff !important;
}

/* Submenu - Soft Blue Theme */
.pe-slide-menu {
    background: rgba(224, 242, 254, 0.5) !important;
    border: 1px solid rgba(30, 64, 175, 0.1) !important;
    border-radius: 6px !important;
}

.pe-slide-menu .pe-nav-content1 {
    color: #1e3a8a !important;
    border-bottom: 1px solid rgba(30, 64, 175, 0.15) !important;
    font-weight: 600 !important;
}

.pe-slide-menu .pe-nav-link {
    background: transparent !important;
    border: none !important;
    color: #1e3a8a !important;
}

.pe-slide-menu .pe-nav-link:hover {
    background: rgba(224, 242, 254, 0.8) !important;
    color: #1e40af !important;
}

.pe-slide-menu .pe-nav-link.active {
    background: rgba(30, 64, 175, 0.9) !important;
    color: #ffffff !important;
}

/* Additional Blue Corporate Styling */
.pe-app-sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.3), transparent);
}

/* Scrollbar - Blue Theme */
.pe-app-sidebar-menu::-webkit-scrollbar {
    width: 4px !important;
}

.pe-app-sidebar-menu::-webkit-scrollbar-track {
    background: rgba(224, 242, 254, 0.3) !important;
    border-radius: 2px !important;
}

.pe-app-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(30, 64, 175, 0.4) !important;
    border-radius: 2px !important;
}

.pe-app-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 64, 175, 0.6) !important;
}
/* Da
rk Mode Styling for Sidebar */
[data-bs-theme=dark] .pe-app-sidebar {
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 25%, #4a5568 50%, #718096 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme=dark] .pe-app-sidebar-logo {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.95) 0%, rgba(45, 55, 72, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme=dark] .pe-app-sidebar-logo a {
    color: #cbd5e0 !important;
    font-weight: 600 !important;
}

[data-bs-theme=dark] .pe-nav-link {
    color: #e2e8f0 !important;
    background: rgba(45, 55, 72, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme=dark] .pe-nav-link:hover {
    background: rgba(74, 85, 104, 0.8) !important;
    color: #f7fafc !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme=dark] .pe-nav-link.active {
    background: linear-gradient(135deg, #4a5568 0%, #718096 100%) !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme=dark] .pe-nav-icon {
    color: #e2e8f0 !important;
}

[data-bs-theme=dark] .pe-nav-link:hover .pe-nav-icon {
    color: #f7fafc !important;
}

[data-bs-theme=dark] .pe-nav-link.active .pe-nav-icon {
    color: #ffffff !important;
}

[data-bs-theme=dark] .pe-slide-menu {
    background: rgba(45, 55, 72, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme=dark] .pe-slide-menu .pe-nav-content1 {
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme=dark] .pe-slide-menu .pe-nav-link {
    color: #cbd5e0 !important;
}

[data-bs-theme=dark] .pe-slide-menu .pe-nav-link:hover {
    background: rgba(74, 85, 104, 0.6) !important;
    color: #f7fafc !important;
}

[data-bs-theme=dark] .pe-slide-menu .pe-nav-link.active {
    background: rgba(74, 85, 104, 0.9) !important;
    color: #ffffff !important;
}

[data-bs-theme=dark] .pe-app-sidebar-logo::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

[data-bs-theme=dark] .pe-app-sidebar-menu::-webkit-scrollbar-track {
    background: rgba(45, 55, 72, 0.5) !important;
}

[data-bs-theme=dark] .pe-app-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme=dark] .pe-app-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar Toggle Functionality - Fixed */
/* Pastikan logo selalu terlihat di mode normal */
.pe-app-sidebar-logo-small,
.pe-app-sidebar-logo-default {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Icon Mode - Collapsed Sidebar */
[data-sidebar="icon"] .pe-app-sidebar {
    width: 70px !important;
    transition: width 0.3s ease !important;
}

[data-sidebar="icon"] .pe-app-sidebar-logo-default {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

[data-sidebar="icon"] .pe-nav-text {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

[data-sidebar="icon"] .pe-nav-link {
    justify-content: center !important;
    padding: 0.75rem !important;
}

[data-sidebar="icon"] .pe-nav-arrow {
    display: none !important;
}

[data-sidebar="icon"] .pe-slide-menu {
    display: none !important;
}

/* Default Mode - Expanded Sidebar */
[data-sidebar="default"] .pe-app-sidebar {
    width: 260px !important;
    transition: width 0.3s ease !important;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .pe-app-sidebar {
        position: fixed !important;
        left: -260px !important;
        transition: left 0.3s ease !important;
        z-index: 1050 !important;
    }
    
    .pe-app-sidebar.show {
        left: 0 !important;
    }
    
    /* Sidebar backdrop for mobile */
    .sidebar-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1040 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }
    
    .sidebar-backdrop.show {
        display: block !important;
        opacity: 1 !important;
    }
}

/* Toggle Button Styling */
.vertical-toggle {
    transition: transform 0.2s ease !important;
}

.vertical-toggle:hover {
    transform: scale(1.05) !important;
}

[data-sidebar="icon"] .vertical-toggle .header-icon {
    transform: rotate(180deg) !important;
    transition: transform 0.3s ease !important;
}

/* Smooth transitions for all sidebar elements */
.pe-app-sidebar * {
    transition: all 0.2s ease !important;
}

/* Ensure main content adjusts to sidebar width */
.app-wrapper {
    margin-left: 260px !important;
    transition: margin-left 0.3s ease !important;
}

[data-sidebar="icon"] .app-wrapper {
    margin-left: 70px !important;
}

@media (max-width: 991.98px) {
    .app-wrapper {
        margin-left: 0 !important;
    }
}/
* Force toggle functionality - Override any conflicting styles */
html[data-sidebar="icon"] .pe-app-sidebar {
    width: 70px !important;
}

html[data-sidebar="default"] .pe-app-sidebar {
    width: 260px !important;
}

html[data-sidebar="icon"] .pe-app-sidebar-logo-default {
    display: none !important;
}

html[data-sidebar="icon"] .pe-nav-text {
    display: none !important;
}

/* Debug - temporary red border to see if CSS is working */
[data-sidebar="icon"] .pe-app-sidebar {
    border-left: 3px solid red !important;
}

[data-sidebar="default"] .pe-app-sidebar {
    border-left: 3px solid green !important;
}