:root,
[data-theme="light"] {
  --dash-bg: #f8fafc;
  --dash-surface: #ffffff;
  --dash-surface-2: #f1f5f9;
  --dash-border: #e2e8f0;
  --dash-text: #0f172a;
  --dash-muted: #64748b;
  --dash-primary: #2563eb;
  --dash-primary-fg: #ffffff;
  --dash-success: #059669;
  --dash-danger: #dc2626;
  --dash-warning: #d97706;
  --dash-radius: 10px;
  --dash-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --ads-head-budget-bg: #e3ecfd;
  --ads-head-today-bg: #ddf5eb;
  --ads-head-period30-bg: #fef3c7;
  --ads-cell-border: rgba(148, 163, 184, 0.32);
  --ads-group-border: #94a3b8;
}

body.dash-page {
  background: var(--dash-bg);
  color: var(--dash-text);
}

.ads-campaigns-table-v2 .ads-col-m {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.62rem;
  width: 46px;
}
.ads-m-cpo { font-weight: 600; }

.dash-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.dash-wrap {
  padding: 8px 10px 16px;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.dash-kpi {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 10px 12px;
  box-shadow: var(--dash-shadow);
}

.dash-kpi-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin-bottom: 4px;
}

.dash-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-kpi-value.is-negative { color: var(--dash-danger); }
.dash-kpi-value.is-positive { color: var(--dash-success); }

.dash-panel {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  box-shadow: var(--dash-shadow);
  margin-bottom: 10px;
  overflow: hidden;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dash-border);
}

.dash-panel-head h2 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.dash-panel-body {
  padding: 10px 12px;
}

.dash-chart-wrap {
  position: relative;
  height: 220px;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
  color: var(--dash-text);
  font-size: 11px;
  cursor: pointer;
}

.dash-btn-primary {
  background: var(--dash-primary);
  border-color: var(--dash-primary);
  color: var(--dash-primary-fg);
}

.dash-btn-danger {
  background: transparent;
  border-color: var(--dash-danger);
  color: var(--dash-danger);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.dash-table th,
.dash-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--dash-border);
  text-align: left;
  white-space: nowrap;
}

.dash-table thead th {
  background: var(--dash-surface-2);
  color: var(--dash-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.dash-table tbody tr:hover td {
  background: var(--dash-surface-2);
}

.dash-table .num-negative { color: var(--dash-danger); font-weight: 600; }
.dash-table .num-positive { color: var(--dash-success); font-weight: 600; }

.dash-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
}

.dash-badge-active { background: rgba(5, 150, 105, 0.15); color: var(--dash-success); }
.dash-badge-pause { background: rgba(217, 119, 6, 0.15); color: var(--dash-warning); }
.dash-badge-done { background: rgba(100, 116, 139, 0.15); color: var(--dash-muted); }

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 30;
}

.dash-search {
  padding: 5px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
  color: var(--dash-text);
  font-size: 11px;
  min-width: 180px;
}

.dash-tip {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.dash-tip-warn { background: rgba(217, 119, 6, 0.12); color: var(--dash-warning); }
.dash-tip-good { background: rgba(5, 150, 105, 0.12); color: var(--dash-success); }
.dash-tip-danger { background: rgba(220, 38, 38, 0.12); color: var(--dash-danger); }

.dash-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 280px);
}

.oa-profit-negative { color: var(--dash-danger) !important; font-weight: 700; }
.oa-profit-positive { color: var(--dash-success) !important; font-weight: 700; }

.dash-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

/* --- Реклама: KPI, период, кластеры WB-style --- */
.ads-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ads-kpi-card {
  background: linear-gradient(145deg, var(--dash-surface) 0%, var(--dash-surface-2) 100%);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--dash-shadow);
}

.ads-kpi-card .lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  margin-bottom: 6px;
}

.ads-kpi-card .val {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ads-kpi-card .sub {
  font-size: 0.65rem;
  color: var(--dash-muted);
  margin-top: 4px;
}

.ads-kpi-card.accent-views .val { color: #2563eb; }
.ads-kpi-card.accent-clicks .val { color: #7c3aed; }
.ads-kpi-card.accent-spend .val { color: #dc2626; }
.ads-kpi-card.accent-orders .val { color: #059669; }
.ads-kpi-card.accent-pos .val { color: #d97706; }
.ads-kpi-card.accent-efficiency .val { color: #0891b2; }

.ads-dash-toggle {
  font-size: 11px;
}

.ads-dashboard.collapsed .ads-dashboard-body {
  display: none;
}

.ads-drange-wrap { position: relative; }
.ads-drange-trigger { min-width: 210px; justify-content: flex-start; }
.ads-drange-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200;
  display: none;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.15);
  min-width: 520px;
}
.ads-drange-pop.is-open { display: block; }
.topbar-right .ads-drange-wrap { flex-shrink: 0; }
.topbar-right .ads-drange-trigger { min-width: 180px; font-size: 11px; padding: 3px 8px; }
.ads-drange-body { display: flex; gap: 0; }
.ads-drange-calendars { display: flex; gap: 12px; padding: 12px; flex: 1; }
.ads-drange-month { min-width: 220px; }
.ads-drange-month-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 0.8rem; margin-bottom: 8px;
}
.ads-drange-nav { border: none; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--dash-muted); }
.ads-drange-week, .ads-drange-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ads-drange-week span { text-align: center; font-size: 0.62rem; color: var(--dash-muted); padding: 2px; }
.ads-drange-week .wknd { color: var(--dash-danger); }
.ads-drange-day {
  border: none; background: transparent; border-radius: 6px;
  padding: 6px 0; font-size: 0.72rem; cursor: pointer; color: var(--dash-text);
}
.ads-drange-day.wknd { color: var(--dash-danger); }
.ads-drange-day.in-range { background: rgba(37, 99, 235, 0.12); }
.ads-drange-day.edge { background: var(--dash-primary); color: #fff; font-weight: 700; }
.ads-drange-day.empty { visibility: hidden; }
.ads-drange-presets {
  border-left: 1px solid var(--dash-border);
  padding: 10px;
  display: flex; flex-direction: column; gap: 6px; min-width: 130px;
}
.ads-drange-presets button {
  text-align: left; border: none; background: transparent; cursor: pointer;
  padding: 6px 8px; border-radius: 8px; font-size: 0.75rem; color: var(--dash-text);
}
.ads-drange-presets button:hover { background: var(--dash-surface-2); }
.ads-drange-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-top: 1px solid var(--dash-border);
  font-size: 0.75rem;
}
.ads-drange-foot-actions { display: flex; gap: 6px; }

.ads-cluster-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ads-cluster-tabs button {
  border: 1px solid var(--dash-border); background: var(--dash-surface);
  border-radius: 999px; padding: 5px 12px; font-size: 0.72rem; cursor: pointer;
}
.ads-cluster-tabs button.active {
  background: rgba(124, 58, 237, 0.12); border-color: #7c3aed; color: #7c3aed; font-weight: 600;
}

.ads-cluster-row-excluded td { opacity: 0.55; }
.ads-cluster-row-excluded .query-cell { text-decoration: line-through; }

.ads-metric-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 0.65rem; font-weight: 600;
}
.ads-metric-chip.ok { background: rgba(5,150,105,.12); color: var(--dash-success); }
.ads-metric-chip.mid { background: rgba(217,119,6,.12); color: var(--dash-warning); }
.ads-metric-chip.low { background: rgba(220,38,38,.12); color: var(--dash-danger); }

.ads-status-pill {
  display: inline-flex; padding: 3px 9px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 600; text-transform: capitalize;
}
.ads-status-pill.active { background: rgba(5,150,105,.15); color: var(--dash-success); }
.ads-status-pill.inactive { background: rgba(100,116,139,.15); color: var(--dash-muted); }
.ads-status-pill.excluded { background: rgba(220,38,38,.12); color: var(--dash-danger); }

.ads-col-settings {
  position: relative;
}
.ads-col-settings-pop {
  display: none;
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 120;
  background: var(--dash-surface); border: 1px solid var(--dash-border);
  border-radius: 12px; padding: 0;
  width: 248px;
  max-width: min(248px, calc(100vw - 16px));
  box-shadow: var(--dash-shadow);
  isolation: isolate;
  box-sizing: border-box;
  overflow: hidden;
}
.ads-col-settings-head,
.ads-col-settings-search-wrap,
.ads-col-settings-body,
.ads-col-settings-foot {
  background: var(--dash-surface);
}
.ads-col-settings-pop.is-open { display: block; }
.ads-col-settings-pop.is-fixed {
  position: fixed;
  z-index: 10050;
  width: 248px;
  max-width: min(248px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
}
.ads-col-settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  font-weight: 600;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--dash-border);
  flex-shrink: 0;
}
.ads-col-settings-title { min-width: 0; }
.ads-col-settings-count {
  flex-shrink: 0;
  font-weight: 500;
  font-size: 0.65rem;
  color: var(--dash-muted);
  font-variant-numeric: tabular-nums;
}
.ads-col-settings-search-wrap {
  padding: 6px 10px;
  border-bottom: 1px solid var(--dash-border);
  flex-shrink: 0;
}
.ads-col-settings-search {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.68rem;
  padding: 5px 8px;
}
.ads-col-settings-body {
  max-height: min(50vh, 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--dash-surface);
  -webkit-overflow-scrolling: touch;
}
.ads-col-settings-item {
  display: flex; gap: 8px; align-items: center; font-size: 0.72rem;
  padding: 6px 12px; cursor: pointer;
  background: var(--dash-surface);
}
.ads-col-settings-item span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ads-col-settings-item:hover { background: var(--dash-surface-2); }
.ads-col-settings-empty {
  padding: 14px 12px;
  font-size: 0.68rem;
  color: var(--dash-muted);
  text-align: center;
  background: var(--dash-surface);
}
.ads-col-settings-foot {
  display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--dash-border);
  flex-shrink: 0;
}
.ads-col-settings-foot .dash-btn { flex: 1; font-size: 0.64rem; padding: 5px 6px; }

.hidden { display: none !important; }

/* --- Карточка РК (как WB) --- */
.adc-wrap { display: flex; flex-direction: column; gap: 8px; }

.adc-more-details {
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
  font-size: 0.68rem;
}
.adc-more-details > summary {
  cursor: pointer;
  padding: 6px 10px;
  color: var(--dash-muted);
  user-select: none;
  list-style: none;
}
.adc-more-details > summary::-webkit-details-marker { display: none; }
.adc-more-details[open] > summary { border-bottom: 1px solid var(--dash-border); }
.adc-campaign-meta-compact { border: none; border-radius: 0; padding: 8px 10px; }
.adc-more-details #adc-recommendations { padding: 0 10px 8px; }
.adc-more-details #adc-recommendations .dash-tip { margin-bottom: 4px; padding: 6px 8px; font-size: 0.64rem; }

.adc-campaign-meta-head {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.adc-recommendations-head .dash-tip {
  margin-bottom: 4px;
  padding: 6px 8px;
  font-size: 0.64rem;
}
.adc-recommendations-head:empty { display: none; }

.adc-campaign-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.adc-campaign-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.adc-campaign-head-row #adc-title,
.adc-campaign-head-row h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  min-width: 0;
}
.adc-product-strip-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  border: none;
  padding: 0;
  background: transparent;
  width: 100%;
}
.adc-product-strip-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.adc-product-strip-body {
  min-width: 0;
}
.adc-product-strip-head.is-collapsed .adc-product-strip-body {
  display: none;
}
.adc-product-strip-head.is-collapsed.is-dense {
  max-height: none;
  overflow: visible;
  padding-bottom: 2px;
}
.adc-product-strip-head.is-dense {
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--dash-surface);
  max-height: min(28vh, 220px);
  overflow: auto;
}
.adc-product-strip-head .adc-products-label {
  width: 100%;
  line-height: 1.2;
}
.adc-product-strip-head .adc-products-inline {
  flex: none;
  width: 100%;
}
.adc-product-nav { cursor: pointer; }
.adc-product-nav:hover { border-color: var(--dash-primary); }

.adc-clusters-panel-main.is-sections-mode > .adc-clusters-table-wrap {
  display: none;
}
.adc-clusters-panel-main.is-sections-mode > .adc-cluster-filters {
  display: none;
}
.adc-product-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adc-product-section {
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
  overflow: hidden;
}
.adc-product-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
}
.adc-section-toggle {
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.adc-section-status-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}
.adc-section-status-tabs button {
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.62rem;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.adc-section-status-tabs button.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: #7c3aed;
  color: #7c3aed;
  font-weight: 600;
}
.adc-section-info {
  flex: 1;
  min-width: 140px;
}
.adc-section-title {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
}
.adc-section-meta {
  display: block;
  font-size: 0.62rem;
  color: var(--dash-muted);
  margin-top: 2px;
}
.adc-section-bid { flex-shrink: 0; }
.adc-section-count {
  font-size: 0.62rem;
  color: var(--dash-muted);
  white-space: nowrap;
}
.adc-product-section.is-collapsed .adc-product-section-body {
  display: none;
}
.adc-product-section-body .adc-clusters-table-wrap {
  max-height: min(55vh, 520px);
}
.adc-section-heatmap {
  border-top: 1px solid var(--dash-border);
  padding: 10px 12px 12px;
  background: var(--dash-surface);
}
.adc-section-heatmap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
  padding: 0;
}
.adc-section-heatmap-head .adc-clusters-title {
  font-size: 0.75rem;
  font-weight: 700;
}
.adc-section-heatmap-body {
  padding: 0;
}
.adc-section-heatmap .adc-heat-split {
  grid-template-columns: 1fr;
}
@media (min-width: 1100px) {
  .adc-section-heatmap .adc-heat-split {
    grid-template-columns: 3fr 2fr;
  }
}

.adc-top-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
}
.adc-camp-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.2);
}
.adc-camp-badge.is-active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.35);
}
.adc-camp-badge.is-pause {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}
.adc-camp-strip {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: rgba(15, 23, 42, 0.02);
}
.adc-zones-clear {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adc-zone-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: var(--dash-surface, #fff);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.adc-zone-toggle:hover { border-color: #94a3b8; }
.adc-zone-toggle.is-on {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
}
.adc-zone-toggle-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dash-text, #334155);
}
.adc-zone-toggle-state {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-muted);
  min-width: 28px;
}
.adc-zone-toggle.is-on .adc-zone-toggle-state { color: #4338ca; }
.adc-zone-toggle .adc-zone-switch {
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}
.adc-zone-toggle .adc-zone-switch::after {
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
}
.adc-zone-toggle.is-on .adc-zone-switch {
  background: #6366f1;
}
.adc-zone-toggle.is-on .adc-zone-switch::after {
  transform: translateX(14px);
}
.adc-camp-zones-hint {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--dash-muted);
}
.adc-rk-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.adc-btn-stop {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.25) !important;
}
.adc-btn-stop:hover {
  background: rgba(185, 28, 28, 0.06) !important;
}
.adc-zones-inline {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.adc-zone-compact {
  border-radius: 8px;
  padding: 4px 8px;
  min-width: 0;
  gap: 6px;
}
.adc-zone-compact .adc-zone-label { font-size: 0.66rem; }
.adc-zone-compact .adc-zone-switch {
  width: 28px;
  height: 16px;
}
.adc-zone-compact .adc-zone-switch::after {
  width: 12px;
  height: 12px;
  top: 2px;
  left: 2px;
}
.adc-zone-compact.is-on .adc-zone-switch::after { transform: translateX(12px); }

.adc-product-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.adc-product-strip.adc-product-strip-head {
  flex-direction: column;
  align-items: stretch;
}
.adc-products-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--dash-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.adc-products-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.adc-product-strip-head.is-dense .adc-products-inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 4px;
  align-items: stretch;
}
.adc-product-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface-2);
  max-width: 100%;
}
.adc-product-strip-head.is-dense .adc-product-compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  border-radius: 6px;
}
.adc-product-compact.is-active {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}
.adc-product-thumb-sm {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}
.adc-product-info-compact { min-width: 0; max-width: 200px; }
.adc-product-strip-head.is-dense .adc-product-info-compact {
  max-width: none;
  width: 100%;
}
.adc-product-info-compact .adc-product-title {
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.adc-product-strip-head.is-dense .adc-product-info-compact .adc-product-title {
  font-size: 0.54rem;
  font-weight: 600;
  line-height: 1.15;
  max-width: none;
  white-space: nowrap;
}
.adc-product-info-compact .adc-product-meta {
  font-size: 0.54rem;
  margin-top: 0;
}
.adc-product-strip-head.is-dense .adc-product-info-compact .adc-product-meta {
  font-size: 0.48rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adc-product-bid-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 52px;
  padding: 2px 4px;
  border: 1px solid #f97316;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.06);
}
.adc-product-bid-input-sm {
  width: 44px;
  font-size: 0.72rem;
  font-weight: 700;
}
.adc-product-bid-compact .adc-product-bid-lbl {
  font-size: 0.48rem;
  line-height: 1;
}
.adc-clusters-panel-main { margin-top: 0; }
.adc-icon-btn {
  min-width: 32px;
  padding: 4px 8px;
  font-size: 0.9rem;
  line-height: 1;
}
.adc-icon-btn.is-busy { opacity: 0.5; animation: adc-spin 1s linear infinite; }
@keyframes adc-spin { to { transform: rotate(360deg); } }

.adc-campaign-meta {
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-surface);
  padding: 12px 16px;
}
.adc-meta-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.adc-meta-item { font-size: 0.78rem; }
.adc-meta-k { color: var(--dash-muted); margin-right: 4px; }
.adc-meta-active { color: #16a34a; }
.adc-meta-pause { color: #d97706; }

.adc-product-bid-main {
  flex-direction: column; align-items: center; gap: 2px; min-width: 96px;
  border-color: #f97316; background: rgba(249, 115, 22, 0.06);
}
.adc-product-bid-input {
  width: 72px; border: none; background: transparent;
  font-size: 1rem; font-weight: 800; color: var(--dash-text);
  text-align: center; padding: 0;
}
.adc-product-bid-input:focus { outline: none; box-shadow: 0 1px 0 var(--dash-accent); }
.adc-product-bid-val { font-size: 1rem; font-weight: 800; color: var(--dash-text); }
.adc-product-bid-lbl { font-size: 0.58rem; color: var(--dash-muted); text-transform: uppercase; }

.adc-cluster-manage-wrap { position: relative; }
.adc-cluster-manage-pop {
  display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--dash-surface); border: 1px solid var(--dash-border);
  border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); min-width: 160px; overflow: hidden;
}
.adc-cluster-manage-pop.is-open { display: block; }
.adc-cluster-manage-pop button {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 10px 14px; font-size: 0.78rem; cursor: pointer;
}
.adc-cluster-manage-pop button:hover { background: var(--dash-surface-2); }

.adc-base-bid-chip-main { border-color: #f97316; background: rgba(249, 115, 22, 0.08); }

.adc-zones {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.adc-zone {
  border: 1px solid var(--dash-border); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--dash-surface); cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s;
}
.adc-zone:hover { border-color: #7c3aed; }
.adc-zone.is-on { border-color: #7c3aed; background: rgba(124, 58, 237, 0.06); }
.adc-zone-label { font-weight: 600; font-size: 0.82rem; color: var(--dash-text); }
.adc-zone-switch {
  width: 38px; height: 22px; border-radius: 999px; background: var(--dash-border);
  position: relative; flex-shrink: 0;
}
.adc-zone-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .15s;
}
.adc-zone.is-on .adc-zone-switch { background: #7c3aed; }
.adc-zone.is-on .adc-zone-switch::after { transform: translateX(16px); }

.adc-product-panel {
  border: 1px solid var(--dash-border); border-radius: 12px; background: var(--dash-surface);
  overflow: hidden;
}
.adc-product-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--dash-border);
  font-size: 0.75rem; font-weight: 600;
}
.adc-product-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--dash-border);
}
.adc-product-card:last-child { border-bottom: none; }
.adc-product-thumb {
  width: 48px; height: 48px; border-radius: 8px; background: var(--dash-surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  flex-shrink: 0; overflow: hidden;
}
.adc-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adc-product-info { flex: 1; min-width: 0; }
.adc-product-title {
  font-size: 0.78rem; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adc-product-meta { font-size: 0.68rem; color: var(--dash-muted); margin-top: 2px; }
.adc-product-bid {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--dash-border); border-radius: 10px; padding: 6px 10px;
  font-weight: 700; font-size: 0.85rem; min-width: 88px; justify-content: center;
}

.adc-clusters-panel {
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-surface);
  overflow: visible;
  min-width: 0;
}

.adc-main-panels {
  display: block;
}

