
/* Top Navigation Bar Styles */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    backdrop-filter: blur(8px);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.mobile-toggle:hover {
    background: var(--secondary);
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: var(--secondary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.notification-dropdown.show .notification-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.notification-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--secondary);
}

.notification-item.unread {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.notification-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    color: var(--foreground);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.notification-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--muted-foreground);
}

.notification-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.view-all-btn {
    display: block;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-btn:hover {
    color: color-mix(in srgb, var(--primary) 80%, black);
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    overflow: hidden;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-small svg {
    width: 16px;
    height: 16px;
}

.user-name-short {
    font-weight: 500;
    font-size: 0.875rem;
}

.chevron-icon {
    transition: transform 0.2s ease;
}

.user-menu-dropdown.show .chevron-icon {
    transform: rotate(180deg);
}

.user-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu-dropdown.show .user-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-medium {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    overflow: hidden;
}

.user-avatar-medium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-medium svg {
    width: 24px;
    height: 24px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name-full {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.user-email {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.user-dropdown-links {
    padding: 0.5rem 0;
}

.user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.user-dropdown-link:hover {
    background: var(--secondary);
}

.user-dropdown-link svg {
    width: 16px;
    height: 16px;
    color: var(--muted-foreground);
}

.user-dropdown-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ef4444;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.logout-btn:hover {
    color: #dc2626;
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

/* Update sidebar position to account for navbar */
.sidebar {
    top: 70px; /* Height of navbar */
    height: calc(100vh - 70px);
    z-index: 99;
}

/* Update main content to account for navbar */
.main-content {
    margin-top: 70px;
}

@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-content {
        padding: 0 1rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .search-container {
        display: none;
    }
    
    .notification-dropdown-content {
        width: 280px;
        right: -1rem;
    }
    
    .user-dropdown-content {
        width: 250px;
        right: -1rem;
    }
    
    .user-name-short {
        display: none;
    }
}

/* Overlay for mobile */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}