/* Back-office → Аналитика: дашборд «как дела» + полный отчёт в правой панели (.an-side), пояснения — в кнопке «i» (.an-info).
   Графики — по скиллу dataviz: тонкие метки, скруглённый конец 4px, разрыв 2px между заливками, сетка — волосок. Только токены. */
.an-report { display: flex; flex-direction: column; gap: var(--sp-10); min-width: 0; max-width: 960px; }
.an-skel { height: 420px; border-radius: var(--r-md); }


/* ── Главная цифра: вопрос → число → ответ словами ── */
.an-hero { display: flex; flex-direction: column; gap: var(--sp-2); }
.an-hero__q { margin: 0; color: var(--text-muted); }
.an-hero__line { display: flex; align-items: baseline; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; }
.an-hero__value { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.an-hero__value small { margin-left: var(--sp-3); font-size: var(--fs-lg); font-weight: var(--fw-medium); letter-spacing: 0; color: var(--text-muted); }
.an-hero__delta { display: inline-flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.an-hero__delta > span:last-child { font-size: var(--fs-sm); color: var(--text-subtle); }
.an-say { margin: var(--sp-1) 0 0; max-width: 68ch; font-size: var(--fs-base); line-height: 1.5; color: var(--text); }
.an-say b { font-weight: var(--fw-semibold); }

/* ── Блок с графиком ── */
.an-block { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.an-block__head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; min-height: 36px; }
.an-block__head h3 { margin: 0 auto 0 0; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.an-hint { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.an-hint svg.icon { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--text-subtle); }
.an-flag { width: 16px; height: 16px; color: var(--warning); }

/* Короткие факты под графиком: голая иконка + фраза */
.an-facts { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.an-facts li { display: flex; align-items: flex-start; gap: var(--sp-3); line-height: 1.45; }
.an-facts li > svg.icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--text-subtle); }
.an-facts li.is-warn > svg.icon { color: var(--warning); }
.an-facts li.is-ok > svg.icon { color: var(--success); }

/* Подробности — раскрытием, лёгкий список вместо таблицы */
.an-more { border-top: 1px solid var(--border); }
.an-more summary { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; cursor: pointer; list-style: none; color: var(--text-muted); font-weight: var(--fw-medium); }
.an-more summary::-webkit-details-marker { display: none; }
.an-more summary:hover { color: var(--text); }
.an-more summary svg.icon { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform var(--dur-fast) var(--ease-out); }
.an-more[open] summary svg.icon { transform: none; }
.an-list { margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.an-list li { display: grid; grid-template-columns: minmax(120px, 1.4fr) repeat(calc(var(--cols) - 1), minmax(0, 1fr)); gap: var(--sp-3); align-items: center; min-height: 40px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.an-list li:last-child { border-bottom: 0; }
.an-list li > span:not(:first-child) { text-align: right; }
.an-list .an-list__head { min-height: 32px; font-size: var(--fs-xs); color: var(--text-subtle); }
.an-list .delta { margin-left: var(--sp-1); }

/* ── Главное: строки-ответы, клик — в отчёт ── */
.an-sum { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-sum li + li { border-top: 1px solid var(--border); }
.an-sum__row { display: flex; align-items: center; gap: var(--sp-4); width: 100%; min-height: 64px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-sm); text-align: left; }
.an-sum__row:hover { background: var(--surface-2); }
.an-sum__row > svg.icon:first-child { flex: none; width: 22px; height: 22px; color: var(--text-subtle); }
.an-sum__row.is-warn > svg.icon:first-child { color: var(--warning); }
.an-sum__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.an-sum__text small { font-size: var(--fs-xs); color: var(--text-subtle); }
.an-sum__go { flex: none; width: 16px; height: 16px; color: var(--text-subtle); }

/* ── Легенда ── */
.an-legend { display: flex; gap: var(--sp-2) var(--sp-5); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-muted); }
.an-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.an-legend i, .an-segl i, .an-quad h4 i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* ── Линия ── */
.an-line__plot { position: relative; height: 240px; margin-left: 40px; cursor: crosshair; touch-action: pan-y; }
.an-line__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.an-line__grid { position: absolute; left: 0; right: 0; top: var(--y); border-top: 1px solid var(--border); }
.an-line__grid i { position: absolute; right: calc(100% + var(--sp-2)); top: -8px; font-style: normal; font-size: var(--fs-xs); color: var(--text-subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-line__plot::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--border-strong); }
.an-line__cur, .an-line__prev { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.an-line__cur { stroke: var(--chart-1); stroke-width: 2; }
.an-line__prev { stroke: var(--chart-muted); stroke-width: 1.5; }
.an-line__dot { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--chart-1); box-shadow: 0 0 0 2px var(--bg); }
.an-line__cross { position: absolute; top: 0; bottom: 0; left: var(--x); border-left: 1px solid var(--border-strong); pointer-events: none; }
.an-line__tip { position: absolute; top: 0; left: var(--x); transform: translateX(10px); display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-md); font-size: var(--fs-xs); white-space: nowrap; pointer-events: none; z-index: 2; }
.an-line__tip.is-left { transform: translateX(calc(-100% - 10px)); }
.an-line__tip span { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-muted); }
.an-line__tip span b { margin-left: auto; padding-left: var(--sp-3); color: var(--text); }
.an-line__tip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.an-line__tip[hidden], .an-line__cross[hidden] { display: none; }
.an-line__axis { position: relative; height: 20px; margin: var(--sp-2) 0 var(--sp-3) 56px; }
.an-line__axis span { position: absolute; left: var(--x); transform: translateX(-50%); font-size: var(--fs-xs); color: var(--text-subtle); white-space: nowrap; }
.an-line__axis span:first-child { transform: none; }
.an-line__axis span:last-child { transform: translateX(-100%); }

/* ── Столбцы (.bars) + линия нормы: сплошная тонкая, с подписью ── */
.an-cols .bars { position: relative; }
.an-cols .bars__bar { border-radius: 4px 4px 0 0; }
.an-cols__norm { position: absolute; left: 0; right: 0; top: var(--sp-8); bottom: 0; pointer-events: none; z-index: 1; }
.an-cols__norm::before { content: ''; position: absolute; left: 0; right: 0; bottom: var(--v); border-top: 1px solid var(--text-muted); }
.an-cols__norm i { position: absolute; right: 0; bottom: var(--v); padding: 0 var(--sp-1) 2px; font-style: normal; font-size: var(--fs-xs); color: var(--text-muted); background: var(--bg); transform: translateY(-2px); }

/* ── Две серии в столбце ── */
.an-stack { display: flex; align-items: flex-end; gap: 2px; height: 200px; }
.an-stack__col { flex: 1; min-width: 4px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.an-stack__a, .an-stack__b { display: block; height: var(--v); min-height: 2px; }
.an-stack__a { background: var(--chart-1); border-radius: 0 0 2px 2px; }
.an-stack__b { background: var(--chart-muted); border-radius: 4px 4px 0 0; }
.an-stack__col:hover span { opacity: .8; }
.an-stack + .bars__axis { gap: 2px; }

/* ── Рейтинг: столбец без дорожки — график с общей базой, не прогресс-бар ── */
.an-rank { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-rank__row { display: grid; grid-template-columns: 40px minmax(140px, 220px) minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); min-height: 52px; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); }
.an-rank__row:not(:has(.an-rank__thumb)) { grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto; }
.an-rank__row[role="button"] { cursor: pointer; }
.an-rank__row[role="button"]:hover { background: var(--surface-2); }
.an-rank__thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); }
.an-rank__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-rank__name b { font-weight: var(--fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-rank__name small { font-size: var(--fs-xs); color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-rank__bar { position: relative; height: 12px; }
.an-rank__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v); border-radius: 0 4px 4px 0; background: var(--c, var(--chart-1)); }
.an-rank--em .an-rank__row:not(.is-hi) .an-rank__bar i { background: var(--chart-muted); }
.an-rank__bar em { position: absolute; left: var(--m); top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.an-rank__val { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); min-width: 128px; white-space: nowrap; }
.an-rank__val b { font-weight: var(--fw-semibold); }

/* ── Доли целого: сегменты с разрывом 2px + легенда с цифрами ── */
.an-seg { display: flex; gap: 2px; height: 28px; }
.an-seg span { width: var(--w); min-width: 3px; background: var(--c); }
.an-seg span:first-child { border-radius: 4px 0 0 4px; }
.an-seg span:last-child { border-radius: 0 4px 4px 0; }
.an-segl { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-segl li { display: grid; grid-template-columns: 10px minmax(0, 1fr) 48px minmax(96px, auto) 72px; align-items: center; gap: var(--sp-3); min-height: 48px; border-bottom: 1px solid var(--border); }
.an-segl li:last-child { border-bottom: 0; }
.an-segl__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: var(--fw-medium); }
.an-segl__name small { font-size: var(--fs-xs); font-weight: 400; color: var(--text-subtle); }
.an-segl li > b { text-align: right; }
.an-segl__val { text-align: right; color: var(--text-muted); }
.an-segl .delta { justify-content: flex-end; }

/* ── Тепловая карта: один тон, светлое → тёмное ── */
.an-heat { display: grid; grid-template-columns: 36px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; }
.an-heat__col, .an-heat__row { font-size: var(--fs-xs); color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.an-heat__col { text-align: center; padding-bottom: var(--sp-1); }
.an-heat__row { display: flex; align-items: center; text-transform: capitalize; }
.an-heat__cell { height: 32px; border-radius: 4px; background: color-mix(in oklab, var(--chart-1) var(--k), var(--surface-2)); }
.an-heat__cell:hover { box-shadow: 0 0 0 2px var(--text); }
.an-scale { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-subtle); }
.an-scale i { display: flex; gap: 2px; }
.an-scale b { width: 20px; height: 8px; border-radius: 2px; background: color-mix(in oklab, var(--chart-1) var(--k), var(--surface-2)); }

/* ── Когорты ── */
.an-coh { display: grid; grid-template-columns: minmax(96px, 1.3fr) repeat(calc(var(--cols) - 1), minmax(0, 1fr)); gap: 2px; }
.an-coh__head { padding-bottom: var(--sp-1); font-size: var(--fs-xs); color: var(--text-subtle); text-align: center; }
.an-coh__head:first-child { text-align: left; }
.an-coh__row { display: flex; flex-direction: column; justify-content: center; min-height: 40px; font-size: var(--fs-sm); }
.an-coh__row small { font-size: var(--fs-xs); color: var(--text-subtle); }
.an-coh__cell { display: grid; place-items: center; min-height: 40px; border-radius: 4px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: color-mix(in oklab, var(--chart-1) var(--k), var(--surface-2)); color: var(--text); }

/* ── Каскад прибыли ── */
.an-fall { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.an-fall__row { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr) 96px; align-items: center; gap: var(--sp-4); min-height: 52px; }
.an-fall__name { display: flex; flex-direction: column; gap: 2px; font-weight: var(--fw-medium); }
.an-fall__name small { font-size: var(--fs-xs); font-weight: 400; color: var(--text-subtle); }
.an-fall__bar { position: relative; height: 28px; }
.an-fall__bar i { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); border-radius: 4px; background: var(--chart-muted); }
.an-fall__row--total .an-fall__bar i { background: var(--surface-3); }
.an-fall__row--left .an-fall__bar i { background: var(--chart-1); }
.an-fall__row > b { text-align: right; font-weight: var(--fw-semibold); }
.an-fall__row--left { margin-top: var(--sp-1); padding-top: var(--sp-2); border-top: 1px solid var(--border); }

