/* ========== FANBEL FINANCE SIDEBAR FIX ========== */
/* Fix untuk masalah sidebar toggle yang menyebabkan text shadow/berbayang pada menu */

/* NUCLEAR OPTION - HAPUS SEMUA EFEK BAYANGAN/DUPLIKASI TEXT */
#sidebar .pe-main-menu .pe-nav-link,
#sidebar .pe-main-menu .pe-nav-link *,
#sidebar .pe-main-menu .pe-nav-text,
#sidebar .pe-main-menu .pe-nav-content,
#sidebar .pe-main-menu .pe-nav-content *,
#sidebar .pe-main-menu .pe-menu-title,
#sidebar .pe-main-menu li a,
#sidebar .pe-main-menu li a *,
#sidebar .pe-main-menu li span {
    text-shadow: none !important;
    transform: none !important;
    -webkit-text-stroke: none !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Hapus semua pseudo-elements yang mungkin bikin bayangan */
#sidebar .pe-main-menu .pe-nav-link::before,
#sidebar .pe-main-menu .pe-nav-link::after,
#sidebar .pe-main-menu .pe-nav-content::before,
#sidebar .pe-main-menu .pe-nav-content::after {
    content: none !important;
    display: none !important;
}

/* FIX MENU TITLE (Menu Utama, Admin Management) */
#sidebar .pe-main-menu .pe-menu-title {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 15px 20px 8px 20px !important;
    margin: 0 !important;
    text-shadow: none !important;
    background: transparent !important;
    visibility: visible !important;
    display: block !important;
}

/* FIX MENU LINKS */
#sidebar .pe-main-menu .pe-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    text-shadow: none !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
}

/* FIX MENU CONTENT TEXT */
#sidebar .pe-main-menu .pe-nav-content {
    color: inherit !important;
    font-weight: 500 !important;
    text-shadow: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* FIX HOVER STATE */
#sidebar .pe-main-menu .pe-nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    text-shadow: none !important;
    transform: none !important;
}

/* FIX ACTIVE STATE */
#sidebar .pe-main-menu .pe-nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

/* FIX ICON MODE SIDEBAR */
[data-sidebar="icon"] #sidebar .pe-main-menu .pe-nav-content {
    opacity: 0 !important;
    visibility: hidden !important;
    text-shadow: none !important;
}

[data-sidebar="icon"] #sidebar .pe-main-menu .pe-menu-title {
    opacity: 0 !important;
    visibility: hidden !important;
    text-shadow: none !important;
}

[data-sidebar="icon"] #sidebar .pe-main-menu .pe-nav-link {
    text-align: center !important;
    text-shadow: none !important;
}

/* FIX SUBMENU */
#sidebar .pe-main-menu .pe-slide-menu .pe-nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    padding-left: 50px !important;
    text-shadow: none !important;
    font-size: 13px !important;
}

#sidebar .pe-main-menu .pe-slide-menu .pe-nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    text-shadow: none !important;
}

/* FIX ARROWS */
#sidebar .pe-main-menu .pe-nav-arrow {
    color: rgba(255, 255, 255, 0.6) !important;
    text-shadow: none !important;
    transition: transform 0.3s ease !important;
}

/* FIX UNTUK DARK MODE */
[data-bs-theme="dark"] #sidebar .pe-main-menu .pe-menu-title {
    color: rgba(255, 255, 255, 0.5) !important;
    text-shadow: none !important;
}

[data-bs-theme="dark"] #sidebar .pe-main-menu .pe-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: none !important;
}

[data-bs-theme="dark"] #sidebar .pe-main-menu .pe-nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: none !important;
}

/* FIX LIGHT MODE */
[data-bs-theme="light"] #sidebar .pe-main-menu .pe-menu-title {
    color: rgba(100, 116, 139, 0.8) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] #sidebar .pe-main-menu .pe-nav-link {
    color: rgba(100, 116, 139, 0.9) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] #sidebar .pe-main-menu .pe-nav-link:hover {
    color: rgba(30, 41, 59, 1) !important;
    background-color: rgba(100, 116, 139, 0.1) !important;
    text-shadow: none !important;
}

/* FIX SIDEBAR COLLAPSE/EXPAND TRANSITION */
#sidebar {
    transition: all 0.3s ease !important;
}

#sidebar .pe-main-menu {
    transition: all 0.3s ease !important;
}

/* FIX Z-INDEX DAN BACKDROP */
#sidebar-backdrop {
    z-index: 1040 !important;
}

#sidebar {
    z-index: 1050 !important;
}

/* ANTI-ALIASING UNTUK TEXT YANG LEBIH SMOOTH */
#sidebar .pe-main-menu * {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* FIX RESPONSIVE */
@media (max-width: 991.98px) {
    #sidebar .pe-main-menu .pe-nav-link,
    #sidebar .pe-main-menu .pe-menu-title {
        text-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* FIX UNTUK VERTICAL TOGGLE BUTTON */
.vertical-toggle {
    transition: all 0.3s ease !important;
}

.vertical-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
}

/* FORCE VISIBILITY FOR ALL MENU ELEMENTS */
#sidebar .pe-main-menu .pe-menu-title,
#sidebar .pe-main-menu .pe-nav-content,
#sidebar .pe-main-menu .pe-nav-link,
#sidebar .pe-main-menu li,
#sidebar .pe-main-menu span {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* RESET ANY WEIRD CSS EFFECTS */
#sidebar .pe-main-menu * {
    position: relative !important;
    z-index: auto !important;
}
