/* Стили для страницы Дэшборды */

/* Основной layout с боковым меню */
.dashboards-layout {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Боковое меню дашборда */
.dashboards-sidebar {
  width: 220px;
  min-width: 220px;
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border-right: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, min-width 0.3s ease;
}

.dashboards-sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.dashboards-sidebar__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--stroke);
}

.dashboards-sidebar__logo {
  font-size: 24px;
}

.dashboards-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  color: #e6f0ff;
  flex: 1;
}

.dashboards-sidebar.collapsed .dashboards-sidebar__title {
  display: none;
}

.dashboards-sidebar__toggle {
  background: transparent;
  border: none;
  color: #9db7d6;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dashboards-sidebar__toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.dashboards-sidebar.collapsed .dashboards-sidebar__toggle svg {
  transform: rotate(180deg);
}

.dashboards-sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboards-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: #9db7d6;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dashboards-sidebar__link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #cfe5ff;
}

.dashboards-sidebar__link--active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
  color: #3b82f6;
  border-left: 3px solid #3b82f6;
  margin-left: -3px;
}

.dashboards-sidebar.collapsed .dashboards-sidebar__link span {
  display: none;
}

.dashboards-sidebar.collapsed .dashboards-sidebar__link {
  justify-content: center;
  padding: 12px 8px;
}

/* Основной контент */
.dashboards-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0a1220, #080e18);
}

/* Заголовок */
.dashboards-title {
  margin-bottom: 20px;
}

.dashboards-title h1 {
  font-size: 22px;
  font-weight: 600;
  color: #e6f0ff;
  margin: 0;
}

/* 5 KPI карточек в ряд */
.dashboards-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  justify-content: space-between;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.kpi-card__label {
  font-size: 11px;
  color: #9db7d6;
  margin-bottom: 16px;
  line-height: 1.5;
  flex-shrink: 0;
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  padding-right: 4px;
}

.kpi-card__value {
  font-size: 26px;
  font-weight: 700;
  color: #e6f0ff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  letter-spacing: -0.3px;
  line-height: 1.15;
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-top: auto;
}

/* 2 колонки с графиками (расширенные) */
.dashboards-charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.chart-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Виджет с графиком */
.chart-widget {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.chart-widget__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #9db7d6;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.chart-widget__title {
  font-size: 14px;
  font-weight: 600;
  color: #e6f0ff;
  text-align: center;
  margin-bottom: 12px;
}

.chart-widget__content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.pie-chart {
  width: 100% !important;
  height: 280px !important;
  max-width: 100%;
}

.pie-chart-large {
  max-width: 500px !important;
  height: 400px !important;
}

/* Метрика */
.metric-box {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.metric-box:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.metric-box__label {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 4px;
}

.metric-box__value {
  font-size: 20px;
  font-weight: 700;
  color: #3b82f6;
}

/* Виджет зарплат */
.dashboards-salary-widget {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.salary-widget__title {
  font-size: 16px;
  font-weight: 600;
  color: #e6f0ff;
  text-align: center;
  margin-bottom: 16px;
}

.salary-widget__content {
  width: 100%;
}

.salary-chart {
  width: 100% !important;
  height: 350px !important;
}

/* Адаптивность */
@media (max-width: 1400px) {
  .dashboards-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboards-charts-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboards-sidebar {
    position: fixed;
    left: -220px;
    top: 64px;
    height: calc(100vh - 64px);
    z-index: 100;
    transition: left 0.3s ease;
  }

  .dashboards-sidebar.open {
    left: 0;
  }

  .dashboards-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboards-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboards-main {
    padding: 12px;
  }

  .dashboards-kpi-row {
    grid-template-columns: 1fr;
  }

  .dashboards-title h1 {
    font-size: 18px;
  }

  .kpi-card__value {
    font-size: 20px;
  }

  .salary-chart {
    height: 250px !important;
  }
}

/* Скрытие старых элементов если они остались */
.dashboards-tabs,
.dashboards-tab-content,
.dashboards-filters {
  display: none !important;
}

/* ========== ПЕРЕКЛЮЧЕНИЕ СТРАНИЦ ========== */
.dashboard-page {
  display: none;
}

.dashboard-page--active {
  display: block;
}

.page-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: #9db7d6;
  font-size: 16px;
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  margin-top: 20px;
}

/* ========== СЕЛЬСКОЕ ХОЗЯЙСТВО ========== */

/* Старые стили фильтров - удалены, используются новые стили ниже */

/* Секция */
.agri-section {
  margin-bottom: 20px;
}

.agri-section__title {
  font-size: 16px;
  font-weight: 600;
  color: #e6f0ff;
  margin-bottom: 12px;
}

.agri-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

/* Секция таблицы */
.agri-table-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.agri-table-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.agri-table-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.agri-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b1626;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 8px 12px;
  color: #9db7d6;
}

