.app-header {
    height: var(--header-height);
    flex: none;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 clamp(16px, 3vw, 32px);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.header-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    align-items: center;
    justify-content: center;
    flex: none;
}

.header-menu-btn svg { width: 18px; height: 18px; }

.header-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.header-identity .app-name {
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-identity .app-meta {
    font-size: 11.5px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-width: 0;
    overflow: hidden;
}

.header-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.header-stat svg {
    width: 14px;
    height: 14px;
    color: var(--text-faint);
    flex: none;
}

.header-stat strong {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.header-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 6px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.header-account .avatar-glyph {
    width: 30px;
    height: 30px;
}

.header-account .account-email {
    font-size: 12.5px;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account .account-role {
    font-size: 10.5px;
    color: var(--text-faint);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.lang-switch-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-faint);
    cursor: pointer;
    user-select: none;
}

.lang-switch-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.lang-switch-option:has(input:checked) {
    background: var(--accent-green-10);
    color: var(--accent-green);
}

@media (max-width: 1200px) {
    .header-center { display: none; }
}

@media (max-width: 900px) {
    .header-menu-btn { display: inline-flex; }
    .header-account .account-email,
    .header-account .account-role { display: none; }
}
