.an-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.an-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.an-checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }

.an-subtitle {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary, #4b5563);
  margin: 18px 0 8px;
}
.an-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

.an-kpi-sub { font-size: 12px; margin-top: 4px; color: var(--text-muted); }
.an-dev--pos { color: #127001; }
.an-dev--neg { color: #cc2b1d; }

.an-dev-title { font-weight: 600; font-size: 12.5px; margin: 6px 0; }
.an-dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .an-dev-grid { grid-template-columns: 1fr; } }

.an-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 12px;
}

/* ── Fixed-width tables ──────────────────────────────────────────────────────
   Table width is decoupled from the card/container: it never grows to fill
   available space and never shrinks column widths to fit content. Columns get
   an explicit px width via <colgroup>, so headers and data cells always line
   up — if the table is wider than its card, the wrapper scrolls horizontally
   instead of squeezing columns. */

.an-tbl-scroll {
  overflow-x: auto;
  margin-bottom: 4px;
}

.an-tbl {
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.an-tbl th {
  position: sticky;
  top: 0;
  background: var(--bg-stripe);
  padding: 9px 12px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-tbl td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.an-tbl tr:last-child td { border-bottom: none; }
.an-tbl tr:hover td { background: var(--bg-hover); }
.an-tbl th.num,
.an-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.an-tbl td.an-col-name { text-align: left; }

.an-empty-cell {
  text-align: center;
  color: var(--text-muted);
  white-space: normal;
}

.an-kpi-tbl td.an-col-name { white-space: normal; line-height: 1.3; }
.an-cell--pos { background: rgba(18, 112, 1, 0.08); }
.an-cell--neg { background: rgba(204, 43, 29, 0.08); }
.an-yoy { font-size: 10.5px; margin-top: 2px; }

/* First ("Показатель") column stays put while the weeks scroll horizontally */
.an-col-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-card);
  box-shadow: 1px 0 0 var(--border);
}
.an-tbl th.an-col-sticky { z-index: 3; background: var(--bg-stripe); }
.an-tbl tr:hover td.an-col-sticky { background: var(--bg-hover); }