.agri-search__input {
  background: transparent;
  border: none;
  color: #cfe5ff;
  font-size: 14px;
  outline: none;
  width: 120px;
}

.agri-search__input::placeholder {
  color: #6b7a8f;
}

.agri-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agri-btn:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.agri-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #9db7d6;
  font-size: 13px;
}

.agri-pagination__btn {
  background: #0b1626;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 4px 10px;
  color: #9db7d6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agri-pagination__btn:hover {
  border-color: #3b82f6;
  color: #cfe5ff;
}

/* Таблица */
.agri-table-container {
  overflow-x: auto;
  max-height: 400px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
}

.agri-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.agri-table th,
.agri-table td {
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--stroke);
}

.agri-table th {
  background: #0b1626;
  color: #9db7d6;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 1;
}

.agri-table td {
  color: #cfe5ff;
}

.agri-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.agri-table tbody tr.row-highlight {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.08));
}

.agri-table tbody tr.row-highlight td {
  color: #e6f0ff;
  font-weight: 600;
}

/* Нижняя секция */
.agri-bottom-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
}

.agri-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agri-bottom-right {
  min-width: 0;
}

.chart-widget--wide {
  height: 100%;
}

.pie-chart--large {
  max-width: 100%;
  width: 100% !important;
  height: 280px !important;
}

/* Адаптивность для сельского хозяйства */
@media (max-width: 1200px) {
  .agri-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .agri-bottom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .agri-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .agri-filters {
    flex-direction: column;
  }

  .agri-filter-group {
    min-width: 100%;
  }

  .agri-table-filters {
    flex-direction: column;
  }

  .agri-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agri-pagination {
    margin-left: 0;
    justify-content: center;
  }
}

/* ========== ИНВЕСТИЦИИ ========== */

.invest-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  max-width: 300px;
}

.invest-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.invest-chart-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  min-height: 300px;
}

.invest-main-chart {
  width: 100% !important;
  height: 280px !important;
}

.invest-pie-chart-section {
  margin-bottom: 20px;
}

.invest-pie-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke);
}

.invest-pie-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cfe5ff;
}

.invest-pie-legend__color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.invest-pie-legend__label {
  font-weight: 500;
}

.invest-pie-legend__value {
  color: #9db7d6;
  font-size: 12px;
  margin-left: 4px;
}

.invest-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.invest-left-col,
.invest-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.invest-widget {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
}

.invest-widget__title {
  font-size: 14px;
  font-weight: 600;
  color: #e6f0ff;
  margin-bottom: 16px;
  text-align: center;
}

.invest-widget__chart {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.invest-table-widget {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.invest-list {
  margin-top: 12px;
}

.invest-list__header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #9db7d6;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
}

.invest-list__header-cell {
  text-align: left;
}

.invest-list__body {
  max-height: 400px;
  overflow-y: auto;
}

.invest-list__item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 10px 12px;
  color: #cfe5ff;
  font-size: 13px;
  border-bottom: 1px solid var(--stroke);
  cursor: pointer;
  transition: background 0.2s ease;
}

