/* Premium Full Top Navigation */
.premium-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 2rem;
    height: 76px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.dark-mode .premium-navbar {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.premium-navbar-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.premium-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color, #2563eb);
    letter-spacing: -0.02em;
    transition: transform 0.2s ease;
}

.premium-brand:hover {
    transform: scale(1.02);
}

.premium-brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transform: scale(2);
    transform-origin: left center;
}

.premium-nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.premium-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.p-nav-link {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.dark-mode .p-nav-link {
    color: #cbd5e1;
}

.p-nav-link:hover, .p-nav-link.active {
    color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.08);
}

.dark-mode .p-nav-link:hover, .dark-mode .p-nav-link.active {
    background: rgba(37, 99, 235, 0.15);
}

.p-nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.p-nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    position: absolute;
    top: -2px;
    right: -2px;
    border: 2px solid white;
}

.dark-mode .p-nav-badge {
    border-color: #0f172a;
}

/* User Menu Dropdown */
.p-nav-user {
    position: relative;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #e2e8f0;
}

.dark-mode .p-nav-user {
    border-left-color: #334155;
}

.p-user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.p-user-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dark-mode .p-user-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.p-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.p-user-info {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.p-user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.2;
}

.dark-mode .p-user-name {
    color: #f1f5f9;
}

.p-user-role {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.p-dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.8);
    width: 240px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.p-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.p-dropdown-wrapper:hover .p-dropdown-menu,
.p-nav-user:hover .p-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark-mode .p-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.p-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.p-dropdown-item i {
    width: 20px;
    text-align: center;
}

.dark-mode .p-dropdown-item {
    color: #cbd5e1;
}

.p-dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary-color, #2563eb);
}

.dark-mode .p-dropdown-item:hover {
    background: #0f172a;
}

.p-dropdown-item.danger {
    color: #ef4444;
}
.p-dropdown-item.danger:hover {
    background: #fef2f2;
}
.dark-mode .p-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.p-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem;
}

.dark-mode .p-dropdown-divider {
    background: #334155;
}

/* Mobile Toggle */
.p-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e293b;
    cursor: pointer;
}

.dark-mode .p-mobile-toggle {
    color: #f1f5f9;
}

/* Auth Buttons */
.p-auth-btns {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.p-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.p-btn-login {
    color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.1);
}

.p-btn-login:hover {
    background: rgba(37, 99, 235, 0.15);
}

.p-btn-register {
    background: var(--primary-color, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.p-btn-register:hover {
    background: var(--primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

@media (max-width: 1024px) {
    .premium-nav-menu {
        display: flex;
        position: fixed;
        top: 76px;
        right: 0;
        width: 300px;
        max-width: 100vw;
        height: calc(100vh - 76px);
        bottom: auto;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        padding-bottom: 4rem;
        z-index: 999;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
    }
    
    .premium-brand span {
        display: none;
    }
    
    .p-mobile-toggle {
        display: block;
    }
    
    .p-nav-user {
        border-left: none;
    }
    
    .premium-nav-menu.mobile-active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    .dark-mode .premium-nav-menu.mobile-active {
        background: #0f172a;
    }
    .premium-nav-menu.mobile-active .premium-nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }
    
    .premium-nav-menu.mobile-active .p-dropdown-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .premium-nav-menu.mobile-active .p-nav-user {
        margin: 2rem 0 0 0;
        padding: 2rem 0 0 0;
        border-top: 1px solid #e2e8f0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .premium-nav-menu.mobile-active .p-nav-link {
        width: 100%;
        justify-content: flex-start;
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    /* Flatten dropdown on mobile */
    .premium-nav-menu.mobile-active .p-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        margin-top: 0;
        background: transparent;
    }
    
    .premium-nav-menu.mobile-active .desktop-only-btn {
        display: none;
    }
    
    .premium-nav-menu.mobile-active .p-dropdown-item {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 8px;
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    
    .premium-nav-menu.mobile-active .p-user-btn {
        pointer-events: none;
        padding: 1rem;
        margin-bottom: 1.5rem;
        width: 100%;
        justify-content: flex-start;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }
    
    .dark-mode .premium-nav-menu.mobile-active .p-user-btn {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    }
    
    .premium-nav-menu.mobile-active .fa-chevron-down {
        display: none;
    }
    
    
    .premium-nav-overlay {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 990;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    html.nav-open,
    body.nav-open {
        overflow: hidden !important;
        touch-action: none;
    }
    
    .premium-navbar.nav-open {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: white !important;
    }
    
    body.nav-open .premium-nav-overlay {
        opacity: 1;
        visibility: visible;
    }
}
