.fi-topbar:has(.environment-badge) {
    background: #dc2626;
    border-bottom-color: #991b1b;
    box-shadow: 0 1px 0 rgba(127, 29, 29, 0.5);
}

.fi-topbar:has(.environment-badge) .fi-logo,
.fi-topbar:has(.environment-badge) .fi-topbar-item,
.fi-topbar:has(.environment-badge) .fi-icon-btn,
.fi-topbar:has(.environment-badge) .fi-icon {
    color: #fff;
}

.fi-topbar:has(.environment-badge) .fi-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* User menu dropdown is rendered inside .fi-topbar — exclude it from the white override
   so theme-switcher icons (sun/moon/monitor) remain visible on the white dropdown bg */
.fi-topbar:has(.environment-badge) .fi-dropdown-panel .fi-icon-btn,
.fi-topbar:has(.environment-badge) .fi-dropdown-panel .fi-icon {
    color: unset;
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    height: 1.75rem;
    margin-inline-end: 0.75rem;
    padding: 0 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 0.375rem;
    background: #fff;
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.environment-badge--danger {
    background: #fff;
    color: #b91c1c;
}

.environment-badge--gray {
    background: #fff;
    color: #374151;
}

.environment-badge--success {
    background: #fff;
    color: #047857;
}

.environment-badge--warning {
    background: #fff;
    color: #92400e;
}
