/* ==========================================================================
   1. Р СџР вЂўР В Р вЂўР СљР вЂўР СњР СњР В«Р вЂў Р В Р вЂР С’Р вЂ”Р С›Р вЂ™Р С’Р Р‡ Р С™Р С›Р СљР СџР С›Р СњР С›Р вЂ™Р С™Р С’
   ========================================================================== */
:root {
    --primary: #ff6d00;
    --primary-orange: #ff6d00;
    --border-color: #e2e8f0;
    --bg-page: #f2f2f2;
    --bg-workspace: #ffffff;
    --text-main: #2d2d2d;
    --grey-light: #c6c6c6;
    --grey-dark: #4b4b4b;
    --bg-input: #f2f2f2;
    
    --sidebar-width: 265px;
    --sidebar-collapsed-width: 105px; /* РЎСѓР·РєРёР№ СЂРµР¶РёРј СЃР°Р№РґР±Р°СЂР° */
    --sidebar-transition: 0s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
}

.page-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-color: var(--bg-page);
}

/* ==========================================================================
   2. Р РЋР С’Р в„ўР вЂќР вЂР С’Р В  Р В Р С™Р СњР С›Р СџР С™Р С’ Р Р€Р СџР В Р С’Р вЂ™Р вЂєР вЂўР СњР ВР Р‡
   ========================================================================== */
.sidebar-container {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: #fff;
    transition: width var(--sidebar-transition);
    position: relative;
    z-index: 10;
    overflow: hidden; /* Р В§РЎвЂљР С•Р В±РЎвЂ№ Р С”Р С•Р Р…РЎвЂљР ВµР Р…РЎвЂљ РЎРѓР В°Р в„–Р Т‘Р В±Р В°РЎР‚Р В° Р Р…Р Вµ Р Р†РЎвЂ№Р В»Р ВµР В·Р В°Р В» Р С—РЎР‚Р С‘ РЎРѓР С”РЎР‚РЎвЂ№РЎвЂљР С‘Р С‘ */
}

.sidebar-container.collapsed {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-is-collapsed .sidebar-container {
    width: var(--sidebar-collapsed-width);
}

.btn-expand-sidebar {
    position: fixed;
    left: calc(var(--sidebar-collapsed-width) - 17px);
    top: calc(var(--header-height, 70px) + 44px);
    z-index: 1200;
    width: 34px;
    height: 34px;
    background: #ffffff;
    color: #2c2c2c;
    border: 1px solid #e7e7e7;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.btn-expand-sidebar svg {
    width: 16px;
    height: 18px;
    display: block;
    transform: rotate(180deg);
}

.btn-expand-sidebar:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.btn-expand-sidebar.hidden { display: none !important; }

/* ==========================================================================
   3. Р С›Р РЋР СњР С›Р вЂ™Р СњР С›Р в„ў Р С™Р С›Р СњР СћР вЂўР СњР Сћ (Р РЋР С™Р В Р Р€Р вЂњР вЂєР вЂўР СњР ВР вЂў Р В Р С›Р СћР РЋР СћР Р€Р СџР В«)
   ========================================================================== */
.main-content {
    flex-grow: 1; /* Р С™Р вЂєР В®Р В§Р вЂўР вЂ™Р С›Р вЂў: Р В Р В°РЎРѓРЎвЂљРЎРЏР С–Р С‘Р Р†Р В°Р ВµРЎвЂљРЎРѓРЎРЏ Р Р…Р В° Р Р†РЎРѓРЎвЂ РЎРѓР Р†Р С•Р В±Р С•Р Т‘Р Р…Р С•Р Вµ Р С—РЎР‚Р С•РЎРѓРЎвЂљРЎР‚Р В°Р Р…РЎРѓРЎвЂљР Р†Р С• */
    min-width: 0;
    background-color: var(--bg-workspace);
    margin-top: 60px; 
    
    border-radius: 60px 0 0 0; 
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    
    transition: all var(--sidebar-transition);
    box-shadow: -10px 0 30px rgba(0,0,0,0.02);
}

/* ==========================================================================
   4. Р вЂ™Р вЂўР В Р ТђР СњР Р‡Р Р‡ Р СџР С’Р СњР вЂўР вЂєР В¬ Р В Р Р€Р СџР В Р С’Р вЂ™Р вЂєР вЂўР СњР ВР вЂў (Р С™Р В Р С›Р РЃР С™Р В Р В Р СџР С›Р ВР РЋР С™)
   ========================================================================== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--grey-light);
}

.breadcrumb .active {
    color: var(--grey-dark);
    font-weight: 600;
}

.btn-submit-main {
    background: #fafafa;
    color: var(--text-main);
    border: 1px solid var(--grey-light);
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-submit-main:hover {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
    box-shadow: 0 4px 12px rgba(255, 109, 0, 0.2);
}

/* Р С™Р В°РЎР‚РЎвЂљР С•РЎвЂЎР С”Р В° РЎС“Р С—РЎР‚Р В°Р Р†Р В»Р ВµР Р…Р С‘РЎРЏ */
.control-panel-card {
    background-color: #fafafa;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

/* Р вЂњР В»Р С•Р В±Р В°Р В»РЎРЉР Р…РЎвЂ№Р в„– Р С—Р С•Р С‘РЎРѓР С” */
.search-section {
    width: 100%;
    margin-bottom: 25px;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
}

.search-input-main {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 30px;
    padding: 16px 65px 16px 30px;
    color: var(--text-main);
    font-size: 16px;
    transition: all 0.3s;
}

.search-input-main:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 109, 0, 0.1);
}

.search-icon-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Р вЂњРЎР‚Р С‘Р Т‘ РЎРѓР ВµР В»Р ВµР С”РЎвЂљР С•РЎР‚Р С•Р Р† РІР‚вЂќ Р ВР РЋР СџР В Р С’Р вЂ™Р вЂєР вЂўР СњР С›: 1fr (РЎвЂћР С‘Р В»РЎРЉРЎвЂљРЎР‚РЎвЂ№) | auto (Р С—Р В°Р В»Р С”Р В°) | 320px (Р С”Р В°РЎвЂљР ВµР С–Р С•РЎР‚Р С‘Р С‘) */
.selectors-grid {
    display: grid;
    grid-template-columns: 1fr auto 380px; /* Р Р€Р Р†Р ВµР В»Р С‘РЎвЂЎР С‘Р В»Р С‘ РЎРѓ 320px Р Т‘Р С• 380px */
    gap: 30px;
    align-items: start;
}

/* 2. Р С›Р В±Р ВµРЎР‚РЎвЂљР С”Р В° Р Т‘Р В»РЎРЏ Р С—Р С•РЎРѓР В»Р ВµР Т‘Р Р…Р ВµР С–Р С• РЎРѓР ВµР В»Р ВµР С”РЎвЂљР С•РЎР‚Р В° Р С‘ Р С”Р Р…Р С•Р С—Р С”Р С‘ */
.subcat-reset-row {
    display: flex;
    gap: 10px;
    align-items: center; /* Р вЂ™РЎвЂ№РЎР‚Р В°Р Р†Р Р…Р С‘Р Р†Р В°Р Р…Р С‘Р Вµ Р С—Р С• РЎвЂ Р ВµР Р…РЎвЂљРЎР‚РЎС“ Р С—Р С• Р Р†Р ВµРЎР‚РЎвЂљР С‘Р С”Р В°Р В»Р С‘ */
}

.subcat-reset-row .custom-select {
    flex-grow: 1; /* Р РЋР ВµР В»Р ВµР С”РЎвЂљ Р В·Р В°Р В±Р С‘РЎР‚Р В°Р ВµРЎвЂљ Р Р†РЎРѓР Вµ РЎРѓР Р†Р С•Р В±Р С•Р Т‘Р Р…Р С•Р Вµ Р СР ВµРЎРѓРЎвЂљР С• */
}

/* 3. Р РЋРЎвЂљР С‘Р В»Р С‘ Р С”Р Р…Р С•Р С—Р С”Р С‘ Р РЋР В±РЎР‚Р С•РЎРѓ */
.btn-reset-filters {
    padding: 10px 15px;
    background: #f0f0f0;
    color: var(--grey-dark);
    border: 1px solid var(--grey-light);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    height: 40px; /* Р В§РЎвЂљР С•Р В±РЎвЂ№ РЎРѓР С•Р Р†Р С—Р В°Р Т‘Р В°Р В»Р С• РЎРѓ Р Р†РЎвЂ№РЎРѓР С•РЎвЂљР С•Р в„– РЎРѓР ВµР В»Р ВµР С”РЎвЂљР В° */
    display: flex;
    align-items: center;
}

.btn-reset-filters:hover {
    background: #e2e8f0;
    color: #ff4b2b; /* Р В¦Р Р†Р ВµРЎвЂљ Р С—РЎР‚Р С‘ Р Р…Р В°Р Р†Р ВµР Т‘Р ВµР Р…Р С‘Р С‘ (Р В°Р С”РЎвЂ Р ВµР Р…РЎвЂљ Р Р…Р В° РЎС“Р Т‘Р В°Р В»Р ВµР Р…Р С‘Р Вµ) */
    border-color: #ff4b2b;
}

.group-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

/* Р вЂ™Р вЂўР В Р СћР ВР С™Р С’Р вЂєР В¬Р СњР С’Р Р‡ Р СџР С’Р вЂєР С›Р В§Р С™Р С’ */
.vertical-divider {
    width: 1px;
    background-color: var(--grey-light);
    align-self: stretch;
    margin: 0 5px;
}

/* Р РЋР СћР вЂўР С™ Р С™Р С’Р СћР вЂўР вЂњР С›Р В Р ВР в„ў (РЎРѓР С—РЎР‚Р В°Р Р†Р В°) */
.select-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 380px; /* Р В¤Р С‘Р С”РЎРѓР С‘РЎР‚РЎС“Р ВµР С РЎв‚¬Р С‘РЎР‚Р С‘Р Р…РЎС“ Р С—РЎР‚Р В°Р Р†Р С•Р в„– РЎвЂЎР В°РЎРѓРЎвЂљР С‘ */
}

.custom-select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid var(--grey-light);
    background: #fff;
    font-size: 14px;
    outline: none;
}

/* Р СџР С’Р В Р С’Р СљР вЂўР СћР В Р В« Р В¤Р ВР вЂєР В¬Р СћР В Р С’Р В¦Р ВР В Р вЂ™ Р вЂќР вЂ™Р С’ Р РЋР СћР С›Р вЂєР вЂР ВР С™Р С’ */
.filters-inner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Р вЂќР вЂ™Р С’ Р РЋР СћР С›Р вЂєР вЂР ВР С™Р С’ */
    gap: 12px;
}

.filter-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--grey-light);
    border-radius: 12px;
    padding: 8px 14px;
    gap: 8px;
}

.pill-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--grey-light);
    text-transform: uppercase;
}

.filter-pill input {
    border: none;
    width: 70px;
    font-size: 13px;
    outline: none;
    font-weight: 600;
    text-align: right;
}

.filter-pill .divider {
    color: var(--grey-light);
}

/* ==========================================================================
   5. Р СћР С’Р вЂР вЂєР ВР В¦Р С’ Р СћР С›Р вЂ™Р С’Р В Р С›Р вЂ™
   ========================================================================== */
.results-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 15px;
}

.count-badge {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--grey-dark);   /* цвет оставляем как был */
}

.data-table-container {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-family: "Onest", "Segoe UI", sans-serif;
}

.products-table th {
    background: #fcfcfc;
    padding: 13px 16px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 16px;       /* как «Цена от» в фильтрах */
    font-weight: 500;
    color: #959ca4;
    border-bottom: 1px solid var(--border-color);
}

.product-item-row {
    transition: background 0.2s;
    height: 65px;
}

.product-item-row:hover {
    background: #fafafa;
}

.products-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.th-product { width: 34%; }
.th-extra { width: 28%; }
.th-price { width: 20%; }
.th-seller { width: 18%; }

.col-product {
    min-width: 280px;
}

.product-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.08;
    max-height: calc(1.08em * 2);
    text-decoration: none;
    color: #050505;
    font-weight: 600;
    font-size: 15.5px;
}

.product-name:hover {
    text-decoration: underline;
}

.product-meta-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-article {
    font-size: 13.5px;
    color: #9098a0;
}

.product-reviews {
    font-size: 14.5px;
    color: #ff5a00;
    font-weight: 700;
}

.product-reviews .reviews-count {
    color: #ff8a4c;
    font-weight: 600;
}

.col-extra {
    min-width: 290px;
}

.product-extra-scroll {
    max-height: 58px;
    max-width: 370px;
    overflow-y: auto;
    padding-right: 6px;
}

.product-extra-scroll::-webkit-scrollbar {
    width: 4px;
}

.product-extra-scroll::-webkit-scrollbar-button,
.filtered-analytics-page ::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.product-extra-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.product-extra-scroll::-webkit-scrollbar-thumb {
    background: #cbcbcb;
    border-radius: 10px;
}

.product-extra-scroll::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    background: #000;
    color: #fff;
    padding: 2px 9px;
    font-size: 13px;
    margin-bottom: 2px;
    font-weight: 500;
}

.extra-line {
    line-height: 1.12;
    color: #222a34;
    font-size: 12.5px;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.extra-name {
    font-weight: 500;
}

.extra-empty {
    color: #8f98a0;
}

.col-price-new {
    min-width: 200px;
}

/* Две колонки: слева цена по карте, справа — цена без карты + старая цена */
.price-grid {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.price-main-col {
    flex: 0 0 auto;
}

.price-card-big {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #111111;
    white-space: nowrap;
    border-bottom: 2px solid currentColor;   /* подчёркивание — цена по карте */
    padding-bottom: 1px;
}

.price-side-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.price-old {
    font-size: 15px;           /* крупнее, чем было */
    color: #b0b5bb;
    text-decoration: line-through;
    white-space: nowrap;
}

.price-old--empty { text-decoration: none; }

.price-no-card {
    font-size: 15px;           /* крупнее, чем было */
    color: #9aa2ab;
    white-space: nowrap;
}

.col-seller {
    min-width: 180px;
}

/* Верхняя строка: рейтинг + количество заказов */
.seller-top-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

/* Нижняя строка: сам продавец */
.seller-bottom-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.seller-rating-star {
    color: #ff5a00;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.2px;
}

.seller-orders {
    color: #5a6068;
    font-size: 14px;
    font-weight: 600;
}

.seller-shop {
    color: #111;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
}

.seller-info {
    color: #8d96a0;
    font-size: 13px;
    line-height: 1;
}

.seller-reviews-muted {
    color: #f4ccb5;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
}

/* ==========================================================================
   6. Р СџР С’Р вЂњР ВР СњР С’Р В¦Р ВР Р‡ Р В Р вЂ™Р РЋР СџР С›Р СљР С›Р вЂњР С’Р СћР вЂўР вЂєР В¬Р СњР В«Р вЂў Р С™Р вЂєР С’Р РЋР РЋР В«
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 24px;
}

.smart-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-item {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main, #1e293b);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.page-item:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary-orange, #ff6d00);
}

.page-item.active {
    background: var(--primary-orange, #ff6d00);
    color: #fff;
    border-color: var(--primary-orange, #ff6d00);
    cursor: default;
    font-weight: 600;
}

.page-item-nav {
    padding: 0 16px;
    gap: 6px;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 40px;
    color: #94a3b8;
    font-size: 14px;
    user-select: none;
}

.hidden { display: none !important; }

/* Р С’Р Т‘Р В°Р С—РЎвЂљР С‘Р Р† Р Т‘Р В»РЎРЏ РЎвЂљР В°Р В±Р В»Р С‘РЎвЂ РЎвЂ№ */
@media (max-width: 1200px) {
    .selectors-grid {
        grid-template-columns: 1fr;
    }
    .filters-inner-grid {
        grid-template-columns: 1fr;
    }
}

.search-bar-wrapper { position: relative; }
.search-suggestions-container {
    position: absolute;
    top: 100%;
    left: 25px;
    right: 65px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0 0 15px 15px;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
}
.suggestion-item:hover {
    background-color: var(--bg-page);
    color: var(--primary-orange);
}
/* ==========================================================================
   Р С›Р В¤Р С›Р В Р СљР вЂєР вЂўР СњР ВР вЂў Р вЂР вЂєР С›Р С™Р С’ Р РЋР С›Р В Р СћР ВР В Р С›Р вЂ™Р С™Р В
   ========================================================================== */

/* Р С™Р С•Р Р…РЎвЂљР ВµР в„–Р Р…Р ВµРЎР‚ РЎС“Р С—РЎР‚Р В°Р Р†Р В»Р ВµР Р…Р С‘РЎРЏ */
.table-sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 6px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.sort-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--grey-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

/* Р РЋРЎвЂљР С‘Р В»Р С‘Р В·Р В°РЎвЂ Р С‘РЎРЏ Р Р†РЎвЂ№Р С—Р В°Р Т‘Р В°РЎР‹РЎвЂ°Р С‘РЎвЂ¦ РЎРѓР С—Р С‘РЎРѓР С”Р С•Р Р† */
.sort-select {
    appearance: none; /* Р Р€Р В±Р С‘РЎР‚Р В°Р ВµР С РЎРѓРЎвЂљР В°Р Р…Р Т‘Р В°РЎР‚РЎвЂљР Р…РЎС“РЎР‹ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С”РЎС“ Р В±РЎР‚Р В°РЎС“Р В·Р ВµРЎР‚Р В° */
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Р С™Р В°РЎРѓРЎвЂљР С•Р СР Р…Р В°РЎРЏ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С•РЎвЂЎР С”Р В° РЎвЂЎР ВµРЎР‚Р ВµР В· SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234b4b4b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sort-select:hover {
    background-color: var(--bg-page);
    color: var(--primary-orange);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.1);
}

/* Р РЋР С—Р ВµРЎвЂ Р С‘РЎвЂћР С‘РЎвЂЎР ВµРЎРѓР С”Р С‘Р в„– РЎРѓРЎвЂљР С‘Р В»РЎРЉ Р Т‘Р В»РЎРЏ РЎРѓР ВµР В»Р ВµР С”РЎвЂљР С•РЎР‚Р В° Р Р…Р В°Р С—РЎР‚Р В°Р Р†Р В»Р ВµР Р…Р С‘РЎРЏ (РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С•РЎвЂЎР С”Р С‘ РІвЂ вЂРІвЂ вЂњ) */
#delayedSortOrder {
    width: 50px;
    padding-right: 10px; /* Р Р€Р В±Р С‘РЎР‚Р В°Р ВµР С Р В±Р С•Р В»РЎРЉРЎв‚¬Р С•Р в„– Р С•РЎвЂљРЎРѓРЎвЂљРЎС“Р С— РЎРѓР С—РЎР‚Р В°Р Р†Р В° Р Т‘Р В»РЎРЏ Р С”Р С•РЎР‚Р С•РЎвЂљР С”Р С•Р С–Р С• РЎвЂљР ВµР С”РЎРѓРЎвЂљР В° */
    background-image: none; /* Р Р€Р В±Р С‘РЎР‚Р В°Р ВµР С Р С‘Р С”Р С•Р Р…Р С”РЎС“ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С”Р С‘ Р Т‘Р В»РЎРЏ РЎРЊРЎвЂљР С•Р С–Р С• Р С—Р С•Р В»РЎРЏ */
    text-align: center;
    font-size: 16px;
    background: var(--bg-page);
}

#delayedSortOrder:hover {
    background: var(--primary-orange);
    color: white;
}

