.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: var(--color-panel);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header-left,
.site-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.site-brand-mark {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sidebar-toggle,
.header-action {
    background: var(--color-panel-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-toggle:hover,
.header-action:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-panel-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
}

.user-name {
    white-space: nowrap;
}

.user-avatar,
.user-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 34px;
}

.user-avatar {
    object-fit: cover;
    background: var(--color-panel);
    border: 1px solid var(--color-border);
}

.user-avatar-fallback {
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 700;
}

/* Status Message */

.global-status-messages {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: min(92vw, 520px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.status-message {
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    padding-bottom: 6px;
    background: var(--status-bg);
    color: var(--status-text);
    border: 1px solid var(--status-border);
    border-radius: var(--radius-md);
    box-shadow:
        0 10px 24px var(--status-shadow),
        0 0 0 1px var(--status-highlight) inset;
    transform: translateY(-20px);
    opacity: 0;
    animation: statusSlideDown 0.22s ease-out forwards;
}

.status-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--status-timer-bar);
    opacity: 0.7;
    pointer-events: none;
}

.status-message.closing {
    animation: statusSlideUp 0.18s ease-in forwards;
}

.status-message-inner {
    position: relative;
    padding: 14px 44px 14px 16px;
    z-index: 2;
}

.status-message-text {
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.status-message-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--status-close);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
    z-index: 3;
}

.status-message-close:hover {
    background: var(--status-close-hover-bg);
    color: var(--status-close-hover-text);
}

.status-message-timer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--status-timer-track);
    overflow: hidden;
    z-index: 1;
}

.status-message-timer-bar {
    width: 100%;
    height: 100%;
    background: var(--status-timer-bar);
    transform-origin: left center;
    transform: scaleX(1);
}

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

@keyframes statusSlideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-12px);
        opacity: 0;
    }
}
/* End STatus Message */