.abh-wrap .dash-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.abh-count { font-size: 0.72rem; color: var(--dash-muted); }
.abh-table-scroll { max-height: min(75vh, 800px); overflow: auto; }
.abh-table { font-size: 0.72rem; }
.abh-table th {
  position: sticky;
  top: 0;
  background: var(--dash-surface-2);
  z-index: 2;
  white-space: nowrap;
}
.abh-empty { text-align: center; color: var(--dash-muted); padding: 20px !important; }
.abh-advert-link { color: var(--dash-primary); text-decoration: none; font-weight: 600; }
.abh-advert-link:hover { text-decoration: underline; }

.adc-bid-history-panel {
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-surface);
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 720px);
  position: sticky;
  top: 8px;
}
.adc-bid-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 4px;
  border-bottom: 1px solid var(--dash-border);
}
.adc-bid-history-title {
  font-weight: 700;
  font-size: 0.85rem;
}
.adc-bid-history-refresh {
  padding: 4px 8px !important;
  font-size: 0.85rem !important;
  line-height: 1;
}
.adc-bid-history-sub {
  margin: 0;
  padding: 4px 12px 8px;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.adc-bid-history-wrap {
  overflow: auto;
  flex: 1;
  min-height: 120px;
}
.adc-bid-history-table {
  font-size: 0.68rem;
}
.adc-bid-history-table th {
  position: sticky;
  top: 0;
  background: var(--dash-surface-2);
  z-index: 2;
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 0.62rem;
}
.adc-bid-history-table td {
  padding: 6px 8px;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.adc-bh-dt { white-space: nowrap; color: var(--dash-muted); font-size: 0.62rem; }
.adc-bh-nm { white-space: nowrap; font-variant-numeric: tabular-nums; }
.adc-bh-cluster {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adc-bh-raise { color: #15803d; font-weight: 600; }
.adc-bh-lower { color: #dc2626; font-weight: 600; }
.adc-bh-src {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
}
.adc-bh-src-dashboard { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.adc-bh-src-bidder { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.adc-bh-src-api { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.adc-bh-src-wb_cabinet { background: rgba(249, 115, 22, 0.12); color: #ea580c; }

/* —— История ставок (РК + общий лист) —— */
.rk-bh-page { padding: 2px 0 0; }
.rk-bh-page-embedded { padding-top: 0; }
.rk-bh-toolbar { align-items: flex-start !important; }
.rk-bh-toolbar-compact {
  align-items: center !important;
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
  gap: 8px 12px !important;
}
.rk-bh-toolbar-compact .rk-bh-src-chips {
  flex: 1 1 auto;
  min-width: 0;
}
.rk-bh-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rk-bh-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dash-text);
}
.rk-bh-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}
.rk-bh-count {
  font-size: 0.68rem;
  color: var(--dash-muted);
  white-space: nowrap;
}
.rk-bh-table-scroll {
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
}
.rk-bh-table { font-size: 0.72rem; }
.rk-bh-table th {
  padding: 4px 8px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-muted);
  font-weight: 600;
}
.rk-bh-table td {
  padding: 3px 8px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  line-height: 1.2;
}
.rk-bh-row:hover td { background: rgba(59, 130, 246, 0.04); }
.rk-bh-dt {
  white-space: nowrap;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
}
.rk-bh-dt-date { font-weight: 500; color: var(--dash-text); }
.rk-bh-dt-time { color: var(--dash-muted); font-size: 0.68rem; }
.rk-bh-cluster-cell { max-width: min(36vw, 320px); }
.rk-bh-cluster {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  color: var(--dash-text);
  font-size: 0.72rem;
}
.rk-bh-cluster-muted { color: var(--dash-muted); font-weight: 400; }
.rk-bh-nm,
.rk-bh-advert {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  color: var(--dash-muted);
}
.rk-bh-bid-cell { min-width: 108px; }
.rk-bh-bid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
}
.rk-bh-bid strong { font-weight: 700; }
.rk-bh-bid-raise strong { color: #15803d; }
.rk-bh-bid-lower strong { color: #dc2626; }
.rk-bh-delta {
  display: inline-block;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.35;
}
.rk-bh-delta.rk-bh-bid-raise { background: rgba(21, 128, 61, 0.12); color: #15803d; }
.rk-bh-delta.rk-bh-bid-lower { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.rk-bh-src-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.rk-bh-src-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rk-bh-src-chip {
  padding: 2px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  background: var(--dash-surface);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--dash-muted);
  transition: opacity 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}
.rk-bh-src-chip:hover { color: var(--dash-text); }
.rk-bh-src-chip.is-on {
  color: var(--dash-text);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}
.rk-bh-table .adc-bh-src {
  padding: 0 5px;
  font-size: 0.58rem;
}
.rk-bh-empty-cell { padding: 20px 16px !important; }
.rk-bh-empty {
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.rk-bh-empty p { margin: 0; }
.rk-bh-empty-hint {
  margin-top: 6px !important;
  font-size: 0.74rem;
  opacity: 0.85;
}
.rk-bh-empty strong { color: var(--dash-text); font-weight: 700; }
.abh-wrap.rk-bh-global .dash-panel-head h2 { font-size: 0.95rem; }
.adc-bid-history-empty { text-align: center; color: var(--dash-muted); padding: 16px !important; }

@media (max-width: 1100px) {
  .adc-main-panels {
    grid-template-columns: 1fr;
  }
  .adc-bid-history-panel {
    position: static;
    max-height: 360px;
  }
}

.adc-clusters-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--dash-border);
  overflow: visible;
  position: relative;
  z-index: 30;
}
.adc-clusters-head-tools {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  overflow: visible;
}
.adc-drange-slot { min-width: 210px; position: relative; overflow: visible; }
.adc-base-bids {
  padding: 10px 14px;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
  display: flex; flex-direction: column; gap: 8px;
}
.adc-base-bid-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.adc-base-bid-title { font-size: 0.72rem; font-weight: 700; color: var(--dash-text); }
.adc-base-bid-values { display: flex; flex-wrap: wrap; gap: 8px; }
.adc-base-bid-chip {
  font-size: 0.78rem; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--dash-border); background: var(--dash-surface);
}
.adc-base-bid-chip strong { font-weight: 800; }
.adc-base-bid-hint { font-size: 0.65rem; color: var(--dash-muted); flex: 1 1 100%; }
.adc-cluster-sel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; cursor: pointer;
}
.adc-cluster-sel input {
  width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: #7c3aed;
}
.adc-cluster-sel-na {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 1px dashed var(--dash-border);
}
.adc-clusters-table .adc-clusters-table-col-sel { width: 36px; text-align: center; }
.adc-clusters-title { font-weight: 700; font-size: 0.85rem; }
.adc-clusters-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--dash-border);
}
.adc-clusters-search {
  flex: 0 1 220px; min-width: 140px; max-width: 220px;
}
.adc-cluster-toolbar-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.adc-cluster-filters {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 8px;
}
.adc-cluster-filters button {
  border: 1px solid var(--dash-border); background: var(--dash-surface);
  border-radius: 999px; padding: 4px 11px; font-size: 0.68rem; cursor: pointer;
}
.adc-cluster-filters button.active {
  background: rgba(124, 58, 237, 0.12); border-color: #7c3aed; color: #7c3aed; font-weight: 600;
}
.adc-clusters-table-wrap { overflow: auto; max-height: min(70vh, 640px); }

/* ── Таблица кластеров (стиль как Продажи — мес. сводка) ── */
.adc-clusters-table {
  --adc-head-h: 24px;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  line-height: 1.2;
}
.adc-clusters-table th,
.adc-clusters-table td {
  border: 1px solid #eceef2;
  box-sizing: border-box;
}
.adc-clusters-table thead th {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #ede9fe;
  background-clip: padding-box;
  font-weight: 600;
  padding: 3px 4px;
  font-size: 10px;
  border-bottom: 1px solid #ddd6fe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adc-clusters-table thead .adc-th-group-manage,
.adc-clusters-table thead .adc-td-group-manage.adc-th-col { background: #ddd6fe !important; color: #5b21b6; }
.adc-clusters-table thead .adc-th-group-traffic,
.adc-clusters-table thead .adc-td-group-traffic.adc-th-col { background: #dbeafe !important; color: #1d4ed8; }
.adc-clusters-table thead .adc-th-group-result,
.adc-clusters-table thead .adc-td-group-result.adc-th-col { background: #dcfce7 !important; color: #15803d; }
.adc-clusters-table thead .adc-th-group-bidder,
.adc-clusters-table thead .adc-td-group-bidder.adc-th-col { background: #f5f3ff !important; color: #6d28d9; }
.adc-clusters-table .bidder-block-start {
  border-left: 3px solid #8b5cf6 !important;
  box-shadow: inset 2px 0 0 #e2e8f0;
}
.adc-clusters-table tbody td {
  min-height: 22px;
  padding: 2px 4px;
  vertical-align: middle;
  overflow: hidden;
  font-size: 11px;
  text-align: center;
  background: #fff;
}
.adc-clusters-table tbody td.adc-td-has-delta {
  height: auto;
  max-height: none;
  padding-top: 4px;
  padding-bottom: 4px;
  vertical-align: middle;
}
.adc-clusters-table tbody tr:nth-child(even):not(.ads-cluster-total) td {
  background: #f9fafb;
}
.adc-clusters-table tbody td.adc-td-group-manage { background: inherit; }
.adc-clusters-table tbody td.adc-td-group-traffic { background: #f8fbff; }
.adc-clusters-table tbody td.adc-td-group-result { background: #f7fef9; }
.adc-clusters-table tbody td.adc-td-group-bidder { background: #fdfcff; }
.adc-clusters-table tbody tr:nth-child(even) td.adc-td-group-traffic { background: #f3f8ff; }
.adc-clusters-table tbody tr:nth-child(even) td.adc-td-group-result { background: #f0fdf4; }
.adc-clusters-table tbody tr:nth-child(even) td.adc-td-group-bidder { background: #faf5ff; }
.adc-clusters-table tbody td.adc-td-col-query,
.adc-clusters-table tbody td.adc-td-col-sel {
  text-align: left;
}
.adc-clusters-table .ads-metric-chip {
  padding: 0 3px;
  font-size: 10px;
  border-radius: 3px;
}
.adc-clusters-table .adc-bidder-participation {
  display: inline-flex;
  justify-content: center;
  cursor: pointer;
}
.adc-clusters-table .adc-bidder-participation .bidder-enabled {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.adc-clusters-table .adc-bidder-participation .participation-chip {
  min-width: 28px;
  padding: 1px 6px;
  font-size: 10px;
}
.adc-clusters-table .adc-sales-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.adc-clusters-table .adc-sales-cell {
  display: inline-block;
  vertical-align: middle;
}
.adc-clusters-table .price-limit-cell {
  padding: 0 !important;
  text-align: center;
}
.adc-clusters-table .price-limit-display {
  min-width: 24px;
  padding: 1px 4px;
  font-size: 10px;
}
.adc-clusters-table .price-limit-input {
  max-width: 52px;
  height: 18px;
  font-size: 10px;
}
.adc-clusters-table .adc-bid-inline .price-limit-display {
  font-weight: 600;
  color: #1e293b;
}
.adc-clusters-table .adc-bidder-dash {
  font-size: 10px;
  color: #94a3b8;
}
.adc-clusters-table thead {
  position: sticky;
  top: 0;
  z-index: 25;
}
.adc-td-col-sel { width: var(--adc-w-sel, 22px); min-width: var(--adc-w-sel, 22px); max-width: var(--adc-w-sel, 22px); }
.adc-td-col-actions { width: var(--adc-w-actions, 26px); min-width: 24px; max-width: 28px; padding-left: 2px !important; padding-right: 2px !important; }
.adc-td-col-query { width: var(--adc-w-query, 200px); min-width: var(--adc-w-query, 160px); max-width: var(--adc-w-query, 280px); }
.adc-td-col-bid { width: var(--adc-w-bid, 88px); min-width: var(--adc-w-bid, 72px); max-width: var(--adc-w-bid, 100px); }
.adc-td-col-pos { width: var(--adc-w-pos, 40px); min-width: var(--adc-w-pos, 36px); max-width: var(--adc-w-pos, 48px); }
.adc-td-col-best_ctr { width: var(--adc-w-best_ctr, 44px); min-width: var(--adc-w-best_ctr, 40px); max-width: var(--adc-w-best_ctr, 52px); }
.adc-td-col-views,
.adc-td-col-clicks,
.adc-td-col-atbs { width: var(--adc-w-views, 44px); min-width: var(--adc-w-views, 40px); max-width: var(--adc-w-views, 52px); }
.adc-td-col-clicks { width: var(--adc-w-clicks, 44px); min-width: var(--adc-w-clicks, 40px); max-width: var(--adc-w-clicks, 52px); }
.adc-td-col-atbs { width: var(--adc-w-atbs, 44px); min-width: var(--adc-w-atbs, 40px); max-width: var(--adc-w-atbs, 52px); }
.adc-td-col-ctr { width: var(--adc-w-ctr, 48px); min-width: var(--adc-w-ctr, 44px); max-width: var(--adc-w-ctr, 56px); }
.adc-td-col-orders { width: var(--adc-w-orders, 40px); min-width: var(--adc-w-orders, 36px); max-width: var(--adc-w-orders, 48px); }
.adc-td-col-orders_sum_rk { width: var(--adc-w-orders_sum_rk, 56px); min-width: var(--adc-w-orders_sum_rk, 48px); max-width: var(--adc-w-orders_sum_rk, 64px); }
.adc-td-col-orders_sum_total { width: var(--adc-w-orders_sum_total, 56px); min-width: var(--adc-w-orders_sum_total, 48px); max-width: var(--adc-w-orders_sum_total, 64px); }
.adc-td-col-spend { width: var(--adc-w-spend, 48px); min-width: var(--adc-w-spend, 44px); max-width: var(--adc-w-spend, 56px); }
.adc-td-col-cpo,
.adc-td-col-cpc { width: var(--adc-w-cpo, 44px); min-width: var(--adc-w-cpo, 40px); max-width: var(--adc-w-cpo, 52px); }
.adc-td-col-cpc { width: var(--adc-w-cpc, 44px); min-width: var(--adc-w-cpc, 40px); max-width: var(--adc-w-cpc, 52px); }
.adc-td-col-cr,
.adc-td-col-drr { width: var(--adc-w-cr, 40px); min-width: var(--adc-w-cr, 36px); max-width: var(--adc-w-cr, 48px); }
.adc-td-col-drr { width: var(--adc-w-drr, 40px); min-width: var(--adc-w-drr, 36px); max-width: var(--adc-w-drr, 48px); }
.adc-td-col-bidder_on { width: var(--adc-w-bidder_on, 40px); min-width: var(--adc-w-bidder_on, 36px); max-width: var(--adc-w-bidder_on, 48px); }
.adc-td-col-bidder_pos { width: var(--adc-w-bidder_pos, 72px); min-width: var(--adc-w-bidder_pos, 64px); max-width: var(--adc-w-bidder_pos, 84px); }
.adc-td-col-bidder_limits { width: var(--adc-w-bidder_limits, 96px); min-width: var(--adc-w-bidder_limits, 88px); max-width: var(--adc-w-bidder_limits, 108px); }
.adc-td-col-meta { width: var(--adc-w-meta, 56px); min-width: var(--adc-w-meta, 48px); max-width: var(--adc-w-meta, 64px); }
.adc-clusters-table thead .adc-th-col.adc-td-col-actions .adc-th-label { display: none; }
.adc-th-col {
  position: relative;
  overflow: visible;
}
.adc-th-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
  white-space: normal;
  line-height: 1.2;
  font-size: 0.68rem;
  font-weight: 600;
}
.adc-clusters-table thead .adc-th-col {
  vertical-align: bottom;
  padding-top: 6px;
  padding-bottom: 6px;
}
.adc-col-resize {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}
.adc-col-resize:hover,
body.adc-col-resizing .adc-col-resize {
  background: rgba(124, 58, 237, 0.28);
}
body.adc-col-resizing {
  cursor: col-resize;
  user-select: none;
}
.adc-th-group-manage,
.adc-th-group-manage.adc-th-col,
.adc-td-group-manage { /* colors set on .adc-clusters-table thead/tbody */ }
.adc-th-group-traffic,
.adc-th-group-traffic.adc-th-col,
.adc-td-group-traffic { /* colors set on .adc-clusters-table thead/tbody */ }
.adc-th-group-result,
.adc-th-group-result.adc-th-col,
.adc-td-group-result { /* colors set on .adc-clusters-table thead/tbody */ }
.adc-th-group-bidder,
.adc-th-group-bidder.adc-th-col,
.adc-td-group-bidder { /* colors set on .adc-clusters-table thead/tbody */ }

.adc-clusters-table tbody tr:not(.ads-cluster-total) {
  min-height: 22px;
  height: auto;
}
.adc-clusters-table tbody td.adc-td-col-bid {
  overflow: visible;
  position: relative;
  z-index: 2;
  background-clip: padding-box;
}
.adc-clusters-table tbody tr:not(.ads-cluster-total):hover td {
  position: relative;
  z-index: 22;
}
.adc-clusters-table tbody tr:not(.ads-cluster-total):hover td.adc-td-col-bid {
  z-index: 23;
}
.ads-cluster-total td {
  font-weight: 700;
  background: #f3f4f6 !important;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: var(--adc-head-h);
  z-index: 20;
}
.ads-bid-cell-main {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  max-width: 100%;
  position: relative;
  background: inherit;
}
.adc-clusters-table .query-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}
.adc-clusters-table .query-cell {
  font-size: 0.66rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  flex: 1;
  min-width: 0;
}
.adc-clusters-table tbody td.adc-td-col-query {
  overflow: visible;
  text-overflow: clip;
}
.adc-bidder-mark { display: none; }
.adc-bidder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 55%, #818cf8 100%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.35);
}
.adc-bidder-badge svg { width: 10px; height: 10px; display: block; }
.adc-schedule-badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  line-height: 1;
  opacity: 0.85;
}
.adc-clusters-table tbody tr.adc-row-bidder-on td.adc-td-col-query {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, #fff 48px);
}

.adc-clusters-table .ads-bid-input { width: 48px; padding: 2px 3px; font-size: 0.64rem; }
.ads-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.72rem;
  line-height: 1;
  cursor: default;
}
.ads-status-icon.active { color: var(--dash-success); }
.ads-status-icon.excluded { color: var(--dash-danger); font-size: 0.82rem; }
.ads-status-icon.inactive { color: var(--dash-muted); font-size: 0.62rem; }
.adc-row-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
.adc-row-actions .dash-btn { padding: 3px 7px; font-size: 0.65rem; }
.adc-cluster-row-excluded td { opacity: 0.55; }
.adc-cluster-row-excluded .query-cell { text-decoration: line-through; }
.adc-cluster-row-inactive .query-cell { color: var(--dash-muted); }
.adc-nd { color: var(--dash-muted); font-size: 0.72rem; }

.adc-row-bidder-on td:first-child {
  box-shadow: inset 3px 0 0 #7c3aed;
}
.adc-row-bidder-on {
  background: rgba(124, 58, 237, 0.03);
}

/* ── Бидер: toggle-pill ── */
.adc-bidder-pill {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}
.adc-bidder-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.adc-bidder-pill-ui {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  color: var(--dash-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.adc-bidder-pill-ui.is-on {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.45);
  color: #7c3aed;
}
.adc-bidder-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.adc-bidder-pill-ui.is-on .adc-bidder-dot {
  background: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
}
.adc-bidder-pos, .adc-bidder-limits {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.adc-bidder-pos input, .adc-bidder-limits input {
  width: 48px;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: #fff;
  font-size: 0.68rem;
}
.adc-bidder-limits input { width: 52px; }
.adc-bidder-dash { color: var(--dash-muted); font-size: 0.68rem; }
.adc-bidder-save { padding: 3px 8px !important; font-size: 0.72rem !important; }

.ads-bid-input {
  width: 68px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  font-size: 0.72rem;
}
.ads-bid-cell {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}
.ads-bid-tag {
  font-size: 0.48rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.ads-bid-tag-custom { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.ads-bid-tag-base { background: rgba(100, 116, 139, 0.15); color: var(--dash-muted); }
.ads-bid-chart {
  font-size: 0.64rem;
  opacity: 0.55;
  cursor: help;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.ads-bid-chart:hover,
.ads-bid-chart:focus {
  opacity: 1;
  outline: none;
}
.ads-bid-chart--na {
  cursor: default;
  pointer-events: none;
  opacity: 0.2;
}
.ads-bid-tip,
.ads-bid-tip-source {
  display: none !important;
}
.ads-bid-tip-row { display: flex; justify-content: space-between; gap: 10px; }
.ads-bid-tip-row + .ads-bid-tip-row { margin-top: 4px; }
.ads-bid-tip-floater {
  position: fixed;
  z-index: 9999;
  min-width: 148px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #3d4451;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  pointer-events: none;
}
.ads-bid-tip-floater .ads-bid-tip-row span {
  color: rgba(255, 255, 255, 0.75);
}
.ads-bid-tip-floater .ads-bid-tip-row strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ads-orders-val {
  font-weight: 700;
  color: #15803d;
}

.ads-cluster-total td.adc-td-group-traffic { background: #e0f2fe !important; }
.ads-cluster-total td.adc-td-group-result { background: #dcfce7 !important; }
.ads-cluster-total td.adc-td-group-bidder { background: #f3e8ff !important; }

.adc-associated-panel { margin-top: 12px; }
.adc-heatmap-panel { margin-top: 12px; }
.adc-heatmap-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 0 6px;
  justify-content: flex-start;
  border-bottom: none;
}
.adc-heatmap-head .adc-section-toggle { flex-shrink: 0; }
.adc-heatmap-head-main {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
  flex: 1;
}
.adc-heatmap-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px 10px;
  margin-left: auto;
}
.adc-heatmap-head-tools .adc-heat-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}
.adc-heatmap-head .adc-clusters-title {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
}
.adc-heatmap-sub { font-size: 0.68rem; font-weight: 400; line-height: 1.2; }
.adc-heatmap-panel.is-collapsed .adc-heatmap-body { display: none; }
.adc-heatmap-panel.is-collapsed .adc-heatmap-head {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 4px;
}
.adc-heatmap-body { padding: 0 0 8px; }
.adc-heat-panel-inner { padding: 0; }
.adc-heat-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.adc-heat-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.adc-heat-restriction-status {
  margin: 6px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}
.adc-heat-restriction-status.is-on { color: #4338ca; }
.adc-heat-restriction-status.is-off { color: #64748b; font-weight: 500; }
.adc-heat-restriction-status.is-warn { color: #b45309; }
.adc-sched-bypass-hint {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}
.adc-sched-advanced-wrap.hidden { display: none; }
.adc-sched-nm-map-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  background: #f1f5f9;
  color: #64748b;
}
.adc-sched-nm-map-hint.is-on {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
}
.adc-heat-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.adc-heat-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.adc-heat-card-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.35;
}
.adc-heat-card-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.adc-heat-metric-select-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.62rem;
  color: #94a3b8;
}
.adc-heat-metric-select {
  min-width: 148px;
  padding: 7px 28px 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e293b;
  appearance: none;
  cursor: pointer;
}
.adc-heat-total-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e293b;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}
.adc-heat-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
  align-items: stretch;
}
.adc-heat-split-main { min-width: 0; }
.adc-heat-split-side { min-width: 0; }
.adc-heat-grid-legend-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 8px;
  font-size: 0.62rem;
  color: #94a3b8;
}
.adc-heat-hint-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adc-heat-hint-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.adc-heat-hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #6366f1;
  display: inline-block;
}
.adc-heat-grid-area {
  position: relative;
  padding: 12px 10px 10px;
  background: #fafbfc;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  margin-bottom: 0;
  overflow-x: auto;
}
.adc-heat-tooltip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -100%);
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  min-width: 160px;
  white-space: nowrap;
}
.adc-heat-tip-head {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-bottom: 4px;
}
.adc-heat-tip-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
}
.adc-heat-tip-diff {
  font-size: 0.62rem;
  margin-top: 4px;
  font-weight: 600;
}
.adc-heat-tip-diff.is-up { color: #16a34a; }
.adc-heat-tip-diff.is-down { color: #dc2626; }
.adc-heat-tip-sched {
  font-size: 0.6rem;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  color: #94a3b8;
}
.adc-heat-tip-sched.is-on { color: #6366f1; font-weight: 600; }
.adc-heat-grid {
  display: grid;
  grid-template-columns: 36px repeat(24, minmax(12px, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 420px;
}
.adc-heat-corner { grid-column: 1; }
.adc-heat-hour-label,
.adc-heat-day-label {
  border: none;
  background: transparent;
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 0;
  text-align: center;
  line-height: 1;
}
.adc-heat-day-label {
  text-align: left;
  color: #64748b;
  font-size: 0.65rem;
}
.adc-heat-hour-label.is-on,
.adc-heat-day-label.is-on { color: #6366f1; }
.adc-heat-hour-label.is-part,
.adc-heat-day-label.is-part { color: #818cf8; }
.adc-heat-hour-label:hover,
.adc-heat-day-label:hover { color: #1e293b; }
.adc-heat-cell {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 16px;
  max-height: 26px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.adc-heat-cell:hover {
  transform: scale(1.12);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.adc-heat-cell.adc-heat-l0 { background: #f1f5f9; }
.adc-heat-cell.adc-heat-l1 { background: #e0e7ff; }
.adc-heat-cell.adc-heat-l2 { background: #c7d2fe; }
.adc-heat-cell.adc-heat-l3 { background: #818cf8; }
.adc-heat-cell.adc-heat-l4 { background: #6366f1; }
.adc-heat-cell.adc-heat-l5 { background: #4f46e5; }
.adc-heat-cell.adc-heat-l6 { background: #3730a3; }
.adc-heat-cell.is-scheduled::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
  pointer-events: none;
}
.adc-heat-cell.adc-heat-l0.is-scheduled::after,
.adc-heat-cell.adc-heat-l1.is-scheduled::after,
.adc-heat-cell.adc-heat-l2.is-scheduled::after {
  color: #4338ca;
  text-shadow: none;
}
.adc-heat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
}
.adc-heat-legend-hint {
  font-size: 0.6rem;
  white-space: nowrap;
}
.adc-heat-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e293b;
  padding: 7px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.adc-heat-metric-note {
  margin: 8px 0 0;
  font-size: 0.62rem;
  line-height: 1.45;
  padding: 8px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
}
.adc-heat-metric-note.is-estimate {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.adc-heat-unavailable {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 20px 16px;
  text-align: center;
}
.adc-heat-unavailable p {
  margin: 0;
  max-width: 420px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
}
.adc-heat-grid-area.is-unavailable {
  background: #f8fafc;
}
.adc-heat-legend-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  color: #94a3b8;
  flex: 1;
  min-width: 200px;
}
.adc-heat-legend-gradient {
  flex: 1;
  max-width: 160px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e0e7ff 18%, #c7d2fe 35%, #818cf8 55%, #6366f1 72%, #4f46e5 88%, #3730a3 100%);
}
.adc-heat-avg-inline {
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}
.adc-heat-avg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.adc-heat-avg-toggle input { accent-color: #6366f1; margin: 0; }
.adc-heat-intervals-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 12px 10px;
  min-height: 0;
  border: 1px solid #e8ecf1;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.adc-heat-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.adc-heat-side-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
}
.adc-heat-side-hint {
  font-size: 0.6rem;
  margin: 2px 0 0;
  line-height: 1.35;
}
.adc-heat-interval-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.adc-heat-presets-side {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf1;
}
.adc-heat-presets-side .adc-heat-preset-btn {
  padding: 5px 10px;
  font-size: 0.62rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  box-shadow: none;
  transform: none;
  filter: none;
}
.adc-heat-presets-side .adc-heat-preset-btn:hover {
  border-color: #6366f1;
  color: #4338ca;
  background: #f5f3ff;
  transform: none;
  box-shadow: none;
}
.adc-heat-presets-side .adc-heat-preset-btn:active {
  background: #eef2ff;
}
.adc-heat-intervals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 280px;
  flex: 1;
}
.adc-heat-interval-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #1e293b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
}
.adc-heat-interval-text { flex: 1; min-width: 0; }
.adc-heat-interval-del {
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adc-heat-interval-del:hover { background: #fee2e2; color: #dc2626; }
.adc-heat-interval-muted {
  font-size: 0.65rem;
  color: var(--dash-muted);
  line-height: 1.4;
}
.adc-heat-err { color: var(--dash-danger); font-size: 0.68rem; }
.adc-heat-presets:not(.adc-heat-presets-side) {
  display: none;
}
.adc-heat-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.adc-heat-preset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  filter: saturate(1.08);
}
.adc-heat-preset-btn:active { transform: translateY(0); }
.adc-heat-preset-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  flex-shrink: 0;
}
.adc-heat-preset-daily {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-color: #a78bfa;
  color: #5b21b6;
}
.adc-heat-preset-weekdays {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
  color: #1d4ed8;
}
.adc-heat-preset-work {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  border-color: #fb923c;
  color: #c2410c;
}
.adc-heat-preset-weekends {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #4ade80;
  color: #15803d;
}
.adc-heat-preset-btn.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 4px 14px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}
.adc-heat-nm-row {
  margin-top: 10px;
  font-size: 0.68rem;
}
.adc-heatmap-nm-select {
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  max-width: 220px;
}
.adc-heat-pill {
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.62rem;
  cursor: pointer;
}
.adc-heat-pill.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--dash-primary);
  color: var(--dash-primary);
  font-weight: 600;
}
.adc-associated-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 0 6px;
}
.adc-associated-head .adc-section-toggle { flex-shrink: 0; }
.adc-associated-head .adc-clusters-title {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
}
.adc-associated-sep {
  color: var(--dash-muted);
  opacity: 0.55;
  font-size: 0.85rem;
  line-height: 1;
  user-select: none;
}
.adc-associated-panel.is-collapsed .adc-associated-body { display: none; }
.adc-associated-panel.is-collapsed .adc-associated-head {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 4px;
}
.adc-associated-body .adc-clusters-toolbar { padding-top: 0; }
.adc-associated-panel .adc-clusters-table-wrap {
  max-height: min(55vh, 520px);
}
.adc-associated-sub {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--dash-muted);
  line-height: 1.25;
  min-width: 0;
}
.adc-associated-panel.is-collapsed .adc-associated-sub {
  flex: 1;
  min-width: 120px;
}
.adc-associated-table .adc-associated-title {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.ads-bidder-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.ads-bidder-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ads-bidder-query { min-width: 280px; flex: 1; }
.ads-bidder-field { display: flex; flex-direction: column; gap: 2px; font-size: 0.65rem; color: var(--dash-muted); }
.ads-bidder-field .dash-search { min-width: 88px; }
.ads-bidder-hint { margin: 0; font-size: 0.72rem; color: var(--dash-muted); }

@media (max-width: 720px) {
  .ads-drange-pop { min-width: 92vw; right: -8px; }
  .ads-drange-body { flex-direction: column; }
  .ads-drange-presets { border-left: none; border-top: 1px solid var(--dash-border); flex-direction: row; flex-wrap: wrap; }
}

/* --- RK workspace (вкладки кампаний) --- */
.ads-rk-workspace {
  margin: 0;
}
.ads-rk-nav-row {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  background: #fafafa;
  border-bottom: 1px solid var(--dash-border);
  min-height: 32px;
  padding: 0 6px;
}
.ads-rk-scope-nav {
  border-top: 1px solid var(--dash-border);
  border-radius: 8px 8px 0 0;
}
.ads-rk-view-nav {
  background: #fff;
  border-top: none;
  padding: 4px 8px;
  gap: 4px;
  min-height: 34px;
  align-items: center;
}
.ads-rk-scope-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  padding: 0 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--dash-muted);
  flex-shrink: 0;
  height: 32px;
  font-family: inherit;
}
.ads-rk-scope-tab.is-active {
  color: var(--dash-primary);
  border-bottom-color: var(--dash-primary);
  font-weight: 600;
}
.ads-rk-scope-pinned { font-weight: 500; }
.ads-rk-scope-guide.is-active { color: #7c3aed; border-bottom-color: #7c3aed; }
.ads-rk-scope-rk { max-width: 180px; }
.ads-rk-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ads-rk-tab-close {
  opacity: 0.55;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}
.ads-rk-tab-close:hover { opacity: 1; color: var(--dash-danger); }
.ads-rk-view-tab {
  border: 1px solid var(--dash-border);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--dash-muted);
  font-family: inherit;
}
.ads-rk-view-tab.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
  color: #2563eb;
  font-weight: 600;
}
.ads-rk-host {
  padding: 0;
  min-height: 200px;
}
.ads-rk-host[hidden],
.ads-rk-view-nav[hidden] {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Справка «О бидере» */
.ads-bidder-guide {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.abg-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.02) 100%);
}
.abg-hero-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.abg-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #5b21b6;
}
.abg-lead {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--dash-text);
}
.abg-essentials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 10px 14px;
  list-style: none;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  font-size: 0.72rem;
  line-height: 1.4;
}
.abg-essentials li { margin: 0; }
.abg-simple-list {
  margin: 6px 0 8px;
  padding-left: 1.1rem;
  font-size: 0.72rem;
  line-height: 1.5;
}
.abg-simple-list li { margin-bottom: 4px; }
.abg-panel-compact .abg-section-title { font-size: 0.82rem; }
.abg-panel-compact .abg-muted { margin-top: 6px; font-size: 0.65rem; }
.abg-card h4 {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
}
.abg-card p { margin: 0; font-size: 0.72rem; line-height: 1.35; }
.abg-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  justify-content: center;
}
.abg-flow-step {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.abg-flow-num {
  display: inline-flex;
  align-self: center;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.abg-flow-step strong { font-size: 0.78rem; }
.abg-flow-desc { font-size: 0.65rem; color: var(--dash-muted); line-height: 1.35; }
.abg-flow-arrow {
  align-self: center;
  color: var(--dash-muted);
  font-size: 1.1rem;
  padding: 0 4px;
}
.abg-section { display: flex; flex-direction: column; gap: 10px; }
.abg-section-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.abg-section-intro {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--dash-muted);
}
.abg-corridor-track {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 8px;
}
@media (max-width: 640px) {
  .abg-corridor-track { grid-template-columns: 1fr; }
  .abg-flow-arrow { display: none; }
}
.abg-corridor-zone {
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  border: 1px solid var(--dash-border);
}
.abg-zone-good { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); }
.abg-zone-bad { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }
.abg-zone-high { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); }
.abg-zone-pos { font-size: 0.72rem; font-weight: 700; }
.abg-zone-action { font-size: 0.68rem; font-weight: 600; }
.abg-action-up { color: #dc2626; }
.abg-action-down { color: #2563eb; }
.abg-action-ok { color: #16a34a; }
.abg-zone-hint { display: none; }
.abg-corridor-note { display: none; }
.abg-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 720px) { .abg-cards-grid { grid-template-columns: 1fr; } }
.abg-card {
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.abg-card-warn { border-left: 4px solid #f59e0b; }
.abg-card-ok { border-left: 4px solid #22c55e; }
.abg-card-info { border-left: 4px solid #3b82f6; }
.abg-card-icon { display: none; }
.abg-card-example { display: none; }
.abg-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) { .abg-two-col { grid-template-columns: 1fr; } }
.abg-panel {
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  padding: 14px;
  background: var(--dash-surface);
}
.abg-settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  margin: 8px 0;
}
.abg-settings-table th,
.abg-settings-table td {
  border: 1px solid var(--dash-border);
  padding: 6px 8px;
  text-align: left;
}
.abg-settings-table th { background: var(--dash-surface-2); font-weight: 600; }
.abg-muted { margin: 0; font-size: 0.68rem; color: var(--dash-muted); line-height: 1.4; }
.abg-footnote { margin-top: 8px !important; }
.abg-alert-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.abg-alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 8px;
}
.abg-alert-red { background: rgba(239, 68, 68, 0.08); }
.abg-alert-yellow { background: rgba(245, 158, 11, 0.1); }
.abg-alert-green { background: rgba(34, 197, 94, 0.08); }
.abg-alert-gray { background: var(--dash-surface-2); }
.abg-faq { gap: 6px; }
.abg-faq-item {
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--dash-surface);
}
.abg-faq-item summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 10px 0;
  list-style: none;
}
.abg-faq-item summary::-webkit-details-marker { display: none; }
.abg-faq-item p {
  margin: 0 0 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--dash-muted);
}

.ads-rk-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--dash-border);
}
.ads-rk-detail-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ads-rk-detail-title.adc-campaign-head { gap: 6px; flex: 1; width: 100%; max-width: 100%; }
.ads-rk-detail-title strong { font-size: 0.95rem; line-height: 1.25; }
.ads-rk-detail-sub { font-size: 0.68rem; color: var(--dash-muted); }
.ads-rk-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.ads-rk-stats-toolbar,
.ads-rk-history-toolbar,
.ads-rk-changes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dash-border);
}
.rkch-toolbar-compact {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: none;
  gap: 8px 12px;
  overflow: visible;
  justify-content: flex-start;
}
.rkch-toolbar-compact .rkch-toolbar-left {
  flex: 0 1 auto;
}
.rkch-metrics-settings .ads-col-settings-pop {
  z-index: 1200;
  min-width: 240px;
}
.rkch-nm-wrap {
  margin-bottom: 10px;
}
.rkch-nm-expand {
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
  padding: 10px 14px;
  margin-bottom: 0;
  text-align: left;
  border: 1px dashed var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface-2);
  color: var(--dash-text);
  cursor: pointer;
}
.rkch-nm-expand:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.06);
}
.rkch-nm-expand[hidden] {
  display: none !important;
}
.rkch-nm-toolbar-btn,
.rkch-toolbar-left .rkch-nm-toggle {
  font-size: 0.68rem;
  padding: 4px 12px;
  flex-shrink: 0;
}
.rkch-nm-toolbar-btn[hidden],
.rkch-toolbar-left .rkch-nm-toggle[hidden] {
  display: none !important;
}
.rkch-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  flex: 1;
}
.rkch-toolbar-compact .rkch-status {
  font-size: 0.68rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.rkch-nm-inline {
  font-size: 0.68rem;
  color: var(--dash-text);
  max-width: min(360px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkch-more-wrap { position: relative; }
.rkch-more-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  padding: 8px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  box-shadow: var(--dash-shadow);
}
.rkch-more-pop[hidden] { display: none !important; }
.rkch-more-pop .dash-btn {
  justify-content: flex-start;
  width: 100%;
  font-size: 0.72rem;
}
.rkch-summary-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: var(--dash-shadow);
}
.rkch-summary-card > .rkch-compare-badge {
  display: block;
  margin: 6px 10px 0;
  width: fit-content;
}
.rkch-summary-card > .rkch-compare-badge[hidden] {
  display: none !important;
}
.rkch-summary-card .rkch-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  gap: 0;
}
@media (max-width: 900px) {
  .rkch-summary-card .rkch-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .rkch-summary-card .rkch-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rkch-kpi-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-right: 1px solid var(--dash-border);
  border-left: 3px solid transparent;
  min-width: 0;
}
.rkch-kpi-cell:last-child { border-right: none; }
.rkch-kpi-cell.accent-spend { border-left-color: #dc2626; }
.rkch-kpi-cell.accent-orders { border-left-color: #2563eb; }
.rkch-kpi-cell.accent-revenue { border-left-color: #7c3aed; }
.rkch-kpi-cell.accent-efficiency { border-left-color: #d97706; }
.rkch-kpi-cell.accent-roas { border-left-color: #059669; }
.rkch-kpi-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  line-height: 1.25;
}
.rkch-kpi-main .rkch-kpi-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rkch-kpi-meta { font-size: 0.62rem; color: var(--dash-muted); }
.rkch-kpi-main .rkch-kpi-delta { font-size: 0.6rem; }
.rkch-insights-block {
  margin-bottom: 8px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
}
.rkch-insights-block > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 0.68rem;
}
.rkch-insights-block > summary::-webkit-details-marker { display: none; }
.rkch-insights-block > summary::before {
  content: "▸";
  font-size: 0.62rem;
  color: var(--dash-muted);
  transition: transform 0.15s;
}
.rkch-insights-block[open] > summary::before {
  transform: rotate(90deg);
}
.rkch-insights-summary-title {
  font-weight: 600;
  font-size: inherit;
}
.rkch-insights-block .rkch-insights-period {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--dash-muted);
}
.rkch-insights-body {
  padding: 0 10px 8px;
  border-top: 1px solid var(--dash-border);
}
.rkch-insights-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 0 4px;
}
.rkch-insights-toolbar .rkch-insights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.rkch-insights-toolbar .rkch-insights-actions .dash-btn {
  font-size: 0.65rem;
  padding: 4px 8px;
}
.rkch-insights-block .rkch-insights-ai-status,
.rkch-insights-block .rkch-insights-empty {
  font-size: 0.62rem;
  margin: 0 0 6px;
}
.rkch-insights-block .rkch-insights-tips {
  margin-top: 4px;
}
.rkch-insights-block ul.rkch-insights-ai {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.rkch-insights-block .rkch-insight {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  font-size: 0.62rem;
  line-height: 1.35;
  padding: 4px 8px 4px 18px;
  white-space: nowrap;
  cursor: pointer;
}
.rkch-insights-block .rkch-insight::before {
  left: 7px;
  width: 6px;
  height: 6px;
}
.ads-col-settings-group {
  padding: 6px 10px 2px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  background: var(--dash-surface);
}
.rkst-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.rkst-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}
.rkst-title {
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--dash-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(520px, 100%);
}
.rkst-compare-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--dash-muted);
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  white-space: nowrap;
  cursor: help;
}
.rkst-compare-badge::before {
  content: "↔ ";
  opacity: 0.7;
}
.rkst-compare-badge-error {
  color: var(--dash-danger);
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.06);
}
.rkst-toolbar-compact {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: none;
  gap: 8px 12px;
}
.rkst-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  flex: 1;
}
.rkst-toolbar-compact .rkst-scope-note {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  min-width: 0;
}
.rkst-summary-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--dash-shadow);
}
.rkst-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .rkst-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .rkst-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rkst-kpi-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  min-width: 0;
  border-right: 1px solid var(--dash-border);
  border-bottom: 1px solid var(--dash-border);
  border-left: 3px solid transparent;
  background: var(--dash-surface);
}
.rkst-kpi-cell:nth-child(6n) { border-right: none; }
@media (max-width: 1100px) {
  .rkst-kpi-cell:nth-child(6n) { border-right: 1px solid var(--dash-border); }
  .rkst-kpi-cell:nth-child(3n) { border-right: none; }
}
@media (max-width: 560px) {
  .rkst-kpi-cell:nth-child(3n) { border-right: 1px solid var(--dash-border); }
  .rkst-kpi-cell:nth-child(2n) { border-right: none; }
}
.rkst-kpi-cell.accent-views { border-left-color: #2563eb; }
.rkst-kpi-cell.accent-clicks { border-left-color: #7c3aed; }
.rkst-kpi-cell.accent-spend { border-left-color: #dc2626; }
.rkst-kpi-cell.accent-orders { border-left-color: #059669; }
.rkst-kpi-cell.accent-pos { border-left-color: #d97706; }
.rkst-kpi-cell.accent-efficiency { border-left-color: #0891b2; }
.rkst-kpi-lbl {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  line-height: 1.2;
}
.rkst-kpi-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  line-height: 1.25;
}
.rkst-kpi-main strong {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--dash-text);
}
.rkst-kpi-meta {
  font-size: 0.62rem;
  color: var(--dash-muted);
  white-space: nowrap;
}
.rkst-kpi-eff-row {
  align-items: baseline;
}
.rkst-kpi-eff-bit {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.rkst-kpi-eff-bit .rkst-kpi-eff-key {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.rkst-kpi-eff-bit strong {
  font-size: 0.88rem;
}
.rkst-kpi-drr-hint {
  font-size: 0.58rem;
  color: var(--dash-muted);
  font-style: italic;
  line-height: 1.25;
  opacity: 0.9;
}
.rkst-kpi-drr-hint:empty { display: none; }
.rkst-insights-chips {
  border-top: 1px solid var(--dash-border);
  padding: 6px 10px 8px;
  background: var(--dash-surface-2);
}
.rkst-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 10px;
  margin-bottom: 10px;
  align-items: start;
}
@media (max-width: 960px) {
  .rkst-main-row { grid-template-columns: 1fr; }
}
.rkst-main-row .dash-panel { margin-bottom: 0; }
.rkst-main-row .rkst-clusters-layout {
  padding: 0 10px 10px;
}
.rkst-main-row .rkst-table-wrap-clusters {
  max-height: 240px;
}
.rkst-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 860px) {
  .rkst-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .rkst-kpi-grid { grid-template-columns: 1fr; }
}
.ads-rk-kpi-grid {
  margin-bottom: 14px;
}
.ads-rk-kpi-grid .ads-kpi-card {
  min-height: 88px;
  display: flex;
  flex-direction: column;
}
.ads-rk-kpi-grid .ads-kpi-card .sub:last-child {
  margin-top: auto;
  padding-top: 2px;
}
.rkst-eff-pair {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-top: 2px;
}
.rkst-eff-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rkst-eff-key {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.rkst-eff-item .val {
  font-size: 1.15rem;
}
.rkst-kpi-drr-hint {
  font-style: italic;
  opacity: 0.85;
}
.rkst-chart-panel .dash-panel-head h2 {
  font-size: 0.82rem;
}
.ads-rk-chart-wrap {
  position: relative;
  height: 220px;
}
.rkst-chart-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0.78rem;
  color: var(--dash-muted);
  pointer-events: none;
}
.rkst-chart-empty.is-visible {
  display: flex;
}
.rkst-chart-empty[hidden] {
  display: none !important;
}
.rkst-delta {
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1.3;
  margin-top: 2px;
  cursor: help;
}
.rkst-kpi-main .rkst-delta {
  margin-top: 0;
  font-size: 0.62rem;
}
.rkst-kpi-main .rkst-kpi-eff-delta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rkst-delta-good { color: #059669; font-weight: 600; }
.rkst-delta-bad { color: #dc2626; font-weight: 600; }
.rkst-delta-neutral,
.rkst-delta-new { color: var(--dash-muted); font-weight: 500; }
.rkst-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.rkst-chart-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rkst-chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  font-size: 0.7rem;
  color: var(--dash-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.rkst-chart-chip:hover {
  background: var(--dash-surface-2);
}
.rkst-chart-chip.is-on {
  color: var(--dash-text);
  font-weight: 600;
  background: var(--dash-surface-2);
  border-color: rgba(148, 163, 184, 0.55);
}
.rkst-chart-chip:not(.is-on) {
  opacity: 0.55;
}
.rkst-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rkst-bottom-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
@media (max-width: 960px) {
  .rkst-bottom-stack { grid-template-columns: 1fr; }
}
.rkst-daily-panel,
.rkst-clusters-panel {
  min-width: 0;
}
.rkst-daily-table,
.rkst-clusters-table {
  width: 100%;
  table-layout: fixed;
}
.rkst-daily-table th:nth-child(1),
.rkst-daily-table td:nth-child(1) { width: 10%; }
.rkst-clusters-table th:nth-child(2),
.rkst-clusters-table td:nth-child(2) { width: 38%; }
.rkst-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.rkst-table-wrap {
  max-height: 320px;
  overflow: auto;
}
.rkst-table-wrap-clusters {
  max-height: 240px;
}
.rkst-daily-panel .dash-panel-head h2,
.rkst-clusters-panel .dash-panel-head h2 {
  font-size: 0.82rem;
  margin: 0;
}
.rkst-panel-hint {
  font-size: 0.65rem;
  color: var(--dash-muted);
  font-weight: 400;
  flex-shrink: 0;
}
.rkst-table-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--dash-muted);
  margin: 0;
}
.rkst-daily-table tbody tr:nth-child(even):not(.rkst-totals-row) {
  background: rgba(148, 163, 184, 0.06);
}
.rkst-daily-table tbody tr:hover:not(.rkst-totals-row),
.rkst-clusters-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}
.rkst-row-wknd td:first-child {
  color: var(--dash-danger);
}
.rkst-totals-row {
  position: sticky;
  bottom: 0;
  background: var(--dash-surface-2) !important;
  border-top: 2px solid var(--dash-border);
}
.rkst-totals-row td {
  padding-top: 8px;
  padding-bottom: 8px;
}
.rkst-daily-table th,
.rkst-clusters-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--dash-surface);
}
.rkst-daily-table td,
.rkst-daily-table th,
.rkst-clusters-table td,
.rkst-clusters-table th {
  padding: 7px 10px;
  font-size: 0.72rem;
}
.rkst-cluster-q {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkst-rank {
  color: var(--dash-muted);
  font-weight: 600;
  width: 28px;
}
.rkst-spend-cell {
  min-width: 100px;
}
.rkst-spend-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 0;
}
.rkst-spend-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  max-width: 100%;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.14);
  pointer-events: none;
}
.rkst-spend-val {
  position: relative;
  z-index: 1;
  padding-left: 4px;
  font-variant-numeric: tabular-nums;
}
.rkst-insights-panel {
  margin-bottom: 12px;
}
.rkst-insights-panel .dash-panel-head h2 {
  font-size: 0.82rem;
  margin: 0;
}
.rkst-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rkst-insight-chip {
  font-size: 0.67rem;
  line-height: 1.35;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  max-width: 100%;
}
.rkst-insight-good { border-color: rgba(5, 150, 105, 0.35); background: rgba(5, 150, 105, 0.08); color: #047857; }
.rkst-insight-warn { border-color: rgba(217, 119, 6, 0.35); background: rgba(217, 119, 6, 0.08); color: #b45309; }
.rkst-insight-danger { border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.08); color: #b91c1c; }
.rkst-insight-info { border-color: rgba(37, 99, 235, 0.3); background: rgba(37, 99, 235, 0.06); color: #1d4ed8; }
.rkst-insight {
  position: relative;
  padding: 8px 10px 8px 28px;
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.4;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
}
.rkst-insight::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rkst-insight-good { border-color: rgba(5, 150, 105, 0.25); background: rgba(5, 150, 105, 0.06); }
.rkst-insight-good::before { background: #059669; }
.rkst-insight-warn { border-color: rgba(217, 119, 6, 0.25); background: rgba(217, 119, 6, 0.06); }
.rkst-insight-warn::before { background: #d97706; }
.rkst-insight-danger { border-color: rgba(220, 38, 38, 0.25); background: rgba(220, 38, 38, 0.06); }
.rkst-insight-danger::before { background: #dc2626; }
.rkst-insight-info { border-color: rgba(37, 99, 235, 0.2); background: rgba(37, 99, 235, 0.05); }
.rkst-insight-info::before { background: #2563eb; }
.rkst-clusters-layout {
  padding: 0 12px 12px;
}
.rkst-spend-donut-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rkst-spend-donut-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.rkst-spend-donut-wrap {
  position: relative;
  height: 120px;
}
.rkst-donut-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--dash-muted);
  margin: 0;
}
.rkst-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rkst-donut-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.rkst-donut-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rkst-donut-lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkst-donut-pct {
  font-weight: 600;
  color: var(--dash-text);
  font-variant-numeric: tabular-nums;
}
.rkst-cluster-row {
  cursor: pointer;
}
.rkst-cluster-row:hover td {
  background: rgba(37, 99, 235, 0.08);
}
.rkst-cluster-row:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: -2px;
}
.adc-cluster-row-focused td {
  background: rgba(37, 99, 235, 0.14) !important;
  animation: rkst-row-pulse 1.2s ease-in-out 2;
}
@keyframes rkst-row-pulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35); }
}
.rkst-scope-note {
  margin: 0;
  font-size: 0.68rem;
  color: var(--dash-muted);
}
.rkst-nm-picker {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--dash-surface) 0%, var(--dash-surface-2) 100%);
  box-shadow: var(--dash-shadow);
}
.rkst-nm-picker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}
.rkst-nm-picker-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dash-text);
}
.rkst-nm-picker-hint {
  font-size: 0.65rem;
  color: var(--dash-muted);
}
.rkst-nm-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.rkst-nm-scroll::-webkit-scrollbar {
  height: 6px;
}
.rkst-nm-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.rkst-nm-card {
  flex: 0 0 auto;
  width: min(168px, 42vw);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 2px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rkst-nm-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
}
.rkst-nm-card.is-active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.rkst-nm-card-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dash-text);
}
.rkst-nm-card-sub {
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.rkst-nm-card-id {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}
.rkst-nm-card-title {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--dash-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rkst-nm-card-code {
  font-size: 0.62rem;
  color: var(--dash-muted);
  margin-top: auto;
}
.ads-rk-open-link { color: var(--dash-primary); text-decoration: none; font-weight: 600; }
.ads-rk-open-link:hover { text-decoration: underline; }
button.ads-rk-open-link {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.ads-rk-all-hint {
  padding: 28px 16px;
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.82rem;
}
.ads-rk-all-hint-sub { font-size: 0.72rem; margin-top: 6px; }
.ads-rk-error {
  padding: 20px 16px;
  color: var(--dash-danger);
  font-size: 0.8rem;
  text-align: center;
}

/* --- Список кампаний (компактный) --- */
.ads-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ads-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.ads-search-compact {
  min-width: 120px;
  padding: 4px 8px;
  font-size: 10px;
}
.ads-list-kpi-inline {
  font-size: 0.68rem;
  color: var(--dash-muted);
  white-space: nowrap;
}
.ads-create-compact {
  padding: 4px 10px;
  font-size: 0.68rem;
}
.ads-list-panel {
  padding: 0;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  overflow: hidden;
}
.ads-campaigns-table-v2 {
  font-size: 0.64rem;
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.ads-campaigns-scroll {
  max-height: calc(100vh - 260px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ads-campaigns-table-v2 thead {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--dash-bg, #f8fafc);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.ads-campaigns-table-v2 thead th {
  position: relative;
  z-index: 1;
  background-color: var(--dash-bg, #f8fafc);
  vertical-align: bottom;
}
.ads-campaigns-table-v2 th,
.ads-campaigns-table-v2 td {
  border-bottom: 1px solid var(--dash-border, #e2e8f0);
  border-right: 1px solid var(--ads-cell-border, rgba(148, 163, 184, 0.32));
}
.ads-campaigns-table-v2 tr th:last-child,
.ads-campaigns-table-v2 tr td:last-child {
  border-right: none;
}
.ads-campaigns-table-v2 thead .ads-head-groups th {
  font-size: 0.54rem;
  padding: 4px 5px;
}
.ads-campaigns-table-v2 thead .ads-head-cols th {
  font-size: 0.52rem;
  padding: 3px 5px 5px;
  color: var(--dash-muted);
}
.ads-campaigns-table-v2 thead .ads-col-lead,
.ads-campaigns-table-v2 thead .ads-col-id,
.ads-campaigns-table-v2 thead .ads-col-name {
  background-color: var(--dash-bg, #f8fafc);
}
.ads-head-budget {
  background-color: var(--ads-head-budget-bg, #e3ecfd) !important;
}
.ads-head-period7,
.ads-head-today {
  background-color: var(--ads-head-today-bg, #ddf5eb) !important;
  border-left: 2px solid var(--ads-group-border, #94a3b8);
}
.ads-head-period30 {
  background-color: var(--ads-head-period30-bg, #fef3c7) !important;
  border-left: 2px solid var(--ads-group-border, #94a3b8);
}
.ads-head-group.ads-head-hidden {
  display: none;
}
.ads-campaigns-table-v2 .ads-head-cols th[data-col="spent"],
.ads-campaigns-table-v2 tbody td[data-col="spent"] {
  border-left: 2px solid var(--ads-group-border, #94a3b8);
}
.ads-campaigns-table-v2 .ads-head-cols th[data-col="spent30"],
.ads-campaigns-table-v2 tbody td[data-col="spent30"] {
  border-left: 2px solid var(--ads-group-border, #94a3b8);
}
.ads-campaigns-table-v2 thead .ads-col-bal,
.ads-campaigns-table-v2 thead .ads-col-limit {
  background-color: var(--ads-head-budget-bg, #e3ecfd);
}
.ads-campaigns-table-v2 thead .ads-col-m-period7,
.ads-campaigns-table-v2 thead .ads-col-m:not(.ads-col-m-period30) {
  background-color: var(--ads-head-today-bg, #ddf5eb);
}
.ads-campaigns-table-v2 thead .ads-col-m-period30 {
  background-color: var(--ads-head-period30-bg, #fef3c7);
}
.ads-campaigns-table-v2 .ads-col-m {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.62rem;
  width: 46px;
}
.ads-campaigns-table-v2 .ads-col-m-period7,
.ads-campaigns-table-v2 thead .ads-col-m-period7,
.ads-campaigns-table-v2 tbody td.ads-col-m-period7 {
  width: 46px;
  min-width: 44px;
}
.ads-m-cpo { font-weight: 600; }
.ads-campaigns-table-v2 tbody td {
  padding: 2px 5px;
  line-height: 1.15;
  vertical-align: middle;
  background-color: var(--dash-bg, #f8fafc);
}
.ads-campaigns-table-v2 tbody tr:nth-child(even) td {
  background-color: var(--dash-surface-2, #f1f5f9);
}
.ads-campaigns-table-v2 tbody tr:hover td {
  background-color: rgba(37, 99, 235, 0.07);
}
.ads-col-lead {
  width: 52px;
  min-width: 52px;
  text-align: center;
}
.ads-lead-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ads-lead-row .ads-row-check {
  width: 12px;
  height: 12px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.ads-toggle {
  position: relative;
  width: 24px;
  height: 13px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.ads-toggle-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 0.15s ease;
}
.ads-toggle-on { background: #22c55e; }
.ads-toggle-on .ads-toggle-knob { transform: translateX(11px); }
.ads-toggle-dead { opacity: 0.35; cursor: default; display: inline-block; }
.ads-name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: nowrap;
}
.ads-name-line .ads-name-btn {
  flex: 1;
  min-width: 0;
  max-width: none;
  text-align: left;
  font-size: 0.64rem;
  padding: 0;
  line-height: 1.2;
}
.ads-name-line .dash-badge-compact {
  flex-shrink: 0;
  padding: 0 4px;
  font-size: 0.52rem;
}
.ads-name-ind { flex-shrink: 0; display: inline-flex; gap: 1px; }
.ads-col-name { width: 24%; min-width: 140px; }
.ads-col-id { width: 58px; }
.ads-col-bal { width: 90px; min-width: 90px; max-width: 96px; cursor: default; }
.ads-col-bal[data-bal-tip] { cursor: help; }
.ads-col-limit { width: 54px; min-width: 54px; }
.ads-bal-cell { min-width: 0; overflow: hidden; }
.ads-bal-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.ads-bal-val {
  font-size: 0.62rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ads-limit-compact {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
  align-items: stretch;
}
.ads-limit-pct {
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--dash-muted);
}
.ads-limit-num {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ads-limit-compact .ads-limit-bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  position: relative;
  overflow: hidden;
}
.ads-limit-compact .ads-limit-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--pct, 0%);
  background: #22c55e;
  border-radius: 999px;
}
.ads-limit-compact .ads-limit-bar.ads-budget-warn::after { background: #f59e0b; }
.ads-m-empty { color: var(--dash-muted); opacity: 0.5; }
.ads-m-spend { font-weight: 700; }
.ads-m-drr { font-weight: 600; }
.ads-drr-good .ads-m-drr { color: #16a34a; }
.ads-drr-warn .ads-m-drr { color: #d97706; }
.ads-drr-bad .ads-m-drr { color: #dc2626; }
.ads-list-kpi-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
}
#ads-campaigns-root.dash-wrap {
  padding-top: 0;
}
.ads-kpi-card {
  flex: 1 1 100px;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface, rgba(255,255,255,0.03));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ads-kpi-card strong {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ads-kpi-lbl {
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.ads-kpi-card-warn {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}
.ads-kpi-card-warn strong { color: #dc2626; }
.ads-list-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.ads-cols-btn { font-size: 0.64rem; padding: 4px 8px; }
.ads-list-toolbar-actions .ads-col-settings-pop {
  right: 0;
  top: calc(100% + 4px);
}
.adc-clusters-head-tools .ads-col-settings-pop {
  z-index: 200;
}
.ads-head-group {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ads-campaigns-table-v2 .ads-sortable.sort-asc::after,
.ads-campaigns-table-v2 .ads-sortable.sort-desc::after {
  content: none;
}
.ads-campaigns-table-v2.ads-hide-col-bal [data-col="bal"],
.ads-campaigns-table-v2.ads-hide-col-limit [data-col="limit"],
.ads-campaigns-table-v2.ads-hide-col-spent [data-col="spent"],
.ads-campaigns-table-v2.ads-hide-col-views [data-col="views"],
.ads-campaigns-table-v2.ads-hide-col-clicks [data-col="clicks"],
.ads-campaigns-table-v2.ads-hide-col-orders [data-col="orders"],
.ads-campaigns-table-v2.ads-hide-col-cpo [data-col="cpo"],
.ads-campaigns-table-v2.ads-hide-col-ctr [data-col="ctr"],
.ads-campaigns-table-v2.ads-hide-col-cpc [data-col="cpc"],
.ads-campaigns-table-v2.ads-hide-col-drr [data-col="drr"],
.ads-campaigns-table-v2.ads-hide-col-spent30 [data-col="spent30"],
.ads-campaigns-table-v2.ads-hide-col-views30 [data-col="views30"],
.ads-campaigns-table-v2.ads-hide-col-clicks30 [data-col="clicks30"],
.ads-campaigns-table-v2.ads-hide-col-orders30 [data-col="orders30"],
.ads-campaigns-table-v2.ads-hide-col-cpo30 [data-col="cpo30"],
.ads-campaigns-table-v2.ads-hide-col-ctr30 [data-col="ctr30"],
.ads-campaigns-table-v2.ads-hide-col-cpc30 [data-col="cpc30"],
.ads-campaigns-table-v2.ads-hide-col-drr30 [data-col="drr30"] {
  display: none;
}
.ads-campaigns-table {
  font-size: 0.66rem;
}
.ads-campaigns-table th,
.ads-campaigns-table td {
  padding: 3px 6px;
  line-height: 1.2;
  vertical-align: middle;
}
.ads-campaigns-table thead th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 5px 6px;
}
.ads-campaigns-table tbody tr:nth-child(even) td {
  background: rgba(148, 163, 184, 0.04);
}
.ads-campaigns-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.06);
}
.ads-col-id { width: 72px; }
.ads-col-status { width: 78px; }
.ads-col-nms { max-width: 110px; color: var(--dash-muted); font-size: 0.62rem; }
.ads-col-act { width: 36px; text-align: center; }
.ads-col-ind { width: 34px; text-align: center; }
.ads-indicators { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.ads-ind { font-size: 0.62rem; line-height: 1; cursor: default; }
.ads-ind-warn { color: var(--dash-danger); }
.ads-ind-fire { color: #ea580c; }
.ads-ind-bidder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
  font-size: 0.48rem;
  font-weight: 800;
}
.ads-ind-muted { color: var(--dash-border); font-size: 0.62rem; }
.ads-col-metrics { min-width: 150px; max-width: 190px; }
.ads-metrics-cell { line-height: 1.25; }
.ads-metrics-line { font-size: 0.64rem; }
.ads-metrics-line strong { font-weight: 700; }
.ads-metrics-sub {
  font-size: 0.54rem;
  color: var(--dash-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ads-col-budget { width: 118px; max-width: 140px; }
.ads-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.ads-name-btn {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
}
.ads-type-sub {
  display: block;
  font-size: 0.58rem;
  color: var(--dash-muted);
  margin-top: 1px;
}
.dash-badge-compact {
  padding: 1px 6px;
  font-size: 0.58rem;
}
.ads-budget-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  max-width: 140px;
}
.ads-budget-head {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.ads-budget-val {
  font-weight: 700;
  font-size: 0.66rem;
  white-space: nowrap;
}
.ads-budget-daily {
  font-size: 0.54rem;
  color: var(--dash-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ads-budget-bar-wrap {
  display: inline-flex;
  width: 36px;
  flex-shrink: 0;
}
.ads-budget-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  overflow: hidden;
  position: relative;
}
.ads-budget-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--pct, 0%);
  border-radius: inherit;
  background: rgba(37, 99, 235, 0.55);
}
.ads-budget-warn::after { background: rgba(217, 119, 6, 0.7); }
.ads-budget-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  flex-shrink: 0;
}
.ads-budget-dot-low { background: var(--dash-danger); }
.ads-budget-topup {
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  color: var(--dash-primary);
  border-radius: 4px;
  width: 16px;
  height: 16px;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.ads-budget-topup:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--dash-primary);
}
.ads-autopay-on {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.15);
  color: var(--dash-success);
  font-size: 0.48rem;
  font-weight: 800;
  flex-shrink: 0;
}
.ads-bidder-dot {
  display: inline-flex;
  margin-left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
  font-size: 0.52rem;
  font-weight: 800;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
}
.ads-act-btn {
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  border-radius: 6px;
  width: 26px;
  height: 22px;
  padding: 0;
  cursor: pointer;
  font-size: 0.62rem;
  line-height: 1;
}
.ads-act-start {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--dash-primary);
  color: var(--dash-primary);
}
.ads-act-muted { color: var(--dash-muted); font-size: 0.62rem; }
.ads-empty { text-align: center; color: var(--dash-muted); padding: 16px !important; }
.ads-row-low-balance td {
  background: rgba(220, 38, 38, 0.06) !important;
}
.ads-row-low-balance:hover td {
  background: rgba(220, 38, 38, 0.1) !important;
}
.ads-row-low-balance .ads-budget-val {
  color: var(--dash-danger);
}
.ads-col-check { width: 28px; text-align: center; }
.ads-col-check input { cursor: pointer; }
.ads-col-spend { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.ads-spent-total { color: var(--dash-muted); font-size: 0.62rem; }
.ads-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  color: var(--dash-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ads-filter-check input { cursor: pointer; }
.ads-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.14);
  position: relative;
  z-index: 6;
}
.ads-bulk-bar.hidden { display: none; }
.ads-bulk-count {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--dash-muted);
  margin-right: 2px;
  white-space: nowrap;
}
.ads-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.ads-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 5px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  color: var(--dash-text);
  cursor: pointer;
  white-space: nowrap;
}
.ads-bulk-btn:hover {
  background: var(--dash-hover);
  border-color: rgba(37, 99, 235, 0.25);
}
.ads-bulk-ico {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.ads-bulk-btn-primary {
  background: var(--dash-primary);
  border-color: var(--dash-primary);
  color: #fff;
}
.ads-bulk-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.ads-bulk-btn-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}
.ads-bulk-btn-danger:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.45);
}
.ads-bulk-btn-ghost {
  margin-left: auto;
  border-color: transparent;
  background: transparent;
  color: var(--dash-muted);
  padding: 3px 6px;
}
.ads-bulk-btn-ghost:hover {
  color: var(--dash-text);
  background: rgba(0, 0, 0, 0.04);
}
.ads-sortable {
  cursor: pointer;
  user-select: none;
}
.ads-sortable:hover { color: var(--dash-text); }
.ads-sortable.sort-asc::after,
.ads-sortable.sort-desc::after {
  opacity: 0.85;
  margin-left: 3px;
  font-size: 0.56rem;
}
.ads-sortable.sort-asc::after { content: "▲"; }
.ads-sortable.sort-desc::after { content: "▼"; }
.ads-budget-modal { max-width: 480px; width: calc(100vw - 24px); }
.ads-budget-modal-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.ads-budget-modal-sub { margin: 0; font-size: 0.72rem; color: var(--dash-muted); }
.ads-budget-live {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--dash-surface-2);
}
.ads-budget-live .lbl { color: var(--dash-muted); }
.ads-budget-section-title {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
}
.ads-budget-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.ads-budget-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.ads-budget-field .dash-search { min-width: 100px; font-size: 11px; padding: 4px 8px; }
.ads-budget-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  cursor: pointer;
}
.ads-budget-hint {
  margin: 0;
  font-size: 0.62rem;
  color: var(--dash-muted);
  line-height: 1.4;
}

/* --- Мастер создания РК --- */
.ads-create-modal {
  width: min(720px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.ads-create-body {
  overflow-y: auto;
  padding: 0 1rem 0.75rem;
  flex: 1;
}
.ads-create-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem 0.75rem;
  position: relative;
}
.ads-create-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--dash-surface-2, rgba(255,255,255,0.06));
  color: var(--dash-muted);
  border: 1px solid var(--dash-border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ads-create-step-dot.active {
  background: var(--dash-accent, #6366f1);
  color: #fff;
  border-color: transparent;
}
.ads-create-step-dot.done {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}
.ads-create-step-line {
  flex: 0 0 28px;
  height: 2px;
  background: var(--dash-border);
}
.ads-create-step-labels {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  color: var(--dash-muted);
  pointer-events: none;
}
.ads-create-lead {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  color: var(--dash-muted);
  line-height: 1.45;
}
.ads-create-textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  background: var(--dash-bg);
  color: var(--dash-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  resize: vertical;
}
.ads-create-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ads-create-muted { font-size: 0.68rem; color: var(--dash-muted); }
.ads-create-status { margin: 6px 0 0; font-size: 0.68rem; min-height: 1.2em; }
.ads-create-warn-text { color: #f59e0b; }
.ads-create-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  max-height: 72px;
  overflow-y: auto;
}
.ads-create-chip {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--dash-surface-2, rgba(255,255,255,0.06));
  border: 1px solid var(--dash-border);
}
.ads-create-chip-more { opacity: 0.7; }
.ads-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .ads-create-grid { grid-template-columns: 1fr; }
}
.ads-create-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface, rgba(255,255,255,0.02));
}
.ads-create-card-wide { grid-column: 1 / -1; }
.ads-create-card h3 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-muted);
}
.ads-create-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.72rem;
}
.ads-create-radio small {
  display: block;
  color: var(--dash-muted);
  font-size: 0.62rem;
  margin-top: 2px;
}
.ads-create-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.68rem;
  flex: 1;
  min-width: 120px;
}
.ads-create-field span { color: var(--dash-muted); }
.ads-create-hint {
  margin: 4px 0 0;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.ads-create-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  margin-right: 12px;
}
.ads-create-placements { display: flex; gap: 12px; flex-wrap: wrap; }
.ads-create-autostart { margin-top: 8px; }
.ads-create-preview {
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  padding: 8px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--dash-bg);
}
.ads-create-preview-list { display: flex; flex-direction: column; gap: 6px; }
.ads-create-preview-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--dash-surface-2, rgba(255,255,255,0.04));
}
.ads-create-preview-idx {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--dash-accent, #6366f1);
  color: #fff;
  flex-shrink: 0;
}
.ads-create-preview-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ads-create-preview-main strong { font-size: 0.72rem; word-break: break-word; }
.ads-create-preview-sub { font-size: 0.62rem; color: var(--dash-muted); }
.ads-create-summary { margin: 8px 0 0; font-size: 0.72rem; }
.ads-create-warn { margin: 0 0 8px; font-size: 0.68rem; color: #f59e0b; }
.ads-create-empty { margin: 0; font-size: 0.72rem; color: var(--dash-muted); }
.ads-create-progress {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  font-size: 0.72rem;
  text-align: center;
}
.ads-create-footer { gap: 8px; }
.ads-create-result-ids {
  font-size: 0.68rem;
  color: var(--dash-muted);
  word-break: break-all;
}
/* --- Синхронизация кампаний --- */
.ads-sync-strip {
  margin: 0 0 10px;
}
.ads-sync-strip.hidden { display: none; }
.ads-sync-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface, rgba(255,255,255,0.03));
}
.ads-sync-card.ads-sync-running {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.08);
}
.ads-sync-card.ads-sync-done {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}
.ads-sync-card.ads-sync-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}
.ads-sync-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  margin-bottom: 6px;
}
.ads-sync-badge {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dash-accent, #6366f1);
  color: #fff;
}
.ads-sync-done .ads-sync-badge { background: #16a34a; }
.ads-sync-error .ads-sync-badge { background: #dc2626; }
.ads-sync-elapsed {
  margin-left: auto;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.ads-sync-progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.ads-sync-progress-bar {
  height: 100%;
  width: 18%;
  border-radius: 999px;
  background: var(--dash-accent, #6366f1);
  transition: width 0.4s ease;
}
.ads-sync-bar-active {
  animation: ads-sync-pulse 1.4s ease-in-out infinite;
}
@keyframes ads-sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.ads-sync-detail {
  margin: 6px 0 0;
  font-size: 0.66rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.ads-sync-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-top-color: var(--dash-accent, #6366f1);
  border-radius: 50%;
  animation: ads-sync-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.ads-sync-spinner.hidden { display: none; }
@keyframes ads-sync-spin { to { transform: rotate(360deg); } }
#ads-sync-btn.ads-sync-btn-loading {
  opacity: 0.85;
  pointer-events: none;
}
#ads-sync-btn.ads-sync-btn-loading .ads-sync-btn-label::after {
  content: "…";
}

/* —— Вкладка «Сводка» (матрица день × метрики) —— */
.rkch-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.rkch-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}
.rkch-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(480px, 100%);
}
.rkch-status {
  font-size: 0.68rem;
  color: var(--dash-muted);
}
.rkch-nm-wrap {
  margin-bottom: 12px;
}
.rkch-nm-expand {
  font-size: 0.68rem;
  padding: 6px 12px;
  max-width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rkch-nm-expand[hidden] {
  display: none !important;
}
.rkch-nm-picker {
  padding: 10px 12px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface-2);
}
.rkch-nm-picker[hidden] {
  display: none !important;
}
.rkch-nm-picker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.rkch-nm-picker-head-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
  flex: 1;
}
.rkch-nm-picker-title { font-size: 0.72rem; font-weight: 600; }
.rkch-nm-picker-hint { font-size: 0.65rem; color: var(--dash-muted); }
.rkch-nm-toggle {
  font-size: 0.68rem;
  padding: 4px 10px;
  flex-shrink: 0;
}
.rkch-nm-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rkch-nm-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 120px;
  max-width: 200px;
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
  cursor: pointer;
  text-align: left;
}
.rkch-nm-card.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.06);
}
.rkch-nm-id { font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rkch-nm-title { font-size: 0.65rem; line-height: 1.3; color: var(--dash-text); }
.rkch-nm-code { font-size: 0.62rem; color: var(--dash-muted); }
.rkch-matrix-scroll {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
}
.rkch-matrix {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
  width: 100%;
  table-layout: fixed;
}
.rkch-matrix th,
.rkch-matrix td {
  border-bottom: 1px solid var(--dash-border);
  border-right: 1px solid var(--dash-border);
  padding: 4px 6px;
  vertical-align: top;
  white-space: nowrap;
  font-size: 0.68rem;
}
.rkch-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--dash-surface-2);
  min-width: 200px;
  font-weight: 600;
}
.rkch-matrix-scroll { position: relative; }
.rkch-matrix-wrap { position: relative; }
.rkch-toggle-empty.is-on,
.rkch-toggle-action-days.is-on {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
  color: var(--dash-accent, #2563eb);
}
.rkch-corner-head {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 5;
  background: var(--dash-surface-2);
  min-width: 168px;
  width: 168px;
  font-size: 0.65rem;
}
.rkch-head-days th.rkch-day {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--dash-surface-2);
  text-align: center;
  min-width: 52px;
  padding: 3px 4px;
  vertical-align: middle;
  line-height: 1.15;
}
.rkch-day-label {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.rkch-day.rkch-has-change .rkch-day-num {
  color: var(--dash-accent, #2563eb);
}
.rkch-day-num {
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rkch-day-wd {
  font-size: 0.56rem;
  color: var(--dash-muted);
  text-transform: uppercase;
}
.rkch-today {
  background: rgba(37, 99, 235, 0.07);
}
.rkch-day-today .rkch-day-num {
  color: #2563eb;
  font-weight: 700;
}
.rkch-month-start {
  border-left: 2px solid rgba(100, 116, 139, 0.35) !important;
}
.rkch-month-tag {
  display: block;
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin-bottom: 1px;
  line-height: 1;
}
.rkch-col-highlight {
  background: rgba(37, 99, 235, 0.07) !important;
}
.rkch-section-title th.rkch-section-lbl {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--dash-surface-2);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dash-muted);
  padding: 8px 10px 4px;
  border-bottom: none;
}
.rkch-section-actions {
  background: rgba(248, 250, 252, 0.85);
}
.rkch-section-metrics .rkch-section-lbl {
  padding-top: 10px;
}
.rkch-row-lbl {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
  font-weight: 600;
  text-align: left;
  font-size: 0.68rem;
  min-width: 168px;
  max-width: 168px;
  width: 168px;
  white-space: normal;
  line-height: 1.25;
  border-right: 1px solid var(--dash-border);
}
.rkch-row-action-lbl {
  padding-left: 10px;
  border-left-width: 3px;
  border-left-style: solid;
}
.rkch-tone-bid .rkch-row-action-lbl { border-left-color: #2563eb; background: rgba(248, 250, 252, 0.95); }
.rkch-tone-price .rkch-row-action-lbl { border-left-color: #d97706; background: rgba(248, 250, 252, 0.95); }
.rkch-tone-photo .rkch-row-action-lbl { border-left-color: #7c3aed; background: rgba(248, 250, 252, 0.95); }
.rkch-tone-content .rkch-row-action-lbl { border-left-color: #64748b; background: rgba(248, 250, 252, 0.95); }
.rkch-tone-cluster .rkch-row-action-lbl { border-left-color: #e11d48; background: rgba(248, 250, 252, 0.95); }
.rkch-tone-manual .rkch-row-action-lbl { border-left-color: #94a3b8; background: rgba(248, 250, 252, 0.95); }
.rkch-row-action td {
  vertical-align: middle;
  padding: 2px 4px;
  min-height: 24px;
  max-width: 76px;
  white-space: nowrap;
  overflow: hidden;
}
.rkch-act-multi {
  display: block;
  width: 100%;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  padding: 2px 3px;
}
.rkch-pop-sep {
  border-top: 1px solid var(--dash-border);
  margin: 6px 0;
}
.rkch-pop-stack .rkch-pop-title {
  font-size: 0.68rem;
}
.rkch-row-action-empty th {
  font-weight: 500;
  color: var(--dash-muted);
  font-size: 0.68rem;
  padding: 10px;
}
.rkch-action-cell.rkch-has-change {
  background: rgba(255, 255, 255, 0.7);
}
.rkch-act {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin: 1px 0;
  padding: 2px 4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 0.62rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  color: var(--dash-text);
}
.rkch-act-has-thumb {
  flex-direction: row;
  justify-content: flex-start;
}
.rkch-act-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkch-act:hover {
  background: rgba(37, 99, 235, 0.1);
}
.rkch-act-thumb {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.rkch-group-row th.rkch-group-lbl {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--dash-surface);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  padding: 6px 10px 2px;
  border-bottom: none;
}
.rkch-row-metric .rkch-row-lbl {
  background: var(--dash-surface);
  font-weight: 500;
  z-index: 2;
}
.rkch-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  padding: 5px 7px;
}
.rkch-val.rkch-up { background: rgba(5, 150, 105, 0.05); }
.rkch-val.rkch-down { background: rgba(220, 38, 38, 0.04); }
.rkch-val.rkch-drr-good { background: rgba(22, 163, 74, 0.1); color: #15803d; font-weight: 600; }
.rkch-val.rkch-drr-warn { background: rgba(217, 119, 6, 0.1); color: #b45309; font-weight: 600; }
.rkch-val.rkch-drr-bad { background: rgba(220, 38, 38, 0.08); color: #b91c1c; font-weight: 600; }
.rkch-est { font-size: 0.62rem; color: var(--dash-muted); font-weight: 500; }
.rkch-group-collapsible .rkch-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}
.rkch-group-collapsible .rkch-group-toggle:hover { color: var(--dash-accent, #2563eb); }
.rkch-group-chevron { font-size: 0.62rem; opacity: 0.75; }
.rkch-row-metric.rkch-group-collapsed { display: none; }
.rkch-zero { color: var(--dash-muted); opacity: 0.55; }
.rkch-empty-msg {
  padding: 24px 16px;
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.75rem;
}
.rkch-popover {
  position: absolute;
  z-index: 20;
  min-width: 160px;
  max-width: 280px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.68rem;
  line-height: 1.4;
}
.rkch-pop-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.rkch-pop-sub,
.rkch-pop-src {
  margin-top: 4px;
  color: var(--dash-muted);
  font-size: 0.62rem;
}
.rkch-pop-dir-up {
  color: #16a34a;
  font-weight: 600;
}
.rkch-pop-dir-down {
  color: #dc2626;
  font-weight: 600;
}
.rkch-pop-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--dash-border);
}
.rkch-pop-delete {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.rkch-pop-delete:hover {
  background: rgba(220, 38, 38, 0.12);
}
.rkch-pop-photo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.rkch-pop-photo img {
  order: -1;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.rkch-weekend { background: rgba(99, 102, 241, 0.035) !important; }

/* Рекомендации */
.rkch-insights-panel {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
.rkch-insights-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--dash-border);
}
.rkch-insights-head-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
  flex: 1;
}
.rkch-insights-head h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
}
.rkch-insights-period {
  font-size: 0.62rem;
  color: var(--dash-muted);
  font-weight: 500;
}
.rkch-insights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.rkch-insights-toggle,
.rkch-ai-insights {
  font-size: 0.68rem;
  padding: 4px 10px;
}
.rkch-ai-insights.is-on,
.rkch-ai-insights:not(:disabled):hover {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
}
.rkch-ai-insights:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.rkch-insights-empty {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--dash-muted, #64748b);
}
.rkch-insights-ai-status {
  margin: 0;
  padding: 6px 14px 0;
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.rkch-insights-ai-block {
  border-top: 1px solid var(--dash-border);
  margin-top: 4px;
  padding-top: 6px;
}
.rkch-insights-ai-head {
  padding: 4px 14px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rkch-ai-badge {
  font-size: 0.58rem;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.rkch-insight-ai {
  border-left: 3px solid rgba(124, 58, 237, 0.45);
}
.rkch-insight-src {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rkch-insights-script {
  list-style: none;
  margin: 0;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rkch-insights-panel ul.rkch-insights-ai,
.rkch-insights-ai.rkch-insights-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rkch-insights-panel.rkch-insights-collapsed .rkch-insights-body {
  display: none;
}
.rkch-insights-body[hidden] {
  display: none !important;
}
.rkch-insights-hint {
  font-size: 0.62rem;
  color: var(--dash-muted);
}
.rkch-insights-list {
  list-style: none;
  margin: 0;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rkch-insight-text {
  line-height: 1.45;
}
.rkch-insight-dates {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rkch-insight-date {
  padding: 3px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  background: var(--dash-surface);
  font-size: 0.62rem;
  cursor: pointer;
  color: var(--dash-text);
  transition: border-color 0.15s, background 0.15s;
}
.rkch-insight-date:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
}
.rkch-insight-good .rkch-insight-date { border-color: rgba(5, 150, 105, 0.35); }
.rkch-insight-warn .rkch-insight-date { border-color: rgba(217, 119, 6, 0.35); }

/* Кластеры в показателях */
.rkch-section-clusters .rkch-section-lbl,
.rkch-cluster-section-lbl {
  color: #6366f1;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--dash-surface-2);
  min-width: 168px;
  max-width: 168px;
  width: 168px;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.08);
}
.rkch-cluster-head-row th.rkch-cluster-head-lbl {
  position: sticky;
  left: 0;
  z-index: 5;
  padding: 0;
  background: var(--dash-surface-2);
  border-top: 1px solid var(--dash-border);
  min-width: 168px;
  max-width: 168px;
  width: 168px;
  white-space: normal;
  vertical-align: middle;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.08);
}
.rkch-cluster-head-fill {
  padding: 0;
  background: var(--dash-surface-2);
  border-top: 1px solid var(--dash-border);
}
.rkch-cluster-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: var(--dash-surface-2);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.68rem;
  min-width: 0;
}
.rkch-cluster-toggle:hover {
  background: #eef2ff;
}
.rkch-cluster-chevron {
  color: var(--dash-muted);
  font-size: 0.62rem;
  flex-shrink: 0;
}
.rkch-cluster-meta {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--dash-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.rkch-cluster-name {
  font-weight: 500;
  color: var(--dash-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkch-row-cluster .rkch-row-lbl {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--dash-surface-2);
  min-width: 168px;
  max-width: 168px;
  width: 168px;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.08);
}
.rkch-row-cluster-lbl {
  padding-left: 22px !important;
  font-size: 0.64rem !important;
  color: var(--dash-muted);
}
.rkch-row-cluster.rkch-cluster-hidden {
  display: none;
}
.rkch-row-cluster .rkch-val {
  background: var(--dash-surface);
}
.rkch-insight {
  position: relative;
  padding: 8px 10px 8px 28px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
}
.rkch-insight::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rkch-insight-good { border-color: rgba(5, 150, 105, 0.25); background: rgba(5, 150, 105, 0.06); }
.rkch-insight-good::before { background: #059669; }
.rkch-insight-warn { border-color: rgba(217, 119, 6, 0.25); background: rgba(217, 119, 6, 0.06); }
.rkch-insight-warn::before { background: #d97706; }
.rkch-insight-danger { border-color: rgba(220, 38, 38, 0.25); background: rgba(220, 38, 38, 0.06); }
.rkch-insight-danger::before { background: #dc2626; }
.rkch-insight-info { border-color: rgba(37, 99, 235, 0.2); background: rgba(37, 99, 235, 0.05); }
.rkch-insight-info::before { background: #2563eb; }

/* Сводка: компактные чипы ИИ в одну строку */
.rkch-insights-block ul.rkch-insights-ai {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
}
.rkch-insights-block .rkch-insight {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 4px 8px 4px 18px;
  font-size: 0.62rem;
  line-height: 1.35;
  white-space: nowrap;
}
.rkch-insights-block .rkch-insight::before {
  left: 7px;
  width: 6px;
  height: 6px;
}

/* Модалка заметки */
.rkch-note-overlay {
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.rkch-note-dialog {
  max-width: 480px;
  border: none;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}
.rkch-note-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}
.rkch-note-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.rkch-note-hero h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.rkch-note-lead {
  margin: 0;
  font-size: 0.68rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.rkch-note-body {
  padding: 14px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rkch-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rkch-field-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--dash-text);
}
.rkch-note-body .dash-input,
.rkch-note-date,
.rkch-note-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  background: var(--dash-surface);
  color: var(--dash-text);
  box-sizing: border-box;
}
.rkch-note-text {
  resize: vertical;
  min-height: 88px;
  line-height: 1.4;
}
.rkch-note-body .dash-input:focus,
.rkch-note-date:focus,
.rkch-note-text:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.rkch-note-count {
  font-size: 0.62rem;
  color: var(--dash-muted);
  text-align: right;
}
.rkch-note-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rkch-presets-lbl {
  font-size: 0.62rem;
  color: var(--dash-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rkch-presets-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rkch-preset {
  padding: 5px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  background: var(--dash-surface-2);
  font-size: 0.68rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rkch-preset:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}
.rkch-note-footer {
  padding: 12px 18px 16px;
  gap: 8px;
}
.rkch-note-footer .btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Shared: associated products panels (Stats + Summary) */
.rk-assoc-panel {
  margin-top: 12px;
}
.rk-assoc-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.82rem;
}
.rk-assoc-panel > summary::-webkit-details-marker { display: none; }
.rk-assoc-panel > summary::before {
  content: "▸";
  font-size: 0.7rem;
  color: var(--dash-muted);
  margin-right: 6px;
  transition: transform 0.15s;
}
.rk-assoc-panel[open] > summary::before { transform: rotate(90deg); }
.rk-assoc-summary { width: 100%; }
.rk-assoc-title { flex: 1; min-width: 0; }
.rk-assoc-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.rk-assoc-badge-empty {
  color: var(--dash-muted);
  background: var(--dash-surface-2);
}
.rk-assoc-hint {
  margin: 0 14px 8px;
  font-size: 0.68rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.rk-assoc-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin: 0 10px 10px;
}

/* Summary: filters, sparkline, best day */
.rkch-action-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 6px 12px 0;
}
.rkch-filter-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rkch-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rkch-filter-chip {
  padding: 3px 9px;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  background: var(--dash-surface);
  font-size: 0.64rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.rkch-filter-chip.is-on {
  opacity: 1;
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}
.rkch-filter-chip.rkch-tone-bid.is-on { border-color: rgba(124, 58, 237, 0.4); background: rgba(124, 58, 237, 0.08); }
.rkch-filter-chip.rkch-tone-price.is-on { border-color: rgba(217, 119, 6, 0.4); background: rgba(217, 119, 6, 0.08); }
.rkch-filter-chip.rkch-tone-photo.is-on { border-color: rgba(8, 145, 178, 0.4); background: rgba(8, 145, 178, 0.08); }
.rkch-spark-panel {
  margin: 8px 12px 0;
  padding: 0;
}
.rkch-spark-panel > summary {
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.rkch-spark-panel > summary::-webkit-details-marker { display: none; }
.rkch-group-row.rkch-group-efficiency .rkch-group-lbl {
  border-top: 2px solid rgba(37, 99, 235, 0.28);
  padding-top: 10px;
  margin-top: 4px;
  color: var(--dash-accent, #2563eb);
  font-weight: 700;
}
.rkch-val.rkch-heat-best { background: rgba(5, 150, 105, 0.14); }
.rkch-val.rkch-heat-good { background: rgba(5, 150, 105, 0.08); }
.rkch-val.rkch-heat-mid { background: rgba(148, 163, 184, 0.06); }
.rkch-val.rkch-heat-warn { background: rgba(217, 119, 6, 0.08); }
.rkch-val.rkch-heat-bad { background: rgba(220, 38, 38, 0.07); }
.rkch-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 12px 0;
  padding: 0;
}
.rkch-kpi-card {
  flex: 1 1 120px;
  min-width: 110px;
  max-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rkch-kpi-lbl {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  font-weight: 600;
}
.rkch-kpi-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.rkch-kpi-sub {
  font-size: 0.62rem;
  color: var(--dash-muted);
  font-variant-numeric: tabular-nums;
}
.rkch-kpi-val.rkch-drr-good { color: #15803d; }
.rkch-kpi-val.rkch-drr-warn { color: #b45309; }
.rkch-kpi-val.rkch-drr-bad { color: #b91c1c; }
.rkch-kpi-card.accent-spend { border-left: 3px solid #dc2626; }
.rkch-kpi-card.accent-orders { border-left: 3px solid #2563eb; }
.rkch-kpi-card.accent-revenue { border-left: 3px solid #7c3aed; }
.rkch-kpi-card.accent-efficiency { border-left: 3px solid #d97706; }
.rkch-kpi-card.accent-roas { border-left: 3px solid #059669; }
.rkch-insights-expand {
  margin: 6px 0 0;
  font-size: 0.68rem;
  padding: 4px 10px;
}
.rkch-insights-panel:not(.rkch-insights-expanded) .rkch-insight {
  padding: 6px 8px 6px 14px;
}
.rkch-insights-panel:not(.rkch-insights-expanded) .rkch-insight-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.35;
}
.rkch-insights-panel:not(.rkch-insights-expanded) .rkch-insight-dates {
  display: none;
}
.rkch-spark-wrap {
  padding: 0 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rkch-spark-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 8px;
  height: 40px;
}
.rkch-spark-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--dash-muted);
  text-transform: uppercase;
}
.rkch-spark-svg {
  width: 100%;
  height: 40px;
  display: block;
}
.rkch-spark-fill {
  fill: rgba(37, 99, 235, 0.12);
}
.rkch-spark-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.rkch-spark-empty {
  font-size: 0.68rem;
  color: var(--dash-muted);
  margin: 0;
}
.rkch-day-clickable {
  cursor: pointer;
}
.rkch-day-clickable:hover {
  background: rgba(37, 99, 235, 0.1) !important;
}
.rkch-best-day {
  background: rgba(5, 150, 105, 0.08);
}
.rkch-best-badge {
  display: block;
  font-size: 0.55rem;
  color: #059669;
  line-height: 1;
  margin-bottom: 1px;
}
.rkch-toggle-spark.is-on,
.rkch-export-csv:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.rkch-compare-badge,
.rkst-compare-badge {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  color: var(--dash-muted);
  border: 1px solid var(--dash-border);
  white-space: nowrap;
  cursor: help;
}
.rkch-alerts-strip {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.15);
}
.rkch-alerts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rkch-alert-btn {
  border: none;
  background: transparent;
  font-size: 0.68rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.rkch-alert-warn .rkch-alert-btn { color: #b45309; background: rgba(217, 119, 6, 0.08); }
.rkch-alert-info .rkch-alert-btn { color: #2563eb; background: rgba(37, 99, 235, 0.08); }
.rkch-kpi-delta {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 600;
}
.rkch-delta-good { color: #059669; }
.rkch-delta-bad { color: #dc2626; }
.rkch-col-highlight td,
.rkch-col-highlight th,
td.rkch-col-highlight,
th.rkch-col-highlight {
  background: rgba(37, 99, 235, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}
.rkch-col-pinned td,
.rkch-col-pinned th,
td.rkch-col-pinned,
th.rkch-col-pinned {
  background: rgba(37, 99, 235, 0.12) !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
}
.rkch-cluster-summary-row .rkch-cluster-summary-cell {
  font-size: 0.68rem;
  color: var(--dash-muted);
  padding: 4px 8px;
}
.rkch-toggle-weekly.is-on,
.rkch-toggle-aggregate.is-on,
.rkch-toggle-clusters-bid.is-on {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
}
.rkch-bid-history-panel { margin-top: 8px; }
.rkch-bid-history-count { font-size: 0.68rem; color: var(--dash-muted); margin-left: 8px; }

/* --- Настройки: hub + API + лог синхронизации --- */
.settings-hub {
  display: grid;
  gap: 12px;
  max-width: 720px;
}
.settings-hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.settings-hub-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.settings-hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.settings-hub-icon-api { background: rgba(99, 102, 241, 0.14); }
.settings-hub-icon-bill { background: rgba(16, 185, 129, 0.14); }
.settings-hub-icon-ref { background: rgba(245, 158, 11, 0.14); }
.settings-hub-body { flex: 1; min-width: 0; }
.settings-hub-body h3 { margin: 0 0 4px; font-size: 0.95rem; font-weight: 650; }
.settings-hub-body p { margin: 0; font-size: 0.78rem; color: var(--dash-muted); line-height: 1.35; }
.settings-hub-arrow { color: var(--dash-muted); font-size: 1.1rem; }

.api-settings-layout {
  display: grid;
  gap: 14px;
  max-width: 820px;
}
.api-settings-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
}
.api-settings-status {
  min-height: 1.2em;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--dash-muted);
}
.api-settings-status.is-ok { color: #059669; }
.api-settings-status.is-warn { color: #d97706; }
.api-settings-status.is-err { color: #dc2626; }
.api-settings-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.api-settings-masked {
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.api-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.api-settings-field span { font-size: 0.82rem; font-weight: 600; }
.api-settings-hint {
  margin: 0 0 12px;
  font-size: 0.76rem;
  color: var(--dash-muted);
  line-height: 1.4;
}
.api-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.api-settings-note {
  margin: 16px 0 0;
  font-size: 0.72rem;
  color: var(--dash-muted);
}
.api-settings-note a { color: var(--dash-accent, #6366f1); }

.sync-log-panel {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
}
.sync-log-panel.sync-log-running { border-color: rgba(99, 102, 241, 0.35); background: rgba(99, 102, 241, 0.04); }
.sync-log-panel.sync-log-done { border-color: rgba(16, 185, 129, 0.35); }
.sync-log-panel.sync-log-error { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.04); }
.sync-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.sync-log-title { font-size: 0.88rem; }
.sync-log-sub { margin: 4px 0 0; font-size: 0.74rem; color: var(--dash-muted); }
.sync-log-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  white-space: nowrap;
}
.sync-log-progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  overflow: hidden;
  margin-bottom: 12px;
}
.sync-log-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.4s ease;
}
.sync-log-jobs {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 4px;
}
.sync-log-job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--dash-surface-2);
}
.sync-log-job.is-ok .sync-log-job-st { color: #059669; }
.sync-log-job.is-err .sync-log-job-st { color: #dc2626; }
.sync-log-job.is-run .sync-log-job-st { color: #6366f1; }
.sync-log-job-name { font-weight: 600; }
.sync-log-job-time, .sync-log-job-msg { grid-column: 1 / -1; color: var(--dash-muted); font-size: 0.68rem; }
.sync-log-text {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.68rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sync-user-jobs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sync-user-job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
  font-size: 0.78rem;
}
.sync-user-job.is-ok .sync-user-job-st { color: #059669; font-weight: 600; }
.sync-user-job.is-err .sync-user-job-st { color: #dc2626; font-weight: 600; }
.sync-user-job.is-run .sync-user-job-st { color: #6366f1; font-weight: 600; }
.sync-user-job-name { font-weight: 600; }
.sync-user-job-time {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  color: var(--dash-muted);
}
.sync-admin-only.hidden { display: none !important; }

/* API settings: единый прогресс загрузки */
.sync-progress-card {
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--dash-border);
  background: linear-gradient(165deg, var(--dash-surface) 0%, rgba(99, 102, 241, 0.04) 100%);
}
.sync-progress-card.is-running {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}
.sync-progress-card.is-ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(165deg, var(--dash-surface) 0%, rgba(16, 185, 129, 0.05) 100%);
}
.sync-progress-card.is-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(165deg, var(--dash-surface) 0%, rgba(239, 68, 68, 0.04) 100%);
}
.sync-progress-card.is-incomplete {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(165deg, var(--dash-surface) 0%, rgba(245, 158, 11, 0.06) 100%);
}
.sync-progress-card.is-incomplete .sync-progress-step {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}
.sync-progress-card.is-incomplete .sync-progress-bar {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.sync-progress-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.sync-progress-step {
  flex-shrink: 0;
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
  line-height: 1.1;
}
.sync-progress-card.is-ok .sync-progress-step {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}
.sync-progress-card.is-error .sync-progress-step {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}
.sync-progress-title {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
.sync-progress-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
  line-height: 1.45;
}
.sync-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  overflow: hidden;
}
.sync-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.45s ease;
}
.sync-progress-card.is-ok .sync-progress-bar {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.sync-progress-card.is-error .sync-progress-bar {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.sync-progress-errors {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sync-progress-errors li {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
}
.sync-progress-hint {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #92400e;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
}
.sync-progress-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 6px;
}
.sync-progress-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  color: var(--dash-muted);
  background: var(--dash-surface-2);
  border: 1px solid transparent;
}
.sync-progress-step-item.is-done {
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
}
.sync-progress-step-item.is-running {
  color: #4338ca;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
}
.sync-progress-step-item.is-error {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
}
.sync-progress-step-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.sync-progress-step-label {
  min-width: 0;
  line-height: 1.25;
}

/* API settings: WB + Ozon grid */
.mp-integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .mp-integrations-grid {
    grid-template-columns: 1fr;
  }
}
.mp-integration-card {
  padding: 20px 22px;
  border-radius: 16px;
  scroll-margin-top: 72px;
}
.mp-integration-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.mp-integration-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.mp-integration-badge-wb {
  background: rgba(124, 58, 237, 0.14);
  color: #7c3aed;
}
.mp-integration-badge-ozon {
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
}
.mp-integration-head-text {
  flex: 1;
  min-width: 0;
}
.mp-integration-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mp-integration-sub {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--dash-muted);
}
.mp-integration-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}
.mp-integration-status.is-on {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
.mp-integration-status.is-off {
  color: var(--dash-muted);
  background: var(--dash-surface-2);
}
.mp-integration-soon {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

/* Settings: API / Тариф / Рефералка */
.settings-page {
  display: grid;
  gap: 16px;
  max-width: 720px;
}
.settings-page.settings-shell {
  max-width: min(960px, calc(100vw - 40px));
  gap: 10px;
}
.billing-page.settings-shell,
.billing-page.billing-page-fit {
  max-width: min(1360px, calc(100vw - 40px));
}
.settings-page.settings-page-api.settings-shell {
  max-width: min(1040px, calc(100vw - 40px));
}
.settings-hero-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--dash-border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, var(--dash-surface) 55%, var(--dash-surface) 100%);
}
.settings-hero-api { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--dash-surface) 60%); }
.settings-hero-referral { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--dash-surface) 60%); }
.settings-hero-icon {
  font-size: 2rem;
  line-height: 1;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}
.settings-hero-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dash-muted);
}
.settings-hero-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.settings-hero-sub {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--dash-muted);
}
.settings-panel-card {
  padding: 22px 24px;
  border-radius: 16px;
}
.settings-panel-title {
  margin: 0 0 6px;
  font-size: 1rem;
}
.settings-panel-lead {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--dash-muted);
}
.settings-page-foot {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
}
.settings-page-foot a { color: var(--dash-accent, #6366f1); }

.settings-hero-profile {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, var(--dash-surface) 60%);
}
.settings-hero-icon-profile {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(99, 102, 241, 0.12));
}

.profile-page .profile-stats-strip {
  margin-bottom: 2px;
}
.profile-stat-initials {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.profile-stat-icon-tg {
  color: #0369a1;
  background: linear-gradient(145deg, #e0f2fe, #bae6fd);
}
.profile-stat-icon-phone {
  color: #047857;
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
}
.profile-stat-contact {
  font-size: 1rem;
  font-weight: 700;
}

/* Profile — 3 columns, hover-edit cards */
.profile-page-columns {
  position: relative;
  padding-bottom: 4px;
}
.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 12px;
  align-items: start;
}
.profile-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.82));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.profile-col-head {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e1b4b;
  text-transform: none;
}
.profile-col-head-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  color: #6366f1;
  background: linear-gradient(145deg, #ede9fe, #ddd6fe);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.18);
}
.profile-col-head-icon-violet {
  color: #7c3aed;
  background: linear-gradient(145deg, #f3e8ff, #ede9fe);
}
.profile-col-head-icon-green {
  color: #047857;
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
}
.profile-editable-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-field-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
}
.profile-field-card-primary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(237, 233, 254, 0.45));
}
.profile-field-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.profile-editable-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 18px;
}
.profile-field-card-primary .profile-editable-icon {
  margin-top: 20px;
}
.profile-inline-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.profile-inline-field > span {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.profile-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #fff, #f8fafc);
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.profile-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.profile-input-readonly {
  color: #64748b;
  background: rgba(248, 250, 252, 0.9);
  cursor: default;
}
.profile-save-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 2px;
}
.profile-save-btn {
  padding: 9px 22px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 11px;
  min-height: 36px;
}
.profile-security-form {
  display: grid;
  gap: 8px;
}
.profile-pass-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.profile-pass-submit {
  width: fit-content;
  margin-top: 2px;
}
.profile-col-security .profile-reset-card {
  max-width: none;
  margin-top: 6px;
}
.profile-col-notify .notifications-prefs-profile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-col-notify .notifications-pref-row-compact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px !important;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  position: relative;
}
.profile-col-notify .notifications-pref-row-compact input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.profile-col-notify .notifications-pref-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 9px;
}
.profile-col-notify .notifications-pref-body strong {
  font-size: 0.76rem;
}
.profile-col-notify .notifications-pref-body span:last-child {
  font-size: 0.64rem;
}
.profile-col-notify .notifications-pref-switch {
  width: 32px;
  height: 18px;
}
.profile-col-notify .notifications-pref-switch::after {
  width: 14px;
  height: 14px;
}
.profile-col-notify .notifications-pref-row input:checked ~ .notifications-pref-switch::after {
  transform: translateX(14px);
}
@media (max-width: 960px) {
  .profile-columns {
    grid-template-columns: 1fr;
  }
  .profile-pass-row {
    grid-template-columns: 1fr;
  }
}

.profile-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 10px;
  align-items: start;
}
.profile-merged-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.profile-page-merged .profile-form-grid {
  max-width: 100%;
}
.profile-page-merged .profile-field-name {
  max-width: 200px;
}
.profile-page-merged .profile-form-grid-pass,
.profile-page-merged .profile-reset-card {
  max-width: 100%;
}
.profile-page-merged .profile-field-pass-current {
  max-width: 100%;
}
.profile-notifications-panel .notifications-prefs-profile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-notifications-panel .notifications-pref-row-compact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px !important;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  position: relative;
}
.profile-notifications-panel .notifications-pref-row-compact input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.profile-notifications-panel .notifications-pref-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 9px;
}
.profile-notifications-panel .notifications-pref-body strong {
  font-size: 0.74rem;
}
.profile-notifications-panel .notifications-pref-body span:last-child {
  font-size: 0.62rem;
}
.profile-notifications-panel .notifications-pref-switch {
  width: 32px;
  height: 18px;
}
.profile-notifications-panel .notifications-pref-switch::after {
  width: 14px;
  height: 14px;
}
.profile-notifications-panel .notifications-pref-row input:checked ~ .notifications-pref-switch::after {
  transform: translateX(14px);
}
.profile-notify-hint {
  margin: 0 0 6px;
  font-size: 0.66rem;
  color: #94a3b8;
}
.profile-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.profile-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 10px;
  max-width: 340px;
}
.profile-field-name {
  grid-column: 1 / -1;
  max-width: 220px;
}
.profile-form-grid-pass {
  max-width: 360px;
}
.profile-field-pass-current {
  grid-column: 1 / -1;
  max-width: 260px;
}
.profile-page .profile-form .dash-input {
  width: 100%;
}
.profile-form-submit {
  width: fit-content;
  margin-top: 2px;
}
.profile-reset-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  padding: 10px 12px;
  max-width: 360px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 242, 255, 0.75));
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.08);
}
.profile-reset-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #4338ca;
  background: linear-gradient(145deg, #e0e7ff, #c7d2fe);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}
.profile-reset-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.profile-reset-body strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}
.profile-reset-email {
  font-size: 0.66rem;
  color: #64748b;
}
.profile-reset-btn {
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
}
.profile-reset-msg {
  grid-column: 1 / -1;
  margin: 0;
}
.profile-page .settings-section-title {
  text-transform: none;
  letter-spacing: -0.01em;
}
@media (max-width: 900px) {
  .profile-panels,
  .profile-merged-grid { grid-template-columns: 1fr; }
  .profile-page .billing-stats-strip { grid-template-columns: 1fr; }
  .profile-form-grid,
  .profile-form-grid-pass,
  .profile-reset-card {
    max-width: 100%;
  }
  .profile-field-name,
  .profile-field-pass-current {
    max-width: 100%;
  }
}
.profile-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dash-text, #0f172a);
}
.profile-panel-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
  line-height: 1.4;
}
.profile-field {
  display: grid;
  gap: 6px;
}
.profile-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dash-muted);
}
.profile-form {
  display: grid;
  gap: 12px;
}
.profile-form-msg {
  margin: 0;
  font-size: 0.82rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.profile-form-msg.is-ok {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
}
.profile-form-msg.is-err {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}
.profile-forgot-block {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 8px;
}
.profile-forgot-lead {
  margin: 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
}
.dash-btn-ghost {
  background: transparent;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  color: var(--dash-accent, #6366f1);
  font-size: 0.82rem;
  padding: 8px 12px;
  text-align: left;
}
.dash-btn-ghost:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.5);
}
.profile-trial-banner a { color: inherit; font-weight: 600; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.profile-card .profile-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.profile-form-msg {
  margin: 0;
  font-size: 0.82rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.profile-form-msg.is-ok {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
}
.profile-form-msg.is-err {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}
.profile-foot-hint {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
}
.profile-foot-hint a { color: var(--dash-primary, #2563eb); }
.profile-trial-banner a { color: inherit; font-weight: 600; }

.settings-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
}
.settings-alert-ok {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.settings-table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--dash-border); }
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.settings-table th, .settings-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--dash-border);
  text-align: left;
}
.settings-table th { background: var(--dash-surface-2); color: var(--dash-muted); font-weight: 600; }
.billing-feature-grid {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.billing-feature-grid li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--dash-surface-2);
  font-size: 0.85rem;
  font-weight: 500;
}
.billing-feature-icon { font-size: 1.1rem; }
.billing-included-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
.billing-promo-card { margin-top: 16px; }
.billing-promo-form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px;
}
.billing-promo-form input {
  flex: 1; min-width: 160px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--dash-border); background: var(--dash-surface);
}
.billing-promo-msg { margin-top: 10px; font-size: 0.85rem; }
.billing-promo-msg.is-ok { color: #047857; }
.billing-promo-msg.is-err { color: #b91c1c; }
.billing-promo-msg.hidden { display: none; }

.billing-page { gap: 10px; }
.billing-page-vivid {
  position: relative;
  isolation: isolate;
}
.billing-page-vivid::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(124, 58, 237, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(59, 130, 246, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(16, 185, 129, 0.08), transparent 55%);
}
.billing-page-fit {
  max-width: min(1360px, calc(100vw - 40px));
  width: 100%;
}
.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 12px;
  align-items: start;
}
.billing-main { display: grid; gap: 10px; min-width: 0; }
.billing-alert-compact {
  padding: 8px 12px;
  font-size: 0.8rem;
  line-height: 1.35;
}
.billing-stats-strip {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
}
.billing-alert-glow {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 8px 24px rgba(251, 191, 36, 0.12);
}
.billing-stat-glass {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
}
.billing-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #5b21b6;
  background: linear-gradient(145deg, #ede9fe, #ddd6fe);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.18);
  flex-shrink: 0;
}
.billing-stat-body { min-width: 0; flex: 1; }
.billing-stat-primary .billing-stat-icon {
  color: #fff;
  background: linear-gradient(145deg, #7c3aed, #6366f1);
}
.billing-aside-glass {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.82));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 12px 14px;
}
.billing-tiers-vivid {
  perspective: 1200px;
}
.billing-tier-3d {
  position: relative;
  overflow: hidden;
  padding: 14px 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 32px rgba(15, 23, 42, 0.08),
    0 4px 10px rgba(15, 23, 42, 0.04);
  transform-style: preserve-3d;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.billing-tier-3d:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 22px 44px rgba(15, 23, 42, 0.12),
    0 8px 16px rgba(15, 23, 42, 0.06);
}
.billing-tier-shine {
  position: absolute;
  inset: -40% auto auto -30%;
  width: 70%;
  height: 140%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  transform: rotate(12deg);
  pointer-events: none;
  opacity: 0.55;
}
.billing-tier-start {
  --tier-accent: #059669;
  --tier-glow: rgba(5, 150, 105, 0.22);
}
.billing-tier-business {
  --tier-accent: #2563eb;
  --tier-glow: rgba(37, 99, 235, 0.22);
}
.billing-tier-pro {
  --tier-accent: #7c3aed;
  --tier-glow: rgba(124, 58, 237, 0.28);
}
.billing-tier-max {
  --tier-accent: #d97706;
  --tier-glow: rgba(217, 119, 6, 0.24);
}
.billing-tier-promo_1 {
  --tier-accent: #0d9488;
  --tier-glow: rgba(13, 148, 136, 0.32);
}
.billing-tier-promo_2 {
  --tier-accent: #db2777;
  --tier-glow: rgba(219, 39, 119, 0.32);
}
.billing-tier-orb {
  position: absolute;
  top: -28px;
  right: -22px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), var(--tier-glow, rgba(124, 58, 237, 0.2)) 55%, transparent 72%);
  pointer-events: none;
  opacity: 0.85;
  filter: blur(0.5px);
}
.billing-tier-3d.is-promo {
  border-color: color-mix(in srgb, var(--tier-accent) 42%, white);
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.98) 0%, color-mix(in srgb, var(--tier-accent) 8%, white) 38%, rgba(255, 255, 255, 0.94) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px color-mix(in srgb, var(--tier-accent) 22%, transparent),
    0 20px 48px var(--tier-glow),
    0 8px 20px rgba(15, 23, 42, 0.08);
  animation: billing-promo-float 5s ease-in-out infinite;
}
.billing-tier-3d.is-promo:hover {
  transform: translateY(-10px) rotateX(3deg) scale(1.02);
}
@keyframes billing-promo-float {
  0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 0 0 1px color-mix(in srgb, var(--tier-accent) 22%, transparent), 0 18px 42px var(--tier-glow), 0 8px 20px rgba(15,23,42,0.08); }
  50% { box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 0 0 1px color-mix(in srgb, var(--tier-accent) 35%, transparent), 0 26px 56px var(--tier-glow), 0 12px 28px rgba(15,23,42,0.1); }
}
.billing-tier-badge-promo {
  color: #fff;
  background: linear-gradient(135deg, var(--tier-accent), color-mix(in srgb, var(--tier-accent) 70%, #1e1b4b));
  border: none;
  box-shadow: 0 4px 14px var(--tier-glow);
}
.billing-tiers-promo-head {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.55), rgba(255, 255, 255, 0.85) 45%, rgba(237, 233, 254, 0.45));
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.12), 0 4px 12px rgba(124, 58, 237, 0.08);
}
.billing-tiers-promo-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 4px;
}
.billing-tiers-promo-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #7c3aed, #db2777, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.billing-tiers-promo-sub {
  margin: 0;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
}
.billing-tiers-promo-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.billing-tiers-head-title {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}
.billing-tiers-head-sub {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
}
.settings-shell {
  gap: 10px;
}
.settings-text-clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.settings-shell .billing-stat-value {
  font-size: 0.95rem;
  font-weight: 800;
}
.settings-shell .billing-stat-meta {
  font-size: 0.66rem;
}
.settings-section-head {
  margin: 2px 0 0;
}
.settings-section-head-inline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}
.settings-section-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.01em;
}
.settings-section-sub {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.3;
}
.settings-panel-compact {
  padding: 12px 14px !important;
}
.settings-btn-compact {
  padding: 7px 12px;
  font-size: 0.78rem;
  min-height: 32px;
}
.dash-input-compact {
  padding: 8px 10px;
  font-size: 0.82rem;
  min-height: 34px;
}
.profile-form-compact {
  gap: 8px;
}
.profile-form-compact .profile-field {
  gap: 4px;
}
.profile-form-compact .profile-field > span {
  font-size: 0.68rem;
}
.profile-forgot-block {
  margin-top: 6px;
  padding-top: 10px;
  gap: 4px;
}
.profile-forgot-email {
  margin: 0;
  font-size: 0.66rem;
  color: #94a3b8;
}
.profile-stat-contact {
  font-size: 0.95rem;
}
.api-stats-strip {
  margin-bottom: 2px;
}
.mp-integration-head-compact {
  margin-bottom: 10px;
}
.mp-integration-head-compact .mp-integration-title {
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.mp-integration-head-compact .mp-integration-sub {
  font-size: 0.68rem;
}
.mp-integration-card.settings-panel-compact {
  padding: 12px 14px;
}
.mp-integration-soon-compact {
  margin: 0 0 8px;
  padding: 6px 10px;
  font-size: 0.68rem;
  border-radius: 8px;
}
.api-settings-block-compact {
  margin-bottom: 8px;
}
.api-settings-form-compact {
  margin-top: 4px;
}
.api-settings-actions-compact {
  gap: 6px;
}
.api-settings-actions-compact .dash-btn {
  padding: 6px 10px;
  font-size: 0.74rem;
}
.api-settings-masked {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.api-settings-hint {
  margin: 0 0 8px;
  font-size: 0.68rem;
}
.referral-stats-strip {
  grid-template-columns: 1.1fr 0.7fr 0.7fr 1fr;
}
.billing-stat-icon.settings-hero-icon-ref {
  font-size: 1rem;
  font-weight: 800;
  color: #7c3aed;
  background: linear-gradient(145deg, #ede9fe, #ddd6fe);
}
.referral-steps-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
}
.referral-step-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.referral-step-compact .referral-step-num {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
  margin-bottom: 2px;
}
.referral-step-compact strong {
  font-size: 0.76rem;
  margin: 0;
}
.referral-step-compact > span:last-child {
  font-size: 0.66rem;
  color: #64748b;
  line-height: 1.25;
}
.referral-share-actions {
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.referral-table-compact th,
.referral-table-compact td {
  padding: 6px 8px;
  font-size: 0.74rem;
}
.referral-empty-hint {
  font-size: 0.72rem;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .referral-stats-strip {
    grid-template-columns: 1fr 1fr;
  }
  .referral-steps-compact {
    grid-template-columns: 1fr;
  }
}
.mp-integration-card-3d {
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.mp-integration-card-3d::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -25%;
  width: 55%;
  height: 120%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.35) 50%, transparent 58%);
  transform: rotate(14deg);
  pointer-events: none;
}
.mp-integration-card-3d:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}
.settings-panel-3d,
.settings-hero-3d {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.settings-panel-3d:hover,
.settings-hero-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}
.settings-page-wide.referral-page {
  max-width: min(960px, calc(100vw - 40px));
}
.referral-steps.billing-aside-glass {
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.referral-kpi-card.billing-stat-glass {
  flex-direction: column;
  align-items: flex-start;
}
.settings-panel-card.billing-aside-glass {
  padding: 16px 18px;
}
.billing-tier-3d .billing-tier-name { color: var(--tier-accent, #1e1b4b); }
.billing-tier-3d .billing-tier-price {
  background: linear-gradient(135deg, var(--tier-accent, #5b21b6), #1e1b4b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.billing-tier-3d.is-current {
  outline: 2px solid var(--tier-accent, #059669);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--tier-accent, #059669) 18%, transparent),
    0 14px 32px var(--tier-glow, rgba(5, 150, 105, 0.15));
}
.billing-tier-3d.is-featured {
  border-color: rgba(124, 58, 237, 0.45);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(237, 233, 254, 0.55) 45%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 0 32px rgba(124, 58, 237, 0.18),
    0 18px 40px rgba(124, 58, 237, 0.14);
  animation: billing-pro-pulse 4s ease-in-out infinite;
}
@keyframes billing-pro-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2), 0 0 28px rgba(124, 58, 237, 0.14), 0 18px 40px rgba(124, 58, 237, 0.12); }
  50% { box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35), 0 0 40px rgba(124, 58, 237, 0.22), 0 22px 48px rgba(124, 58, 237, 0.16); }
}
.billing-tier-3d.is-blocked {
  opacity: 0.72;
  filter: saturate(0.85);
}
.billing-tier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 8px;
}
.billing-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #334155;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.billing-chip i { font-style: normal; font-size: 0.72rem; }
.billing-chip-yes {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}
.billing-chip-muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}
.billing-btn-glow {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.billing-btn-glow:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.42);
}
.billing-stat {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface, #fff);
  min-width: 0;
}
.billing-stat-primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), var(--dash-surface) 70%);
}
.billing-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin-bottom: 4px;
}
.billing-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e1b4b;
  line-height: 1.15;
}
.billing-stat-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--dash-muted);
  line-height: 1.3;
}
.billing-ai-bar-compact { margin-top: 6px; height: 4px; }
.billing-aside { display: grid; gap: 10px; align-content: start; }
.billing-aside-card { padding: 12px 14px; }
.billing-aside-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.billing-promo-form-stack {
  display: grid;
  gap: 8px;
}
.billing-promo-form-stack input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
}
.billing-promo-form-stack .dash-btn { width: 100%; }
.billing-payments-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.billing-payments-mini li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--dash-muted);
  align-items: center;
}
.billing-payments-mini strong {
  color: #1e1b4b;
  font-size: 0.75rem;
}
.billing-aside-hint {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--dash-border);
  background: rgba(99, 102, 241, 0.04);
  font-size: 0.72rem;
  color: var(--dash-muted);
  line-height: 1.45;
}
.billing-aside-hint p { margin: 0 0 6px; }
.billing-aside-hint p:last-child { margin-bottom: 0; }
.billing-aside-hint a { color: var(--dash-accent, #6366f1); }
.billing-tiers-compact .billing-tier-card {
  padding: 12px 11px 11px;
  gap: 5px;
  border-radius: 14px;
}
.billing-tiers-compact .billing-tier-card.is-featured {
  transform: none;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.14);
}
.billing-tiers-compact .billing-tier-name { font-size: 0.95rem; }
.billing-tiers-compact .billing-tier-price { font-size: 1.25rem; margin: 0; }
.billing-tiers-compact .billing-tier-revenue {
  font-size: 0.68rem;
  margin: 0;
  line-height: 1.25;
}
.billing-tier-features-compact {
  margin: 4px 0 6px;
  gap: 2px;
  font-size: 0.72rem;
}
.billing-tier-yes { color: #047857; font-weight: 600; }
.billing-tiers-compact .billing-tier-badge {
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  font-size: 0.55rem;
}
.billing-tiers-compact .billing-tier-block {
  font-size: 0.62rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.billing-tiers-compact .billing-tier-current,
.billing-tiers-compact .billing-buy-btn {
  font-size: 0.78rem;
  padding: 7px 10px;
}
.topbar-compact { margin-bottom: 0; }
.topbar-compact h1 { font-size: 1.25rem; }
.topbar-compact .subtitle { font-size: 0.75rem; margin-top: 2px; }
.billing-summary-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}
.billing-metric-card { padding: 16px 18px; }
.billing-metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin: 0 0 6px;
}
.billing-metric-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e1b4b;
  line-height: 1.2;
}
.billing-metric-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.billing-ai-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  margin-top: 10px;
  overflow: hidden;
}
.billing-ai-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}
.billing-tiers-head { margin-top: 12px; margin-bottom: 2px; }
.billing-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.billing-tiers-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.settings-alert-warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
}
.billing-tier-card {
  position: relative;
  padding: 18px 16px 16px;
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--dash-surface, #fff);
}
.billing-tier-card.is-featured {
  border-color: #7c3aed;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.16);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06), #fff 120px);
}
.billing-tier-card.is-current {
  outline: 2px solid rgba(5, 150, 105, 0.35);
}
.billing-tier-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.billing-tier-badge-rec {
  background: #0f766e;
}
.billing-tier-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.billing-tier-3d .billing-tier-badge-row {
  position: static;
  align-self: flex-start;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-transform: none;
  font-size: 0.58rem;
  letter-spacing: 0.01em;
  padding: 3px 8px;
}
.billing-tier-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e1b4b;
}
.billing-tier-revenue {
  margin: 0;
  font-size: 0.76rem;
  color: #6d28d9;
  font-weight: 600;
}
.billing-tier-price {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.billing-tier-price span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dash-muted);
}
.billing-tier-perday {
  margin: -2px 0 0;
  font-size: 0.72rem;
  color: #7c3aed;
  font-weight: 700;
}
.billing-tier-features {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--dash-text, #0f172a);
  flex: 1;
}
.billing-tier-features li.is-muted { color: var(--dash-muted); }
.billing-tier-features strong { color: #5b21b6; }
.billing-tier-current {
  margin-top: auto;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  font-size: 0.8rem;
  font-weight: 700;
}
.billing-tier-block {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: #b45309;
  line-height: 1.3;
}
.billing-buy-btn { width: 100%; margin-top: auto; }
.billing-buy-btn.is-blocked { opacity: 0.55; }
.billing-compare-card { margin-top: 4px; }
.billing-compare-table th.is-featured-col,
.billing-compare-table td.is-featured-col {
  background: rgba(124, 58, 237, 0.06);
  font-weight: 700;
}
@media (max-width: 1200px) {
  .billing-layout { grid-template-columns: 1fr; }
  .billing-aside { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 960px) {
  .billing-stats-strip { grid-template-columns: 1fr; }
  .billing-tiers-grid,
  .billing-tiers-grid-4,
  .billing-tiers-promo-row { grid-template-columns: 1fr; }
  .billing-tier-card.is-featured { transform: none; }
}

.settings-hero-referral { background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(168, 85, 247, 0.06) 45%, var(--dash-surface) 100%); }
.settings-hero-referral-v2 { border-color: rgba(124, 58, 237, 0.18); }
.settings-hero-icon-ref {
  color: #7c3aed;
  font-weight: 800;
  font-size: 1.5rem;
}
.settings-page-wide { max-width: 860px; }
.referral-page { gap: 14px; }

.referral-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 14px 16px;
}
.referral-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}
.referral-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.12);
  flex-shrink: 0;
}
.referral-step strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
}
.referral-step p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dash-muted);
  line-height: 1.35;
}
.referral-step-arrow {
  display: grid;
  place-items: center;
  color: var(--dash-muted);
  font-size: 1rem;
  padding-top: 4px;
}

