.header {
    width: 100%;
    height: 64px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    &.scrolled {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    &-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 24px;
    }

    // Logo 区域
    &-logo-section {
        display: flex;
        align-items: center;
        cursor: pointer;
        gap: 12px;
        transition: all 0.2s ease;

        &:hover {
            transform: translateX(2px);
        }

        .logo-gradient {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #1D4ED8 0%, #172554 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 6px -1px rgba(29, 78, 216, 0.2);
        }

        .logo-text-section {
            display: flex;
            flex-direction: column;
            gap: 2px;

            .logo-title {
                font-size: 18px;
                font-weight: 700;
                color: #1F2937;
                margin: 0;
            }

            .logo-subtitle {
                font-size: 10px;
                font-weight: 600;
                color: #2563EB;
                text-transform: uppercase;
                letter-spacing: 0.1em;
                margin: 0;
            }
        }
    }

    // 右侧功能区
    &-right {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-left: auto;
    }

    // 搜索框
    .header-search {
        position: relative;
        width: 512px;
        max-width: 100%;

        .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 20px;
            color: #9CA3AF;
            pointer-events: none;
        }

        .search-input {
            width: 100%;
            height: 40px;
            padding: 0 16px 0 48px;
            background: rgba(243, 244, 246, 0.8);
            border: 1px solid transparent;
            border-radius: 9999px;
            font-size: 14px;
            color: #1F2937;
            outline: none;
            transition: all 0.2s ease;

            &::placeholder {
                color: #9CA3AF;
            }

            &:focus {
                background: rgba(255, 255, 255, 1);
                border-color: #3B82F6;
                box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            }

            &:hover {
                background: rgba(243, 244, 246, 1);
            }
        }
    }

    // 安全状态指示器
    .security-status {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(243, 244, 246, 0.8);
        border-radius: 9999px;
        font-size: 12px;
        color: #6B7280;
        font-weight: 500;
        cursor: default;
        transition: all 0.2s ease;

        &:hover {
            background: rgba(243, 244, 246, 1);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #10B981;
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
    }

    // 通知按钮
    .notification-btn {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6B7280;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;

        &:hover {
            background: rgba(243, 244, 246, 0.8);
            color: #1D4ED8;
        }

        .iconify {
            font-size: 24px;
        }

        .notification-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 10px;
            height: 10px;
            background: #EF4444;
            border-radius: 50%;
            border: 2px solid #FFFFFF;
            animation: bounce 1s infinite;
        }
    }

    // 用户下拉菜单
    .user-dropdown-wrapper {
        position: relative;
    }

    .user-section {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 12px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        background: transparent;
        border: none;

        &:hover {
            background: rgba(243, 244, 246, 0.8);
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #E5E7EB;
            border: 2px solid transparent;
            overflow: hidden;
            transition: all 0.2s ease;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        &:hover .user-avatar {
            border-color: #1D4ED8;
        }

        .user-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: left;
            min-width: 80px;

            .user-name {
                font-size: 14px;
                font-weight: 600;
                color: #374151;
                transition: color 0.2s ease;
                white-space: nowrap;
            }

            &:hover .user-name {
                color: #1D4ED8;
            }

            .user-dept {
                font-size: 12px;
                color: #9CA3AF;
                white-space: nowrap;
            }
        }

        .user-dropdown-icon {
            font-size: 18px;
            color: #9CA3AF;
            transition: color 0.2s ease;
        }
    }

    .user-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 200px;
        background: #FFFFFF;
        border-radius: 12px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        border: 1px solid #E5E7EB;
        padding: 8px;
        z-index: 1000;
        animation: dropdownSlide 0.2s ease;

        .user-dropdown-header {
            padding: 12px 16px;
            border-bottom: 1px solid #F3F4F6;
            margin-bottom: 8px;

            .user-dropdown-name {
                font-size: 14px;
                font-weight: 600;
                color: #1F2937;
                margin-bottom: 4px;
            }

            .user-dropdown-dept {
                font-size: 12px;
                color: #6B7280;
            }
        }

        .user-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            width: 100%;
            background: transparent;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
            font-size: 14px;
            color: #374151;

            &:hover {
                background: #F3F4F6;
                color: #1D4ED8;

                .iconify {
                    color: #1D4ED8;
                }
            }

            &.danger {
                color: #EF4444;

                &:hover {
                    background: #FEF2F2;
                }

                .iconify {
                    color: #EF4444;
                }
            }

            &.divider {
                height: 1px;
                background: #E5E7EB;
                margin: 8px 0;
                padding: 0;
                cursor: default;

                &:hover {
                    background: #E5E7EB;
                }
            }

            .iconify {
                font-size: 18px;
                color: #6B7280;
                transition: color 0.2s ease;
            }
        }
    }
}

// 动画
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

// 响应式
@media (max-width: 1024px) {
    .header {
        padding: 0 16px;

        .user-info {
            display: none;
        }
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 12px;

        .security-status span {
            display: none;
        }

        .notification-btn {
            width: 36px;
            height: 36px;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
        }
    }
}
