.analiz-table {
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 18px;
  width: auto; /* вместо 100% */
  table-layout: auto; /* разрешаем браузеру подгонять ширину */
  margin: 0 auto; /* выравнивание по центру */
}
.analiz-table th,
.analiz-table td {
  border: 1px solid #ccc;
  padding: 0px 10px;
  text-align: right;
}

/* Общий стиль заголовков */
.analiz-table th {
  text-align: center;
  color: #000;
  font-weight: bold;
}

/* Заголовки групп */
.th-total  { background-color: #e0e0e0; }  /* серый */
.th-overpay { background-color: #f5d6d6; } /* светло-красный */
.th-debtor  { background-color: #d6e5f5; } /* светло-синий */

/* Для верхнего ряда заголовков — немного темнее, чтобы было видно границу секций */
.analiz-table thead tr:first-child .th-total  { background-color: #d0d0d0; }
.analiz-table thead tr:first-child .th-overpay { background-color: #f0bcbc; }
.analiz-table thead tr:first-child .th-debtor  { background-color: #bcd0f0; }

/* Данные */
.td-total  { background-color: #fafafa; }
.td-overpay { background-color: #fff0f0; }  /* светло-красный */
.td-debtor  { background-color: #f0f8ff; }  /* светло-синий */

/* Итоговые строки */
.analiz-table td.summary-total,
.analiz-table td.summary-overpay,
.analiz-table td.summary-debtor {
  padding: 10px 10px;
  font-weight: bold;
}

.summary-total  { background-color: #e0e0e0; } /* серый */
.summary-overpay { background-color: #f5d6d6; } /* тёмно-красный */
.summary-debtor  { background-color: #c8dbf0; } /* синий */

/* Верхняя итоговая строка выделение */
.top-summary td { border-top: 2px solid #000; }

/* Нижняя итоговая строка выделение */
.bottom-summary td { border-top: 2px solid #000; }

/* Отступ между верхней итоговой строкой и остальными */
.spacer td { border: none; background: transparent; height: 10px; }

/* Надпись над ползунком */
.slider-label {
  text-align: center;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 16px; /* соответствует таблице */
}

/* Ползунок */
input[type=range] {
  width: 100%;
  margin-bottom: 10px;
}

/* Подсветка строки при наведении — с сохранением трёхцветности */
.analiz-table tbody tr:hover .td-total {
  background-color: #dcdcdc; /* немного темнее серого */
}
.analiz-table tbody tr:hover .td-overpay {
  background-color: #f0c8c8; /* ярче красный */
}
.analiz-table tbody tr:hover .td-debtor {
  background-color: #c8dcf0; /* ярче синий */
}
.analiz-table tbody tr:hover td:first-child {
  background-color: #f2f2f2; /* месяц — нейтральный фон */
}
.analiz-table tbody tr:hover td {
  font-weight: bold;
}

/* Строка итого — не подсвечивать как обычную */
.analiz-table .summary-row:hover td {
  background-color: inherit !important;
  font-weight: normal;
  cursor: default;
}

/* ✅ Только верхняя строка итого — курсор вверх-вниз и легкая подсветка */
.analiz-table .top-summary:hover td {
  background-color: #eef !important;
  cursor: ns-resize !important;
/*  font-weight: bold; */
}


@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