.invest-list__item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.invest-list__item--selected {
  background: rgba(59, 130, 246, 0.15);
  border-left: 3px solid #3b82f6;
}

.invest-list__item--selected:hover {
  background: rgba(59, 130, 246, 0.2);
}

.invest-list__item-cell {
  text-align: left;
}

.invest-list__empty {
  padding: 20px;
  text-align: center;
  color: #9db7d6;
  font-size: 13px;
}

.invest-district-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.invest-district-kpi {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 16px;
}

.invest-district-kpi__label {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 8px;
}

.invest-district-kpi__value {
  font-size: 24px;
  font-weight: 700;
  color: #e6f0ff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  letter-spacing: -0.3px;
}

/* Виджет сравнения с БНС */
.invest-compare-widget {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.invest-compare__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.invest-compare__label {
  font-size: 13px;
  color: #9db7d6;
  min-width: 100px;
}

.invest-compare__progress {
  flex: 1;
  height: 24px;
  background: #0b1626;
  border-radius: 4px;
  overflow: hidden;
}

.invest-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  width: 0%;
  transition: width 0.3s ease;
}

.invest-compare__table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #9db7d6;
  text-align: center;
  margin-bottom: 8px;
}

.invest-compare__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invest-compare__row {
  background: rgba(11, 22, 38, 0.5);
  border-radius: 8px;
  padding: 12px;
}

.invest-compare__row-title {
  font-size: 13px;
  color: #e6f0ff;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 500;
}

.invest-compare__row-values {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  text-align: center;
}

.invest-compare__row-values span {
  font-size: 16px;
  font-weight: 600;
  color: #3b82f6;
}

/* Адаптивность для инвестиций */
@media (max-width: 1200px) {
  .invest-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .invest-bottom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .invest-kpi-row {
    grid-template-columns: 1fr;
  }

  .invest-compare__row-values {
    font-size: 14px;
  }
}

/* ========== СТРОИТЕЛЬСТВО ========== */

.constr-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.constr-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.constr-kpi-card {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.constr-kpi-card__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.constr-kpi-card__content {
  flex: 1;
  min-width: 0;
}

.constr-kpi-card__label {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 8px;
  line-height: 1.3;
}

.constr-kpi-card__value {
  font-size: 28px;
  font-weight: 700;
  color: #e6f0ff;
  margin-bottom: 4px;
}

.constr-kpi-card__rank {
  font-size: 13px;
  color: #9db7d6;
}

.constr-kpi-card__rank span {
  color: #3b82f6;
  font-weight: 600;
}

/* График ИФО по областям */
.constr-chart-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.constr-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.constr-chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #e6f0ff;
}

.constr-chart-content {
  width: 100%;
}

.constr-bar-chart {
  width: 100% !important;
  height: 300px !important;
}

/* Таблица строительства */
.constr-table-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

/* Нижняя секция с круговыми графиками */
.constr-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Адаптивность для строительства */
@media (max-width: 1200px) {
  .constr-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .constr-bottom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .constr-kpi-row {
    grid-template-columns: 1fr;
  }

  .constr-filters {
    flex-direction: column;
  }

  .constr-chart-header {
    flex-direction: column;
    align-items: stretch;
  }

  .constr-kpi-card__value {
    font-size: 22px;
  }
}

/* ========== ПРОМЫШЛЕННОСТЬ ========== */

.industry-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .industry-tables-row {
    grid-template-columns: 1fr;
  }
}

/* ========== ТОРГОВЛЯ ========== */

.trade-header-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-bottom: 20px;
}

.trade-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.trade-kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
  width: 100%;
}

.trade-kpi-cards .constr-kpi-card {
  min-width: 200px;
  height: 100%;
}