/* ── Матрица меню ── */
.an-scatter svg { display: block; width: 100%; height: auto; max-height: 420px; overflow: visible; }
.an-scatter__axis, .an-scatter__thr { stroke: var(--border-strong); stroke-width: 1; }
.an-scatter__pt circle { fill: var(--c); stroke: var(--bg); stroke-width: 2; transition: r var(--dur-fast) var(--ease-out); }
.an-scatter__pt:hover circle { r: 9; }
.an-scatter__pt text { font-size: 12px; fill: var(--text-muted); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.an-scatter__lbl { font-size: 12px; fill: var(--text-subtle); }
.an-quads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-8); }
.an-quad h4 { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-1); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.an-quad h4 small { font-size: var(--fs-xs); font-weight: 400; color: var(--text-subtle); }
.an-quad p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; }
.an-quad b { font-weight: var(--fw-medium); color: var(--text); }
.an-quad .an-quad__list { margin-top: var(--sp-1); color: var(--text); }

/* ── До → после ── */
.an-db { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-db__row { display: grid; grid-template-columns: minmax(160px, 280px) minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); min-height: 60px; border-bottom: 1px solid var(--border); }
.an-db__row:last-child { border-bottom: 0; }
.an-db__track { position: relative; height: 16px; }
.an-db__track i { position: absolute; top: 7px; height: 2px; left: min(var(--a), var(--b)); width: max(calc(var(--a) - var(--b)), calc(var(--b) - var(--a))); background: var(--border-strong); }
.an-db__track em { position: absolute; top: 0; left: var(--x); width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.an-db__a { background: var(--chart-muted); }
.an-db__b { background: var(--chart-1); }

/* ── Блюда без продаж ── */
.an-items { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-items li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); min-height: 56px; border-bottom: 1px solid var(--border); }
.an-items li:last-child { border-bottom: 0; }
.an-items img { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; filter: grayscale(.6); }

