
.workspace-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    margin-bottom: 12px;
    min-height: 0;
}

.workspace-topbar-copy,
.page-header-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}

.workspace-topbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.surface-switcher {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.surface-switcher-item {
    display: contents;
}

.surface-switcher-logout {
    margin: 0;
}

.surface-switcher-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--zn-border);
    background: var(--zn-bg-surface-raised);
    color: var(--zn-text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.surface-switcher-link.is-active {
    border-color: var(--zn-accent-border);
    background: var(--zn-accent-surface);
    color: var(--zn-accent-text);
}

.surface-switcher-button {
    font: inherit;
    cursor: pointer;
}

.surface-switcher-logout-button {
    width: 36px;
    min-width: 36px;
    min-height: 34px;
    padding: 0;
}

.surface-switcher-logout-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.surface-switcher-dashboard {
    gap: 8px;
    flex-wrap: nowrap;
}

.surface-switcher-dashboard .surface-switcher-link {
    position: relative;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 14px;
}

.surface-switcher-dashboard .surface-switcher-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
}

.surface-switcher-dashboard .surface-switcher-label {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    z-index: 40;
    width: max-content;
    max-width: 160px;
    padding: 6px 9px;
    border: 1px solid var(--zn-border);
    border-radius: 999px;
    background: var(--zn-bg-panel);
    color: var(--zn-text-primary);
    box-shadow: var(--zn-shadow-soft);
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.surface-switcher-dashboard .surface-switcher-link:hover .surface-switcher-label,
.surface-switcher-dashboard .surface-switcher-link:focus-visible .surface-switcher-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

.admin-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--zn-border-soft) 70%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--zn-bg-surface-raised) 52%, transparent);
}

.admin-top-action,
.admin-top-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--zn-text-secondary);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 620;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.admin-top-action {
    gap: 6px;
}

.admin-top-action-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-warning) 14%, var(--zn-bg-surface-raised));
    color: var(--zn-warning-text);
    font-size: 0.62rem;
    font-weight: 720;
}

.admin-top-action:hover,
.admin-top-action:focus-visible,
.admin-top-action-button:hover,
.admin-top-action-button:focus-visible {
    background: var(--zn-bg-surface-hover);
    color: var(--zn-text-primary);
}

.admin-top-action-form {
    margin: 0;
}

.admin-top-action-button {
    color: var(--zn-text-muted);
}

.workspace-topbar-actions .workspace-user-chip {
    display: none;
}
