/* Custom Sidebar Styles - สวยงามและทันสมัย */

/* Main Sidebar Container */
.main-sidebar.custom-sidebar {
    background: linear-gradient(180deg, #000000 0%, #880e4f 25%, #c2185b 50%, #e91e63 75%, #ff6b9d 100%) !important;
    border-right: none !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2) !important;
    position: relative;
    overflow: hidden;
}

/* 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 */
.nav-sidebar .nav-item {
    margin-bottom: 8px;
    position: relative;
}

.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    padding: 12px 16px !important;
    transition: background 0.2s ease;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #ff6b9d 0%, #e91e63 100%) !important;
    color: #ffffff !important;
}

/* Icons in Navigation */
.nav-sidebar .nav-icon {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-right: 12px !important;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    width: 20px;
    text-align: center;
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: #ffffff !important;
    transform: scale(1.2) rotate(5deg);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #ffffff !important;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Text in Navigation */
.nav-sidebar .nav-link p {
    color: inherit !important;
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* 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 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 157, 0.4);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 157, 0.6);
}



/* 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 */
.nav-sidebar .nav-link[href*="logout"] {
    background: rgba(255, 107, 157, 0.3) !important;
    border: 1px solid rgba(255, 107, 157, 0.5);
}

.nav-sidebar .nav-link[href*="logout"]:hover {
    background: rgba(255, 107, 157, 0.5) !important;
    border-color: rgba(255, 107, 157, 0.7);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

/* 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);
} 