/* Вкладка «Аналитика» в Финансах. Цвета — из токенов .fin (finance.css / finance-plus.css). */
.ix { gap: 34px; }
.ix-section { display: grid; gap: 16px; }
.ix-sechead { display: flex; align-items: center; gap: 14px; }
.ix-sechead::after { content: ""; flex: 1; height: 1px; margin-left: 8px; background: linear-gradient(90deg, var(--line), transparent); }
.ix-secicon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--acc); background: var(--acc-wash); border: 1px solid var(--acc-line); }
.ix-secicon svg { width: 20px; height: 20px; }
.ix-sechead h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 750; letter-spacing: -.015em; }
.ix-sechead p { margin: 2px 0 0; font-size: 12.5px; color: var(--mute); }

.ix-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.ix-grid-activity { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; }
.ix-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ix-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ix-empty { margin: 0; padding: 26px 12px; text-align: center; color: var(--mute); font-size: 13px; line-height: 1.5; border: 1px dashed var(--line); border-radius: 12px; }
.ix-note { margin: 0; font-size: 12px; color: var(--mute); line-height: 1.5; }
.ix-clip { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Рекорды */
.ix-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.ix-record { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--plx-surface); box-shadow: var(--shadow-card); }
.ix-record::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--tone) 14%, transparent), transparent 60%); pointer-events: none; }
.ix-record__icon { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 13px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 32%, transparent); }
.ix-record__icon svg { width: 22px; height: 22px; }
.ix-record > div { position: relative; min-width: 0; display: grid; gap: 2px; }
.ix-record span { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.ix-record strong { font-size: 22px; line-height: 28px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ix-record strong em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--mute); }
.ix-record small { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-record small .ix-clip { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }

/* Покупатели */
.ix-buyers { display: flex; align-items: center; gap: 22px; }
.ix-ring { position: relative; width: 116px; height: 116px; flex: none; }
.ix-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ix-ring circle { fill: none; stroke-width: 10; }
.ix-ring__bg { stroke: var(--wash); }
.ix-ring__fg { stroke: var(--acc); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--acc-glow)); }
.ix-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ix-ring strong { font-size: 24px; font-weight: 750; }
.ix-ring small { font-size: 11px; color: var(--mute); }
.ix-stats { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ix-stat { padding: 12px 14px; border-radius: 12px; background: var(--wash); border: 1px solid var(--line-soft); display: grid; gap: 2px; }
.ix-stat span { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.ix-stat strong { font-size: 26px; line-height: 32px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ix-stat small { font-size: 11.5px; color: var(--mute); }

/* Отзывы */
.ix-reviews { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.ix-score { display: grid; justify-items: start; gap: 4px; }
.ix-score strong { font-size: 44px; line-height: 1; font-weight: 750; letter-spacing: -.03em; }
.ix-stars { color: #facc15; letter-spacing: 2px; font-size: 15px; }
.ix-stars i { font-style: normal; color: var(--line-strong); }
.ix-score small { font-size: 11.5px; color: var(--mute); }
.ix-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ix-dist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.ix-dist b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.ix-dist .ix-meter { margin: 0; }

/* Полоски */
.ix-meter { height: 6px; margin: 7px 0 5px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.ix-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 55%, transparent), var(--acc)); }
.ix-meter--good span { background: linear-gradient(90deg, color-mix(in srgb, var(--fx-good) 55%, transparent), var(--fx-good)); }
.ix-meter--bad span { background: linear-gradient(90deg, color-mix(in srgb, var(--fx-bad) 55%, transparent), var(--fx-bad)); }

/* Рейтинги покупателей и товаров */
.ix-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 8px 14px; }
.ix-board li { display: flex; align-items: center; gap: 12px; padding: 10px 14px 8px 10px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--wash); transition: border-color .2s, background .2s; min-width: 0; }
.ix-board li:hover { border-color: var(--line-strong); background: var(--hl); }
.ix-rank { width: 26px; flex: none; text-align: center; font-size: 12px; font-weight: 700; color: var(--mute); font-variant-numeric: tabular-nums; }
.ix-rank[data-top="1"] { color: #facc15; }
.ix-rank[data-top="2"] { color: #cbd5e1; }
.ix-rank[data-top="3"] { color: #fb923c; }
.ix-ava { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 700; color: hsl(var(--h) 80% 82%); background: hsl(var(--h) 45% 28%); border: 1px solid hsl(var(--h) 45% 40%); }
.ix-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.ix-thumb--empty { display: grid; place-items: center; color: var(--mute); background: var(--plx-surface); }
.ix-thumb--empty svg { width: 18px; height: 18px; }
.ix-board__main { flex: 1; min-width: 0; }
.ix-board__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ix-board__row strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-board__row b { flex: none; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ix-board small { display: block; font-size: 11.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Тепловая карта */
.ix-peak { margin: 0; font-size: 13px; color: var(--mute); }
.ix-peak b { color: var(--ink); }
.ix-heat { display: grid; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 10px; color: var(--mute); }
.ix-heat__h { text-align: center; }
.ix-heat__d { align-self: center; font-size: 11px; }
.ix-heat i, .ix-legend i { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, var(--acc) calc(var(--a) * 100%), var(--wash)); transition: transform .15s; }
.ix-heat i:hover { transform: scale(1.3); outline: 1px solid var(--acc); position: relative; z-index: 1; }
.ix-heat i[data-peak] { box-shadow: 0 0 0 1.5px var(--ink), 0 0 12px var(--acc-glow); }
.ix-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--mute); }
.ix-legend i { width: 12px; }
.ix-legend span:first-child { margin-right: 4px; }
.ix-legend span:last-child { margin-left: 4px; }

/* Лучшие часы */
.ix-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ix-hours li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--wash); border: 1px solid var(--line-soft); }
.ix-hours__n { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--acc-ink); background: var(--acc); }
.ix-hours li > div { flex: 1; display: grid; min-width: 0; }
.ix-hours strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.ix-hours small { font-size: 11.5px; color: var(--mute); }
.ix-hours__boost { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; color: var(--acc); background: var(--acc-wash); border: 1px solid var(--acc-line); }
.ix-hours__boost svg { width: 13px; height: 13px; }