@media (max-width: 1200px) {
  .trade-header-row {
    grid-template-columns: 1fr;
  }

  .trade-kpi-cards {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .trade-kpi-cards .constr-kpi-card {
    flex: 1;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .trade-filters {
    flex-direction: column;
    width: 100%;
  }

  .trade-kpi-cards {
    grid-template-columns: 1fr;
  }

  .trade-kpi-cards .constr-kpi-card {
    width: 100%;
  }
}

/* ========== ЖИВОТНОВОДСТВО ========== */

.agri-content-section--hidden {
  display: none;
}

/* Фильтры сельского хозяйства */
.agri-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
  position: relative;
  overflow: visible;
}

.agri-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 200px;
}

.agri-filter__label {
  display: block;
  font-size: 11px;
  color: #9db7d6;
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agri-select {
  display: block;
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: #e6f0ff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239db7d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

.agri-select:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background-color: rgba(15, 25, 40, 0.8);
}

.agri-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background-color: rgba(15, 25, 40, 0.9);
}

.agri-select option {
  background: #0f1928;
  color: #e6f0ff;
  padding: 12px 16px;
  border: none;
  font-size: 14px;
}

.agri-select option:hover {
  background: rgba(59, 130, 246, 0.1);
}

.agri-select option:checked {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* Переключатель отраслей */
.agri-toggle {
  display: flex;
  gap: 0;
  background: #0b1626;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 4px;
}

.agri-toggle__btn {
  display: inline-block;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #9db7d6;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  flex: 1;
}

.agri-toggle__btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #cfe5ff;
}

.agri-toggle__btn--active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #3b82f6;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Секции контента */
.agri-content-section {
  display: block;
  width: 100%;
}

/* Адаптивность фильтров */
@media (max-width: 900px) {
  .agri-filters {
    gap: 12px;
  }

  .agri-select {
    min-width: 140px;
  }

  .agri-toggle__btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .agri-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .agri-filter-group {
    width: 100%;
  }

  .agri-select {
    width: 100%;
    min-width: unset;
  }

  .agri-toggle {
    width: 100%;
  }

  .agri-toggle__btn {
    flex: 1;
  }
}

/* Скрытие секций */
.agri-content-section--hidden {
  display: none !important;
}

.agri-filter-group--hidden {
  display: none !important;
}

.animal-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.animal-kpi-card {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
}

.animal-kpi-card__label {
  font-size: 13px;
  color: #9db7d6;
  margin-bottom: 12px;
  line-height: 1.4;
}

.animal-kpi-card__value {
  font-size: 32px;
  font-weight: 700;
  color: #e6f0ff;
}

.animal-chart-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 24px;
}

.animal-chart-title {
  font-size: 20px;
  font-weight: 600;
  color: #e6f0ff;
  text-align: center;
  margin-bottom: 24px;
}

.animal-chart-content {
  width: 100%;
  height: 400px;
}

.animal-bar-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Адаптивность животноводства */
@media (max-width: 1400px) {
  .animal-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .animal-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .animal-kpi-row {
    grid-template-columns: 1fr;
  }

  .animal-kpi-card__value {
    font-size: 26px;
  }

  .animal-chart-content {
    height: 300px;
  }
}

