/*
 * Заголовок не должен определять ширину столбца сильнее, чем его данные.
 * Перенос применяем только к th: значения в строках остаются компактными и
 * не распадаются на несколько строк.
 */
.table-scroll table th,
.admin-users-table th {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  line-height: 1.24;
  vertical-align: middle;
}

/* Для числовых и коротких значений ширину задаёт содержимое, а не заголовок. */
.table-scroll table th:not(:first-child) {
  width: 1%;
}

.table-scroll table td {
  white-space: nowrap;
}

/* Оборачиваемость: заголовок состоит из кнопки сортировки, поэтому перенос
 * нужен её текстовой части, а стрелка и инструменты остаются на месте. */
.turnover-sort {
  align-items: flex-start;
  max-width: calc(100% - 51px);
  min-width: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1.2;
  text-align: left;
}

.turnover-sort-label {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.turnover-sort-direction {
  flex: 0 0 auto;
}

/* Таблицы, где прежняя минимальная ширина была рассчитана по заголовкам. */
.seasonality-table { min-width: 900px; }
.settings-tracking-table { min-width: 960px; }
.funnels-table { min-width: 1470px; }
.funnel-plan-table { min-width: 800px; }

.funnels-table th:nth-child(1), .funnels-table td:nth-child(1) { min-width: 235px; }
.funnels-table th:nth-child(2), .funnels-table td:nth-child(2) { min-width: 96px; }
.funnels-table th:nth-child(3), .funnels-table td:nth-child(3) { min-width: 108px; }
.funnels-table th:nth-child(4), .funnels-table td:nth-child(4) { min-width: 82px; }
.funnels-table th:nth-child(5), .funnels-table td:nth-child(5) { min-width: 145px; }
.funnels-table th:nth-child(6), .funnels-table td:nth-child(6) { min-width: 175px; }
.funnels-table th:nth-child(7), .funnels-table td:nth-child(7) { min-width: 96px; }
.funnels-table th:nth-child(8), .funnels-table td:nth-child(8) { min-width: 105px; }
.funnels-table th:nth-child(9), .funnels-table td:nth-child(9) { min-width: 115px; }
.funnels-table th:nth-child(10), .funnels-table td:nth-child(10) { min-width: 105px; }
.funnels-table th:nth-child(11), .funnels-table td:nth-child(11) { min-width: 120px; }
.funnels-table th:nth-child(12), .funnels-table td:nth-child(12) { min-width: 80px; }

.financial-table { min-width: 1880px; }
.financial-table th:nth-child(n + 4),
.financial-table td:nth-child(n + 4) { min-width: 118px; }

.product-economics-table { min-width: 2160px; }
.abc-table { min-width: 1380px; }
.geography-table { min-width: 920px; }
.cabinet-dashboard-table { min-width: 1120px; }
.cost-table { min-width: 1080px; }

@media (max-width: 700px) {
  .table-scroll table th { line-height: 1.2; }
}