/* ── Лог исключений ── */
.an-ex { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.an-ex li { display: grid; grid-template-columns: 48px auto minmax(0, 1fr) auto 96px; align-items: center; gap: var(--sp-3); min-height: 56px; border-bottom: 1px solid var(--border); }
.an-ex li:last-child { border-bottom: 0; }
.an-ex__time { color: var(--text-muted); }
.an-ex__order { color: var(--accent-text); text-decoration: none; font-size: var(--fs-sm); }
.an-ex__order:hover { text-decoration: underline; }
.an-ex__sum { text-align: right; }

/* ── Подсказка при наведении ── */
.an-tip { position: fixed; z-index: 60; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-xs); background: var(--surface); box-shadow: var(--shadow-md); font-size: var(--fs-xs); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }

/* Узко навигация — строка без sticky: бегунок data-ink должен ехать вместе с ней */
@media (max-width: 900px) {
  .an-rank__row, .an-rank__row:not(:has(.an-rank__thumb)) { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-1); padding: var(--sp-2); }
  .an-rank__thumb { display: none; }
  .an-rank__bar { grid-column: 1 / -1; grid-row: 2; height: 8px; }
  .an-rank__val { min-width: 0; }
  .an-db__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-2); padding: var(--sp-2) 0; }
  .an-db__track { grid-column: 1 / -1; grid-row: 2; }
  .an-fall__row { grid-template-columns: minmax(0, 1fr) 80px; row-gap: var(--sp-1); }
  .an-fall__bar { grid-column: 1 / -1; grid-row: 2; height: 20px; }
  .an-quads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .an-hero__value small { display: block; margin: var(--sp-1) 0 0; }
  .an-segl li { grid-template-columns: 10px minmax(0, 1fr) 40px auto; }
  .an-segl .delta { display: none; }
  .an-line__plot, .an-line__axis { margin-left: 44px; }
  .an-line__plot { height: 200px; }
  .an-heat { grid-template-columns: 28px repeat(var(--cols), minmax(0, 1fr)); gap: 1px; }
  .an-heat__col:nth-child(odd) { visibility: hidden; }
  .an-heat__cell { height: 26px; border-radius: 2px; }
  .an-coh__cell { font-size: var(--fs-xs); }
  .an-scatter__pt text, .an-scatter__lbl { font-size: 20px; }
  .an-ex li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .an-ex__time, .an-ex__order { display: none; }
  .an-list li { font-size: var(--fs-sm); }
  .an-sum__row { gap: var(--sp-3); }
}
@media (prefers-reduced-motion: reduce) { .an-more summary svg.icon, .an-scatter__pt circle { transition: none; } }


