/* ============================================
   PREMIUM HEADER CSS - MODERN & PROFESSIONAL
   ============================================ */

:root {
    /* Layout */
    --header-height: 80px;
    --header-height-scrolled: 70px;
    
    /* Background - PERBAIKAN: Warna konsisten */
    --header-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
    --header-bg-scrolled: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(249, 250, 251, 0.99) 100%);
    --header-border: rgba(229, 231, 235, 0.5);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --header-shadow-scrolled: 0 6px 30px rgba(0, 0, 0, 0.1);
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-hot: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-hover: rgba(241, 245, 249, 0.8);
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 20px 50px rgba(0, 0, 0, 0.2);
    
    --glow-primary: 0 8px 32px rgba(102, 126, 234, 0.3);
    --glow-secondary: 0 8px 25px rgba(59, 130, 246, 0.3);
    --glow-danger: 0 8px 25px rgba(239, 68, 68, 0.3);
    --glow-hot: 0 8px 25px rgba(249, 115, 22, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    padding-top: 80px; /* Untuk offset header fixed */
}

/* ============================================
   HEADER CONTAINER - DIPERBAIKI
   ============================================ */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--header-shadow);
    padding: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--transition-slow);
}

/* PERBAIKAN UTAMA: Hilangkan perubahan background saat scroll */
.site-header.scrolled {
    height: var(--header-height-scrolled);
    box-shadow: var(--header-shadow-scrolled);
    backdrop-filter: blur(16px); /* Blur lebih kuat saat scroll */
    -webkit-backdrop-filter: blur(16px);
    /* HAPUS: background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(249, 250, 251, 0.99) 100%); */
    /* Background tetap sama seperti state normal */
    background: var(--header-bg); /* Gunakan variable yang sama */
    border-bottom: 1px solid var(--header-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
    height: 100%;
    gap: 32px;
}

/* ============================================
   LOGO SECTION - PREMIUM DESIGN
   ============================================ */
.site-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.site-logo:hover {
    transform: translateY(-1px);
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 800;
    font-size: 22px;
    box-shadow: var(--glow-primary);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.logo-icon::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: var(--transition-slow);
}

.site-logo:hover .logo-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.site-logo:hover .logo-icon::before {
    left: 100%;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.site-logo:hover .logo-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
    position: relative;
    padding-left: 24px;
}

.logo-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* ============================================
   MAIN NAVIGATION - DIPERBAIKI DENGAN HOVER EFFECT
   ============================================ */
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    background: rgba(241, 245, 249, 0.5);
    padding: 8px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(229, 231, 235, 0.3);
    position: relative;
}

.nav-item {
    position: relative;
    isolation: isolate;
}

/* PERBAIKAN NAV-LINK HOVER YANG UTAMA */
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px !important;
    text-decoration: none;
    color: var(--text-secondary) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0) 0%, 
        rgba(59, 130, 246, 0.08) 50%, 
        rgba(59, 130, 246, 0) 100%) !important;
    background-size: 200% 100% !important;
    background-position: -100% 0 !important;
    border-radius: var(--radius-md) !important;
    z-index: 1;
    overflow: visible !important; /* Diperbaiki */
    border: 2px solid transparent !important;
    min-width: 120px;
    justify-content: center;
    font-weight: 600;
}

/* Underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary) !important;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateX(-50%);
    z-index: 1;
}

/* HOVER STATE YANG DIPERBAIKI - TIDAK LAGI BERMASALAH */
.nav-link:hover {
    color: var(--text-primary) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: var(--shadow-xl) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    background-position: 100% 0 !important;
}

.nav-link:hover::after {
    width: 80% !important;
}

/* ACTIVE STATE YANG DIPERBAIKI */
.nav-link.active {
    background: var(--gradient-secondary) !important;
    color: var(--text-white) !important;
    box-shadow: var(--glow-secondary) !important;
    border-color: transparent !important;
    transform: translateY(-2px) !important;
}

.nav-link.active::after {
    display: none !important;
}

.nav-link.active:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.45) !important;
}

/* Icon Effects yang diperbaiki */
.nav-icon {
    font-size: 1.15em !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    z-index: 2;
    color: inherit !important;
}

.nav-link:hover .nav-icon {
    transform: scale(1.25) rotate(8deg) !important;
    color: #3b82f6 !important;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3)) !important;
}