.referral-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.referral-kpi-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.referral-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.referral-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.referral-kpi-ok { color: #059669; }
.referral-kpi-accent { color: #7c3aed; }

.referral-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.referral-tg-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.referral-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--dash-border);
}
.referral-code-chip {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

.referral-status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}
.referral-status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
.referral-status-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.referral-empty-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--dash-muted);
  line-height: 1.45;
}

.referral-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.referral-history-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.1);
  font-size: 0.85rem;
}
.referral-history-date {
  font-weight: 700;
  color: #7c3aed;
  min-width: 72px;
}

@media (max-width: 760px) {
  .referral-steps {
    grid-template-columns: 1fr;
  }
  .referral-step-arrow { display: none; }
  .referral-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.referral-copy-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.referral-link-input { flex: 1; min-width: 200px; }
.referral-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.referral-stat-pill {
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--dash-surface-2);
  min-width: 120px;
}
.referral-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--dash-muted);
  margin-bottom: 4px;
}
.referral-stat-pill strong { font-size: 1.1rem; }

.billing-card { max-width: 920px; }
.billing-current { margin-bottom: 18px; }
.billing-plan-name { font-size: 1.1rem; font-weight: 650; margin: 0; }
.billing-status { font-size: 0.82rem; color: var(--dash-muted); font-weight: 500; }
.billing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.billing-plan-card {
  padding: 16px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-surface, #fff);
}
.billing-plan-card h3 { margin: 0 0 6px; font-size: 0.92rem; }
.billing-price { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; color: var(--dash-accent, #6366f1); }
.billing-plan-card ul { margin: 0 0 12px; padding-left: 18px; font-size: 0.76rem; color: var(--dash-muted); }
.billing-current-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #059669;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
}
.billing-history-title { font-size: 0.88rem; margin: 0 0 10px; }

.ads-sync-log {
  margin: 8px 0 0;
  max-height: 160px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.06);
  font-size: 0.65rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ads-sync-log.hidden { display: none; }

/* —— Cluster modals & drawer —— */
.adc-modal-open { overflow: hidden; }
.adc-modal-overlay,
.adc-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.adc-drawer-overlay { justify-content: flex-end; padding: 0; }
.adc-modal-overlay.hidden,
.adc-drawer-overlay.hidden { display: none; }
.adc-modal {
  width: min(600px, 100%);
  max-height: min(92vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--dash-card, #fff);
  border: 1px solid var(--dash-border, #e2e8f0);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}
.adc-cluster-strategy-modal { width: min(640px, 100%); }
.adc-strategy-hero {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 10px 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(124, 58, 237, 0.06) 45%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}
.adc-strategy-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.adc-strategy-hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
.adc-strategy-hero-icon svg { width: 22px; height: 22px; }
.adc-strategy-status {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.adc-strategy-status.is-on {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.adc-strategy-status.is-off {
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.15);
}
.adc-strategy-close { grid-column: 3; grid-row: 1; }
.adc-strategy-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 18px 0;
}
.adc-strategy-kpi-card {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--dash-border, #e2e8f0);
}
.adc-strategy-kpi-card span { display: block; font-size: 0.62rem; color: var(--dash-muted); margin-bottom: 2px; }
.adc-strategy-kpi-card strong { font-size: 0.78rem; font-weight: 700; color: #334155; }
.adc-strategy-body { padding-top: 10px !important; }
.adc-strategy-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: #fff;
  margin-bottom: 10px;
}
.adc-strategy-card-accent {
  border-color: rgba(99, 102, 241, 0.22);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, #fff 100%);
}
.adc-strategy-foot { background: rgba(248, 250, 252, 0.9); }
.adc-strategy-save-btn { min-width: 160px; }
.adc-mode-cards { display: flex; flex-direction: column; gap: 8px; }
.adc-mode-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border, #e2e8f0);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.adc-mode-card.is-active {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.07);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.08);
}
.adc-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.adc-mode-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
}
.adc-mode-card strong { display: block; font-size: 0.82rem; }
.adc-mode-card span { display: block; font-size: 0.72rem; color: var(--dash-muted); margin-top: 2px; }
.adc-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}
.adc-switch-row strong { display: block; font-size: 0.84rem; }
.adc-switch-row .adc-muted { display: block; margin-top: 2px; font-size: 0.72rem; }
.adc-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.adc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.adc-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s;
  position: relative;
}
.adc-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s;
}
.adc-switch input:checked + .adc-switch-track {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}
.adc-switch input:checked + .adc-switch-track::after { transform: translateX(20px); }
.adc-strat-pos-min-wrap.hidden { display: none; }
.adc-strat-pos-hint { margin: 0 0 10px; font-size: 0.72rem; }
.adc-wb-hint { margin: 0 0 8px; }
.adc-wb-bid-card.adc-wb-bid-pick {
  border: 1px solid rgba(99, 102, 241, 0.15);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  font: inherit;
  width: 100%;
}
.adc-wb-bid-card.adc-wb-bid-pick:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.adc-field-flash {
  animation: adc-field-flash 0.6s ease;
}
@keyframes adc-field-flash {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35); }
}
@media (max-width: 640px) {
  .adc-strategy-kpi { grid-template-columns: repeat(2, 1fr); }
  .adc-strategy-hero { grid-template-columns: 1fr auto; }
  .adc-strategy-status { grid-column: 1 / -1; justify-self: start; }
}
.adc-drawer {
  width: min(480px, 100vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dash-card, #fff);
  border-left: 1px solid var(--dash-border, #e2e8f0);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
}
.adc-modal-head,
.adc-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--dash-border, #e2e8f0);
}
.adc-modal-title,
.adc-drawer-title { font-size: 0.95rem; font-weight: 700; }
.adc-modal-sub,
.adc-drawer-sub { margin: 4px 0 0; font-size: 0.74rem; color: var(--dash-muted); line-height: 1.35; }
.adc-modal-close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--dash-muted);
}
.adc-modal-close:hover { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.adc-modal-body,
.adc-drawer-body {
  padding: 14px 18px;
  overflow: auto;
  flex: 1;
}
.adc-modal-foot,
.adc-drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--dash-border, #e2e8f0);
}
.adc-strategy-section + .adc-strategy-section { margin-top: 14px; }
.adc-section-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}
.adc-strategy-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.adc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--dash-muted);
}
.adc-field input,
.adc-field select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  font-size: 0.82rem;
}
.adc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}
.adc-radio-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border, #e2e8f0);
  cursor: pointer;
  margin-bottom: 8px;
}
.adc-radio-card.is-active {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
}
.adc-radio-card strong { display: block; font-size: 0.82rem; }
.adc-radio-card span { display: block; font-size: 0.72rem; color: var(--dash-muted); margin-top: 2px; }
.adc-wb-bids-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.adc-wb-bid-card {
  padding: 10px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  text-align: center;
}
.adc-wb-bid-pos { display: block; font-size: 0.68rem; color: var(--dash-muted); }
.adc-wb-bid-card strong { font-size: 0.82rem; color: #4338ca; }
.adc-muted { font-size: 0.72rem; color: var(--dash-muted); margin: 0; }
.adc-schedule-hint { margin-top: 6px; }
.adc-schedule-fields.is-disabled { opacity: 0.45; pointer-events: none; }
.adc-metric-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; align-items: center; justify-content: center; }
.adc-metric-stack.adc-metric-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 3px 5px;
  max-width: 100%;
}
.adc-metric-delta-row { min-height: 0.85em; }
.adc-metric-delta {
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.08);
}
.adc-metric-inline .adc-metric-delta { font-size: 0.56rem; }
.adc-metric-delta.is-up { color: #047857; background: rgba(5, 150, 105, 0.1); }
.adc-metric-delta.is-down { color: #b91c1c; background: rgba(220, 38, 38, 0.08); }
.adc-metric-delta.is-flat { color: var(--dash-muted); background: rgba(100, 116, 139, 0.06); }
.adc-cluster-actions { display: flex; gap: 0; justify-content: center; width: 100%; }
.adc-cluster-action {
  position: relative;
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
}
.adc-cluster-action.is-bidder-on {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.adc-gear-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
  pointer-events: none;
}
.adc-cluster-action:hover { background: rgba(99, 102, 241, 0.2); }
.adc-cluster-action.is-bidder-on:hover { background: rgba(16, 185, 129, 0.2); }
.adc-clusters-table .query-cell.adc-cluster-open-auction {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.35);
  text-underline-offset: 2px;
}
.adc-clusters-table .query-cell.adc-cluster-open-auction:hover { color: #4f46e5; }
.adc-schedule-mark { font-size: 0.62rem; margin-right: 2px; }
.adc-best-ctr { font-size: 0.68rem; font-weight: 600; color: #5b21b6; }
.adc-auction-kpi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.adc-auction-kpi-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--dash-border, #e2e8f0);
}
.adc-auction-kpi-card span { display: block; font-size: 0.68rem; color: var(--dash-muted); }
.adc-auction-kpi-card strong { font-size: 0.92rem; }
.adc-drawer-section { margin-bottom: 16px; }
.adc-drawer-section h4 { margin: 0 0 6px; font-size: 0.78rem; }
.adc-series-mini {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
  padding: 4px 0;
}
.adc-series-bar {
  flex: 1;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #818cf8, #6366f1);
}
.adc-err { color: #dc2626; font-size: 0.8rem; }

/* —— Compact strategy modal —— */
.adc-strat-compact.adc-cluster-strategy-modal {
  width: min(520px, 96vw);
  max-height: none;
}
.adc-strategy-hero-compact {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 10px 14px;
  gap: 8px 10px;
}
.adc-strategy-hero-compact .adc-strategy-hero-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.adc-strategy-hero-compact .adc-strategy-hero-icon svg { width: 18px; height: 18px; }
.adc-strategy-hero-text { min-width: 0; }
.adc-strategy-hero-compact .adc-modal-title { font-size: 0.88rem; }
.adc-strategy-hero-compact .adc-modal-sub {
  font-size: 0.68rem;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.adc-strategy-hero-kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.adc-strat-kpi-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.15);
  line-height: 1.1;
}
.adc-strat-kpi-chip b { font-size: 0.72rem; color: #334155; }
.adc-strat-kpi-chip i {
  font-style: normal;
  font-size: 0.56rem;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.adc-strat-compact .adc-strategy-body {
  padding: 10px 14px !important;
  overflow: visible;
}
.adc-strat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 230px);
  gap: 12px;
  align-items: start;
}
.adc-strat-main,
.adc-strat-side {
  min-width: 0;
}
.adc-strat-block { margin-bottom: 8px; }
.adc-strat-block:last-child { margin-bottom: 0; }
.adc-strat-block .adc-section-label {
  margin: 0 0 5px;
  font-size: 0.64rem;
}
.adc-strat-metrics {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.adc-strat-enable-row {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
}
.adc-mode-pills { display: flex; gap: 6px; }
.adc-strat-simple { display: flex; flex-direction: column; gap: 10px; }
.adc-strat-summary {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  font-size: 0.72rem;
  line-height: 1.45;
  color: #334155;
}
.adc-mode-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  transition: border-color 0.12s, background 0.12s;
}
.adc-mode-pill small {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--dash-muted);
}
.adc-strat-budget-block {
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: rgba(15, 23, 42, 0.02);
  overflow: hidden;
}
.adc-strat-budget-block .adc-strat-budget-row {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.adc-strat-budget-body {
  padding: 0 10px 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.adc-strat-budget-body.is-off {
  display: none;
}
.adc-strat-budget-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.adc-strat-fallback-block {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: rgba(15, 23, 42, 0.02);
}
.adc-strat-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: rgba(15, 23, 42, 0.02);
  cursor: pointer;
}
.adc-strat-budget-row span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adc-strat-budget-row small {
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--dash-muted);
  line-height: 1.3;
}
.adc-strat-stats,
.adc-wb-hint,
.adc-wb-empty {
  margin: 8px 0;
  font-size: 0.66rem;
  line-height: 1.4;
}
.adc-strat-budget-body .adc-strat-stats {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.04);
}
.adc-field-hint {
  font-size: 0.6rem;
  line-height: 1.35;
  color: var(--dash-muted);
  font-weight: 400;
}
.adc-field-hint b { font-weight: 600; color: #64748b; }
.adc-wb-empty strong { color: #475569; }
.adc-wb-bid-card.adc-wb-bid-pick {
  cursor: pointer;
}
.adc-wb-bid-card.adc-wb-bid-pick:active {
  transform: scale(0.98);
}
.adc-field-flash {
  animation: adc-field-flash 0.6s ease;
}
@keyframes adc-field-flash {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45); }
}
.adc-strat-wb-block .adc-wb-bids-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.adc-mode-pill input { position: absolute; opacity: 0; pointer-events: none; }
.adc-mode-pill.is-active {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
}
.adc-strat-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.adc-strat-fields-grid .adc-field span { font-size: 0.62rem; }
.adc-strat-fields-grid .adc-field input {
  padding: 5px 6px;
  font-size: 0.78rem;
}
.adc-strat-fallback-field select { font-size: 0.74rem; padding: 6px 8px; width: 100%; }
.adc-switch-sm .adc-switch-track { width: 36px; height: 20px; }
.adc-switch-sm .adc-switch-track::after { width: 14px; height: 14px; top: 3px; left: 3px; }
.adc-switch-sm input:checked + .adc-switch-track::after { transform: translateX(16px); }
.adc-strat-compact .adc-strategy-foot {
  padding: 8px 14px 12px;
}
.adc-strat-pos-min-wrap.hidden { display: none; }
@media (max-width: 520px) {
  .adc-strat-fields-grid { grid-template-columns: repeat(2, 1fr); }
  .adc-strat-budget-fields { grid-template-columns: 1fr; }
  .adc-strat-wb-block .adc-wb-bids-grid { grid-template-columns: 1fr; }
}