.an-tile__chart { min-width: 0; font-size: var(--fs-sm); }
.an-tile__chart .an-line__plot { height: 130px; }
.an-tile__chart .an-cols .bars { height: 120px; }
.an-tile__chart .an-rank__row:nth-child(n+6) { display: none; }
.an-tile__chart .an-fall { gap: 0; }
.an-tile__chart .an-fall__row { grid-template-columns: minmax(84px, 38%) minmax(0, 1fr) 80px; gap: var(--sp-3); min-height: 38px; }
.an-tile__chart .an-fall__bar { grid-column: auto; grid-row: auto; height: 16px; }
.an-tile__chart .an-fall__name small { display: none; }
.an-tile__chart .an-segl small, .an-tile__chart .an-rank__val .delta, .an-tile__chart .an-rank__name small { display: none; }
.an-tile__chart .an-cols__norm i { display: none; }
.an-tile__chart .an-rank__row { grid-template-columns: 32px minmax(0, 1fr) minmax(40px, 30%) auto; gap: var(--sp-3); padding-inline: 0; min-height: 44px; }
.an-tile__chart .an-rank__row:not(:has(.an-rank__thumb)) { grid-template-columns: minmax(0, 1fr) minmax(40px, 30%) auto; }
.an-tile__chart .an-rank__thumb { width: 32px; height: 32px; }
.an-tile__chart .an-rank__val { min-width: 0; }
.an-tile__chart .an-segl li { grid-template-columns: 10px minmax(0, 1fr) 44px auto; gap: var(--sp-2); min-height: 40px; }
.an-tile__chart .an-segl__val { display: none; }
/* у графика с нормой подпись пика наезжает на линию нормы — пик называет ответ словами, подпись только при наведении */
.an-cols:has(.an-cols__norm) .bars__col[data-peak]:not(:hover) .bars__tip { display: none; }