.nav-link.active .nav-icon {
    transform: scale(1.15) !important;
    color: var(--text-white) !important;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3)) !important;
}

.nav-text {
    position: relative;
    z-index: 2;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

/* Active dot indicator */
.nav-link.active::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: var(--text-white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
    }
}

/* ============================================
   NAVIGATION BADGE - PERBAIKAN UTAMA: TIDAK TERPOTONG
   ============================================ */
.nav-badge {
    position: absolute !important;
    top: -12px !important; /* Dinaikkan sedikit */
    right: -12px !important; /* Digeser keluar */
    background: var(--gradient-danger);
    color: var(--text-white);
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 10px !important; /* Padding diperbesar */
    border-radius: var(--radius-full) !important;
    box-shadow: var(--glow-danger) !important;
    min-width: 26px; /* Lebar minimum diperbesar */
    height: 26px;
    text-align: center;
    line-height: 14px;
    z-index: 200 !important; /* Z-index dinaikkan */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-bounce 2s infinite !important;
    white-space: nowrap;
    pointer-events: none;
    border: 3px solid var(--bg-primary) !important; /* Border dipertebal */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-origin: center;
    overflow: visible !important; /* Pastikan tidak terpotong */
}

/* PERBAIKAN: Badge container untuk handling overflow */
.nav-badge-container {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 200;
    overflow: visible !important;
}

/* Badge untuk teks "Hot" */
.nav-badge[data-badge-type="hot"] {
    background: var(--gradient-hot) !important;
    box-shadow: var(--glow-hot) !important;
    font-size: 10px !important;
    padding: 6px 12px !important;
    min-width: 32px !important;
    height: 28px;
}

/* Badge untuk teks "New" */
.nav-badge[data-badge-type="new"] {
    background: var(--gradient-success) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
    font-size: 10px !important;
    padding: 6px 12px !important;
    min-width: 32px !important;
    height: 28px;
}

/* Badge untuk angka besar */
.nav-badge[data-count]:not([data-badge-type]) {
    font-size: 12px !important;
    padding: 6px 8px !important;
    min-width: 28px;
    height: 28px;
}

/* HOVER EFFECT UNTUK BADGE YANG DIPERBAIKI */
.nav-link:hover .nav-badge {
    transform: translateY(-6px) scale(1.15) !important;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4) !important;
}

.nav-link.active .nav-badge {
    border-color: var(--bg-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), var(--glow-danger) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%) !important;
    color: #1d4ed8 !important;
}

.nav-link.active .nav-badge[data-badge-type="hot"] {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3), var(--glow-hot) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%) !important;
    color: #ea580c !important;
}

.nav-link.active .nav-badge[data-badge-type="new"] {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 8px 25px rgba(16, 185, 129, 0.3) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%) !important;
    color: #059669 !important;
}

@keyframes badge-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.1); /* Efek bounce lebih jelas */
    }
}

/* Animasi khusus untuk badge angka */
.nav-badge[data-count]:not([data-badge-type]) {
    animation: badge-pulse 2s infinite !important;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); /* Pulse lebih besar */
    }
}

/* ============================================
   SEARCH BAR - PREMIUM DESIGN
   ============================================ */
.search-form {
    position: relative;
    width: 320px;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 16px 24px;
    padding-left: 56px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-slow);
    box-shadow: var(--shadow-md);
    outline: none;
}

.search-input:focus {
    border-color: #3b82f6;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(59, 130, 246, 0.1);
    width: 360px;
}

.search-input::placeholder {
    color: var(--text-light);
    font-weight: 500;
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}

.search-input:focus + .search-icon {
    color: #3b82f6;
    transform: translateY(-50%) scale(1.1);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: var(--gradient-secondary);
    color: var(--text-white);
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-bounce);
    opacity: 0;
    visibility: hidden;
    box-shadow: var(--glow-secondary);
}

.search-button::before {
    content: '🔍';
    margin-right: 6px;
    font-size: 12px;
}

.search-input:focus ~ .search-button {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* ============================================
   USER ACTIONS - PREMIUM DESIGN
   ============================================ */
.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
}

.action-button:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: var(--gradient-danger);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-bounce);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.user-profile::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: var(--transition-slow);
}