.adc-strategy-tabs {
  display: flex;
  gap: 2px;
  padding: 0 14px;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-surface);
}
.adc-strategy-tab {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dash-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.adc-strategy-tab.is-active {
  color: var(--dash-primary);
  border-bottom-color: var(--dash-primary);
}
.adc-strat-tab-panel.hidden { display: none; }
.adc-sched-compact {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #334155;
  gap: 8px !important;
}
.adc-sched-lead {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
}
.adc-sched-toggles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adc-sched-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  margin: 0;
}
.adc-sched-toggle-nest {
  margin-left: 8px;
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.04);
}
.adc-sched-toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  padding-right: 6px;
}
.adc-sched-toggle-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  white-space: normal;
}
.adc-sched-tip {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  line-height: 14px;
  text-align: center;
  cursor: help;
  user-select: none;
}
.adc-sched-tip:hover,
.adc-sched-tip:focus {
  border-color: #818cf8;
  color: #4f46e5;
  background: #eef2ff;
  outline: none;
}
.adc-sched-float-tip {
  position: fixed;
  z-index: 10050;
  max-width: min(300px, calc(100vw - 24px));
  padding: 9px 11px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  pointer-events: none;
}
.adc-sched-intersect-wrap { margin: 0; padding: 0; background: none; border: none; }
.adc-sched-intersect-wrap.is-disabled .adc-switch { opacity: 0.45; pointer-events: none; }
.adc-sched-toggle.is-disabled { opacity: 0.85; }
.adc-sched-intersect-hint {
  margin: 2px 0 0 12px;
  padding-left: 8px;
  font-size: 0.68rem;
  line-height: 1.35;
  border-left: 2px solid #e2e8f0;
}
.adc-sched-offhours { margin: 0; }
.adc-sched-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}
.adc-sched-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}
.adc-sched-select {
  flex: 1;
  max-width: 200px;
  font-size: 0.75rem;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}
