.teams-rail {
    --teams-rail-width: 68px;
    --teams-rail-width-expanded: 210px;
    --teams-purple: #6264A7;
    --teams-purple-dark: #464775;
    --teams-hover: #E8EBFA;
    --teams-active: #F4F6FD;
    position: relative;
    display: flex;
    flex-direction: column;
    width: var(--teams-rail-width);
    background: #FFFFFF;
    border-right: 1px solid rgba(0,0,0,.08);
    padding: .5rem .35rem;
    gap: .75rem;
    box-shadow: 0 0 4px rgba(0,0,0,.08);
    transition: width .22s cubic-bezier(.4,0,.2,1);
    overflow: auto;
}

    .teams-rail.expanded {
        width: var(--teams-rail-width-expanded);
    }

.rail-top, .rail-bottom {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.rail-bottom {
    margin-top: auto;
}

.rail-logo {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--teams-purple);
}

.rail-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    border: none;
    background: transparent;
    color: #444;
    font: inherit;
    cursor: pointer;
    border-radius: 8px;
    height: 48px;
    padding: 0 .65rem;
    text-align: left;
    transition: background .18s, color .18s;
}

.teams-rail.compact .rail-btn {
    justify-content: center;
    padding: 0;
}

.rail-btn:hover {
    background: var(--teams-hover);
}

.rail-btn.active {
    background: var(--teams-active);
    color: var(--teams-purple);
    font-weight: 600;
}

.rail-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.rail-btn .mud-icon-root {
    font-size: 24px;
}

.active-bar {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 3px;
    background: var(--teams-purple);
    transform: scaleY(0);
    opacity: 0;
    transition: transform .25s, opacity .25s;
}

.rail-btn.active .active-bar {
    transform: scaleY(1);
    opacity: 1;
}

.label {
    flex: 1;
    white-space: nowrap;
    font-size: .85rem;
}

.badge {
    font-size: .65rem;
    background: var(--teams-purple);
    color: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    line-height: 1;
    font-weight: 600;
}

    .badge.info {
        background: var(--teams-purple);
    }

    .badge.danger {
        background: #d13438;
    }

    .badge.success {
        background: #107c10;
    }

.rail-btn.toggle {
    background: var(--teams-hover);
}

    .rail-btn.toggle:hover {
        background: var(--teams-active);
    }

@media (max-width: 820px) {
    .teams-rail {
        width: 56px;
    }

        .teams-rail.expanded {
            width: 180px;
        }
}
