.dashboard .key_business_indicators #statistics-sales .statistics-sales-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    left: 30px;
    right: auto;
    top: 92px;
}

#statistics-sales .statistics-sales-legend .series-key {
    display: inline-block;
    height: 8px;
    margin-left: 8px;
    width: 12px;
}

#statistics-sales .statistics-sales-legend .series-key:first-child {
    margin-left: 0;
}

#statistics-sales .statistics-sales-legend .series-key.retail {
    background: #3d3d59;
}

#statistics-sales .statistics-sales-legend .series-key.online {
    background: #93a7d6;
}

#statistics-sales .statistics-sales-legend .series-key.forecast {
    background: #ff6262;
}

.dashboard .key_business_indicators #statistics-cpi h4 {
    max-width: calc(100% - 210px);
}

.statistics-cpi-filter {
    position: absolute;
    right: 10px;
    top: 8px;
    z-index: 12;
}

.statistics-cpi-filter-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    color: #343434;
    cursor: pointer;
    display: flex;
    font-family: inherit;
    font-size: 13px;
    height: 36px;
    justify-content: space-between;
    min-width: 180px;
    padding: 0 34px 0 13px;
    text-align: left;
}

.statistics-cpi-filter-toggle::after {
    border-color: #777 transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0;
    content: '';
    margin-top: 3px;
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
}

.statistics-cpi-filter-toggle:focus-visible,
.statistics-cpi-filter-panel input:focus-visible + span {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.statistics-cpi-filter-panel {
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
    max-height: 330px;
    overflow: auto;
    padding: 14px;
    position: absolute;
    right: 0;
    top: 42px;
    width: 440px;
}

.statistics-cpi-filter-panel[hidden] {
    display: none;
}

.statistics-cpi-filter-panel label {
    align-items: center;
    color: #4a4a4a;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    gap: 6px;
    min-height: 26px;
}

.statistics-cpi-filter-panel label.all {
    border-bottom: 1px solid #ececec;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.statistics-cpi-filter-items {
    display: grid;
    gap: 5px 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.statistics-cpi-filter-panel input {
    accent-color: #333;
}

.statistics-cpi-filter-panel input:disabled + * {
    opacity: .45;
}

#statistics-cpi .statistics-cpi-empty {
    color: #777;
    left: 50%;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media screen and (max-width: 1024px) {
    .statistics-cpi-filter-panel {
        width: 390px;
    }
}

@media screen and (max-width: 640px) {
    .dashboard .key_business_indicators #statistics-sales .statistics-sales-legend {
        gap: 5px 7px;
        left: 16px;
        right: 16px;
        top: 103px;
    }

    #statistics-sales .statistics-sales-legend .series-key {
        height: 7px;
        margin-left: 3px;
        width: 9px;
    }

    #statistics-sales .statistics-sales-legend span {
        font-size: 10px;
        margin-left: 0;
    }

    .dashboard .key_business_indicators #statistics-cpi h4 {
        max-width: none;
    }

    .statistics-cpi-filter {
        left: auto;
        right: 8px;
        top: 8px;
    }

    .statistics-cpi-filter-toggle {
        font-size: 11px;
        height: 30px;
        min-width: 110px;
        padding: 0 22px 0 8px;
        width: 110px;
    }

    .statistics-cpi-filter-panel {
        box-sizing: border-box;
        left: auto;
        max-height: 310px;
        right: 0;
        width: calc(100vw - 80px);
        max-width: 390px;
    }

    .statistics-cpi-filter-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}
