.header {
    background: #fff;
    padding: 20px 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box:focus {
    outline: none;
    border-color: var(--primaryColor);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-profile:hover {
    background: #f8fafc;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primaryColor) 0%, var(--accentColor) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}


@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: #64748b;
    pointer-events: none;
}

/* User Profile */
.user-profile-container {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.user-profile:hover {
    background: #f8fafc;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primaryColor) 0%, var(--accentColor) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondaryColor);
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
}

.user-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    animation: pulse 2s infinite;
}

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

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

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

.dropdown-arrow {
    transition: transform 0.2s ease;
    color: #64748b;
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    z-index: 1000;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primaryColor) 0%, var(--accentColor) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondaryColor);
    font-weight: 600;
    font-size: 0.875rem;
}

.dropdown-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

.dropdown-email {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primaryColor);
}

.dropdown-item.logout-item {
    color: #dc2626;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    border: 2px solid #ffffff;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: #f8fafc;
    color: var(--primaryColor);
}

/* Action Buttons */
.action-button {
    padding: 0.5rem 1rem;
    background: var(--primaryColor);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background: var(--accentColor);
    transform: translateY(-1px);
}

.action-button.secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.action-button.secondary:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.mobile-menu-button:hover {
    background: #f8fafc;
    color: var(--primaryColor);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.25rem;
    }

    .search-box {
        width: 180px;
    }

    .user-info {
        display: none;
    }

    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-actions {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .search-box {
        width: 150px;
        padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    }

    .search-icon {
        left: 0.5rem;
    }

    .user-dropdown {
        min-width: 200px;
        right: -0.5rem;
    }
}

@media (max-width: 480px) {
    .search-box {
        display: none;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .dropdown-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header {
        background: #1e293b;
        border-bottom-color: #334155;
    }

    .header-title {
        color: #f1f5f9;
    }

    .search-box {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }

    .search-box:focus {
        border-color: #60a5fa;
        background: #475569;
    }

    .search-icon {
        color: #94a3b8;
    }

    .user-profile:hover {
        background: #334155;
    }

    .user-name {
        color: #f1f5f9;
    }

    .user-role {
        color: #94a3b8;
    }

    .user-dropdown {
        background: #1e293b;
        border-color: #334155;
    }

    .dropdown-header {
        background: #334155;
    }

    .dropdown-name {
        color: #f1f5f9;
    }

    .dropdown-email {
        color: #94a3b8;
    }

    .dropdown-divider {
        background: #334155;
    }

    .dropdown-item {
        color: #cbd5e1;
    }

    .dropdown-item:hover {
        background: #334155;
        color: #60a5fa;
    }

    .theme-toggle {
        color: #94a3b8;
    }

    .theme-toggle:hover {
        background: #334155;
        color: #60a5fa;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .header {
        border-bottom-width: 2px;
    }

    .search-box {
        border-width: 2px;
    }

    .user-dropdown {
        border-width: 2px;
    }

    .dropdown-divider {
        height: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .user-status-indicator {
        animation: none;
    }

    .user-dropdown {
        animation: none;
    }

    .dropdown-arrow {
        transition: none;
    }

    .dropdown-item {
        transition: none;
    }

    .action-button {
        transition: none;
    }

    .theme-toggle {
        transition: none;
    }

    .mobile-menu-button {
        transition: none;
    }
}