.user-profile:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.user-profile:hover::before {
    left: 100%;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.user-profile:hover .user-avatar {
    transform: scale(1.1);
    border-color: #3b82f6;
}

.user-info {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.menu-toggle {
    display: none;
    background: var(--gradient-secondary);
    border: none;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    color: var(--text-white);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition-bounce);
    box-shadow: var(--glow-secondary);
    position: relative;
    overflow: hidden;
    z-index: 1001;
}

.menu-toggle::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: var(--transition-slow);
}

.menu-toggle:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.menu-toggle:hover::before {
    left: 100%;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 24px;
        gap: 24px;
    }
    
    .search-form {
        width: 280px;
    }
    
    .search-input:focus {
        width: 320px;
    }
    
    .nav-list {
        gap: 2px;
    }
    
    .nav-link {
        padding: 12px 18px !important;
        font-size: 14px;
        min-width: 100px;
    }
    
    /* PERBAIKAN BADGE UNTUK TABLET - TIDAK TERPOTONG */
    .nav-badge {
        top: -10px !important;
        right: -10px !important;
        font-size: 10px !important;
        min-width: 24px !important;
        height: 24px !important;
        line-height: 12px !important;
        padding: 5px 8px !important;
        border-width: 3px !important;
        z-index: 200 !important;
    }
    
    .nav-badge[data-badge-type="hot"],
    .nav-badge[data-badge-type="new"] {
        font-size: 9px !important;
        min-width: 28px !important;
        height: 24px !important;
        padding: 5px 10px !important;
    }
    
    .nav-badge[data-count]:not([data-badge-type]) {
        font-size: 11px !important;
        min-width: 26px !important;
        height: 24px !important;
        padding: 5px 7px !important;
    }
    
    /* Badge container untuk tablet */
    .nav-badge-container {
        top: -12px;
        right: -12px;
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   MOBILE MENU ACTIVE STATE - DIPERBAIKI
   ============================================ */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
        order: 3;
    }
    
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(249, 250, 251, 0.99) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 24px;
        box-shadow: var(--shadow-2xl);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
        border-top: 1px solid var(--header-border);
        display: flex;
        flex-direction: column;
        gap: 24px;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        background: transparent;
        padding: 0;
        gap: 12px;
        width: 100%;
        border: none;
        box-shadow: none;
    }
    
    .nav-link {
        justify-content: space-between;
        padding: 18px 22px !important;
        border-radius: var(--radius-lg) !important;
        border: 2px solid var(--border-light) !important;
        background: var(--bg-primary) !important;
        width: 100%;
        min-width: auto !important;
        overflow: visible !important;
        position: relative;
    }
    
    /* Hover effects untuk mobile (touch friendly) */
    .nav-link:active {
        transform: scale(0.98) !important;
        background: var(--bg-tertiary) !important;
    }
    
    /* PERBAIKAN BADGE UNTUK MOBILE MENU - TIDAK TERPOTONG */
    .nav-badge {
        position: absolute !important; /* Tetap absolute */
        top: -12px !important; /* Dinaikkan */
        right: 12px !important; /* Posisi di dalam kanan */
        margin-left: 12px !important;
        font-size: 11px !important;
        min-width: 28px !important;
        height: 28px !important;
        line-height: 16px !important;
        padding: 6px 9px !important;
        border-width: 3px !important;
        z-index: 200 !important;
        animation: badge-bounce 2s infinite !important;
    }
    
    .nav-badge[data-badge-type="hot"],
    .nav-badge[data-badge-type="new"] {
        min-width: 32px !important;
        height: 26px !important;
        padding: 6px 12px !important;
    }
    
    .nav-badge[data-count]:not([data-badge-type]) {
        font-size: 12px !important;
        min-width: 28px !important;
        height: 26px !important;
        padding: 6px 8px !important;
    }
    
    /* Badge container untuk mobile */
    .nav-badge-container {
        position: absolute;
        top: -15px;
        right: 10px;
        width: 40px;
        height: 40px;
        pointer-events: none;
        z-index: 200;
        overflow: visible !important;
    }
    
    .user-actions {
        margin-top: 16px;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        padding: 16px;
        background: var(--bg-tertiary);
        border-radius: var(--radius-lg);
    }
    
    .search-form {
        width: 100%;
        margin: 0;
    }
    
    .search-input:focus {
        width: 100%;
    }
    
    .site-header.scrolled .main-nav {
        top: var(--header-height-scrolled);
        max-height: calc(100vh - var(--header-height-scrolled));
    }
    
    /* Menu Overlay untuk Mobile */
    .menu-overlay {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .site-header.scrolled ~ .menu-overlay {
        top: var(--header-height-scrolled);
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (768px)
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: var(--header-height);
        gap: 16px;
    }
    
    .site-header.scrolled {
        height: var(--header-height-scrolled);
    }
    
    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .logo-main {
        font-size: 22px;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .user-profile {
        padding: 8px 16px;
    }
    
    .user-info {
        display: none;
    }
    
    .action-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    /* PERBAIKAN BADGE UNTUK MOBILE - TIDAK TERPOTONG */
    .nav-badge {
        top: -10px !important;
        right: -8px !important;
        font-size: 10px !important;
        min-width: 22px !important;
        height: 22px !important;
        line-height: 12px !important;
        padding: 4px 7px !important;
        border-width: 3px !important;
        z-index: 200 !important;
    }
    
    .nav-badge[data-badge-type="hot"],
    .nav-badge[data-badge-type="new"] {
        font-size: 9px !important;
        padding: 4px 9px !important;
        min-width: 26px !important;
        height: 22px !important;
    }
    
    .nav-badge[data-count]:not([data-badge-type]) {
        font-size: 11px !important;
        min-width: 24px !important;
        height: 22px !important;
        padding: 4px 6px !important;
    }
    
    .search-button {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .notification-dot {
        top: 8px;
        right: 8px;
        width: 8px;
        height: 8px;
    }
    
    /* Mobile menu improvements */
    .main-nav {
        padding: 20px;
        gap: 20px;
    }
    
    .nav-link {
        padding: 16px 20px !important;
    }
    
    /* Badge container untuk mobile kecil */
    .nav-badge-container {
        top: -12px;
        right: -10px;
        width: 34px;
        height: 34px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (480px)
   ============================================ */
@media (max-width: 480px) {
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .logo-main {
        font-size: 20px;
    }
    
    .search-input {
        padding: 14px 20px;
        padding-left: 48px;
        font-size: 14px;
    }
    
    .search-icon {
        left: 20px;
        font-size: 16px;
    }
    
    .action-button {
        width: 40px;
        height: 40px;
    }
    
    .user-profile {
        padding: 6px 12px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .menu-toggle {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .notification-dot {
        top: 6px;
        right: 6px;
        width: 6px;
        height: 6px;
    }
    
    /* PERBAIKAN BADGE UNTUK SMALL MOBILE - TIDAK TERPOTONG */
    .nav-badge {
        top: -8px !important;
        right: -6px !important;
        font-size: 9px !important;
        min-width: 20px !important;
        height: 20px !important;
        line-height: 10px !important;
        padding: 3px 6px !important;
        border-width: 2px !important;
        z-index: 200 !important;
    }
    
    .nav-badge[data-badge-type="hot"],
    .nav-badge[data-badge-type="new"] {
        font-size: 8px !important;
        padding: 3px 8px !important;
        min-width: 24px !important;
        height: 20px !important;
    }
    
    .nav-badge[data-count]:not([data-badge-type]) {
        font-size: 10px !important;
        min-width: 22px !important;
        height: 20px !important;
        padding: 3px 5px !important;
    }
    
    /* Badge container untuk very small mobile */
    .nav-badge-container {
        top: -10px;
        right: -8px;
        width: 30px;
        height: 30px;
    }
}

/* ============================================
   ANIMATION & EFFECTS - DITAMBAHKAN
   ============================================ */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.site-header {
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading animation for menu */
.main-nav.loading {
    position: relative;
}

.main-nav.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Animation untuk menu items */
@keyframes navItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: navItemFadeIn 0.5s ease forwards;
    opacity: 0;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }

/* Shake animation untuk search input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.search-input.shake {
    animation: shake 0.5s ease;
}

/* Ripple Effect untuk klik */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced hover animations */
.nav-link {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.nav-link:hover {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ============================================
   DARK MODE SUPPORT - DIPERBAIKI UNTUK SCROLL
   ============================================ */
@media (prefers-color-scheme: dark) {
    .site-header {
        --header-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
        --header-border: rgba(51, 65, 85, 0.5);
        --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --text-light: #64748b;
        
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --bg-hover: rgba(51, 65, 85, 0.8);
        
        --border-light: #475569;
        --border-medium: #64748b;
    }
    
    /* PERBAIKAN: Dark mode untuk state scrolled */
    .site-header.scrolled {
        background: var(--header-bg); /* Tetap sama dengan state normal */
        border-bottom: 1px solid var(--header-border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    
    .search-input {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: #f1f5f9;
    }
    
    .search-input:focus {
        background: #0f172a;
    }
    
    .nav-list {
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    .nav-link {
        color: #cbd5e1 !important;
        border-color: rgba(71, 85, 105, 0.3) !important;
    }
    
    .nav-link:hover {
        color: #f1f5f9 !important;
        background: linear-gradient(90deg, 
            rgba(59, 130, 246, 0) 0%, 
            rgba(59, 130, 246, 0.15) 50%, 
            rgba(59, 130, 246, 0) 100%) !important;
    }
    
    /* Dark mode untuk badge */
    .nav-badge {
        border-color: #0f172a !important;
    }
    
    .nav-badge[data-badge-type="hot"] {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    }
    
    .nav-badge[data-badge-type="new"] {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    }
    
    .nav-link.active .nav-badge {
        border-color: #0f172a !important;
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
        color: #3b82f6 !important;
    }
    
    .nav-link.active .nav-badge[data-badge-type="hot"] {
        color: #f97316 !important;
    }
    
    .nav-link.active .nav-badge[data-badge-type="new"] {
        color: #10b981 !important;
    }
    
    .user-profile {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .action-button {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
    }
    
    .logo-main {
        background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .site-logo:hover .logo-main {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Mobile menu dark mode */
    .main-nav {
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.99) 0%, rgba(30, 41, 59, 0.99) 100%);
        border-top-color: rgba(51, 65, 85, 0.5);
    }
    
    .nav-link {
        background: #1e293b !important;
        border-color: #334155 !important;
    }
    
    .user-actions {
        background: rgba(30, 41, 59, 0.8);
    }
    
    /* Menu overlay dark mode */
    .menu-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.nav-link:focus,
.search-input:focus,
.action-button:focus,
.menu-toggle:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.nav-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    background: var(--bg-hover);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .nav-link,
    .nav-icon,
    .nav-badge,
    .site-logo,
    .menu-toggle,
    .search-input,
    .action-button,
    .user-profile {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   CUSTOM SCROLLBAR FOR MOBILE MENU
   ============================================ */
.main-nav::-webkit-scrollbar {
    width: 8px;
}

.main-nav::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

.main-nav::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.main-nav::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* ============================================
   SUBMENU STYLES (Optional - jika diperlukan)
   ============================================ */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    padding: 12px 0;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    border: 1px solid var(--border-light);
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.submenu-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-left-color: #3b82f6;
}

/* ============================================
   ADDITIONAL ENHANCEMENTS
   ============================================ */

/* Glow effect pada active state */
.nav-link.active {
    position: relative;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-secondary);
    border-radius: inherit;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.3;
}

/* Transition delay untuk efek berantai */
.nav-list:hover .nav-item {
    transition-delay: calc(var(--item-index, 0) * 0.05s);
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        transform: none !important;
    }
    
    .nav-link:active {
        background: var(--bg-tertiary) !important;
        transform: scale(0.98) !important;
    }
    
    /* Badge untuk touch devices */
    .nav-badge {
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nav-link {
        border: 2px solid currentColor !important;
    }
    
    .nav-link.active {
        border-width: 3px !important;
    }
    
    .nav-badge {
        border: 3px solid #000 !important;
        background: #ff0000 !important;
        color: #fff !important;
    }
}

/* ============================================
   PERBAIKAN KHUSUS UNTUK BADGE VISIBILITY
   ============================================ */

/* Pastikan badge selalu visible dan tidak terpotong */
.nav-link {
    overflow: visible !important;
    position: relative;
}

.nav-item {
    overflow: visible !important;
}

/* Container khusus untuk badge pada desktop */
@media (min-width: 1025px) {
    .nav-item {
        position: relative;
    }
    
    .nav-badge-wrapper {
        position: absolute;
        top: -15px;
        right: -15px;
        width: 40px;
        height: 40px;
        pointer-events: none;
        z-index: 200;
        overflow: visible !important;
    }
    
    .nav-badge {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        transform: none !important;
        z-index: 201 !important;
    }
}

/* Fallback untuk browser yang tidak support overflow: visible */
.nav-badge {
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Badge shadow untuk meningkatkan visibility */
.nav-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(4px);
    opacity: 0.3;
    z-index: -1;
}