.ai-floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 1800;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    transform: translateY(-50%);
}

.ai-floating-sidebar__panel {
    position: absolute;
    top: 48px;
    right: 60px;
    width: clamp(280px, 20vw, 360px);
    overflow: hidden;
    border-radius: 16px 0 0 16px;
    background: #fff;
    box-shadow: 0 28px 58px rgba(24, 36, 63, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity .18s ease, transform .18s ease;
}

.ai-floating-sidebar--open .ai-floating-sidebar__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.ai-floating-sidebar__panel-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    background: #1673ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

.ai-floating-sidebar__panel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 24px 22px 28px;
}

.ai-floating-sidebar__qr {
    display: block;
    width: clamp(168px, 11vw, 210px);
    height: clamp(168px, 11vw, 210px);
    object-fit: cover;
}

.ai-floating-sidebar__qr-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    color: #727987;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.ai-floating-sidebar__qr-tip img {
    display: block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.ai-floating-sidebar__bar {
    width: 60px;
    overflow: hidden;
    border: 1px solid #e6eaf1;
    border-right: 0;
    border-radius: 16px 0 0 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.12);
    transition: transform .2s ease;
}

.ai-floating-sidebar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-height: 112px;
    padding: 14px 0 12px;
    border: 0;
    border-bottom: 1px solid #e6eaf1;
    background: #fff;
    color: #202938;
    font: 500 12px/1 "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}

.ai-floating-sidebar__item--customer {
    background: #1673ff;
    color: #fff;
    font-weight: 600;
}

.ai-floating-sidebar__item:hover,
.ai-floating-sidebar__item:focus {
    background: #f4f8ff;
    color: #1673ff;
}

.ai-floating-sidebar__item--customer:hover,
.ai-floating-sidebar__item--customer:focus {
    background: #1673ff;
    color: #fff;
}

.ai-floating-sidebar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-bottom: 8px;
}

.ai-floating-sidebar__icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.ai-floating-sidebar__text {
    display: block;
    height: 50px;
    letter-spacing: 0;
    text-align: center;
    text-orientation: upright;
    writing-mode: vertical-rl;
}

.ai-floating-sidebar__collapse {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #98a1af;
    font: 500 12px/16px "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer;
    outline: none;
}

.ai-floating-sidebar__collapse:hover,
.ai-floating-sidebar__collapse:focus {
    color: #1673ff;
}

.ai-floating-sidebar__collapse-arrow {
    margin-bottom: 4px;
    color: #b4bdca;
    font-size: 24px;
    font-family: Arial, sans-serif;
    font-weight: 300;
    line-height: 18px;
}

.ai-floating-sidebar--collapsed .ai-floating-sidebar__panel {
    display: none;
}

.ai-floating-sidebar--collapsed .ai-floating-sidebar__bar {
    transform: translateX(60px);
}

.ai-floating-sidebar__expand {
    position: absolute;
    top: 50%;
    right: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 72px;
    padding: 0;
    border: 1px solid #e6eaf1;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #fff;
    color: #98a1af;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.12);
    cursor: pointer;
    transform: translateY(-50%);
}

.ai-floating-sidebar__expand:hover,
.ai-floating-sidebar__expand:focus {
    color: #1673ff;
}

.ai-floating-sidebar--collapsed .ai-floating-sidebar__expand {
    display: flex;
}

@media (max-width: 1280px) {
    .ai-floating-sidebar__panel {
        top: 44px;
        right: 56px;
        width: 300px;
    }

    .ai-floating-sidebar__panel-title {
        height: 48px;
        font-size: 15px;
    }

    .ai-floating-sidebar__panel-body {
        min-height: 220px;
        padding: 22px 20px 26px;
    }

    .ai-floating-sidebar__qr {
        width: 168px;
        height: 168px;
    }

    .ai-floating-sidebar__qr-tip {
        margin-top: 12px;
        font-size: 13px;
        line-height: 20px;
    }

    .ai-floating-sidebar__bar,
    .ai-floating-sidebar__item,
    .ai-floating-sidebar__collapse {
        width: 56px;
    }

    .ai-floating-sidebar__item {
        min-height: 106px;
        font-size: 12px;
        padding-top: 12px;
    }

    .ai-floating-sidebar__icon,
    .ai-floating-sidebar__icon svg {
        width: 20px;
        height: 20px;
    }

    .ai-floating-sidebar__text {
        height: 50px;
    }

    .ai-floating-sidebar__collapse {
        height: 58px;
        font-size: 12px;
    }

    .ai-floating-sidebar--collapsed .ai-floating-sidebar__bar {
        transform: translateX(56px);
    }
}

@media (max-width: 768px) {
    .ai-floating-sidebar {
        display: none;
    }
}
