/* Раздел «Анализ рекламы». Цвета — токены app.css плюс свои для отклонений. */
:root {
  --ads-good: #15803d;
  --ads-bad: #dc2626;
  --ads-on: #22c55e;
  --ads-off: #9ca3af;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ads-good: #4ade80;
    --ads-bad: #f87171;
    --ads-on: #4ade80;
    --ads-off: #6b7280;
  }
}

.ads-page, .ads-screen { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }

/* --- Шапка раздела --------------------------------------------------------- */
.ads-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ads-crumbs { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; flex: 1 1 320px; min-width: 0; }
.ads-crumbs a { color: var(--accent); text-decoration: none; }
.ads-crumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ads-modes { display: flex; align-items: center; gap: 4px; }
.ads-modes .muted { margin-right: 4px; font-size: 13px; }

/* Период — общий компонент static/period.js и period.css. */


/* --- Панели и таблицы ------------------------------------------------------- */
.ads-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ads-search { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 240px; }
.ads-check { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.ads-link { color: var(--accent); text-decoration: none; font-size: 13px; }
.ads-link:hover { text-decoration: underline; }
.ads-link.disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

.ads-menu { position: relative; }
.ads-menu > summary { list-style: none; }
.ads-menu > summary::-webkit-details-marker { display: none; }
.ads-menu-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; margin: 0; padding: 6px;
  list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15); display: grid; gap: 2px; min-width: 260px;
}
.ads-menu-list li { display: flex; align-items: center; gap: 4px; }
.ads-menu-list label { flex: 1; padding: 2px 4px; }
.ads-menu-list .btn { padding: 0 6px; }

.ads-table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 220px);
}
.ads-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.ads-table th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted);
  font-weight: 500; font-size: 12px; text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom;
}
.ads-table th.num { text-align: right; }
.ads-table th.sortable { cursor: pointer; }
.ads-table th.asc::after { content: " ▲"; }
.ads-table th.desc::after { content: " ▼"; }
.ads-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ads-table td.num { text-align: right; white-space: nowrap; }
.ads-table td.na { color: var(--muted); }
.ads-table .sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.ads-table th.sticky { z-index: 3; background: var(--surface-2); }
.ads-table tr.total td { background: var(--surface-2); font-weight: 600; }
.ads-table tr:hover td { background: var(--accent-soft); }
.ads-table tr.empty td { color: var(--muted); }
.ads-product { min-width: 220px; max-width: 320px; }
.ads-product .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-table td.metric { font-weight: 500; white-space: nowrap; cursor: help; }

/* Ячейка «значение + отклонение»: как в кабинете — мелко сверху изменение. */
.ads-cell { text-align: right; white-space: nowrap; min-width: 96px; }
.ads-marks { display: flex; justify-content: flex-end; gap: 4px; }
.ads-marks:empty { display: none; }
.ads-marks .dev-pill { display: inline-block; margin: 3px 0 0; }
.ads-mark.good { color: var(--ads-good); }
.ads-mark.bad { color: var(--ads-bad); }
.ads-mark.plan { font-weight: 600; }
.ads-value { font-size: 15px; font-variant-numeric: tabular-nums; }
.ads-value.na { color: var(--muted); }

/* Колонки кампаний на экране товара. */
.ads-compare th.ads-campaign-head { white-space: normal; min-width: 170px; max-width: 220px; color: var(--text); font-size: 13px; vertical-align: top; }
.ads-compare th.ads-campaign-head.total { background: var(--accent-soft); }
/* Анализ рекламы товара (решение владельца 10.11.2026): заголовок кампании и её цифры — по
   центру столбца; план товара — отдельным столбцом после показателя (11.11.2026). */
.ads-compare th.ads-campaign-head { text-align: center; }
.ads-compare .ads-campaign-title, .ads-compare .ads-campaign-meta { justify-content: center; }
.ads-compare td.ads-cell { text-align: center; }
.ads-compare .ads-marks { justify-content: center; }
.ads-compare .ads-plan-col { text-align: center; white-space: nowrap; color: var(--muted); font-size: 13px;
  vertical-align: middle; }