/* Р С’Р Т‘Р В°Р С—РЎвЂљР С‘Р Р†: Р Р…Р В° Р СР С•Р В±Р С‘Р В»РЎРЉР Р…РЎвЂ№РЎвЂ¦ РЎС“РЎРѓРЎвЂљРЎР‚Р С•Р в„–РЎРѓРЎвЂљР Р†Р В°РЎвЂ¦ РЎРѓРЎвЂљР В°Р Р†Р С‘Р С Р Т‘РЎР‚РЎС“Р С– Р С—Р С•Р Т‘ Р Т‘РЎР‚РЎС“Р С–Р В° */
@media (max-width: 600px) {
    .results-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table-sort-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Р С›Р В±РЎвЂ°Р С‘Р Вµ РЎРѓРЎвЂљР С‘Р В»Р С‘ Р Т‘Р В»РЎРЏ Р Р†РЎРѓР ВµРЎвЂ¦ Р С”Р В°РЎРѓРЎвЂљР С•Р СР Р…РЎвЂ№РЎвЂ¦ РЎРѓР ВµР В»Р ВµР С”РЎвЂљР С•РЎР‚Р С•Р Р† */
.custom-select {
    appearance: none; /* Р Р€Р В±Р С‘РЎР‚Р В°Р ВµР С РЎРѓРЎвЂљР В°Р Р…Р Т‘Р В°РЎР‚РЎвЂљР Р…РЎС“РЎР‹ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С”РЎС“ */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    width: 100%;
    padding: 12px 40px 12px 16px; /* Р С›РЎвЂљРЎРѓРЎвЂљРЎС“Р С— РЎРѓР С—РЎР‚Р В°Р Р†Р В° Р С—Р С•Р Т‘ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С”РЎС“ */
    border-radius: 12px;
    border: 1px solid var(--grey-light);
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Р вЂќР С•Р В±Р В°Р Р†Р В»РЎРЏР ВµР С РЎРѓР Р†Р С•РЎР‹ РЎРѓРЎвЂљРЎР‚Р ВµР В»Р С•РЎвЂЎР С”РЎС“ Р Р†Р Р…Р С‘Р В· (SVG) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23c6c6c6' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.custom-select:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 2px 8px rgba(255, 109, 0, 0.05);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 109, 0, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ff6d00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

/* Р РЋР С•РЎРѓРЎвЂљР С•РЎРЏР Р…Р С‘Р Вµ, Р С”Р С•Р С–Р Т‘Р В° РЎРѓР ВµР В»Р ВµР С”РЎвЂљ Р С—РЎС“РЎРѓРЎвЂљР С•Р в„– Р С‘Р В»Р С‘ Р Р…Р Вµ Р Р†РЎвЂ№Р В±РЎР‚Р В°Р Р… (Р С•Р С—РЎвЂ Р С‘Р С•Р Р…Р В°Р В»РЎРЉР Р…Р С•) */
.custom-select:invalid, .custom-select option[value=""] {
    color: var(--grey-light);
}

/* --- Category search / xsubject --- */
.category-search-box {
    position: relative;
}

#categorySearchBox .search-suggestions-container {
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.category-suggestion-item {
    display: block;
}

.category-path {
    margin-top: 2px;
    font-size: 12px;
    color: var(--grey-light);
}

.xsubject-search {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 10px;
}

.xsubject-search:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.1);
}

.xsubject-list {
    max-height: 240px;
    overflow-y: auto;
    display: grid;
    gap: 6px;
}

.xsubject-item {
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 0;
    font-size: 13px;
    overflow: hidden;
}

.xsubject-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    width: 100%;
    padding: 8px 10px;
    box-sizing: border-box;
}

.xsubject-item label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.xsubject-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid #aaaaaa;
    border-radius: 5px;
    background: transparent;
    box-sizing: border-box;
    overflow: hidden;
}

.xsubject-checkbox::after {
    content: "";
    position: absolute;
    inset: 15%;
    background: #ff9500;
    border-radius: 30%;
    transform: scale(0);
    opacity: 0;
    transform-origin: center;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.xsubject-item label input[type="checkbox"]:checked + .xsubject-checkbox::after,
.xsubject-item label input[type="checkbox"]:checked ~ .xsubject-checkbox::after {
    transform: scale(1);
    opacity: 1;
    animation: checkbox-zoom 0.1s ease-out;
}

.xsubject-item.hidden-item {
    display: none;
}

.xsubject-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.xsubject-actions .btn-reset-filters {
    flex: 1;
    justify-content: center;
}

/* --- Analysis blocks --- */

/* Заголовки секций аналитики (Визуализация / Интеллектуальный анализ) */
.section-title {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #141414;
    margin: 4px 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* «Интеллектуальный анализ» — выделяем сильнее: крупнее + значок-бейдж */
.section-title--ai {
    font-size: 34px;
}

.section-title--ai::before {
    content: "";
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='analysisGradient' x1='5' y1='4' x2='43' y2='44'%3E%3Cstop offset='0' stop-color='%23FF6D00'/%3E%3Cstop offset='0.55' stop-color='%23FF8C00'/%3E%3Cstop offset='1' stop-color='%23FFAA28'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='48' height='48' rx='12' fill='url(%23analysisGradient)'/%3E%3Cpath d='M11.5 32.5L19.3 25.3L26.4 28.1L35.5 18.5' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='11.5' cy='32.5' r='2.5' fill='white'/%3E%3Ccircle cx='19.3' cy='25.3' r='2.5' fill='white'/%3E%3Ccircle cx='26.4' cy='28.1' r='2.5' fill='white'/%3E%3Ccircle cx='35.5' cy='18.5' r='2.5' fill='white'/%3E%3Cpath d='M17 12 C17.4 15.1 18.9 16.6 22 17 C18.9 17.4 17.4 18.9 17 22 C16.6 18.9 15.1 17.4 12 17 C15.1 16.6 16.6 15.1 17 12Z' fill='white'/%3E%3Ccircle cx='25.5' cy='14' r='1.5' fill='white' opacity='0.9'/%3E%3Cpath d='M11 37H37' stroke='white' stroke-width='2' stroke-linecap='round' opacity='0.55'/%3E%3C/svg%3E") center / contain no-repeat;
    box-shadow: 0 8px 18px rgba(255, 109, 0, 0.28);
}

/* Индикатор загрузки во время счёта анализа (заменяет статус-полоску) */
.analysis-loader {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff7f1, #ffffff 65%);
    border: 1px solid #ffe2cf;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(255, 109, 0, 0.07);
}

.analysis-loader__spinner {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: conic-gradient(from 90deg, rgba(255, 109, 0, 0) 0deg, var(--primary-orange) 280deg, var(--primary-orange) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    animation: analysis-spin 0.85s linear infinite;
}

@keyframes analysis-spin {
    to { transform: rotate(1turn); }
}

.analysis-loader__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: "Onest", "Segoe UI", sans-serif;
}

.analysis-loader__title {
    font-weight: 750;
    font-size: 16px;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.analysis-loader__sub {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #7b8190;
}

.analysis-loader__dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
}

.analysis-loader__dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-orange);
    animation: analysis-dot 1s infinite ease-in-out both;
}

.analysis-loader__dots i:nth-child(1) { animation-delay: -0.32s; }
.analysis-loader__dots i:nth-child(2) { animation-delay: -0.16s; }

@keyframes analysis-dot {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.35; }
    40% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .analysis-loader__spinner { animation-duration: 2.4s; }
    .analysis-loader__dots i { animation: none; opacity: 0.7; }
}

/* Служебный вывод (ошибки / таймаут) — мягкая карточка в общей стилистике,
   а не чёрная плашка. Во время счёта скрыт. */
.ai-output {
    background: #fff4f0;
    color: #9a3412;
    border: 1px solid #ffd9c2;
    border-radius: 12px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 13px;
    padding: 12px 14px;
    overflow-x: auto;
    margin-bottom: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.analysis-meta {
    position: relative;
    border: 1px solid #ececec;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-family: "Onest", "Segoe UI", sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.analysis-meta__title {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: #141414;
    margin-bottom: 8px;
    padding-left: 14px;
    padding-right: 150px; /* место под «Время завершения» в правом верхнем углу */
    position: relative;
}

/* Оранжевый акцент слева — как у заголовков модулей */
.analysis-meta__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 1.05em;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary-orange), #ff9446);
}

.analysis-meta__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 16px;
    color: #2d2d2d;
}

.analysis-meta__grid b {
    font-weight: 750;
    color: #141414;
}

.analysis-meta__muted {
    color: #8a8f99;
}

/* Время завершения — компактный блок в правом верхнем углу карточки */
.analysis-meta__finish {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
}

.analysis-meta__finish-cap {
    font-size: 11.5px;
    color: #8a8f99;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analysis-meta__finish-val {
    font-size: 16px;
    font-weight: 750;
    color: #141414;
}

.analysis-meta__pills {
    margin-top: 8px;
    padding-right: 150px;
}

.analysis-meta__pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid #ffd9c2;
    background: #fff6ef;
    color: #c2410c;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    margin: 6px 6px 0 0;
}

.analysis-meta__beta {
    position: relative;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 9px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #d9480f;
    background: linear-gradient(135deg, #fff4eb 0%, #ffe8d7 100%);
    border: 1px solid #ff8833;
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(255, 115, 0, 0.12);
    vertical-align: middle;
    cursor: help;
    user-select: none;
    transition: all 0.18s ease;
}

.analysis-meta__beta:hover,
.analysis-meta__beta:focus,
.analysis-meta__beta:focus-visible {
    background: linear-gradient(135deg, #ff7300 0%, #ff8c00 100%);
    border-color: #ff7300;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(255, 115, 0, 0.32);
    transform: translateY(-1px);
    outline: none;
    z-index: 50;
}

.analysis-meta__beta-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 280px;
    padding: 7px 11px;
    border-radius: 8px;
    background: #202226;
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1000;
}

.analysis-meta__beta-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #202226 transparent transparent transparent;
}

.analysis-meta__beta:hover .analysis-meta__beta-tooltip,
.analysis-meta__beta:focus .analysis-meta__beta-tooltip,
.analysis-meta__beta:focus-visible .analysis-meta__beta-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.analysis-meta__share-btn,
.ozon-share-button,
.wb-share-button {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #ff6d00 0%, #ff8c00 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 109, 0, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.analysis-meta__share-btn:hover,
.ozon-share-button:hover,
.wb-share-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 109, 0, 0.38);
    filter: brightness(1.06);
}

.analysis-meta__share-btn:disabled,
.ozon-share-button:disabled,
.wb-share-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ozon-share-btn-bottom,
.wb-share-btn-bottom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: linear-gradient(135deg, #ff6d00 0%, #ff8c00 100%);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 109, 0, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 380px;
    justify-content: center;
}

.ozon-share-btn-bottom:hover,
.wb-share-btn-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 109, 0, 0.45);
    filter: brightness(1.06);
}

.ozon-share-btn-bottom:disabled,
.wb-share-btn-bottom:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.analysis-module {
    border: 1px solid #e6e6e6;
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.analysis-module > summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #141414;
    padding: 6px 4px 6px 16px;
    position: relative;
    transition: color .15s ease;
}

/* Оранжевый акцент-полоса слева от заголовка */
.analysis-module > summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 0.72em;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary-orange), #ff9446);
}

.analysis-module > summary:hover {
    color: var(--primary-orange);
}

/* Иконка-шеврон: показывает, что секцию можно свернуть/развернуть */
.analysis-module > summary::after {
    content: "";
    margin-left: auto;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
    opacity: .45;
    transition: transform .2s ease, opacity .15s ease;
}

/* Развёрнуто — шеврон смотрит вниз */
.analysis-module[open] > summary::after {
    transform: rotate(90deg);
}

.analysis-module > summary:hover::after {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6d00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

.analysis-module > summary::-webkit-details-marker {
    display: none;
}

.analysis-body {
    margin-top: 10px;
}

/* Сводка SEO — компактный блок статистики в боковой колонке графика Top triggers */
.analysis-summary {
    font-family: "Onest", "Segoe UI", sans-serif;
    margin: -2px 0 16px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.analysis-summary__line {
    font-size: 16px;
    line-height: 1.25;
    color: #6a6a6a;
    margin: 0;
}
.analysis-summary__line + .analysis-summary__line {
    margin-top: 3px;
}
.analysis-summary b {
    font-weight: 800;
    color: #141414;
    font-variant-numeric: tabular-nums;
}

.analysis-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

/* ===== Ценовые сегменты (Аномалии и точки роста) ===== */
.price-panel {
    margin: 6px 0 22px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Единый блок: ценовые сегменты + порог отзывов (по ширине контента) */
.price-card--combo {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}
.price-card--combo:hover {
    box-shadow: 0 6px 22px rgba(20, 20, 20, .06);
    transform: translateY(-1px);
}

.price-combo-main {
    flex: 0 0 auto;
    min-width: 0;
    padding: 16px 22px 18px;
}
.price-combo-sep {
    width: 1px;
    background: #efefef;
    margin: 16px 0;
    flex: 0 0 1px;
}
.price-combo-aside {
    flex: 0 0 auto;
    padding: 16px 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-card__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a8a8a;
    margin-bottom: 14px;
}
.price-combo-aside .price-card__title { margin-bottom: 8px; }

/* узкая полоса диапазона: от бюджетной до премиальной границы */
.price-range {
    width: 380px;
    max-width: 100%;
}
.price-range__ends {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 9px;
}
.price-range__end { text-align: left; }
.price-range__end--right { text-align: right; }
.price-range__end-val {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #161616;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.price-range__end-cap {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #b0b0b0;
    margin-top: 3px;
}
.price-range__track {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffcf9e, var(--primary-orange));
}

/* порог отзывов */
.price-threshold__value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-orange);
    font-variant-numeric: tabular-nums;
}
.price-threshold__unit {
    font-size: 12px;
    color: #999;
    margin-top: 7px;
}

@media (max-width: 720px) {
    .price-card--combo { flex-direction: column; }
    .price-combo-sep { width: auto; height: 1px; margin: 0 16px; }
}

.kpi {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px;
    background: #fcfcfc;
}