.adc-sched-status-box {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.adc-sched-status {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #475569;
}
.adc-sched-grid-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.adc-sched-grid-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adc-sched-hint { font-size: 0.75rem; line-height: 1.4; margin: 0; }
.adc-sched-grid-wrap { overflow-x: auto; padding: 2px 0; }
.adc-sched-grid {
  display: grid;
  grid-template-columns: 28px repeat(24, minmax(13px, 1fr));
  gap: 2px;
  min-width: 400px;
}
.adc-sched-corner { grid-column: 1; }
.adc-sched-col-head,
.adc-sched-row-head {
  border: none;
  background: transparent;
  font-size: 0.62rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  padding: 1px;
  line-height: 1.1;
}
.adc-sched-row-head { text-align: left; font-weight: 600; color: #64748b; }
.adc-sched-col-head:hover,
.adc-sched-row-head:hover { color: #334155; }
.adc-sched-cell {
  width: 100%;
  aspect-ratio: 1;
  min-height: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.adc-sched-cell.is-on {
  background: rgba(99, 102, 241, 0.85);
  border-color: rgba(79, 70, 229, 0.6);
}
.adc-sched-cell:hover { border-color: #94a3b8; }
.adc-sched-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.adc-sched-preset {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}
.adc-sched-preset.is-active {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.45);
  color: #4338ca;
  font-weight: 600;
}
.adc-sched-panel .adc-strat-summary { margin-top: 0; }
.adc-sched-manual-block.is-muted { opacity: 0.45; pointer-events: none; }
.adc-heatmap-off-hours-wrap.hidden { display: none; }
.adc-strat-off-hours-field select { width: 100%; max-width: 320px; }
.adc-sched-intervals-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.adc-sched-intervals-list.hidden { display: none; }
.adc-sched-interval {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}
.adc-sched-interval strong { font-weight: 600; margin-right: 4px; }
.adc-sched-interval-muted { color: #94a3b8; }
.adc-sched-intervals-box,
.adc-sched-intervals-head,
.adc-sched-interval-note,
.adc-sched-summary-line { display: none; }
@media (max-width: 900px) {
  .adc-heat-split { grid-template-columns: 1fr; }
  .adc-heat-intervals-box { min-height: 120px; }
}

/* —— Виджет поддержки (как shop-picker) —— */
.support-widget {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1200;
  font-family: inherit;
}
.support-widget.hidden { display: none !important; }
.support-widget-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: var(--dash-surface, #fff);
  cursor: pointer;
  color: #334155;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.support-widget-trigger.hidden { display: none !important; }
.support-widget-trigger:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.1);
}
.support-widget-trigger-icon { color: #7c3aed; flex-shrink: 0; }
.support-widget-trigger-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.support-widget-chevron {
  font-size: 9px;
  color: #94a3b8;
  flex-shrink: 0;
  line-height: 1;
}
.support-widget-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  cursor: pointer;
  color: #7c3aed;
  background: var(--dash-surface, #fff);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.support-widget-restore.hidden { display: none !important; }
.support-widget-restore:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.1);
}
.support-widget-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  width: 220px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--dash-border, #e2e8f0);
  background: var(--dash-surface, #fff);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.support-widget-panel.hidden { display: none !important; }
.support-widget-list { padding: 2px; }
.support-widget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #334155;
  transition: background 0.12s ease;
}
.support-widget-row.hidden { display: none !important; }
.support-widget-row:hover { background: rgba(124, 58, 237, 0.06); }
.support-widget-row-icon {
  flex-shrink: 0;
  color: #7c3aed;
}
.support-widget-foot {
  border-top: 1px solid var(--dash-border, #e2e8f0);
  padding: 4px 6px 2px;
  text-align: right;
}
.support-widget-dismiss {
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
}
.support-widget-dismiss:hover { color: #7c3aed; }