.ads-compare th.ads-plan-col { vertical-align: bottom; }
.ads-campaign-title { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; }
.ads-campaign-title a { color: var(--text); text-decoration: none; }
.ads-campaign-title a:hover { color: var(--accent); text-decoration: underline; }
.ads-campaign-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; }
.ads-chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 12px; }
.ads-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.ads-dot.on { background: var(--ads-on); }
.ads-dot.off { background: var(--ads-off); }
.ads-budget { font-size: 12px; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; }
.ads-budget-top { display: inline-flex; align-items: center; gap: 4px; }
.ads-budget-week { font-size: 11px; }
.ads-camp-flip { display: inline-flex; gap: 2px; margin-right: 6px; vertical-align: middle; }
.ads-camp-arrow { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); text-decoration: none; font-size: 13px; }
.ads-camp-arrow:hover { background: var(--surface-2, #f3f4f6); }
.ads-camp-arrow.off { color: var(--muted, #9ca3af); pointer-events: none; opacity: .45; }
.ads-budget-arrow { font-size: 12px; cursor: help; padding: 0 2px; border-radius: 4px; }
.ads-budget-arrow.good { color: var(--ads-good); }
.ads-budget-arrow.bad { color: var(--ads-bad); }
.ads-budget-arrow:focus { outline: 1px solid var(--accent); }

/* Экран кампании. */
.ads-campaign-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 6px; }
.ads-campaign-card h2 { font-size: 20px; }
.ads-campaign-card .ads-dot { width: 11px; height: 11px; }
.ads-campaign-goods, .ads-campaign-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ads-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ads-summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; text-align: left; }
.ads-summary-card .ads-marks { justify-content: flex-start; }
.ads-summary-label { color: var(--muted); font-size: 12px; }
.ads-summary-card .ads-value { font-size: 20px; font-weight: 600; }
.ads-days-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ads-days-head .ads-toolbar { margin: 0; }
.ads-toggle { font-weight: 600; }
.ads-filter-row th { top: 33px; padding: 4px 6px; }
.ads-filter { width: 100%; min-width: 70px; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; text-align: right; }
.ads-filter.bad { border-color: var(--ads-bad); }
.ads-date { white-space: nowrap; font-weight: 500; }
.ads-date.weekend { color: var(--accent); }
/* Товар по дням: стрелка после SKU и строки дней под товаром. */
.ads-days-arrow {
  border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 14px;
  line-height: 1; padding: 1px 5px; margin-left: 4px; border-radius: 4px;
}
.ads-days-arrow:hover, .ads-days-arrow[aria-expanded="true"] { background: var(--accent-soft); }
.ads-days-arrow:focus-visible { outline: 1px solid var(--accent); }
.ads-table tr.ads-day-row td { background: var(--surface-2); }
.ads-table tr.ads-day-row td.ads-day-date { padding-left: 76px; font-size: 13px; text-align: left; }
/* Кампании товара: строки под товаром, дни кампании — ещё глубже. */
.ads-table tr.ads-camp-row td { background: var(--surface); }
.ads-table td.ads-camp-name { padding-left: 40px; font-size: 13px; max-width: 320px; }
.ads-camp-title { display: flex; align-items: center; gap: 6px; font-weight: 500; overflow: hidden; }
.ads-camp-title a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-camp-title a:hover { color: var(--accent); text-decoration: underline; }
.ads-camp-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 2px; }
.ads-table tr.ads-camp-row .ads-value { font-size: 14px; }
.ads-table td.ads-budget-plan { font-variant-numeric: tabular-nums; cursor: help; }
/* Расход к плану бюджета: перерасход — красным, недорасход — жёлтым (±10 % — норма). */
.ads-table td.over-plan, .ads-table tr td.over-plan { background: rgba(220, 38, 38, .12); }
.ads-table td.over-plan .ads-value { color: var(--ads-bad); font-weight: 600; }
.ads-table td.under-plan, .ads-table tr td.under-plan { background: var(--warn-bg); }
.ads-table td.under-plan .ads-value { color: var(--warn-text); font-weight: 600; }
.ads-table tr.ads-day-row .ads-value { font-size: 14px; }
.ads-presets-select { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 6px; }
.ads-note { padding: 8px 12px; color: var(--muted); font-size: 13px; }
.ads-orders h4 { margin: 12px 12px 0; font-size: 14px; }
.ads-table tr.glue td { background: var(--accent-soft); }
.ads-empty { padding: 32px; text-align: center; color: var(--muted); }
.ads-loading { padding: 32px; color: var(--muted); }

/* Отстаёт от плана рекламных заказов. */
.ads-table td.lag { box-shadow: inset 3px 0 0 var(--ads-bad); }
.ads-compare th.ads-campaign-head.lag { box-shadow: inset 0 3px 0 var(--ads-bad); }

/* Воронка: прогноз. */
.ads-funnel { display: grid; gap: 8px; }
.ads-funnel > .ads-toggle { justify-self: start; }
.ads-funnel-body { min-width: 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.ads-funnel-form, .ads-funnel-rates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ads-funnel-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.ads-funnel-field input { width: 120px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); text-align: right; }
.ads-funnel-field input.changed { border-color: var(--accent); background: var(--accent-soft); }
.ads-funnel-table td.given { font-weight: 700; }
.ads-funnel-table { width: auto; }

/* Блоки «Реклама и органика», «Поисковые запросы и трафик». */
.ads-block { display: grid; gap: 8px; }
.ads-block h3 { margin: 4px 0 0; font-size: 16px; }
.ads-block h4 { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.ads-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ads-upload { cursor: pointer; }
.ads-phrases { display: grid; gap: 8px; }
.ads-source-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.ads-source-row .ads-marks { order: 3; }
.ads-source-row .ads-value { font-size: 14px; font-weight: 600; }
.ads-chip.src-search { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ads-chip.src-catalog { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.ads-table th.organic { background: var(--accent-soft); }

@media (max-width: 700px) {
  .ads-search { min-width: 0; flex: 1; }
}
/* Отклонение от плана больше ±10 %: хуже — красным, лучше — зелёным */
.ads-cell.plan-bad { background: rgba(220, 38, 38, .12); }
.ads-cell.plan-bad .ads-value { color: var(--ads-bad); font-weight: 600; }
.ads-cell.plan-good { background: rgba(22, 163, 74, .12); }
.ads-cell.plan-good .ads-value { color: var(--ads-good); font-weight: 600; }

/* Где показывалась реклама и органика (решение владельца 11.11.2026). */
.pl-table td.pl-cell { line-height: 1.25; }
.pl-table td.pl-cell small { display: block; font-size: 11px; white-space: nowrap; }
.pl-table .pl-organic { color: var(--ads-good); font-weight: 600; }
.pl-table tr.pl-total td { font-weight: 600; border-top: 2px solid var(--line); }
.pl-table th.has-hint { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.pl-name { display: flex; align-items: center; gap: 6px; }
/* Синяя обводка у кнопки и в выключенном виде (владелец 19.11.2026). */
.ads-glue-btn { border-color: var(--accent); }
.ads-glue-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Экран кампании (владелец 24.11.2026): карточка по ширине названия, ссылка «Поисковые запросы»
   в строке пути, таблица дней плотнее — шрифт тот же, меньше поля ячеек. */
.ads-screen > .ads-campaign-card { align-self: flex-start; max-width: 100%; }
.ads-crumb-extra { margin-left: 12px; font-size: 14px; font-weight: 400; }
.ads-table.ads-compact th { padding: 4px 6px; }
.ads-table.ads-compact td { padding: 3px 6px; }
.ads-table.ads-compact .ads-filter-row th { top: 25px; padding: 2px 4px; }
.ads-table.ads-compact .ads-filter { min-width: 48px; height: 22px; padding: 0 4px; }

/* График мест показа по дням рядом с карточкой кампании (владелец 24.11.2026). */
.ads-campaign-top { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.ads-campaign-top > .ads-campaign-card { align-self: stretch; }
.ads-places-chart { flex: 1 1 420px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; display: grid; gap: 6px; }
.ads-places-title { font-weight: 600; font-size: 14px; }
.ads-places-svg { width: 100%; height: 200px; display: block; }
.ads-places-svg polyline { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* Линии без заливки: цветные классы ниже задают и fill (для точек), а у линии он рисовал
   закрашенные фигуры (владелец 25.11.2026). */
.ads-places-svg polyline[class] { fill: none; }
.ads-places-svg .grid-line { stroke: var(--line); }
.ads-places-svg .axis { fill: var(--muted); font-size: 11px; }
.ads-places-svg .hit { fill: transparent; }
.ads-places-svg .hit:hover { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.ads-places-svg .pc-search { stroke: #2f6fed; fill: #2f6fed; }
.ads-places-svg .pc-catalog { stroke: #12a150; fill: #12a150; }
.ads-places-svg .pc-other { stroke: #e5484d; fill: #e5484d; }
.ads-places-svg .pc-unsplit { stroke: #8e4ec6; fill: #8e4ec6; }
.ads-places-svg .pc-organic { stroke: #f5a524; fill: #f5a524; stroke-dasharray: 4 3; }
.ads-places-svg .pc-position { stroke: #0b7285; fill: #0b7285; stroke-width: 2; }
.ads-places-svg text.pc-position-ax { fill: #0b7285; }
.ads-places-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ads-places-leg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 4px; cursor: pointer; color: inherit; font: inherit; font-size: 13px; border-radius: 6px; }
.ads-places-leg i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--line); }
.ads-places-leg[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.ads-places-leg[aria-pressed="true"] i.pc-search { background: #2f6fed; }
.ads-places-leg[aria-pressed="true"] i.pc-catalog { background: #12a150; }
.ads-places-leg[aria-pressed="true"] i.pc-other { background: #e5484d; }
.ads-places-leg[aria-pressed="true"] i.pc-unsplit { background: #8e4ec6; }
.ads-places-leg[aria-pressed="true"] i.pc-organic { background: #f5a524; }
.ads-places-leg[aria-pressed="true"] i.pc-position { background: #0b7285; }
/* Воронка рекламы на графике по дням (25.11.2026) — свои цвета, не как у мест. */
.ads-places-svg .pc-clicks { stroke: #d6336c; fill: #d6336c; }
.ads-places-svg .pc-carts { stroke: #e8590c; fill: #e8590c; }
.ads-places-svg .pc-orders { stroke: #15aabf; fill: #15aabf; }
.ads-places-svg .pc-allorders { stroke: #5c940d; fill: #5c940d; }
.ads-places-svg polyline.pc-clicks, .ads-places-svg polyline.pc-carts,
.ads-places-svg polyline.pc-orders, .ads-places-svg polyline.pc-allorders { fill: none; stroke-width: 1.5; }
.ads-places-leg[aria-pressed="true"] i.pc-clicks { background: #d6336c; }
.ads-places-leg[aria-pressed="true"] i.pc-carts { background: #e8590c; }
.ads-places-leg[aria-pressed="true"] i.pc-orders { background: #15aabf; }
.ads-places-leg[aria-pressed="true"] i.pc-allorders { background: #5c940d; }
.ads-places-leg:focus-visible { outline: 1px solid var(--accent); }
.ads-places-note { font-size: 12px; }

/* «Реклама по товарам» в виде бывших «Артикулов» (владелец 25.11.2026): строка групп колонок,
   черта между группами, итог «Магазин» внизу; отклонение — плашкой под цифрой (25.11.2026). */
.ads-cards { margin-bottom: 0; }
.ads-grid { font-variant-numeric: tabular-nums; }
.ads-grid thead tr.ads-groups th { top: 0; height: 30px; box-sizing: border-box; text-align: center;
  color: var(--text); font-weight: 600; vertical-align: middle; }
.ads-grid thead tr.ads-cols th { top: 30px; }
.ads-grid th, .ads-grid td { padding: 7px 10px; }
.ads-grid .group-start { border-left: 1px solid var(--line); }
.ads-grid .ads-cell { min-width: 0; }
.ads-grid .ads-value { font-size: 14px; }
.ads-grid tfoot td { position: sticky; bottom: 0; z-index: 1; background: var(--surface-2);
  font-weight: 650; border-top: 2px solid var(--line); }
.ads-grid tfoot td.sticky { z-index: 2; }
.ads-grid tr.ads-idle .ads-product { opacity: .75; }

/* «Что меняли» по нажатию на день графика показов (владелец 25.11.2026). */
.ads-places-svg .hit { cursor: pointer; }
.ads-changes { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; font-size: 13px; }
.ads-changes[hidden] { display: none; }
.ads-changes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ads-changes-close { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ads-changes-close:hover { color: var(--text); }
.ads-changes-table { border-collapse: collapse; width: 100%; }
.ads-changes-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ads-changes-day td { font-weight: 600; background: var(--surface-2); }
.ads-changes-kind { white-space: nowrap; font-weight: 500; }
.ads-changes-table tr.kind-strategy .ads-changes-kind { color: var(--accent); }

/* «По дням / По часам» на графике показов экрана кампании (владелец 25.11.2026). */
.ads-places-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ads-places-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ads-places-mode { border: 0; background: var(--surface); color: var(--muted); padding: 2px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ads-places-mode + .ads-places-mode { border-left: 1px solid var(--line); }
.ads-places-mode[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ads-hours { display: grid; gap: 6px; }
.ads-hours-nav { display: flex; align-items: center; gap: 8px; }
.ads-hours-svg { height: 190px; }
.ads-hours-svg .hc-bar { fill: color-mix(in srgb, #2f6fed 55%, transparent); }
.ads-hours-svg .hc-bar:hover { fill: #2f6fed; }
.ads-hours-svg polyline.hc-clicks { fill: none; stroke: #e5484d; stroke-width: 2; }
.ads-hours-svg .hc-clicks-ax { fill: #e5484d; }
.ads-hours-svg .hc-change { stroke: #d97706; stroke-width: 2; stroke-dasharray: 4 3; cursor: help; }
.ads-hours-svg .hc-change.kind-strategy { stroke: #8e4ec6; }
.hc-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.hc-leg::before { content: ""; display: inline-block; width: 12px; height: 10px; }
.hc-leg-bar::before { background: color-mix(in srgb, #2f6fed 55%, transparent); }
.hc-leg-line::before { height: 2px; background: #e5484d; }
.hc-leg-change::before { height: 0; border-top: 2px dashed #d97706; }
/* Линии «По часам / По дням недели» (владелец 25.11.2026): каждая в своём масштабе. */
.ads-hours-svg .hl-line { fill: none; stroke-width: 2; }
.ads-hours-svg .hit { fill: transparent; cursor: default; }
.ads-hours-svg .hit:hover { fill: color-mix(in srgb, var(--muted) 10%, transparent); }
.hl-clicks { --c: #e5484d; } .hl-ctr { --c: #8e4ec6; } .hl-carts { --c: #f5a524; }
.hl-orders { --c: #12a150; } .hl-all { --c: #0b7285; }
.ads-hours-svg .hl-line { stroke: var(--c); }
.ads-hours-svg .hl-ctr { stroke-dasharray: 5 3; }
.ads-hours-svg .hl-dot { fill: var(--c); }
.ads-hours-svg text[class*="-ax"] { fill: var(--c); }
.ads-hours-svg text.hl-clicks-ax { --c: #e5484d; } .ads-hours-svg text.hl-ctr-ax { --c: #8e4ec6; }
.ads-hours-svg text.hl-carts-ax { --c: #f5a524; } .ads-hours-svg text.hl-orders-ax { --c: #12a150; }
.ads-hours-svg text.hl-all-ax { --c: #0b7285; }
.ads-places-leg[aria-pressed="true"] i[class^="hl-"] { background: var(--c); }
.ads-hours-plot-wrap { display: grid; gap: 4px; }
.ads-hours-wrap { max-height: 360px; }
.ads-hours-table td.ads-hours-change { font-size: 12px; color: var(--muted); white-space: normal; min-width: 180px; }

/* Шапка «Все кампании»: сумма недельных бюджетов и месяц; план без данных — ссылка (27.11.2026). */
.ads-budget-sum { margin-top: 4px; font-size: 12px; font-weight: 600; }
.ads-plan-missing { color: var(--bad); font-size: 12px; white-space: nowrap; }
.ads-crumbs .cp-carousel { flex: 1 1 auto; justify-content: flex-start; }
/* Карусель в шапке не наследует крупный жирный шрифт пути (18 px) — как в других экранах, 14 px
   (владелец 30.11.2026: «при 100 % слишком крупный шрифт»). */
.ads-crumbs .cp-carousel { font-size: 14px; font-weight: 400; }
.ads-crumbs .cp-prod.side { max-width: 220px; }
/* Компактная карусель в шапке (владелец 01.12.2026: «почему карусель крупная осталась»): карточка
   в высоту кнопки «Назад» — фото 28 px, отступы и стрелки меньше; на отдельных экранах товара
   карусель прежняя. */
.ads-crumbs .cp-carousel { gap: 6px; }
.ads-crumbs .cp-prod { padding: 3px 8px; border-radius: 10px; }
.ads-crumbs .cp-prod.center { max-width: 260px; }
.ads-crumbs .cp-prod.side { max-width: 180px; transform: none; }
.ads-crumbs .cp-prod .product { gap: 8px; min-width: 0; }
.ads-crumbs .cp-prod .product-pic { width: 28px; height: 28px; border-radius: 6px; }
.ads-crumbs .cp-prod .product-name { font-size: 13px; }
.ads-crumbs .cp-prod .product-meta { font-size: 11px; }
.ads-crumbs .cp-arrow { width: 28px; height: 28px; font-size: 18px; }
.ads-cards .card.plan-good { border-color: var(--good); }
.ads-cards .card.plan-bad { border-color: var(--bad); }
.ads-cards .card .value .dev-pill { font-size: 12px; vertical-align: middle; }
/* Шапка «План» и сравнение суммы бюджетов с планом (28.11.2026). */
.ads-compare th.ads-plan-head { vertical-align: top; }
.ads-plan-title { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ads-plan-budget { font-size: 12px; font-weight: 400; line-height: 1.5; }
.ads-plan-budget strong { color: var(--text); font-weight: 600; }
.ads-budget-line { display: flex; gap: 6px; align-items: center; justify-content: center; }
.ads-budget-line .dev-pill { margin: 0; }
.ads-budget-line.plan-good > span:first-child { color: var(--good); }
.ads-budget-line.plan-bad > span:first-child { color: var(--bad); }
/* Ставка «План» — ссылка в «Сравнение с конкурентами» по товару (28.11.2026). */
.ads-bid-plan { color: inherit; text-decoration: none; display: block; cursor: pointer; }
.ads-bid-plan > div:first-child { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 3px; }
.ads-bid-plan:hover > div:first-child { text-decoration-style: solid; }
/* Шапка рекламы товара (просьба владельца 28.11.2026): недельный бюджет плана, всех кампаний и каждой
   кампании — на одной строке, месяц / период — на следующей. Шапки прижаты к низу, строки одной высоты. */
.ads-compare th.ads-campaign-head, .ads-compare th.ads-plan-head { vertical-align: bottom; }
.ads-compare .ads-budget { gap: 0; align-items: center; }
.ads-compare .ads-budget-sum { margin-top: 0; }
.ads-compare .ads-plan-budget, .ads-compare .ads-budget-line, .ads-compare .ads-budget-top,
.ads-compare .ads-budget-week { height: 22px; line-height: 22px; display: flex; align-items: center;
  justify-content: center; gap: 4px; }

/* ПФ на графике по дням (30.11.2026): столбики корзин ПФ. */
.ads-places-svg rect.pc-pf { fill: #9c36b5; fill-opacity: .35; stroke: #9c36b5; stroke-width: 1; }
.ads-places-svg text.pc-pf-label { fill: #9c36b5; font-size: 10px; }
.ads-places-leg[aria-pressed="true"] i.pc-pf { background: #9c36b5; }
