.app-header .workspace-switcher {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 280px;
}

.app-header .workspace-switcher__toggle {
    width: 100%;
    min-width: 0;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .25rem .65rem;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
}

.app-header .workspace-switcher__toggle:hover,
.app-header .workspace-switcher__toggle:focus {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .28);
}

.app-header .workspace-switcher__current {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.app-header .workspace-switcher__current-icon,
.app-header .workspace-switcher__item-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
}

.app-header .workspace-switcher__current-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
    font-weight: 600;
}

.app-header .workspace-switcher__caret {
    flex: 0 0 auto;
    font-size: .8rem;
    opacity: .9;
}

.app-header .workspace-switcher__menu {
    width: 360px;
    max-width: calc(100vw - 1.5rem);
    padding: .5rem;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
}

.app-header .workspace-switcher__menu form {
    margin: 0;
}

.app-header .workspace-switcher__item {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 12px;
    white-space: normal;
}

.app-header .workspace-switcher__item:hover,
.app-header .workspace-switcher__item:focus {
    background: #f3f7ff;
}

.app-header .workspace-switcher__item--current,
.app-header .workspace-switcher__item--current:disabled {
    color: #0f172a;
    background: #eaf3ff;
    opacity: 1;
}

.app-header .workspace-switcher__item-body {
    min-width: 0;
    flex: 1 1 auto;
}

.app-header .workspace-switcher__item-name,
.app-header .workspace-switcher__item-desc {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-header .workspace-switcher__item-name {
    font-weight: 600;
    color: #0f172a;
}

.app-header .workspace-switcher__item-desc {
    font-size: .82rem;
    color: #64748b;
}

.app-header .workspace-switcher__check {
    color: var(--app-brand, #007ec7);
    font-size: 1.1rem;
}

.app-header .workspace-switcher__manage {
    display: flex;
    align-items: center;
    gap: .5rem;
    border-radius: 10px;
    font-weight: 600;
}

.app-header .workspace-switcher__icon--sales,
.app-header .workspace-switcher__icon--customer-service,
.app-header .workspace-switcher__icon--marketing,
.app-header .workspace-switcher__icon--call-center,
.app-header .workspace-switcher__icon--branch,
.app-header .workspace-switcher__icon--department,
.app-header .workspace-switcher__icon--team,
.app-header .workspace-switcher__icon--other {
    color: #fff;
}

.app-header .workspace-switcher__icon--sales { background: #2563eb; }
.app-header .workspace-switcher__icon--customer-service { background: #7c3aed; }
.app-header .workspace-switcher__icon--marketing { background: #f97316; }
.app-header .workspace-switcher__icon--call-center { background: #0d9488; }
.app-header .workspace-switcher__icon--branch { background: #dc2626; }
.app-header .workspace-switcher__icon--department { background: #64748b; }
.app-header .workspace-switcher__icon--team { background: #16a34a; }
.app-header .workspace-switcher__icon--other { background: #475569; }

.app-header .workspace-switcher__item.is-loading {
    pointer-events: none;
    opacity: .72;
}

@media (max-width: 767.98px) {
    .app-header .workspace-switcher {
        max-width: 100%;
    }

    .app-header .workspace-switcher__toggle {
        padding-inline: .45rem;
        gap: .35rem;
    }

    .app-header .workspace-switcher__current-icon {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .app-header .workspace-switcher__menu {
        position: fixed !important;
        top: calc(var(--app-header-height) + .25rem) !important;
        right: .75rem !important;
        bottom: auto !important;
        left: .75rem !important;
        width: auto;
        max-height: calc(100dvh - var(--app-header-height) - 1rem);
        overflow-y: auto;
        transform: none !important;
    }
}

@media (max-width: 399.98px) {
    .app-header .workspace-switcher {
        flex: 0 0 36px;
        max-width: 36px;
        margin-right: 0 !important;
    }

    .app-header .workspace-switcher__toggle {
        width: 36px;
        padding: .25rem;
        justify-content: center;
    }

    .app-header .workspace-switcher__current {
        flex: 0 0 26px;
        gap: 0 !important;
    }

    .app-header .workspace-switcher__current-text,
    .app-header .workspace-switcher__caret {
        display: none;
    }
}