.kpi__label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.kpi__value {
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.kpi__sub {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* ===== Market overview (Конкурентная среда) ===== */
.market-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 860px) {
    .market-overview { grid-template-columns: 1fr; }
}

.mkt-card {
    position: relative;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 16px 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.mkt-card:hover {
    box-shadow: 0 6px 22px rgba(20, 20, 20, .07);
    transform: translateY(-1px);
}

.mkt-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.mkt-card__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.mkt-card__hint {
    font-size: 11px;
    color: #b0b0b0;
}

.mkt-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    background: #f1f1f1;
    color: #555;
}
.mkt-badge--good { background: #e7f7ec; color: #1e9e5a; }
.mkt-badge--warn { background: #fff2e0; color: #c77700; }
.mkt-badge--bad  { background: #fdeaea; color: #d63a3a; }
.mkt-badge--neutral { background: #f1f1f1; color: #666; }

/* --- HHI card --- */
.mkt-card--hhi {
    border-top: 3px solid #e5e5e5;
}
.mkt-tone-good { border-top-color: #2bbd6e; }
.mkt-tone-warn { border-top-color: #ff9f1c; }
.mkt-tone-bad  { border-top-color: #e54848; }

.mkt-hhi-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mkt-hhi-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: #161616;
    font-variant-numeric: tabular-nums;
}

.mkt-hhi-state {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.mkt-state-good { color: #1e9e5a; }
.mkt-state-warn { color: #c77700; }
.mkt-state-bad  { color: #d63a3a; }
.mkt-state-neutral { color: #999; }

.mkt-hhi-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #f0f0f0;
    overflow: hidden;
}
.mkt-hhi-bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    transition: width .5s ease;
}
.mkt-fill-good { background: linear-gradient(90deg, #2bbd6e, #57d68d); }
.mkt-fill-warn { background: linear-gradient(90deg, #ff9f1c, #ffb74d); }
.mkt-fill-bad  { background: linear-gradient(90deg, #e54848, #ff6b6b); }
.mkt-fill-neutral { background: #ccc; }

.mkt-hhi-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #bbb;
    font-variant-numeric: tabular-nums;
}
.mkt-hhi-scale__max { color: #999; font-weight: 600; }

.wb-seller-hhi__linda {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 12px;
    color: #8a8a8a;
    font-weight: 650;
}
.wb-seller-hhi__linda b {
    color: #1f1f1f;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* WB HHI: тип рынка крупно, на уровне stats «Структура рынка» */
.wb-seller-hhi-title {
    display: flex;
    align-items: center;
    min-height: 64px;
    margin: 0;
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    word-break: break-word;
}

/* Точка HHI = цвет бара (tone) */
.wb-seller-hhi .mkt-dot--good { background: #2bbd6e; }
.wb-seller-hhi .mkt-dot--warn { background: #ff9f1c; }
.wb-seller-hhi .mkt-dot--bad { background: #e54848; }
.wb-seller-hhi .mkt-dot--neutral { background: #ccc; }

/* Компактная строка: Выручка · HHI · N · Индекс Линда N */
.wb-seller-hhi__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    min-height: 22px;
    font-size: 12px;
    font-weight: 650;
    color: #777;
}
.wb-seller-hhi__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.wb-seller-hhi__meta-item b {
    color: #1f1f1f;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* --- Combo card (Структура рынка: CR Top-N + Продавцы) --- */
.mkt-card--combo {
    display: flex;
    flex-direction: column;
}

.mkt-combo-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 2px 0 16px;
}
.mkt-stat { min-width: 0; }
.mkt-stat__value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: #161616;
    font-variant-numeric: tabular-nums;
}
.mkt-stat__value--accent { color: var(--primary-orange); }
.mkt-stat__label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}
.mkt-stat__sep {
    width: 1px;
    align-self: stretch;
    background: #efefef;
    margin: 2px 0;
}

.mkt-split-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #ededed;
    overflow: hidden;
}
.mkt-split-bar__lead {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-orange), #ff9446);
    transition: width .5s ease;
}

.mkt-split-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    font-size: 11px;
    color: #777;
}
.mkt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.mkt-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
}
.mkt-dot--lead { background: var(--primary-orange); }
.mkt-dot--rest { background: #d9d9d9; }

.mkt-chip {
    display: inline-block;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
}

/* WB: блок продавцов
   row1: HHI | Структура (одинаковая высота, полосы на одной линии)
   row2:     | Индекс импульса
   bottom: 3 avg-карточки */
.market-overview.wb-sellers-overview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-sellers-overview__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 10px;
    align-items: stretch;
}

/* HHI и Структура — одна строка, равная высота; полосы на одном уровне */
.wb-sellers-overview__top > .mkt-card--hhi,
.wb-sellers-overview__top > .mkt-card--combo {
    min-width: 0;
    min-height: 100%;
    display: grid;
    /* head (компактный) | title/stats(+impulse) | bars */
    grid-template-rows: auto minmax(64px, auto) 1fr;
    align-content: stretch;
    row-gap: 0;
    overflow: hidden; /* impulse не вылезает за карточку */
}

/* Компактная шапка — без лишней высоты из‑за импульса */
.wb-sellers-overview__top > .mkt-card--hhi > .mkt-card__head,
.wb-sellers-overview__top > .mkt-card--combo > .mkt-card__head {
    margin-bottom: 8px;
    min-height: 0;
    align-items: center;
}

/* Stats + Индекс импульса: на одном уровне с «ВЫСОКОКОНЦЕНТРИРОВАННЫЙ» */
.wb-seller-structure-top {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
    min-height: 64px;
}

.wb-seller-structure-top > .wb-seller-structure-stats {
    flex: 0.5 0.5 auto;
    min-width: 0;
}

.wb-seller-structure-top > .wb-seller-index-card {
    flex: 0 0 auto;
    margin: 0;
    max-width: 200px;
}

.wb-sellers-overview__avgs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

/* Две метрики / две CR-полосы — одинаковая сетка, бары на одной высоте */
.wb-seller-metric-duo,
.wb-seller-structure-bars {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-height: 0;
    align-self: stretch;
    margin-top: 14px;
}

.wb-seller-hhi {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: flex-start;
}

.wb-seller-hhi__top,
.wb-cr-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wb-seller-hhi__label,
.wb-cr-row__head span {
    font-size: 12px;
    font-weight: 750;
    color: #777;
}

.wb-seller-hhi__value {
    margin: 7px 0 10px;
    font-size: 32px;
}

.wb-seller-structure-stats {
    align-items: center;
    flex-wrap: nowrap;
    min-height: 0;
    height: auto;
    margin: 0 !important;
    gap: 12px;
}

.wb-seller-structure-stats .mkt-stat {
    flex: 1 1 0;
    min-width: 0;
}

.wb-seller-structure-stats .mkt-stat__sep {
    flex: 0 0 1px;
}

/* Title HHI ≈ высота ряда stats+impulse */
.wb-sellers-overview__top .wb-seller-hhi-title {
    min-height: 64px;
}

.wb-cr-row {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: flex-start;
    min-width: 0;
}

.wb-cr-row__head {
    margin-bottom: 0;
    font-size: 12px;
    min-height: 22px;
}

.wb-cr-row__head b {
    color: var(--primary-orange);
    font-variant-numeric: tabular-nums;
}

/* Легенда CR ≈ шкала HHI — выравнивает высоту рядов */
.wb-sellers-overview .wb-cr-row .mkt-split-legend {
    margin-top: 0;
    min-height: 18px;
}

.wb-sellers-overview .wb-seller-hhi .mkt-hhi-scale {
    margin-top: 0;
    min-height: 18px;
}

/* Индекс импульса — как на референсе: значение слева, оранжевый sparkline справа */
.wb-seller-index-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 0;
    padding: 16px 18px 14px;
    border: 1px solid rgba(24, 22, 20, 0.06);
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(24, 22, 20, 0.04),
        0 10px 28px rgba(24, 22, 20, 0.06);
    overflow: hidden;
}

/* Компактный вариант внутри «Структура рынка» (рядом со stats) */
.wb-seller-index-card--compact {
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(24, 22, 20, 0.03),
        0 4px 12px rgba(24, 22, 20, 0.05);
}
.wb-seller-index-card--compact.mkt-card {
    /* не наследовать padding/hover «большой» mkt-card */
    padding: 6px 10px 6px 12px;
}
.wb-seller-index-card--compact:hover {
    transform: none;
    box-shadow:
        0 1px 2px rgba(24, 22, 20, 0.03),
        0 4px 12px rgba(24, 22, 20, 0.05);
}
.wb-seller-index-card--compact .wb-seller-index-card__title {
    font-size: 10.5px;
}
.wb-seller-index-card--compact .wb-seller-index-card__value {
    margin-top: 1px;
    font-size: 18px;
}
.wb-seller-index-card--compact .wb-seller-index-card__hint {
    margin-top: 1px;
    font-size: 10.5px;
}
.wb-seller-index-card--compact .wb-seller-index-card__trend {
    width: 34px;
    height: 24px;
}
.wb-seller-index-card--compact .wb-seller-index-card__trend .wb-seller-index-card__spark,
.wb-seller-index-card--compact .wb-seller-index-card__trend svg {
    width: 32px;
    height: 22px;
}

.wb-seller-index-card--good,
.wb-seller-index-card--warn,
.wb-seller-index-card--bad,
.wb-seller-index-card--accent {
    border-top: 1px solid rgba(24, 22, 20, 0.06);
}

.wb-seller-index-card--accent {
    border-color: rgba(255, 122, 0, 0.12);
    background:
        linear-gradient(180deg, #fffdfb 0%, #ffffff 55%);
}

.wb-seller-index-card__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.wb-seller-index-card__title {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #9b9ba3;
    line-height: 1.25;
}

.wb-seller-index-card__value {
    display: block;
    margin: 6px 0 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: #141414;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.wb-seller-index-card__hint {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: #b0b0b8;
}

.wb-seller-index-card__trend {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 36px;
    color: #ff7a00;
    margin-right: 2px;
}

.wb-seller-index-card__trend .wb-seller-index-card__spark,
.wb-seller-index-card__trend svg {
    width: 48px;
    height: 32px;
    display: block;
}

.wb-seller-index-card__trend--up { color: #ff7a00; }
.wb-seller-index-card__trend--down { color: #e54848; }
.wb-seller-index-card__trend--flat { color: #b0b0b6; }

.wb-seller-index-card--good .wb-seller-index-card__trend { color: #2bbd6e; }
.wb-seller-index-card--bad .wb-seller-index-card__trend { color: #e54848; }
.wb-seller-index-card--warn .wb-seller-index-card__trend { color: #ff9f1c; }

.wb-seller-market-avg {
    min-height: 0;
    min-width: 0;
    width: 100%;
    padding: 12px 12px 10px;
    justify-content: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 28px rgba(29, 26, 20, 0.06);
    /* фон как у .filter-card-new — тёплый «матовый» градиент */
    background-color: transparent;
    background-image:
        radial-gradient(circle at top left, rgba(255, 220, 186, 0.28), transparent 30%),
        radial-gradient(circle at bottom right, rgba(213, 227, 255, 0.28), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 247, 244, 0.94) 100%);
}

.wb-seller-market-avg:hover {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 14px 32px rgba(29, 26, 20, 0.08);
}

.wb-seller-market-avg .mkt-card__head {
    margin-bottom: 6px;
}

.wb-seller-market-avg .mkt-card__label {
    font-size: 11px;
}

.wb-seller-market-avg__grid {
    display: grid;
    gap: 0;
}

.wb-seller-market-avg__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 0 7px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 13px;
    line-height: 1.25;
    color: #777;
}

.wb-seller-market-avg__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.wb-seller-market-avg__item span {
    font-weight: 650;
    min-width: 0;
    padding-right: 4px;
}

.wb-seller-market-avg__item b {
    color: #1f1f1f;
    font-size: 13.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 1100px) {
    .wb-sellers-overview__top {
        grid-template-columns: 1fr;
    }

    .wb-seller-structure-top {
        flex-wrap: wrap;
    }

    .wb-seller-structure-top > .wb-seller-index-card {
        max-width: none;
        width: 100%;
    }

    .wb-sellers-overview__avgs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .wb-sellers-overview__avgs {
        grid-template-columns: 1fr;
    }
}

/* Lorenz — оформление как у chart-block--revenue-reference (кривые без area-fill) */
.wb-lorenz-panel {
    margin: 8px 0 22px;
    padding: 28px 32px 22px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.wb-lorenz-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 10px;
}

.wb-lorenz-panel__head-left {
    min-width: 0;
}

.wb-lorenz-panel__title {
    margin: 0;
    color: #000000;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0;
}

.wb-lorenz-panel__axis-note {
    margin-top: 8px;
    color: #cccccc;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

.wb-lorenz-chart {
    position: relative;
    width: 100%;
    margin-top: 8px;
}

/* Легенда на графике — столбик в рамке, каждая строка с новой линии */
.wb-lorenz-legend-bar {
    position: absolute;
    left: calc(var(--lorenz-legend-left, 10%) + 10px);
    top: calc(var(--lorenz-legend-top, 4.5%) + 8px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: min(280px, 48%);
    padding: 10px 12px;
    border: 1px solid #e6e6ea;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(24, 22, 20, 0.06);
    font-family: "Onest", "Segoe UI", sans-serif;
    pointer-events: none;
}

.wb-lorenz-legend-bar__series,
.wb-lorenz-legend-bar__gini {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.wb-lorenz-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6a6a72;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

.wb-lorenz-legend-gini {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.wb-lorenz-legend-gini__label {
    color: #a3a3a8;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

.wb-lorenz-legend-gini__value {
    color: #8b8b90;
    font-size: 13.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.wb-lorenz-legend-gini--good,
.wb-lorenz-legend-gini--warn,
.wb-lorenz-legend-gini--bad {
    border-color: transparent;
    background: transparent;
}

.wb-lorenz-legend-gini--good .wb-lorenz-legend-gini__value,
.wb-lorenz-legend-gini--warn .wb-lorenz-legend-gini__value,
.wb-lorenz-legend-gini--bad .wb-lorenz-legend-gini__value {
    color: #8b8b90;
}

.wb-lorenz-panel__axis-note__item {
    display: inline-flex;
    align-items: center;
}

.wb-lorenz-chart svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 300px;
}

/* без тёплой заливки под графиком */
.wb-lorenz-chart__bg {
    fill: none;
    stroke: none;
}

.wb-lorenz-chart__grid {
    stroke: rgba(205, 205, 205, 0.28);
    stroke-width: 1;
}

.wb-lorenz-chart__guide {
    fill: none;
    stroke: #d4d4d8;
    stroke-width: 2;
    stroke-dasharray: 6 8;
    stroke-linecap: round;
}

.wb-lorenz-chart__line {
    fill: none !important;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wb-lorenz-chart__line--revenue { stroke: #f25c00; }
.wb-lorenz-chart__line--reviews { stroke: #3b82f6; }

.wb-lorenz-chart__point {
    fill: #ffffff;
    stroke-width: 2.5;
    cursor: crosshair;
    opacity: 0;
    outline: none;
    transition: opacity .12s ease, stroke-width .12s ease, r .12s ease, filter .12s ease;
}

.wb-lorenz-chart__point--revenue { stroke: #f25c00; }
.wb-lorenz-chart__point--reviews { stroke: #3b82f6; }

.wb-lorenz-chart__point:hover,
.wb-lorenz-chart__point:focus-visible {
    opacity: 1;
    stroke-width: 3;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .16));
}

.wb-lorenz-chart__axis,
.wb-lorenz-chart__tick {
    fill: #b0b0b0;
    font-family: "Onest", Inter, "Segoe UI", sans-serif;
}

.wb-lorenz-chart__axis {
    font-size: 12px;
    font-weight: 500;
}

.wb-lorenz-chart__tick {
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.wb-lorenz-chart__legend-dot {
    display: inline-block;
    width: 20px;
    height: 2.5px;
    border-radius: 999px;
    background: #cfcfd4;
    flex: 0 0 auto;
    opacity: 0.85;
}

.wb-lorenz-chart__legend-dot--guide {
    background: repeating-linear-gradient(90deg, #cfcfd4 0 5px, transparent 5px 8px);
}

.wb-lorenz-chart__legend-dot--revenue { background: #f25c00; opacity: 0.75; }
.wb-lorenz-chart__legend-dot--reviews { background: #3b82f6; opacity: 0.75; }

@media (max-width: 760px) {
    .wb-lorenz-panel {
        padding: 22px 18px 16px;
        border-radius: 22px;
    }

    .wb-lorenz-panel__title {
        font-size: 22px;
    }

    .wb-lorenz-panel__axis-note {
        font-size: 14px;
    }

    .wb-lorenz-legend-bar {
        left: calc(var(--lorenz-legend-left, 10%) + 6px);
        top: calc(var(--lorenz-legend-top, 4.5%) + 6px);
        max-width: min(320px, 72%);
        gap: 6px;
    }

    .wb-lorenz-legend-item,
    .wb-lorenz-legend-gini__label,
    .wb-lorenz-legend-gini__value {
        font-size: 12px;
    }
}

.wb-lorenz-tooltip {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    max-width: min(280px, calc(100vw - 20px));
    padding: 10px 12px;
    border: 1px solid rgba(20, 20, 20, .08);
    border-radius: 8px;
    background: rgba(24, 24, 24, .94);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .1s ease, transform .1s ease;
}

.wb-lorenz-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.wb-lorenz-tooltip__title {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
}

.wb-lorenz-tooltip__line {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, .78);
    font-variant-numeric: tabular-nums;
}

.wb-lorenz-tooltip__line b {
    color: #fff;
}

/* Топ-5 по выручке / отзывам / Лидеры импульса — в одну строку */
.wb-seller-tables {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    align-items: start;
}

.wb-seller-table-wrap {
    min-width: 0;
    width: 100%;
}

.wb-seller-table-wrap .seller-table-header {
    text-align: left;
    margin-bottom: 8px;
    gap: 6px;
}

.wb-seller-table-wrap .seller-table-title {
    text-align: left;
    font-size: 15px;
}

.wb-seller-table-wrap .seller-table-count {
    font-size: 12px;
}

.seller-table-wrap--col.wb-seller-table-wrap .seller-table-scroll {
    overflow-x: auto;
}

.wb-seller-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

/* Строка заголовков — перенос слов, синхронная высота */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table thead tr {
    height: 42px;
}

.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 4px 5px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    vertical-align: middle;
    line-height: 1.15;
    height: 42px;
    box-sizing: border-box;
    overflow: visible;
    text-transform: uppercase;
}

.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table .seller-th__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: normal;
    text-align: center;
    line-height: 1.12;
    word-break: normal;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th:first-child .seller-th__inner {
    justify-content: flex-start;
    text-align: left;
}

/* Колонка «Продавец» */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th:first-child,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td:first-child {
    min-width: 0;
    width: 21%;
    max-width: 85px;
    padding-left: 8px;
    padding-right: 6px;
}

/* Колонка SKU — четкий зазор */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-sku-val,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-sku-val {
    width: 9% !important;
    min-width: 32px !important;
    max-width: 44px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    text-align: center;
}

/* Колонка Доля */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-share-pct,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-share-pct {
    width: 12% !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* Колонка Выручка на SKU */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-sku-rev,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-sku-rev {
    width: 24% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* Колонка Выручка */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-revenue-val:not(.col-sku-rev),
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-revenue-val:not(.col-sku-rev) {
    width: 19% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* Колонка Отзывы */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-reviews-val,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-reviews-val {
    width: 15% !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* Колонка Импульс */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th.col-momentum-val,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td.col-momentum-val {
    width: 22% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
}

.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td {
    font-size: 12.5px;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 5px;
    padding-right: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

.wb-seller-table .seller-name {
    font-size: 12.5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Колонки метрик — делят оставшуюся ширину */
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th:nth-child(n+2) {
    font-size: 11.5px !important;
}

.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table .num,
.seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td:nth-child(n+2) {
    width: auto;
    min-width: 0;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .wb-seller-tables {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wb-seller-table {
        min-width: 0;
    }

    .seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table th:first-child,
    .seller-table-wrap--col.wb-seller-table-wrap .wb-seller-table td:first-child {
        width: 34%;
        max-width: 160px;
    }
}

@media (max-width: 760px) {
    .wb-seller-structure-stats {
    flex-wrap: wrap;
        gap: 12px;
    }

.wb-seller-structure-stats .mkt-stat {
        flex: 1 1 calc(50% - 6px);
        min-width: 150px;
    }

    .wb-seller-structure-stats .mkt-stat__sep {
        display: none;
    }

    .wb-lorenz-chart svg {
        min-height: 220px;
    }
}


.analysis-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fff;
    margin-top: 8px;
}

.analysis-table th,
.analysis-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: top;
}

.analysis-table thead th {
    background: #f8f8f8;
    font-weight: 700;
    color: #333;
}

.analysis-link {
    color: #2563eb;
    text-decoration: none;
}

.analysis-link:hover {
    text-decoration: underline;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    background: #fff;
}

/* ==========================================================================
   Таблица продавцов (Top sellers)
   ========================================================================== */
.seller-table-wrap {
    margin: 18px auto 4px;
    font-family: "Onest", "Segoe UI", sans-serif;
    width: 100%;
    max-width: 1300px;
}

/* Ряд из нескольких таблиц рядом по горизонтали (аномалии и точки роста) */
.sku-tables-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0 4px;
    align-items: start;
}

.sku-tables-row--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .sku-tables-row { grid-template-columns: 1fr; }
}

/* Колоночный вариант — таблица занимает всю ширину своей колонки */
.seller-table-wrap--col {
    margin: 0;
    max-width: none;
    min-width: 0;
}

/* Таблица заполняет блок; числовые колонки компактны, имя усекается у границы с ценой */
.seller-table-wrap--col .seller-table-scroll {
    overflow-x: hidden;
}
.seller-table-wrap--col .seller-table {
    table-layout: fixed;
    width: 100%;
}
/* Компактная фиксированная ширина числовых колонок (цена, отзывы) */
.seller-table-wrap--col .seller-table .num,
.seller-table-wrap--col .seller-table th:nth-child(n+2) {
    width: 86px;
}
.seller-table-wrap--col .seller-table .num {
    white-space: nowrap;
}
/* Минимальные отступы между колонками «наименование / цена / отзывы» */
.seller-table-wrap--col .seller-table th,
.seller-table-wrap--col .seller-table td {
    padding-left: 3px;
    padding-right: 3px;
}
/* …но у крайних колонок оставляем небольшой отступ от краёв таблицы */
.seller-table-wrap--col .seller-table th:first-child,
.seller-table-wrap--col .seller-table td:first-child {
    padding-left: 14px;
}
.seller-table-wrap--col .seller-table th:last-child,
.seller-table-wrap--col .seller-table td:last-child {
    padding-right: 14px;
}
/* Имя заполняет свою колонку и усекается ровно у границы с ценой (без пустого разрыва) */
.seller-table-wrap--col .seller-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-table-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.seller-table-title {
    font-size: 18px;
    font-weight: 750;
    color: #171615;
}

.seller-table-count {
    font-size: 11px;
    font-weight: 500;
    color: #9a9a9a;
    background: #f4f4f4;
    border-radius: 999px;
    padding: 2px 9px;
}

.seller-table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #ebebeb;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.seller-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 15px;
}

.seller-th {
    padding: 13px 18px;
    background: #f7f7f7;
    font-weight: 600;
    font-size: 13px;
    color: #888;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
    user-select: none;
    transition: color .15s;
    overflow: hidden;
}

/* Ширины колонок */
.seller-table colgroup .col-name   { width: 38%; }
.seller-table colgroup .col-share  { width: 13%; }
.seller-table colgroup .col-skus   { width: 9%; }
.seller-table colgroup .col-rev    { width: 13%; }
.seller-table colgroup .col-rating { width: 12%; }
.seller-table colgroup .col-total  { width: 15%; }

.seller-th:hover {
    color: var(--primary-orange);
}

.seller-th[data-sort="asc"],
.seller-th[data-sort="desc"] {
    color: var(--primary-orange);
}

.seller-th__inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.seller-sort-icon {
    display: inline-flex;
    color: #ccc;
    flex-shrink: 0;
    transition: color .15s;
}

.seller-th:hover .seller-sort-icon,
.seller-th[data-sort="asc"] .seller-sort-icon,
.seller-th[data-sort="desc"] .seller-sort-icon {
    color: var(--primary-orange);
}

.seller-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f2f2f2;
    color: #333;
    vertical-align: middle;
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.seller-table tbody tr:last-child td {
    border-bottom: none;
}

.seller-table tbody tr {
    transition: background .1s;
}

.seller-table tbody tr:hover td {
    background: #fff8f4;
}

.seller-row--alt td {
    background: #fafafa;
}

.seller-row--alt:hover td {
    background: #fff8f4 !important;
}

/* Колонка с именем продавца */
.seller-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

/* Имя-ссылка (таблицы товаров) */
.seller-name--link {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .15s;
    cursor: pointer;
}
.seller-name--link:hover {
    color: var(--primary-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Числовые ячейки — tabular nums для выравнивания */
.seller-table td.num {
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    color: #444;
    font-weight: 500;
}

/* Доля рынка — с лёгким акцентом */
.seller-table td.col-share-val {
    font-weight: 700;
    color: var(--primary-orange);
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}

/* Рейтинг — звёздочный стиль */
.seller-rating-val {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    color: #f59e0b;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}

.seller-table-footer {
    font-size: 12px;
    color: #9a9a9a;
    margin-top: 8px;
    padding-left: 2px;
}

/* WB: KMeans heatmap в блоке аномалий */
.wb-kmeans-panel {
    margin: 8px 0 22px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wb-kmeans-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.wb-kmeans-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: #171615;
}

.wb-kmeans-subtitle {
    margin-top: 5px;
    max-width: 680px;
    font-size: 13px;
    line-height: 1.35;
    color: #777;
}

.wb-kmeans-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
}

.wb-kmeans-scale-control {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
}

.wb-kmeans-scale-control__label {
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
    color: #3a3a3a;
}

.wb-kmeans-scale-control__buttons {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 8px;
    background: #f4f4f5;
}

.wb-kmeans-scale-control button {
    min-width: 54px;
    height: 28px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.wb-kmeans-scale-control button.is-active {
    background: #fff;
    color: var(--primary-orange);
    box-shadow: 0 1px 5px rgba(20, 20, 20, .09);
}

.wb-kmeans-scale-control .wb-kmeans-density-key {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 3px;
    min-width: 64px;
}

.wb-kmeans-density-key__bar {
    width: 100%;
    height: 8px;
    border: 1px solid #f0d9c4;
    border-radius: 999px;
    background: linear-gradient(90deg, hsl(30 92% 96%), hsl(23 92% 75%), hsl(16 92% 54%));
}

.wb-kmeans-density-key__labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}

.wb-kmeans-clusters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 12px;
    align-items: start;
}

.wb-kmeans-cluster {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
}

.wb-kmeans-cluster__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fcfcfd;
}

.wb-kmeans-cluster__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
    color: #181818;
}

.wb-kmeans-cluster__count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    color: #9a9a9a;
    font-variant-numeric: tabular-nums;
}

.wb-kmeans-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.wb-kmeans-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f3f3;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
}

.wb-kmeans-table tr:last-child td {
    border-bottom: 0;
}

.wb-kmeans-cell {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.wb-kmeans-cell--empty {
    align-items: start;
}

.wb-kmeans-feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.wb-kmeans-feature__name {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: #181818;
}

.wb-kmeans-feature__scale {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 8px;
    background: #f4f4f5;
}

.wb-kmeans-feature__scale button {
    min-width: 48px;
    height: 26px;
    padding: 0 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.wb-kmeans-feature__scale button.is-active {
    background: #fff;
    color: var(--kmeans-col-color, var(--primary-orange));
    box-shadow: 0 1px 5px rgba(20, 20, 20, .09);
}

.wb-kmeans-heat {
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.wb-kmeans-bar-wrap {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 8px;
}

.wb-kmeans-vscale {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 34px;
    min-height: 48px;
    padding: 0 0 14px;
    box-sizing: border-box;
}

.wb-kmeans-vscale__bar {
    flex: 1 1 auto;
    width: 12px;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.wb-kmeans-vscale__max,
.wb-kmeans-vscale__min {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: #888;
    font-variant-numeric: tabular-nums;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-kmeans-range {
    position: relative;
    height: 14px;
    margin-top: 2px;
    color: #777;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.wb-kmeans-range span {
    position: absolute;
    top: 0;
    white-space: nowrap;
    transform: translateX(-50%);
}

.wb-kmeans-range span:first-child {
    left: 0%;
}

.wb-kmeans-range span:last-child {
    left: 100%;
}

.wb-kmeans-heatbar {
    position: relative;
    display: flex;
    width: 100%;
    height: 42px;
    min-width: 0;
    overflow: hidden;
    border: 2px solid #181818;
    border-radius: 3px;
    background: #fff;
}

.wb-kmeans-bin {
    display: block;
    flex: 0 0 auto;
    height: 100%;
}

.wb-kmeans-bin--gap {
    background: hsl(30 92% 96%);
}

.wb-kmeans-bin--filled {
    position: relative;
    min-width: 4px;
    cursor: crosshair;
    outline: none;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.wb-kmeans-bin--zero {
    background: hsl(30 92% 96%);
}

.wb-kmeans-bin--filled:hover,
.wb-kmeans-bin--filled:focus-visible {
    z-index: 2;
    transform: scaleY(1.1);
    box-shadow: 0 0 0 2px rgba(255, 122, 26, .24);
    filter: saturate(1.08);
}

.wb-kmeans-marker {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
    margin-top: -5.5px;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .92), 0 0 6px rgba(0, 0, 0, .28);
    transition: transform .12s ease, box-shadow .12s ease;
}

.wb-kmeans-marker:hover,
.wb-kmeans-marker:focus-visible {
    transform: scale(1.35);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 9px rgba(0, 0, 0, .38);
}

.wb-kmeans-marker--mean {
    background: #171615;
}

.wb-kmeans-marker--median {
    background: #1e9e5a;
}

.wb-kmeans-empty {
    padding: 10px 12px;
    border: 1px dashed #e2e2e2;
    border-radius: 8px;
    background: #fafafa;
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.35;
}

.wb-kmeans-tooltip {
    position: fixed;
    z-index: 13000;
    pointer-events: none;
    max-width: min(280px, calc(100vw - 20px));
    padding: 10px 12px;
    border: 1px solid rgba(20, 20, 20, .08);
    border-radius: 8px;
    background: rgba(24, 24, 24, .94);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .1s ease, transform .1s ease;
}

.wb-kmeans-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.wb-kmeans-tooltip__title {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
}

.wb-kmeans-tooltip__line {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, .78);
    font-variant-numeric: tabular-nums;
}

.wb-kmeans-tooltip__line b {
    color: #fff;
}

/* KMeans matrix — soft card design (ref screenshot) */
.wb-kmeans-matrix-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 18px 20px 16px;
    border: 1px solid #ececef;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(24, 24, 28, 0.05);
}

.wb-kmeans-matrix {
    width: 100%;
    min-width: 560px;
    border-collapse: separate;
    border-spacing: 0 10px;
    table-layout: fixed;
    background: transparent;
}

.wb-kmeans-matrix thead tr {
    border-spacing: 0;
}

.wb-kmeans-matrix__corner {
    width: 108px;
    min-width: 96px;
    border: 0;
    background: transparent;
}

.wb-kmeans-matrix__col-head {
    padding: 0 10px 12px;
    border: 0;
    background: transparent;
    color: var(--kmeans-col-color, #555);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.02em;
    vertical-align: bottom;
}

.wb-kmeans-matrix__col-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--kmeans-col-color, #555);
}

.wb-kmeans-matrix__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: block;
    color: inherit;
    overflow: visible;
}

.wb-kmeans-matrix__icon path {
    stroke: currentColor;
}

.wb-kmeans-matrix__icon--chat {
    width: 17px;
    height: 16px;
    color: var(--kmeans-col-color, #f0717a);
}

.wb-kmeans-matrix__icon--chat path {
    fill: currentColor;
    fill-opacity: 0.2;
    stroke: currentColor;
}

.wb-kmeans-matrix__icon--star {
    width: 23px;
    height: 23px;
    color: var(--kmeans-col-color, #6b9fff);
}

.wb-kmeans-matrix__row-head {
    width: 108px;
    min-width: 96px;
    padding: 0 12px 0 0;
    border: 0;
    background: transparent;
    vertical-align: middle;
}

.wb-kmeans-matrix__row-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    height: 100%;
    padding: 0 4px 0 2px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.wb-kmeans-matrix__row-btn:hover,
.wb-kmeans-matrix__row-btn:focus-visible {
    background: transparent;
    outline: none;
}

.wb-kmeans-matrix__row-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b6b73;
    letter-spacing: -0.01em;
}

.wb-kmeans-matrix__row-count {
    display: none;
}

.wb-kmeans-matrix__cell {
    padding: 0 6px;
    border: 0;
    vertical-align: middle;
    background: transparent;
}

/* subtle vertical separators between feature columns */
.wb-kmeans-matrix tbody .wb-kmeans-matrix__cell + .wb-kmeans-matrix__cell {
    border-left: 1px solid #f0f0f3;
}

.wb-kmeans-matrix thead .wb-kmeans-matrix__col-head + .wb-kmeans-matrix__col-head {
    border-left: 1px solid transparent;
}

.wb-kmeans-matrix__cell-btn {
    display: block;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: none;
    border-radius: 12px;
}

.wb-kmeans-matrix__cell-btn:hover .wb-kmeans-matrix__track,
.wb-kmeans-matrix__cell-btn:focus-visible .wb-kmeans-matrix__track {
    box-shadow: none;
    filter: none;
}

.wb-kmeans-matrix__track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 42px;
    border-radius: 12px;
    /* светлый оттенок цвета столбца — «пустая» часть ячейки */
    background: var(--kmeans-track-bg, #f6f6f8);
    border: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.wb-kmeans-matrix__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 4px;
    /* полная высота ячейки, скругление как у трека */
    border-radius: 12px;
    opacity: 1;
}

.wb-kmeans-matrix__cell--empty .wb-kmeans-matrix__track {
    background: var(--kmeans-track-bg, #f6f6f8);
}

/* KMeans cluster modal — histogram cards */
body.wb-kmeans-modal-open {
    overflow: hidden;
}

.wb-kmeans-modal {
    position: fixed;
    inset: 0;
    /* выше .main-header (z-index: 15000), чтобы не перекрывался шапкой */
    z-index: 16000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* отступ под fixed header (~70px) + запас */
    padding: calc(var(--header-height, 70px) + 24px) 24px 24px;
    box-sizing: border-box;
    overflow: auto;
}

.wb-kmeans-modal.hidden {
    display: none;
}

.wb-kmeans-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 22, 0.4);
    backdrop-filter: blur(2px);
}

.wb-kmeans-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(calc(100vh - var(--header-height, 70px) - 48px), 900px);
    /* overflow hidden: скругление сохраняется и слева, и справа при скролле */
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.wb-kmeans-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f3f5;
    color: #666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.wb-kmeans-modal__close:hover {
    background: #e8e8ec;
    color: #222;
}

/* Прокрутка внутри диалога — углы карточки не «ломаются» scrollbar'ом */
.wb-kmeans-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px 12px 18px 20px;
    box-sizing: border-box;
    /* место под scrollbar внутри скругления */
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d6 transparent;
}

.wb-kmeans-modal__body::-webkit-scrollbar {
    width: 8px;
}

.wb-kmeans-modal__body::-webkit-scrollbar-track {
    margin: 16px 0;
    background: transparent;
}

.wb-kmeans-modal__body::-webkit-scrollbar-thumb {
    background: #d0d0d6;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background-clip: padding-box;
}

.wb-kmeans-modal__body::-webkit-scrollbar-thumb:hover {
    background: #b8b8c0;
    border: 2px solid #ffffff;
    background-clip: padding-box;
}

.wb-kmeans-modal__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding-right: 40px;
}

.wb-kmeans-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #171615;
}

.wb-kmeans-modal__subtitle {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #9a9aa2;
}

.wb-kmeans-modal__charts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wb-kmeans-hist-card {
    padding: 16px 16px 12px;
    border: 1px solid #e8eef8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(30, 60, 120, 0.05);
}

.wb-kmeans-hist-card__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-align: center;
}

.wb-kmeans-hist-card__title .wb-kmeans-matrix__icon {
    width: 18px;
    height: 18px;
    color: var(--kmeans-col-color, #ff9a5c);
    flex: 0 0 auto;
}

.wb-kmeans-hist-card__title .wb-kmeans-matrix__icon--star {
    width: 20px;
    height: 20px;
}

.wb-kmeans-hist-card__title .wb-kmeans-matrix__icon--chat {
    width: 18px;
    height: 17px;
}

.wb-kmeans-hist-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 12px;
}

.wb-kmeans-hist-note {
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    text-align: center;
    width: fit-content;
    font-family: "Onest", "Inter", sans-serif;
    border: 1px solid #e2e8f0;
}

.wb-kmeans-hist-card__plot {
    position: relative;
    width: 100%;
    height: 260px;
    min-height: 220px;
}

.wb-kmeans-hist-card__plot > canvas {
    width: 100% !important;
    height: 100% !important;
}

/* WB: таблицы аномалий с раскрываемой выручкой по дням */
.wb-anomaly-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
    gap: 18px;
    margin: 18px 0 4px;
    align-items: start;
}

.wb-kmeans-objective-panel {
    margin: 18px 0 24px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wb-kmeans-objective-head {
    margin-bottom: 12px;
}

.wb-kmeans-objective-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: #171615;
}

.wb-kmeans-objective-subtitle {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.35;
    color: #777;
}

.wb-kmeans-obj-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.wb-kmeans-obj-tab {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #e6e6ea;
    border-radius: 10px;
    background: #ffffff;
    color: #6b6b73;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wb-kmeans-obj-tab:hover {
    border-color: #d0d0d6;
    color: #333;
}

.wb-kmeans-obj-tab.is-active {
    border-color: #ff9a5c;
    background: #fff4ec;
    color: #c45a12;
}

.wb-kmeans-obj-panel {
    display: none;
}

.wb-kmeans-obj-panel.is-active {
    display: block;
}

.wb-kmeans-objective-tables {
    grid-template-columns: repeat(auto-fit, minmax(760px, 1fr));
    margin-top: 0;
}

.wb-kmeans-objective-tables .wb-anomaly-table {
    min-width: 760px;
}

.wb-anomaly-table-wrap {
    min-width: 0;
}

.wb-anomaly-table-scroll {
    overflow-x: auto;
}

/* Пустой список: блок той же формы, текст по центру */
.seller-table-scroll--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 24px 16px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fafafa;
    overflow: hidden;
}

.seller-table-empty {
    font-size: 14px;
    font-weight: 650;
    color: #9a9aa2;
    text-align: center;
    line-height: 1.4;
}

.seller-table-wrap--col .wb-anomaly-table {
    table-layout: fixed;
}

.seller-table-wrap--col .wb-anomaly-table .wb-anomaly-th-product,
.seller-table-wrap--col .wb-anomaly-table td.wb-anomaly-product-cell {
    width: auto;
}

.seller-table-wrap--col .wb-anomaly-table .num,
.seller-table-wrap--col .wb-anomaly-table th:nth-child(n+2) {
    width: 118px;
    text-align: center;
}

.seller-table-wrap--col .wb-anomaly-table th:last-child,
.seller-table-wrap--col .wb-anomaly-table td:last-child {
    width: 138px;
    text-align: center;
}

.seller-table-wrap--col .wb-anomaly-table .wb-anomaly-rating-val {
    color: #f59e0b;
    font-weight: 700;
}

.wb-anomaly-table td.wb-anomaly-product-cell {
    position: relative;
    padding-left: 14px;
    padding-right: 46px;
    cursor: pointer;
    white-space: normal;
}

.wb-anomaly-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 1px solid #ffd9c2;
    border-radius: 50%;
    background: #fff7f1;
    color: var(--primary-orange);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s ease, border-color .15s ease;
}

.wb-anomaly-toggle:hover {
    background: #fff0e4;
    border-color: #ffc79d;
}

.wb-anomaly-toggle__icon {
    position: absolute;
    left: 7px;
    top: 6px;
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(-45deg);
    transition: transform .15s ease, top .15s ease;
}

.wb-anomaly-table tr.is-expanded .wb-anomaly-toggle__icon {
    top: 5px;
    transform: rotate(45deg);
}

.wb-anomaly-product-main {
    display: block;
    min-width: 0;
}

/* Ссылка на товар — только по ширине текста, остальное место ячейки для toggle */
.wb-anomaly-table .wb-anomaly-product-cell .seller-name {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.wb-anomaly-detail-row.hidden {
    display: none;
}

.wb-anomaly-table .wb-anomaly-detail-row td {
    padding: 12px 14px 16px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    background: #ffffff;
}

.wb-revenue-detail {
    border: 1px solid #e8eef8;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 14px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.wb-revenue-detail__title {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b7280;
}

.wb-revenue-chart {
    position: relative;
    height: 260px;
    min-height: 260px;
    overflow: hidden;
    padding: 4px 0 2px;
    background: #ffffff;
    border-radius: 12px;
}

.wb-revenue-detail-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff;
}

.wb-revenue-interval-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    max-width: 240px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(30, 30, 30, 0.95);
    color: #ffffff;
    font: 500 12px "Onest", "Inter", sans-serif;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px) scale(0.97);
    transform-origin: left top;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.wb-revenue-interval-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.wb-revenue-interval-tooltip__title {
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.wb-revenue-interval-tooltip__row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    white-space: nowrap;
}

.wb-revenue-interval-tooltip__row + .wb-revenue-interval-tooltip__row {
    margin-top: 4px;
}

.wb-revenue-interval-tooltip__row--plain {
    display: block;
}

.wb-revenue-interval-tooltip__swatch {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: #ff9a5c;
    flex: 0 0 auto;
}

.wb-revenue-bar {
    display: grid;
    grid-template-rows: 118px auto auto;
    justify-items: center;
    gap: 5px;
    min-width: 48px;
}

.wb-revenue-bar__track {
    display: flex;
    align-items: flex-end;
    width: 24px;
    height: 118px;
    border-radius: 999px;
    background: #ffe8d8;
    overflow: hidden;
}

.wb-revenue-bar__track span {
    display: block;
    width: 100%;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #ffb06b, var(--primary-orange));
}

.wb-revenue-bar__date {
    font-size: 10.5px;
    font-weight: 700;
    color: #7a7a7a;
    white-space: nowrap;
}

.wb-revenue-bar__value {
    font-size: 10.5px;
    color: #a0a0a0;
    white-space: nowrap;
}

.wb-revenue-empty {
    border: 1px dashed #f0d6c5;
    border-radius: 10px;
    background: #fffaf6;
    color: #9a9a9a;
    font-size: 12px;
    padding: 12px 14px;
}

@media (max-width: 720px) {
    .wb-kmeans-controls {
        flex-wrap: wrap;
    }

    .wb-kmeans-scale-control {
        flex: 1 1 220px;
    }

    .wb-kmeans-clusters {
        grid-template-columns: 1fr;
    }

    .wb-kmeans-cell {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .wb-kmeans-heatbar {
        height: 38px;
    }

    .wb-anomaly-tables {
        grid-template-columns: 1fr;
    }

    .seller-table-wrap--col .wb-anomaly-table .num,
    .seller-table-wrap--col .wb-anomaly-table th:nth-child(n+2) {
        width: 96px;
    }
}

/* ==========================================================================
   ML-анализ — пузырьковые диаграммы (importance / score / эффективность)
   ========================================================================== */
.bubble-chart {
    display: grid;
    grid-template-columns: minmax(210px, 280px) 1fr;
    gap: 28px;
    align-items: center;
    margin: 18px 0 6px;
    padding: 8px 0;
    font-family: "Onest", "Segoe UI", sans-serif;
}

/* Дополнительные обёртки нужны только для мобильного переворота карточки.
   На широком экране display: contents сохраняет прежнюю двухколоночную сетку. */
.bubble-chart__flip-inner,
.bubble-chart__face {
    display: contents;
}

.bubble-chart__face--plot > .bubble-chart__title,
.bubble-chart__flip-hint {
    display: none;
}

.bubble-chart + .bubble-chart {
    border-top: 1px solid #f0f0f0;
    padding-top: 18px;
}

.bubble-chart__aside {
    min-width: 0;
    align-self: start;
    padding-top: 6px;
}

.bubble-chart__title {
    font-weight: 800;
    font-size: 23px;
    letter-spacing: -0.01em;
    color: #171615;
    margin: 0 0 7px;
}

.bubble-chart__subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: #9a9a9a;
    margin-bottom: 18px;
    max-width: 250px;
}

.bubble-legend {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bubble-legend__item {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 17px;
    line-height: 1.15;
    color: #444;
    cursor: default;
    border-radius: 8px;
    padding: 2px 6px;
    transition: background 0.15s ease;
}

.bubble-legend__item:hover,
.bubble-legend__item.is-active {
    background: #fff4ec;
}

/* Маркер-«бублик»: одно красивое кольцо, без привязки к цвету кружка. */
.bubble-legend__dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: transparent;
    border: 2.5px solid #ff7a36;
    box-shadow: 0 0 0 3px rgba(255, 122, 54, 0.10);
}

.bubble-legend__label {
    font-weight: 600;
    color: #222;
    word-break: break-word;
}

.bubble-legend__value {
    color: #9a9a9a;
    white-space: nowrap;
}

.bubble-chart__plot {
    min-width: 0;
    width: 100%;
}

.bubble-chart__plot svg {
    display: block;
    width: 100%;
    height: clamp(420px, 80vh, 900px);
    overflow: visible;
}

.bubble {
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.18s ease;
}

.bubble:hover,
.bubble.is-active {
    transform: scale(1.05);
}

.bubble circle {
    pointer-events: all;
    transition: filter 0.18s ease;
}

.bubble:hover circle,
.bubble.is-active circle {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.14));
}

.bubble__value {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-weight: 600;
}

.bubble__label {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-weight: 500;
}

.bubble-empty {
    color: #666;
    font-size: 13px;
    margin: 8px 0;
}

.bubble-tooltip {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    pointer-events: none;
    background: rgba(28, 28, 28, 0.96);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    max-width: 280px;
}

.bubble-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bubble-tooltip__title {
    font-weight: 750;
    font-size: 13.5px;
    margin-bottom: 4px;
}

.bubble-tooltip__row {
    color: #e7e7e7;
}

@media (max-width: 720px) {
    .bubble-chart {
        grid-template-columns: 1fr;
    }

    .bubble-chart__subtitle {
        max-width: none;
    }
}

/* ==========================================================================
   ML — детализация характеристик: flip-карточки (легенда ↔ bubble-chart)
   ========================================================================== */
.tech-detail-section {
    margin: 28px 0 10px;
    font-family: "Onest", "Segoe UI", sans-serif;
}

.tech-detail-section > .bubble-chart__title {
    margin-bottom: 18px;
}

.tech-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.tech-flip-card {
    position: relative;
    min-height: 340px;
    height: 360px;
    perspective: 1200px;
    cursor: pointer;
    outline: none;
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tech-flip-card:hover,
.tech-flip-card:focus-visible {
    transform: translateY(-2px);
}

.tech-flip-card.is-flipped:hover,
.tech-flip-card.is-flipped:focus-visible {
    transform: translateY(-2px);
}

.tech-flip-card:focus-visible .tech-flip-card__face {
    box-shadow:
        0 0 0 3px rgba(255, 122, 54, 0.35),
        0 16px 36px rgba(29, 26, 20, 0.10);
}

.tech-flip-card--empty {
    cursor: default;
    height: auto;
    min-height: 140px;
}

.tech-flip-card--empty:hover {
    transform: none;
}

.tech-flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.tech-flip-card.is-flipped .tech-flip-card__inner {
    transform: rotateY(180deg);
}

.tech-flip-card__face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 18px 14px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(255, 220, 186, 0.35), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 34px rgba(29, 26, 20, 0.07);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    transform: rotateY(0deg);
}

.tech-flip-card__face--static {
    position: relative;
    min-height: 120px;
    transform: none;
}

.tech-flip-card__face--back {
    transform: rotateY(180deg);
}

.tech-flip-card__face--front .tech-flip-card__hint {
    display: none;
}

.tech-flip-card__title {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: #171615;
    line-height: 1.25;
    margin: 0;
    flex: 0 0 auto;
}

.tech-flip-card__subtitle {
    font-size: 12.5px;
    color: #9a9a9a;
    line-height: 1.3;
    margin: -2px 0 4px;
    flex: 0 0 auto;
}

.tech-flip-card__legend {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    gap: 1px;
}

.tech-flip-card__legend .bubble-legend__item {
    font-size: 14px;
    padding: 3px 4px;
    gap: 8px;
}

.tech-flip-card__legend .bubble-legend__dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(255, 122, 54, 0.10);
}

.tech-flip-card__plot {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-flip-card__plot svg {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 260px;
    overflow: visible;
}

.tech-flip-card__hint {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 8px;
    font-size: 12px;
    color: #b0aaa3;
    text-align: center;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.tech-flip-card:hover .tech-flip-card__hint,
.tech-flip-card:focus-visible .tech-flip-card__hint {
    color: #ff7a36;
}

@media (max-width: 1100px) {
    .tech-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .tech-detail-grid {
        grid-template-columns: 1fr;
    }

    .tech-flip-card {
        height: 320px;
        min-height: 300px;
    }
}

/* ==========================================================================
   FILTER CARD — оформление как в «for claude» (scoped под .filter-card-new)
   ========================================================================== */
.filter-card-new {
    --fcn-border: #cccccc;
    --fcn-text-muted: #b3b3b3;
    --fcn-text-main: #292827;
    --fcn-text-strong: #171615;
    --fcn-shadow-soft: 0 24px 60px rgba(29, 26, 20, 0.08);

    font-family: "Onest", "Segoe UI", sans-serif;
    color: var(--fcn-text-main);
    padding: 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--fcn-shadow-soft);
    /* НЕ используем backdrop-filter/transform на карточке: иначе position:fixed модалок
       будет считаться относительно карточки, а не вьюпорта, и окно не накроет всю страницу. */
    /* лёгкий тёплый градиент внутри карточки — «матовый» вид без смены фона страницы */
    background-image:
        radial-gradient(circle at top left, rgba(255, 220, 186, 0.28), transparent 30%),
        radial-gradient(circle at bottom right, rgba(213, 227, 255, 0.28), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 247, 244, 0.94) 100%);
}

.filter-card-new .fcn-header { margin-bottom: 18px; }
.filter-card-new .breadcrumb { font-size: 14px; color: var(--fcn-text-muted); }
.filter-card-new .breadcrumb .active { color: var(--fcn-text-strong); font-weight: 600; }

/* ---- поиск: название/артикул + магазин + бренд — 3 равных блока, у каждого иконка ---- */
.filter-card-new .fcn-search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.filter-card-new .fcn-search-prefix {
    flex: 0 0 auto;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 16px;
    border: 1pt solid var(--fcn-border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--fcn-text-strong);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.filter-card-new .fcn-exclude-row {
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}
.filter-card-new .fcn-search-field {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}
.filter-card-new .fcn-search-input {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1pt solid var(--fcn-border);
    background: rgba(255, 255, 255, 0.98);
    padding: 0 52px 0 18px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--fcn-text-main);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.filter-card-new .fcn-search-input::placeholder { color: var(--fcn-text-muted); }
.filter-card-new .fcn-search-input:focus {
    outline: none;
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.filter-card-new .fcn-search-btn,
.filter-card-new .search-action,
.search-action {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    padding: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 3;
}
.search-action-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 101px;
    height: 101px;
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.search-action-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-action-icon svg {
    width: 17px;
    height: 17px;
}
.search-action:hover,
.filter-card-new .fcn-search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 10px 18px rgba(255, 112, 33, 0.22);
}
.search-action:focus-visible,
.filter-card-new .fcn-search-btn:focus-visible {
    outline: 2px solid #ff7425;
    outline-offset: 2px;
}
.filter-card-new .fcn-search-btn img { width: 17px; height: 17px; filter: invert(1) brightness(1.6); }

/* ---- тулбар со сворачиванием «Фильтры» ---- */
.filter-card-new .fcn-toolbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}
.filter-card-new .fcn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 4px 2px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    color: var(--fcn-text-strong);
    cursor: pointer;
}
.filter-card-new .fcn-toggle-icon { display: inline-flex; color: var(--fcn-text-strong); }
.filter-card-new .fcn-toggle-icon svg { width: 18px; height: 18px; }
.filter-card-new .fcn-toggle-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--fcn-text-strong);
    border-bottom: 2px solid var(--fcn-text-strong);
    transform: rotate(-135deg);
    transition: transform 180ms ease;
    margin-left: 2px;
}
.filter-card-new .fcn-toggle.is-collapsed .fcn-toggle-chevron { transform: rotate(45deg); }

/* ---- сворачиваемое тело фильтров ---- */
.filter-card-new .filters-body { overflow: visible; }
.filter-card-new .filters-body.collapsed { display: none; }

/* ---- раскладка: фильтры | черта | категории ---- */
.filter-card-new .filters-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px 300px;
    gap: 0 26px;
    align-items: stretch;
}
.filter-card-new .filters-main { min-width: 0; }
.filter-card-new .filters-divider {
    width: 1px;
    background: rgba(204, 204, 204, 0.7);
    align-self: stretch;
}
.filter-card-new .filters-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
}

/* ---- поле-диапазон ---- */
.filter-card-new .range-field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border-radius: 16px;
    border: 1pt solid var(--fcn-border);
    background: rgba(255, 255, 255, 0.98);
    padding: 0 6px;
    flex: 1 1 calc(25% - 12px);  /* 4 в ряд; нижний ряд растягивается за счёт flex-grow */
    min-width: 150px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.filter-card-new .range-field:hover {
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.filter-card-new .range-field::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 13px;
    height: 13px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.29 14.29'%3E%3Cpath fill='none' stroke='%23f75f03' stroke-miterlimit='10' stroke-width='1.08' d='M7.14 2.74v8.81M4.94 9.48l.64.48c.86.64 2.25.64 3.11 0 .86-.64.86-1.69 0-2.33-.43-.32-.99-.48-1.56-.48-.53 0-1.06-.16-1.47-.48-.81-.64-.81-1.69 0-2.33s2.13-.64 2.94 0l.3.24M13.75 7.14c0 3.65-2.96 6.6-6.6 6.6S.54 10.79.54 7.14 3.5.54 7.14.54s6.6 2.96 6.6 6.6Z'/%3E%3C/svg%3E");
}
/* Иконка для фильтров рейтинга (звезда) */
.filter-card-new .range-field[aria-label*="Рейтинг"]::after,
.filter-card-new .range-field[aria-label*="рейтинг"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.77 14.15'%3E%3Cpath fill='none' stroke='%23f75f03' stroke-miterlimit='10' stroke-width='1.08' d='M7,.8c.09-.21.33-.32.55-.23.1.04.19.13.23.23l1.59,3.82c.06.15.2.25.36.26l4.13.33c.37.03.52.5.24.74l-3.14,2.69c-.12.1-.17.26-.14.42l.96,4.03c.05.23-.09.45-.31.51-.11.03-.22,0-.32-.05l-3.53-2.16c-.13-.08-.3-.08-.44,0l-3.53,2.16c-.2.12-.46.06-.58-.14-.06-.09-.08-.21-.05-.32l.96-4.03c.04-.15-.02-.31-.14-.42L.69,5.95c-.18-.15-.2-.42-.05-.59.07-.09.18-.14.29-.15l4.13-.33c.16-.01.29-.11.36-.26l1.59-3.82h0Z'/%3E%3C/svg%3E");
}
/* Иконка для фильтров отзывов/оценок (группа людей) */
.filter-card-new .range-field[aria-label*="Отзыв"]::after,
.filter-card-new .range-field[aria-label*="отзыв"]::after,
.filter-card-new .range-field[aria-label*="оценок"]::after,
.filter-card-new .range-field[aria-label*="Оценок"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.76 13.18'%3E%3Cpath fill='none' stroke='%23f75f03' stroke-miterlimit='10' stroke-width='1.08' d='M11.59,11.04c.89.07,1.78-.04,2.62-.34.09-1.16-.77-2.17-1.93-2.27-.48-.04-.96.09-1.36.36M11.59,11.04v.02c0,.16,0,.31-.03.47-1.27.73-2.72,1.11-4.18,1.11-1.52,0-2.95-.4-4.18-1.11-.02-.16-.03-.33-.03-.49M11.59,11.04c0-.79-.23-1.57-.66-2.24M10.93,8.8c-.77-1.21-2.11-1.95-3.55-1.94-1.44,0-2.78.73-3.55,1.94M3.83,8.8c-.96-.65-2.27-.41-2.92.55-.27.4-.4.88-.36,1.36.84.3,1.74.41,2.62.33M3.83,8.8c-.43.67-.66,1.45-.66,2.24M9.48,2.64c0,1.16-.94,2.1-2.1,2.1s-2.1-.94-2.1-2.1.94-2.1,2.1-2.1,2.1.94,2.1,2.1ZM13.69,4.75c0,.87-.71,1.58-1.58,1.58s-1.58-.71-1.58-1.58.71-1.58,1.58-1.58,1.58.71,1.58,1.58ZM4.22,4.75c0,.87-.71,1.58-1.58,1.58s-1.58-.71-1.58-1.58.71-1.58,1.58-1.58,1.58.71,1.58,1.58Z'/%3E%3C/svg%3E");
}
/* Иконка для фильтров заказов (машинка с людьми) */
.filter-card-new .range-field[aria-label*="Заказ"]::after,
.filter-card-new .range-field[aria-label*="заказ"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21.61 20.67'%3E%3Cg%3E%3Cpath fill='%23ffd3b6' d='M1.38,0C.62,0,0,.62,0,1.38v5.25h8.84V1.38c0-.76-.62-1.38-1.38-1.38H1.38ZM8.84,7.73H0v1.93c0,.76.62,1.38,1.38,1.38h.28c0-1.22.99-2.21,2.21-2.21s2.21.99,2.21,2.21h2.21c.31,0,.55-.25.55-.55v-2.76Z'/%3E%3Cpath fill='%23ffd3b6' d='M4.97,11.05c0-.61-.49-1.1-1.1-1.1s-1.1.49-1.1,1.1.49,1.1,1.1,1.1,1.1-.49,1.1-1.1ZM10.5,1.66c-.31,0-.55.25-.55.55v8.29c0,.06.01.13.03.18.2-1.2,1.34-2.01,2.55-1.81,1.05.18,1.83,1.08,1.84,2.15.63-.13,1.12-.69,1.08-1.39-.16-2.7-1.12-5.29-2.75-7.44-.26-.34-.66-.54-1.08-.53h-1.11Z'/%3E%3Cpath fill='%23ffd3b6' d='M13.26,11.05c0-.61-.49-1.1-1.1-1.1s-1.1.49-1.1,1.1.49,1.1,1.1,1.1,1.1-.49,1.1-1.1Z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%23f75f03' stroke-miterlimit='10' stroke-width='1.08' d='M18.44,18.53c.89.07,1.78-.04,2.62-.34.09-1.16-.77-2.17-1.93-2.27-.48-.04-.96.09-1.36.36M18.44,18.53v.02c0,.16,0,.31-.03.47-1.27.73-2.72,1.11-4.18,1.11-1.52,0-2.95-.4-4.18-1.11-.02-.16-.03-.33-.03-.49M18.44,18.53c0-.79-.23-1.57-.66-2.24M17.78,16.28c-.77-1.21-2.11-1.95-3.55-1.94-1.44,0-2.78.73-3.55,1.94M10.68,16.28c-.96-.65-2.27-.41-2.92.55-.27.4-.4.88-.36,1.36.84.3,1.74.41,2.62.33M10.68,16.28c-.43.67-.66,1.45-.66,2.24M16.33,10.13c0,1.16-.94,2.1-2.1,2.1s-2.1-.94-2.1-2.1.94-2.1,2.1-2.1,2.1.94,2.1,2.1ZM20.54,12.24c0,.87-.71,1.58-1.58,1.58s-1.58-.71-1.58-1.58.71-1.58,1.58-1.58,1.58.71,1.58,1.58ZM11.07,12.24c0,.87-.71,1.58-1.58,1.58s-1.58-.71-1.58-1.58.71-1.58,1.58-1.58,1.58.71,1.58,1.58Z'/%3E%3C/svg%3E");
}
.filter-card-new .range-input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    border: 0;
    background: transparent;
    outline: none;
    padding: 0 8px;
    min-height: 46px;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    color: var(--fcn-text-main);
}
/* По умолчанию поля делятся пополам. Левое ("...от") не опускается ниже
   половины (min-width:50%), но при длинной подписи расширяется по содержимому
   (field-sizing) — перегородка сдвигается только когда текст реально не влезает.
   Фолбэк (для браузеров без field-sizing) — ровное деление пополам. */
.filter-card-new .range-input:first-of-type { flex: 1 1 0; }
.filter-card-new .range-input:last-of-type { flex: 1 1 0; }

@supports (field-sizing: content) {
    .filter-card-new .range-input:first-of-type {
        field-sizing: content;
        flex: 0 1 auto;
        min-width: 50%;
        max-width: 100%;
    }
    .filter-card-new .range-input:last-of-type {
        flex: 1 1 0;
    }
}
.filter-card-new .range-input::placeholder {
    color: var(--fcn-text-muted);
    text-overflow: ellipsis;
}
.filter-card-new .range-input[type="number"]::-webkit-inner-spin-button,
.filter-card-new .range-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.filter-card-new .range-input[type="number"] { -moz-appearance: textfield; }
.filter-card-new .range-divider { width: 1px; height: 26px; background: var(--fcn-border); flex-shrink: 0; }
.filter-card-new .range-field--single { flex: 1 1 220px; }

/* ---- панель категорий: выбор всего дерева в одной кнопке ---- */
.filter-card-new .filters-category { min-width: 0; }
.filter-card-new .group-label {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--fcn-text-muted);
    font-weight: 700;
    margin-bottom: 12px;
}
.filter-card-new .filters-category {
    display: flex;
    flex-direction: column;
    gap: 16px;  /* совпадает с gap сетки фильтров — кнопки на одном уровне с фильтрами */
}
.filter-card-new .category-tree-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-card-new .cat-tree-trigger {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    border: 1pt solid var(--fcn-border);
    background: rgba(255, 255, 255, 0.98);
    padding: 0 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--fcn-text-muted);
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.filter-card-new .cat-tree-trigger.has-value { color: var(--fcn-text-main); }
.filter-card-new .cat-tree-trigger:hover {
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.filter-card-new .cat-tree-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    background: #f5f4f2;
}
.filter-card-new .cat-tree-trigger:disabled:hover { transform: none; box-shadow: none; border-color: var(--fcn-border); }
.filter-card-new .cat-tree-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.filter-card-new .cat-tree-arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 2px solid var(--fcn-text-muted);
    border-bottom: 2px solid var(--fcn-text-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
}

/* ---- всплывающие окна выбора категории / модели ---- */
.filter-card-new .fcn-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;        /* выше шапки (z-index:15000), чтобы окно накрывало и блюрило её тоже */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.filter-card-new .fcn-modal.hidden { display: none !important; }
.filter-card-new .fcn-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 16, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.filter-card-new .fcn-modal-card {
    position: relative;
    z-index: 1;
    width: min(540px, 100%);
    height: min(620px, 86vh);   /* фиксированная высота — не сжимается при поиске */
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    padding: 18px;
}
.filter-card-new .fcn-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.filter-card-new .fcn-modal-title { font-size: 19px; font-weight: 600; color: var(--fcn-text-strong); }
.filter-card-new .fcn-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1pt solid var(--fcn-border);
    background: #fff;
    color: var(--fcn-text-main);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 160ms ease, color 160ms ease;
}
.filter-card-new .fcn-modal-close:hover { border-color: #f75f03; color: #f75f03; }

.filter-card-new .cat-tree-search {
    width: 100%;
    min-height: 40px;
    border-radius: 12px;
    border: 1pt solid var(--fcn-border);
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--fcn-text-main);
    margin-bottom: 8px;
}
.filter-card-new .cat-tree-search:focus {
    outline: none;
    border-color: #afafaf;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.filter-card-new .cat-tree-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* Список моделей: flex-колонка с не сжимаемыми пунктами (grid в fixed-height модалке схлопывал строки) */
.filter-card-new .model-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.filter-card-new .model-list .xsubject-item {
    flex: 0 0 auto;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    overflow: hidden;
}
.filter-card-new .model-list .xsubject-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    cursor: pointer;
    position: relative;
}
.filter-card-new .model-list .xsubject-item .name {
    font-size: 14px;
    color: #292827;
    line-height: 1.25;
}
.filter-card-new .model-list .xsubject-item small,
#subjectNodeList .xsubject-item small {
    display: none !important;
}

/* узлы дерева */
.filter-card-new .cat-node-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    padding: 7px 8px;
    cursor: pointer;
    transition: background-color 140ms ease;
}
.filter-card-new .cat-node-row:hover { background: rgba(23, 22, 21, 0.05); }
.filter-card-new .cat-node-row.is-selected { background: rgba(247, 95, 3, 0.1); }
.filter-card-new .cat-node-caret {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fcn-text-muted);
}
.filter-card-new .cat-node-caret::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 160ms ease;
}
.filter-card-new .cat-node.is-open > .cat-node-row > .cat-node-caret::before { transform: rotate(45deg); }
.filter-card-new .cat-node-caret.is-leaf::before { content: none; }
.filter-card-new .cat-node-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    color: var(--fcn-text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filter-card-new .cat-node-children { display: none; padding-left: 16px; }
.filter-card-new .cat-node.is-open > .cat-node-children { display: block; }
.filter-card-new .cat-tree-empty { padding: 12px 8px; font-size: 14px; color: var(--fcn-text-muted); }
/* плоские результаты поиска внутри дерева */
.filter-card-new .cat-flat-item { display: block; }
.filter-card-new .cat-flat-path { margin-top: 2px; font-size: 12px; color: var(--fcn-text-muted); }

/* кнопка «назад» — сброс категории */
.filter-card-new .cat-back-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1pt solid var(--fcn-border);
    background: #fff;
    color: var(--fcn-text-main);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.filter-card-new .cat-back-btn svg { width: 18px; height: 18px; }
.filter-card-new .cat-back-btn:hover { border-color: #f75f03; color: #f75f03; background: #fff7f2; }

/* кнопки внутри панели моделей */
.filter-card-new .btn-reset-filters {
    border-radius: 12px;
    font-family: inherit;
    height: 44px;
    border: 1pt solid var(--fcn-border);
    background: #fff;
    color: var(--fcn-text-main);
}
.filter-card-new .btn-reset-filters:hover {
    border-color: #afafaf;
    color: var(--fcn-text-strong);
    background: #f7f7f5;
}

/* ---- футер: чипы выбранных фильтров + «Применить» ---- */
.filter-card-new .fcn-footer {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(204, 204, 204, 0.5);
}
.filter-card-new .active-filters {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.filter-card-new .active-filters:empty { display: none; }
.filter-card-new .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px 7px 14px;
    border-radius: 999px;
    border: 1pt solid var(--fcn-border);
    background: rgba(255, 255, 255, 0.98);
    font-size: 14px;
    font-weight: 500;
    color: var(--fcn-text-main);
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.filter-card-new .filter-chip:hover { border-color: #afafaf; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06); }
.filter-card-new .filter-chip .chip-label { color: var(--fcn-text-muted); }
.filter-card-new .filter-chip .chip-value { color: var(--fcn-text-strong); font-weight: 600; }
.filter-card-new .filter-chip.is-pending-remove {
    border-color: #f4b4a2;
    background: #fff4ef;
}
.filter-card-new .filter-chip.is-pending-remove .chip-label,
.filter-card-new .filter-chip.is-pending-remove .chip-value {
    text-decoration: line-through;
    opacity: 0.62;
}
.filter-card-new .filter-chip .chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(23, 22, 21, 0.06);
    color: var(--fcn-text-main);
    font-size: 14px;
    line-height: 1;
    transition: background 160ms ease, color 160ms ease;
}
.filter-card-new .filter-chip .chip-remove:hover { background: #f75f03; color: #fff; }
.filter-card-new .filter-chip.is-pending-remove .chip-remove { background: #f75f03; color: #fff; }

.filter-card-new .apply-button {
    min-width: 172px;
    min-height: 48px;
    padding: 0 26px;
    margin-left: auto;          /* «Применить» всегда справа, даже без чипов */
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #171615 0%, #2d2926 100%);
    color: #f5f2ec;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 16px 30px rgba(23, 22, 21, 0.24);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.filter-card-new .apply-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #22201e 0%, #393430 100%);
    box-shadow: 0 18px 34px rgba(23, 22, 21, 0.28);
}
.filter-card-new .apply-button:active { transform: translateY(0); }
.filter-card-new .apply-button--sm {
    min-width: 120px;
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
    margin-left: 0;
    box-shadow: 0 10px 20px rgba(23, 22, 21, 0.2);
}

/* кнопка «Сбросить» рядом с «Применить» */
.filter-card-new .reset-all-btn {
    min-width: 132px;
    min-height: 48px;
    padding: 0 22px;
    margin-left: auto;          /* группа кнопок прижата вправо */
    border: 1pt solid var(--fcn-border);
    border-radius: 16px;
    background: #fff;
    color: var(--fcn-text-main);
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.filter-card-new .reset-all-btn:hover {
    border-color: #f75f03;
    color: #f75f03;
    background: #fff7f2;
}
/* когда есть и сброс, и применить — auto-отступ держит только первая кнопка */
.filter-card-new .reset-all-btn + .apply-button { margin-left: 0; }

/* ---- сортировка в стиле фильтров ---- */
.results-stats-bar .table-sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.results-stats-bar .sort-text {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #b3b3b3;
    margin: 0;
}
.fcn-sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 44px;
    border-radius: 16px;
    border: 1pt solid #cccccc;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0 40px 0 16px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #292827;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.fcn-sort-select:hover {
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.fcn-sort-select:focus {
    outline: none;
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.fcn-sort-select--mini { padding-right: 36px; }

/* ---- кастомный выпадающий список сортировки/лимита (в стиле фильтров) ---- */
.fcn-select {
    position: relative;
    font-family: "Onest", "Segoe UI", sans-serif;
}
.fcn-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    min-width: 230px;
    border-radius: 16px;
    border: 1pt solid #cccccc;
    background: rgba(255, 255, 255, 0.98);
    padding: 0 14px 0 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #292827;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.fcn-select--mini .fcn-select-trigger { min-width: 78px; }
.fcn-select-trigger:hover,
.fcn-select.is-open .fcn-select-trigger {
    border-color: #afafaf;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.fcn-select-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fcn-select-arrow {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
}
.fcn-select.is-open .fcn-select-arrow { transform: rotate(-135deg) translateY(-1px); }
.fcn-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 50;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(204, 204, 204, 0.92);
    background: #fff;
    box-shadow: 0 20px 40px rgba(18, 18, 18, 0.14);
}
.fcn-select-menu.hidden { display: none !important; }
.fcn-select-option {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 15px;
    color: #292827;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 140ms ease;
}
.fcn-select-option:hover { background: rgba(23, 22, 21, 0.05); }
.fcn-select-option.is-selected { background: rgba(247, 95, 3, 0.1); font-weight: 600; }

/* ---- адаптив ---- */
/* MacBook Air 13" (1101px - 1440px) */
@media (min-width: 1101px) and (max-width: 1440px) {
    .filter-card-new .range-field { flex-basis: calc(33.333% - 11px); }
    .filter-card-new.ozon-filter-card .range-field:nth-child(n+4) { flex-basis: calc(50% - 8px); }
}
@media (max-width: 1100px) {
    .filter-card-new .filters-layout { grid-template-columns: 1fr; }
    .filter-card-new .filters-divider { display: none; }
    .filter-card-new .filters-category { margin-top: 18px; }
    .filter-card-new .range-field { flex-basis: calc(33.333% - 11px); }
}
@media (max-width: 720px) {
    .filter-card-new { padding: 22px 16px; border-radius: 24px; }
    .filter-card-new .fcn-search { flex-wrap: wrap; }
    .filter-card-new .fcn-search-prefix { flex-basis: 100%; min-height: 38px; justify-content: center; }
    .filter-card-new .fcn-exclude-row { grid-template-columns: 1fr; }
    .filter-card-new .fcn-search-input--main { flex-basis: 100%; padding-right: 50px; }
    .filter-card-new .search-action,
    .filter-card-new .fcn-search-btn {
        right: 6px;
        width: 38px;
        height: 38px;
        display: flex !important;
    }
    .filter-card-new .search-action-bg {
        width: 86px;
        height: 86px;
    }
    .filter-card-new.wb-filter-card > .fcn-search .fcn-search-input {
        padding-right: 50px;
        padding-left: 12px;
    }
    .filter-card-new.ozon-filter-card > .fcn-search .fcn-search-input {
        padding-right: 50px;
        padding-left: 12px;
    }
    .filter-card-new.ozon-filter-card .range-input:first-of-type {
        field-sizing: fixed;
        flex: 3 1 0;
        min-width: 0;
        max-width: none;
    }
    .filter-card-new.ozon-filter-card .range-input:last-of-type {
        flex: 2 1 0;
        min-width: 0;
    }
    .filter-card-new .range-field { flex-basis: calc(50% - 8px); }
    .filter-card-new .fcn-footer { flex-direction: column; align-items: stretch; }
    .filter-card-new .apply-button { width: 100%; margin-left: 0; }
}

/* ===== Модуль «История» ===== */
.wb-history-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wb-history-heading__name {
    font-size: 18px;
    font-weight: 800;
    color: #141414;
}
a.wb-history-heading__name {
    text-decoration: none;
    cursor: pointer;
}
a.wb-history-heading__name:hover,
a.wb-history-heading__name:focus-visible {
    color: var(--primary-orange);
    text-decoration: underline;
}
.wb-history-heading__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #dce7ff;
    background: #f0f5ff;
    color: #3b5bdb;
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    white-space: nowrap;
}

/* Переключатель размеров (как вкладки кластеров) */
.wb-history-per-size {
    margin: 4px 0 8px;
}
.wb-history-size-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}
.wb-history-size-tab {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #e6e6ea;
    border-radius: 10px;
    background: #ffffff;
    color: #6b6b73;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wb-history-size-tab:hover {
    border-color: #d0d0d6;
    color: #333;
}
.wb-history-size-tab.is-active {
    border-color: #ff9a5c;
    background: #fff4ec;
    color: #c45a12;
}
.wb-history-size-panel {
    display: none;
}
.wb-history-size-panel.is-active {
    display: block;
}
.wb-history-size-panel__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #6b6b73;
}
.wb-history-size-correlation__empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #ececef;
    background: #f7f7f8;
    color: #5a5a62;
    font-size: 14px;
    line-height: 1.45;
}
.wb-history-size-correlation__empty span {
    color: #8a8a93;
    font-size: 12.5px;
}

.wb-history-correlation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.wb-history-correlation-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.2;
}
.wb-history-correlation-subtitle {
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}
.wb-history-info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1px solid #aab2bf;
    border-radius: 50%;
    color: #8b94a3;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.wb-history-correlation-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(440px, 1.35fr);
    gap: 18px;
    align-items: stretch;
}
.wb-history-correlation-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    min-height: 560px;
    padding: 24px 28px 22px;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.wb-history-correlation-card__title {
    color: #0b0b0f;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.25;
}
.wb-history-correlation-card__subtitle {
    margin-top: 4px;
    color: #8b8f98;
    font-size: 12px;
    font-weight: 500;
}
.wb-history-correlation-card--matrix .wb-history-correlation-card__title {
    font-size: 15px;
}
.wb-size-corr-table-wrap {
    width: 100%;
    margin-top: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex: 1 1 auto;
}
.wb-size-corr-table {
    width: 100%;
    min-width: 420px;
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
}
.wb-size-corr-table th {
    height: 30px;
    color: #171717;
    font-size: 11px;
    font-weight: 750;
    text-align: center;
    white-space: nowrap;
}
.wb-size-corr-table tbody th {
    width: 58px;
    padding-right: 8px;
    text-align: left;
}
.wb-size-corr-table td {
    height: 38px;
    padding: 0;
}
.wb-size-corr-cell {
    width: 100%;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    background: linear-gradient(
        180deg,
        rgba(var(--corr-rgb, 255, 109, 0), calc(0.08 + var(--corr-alpha, 0) * 0.23)),
        rgba(var(--corr-rgb, 255, 109, 0), calc(0.05 + var(--corr-alpha, 0) * 0.16))
    );
    color: rgb(var(--corr-rgb, 255, 109, 0));
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.wb-size-corr-cell:hover,
.wb-size-corr-cell:focus-visible {
    border-color: rgba(var(--corr-rgb, 255, 109, 0), 0.55);
    box-shadow: 0 8px 18px rgba(var(--corr-rgb, 255, 109, 0), 0.16);
    outline: none;
    transform: translateY(-1px);
}
.wb-size-corr-cell.is-active {
    border-color: rgba(var(--corr-rgb, 255, 109, 0), 0.72);
    box-shadow: inset 0 0 0 1px rgba(var(--corr-rgb, 255, 109, 0), 0.58), 0 8px 18px rgba(var(--corr-rgb, 255, 109, 0), 0.14);
}
.wb-size-corr-cell--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eef0f4;
    background: #f8fafc;
    color: #b7bdc8;
    cursor: default;
}
.wb-size-corr-scale {
    width: min(78%, 450px);
    padding-left: 50px;
    margin: 18px auto 0;
    flex: 0 0 auto;
}
.wb-size-corr-scale__bar {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fff0e4 0%, #ffd4b5 45%, #ff8a42 72%, #ff4f14 100%);
}
.wb-size-corr-scale__ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #4b5563;
    font-size: 11px;
    font-weight: 500;
}
.wb-size-corr-scale__label {
    margin-top: 6px;
    color: #8a8f9b;
    font-size: 12px;
    text-align: center;
}
.wb-size-corr-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
}
.wb-size-corr-add {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 190px;
    color: #7b8190;
    font-size: 11px;
    font-weight: 700;
}
.wb-size-corr-add select {
    min-height: 38px;
    padding: 0 34px 0 12px;
    border: 1px dashed #cfd5df;
    border-radius: 8px;
    background: #ffffff;
    color: #4b5563;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.wb-size-corr-add select:focus {
    border-color: #ff9a5c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.11);
}
.wb-size-corr-legend {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    min-height: 22px;
    margin: 10px 0 0 300px;
    padding-right: 220px;
}
.wb-size-corr-legend:empty {
    display: none;
}
.wb-size-corr-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: default;
    pointer-events: auto;
}
.wb-size-corr-legend__marker {
    width: 10px;
    height: 10px;
    border: 2px solid var(--legend-color, #ff6d00);
    border-radius: 50%;
    background: #ffffff;
    flex: 0 0 auto;
}
.wb-size-corr-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    height: auto;
    min-height: 390px;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
}
.wb-size-corr-chart-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}
@media (max-width: 1180px) {
    .wb-history-correlation-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .wb-history-correlation-card {
        padding: 14px;
        min-height: 0;
    }
    .wb-size-corr-detail-head {
        flex-direction: column;
    }
    .wb-size-corr-add {
        width: 100%;
    }
    .wb-size-corr-chart-wrap {
        min-height: 360px;
    }
    .wb-size-corr-legend {
        margin: 12px 0 0;
        padding-right: 0;
        gap: 8px 14px;
    }
}

.wb-history-section {
    margin-bottom: 24px;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wb-history-section__title {
    font-size: 15px;
    font-weight: 800;
    color: #141414;
    margin-bottom: 12px;
}
.wb-history-section__subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #6a6a6a;
    margin: 18px 0 10px;
}
.wb-history-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.wb-history-section__head .wb-history-section__title { margin-bottom: 0; }

/* KPI-карточки модуля «История» (дизайн как в макете) */
.wb-history-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.wb-history-kpis--feature {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.wb-history-elasticity-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}
@media (max-width: 720px) {
    .wb-history-kpis,
    .wb-history-kpis--feature,
    .wb-history-elasticity-kpis { grid-template-columns: 1fr; }
}

.wb-stat-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wb-stat-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.wb-stat-card__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.wb-stat-card__value {
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.wb-stat-card__value.is-orange { color: #ff6d00; }
.wb-stat-card__value.is-green { color: #16a34a; }
.wb-stat-card__unit {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}
.wb-stat-card__hint {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #94a3b8;
    max-width: 28ch;
}
.wb-stat-card__value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

/* Feature: покрытие / эластичность — акцент слева + декор */
.wb-stat-card--feature {
    min-height: 0;
    padding: 14px 18px 12px 20px;
    border-left: 4px solid #ff6d00;
}
.wb-stat-card--feature.wb-stat-card--orange { border-left-color: #ff6d00; }
.wb-stat-card--feature.wb-stat-card--blue { border-left-color: #60a5fa; }
.wb-stat-card--feature.wb-stat-card--violet { border-left-color: #a78bfa; }
.wb-stat-card--feature.wb-stat-card--green { border-left-color: #22c55e; }
.wb-stat-card--feature .wb-stat-card__value {
    font-size: 28px;
}
.wb-stat-card--feature .wb-stat-card__value-row {
    margin-top: 6px;
}
.wb-stat-card--feature .wb-stat-card__deco--dots {
    right: 12px;
    bottom: 10px;
    width: 48px;
    height: 32px;
}
.wb-stat-card--feature-wide {
    min-height: 0;
    padding: 14px 18px 12px 20px;
}
.wb-stat-card--feature-wide .wb-stat-card__value--lg {
    display: block;
    margin-top: 6px;
    font-size: 30px;
}
.wb-stat-card--feature-wide .wb-stat-card__hint {
    margin-top: 6px;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wb-stat-card--feature-wide .wb-stat-card__deco--waves {
    right: -12px;
    bottom: -22px;
    width: 120px;
    height: 88px;
    opacity: 0.45;
}

/* Compact: упущенная выручка — центрирование + оранжевая черта снизу */
.wb-stat-card--compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 108px;
    padding: 16px 12px 18px;
    border: 1px solid #eef0f4;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.wb-stat-card--compact::after {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #ff6d00, #ff9a3c);
}
.wb-stat-card--compact .wb-stat-card__label {
    margin-bottom: 10px;
}
.wb-stat-card--compact .wb-stat-card__value {
    font-size: 26px;
}
.wb-stat-card--compact .wb-stat-card__value--sm {
    font-size: 18px;
    line-height: 1.25;
}
.wb-stat-card--compact .wb-stat-card__unit {
    margin-top: 4px;
    font-size: 12px;
}
.wb-stat-card--compact .wb-stat-card__hint {
    margin-top: 6px;
    max-width: none;
    font-size: 11.5px;
}

/* Декор: точки / волны */
.wb-stat-card__deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.wb-stat-card__deco--dots {
    right: 14px;
    bottom: 14px;
    width: 56px;
    height: 40px;
    background-image: radial-gradient(circle, currentColor 1.35px, transparent 1.5px);
    background-size: 9px 9px;
    background-position: 0 0;
    opacity: 0.22;
}
.wb-stat-card--orange .wb-stat-card__deco--dots { color: #ffb26b; }
.wb-stat-card--blue .wb-stat-card__deco--dots { color: #93c5fd; }
.wb-stat-card--violet .wb-stat-card__deco--dots { color: #c4b5fd; }
.wb-stat-card--green .wb-stat-card__deco--dots { color: #86efac; }

.wb-stat-card__deco--waves {
    right: -8px;
    bottom: -18px;
    width: 150px;
    height: 110px;
    opacity: 0.55;
    background:
        radial-gradient(ellipse 90% 55% at 70% 80%, transparent 40%, currentColor 41%, currentColor 42%, transparent 43%),
        radial-gradient(ellipse 90% 55% at 70% 80%, transparent 52%, currentColor 53%, currentColor 54%, transparent 55%),
        radial-gradient(ellipse 90% 55% at 70% 80%, transparent 64%, currentColor 65%, currentColor 66%, transparent 67%),
        radial-gradient(ellipse 90% 55% at 70% 80%, transparent 76%, currentColor 77%, currentColor 78%, transparent 79%);
}
.wb-stat-card--orange .wb-stat-card__deco--waves { color: rgba(255, 109, 0, 0.18); }
.wb-stat-card--green .wb-stat-card__deco--waves { color: rgba(22, 163, 74, 0.18); }

/* Legacy classes (если где-то остались старые KPI) */
.wb-history-kpi {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.wb-history-kpi__icon {
    font-size: 26px;
    line-height: 1;
    flex: 0 0 auto;
}
.wb-history-kpi__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.wb-history-kpi__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #9a9a9a;
    text-transform: uppercase;
}
.wb-history-kpi__value {
    font-size: 22px;
    font-weight: 800;
    color: #161616;
    font-variant-numeric: tabular-nums;
}
.wb-history-kpi__hint {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.35;
    color: #9a9a9a;
}
.wb-history-kpi--good { border-left: 3px solid #2bbd6e; }
.wb-history-kpi--warn { border-left: 3px solid #ff9f1c; }
.wb-history-kpi--bad { border-left: 3px solid #e54848; }

.wb-history-table-wrap { margin-top: 4px; }

.wb-history-wb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 5px;
    background: #cb11ab;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .02em;
    vertical-align: middle;
}

/* Кнопка «Детализация» */
.wb-history-detail-toggle {
    display: flex;
    justify-content: center;
    margin: 14px 0 4px;
}
.wb-history-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #ff6d00 0%, #ff9446 100%);
    color: #ffffff;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 999px;
    padding: 11px 22px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 109, 0, 0.28);
    transition:
        transform .15s ease,
        box-shadow .18s ease,
        filter .15s ease,
        background .18s ease;
}
.wb-history-detail-btn__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}
.wb-history-detail-btn__icon svg {
    display: block;
}
.wb-history-detail-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(255, 109, 0, 0.34);
    transform: translateY(-1px);
}
.wb-history-detail-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(255, 109, 0, 0.22);
}
.wb-history-detail-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 109, 0, 0.22),
        0 8px 20px rgba(255, 109, 0, 0.28);
}
.wb-history-detail-btn.is-active {
    background: #ffffff;
    border-color: #ffd9c2;
    color: #c2410c;
    box-shadow: 0 6px 16px rgba(255, 109, 0, 0.12);
}
.wb-history-detail-btn.is-active:hover {
    background: #fff8f3;
    filter: none;
    box-shadow: 0 8px 18px rgba(255, 109, 0, 0.16);
}
.wb-history-detail-btn.is-active .wb-history-detail-btn__icon {
    transform: rotate(180deg);
}
.wb-history-detail-panel {
    margin: 10px 0 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f3;
}
.wb-history-detail-panel.hidden { display: none; }

/* Кривая спроса — карточка как revenue-reference, без fill под линией */
.chart-block--demand-curve.chart-block--revenue-reference {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 18px;
    min-height: 480px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 28px 32px 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}
.chart-block--demand-curve .revenue-chart-title {
    margin: 0;
    color: #000000;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
    text-align: left;
}
.chart-block--demand-curve .chart-canvas-wrap--demand-curve {
    position: relative;
    width: 100%;
    min-width: 0;
    flex-grow: 1;
    height: 360px;
    min-height: 360px;
    margin-top: 12px;
}
.chart-block--demand-curve .chart-canvas-wrap--demand-curve > canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
@media (max-width: 720px) {
    .chart-block--demand-curve.chart-block--revenue-reference {
        padding: 22px 18px 18px;
        min-height: 420px;
        border-radius: 22px;
    }
    .chart-block--demand-curve .revenue-chart-title {
        font-size: 22px;
    }
    .chart-block--demand-curve .chart-canvas-wrap--demand-curve {
        height: 280px;
        min-height: 280px;
    }
}

.wb-history-bins-chart svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 260px;
}

/* Динамика продаж и цены (детализация) */
.chart-block--detail-dynamics.wb-history-detail-chart {
    margin: 8px 0 18px;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 22px;
    padding: 20px 22px 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
.wb-history-detail-chart__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.wb-history-detail-chart__title {
    margin: 0 0 10px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.wb-history-detail-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.wb-history-detail-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}
.wb-history-detail-chart__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}
.wb-history-detail-chart__legend-dot--sales {
    background: #ff9a3c;
    box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.18);
}
.wb-history-detail-chart__legend-dot--price {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
.wb-history-detail-chart__period {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #e8edf5;
    background: #f8fafc;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.chart-canvas-wrap--detail-dynamics {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 340px;
    min-height: 340px;
}
.chart-canvas-wrap--detail-dynamics > canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
@media (max-width: 720px) {
    .chart-block--detail-dynamics.wb-history-detail-chart {
        padding: 16px 14px 12px;
        border-radius: 18px;
    }
    .wb-history-detail-chart__head {
        flex-direction: column;
        align-items: stretch;
    }
    .wb-history-detail-chart__title {
        font-size: 17px;
    }
    .chart-canvas-wrap--detail-dynamics {
        height: 280px;
        min-height: 280px;
    }
}

/* legacy dots used elsewhere (bins legend) */
.wb-history-detail-legend-dot {
    width: 22px;
    height: 4px;
    border-radius: 999px;
    background: #b7b7b7;
    display: inline-block;
}
.wb-history-detail-legend-dot--bar { background: var(--primary-orange); }
.wb-history-detail-legend-dot--line { background: #2563eb; }

/* Продажи по ценовым диапазонам — bar + line (медиана) */
.chart-block--price-bins.wb-history-bins-block {
    margin: 12px 0 18px;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 22px;
    padding: 18px 20px 14px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
.wb-history-bins-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}
.wb-history-bins-card__title {
    margin: 0 0 10px;
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.wb-history-bins-card__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.wb-history-bins-card__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}
.wb-history-bins-card__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}
.wb-history-bins-card__legend-dot--bar {
    background: #ff9a3c;
    box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.16);
}
.wb-history-bins-card__legend-dot--line {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.wb-history-bins-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #f7f7f8;
    flex: 0 0 auto;
}
.wb-history-bins-toggle-btn {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b6b72;
    cursor: pointer;
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 750;
    padding: 7px 12px;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.wb-history-bins-toggle-btn:hover,
.wb-history-bins-toggle-btn:focus-visible {
    color: #202024;
    outline: none;
}
.wb-history-bins-toggle-btn.is-active {
    background: #fff;
    color: var(--primary-orange);
    box-shadow: 0 4px 14px rgba(20, 20, 20, .08);
}
.chart-canvas-wrap--price-bins {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 320px;
    min-height: 320px;
}
.chart-canvas-wrap--price-bins > canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
.wb-history-bins-note,
.wb-history-empty-note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: #94a3b8;
}
@media (max-width: 720px) {
    .wb-history-bins-card__head {
        flex-direction: column;
        align-items: stretch;
    }
    .chart-canvas-wrap--price-bins {
        height: 280px;
        min-height: 280px;
    }
}

/* used by lost-revenue chart metric toggle as well */
.wb-history-bins-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}
.wb-history-bins-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 650;
}
.wb-history-bins-legend-dot {
    width: 22px;
    height: 4px;
    border-radius: 999px;
    display: inline-block;
}
.wb-history-bins-legend-dot--optimal {
    background: #35c37a;
}
.wb-history-price-changes .wb-history-kpis {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}
.wb-history-kpis--lost {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
}
/* Упущенная выручка — карточка 1:1 как price_distribution_bar_chart (.chart-block) */
.wb-history-lost-chart.chart-block--lost-revenue {
    margin: 8px 0 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 350px;
    min-width: 0;
}
.wb-history-lost-chart.chart-block--lost-revenue > h3 {
    font-family: "Onest", "Segoe UI", sans-serif;
    font-size: 1.15rem;
    color: #1e293b;
    margin: 0 0 16px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.2px;
}
.wb-history-lost-chart .wb-history-lost-metric-toggle {
    align-self: center;
    margin: 0 0 12px;
}
.wb-history-lost-chart .chart-canvas-wrap--lost-revenue {
    position: relative;
    width: 100%;
    min-width: 0;
    flex-grow: 1;
    min-height: 280px;
    height: 280px;
}
.wb-history-lost-chart .chart-canvas-wrap--lost-revenue > canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 1100px) {
    .wb-history-kpis--lost {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}
@media (max-width: 960px) {
    .wb-history-price-changes .wb-history-kpis {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    .wb-history-kpis--lost {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}
@media (max-width: 720px) {
    .wb-history-bins-chart {
        min-width: 480px;
    }
    .wb-history-price-changes .wb-history-kpis {
        grid-template-columns: 1fr;
    }
    .wb-history-kpis--lost {
        grid-template-columns: 1fr;
    }
}

/* Топ периодов по выручке в день — рейтинговый список */
.wb-history-top-periods { margin-top: 8px; }
.wb-history-top-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wb-history-top-row {
    position: relative;
    display: grid;
    grid-template-columns: 22px 58px 40px 1fr 96px;
    align-items: center;
    gap: 10px;
    padding: 5px 6px;
    border-radius: 9px;
    cursor: default;
    transition: background-color .2s ease, transform .2s ease;
}
.wb-history-top-row:hover {
    background: #f7f7f8;
    transform: translateX(2px);
}
.wb-history-top-row__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef0f2;
    color: #83878c;
    font-size: 11px;
    font-weight: 700;
    transition: transform .25s cubic-bezier(.22,1,.36,1);
}
.wb-history-top-row--best .wb-history-top-row__rank {
    background: #ffc400;
    color: #fff;
}
.wb-history-top-row:hover .wb-history-top-row__rank {
    transform: scale(1.15);
}
.wb-history-top-row__price {
    font-size: 12.5px;
    font-weight: 700;
    color: #2a2a2a;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wb-history-top-row__period {
    font-size: 11.5px;
    color: #9a9a9a;
    white-space: nowrap;
}
.wb-history-top-row__track {
    position: relative;
    height: 22px;
    border-radius: 7px;
    background: #f4f4f5;
    overflow: hidden;
}
.wb-history-top-row__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, #ff9d4f 0%, #ffbc82 100%);
    border-radius: 7px;
    transition: width .6s cubic-bezier(.22,1,.36,1), filter .2s ease;
}
.wb-history-top-row--best .wb-history-top-row__fill {
    background: linear-gradient(90deg, #ff8a24 0%, #ffab5e 100%);
    box-shadow: 0 0 10px rgba(255, 122, 0, .35);
}
.wb-history-top-row:hover .wb-history-top-row__fill {
    filter: brightness(1.08);
}
.wb-history-top-row__value {
    font-size: 12px;
    font-weight: 700;
    color: #2a2a2a;
    white-space: nowrap;
    text-align: right;
    text-overflow: ellipsis;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}
.wb-history-top-tooltip {
    position: absolute;
    left: 32px;
    bottom: calc(100% + 4px);
    z-index: 5;
    min-width: 190px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #26282d;
    color: #f2f2f2;
    font-size: 11.5px;
    line-height: 1.55;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px) scale(.97);
    transform-origin: left bottom;
    transition: opacity .18s ease, transform .18s ease;
    white-space: nowrap;
}
.wb-history-top-row:hover .wb-history-top-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Поставки: сводка + GitHub-style календарь */
.wb-history-supplies-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #6a6a6a;
}
.wb-history-supplies-summary b {
    color: #161616;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.wb-history-supplies-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #666;
}
.wb-history-supplies-badge.is-periodic {
    background: #e7f7ec;
    color: #1e9e5a;
}

.wb-history-cal-months {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    overflow-x: auto;
    padding: 4px 0;
}
.wb-history-cal-month {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wb-history-cal-month__label {
    font-size: 11.5px;
    font-weight: 700;
    color: #9a9a9a;
    text-transform: capitalize;
}
.wb-history-calendar {
    display: flex;
    gap: 3px;
}
.wb-history-cal-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.wb-history-cal-day {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #ebedf0;
    display: block;
    cursor: default;
    transition: transform .16s cubic-bezier(.22,1,.36,1), box-shadow .16s ease;
}
.wb-history-cal-day.has-qty {
    box-shadow: inset 0 0 0 1px rgba(255, 109, 0, .25);
}
.wb-history-cal-day:hover,
.wb-history-cal-day:focus-visible {
    transform: scale(1.35);
    z-index: 2;
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 109, 0, .45), 0 3px 8px rgba(0, 0, 0, .18);
}
.wb-history-cal-day--empty {
    background: transparent;
    box-shadow: none;
    visibility: hidden;
}

.wb-history-raw-block {
    margin-top: 10px;
    font-size: 12.5px;
}
.wb-history-raw-block summary {
    cursor: pointer;
    color: #8a8a8a;
    font-weight: 650;
}

/* The parser sidebar becomes an overlay drawer on phones, so it must not
   reserve desktop width in the document flow. Keep this block last so the
   desktop layout declarations above cannot override it. */
@media (max-width: 768px) {
    html,
    body.filtered-analytics-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-layout {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .sidebar-container,
    .sidebar-container.collapsed,
    body.sidebar-is-collapsed .sidebar-container {
        width: 0;
        min-width: 0;
        height: 0;
        flex: 0 0 0;
        overflow: visible;
        /* Do not trap the fixed drawer below its body-level backdrop. */
        position: static;
        z-index: auto;
        background: transparent;
    }

    .main-content,
    .main-content.full-width {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-top: var(--header-height, 70px);
        padding: 18px 12px 24px;
        border-left: 0;
        border-radius: 0;
        gap: 16px;
        overflow: visible;
    }

    .filtered-analytics-page .filter-card-new,
    .filtered-analytics-page .results-wrapper,
    .filtered-analytics-page .analytics-section,
    .filtered-analytics-page .ai-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .filtered-analytics-page .section-title,
    .filtered-analytics-page .section-title--ai {
        margin: 2px 0 12px;
        gap: 9px;
        font-size: clamp(22px, 7vw, 27px);
        line-height: 1.15;
    }

    .filtered-analytics-page .section-title--ai::before {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
        background-size: 22px, auto;
    }

    .filtered-analytics-page .filter-card-new .fcn-modal {
        inset: 0;
        width: 100dvw;
        max-width: 100%;
        min-width: 0;
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
        align-items: stretch;
    }

    .filtered-analytics-page .filter-card-new .fcn-modal-card {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 100%;
        min-width: 0;
        border-radius: 18px;
        padding: 14px;
        overflow: hidden;
    }

    .filtered-analytics-page .filter-card-new .fcn-modal-close {
        width: 44px;
        height: 44px;
    }

    .filtered-analytics-page .filter-card-new .cat-tree-search {
        min-height: 46px;
        font-size: 16px;
    }

    .filtered-analytics-page .filter-card-new .cat-tree-list,
    .filtered-analytics-page .filter-card-new .model-list {
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .filter-card-new .xsubject-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .filtered-analytics-page .filter-card-new .xsubject-actions .btn-reset-filters,
    .filtered-analytics-page .filter-card-new .xsubject-actions .apply-button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 0 10px;
        font-size: 13px;
    }

    .filtered-analytics-page .filter-card-new .fcn-footer {
        display: grid;
        grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
        gap: 10px;
        align-items: center;
    }

    .filtered-analytics-page .filter-card-new .active-filters {
        grid-column: 1 / -1;
        width: 100%;
    }

    .filtered-analytics-page .filter-card-new .reset-all-btn,
    .filtered-analytics-page .filter-card-new .fcn-footer > .apply-button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding-right: 12px;
        padding-left: 12px;
    }

    .filtered-analytics-page .filter-card-new .reset-all-btn {
        grid-column: 1;
    }

    .filtered-analytics-page .filter-card-new .fcn-footer > .apply-button {
        grid-column: 2;
    }

    .filtered-analytics-page .filter-card-new .cat-node-name,
    .filtered-analytics-page .filter-card-new .cat-flat-path,
    .filtered-analytics-page .filter-card-new .model-list .name {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .filtered-analytics-page .fcn-select,
    .filtered-analytics-page .fcn-select-trigger,
    .filtered-analytics-page .fcn-select-menu {
        max-width: 100%;
        min-width: 0;
    }

    .filtered-analytics-page .fcn-select-menu {
        right: 0;
        left: 0;
    }

    .filtered-analytics-page .fcn-select-option {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .results-stats-bar {
        gap: 10px;
        padding: 0;
    }

    .filtered-analytics-page .table-sort-controls {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) 82px;
        gap: 7px;
        width: 100%;
        min-width: 0;
    }

    .filtered-analytics-page .results-stats-bar .sort-text {
        font-size: 11px;
    }

    .filtered-analytics-page #sortSelect {
        min-width: 0;
    }

    .filtered-analytics-page #sortSelect .fcn-select-trigger {
        width: 100%;
        min-width: 0;
        padding-right: 11px;
        padding-left: 12px;
        gap: 7px;
        font-size: 13px;
    }

    .filtered-analytics-page #limitSelect {
        width: 82px;
        min-width: 82px;
    }

    .filtered-analytics-page #limitSelect .fcn-select-trigger {
        width: 82px;
        min-width: 82px;
        padding: 0 10px;
        gap: 5px;
        font-size: 13px;
    }

    .filtered-analytics-page #limitSelect .fcn-select-value::after {
        content: " / стр.";
        color: #8f8f8f;
        font-size: 10px;
    }

    .filtered-analytics-page #limitSelect .fcn-select-menu {
        width: 82px;
        min-width: 82px;
    }

    .filtered-analytics-page #limitSelect .fcn-select-option {
        padding-right: 6px;
        padding-left: 6px;
        text-align: center;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .filtered-analytics-page .data-table-container {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: #ff9a4d #f1f1f1;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .products-table {
        width: 760px;
        min-width: 760px;
    }

    /* Reports / intelligent analysis: phone-only layout. */
    .filtered-analytics-page .analysis-loader {
        gap: 12px;
        padding: 14px;
        border-radius: 14px;
    }

    .filtered-analytics-page .analysis-loader__spinner {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .filtered-analytics-page .analysis-meta {
        padding: 14px;
        border-radius: 16px;
        overflow: visible;
    }

    .filtered-analytics-page .analysis-meta__finish {
        position: static;
        align-items: flex-start;
        margin-bottom: 10px;
        text-align: left;
    }

    .filtered-analytics-page .analysis-meta__title {
        margin-bottom: 8px;
        padding-right: 0;
        font-size: 16px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .analysis-meta__grid {
        font-size: 14px;
        line-height: 1.35;
    }

    .filtered-analytics-page .analysis-meta__pills {
        display: flex;
        gap: 6px;
        margin-top: 10px;
        padding-right: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .analysis-meta__pills::-webkit-scrollbar {
        display: none;
    }

    .filtered-analytics-page .analysis-meta__pill {
        flex: 0 0 auto;
        margin: 0;
        padding: 5px 10px;
        font-size: 11px;
    }

    .filtered-analytics-page .analysis-meta__beta-tooltip {
        left: 0;
        transform: translateY(4px);
        max-width: min(260px, 80vw);
        z-index: 1000;
    }

    .filtered-analytics-page .analysis-meta__beta-tooltip::after {
        left: 20px;
    }

    .filtered-analytics-page .analysis-meta__beta:hover .analysis-meta__beta-tooltip,
    .filtered-analytics-page .analysis-meta__beta:focus .analysis-meta__beta-tooltip,
    .filtered-analytics-page .analysis-meta__beta:focus-visible .analysis-meta__beta-tooltip {
        transform: translateY(0);
    }

    .filtered-analytics-page .fcn-toolbar .analysis-meta__beta-tooltip {
        left: 50%;
        transform: translateX(-50%) translateY(4px);
        max-width: min(260px, calc(100vw - 32px));
    }

    .filtered-analytics-page .fcn-toolbar .analysis-meta__beta-tooltip::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .filtered-analytics-page .fcn-toolbar .analysis-meta__beta:hover .analysis-meta__beta-tooltip,
    .filtered-analytics-page .fcn-toolbar .analysis-meta__beta:focus .analysis-meta__beta-tooltip,
    .filtered-analytics-page .fcn-toolbar .analysis-meta__beta:focus-visible .analysis-meta__beta-tooltip {
        transform: translateX(-50%) translateY(0);
    }

    .filtered-analytics-page .analysis-meta__share-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .filtered-analytics-page .analysis-module {
        margin-bottom: 10px;
        padding: 0;
        border-radius: 16px;
        overflow: hidden;
    }

    .filtered-analytics-page .analysis-module > summary {
        min-height: 56px;
        gap: 8px;
        padding: 13px 46px 13px 18px;
        font-size: clamp(18px, 5.5vw, 21px);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .analysis-module > summary::after {
        position: absolute;
        right: 14px;
        width: 22px;
        height: 22px;
        margin: 0;
        flex-basis: 22px;
        background-size: 20px 20px;
    }

    .filtered-analytics-page .analysis-body {
        min-width: 0;
        margin-top: 0;
        padding: 2px 12px 14px;
    }

    .filtered-analytics-page .analysis-summary {
        margin: 0 0 12px;
        padding: 10px 12px;
        border: 1px solid #f0e8e2;
        border-radius: 12px;
        background: #fffaf6;
    }

    .filtered-analytics-page .analysis-summary__line {
        font-size: 13px;
        line-height: 1.35;
    }

    .filtered-analytics-page .analysis-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .filtered-analytics-page .kpi {
        min-width: 0;
        padding: 9px;
    }

    .filtered-analytics-page .kpi__value {
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .price-card--combo {
        display: flex;
        width: 100%;
    }

    .filtered-analytics-page .price-combo-main,
    .filtered-analytics-page .price-combo-aside {
        width: 100%;
        padding: 14px;
    }

    .filtered-analytics-page .price-range {
        width: 100%;
    }

    .filtered-analytics-page .price-range__ends {
        gap: 8px;
    }

    .filtered-analytics-page .price-range__end {
        min-width: 0;
    }

    .filtered-analytics-page .price-range__end-val {
        font-size: 15px;
    }

    .filtered-analytics-page .price-range__end-cap {
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .price-combo-aside {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
    }

    .filtered-analytics-page .price-combo-aside .price-card__title,
    .filtered-analytics-page .price-threshold__unit {
        margin: 0;
    }

    .filtered-analytics-page .price-threshold__value {
        font-size: 28px;
    }

    .filtered-analytics-page .market-overview,
    .filtered-analytics-page .wb-sellers-overview__top,
    .filtered-analytics-page .wb-seller-structure-top,
    .filtered-analytics-page .wb-sellers-overview__avgs {
        grid-template-columns: minmax(0, 1fr);
    }

    .filtered-analytics-page .mkt-card {
        padding: 14px;
        border-radius: 14px;
    }

    /* Every generic bubble chart is a flip card on phones. Circles are the
       front face; the text legend is the back face. Desktop keeps the old grid. */
    .filtered-analytics-page .bubble-chart--mobile-flip {
        display: block;
        width: 100%;
        height: clamp(360px, 108vw, 430px);
        min-width: 0;
        margin: 12px 0;
        padding: 0;
        border: 0;
        perspective: 1200px;
        touch-action: manipulation;
        outline: none;
    }

    .filtered-analytics-page .bubble-chart--mobile-flip + .bubble-chart--mobile-flip {
        padding-top: 0;
        border-top: 0;
    }

    .filtered-analytics-page .bubble-chart__flip-inner {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
        transition: transform .5s cubic-bezier(.4, .2, .2, 1);
    }

    .filtered-analytics-page .bubble-chart--mobile-flip.is-flipped .bubble-chart__flip-inner {
        transform: rotateY(180deg);
    }

    .filtered-analytics-page .bubble-chart__face {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        min-width: 0;
        padding: 14px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 20px;
        background:
            radial-gradient(circle at top left, rgba(255, 220, 186, .35), transparent 44%),
            linear-gradient(180deg, #fff 0%, #faf9f7 100%);
        box-shadow: 0 12px 30px rgba(29, 26, 20, .08);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        overflow: hidden;
    }

    .filtered-analytics-page .bubble-chart__face--plot {
        transform: rotateY(0deg);
        pointer-events: auto;
    }

    .filtered-analytics-page .bubble-chart__face--text {
        transform: rotateY(180deg);
        pointer-events: none;
    }

    .filtered-analytics-page .bubble-chart--mobile-flip.is-flipped .bubble-chart__face--plot {
        pointer-events: none;
    }

    .filtered-analytics-page .bubble-chart--mobile-flip.is-flipped .bubble-chart__face--text {
        pointer-events: auto;
    }

    .filtered-analytics-page .bubble-chart__face--plot > .bubble-chart__title {
        display: block;
        flex: 0 0 auto;
        margin: 0 0 8px;
        font-size: 18px;
        line-height: 1.25;
        text-align: center;
    }

    .filtered-analytics-page .bubble-chart__face--plot .bubble-chart__plot {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-height: 0;
        padding: 6px;
        border: 1px solid rgba(255, 122, 54, .11);
        border-radius: 16px;
        background: rgba(255, 255, 255, .72);
        overflow: hidden;
    }

    .filtered-analytics-page .bubble-chart__face--plot .bubble-chart__plot svg {
        width: 100%;
        height: 100%;
        max-height: none;
        overflow: visible;
    }

    .filtered-analytics-page .bubble-chart__face--text .bubble-chart__aside {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        padding: 0 2px 8px;
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
        scrollbar-width: thin;
        scrollbar-color: #ffc9a2 transparent;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .bubble-chart__title {
        font-size: 18px;
        line-height: 1.25;
    }

    .filtered-analytics-page .bubble-chart__subtitle {
        margin-bottom: 10px;
        font-size: 12px;
        line-height: 1.35;
    }

    .filtered-analytics-page .bubble-chart__face--text .bubble-legend {
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: visible;
    }

    .filtered-analytics-page .bubble-chart__face--text .bubble-legend__item {
        display: grid;
        grid-template-columns: 14px minmax(0, 1fr) auto;
        min-height: 38px;
        gap: 8px;
        padding: 7px 6px;
        border-bottom: 1px solid #f0ece8;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.25;
    }

    .filtered-analytics-page .bubble-chart__face--text .bubble-legend__dot {
        width: 12px;
        height: 12px;
        border-width: 2px;
        box-shadow: 0 0 0 2px rgba(255, 122, 54, .1);
    }

    .filtered-analytics-page .bubble-chart__face--text .bubble-legend__label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .filtered-analytics-page .bubble-chart__flip-hint {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed rgba(0, 0, 0, .08);
        color: #9a918a;
        font-size: 11px;
        line-height: 1.25;
        text-align: center;
        cursor: pointer;
    }

    .filtered-analytics-page .bubble-chart--mobile-flip:focus-visible .bubble-chart__face {
        box-shadow: 0 0 0 3px rgba(255, 122, 54, .25), 0 12px 30px rgba(29, 26, 20, .08);
    }

    .filtered-analytics-page .bubble-tooltip {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 12px !important;
        top: auto !important;
        max-width: none;
    }

    .filtered-analytics-page .tech-detail-section {
        margin-top: 20px;
    }

    .filtered-analytics-page .tech-detail-section > .bubble-chart__title {
        margin-bottom: 12px;
    }

    .filtered-analytics-page .tech-flip-card {
        height: 330px;
        min-height: 330px;
    }

    .filtered-analytics-page .tech-flip-card__face {
        gap: 7px;
        padding: 14px;
        border-radius: 18px;
    }

    .filtered-analytics-page .tech-flip-card:hover,
    .filtered-analytics-page .tech-flip-card:focus-visible {
        transform: none;
    }

    .filtered-analytics-page .tech-flip-card:hover .tech-flip-card__inner,
    .filtered-analytics-page .tech-flip-card:focus-visible .tech-flip-card__inner {
        transform: none;
    }

    .filtered-analytics-page .tech-flip-card.is-flipped:hover .tech-flip-card__inner,
    .filtered-analytics-page .tech-flip-card.is-flipped:focus-visible .tech-flip-card__inner {
        transform: rotateY(180deg);
    }

    .filtered-analytics-page .seller-table-wrap,
    .filtered-analytics-page .sku-tables-row {
        min-width: 0;
    }

    .filtered-analytics-page .seller-table-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .filtered-analytics-page .seller-table-title {
        font-size: 15px;
        line-height: 1.25;
    }

    .filtered-analytics-page .seller-table-wrap--col .seller-table-scroll,
    .filtered-analytics-page .wb-anomaly-table-scroll {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .seller-table-wrap--col .seller-table {
        min-width: 500px;
    }

    .filtered-analytics-page .wb-kmeans-title,
    .filtered-analytics-page .wb-kmeans-objective-title {
        font-size: 18px;
    }

    .filtered-analytics-page .wb-kmeans-subtitle,
    .filtered-analytics-page .wb-kmeans-objective-subtitle {
        font-size: 12px;
    }

    .filtered-analytics-page .wb-kmeans-controls {
        gap: 8px;
    }

    .filtered-analytics-page .wb-kmeans-scale-control {
        flex: 1 1 100%;
        padding: 8px 10px;
    }

    .filtered-analytics-page .wb-kmeans-matrix-wrap {
        margin-right: -12px;
        margin-left: -12px;
        width: calc(100% + 24px);
        padding: 12px;
        border-radius: 14px;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .filtered-analytics-page .wb-kmeans-obj-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .filtered-analytics-page .wb-kmeans-obj-tabs::-webkit-scrollbar {
        display: none;
    }

    .filtered-analytics-page .wb-kmeans-obj-tab {
        flex: 0 0 auto;
        min-height: 40px;
    }

    .filtered-analytics-page .wb-kmeans-modal {
        padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    }

    .filtered-analytics-page .wb-kmeans-modal__dialog {
        width: 100%;
        max-height: 100%;
        border-radius: 18px;
    }

    .filtered-analytics-page .wb-kmeans-modal__body {
        padding: 16px 10px;
    }

    .filtered-analytics-page .wb-kmeans-hist-card {
        padding: 12px 10px 10px;
        border-radius: 14px;
    }

    .filtered-analytics-page .wb-kmeans-hist-card__plot {
        height: 220px;
        min-height: 200px;
    }
}