/* все отчёты — по группам, ссылками */
.an-all h3 { margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.an-all__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-4) var(--sp-6); }
.an-all__group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.an-all__group > span { margin-bottom: var(--sp-1); font-size: var(--fs-xs); color: var(--text-muted); }
.an-all__group button { display: flex; align-items: center; gap: var(--sp-2); padding: 4px 0; font-size: var(--fs-sm); color: var(--text); }
.an-all__group button:hover { color: var(--accent); }
.an-all__group svg { width: 16px; height: 16px; color: var(--text-muted); }



.an-bd { display: flex; flex-direction: column; gap: var(--sp-3); }
.an-chks { display: flex; flex-direction: column; gap: var(--sp-2); }
.an-chk-list { margin: 0; padding: 0; list-style: none; }
.an-chk { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto 90px 16px; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); }
.an-chk:hover { color: var(--accent); }
.an-chk__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.an-chk > b:last-of-type { text-align: right; }
.an-chk > svg { width: 14px; height: 14px; color: var(--text-muted); }

@media (max-width: 1280px) { .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .an-kpi:nth-child(3n+1) { border-left: 0; padding-left: 0; } }
@media (max-width: 760px) {
  .an-line__axis span:nth-child(even):not(:last-child) { visibility: hidden; }
  .an-grid { grid-template-columns: minmax(0, 1fr); }
  .an-tile--wide { grid-column: auto; }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-kpi, .an-kpi:first-child { border-left: 0; padding-left: 0; }
  .an-chk { grid-template-columns: minmax(0, 1fr) auto; }
  .an-chk__meta { grid-column: 1 / -1; grid-row: 2; }
  .an-chk .badge, .an-chk > svg { display: none; }
  .an-cmp__row { grid-template-columns: minmax(0, 1.2fr) 1fr 1fr 70px; gap: var(--sp-2); }
}

/* ── Стиль Stripe для Обзора, Аналитики и Отзывов (09.11.2026, по пилоту «Заказы»): шапка .sp-head с названием,
   справа подпись периода и кнопки; блоки без карточек с заголовком-названием, между блоками — отступ, не линии. KPI-строка — как была. ── */
.sp-dash { gap: var(--sp-6); }
.sp-cap { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); }
.sp-cap .an-info { margin-right: 0; }
.sp-dash .an-grid { row-gap: var(--sp-10); }
.sp-dash .an-tile__head > span:first-child, .sp-dash .an-tile__head .rv-title { color: var(--text); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.sp-dash .an-tile[role="button"]:hover .an-tile__head > span:first-child { color: var(--accent-text); }
.sp-dash .an-all { margin-top: var(--sp-4); gap: var(--sp-4); }
.an-bd .ltabs { border-bottom: 0; }

/* Площадки: выручка и комиссия по площадке (отчёт «Каналы») */
.an-agg { list-style: none; margin: 0; padding: 0; }
.an-agg li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.an-agg li:last-child { border-bottom: 0; }
.an-agg li > .an-link { grid-column: 2 / 4; justify-self: end; }
.an-agg__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-agg__name small, .an-agg__fee { color: var(--text-subtle); font-size: var(--fs-sm); }
@media (max-width: 480px) { .an-agg li { grid-template-columns: minmax(0, 1fr) auto; } .an-agg__fee { grid-column: 1 / -1; grid-row: 2; } }
