/* ============================================
   NEXUS HEADER - Futuristic Top Bar
   ============================================ */

.nexus-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 80px;
    background: var(--nexus-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nexus-glass-border);
    z-index: 90;
    display: flex;
    align-items: center;
    padding: 0 var(--nexus-space-xl);
    transition: all var(--nexus-transition-base);
}

.nexus-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--nexus-primary),
        var(--nexus-accent),
        transparent
    );
    opacity: 0.5;
}

/* Breadcrumb */
.nexus-breadcrumb {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--nexus-space-xs);
}

.nexus-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--nexus-text-primary);
    background: linear-gradient(135deg, #ffffff, var(--nexus-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.nexus-breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: var(--nexus-space-sm);
    font-size: 13px;
    color: var(--nexus-text-tertiary);
}

.nexus-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--nexus-space-sm);
    transition: color var(--nexus-transition-fast);
}

.nexus-breadcrumb-item:hover {
    color: var(--nexus-text-secondary);
}

.nexus-breadcrumb-separator {
    font-size: 10px;
    color: var(--nexus-text-muted);
}

/* Actions */
.nexus-header-actions {
    display: flex;
    align-items: center;
    gap: var(--nexus-space-md);
}

/* Search */
.nexus-search {
    position: relative;
    width: 320px;
}

.nexus-search-input {
    width: 100%;
    height: 44px;
    padding: 0 var(--nexus-space-lg) 0 44px;
    background: var(--nexus-glass);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--nexus-radius-full);
    color: var(--nexus-text-primary);
    font-size: 14px;
    transition: all var(--nexus-transition-base);
}

.nexus-search-input::placeholder {
    color: var(--nexus-text-muted);
}

.nexus-search-input:focus {
    outline: none;
    background: var(--nexus-glass-hover);
    border-color: var(--nexus-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--nexus-glow-primary);
}

.nexus-search-icon {
    position: absolute;
    left: var(--nexus-space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--nexus-text-tertiary);
    font-size: 16px;
    pointer-events: none;
}

/* Quick Actions */
.nexus-quick-action {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nexus-glass);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--nexus-radius-md);
    color: var(--nexus-text-secondary);
    cursor: pointer;
    transition: all var(--nexus-transition-base);
}

.nexus-quick-action:hover {
    background: var(--nexus-glass-hover);
    color: var(--nexus-text-primary);
    transform: scale(1.05);
}

.nexus-quick-action-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: linear-gradient(135deg, var(--nexus-accent), var(--nexus-danger));
    border: 2px solid var(--nexus-bg-primary);
    border-radius: var(--nexus-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notifications Dropdown */
.nexus-dropdown {
    position: relative;
}

.nexus-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--nexus-space-md));
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--nexus-bg-elevated);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--nexus-radius-lg);
    box-shadow: var(--nexus-shadow-xl);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all var(--nexus-transition-base);
    z-index: 1000;
}

.nexus-dropdown.open .nexus-dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.nexus-dropdown-header {
    padding: var(--nexus-space-lg);
    border-bottom: 1px solid var(--nexus-glass-border);
}

.nexus-dropdown-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--nexus-text-primary);
}

.nexus-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

.nexus-notification-item {
    padding: var(--nexus-space-md) var(--nexus-space-lg);
    border-bottom: 1px solid var(--nexus-glass-border);
    cursor: pointer;
    transition: all var(--nexus-transition-fast);
}

.nexus-notification-item:hover {
    background: var(--nexus-glass);
}

.nexus-notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.nexus-notification-content {
    display: flex;
    gap: var(--nexus-space-md);
}

.nexus-notification-icon {
    width: auto;
    height: auto;
    border-radius: var(--nexus-radius-md);
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: none;
}

.nexus-notification-icon img {
    width: 36px;
    height: 36px;
    border-radius: var(--nexus-radius-sm);
    border: 2px solid #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.nexus-notification-text {
    flex: 1;
}

.nexus-notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nexus-text-primary);
    margin-bottom: 4px;
}

.nexus-notification-message {
    font-size: 13px;
    color: var(--nexus-text-secondary);
    line-height: 1.4;
}

.nexus-notification-time {
    font-size: 11px;
    color: var(--nexus-text-tertiary);
    margin-top: 4px;
}

/* User Profile Button */
.nexus-user-button {
    display: flex;
    align-items: center;
    gap: var(--nexus-space-md);
    padding: var(--nexus-space-sm) var(--nexus-space-sm) var(--nexus-space-sm) var(--nexus-space-md);
    background: var(--nexus-glass);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--nexus-radius-full);
    cursor: pointer;
    transition: all var(--nexus-transition-base);
}

.nexus-user-button:hover {
    background: var(--nexus-glass-hover);
    transform: scale(1.02);
}

.nexus-user-button-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.nexus-user-button-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--nexus-text-primary);
}

.nexus-user-button-role {
    font-size: 11px;
    color: var(--nexus-text-tertiary);
}

.nexus-user-button-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--nexus-radius-full);
    background: linear-gradient(135deg, var(--nexus-primary), var(--nexus-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    border: 2px solid var(--nexus-glass-border);
}

/* User Dropdown Menu */
.nexus-user-dropdown-menu {
    width: 240px;
}

.nexus-user-menu-item {
    padding: var(--nexus-space-md) var(--nexus-space-lg);
    display: flex;
    align-items: center;
    gap: var(--nexus-space-md);
    color: var(--nexus-text-secondary);
    text-decoration: none;
    transition: all var(--nexus-transition-fast);
    cursor: pointer;
}

.nexus-user-menu-item:hover {
    background: var(--nexus-glass);
    color: var(--nexus-text-primary);
}

.nexus-user-menu-item.danger {
    color: var(--nexus-danger);
}

.nexus-user-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.nexus-user-menu-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nexus-user-menu-divider {
    height: 1px;
    background: var(--nexus-glass-border);
    margin: var(--nexus-space-sm) 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .nexus-header {
        left: 0;
        padding-left: 72px;
    }
}

@media (max-width: 768px) {
    .nexus-header {
        height: 64px;
        padding: 0 var(--nexus-space-lg) 0 64px;
    }
    
    .nexus-page-title {
        font-size: 18px;
    }
    
    .nexus-breadcrumb-trail {
        display: none;
    }
    
    .nexus-search {
        width: 200px;
    }
    
    .nexus-user-button-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .nexus-header-actions {
        gap: var(--nexus-space-sm);
    }
    
    .nexus-search {
        display: none;
    }
    
    .nexus-quick-action {
        width: 40px;
        height: 40px;
    }
}

