
.station-analytics {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.station-analytics__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.station-analytics__header h2 {
  margin: 0 0 8px;
}

.station-analytics__header p {
  margin: 0;
  color: #64748b;
}

.station-analytics__filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.station-analytics__filter select {
  padding: 8px 12px;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  background: #fff;
  color: #172b4d;
}

.station-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.station-kpi {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  background: #fff;
}

.station-kpi__label {
  color: #64748b;
  font-size: 13px;
}

.station-kpi__value {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.station-analytics__section {
  padding: 22px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  background: #fff;
}

.station-analytics__section h3 {
  margin: 0 0 20px;
  font-size: 19px;
}

.station-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.station-chart__row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 75px;
  align-items: center;
  gap: 12px;
}

.station-chart__month {
  font-size: 13px;
  color: #475569;
}

.station-chart__track {
  height: 14px;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
}

.station-chart__bar {
  height: 100%;
  border-radius: 4px;
  background: var(--color-accent, #e8641a);
}

.station-chart__value {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}


/* Таблицы аналитики станций — стиль Щебень.рус */

.station-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.station-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text);
}

.station-table thead th {
  padding: 11px 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  vertical-align: middle;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.station-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.station-table tbody tr:last-child td {
  border-bottom: none;
}

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

/* Числовые столбцы */

.station-table th:nth-last-child(-n + 2),
.station-table td:nth-last-child(-n + 2) {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ОКПО и коды ЕСР */

.station-table__code {
  white-space: nowrap;
  overflow-wrap: normal !important;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Наименования организаций и станций */

.station-table td a {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.station-table td a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* Клавиатурная навигация */

.station-table td a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .station-table {
    min-width: 620px;
  }

  .station-table thead th,
  .station-table tbody td {
    padding: 10px 12px;
  }
}


.station-analytics__note {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 767px) {
  .station-kpis {
    grid-template-columns: 1fr;
  }

  .station-analytics__section {
    padding: 16px;
  }

  .station-chart__row {
    grid-template-columns: 75px minmax(0, 1fr) 65px;
    gap: 8px;
  }

}
/* Щебень.рус — фирменное оформление аналитики */

.station-kpi {
  border-color: var(--color-border, #e3e9f0);
  border-top: 3px solid var(--color-accent, #e8641a);
}

.station-kpi__value {
  color: var(--color-text, #242424);
}

.station-kpi__label,
.station-analytics__note {
  color: var(--color-text-muted, #64748b);
}

.station-analytics__section {
  border-color: var(--color-border, #e3e9f0);
}

.station-analytics__section h3 {
  color: var(--color-text, #242424);
}

.station-table a {
  color: var(--color-accent, #e8641a);
  text-decoration: none;
}

.station-table a:hover {
  color: var(--color-accent-dark, #c45113);
  text-decoration: underline;
}

.station-analytics__filter select:focus {
  border-color: var(--color-accent, #e8641a);
  outline: 2px solid var(--color-accent, #e8641a);
  outline-offset: 2px;
}
/* KPI: показатель временно недоступен */

.station-kpi--unavailable {
  border-top-color: var(--color-border);
  background: var(--color-surface);
}

.station-kpi__status {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
}

/* ==========================================
   Станция — вкладка «Организации»
   ========================================== */

.station-organizations {
  width: 100%;
  min-width: 0;
}

.station-organizations__header {
  margin-bottom: 24px;
}

.station-organizations__header h2 {
  margin: 0 0 8px;
}

.station-organizations__header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* Переключатель */

.station-organizations__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.station-organizations__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.station-organizations__tab:hover {
  color: #111827;
}

.station-organizations__tab.is-active {
  color: #e8641a;
  border-bottom-color: #e8641a;
  font-weight: 600;
}

.station-organizations__tab:focus-visible {
  outline: 2px solid #e8641a;
  outline-offset: 3px;
}

.station-organizations__count {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.station-organizations__tab.is-active
.station-organizations__count {
  background: #fff0e6;
  color: #e8641a;
}

/* Поиск */

.station-organizations__search {
  margin-bottom: 20px;
}

.station-organizations__search label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.station-organizations__search input {
  display: block;
  width: 100%;
  max-width: 440px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.station-organizations__search input:focus {
  border-color: #e8641a;
  box-shadow: 0 0 0 3px rgba(232, 100, 26, 0.12);
}

/* Список организаций */

.station-organizations__list {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.station-organizations__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
}

.station-organizations__item:last-child {
  border-bottom: 0;
}

.station-organizations__item:hover {
  background: #f5f3f0;
}

.station-organizations__info {
  flex: 1;
  min-width: 0;
}

.station-organizations__name {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.station-organizations__name a {
  color: #e8641a;
  text-decoration: none;
}

.station-organizations__name a:hover {
  text-decoration: underline;
}

.station-organizations__okpo {
  display: block;
  font-size: 12px;
  color: #9ca3af;
}

.station-organizations__volume {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 3px;
  white-space: nowrap;
}

.station-organizations__volume strong {
  color: #e87924;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.station-organizations__volume span {
  font-size: 12px;
  color: #9ca3af;
}

/* Пустые состояния и кнопка */

.station-organizations__empty,
.station-organizations__no-results {
  padding: 24px 16px;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.station-organizations__more {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #e8641a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.station-organizations__more:hover {
  background: #f5f3f0;
}

/* Скрытые элементы */

.station-organizations [hidden] {
  display: none !important;
}

/* Мобильная версия */

@media (max-width: 600px) {
  .station-organizations__tabs {
    gap: 0;
  }

  .station-organizations__tab {
    flex: 1;
    gap: 5px;
    padding: 12px 7px;
    font-size: 12px;
  }

  .station-organizations__count {
    padding: 2px 5px;
    font-size: 11px;
  }

  .station-organizations__search input {
    max-width: none;
  }

  .station-organizations__item {
    gap: 12px;
    padding: 13px 12px;
  }

  .station-organizations__name {
    font-size: 13px;
  }

  .station-organizations__volume strong {
    font-size: 13px;
  }
}
.station-organizations__columns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 10px;
  padding: 0 12px;
  color: #84909d;
  font-size: 12px;
}

.station-organizations__columns span:last-child {
  text-align: right;
  white-space: nowrap;
}
/* Количество организаций */

.station-organizations__summary {
  margin: 0 0 12px;
  color: #84909d;
  font-size: 13px;
  font-weight: 500;
}
/* Маскировка платных данных станции */

.station-paywall {
  position: relative;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.station-paywall__preview {
  display: grid;
  gap: 14px;
  filter: blur(5px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
}

.station-paywall__preview-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e9ef;
}

.station-paywall__preview-name,
.station-paywall__preview-value {
  color: #718096;
  font-size: 14px;
}

.station-paywall__message {
  position: relative;
  z-index: 1;
  margin: -85px auto 0;
  padding: 24px;
  max-width: 480px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 30px rgb(0 0 0 / 8%);
}

.station-paywall__message h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.station-paywall__message p {
  margin: 0 0 20px;
  line-height: 1.6;
}

.station-paywall__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 575px) {
  .station-paywall {
    padding: 14px;
  }

  .station-paywall__message {
    padding: 20px 14px;
  }
}