/* Custom Sidebar Styles - สวยงามและทันสมัย */

/* Main Sidebar Container - Modern Gradient */
.main-sidebar.custom-sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 20%, #0f3460 40%, #533483 60%, #e94560 100%) !important;
    border-right: none !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
}

/* Animated Background Pattern */
.main-sidebar.custom-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(83, 52, 131, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(15, 52, 96, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Brand Logo Section */
.brand-link {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 20px 15px !important;
    position: relative;
}

.brand-link .brand-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* User Panel */
.user-panel {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    margin: 20px 12px !important;
    padding: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease;
}

.user-panel:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.user-panel .info a {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Navigation Menu - Modern Design */
.nav-sidebar .nav-item {
    margin-bottom: 10px;
    position: relative;
}

.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    margin: 4px 12px !important;
    padding: 14px 18px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-sidebar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-sidebar .nav-link:hover::before {
    left: 100%;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #e94560 0%, #533483 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

/* Icons in Navigation - Enhanced */
.nav-sidebar .nav-icon {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-right: 14px !important;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    width: 24px;
    text-align: center;
    position: relative;
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: #ffffff !important;
    transform: scale(1.15) rotate(5deg);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 8px rgba(233, 69, 96, 0.5));
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #ffffff !important;
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.7));
}

/* Text in Navigation - Enhanced Typography */
.nav-sidebar .nav-link p {
    color: inherit !important;
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-sidebar .nav-link:hover p {
    font-weight: 700;
    letter-spacing: 0.8px;
}

/* Treeview (Submenu) */
.nav-treeview {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    margin: 5px 0 5px 20px !important;
    padding: 5px 0 !important;
    border-left: 2px solid rgba(255, 107, 157, 0.4);
}

.nav-treeview .nav-link {
    padding: 8px 15px !important;
    margin: 2px 5px !important;
    font-size: 0.9rem;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-treeview .nav-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
}

.nav-treeview .nav-icon {
    font-size: 0.8rem;
}

/* Nav Header (Section Titles) */
.nav-header {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 15px 15px 5px 15px !important;
    margin-top: 10px !important;
    border-bottom: 1px solid rgba(255, 107, 157, 0.4);
    text-shadow: 0 1px 2px rgba(255, 107, 157, 0.4);
}

/* Right Arrow for Treeview */
.nav-sidebar .nav-link .right {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease;
}

.nav-sidebar .nav-link:hover .right {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: rotate(-90deg);
}

/* Scrollbar Styling - Modern */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e94560 0%, #533483 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6b9d 0%, #e91e63 100%);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}



/* Responsive Design */
@media (max-width: 768px) {
    .main-sidebar.custom-sidebar {
        background: linear-gradient(180deg, #000000 0%, #880e4f 25%, #c2185b 50%, #e91e63 75%, #ff6b9d 100%) !important;
    }
    
    .nav-sidebar .nav-link {
        padding: 18px 25px !important;
        font-size: 1.1rem;
        margin: 3px 10px !important;
    }
    
    .brand-link .brand-text {
        font-size: 1.3rem;
    }
    
    .user-panel {
        margin: 25px 15px !important;
        padding: 25px !important;
    }
}

@media (max-width: 480px) {
    .main-sidebar.custom-sidebar {
        background: linear-gradient(180deg, #000000 0%, #880e4f 25%, #c2185b 50%, #e91e63 75%, #ff6b9d 100%) !important;
    }
    
    .nav-sidebar .nav-link {
        padding: 20px 30px !important;
        font-size: 1.2rem;
    }
    
    .brand-link .brand-text {
        font-size: 1.4rem;
    }
    
    .nav-sidebar .nav-icon {
        font-size: 1.4rem;
        margin-right: 15px !important;
    }
}



/* Special styling for logout button - Enhanced */
.nav-sidebar .nav-link[href*="logout"] {
    background: rgba(233, 69, 96, 0.25) !important;
    border: 1px solid rgba(233, 69, 96, 0.4);
    margin-top: 20px;
}

.nav-sidebar .nav-link[href*="logout"]:hover {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.4) 0%, rgba(83, 52, 131, 0.4) 100%) !important;
    border-color: rgba(233, 69, 96, 0.6);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
    transform: translateX(5px) scale(1.02);
}

/* Special styling for admin buttons */
.nav-sidebar .nav-link[href*="admin"] {
    background: rgba(255, 182, 193, 0.3) !important;
    border: 1px solid rgba(255, 182, 193, 0.5);
}

.nav-sidebar .nav-link[href*="admin"]:hover {
    background: rgba(255, 182, 193, 0.5) !important;
    border-color: rgba(255, 182, 193, 0.7);
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.4);
} 