/* ========== Растениеводство (итоги 2025) ========== */
.plant-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.plant-kpi-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.plant-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.plant-kpi-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.plant-kpi-card__icon--blue {
  background: linear-gradient(135deg, #4a72e8, #3b82f6);
}

.plant-kpi-card__icon--green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.plant-kpi-card__icon--orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.plant-kpi-card__icon--purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.plant-kpi-card__icon--red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.plant-kpi-card__icon--pink {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.plant-kpi-card__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.plant-kpi-card__label {
  font-size: 12px;
  color: #9db7d6;
  line-height: 1.3;
}

.plant-kpi-card__value {
  font-size: 30px;
  font-weight: 700;
  color: #e6f0ff;
  line-height: 1.1;
}

.plant-kpi-card__hint {
  font-size: 12px;
  color: #7ea4d4;
}

/* Tooltip для графиков */
.chart-tooltip {
  position: fixed;
  background: linear-gradient(180deg, #1a2332, #0f1928);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 10000;
  display: none;
  min-width: 150px;
  backdrop-filter: blur(10px);
}

.tooltip-title {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 6px;
  font-weight: 500;
}

.tooltip-value {
  font-size: 16px;
  font-weight: 700;
  color: #e6f0ff;
  margin-bottom: 4px;
}

.tooltip-percent {
  font-size: 11px;
  color: #3b82f6;
  font-weight: 600;
}

/* Улучшение стилей KPI карточек */
.kpi-card__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  letter-spacing: -0.5px;
  word-break: break-word;
  line-height: 1.2;
}

/* Анимация загрузки для графиков */
.chart-widget__content {
  position: relative;
}

/* Улучшение hover эффектов */
.pie-chart,
.salary-chart {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pie-chart:hover,
.salary-chart:hover {
  transform: scale(1.01);
}

/* ========== ФОТ (Фонд оплаты труда) ========== */

.fot-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fot-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.fot-kpi-card {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.fot-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.fot-kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fot-kpi-card__icon--blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.fot-kpi-card__icon--green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.fot-kpi-card__icon--purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.fot-kpi-card__icon--orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.fot-kpi-card__icon--red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.fot-kpi-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fot-kpi-card__label {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 8px;
  line-height: 1.3;
}

.fot-kpi-card__value {
  font-size: 28px;
  font-weight: 700;
  color: #e6f0ff;
}

/* Таблица ФОТ */
.fot-table-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.fot-sort-label {
  color: #9db7d6;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.fot-sort-label:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #cfe5ff;
}

/* График динамики зарплаты */
.fot-chart-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.fot-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.fot-chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #e6f0ff;
}

.fot-chart-legend {
  display: flex;
  gap: 16px;
}

.fot-chart-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fot-chart-filter .agri-select {
  min-width: 150px;
}

.fot-chart-content {
  width: 100%;
  height: 300px;
}

.fot-bar-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Фильтр района */
.fot-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.fot-filter-row .agri-select {
  min-width: 200px;
}

/* Нижняя секция: пай-чарт и таблица компаний */
.fot-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.fot-pie-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
}

.fot-pie-wrapper {
  display: flex;
  gap: 20px;
  align-items: center;
}

.fot-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 200px;
}

.fot-pie-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #9db7d6;
}

.fot-companies-section {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
}

/* Метрики */
.fot-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.fot-metric-card {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
}

.fot-metric-card--wide {
  grid-column: span 1;
}

.fot-metric-card--highlight {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border-color: rgba(59, 130, 246, 0.3);
}

.fot-metric-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fot-metric-card__label {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 8px;
}

.fot-metric-card__years {
  display: flex;
  gap: 8px;
}

.fot-year {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}

.fot-year--2024 {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}

.fot-year--2025 {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.fot-metric-card__value {
  font-size: 32px;
  font-weight: 700;
  color: #e6f0ff;
  margin-bottom: 8px;
}

.fot-metric-card__change {
  font-size: 14px;
  font-weight: 600;
}

.fot-metric-card__change--positive {
  color: #10b981;
}

.fot-metric-card__change--negative {
  color: #ef4444;
}

.fot-metric-card__value-row {
  display: flex;
  gap: 20px;
}

.fot-metric-card__mini-value {
  font-size: 20px;
  font-weight: 600;
  color: #3b82f6;
}

.fot-metric-card__value-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fot-metric-card__value-with-badge span:first-child {
  font-size: 32px;
  font-weight: 700;
  color: #e6f0ff;
}

.fot-badge {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.fot-badge--positive {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.fot-badge--negative {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Адаптивность ФОТ */
@media (max-width: 1400px) {
  .fot-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .fot-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .fot-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .fot-bottom-row {
    grid-template-columns: 1fr;
  }

  .fot-pie-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .fot-kpi-row {
    grid-template-columns: 1fr;
  }

  .fot-chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fot-metrics-row {
    grid-template-columns: 1fr;
  }

  .fot-kpi-card__value {
    font-size: 22px;
  }

  .fot-metric-card__value {
    font-size: 24px;
  }
}