/* Сводка над графиком */
.ix-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; }
.ix-sum > div { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.ix-sum strong { font-size: 24px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ix-sum > div span { font-size: 12px; color: var(--mute); }
.ix-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--mute); background: var(--wash); border: 1px solid var(--line); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ix-pill[data-sign='up'] { color: var(--fx-good); background: color-mix(in srgb, var(--fx-good) 12%, transparent); border-color: color-mix(in srgb, var(--fx-good) 28%, transparent); }
.ix-pill[data-sign='down'] { color: #ff9897; background: color-mix(in srgb, var(--fx-bad) 12%, transparent); border-color: color-mix(in srgb, var(--fx-bad) 30%, transparent); }

/* Линейный график */
.ix-line { width: 100%; height: auto; display: block; overflow: visible; }
.ix-line text { font-size: 11px; fill: var(--mute); font-family: inherit; }
.ix-line .ix-val { font-size: 11px; font-weight: 700; fill: var(--ink); }
.ix-grid-line { stroke: var(--line-soft); }
.ix-grid-line--v { stroke-dasharray: 2 5; }
.ix-axis { stroke: var(--line); }
.ix-line__stroke { fill: none; stroke: var(--acc); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 6px 12px var(--acc-glow)); }
.ix-line__pt circle:first-child { fill: var(--acc); stroke: var(--plx-surface); stroke-width: 3; transition: r .15s; }
.ix-line__pt.is-best circle:first-child { fill: var(--plx-surface); stroke: var(--acc); stroke-width: 3; filter: drop-shadow(0 0 8px var(--acc-glow)); }
.ix-line__pt.is-best .ix-val { fill: var(--acc); font-size: 12.5px; }
.ix-line__pt:hover circle:first-child { r: 7; }
.ix-hit { fill: transparent; cursor: default; }

/* Сделки и возвраты по месяцам */
.ix-mrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ix-mrows li { display: grid; grid-template-columns: 58px minmax(0, 1fr) 34px 62px; align-items: center; gap: 10px; font-size: 12px; }
.ix-mrows__m { color: var(--mute); font-weight: 600; }
.ix-mrows__bar { display: flex; height: 12px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.ix-mrows__bar i { display: block; height: 100%; }
.ix-mrows__bar i.is-sale { background: linear-gradient(90deg, color-mix(in srgb, var(--fx-good) 55%, transparent), var(--fx-good)); border-radius: 999px 0 0 999px; }
.ix-mrows__bar i.is-back { background: var(--fx-bad); }
.ix-mrows li:hover .ix-mrows__bar { filter: brightness(1.15); }
.ix-mrows b { text-align: right; font-variant-numeric: tabular-nums; }
.ix-mrows small { text-align: right; color: var(--mute); font-variant-numeric: tabular-nums; }
.ix-mrows small[data-bad='true'] { color: #ff9897; }
.ix-keys { display: flex; justify-content: flex-start; gap: 18px; font-size: 12px; color: var(--mute); }
.ix-keys span { display: inline-flex; align-items: center; gap: 6px; }
.ix-keys i { width: 10px; height: 10px; border-radius: 3px; }

/* Категории */
.ix-stack { display: flex; gap: 3px; height: 14px; border-radius: 999px; overflow: hidden; }
.ix-stack i { min-width: 4px; transition: filter .2s; }
.ix-stack i:hover { filter: brightness(1.25); }
.ix-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 4px 24px; }
.ix-cats li { display: grid; grid-template-columns: 10px minmax(0, 1.2fr) minmax(60px, 1fr) auto 46px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.ix-cats li:hover { background: var(--wash); }
.ix-cats__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ix-cats__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ix-cats__bar { height: 6px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.ix-cats__bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.ix-cats b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ix-cats small { text-align: right; color: var(--mute); font-variant-numeric: tabular-nums; }

@container fin (max-width: 820px) {
  .ix-grid-activity { grid-template-columns: minmax(0, 1fr); }
}
@container fin (max-width: 520px) {
  .ix-buyers, .ix-reviews { grid-template-columns: minmax(0, 1fr); flex-direction: column; align-items: stretch; }
  .ix-buyers .ix-ring { align-self: center; }
  .ix-heat { grid-template-columns: 22px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .ix-heat__h { font-size: 8px; }
  .ix-card { padding: 16px; }
  .ix-hours__boost { display: none; }
  .ix-mrows li { grid-template-columns: 48px minmax(0, 1fr) 28px 54px; gap: 8px; }
  .ix-cats li { grid-template-columns: 10px minmax(0, 1fr) auto 40px; }
  .ix-cats__bar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ix-heat i, .ix-board li, .ix-stack i, .ix-line__pt circle { transition: none; } }
