.detail-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 0 2px;
  scrollbar-width: thin;
}

.detail-tabs a {
  flex: none;
  color: var(--violet);
  background: #eee9ff;
  border-radius: 999px;
  padding: 8px 13px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
}

.finance-details {
  margin-top: 6px;
  color: var(--ink);
  font-size: .72rem;
}

.finance-details summary {
  cursor: pointer;
  color: var(--violet);
  font-weight: 700;
}

.finance-details dl {
  min-width: 290px;
  margin: 7px 0 0;
  padding: 9px;
  background: var(--paper);
  border-radius: 10px;
}

.finance-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}

.finance-details dt {
  font-weight: 500;
  color: var(--muted);
}

.finance-details dd {
  margin: 0;
  font-weight: 700;
}

.data-footer {
  padding: 0 0 18px;
  color: var(--muted);
  font-size: .74rem;
  text-align: center;
}

.products-table thead a {
  color: inherit;
  text-decoration: none;
}

.filter-panel {
  margin-bottom: 14px;
}

.filter-panel > summary {
  display: none;
}

.products-table .table {
  min-width: 1420px;
}

.sales-chart-head {
  margin-top: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eeedf4;
  color: #5e5b70;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-negative_profit,
.status-out_of_stock,
.status-missing_cost {
  color: var(--red);
  background: #fdecef;
}

.status-shortage {
  color: #8a5b00;
  background: #fff4d8;
}

.status-growth,
.status-normal {
  color: var(--green);
  background: #e8f8f0;
}

@media (min-width: 681px) {
  .filter-panel > .filter-bar {
    display: grid !important;
  }

  .filter-bar {
    grid-template-columns: minmax(220px, 300px) minmax(220px, 1fr) minmax(170px, 220px) auto;
  }
}

@media (max-width: 680px) {
  .app-navbar .nav-link,
  .app-navbar form .btn,
  .page-head .btn,
  .detail-tabs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .eyebrow,
  .status-badge,
  .kpi small,
  .detail-kpis small,
  .risk-row small,
  .product-cell small,
  td small,
  .freshness-grid span,
  .freshness-grid small,
  .table td::before {
    font-size: .76rem;
  }

  .filter-panel > summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 11px 14px;
    color: var(--violet);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
  }

  .filter-panel > summary::-webkit-details-marker {
    display: none;
  }

  .filter-panel > summary::after {
    content: "+";
    font-size: 1.25rem;
    line-height: 1;
  }

  .filter-panel[open] > summary::after {
    content: "−";
  }

  .filter-panel > summary small {
    margin-left: auto;
    margin-right: 12px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 500;
  }

  .filter-panel > .filter-bar {
    display: none;
  }

  .filter-panel[open] > .filter-bar {
    display: grid;
  }

  .products-table .table {
    min-width: 0;
  }

  .products-table .table td:nth-child(2)::before { content: "Продано"; }
  .products-table .table td:nth-child(3)::before { content: "Цена покупателя"; }
  .products-table .table td:nth-child(4)::before { content: "Себестоимость"; }
  .products-table .table td:nth-child(5)::before { content: "Расходы WB"; }
  .products-table .table td:nth-child(6)::before { content: "Прибыль"; }
  .products-table .table td:nth-child(7)::before { content: "На шт. / кг"; }
  .products-table .table td:nth-child(8)::before { content: "Маржа"; }
  .products-table .table td:nth-child(9)::before { content: "Остаток"; }
  .products-table .table td:nth-child(10)::before { content: "Запас"; }
  .products-table .table td:nth-child(11)::before { content: "Прогноз / нед."; }
  .products-table .table td:nth-child(12)::before { content: "Статус"; }

  .economics-table td:nth-child(2)::before { content: "Продажи / возвраты"; }
  .economics-table td:nth-child(3)::before { content: "Цена покупателя"; }
  .economics-table td:nth-child(4)::before { content: "Продажи"; }
  .economics-table td:nth-child(5)::before { content: "К перечислению"; }
  .economics-table td:nth-child(6)::before { content: "Себестоимость"; }
  .economics-table td:nth-child(7)::before { content: "Реклама"; }
  .economics-table td:nth-child(8)::before { content: "Прибыль"; }
  .economics-table td:nth-child(9)::before { content: "На шт. / кг"; }
  .economics-table td:nth-child(10)::before { content: "Маржа"; }

  .sales-report-table td:nth-child(2)::before { content: "Количество"; }
  .sales-report-table td:nth-child(3)::before { content: "Сумма"; }
  .sales-report-table td:nth-child(4)::before { content: "Цена покупателя"; }
  .sales-report-table td:nth-child(5)::before { content: "Прибыль"; }
  .sales-report-table td:nth-child(6)::before { content: "К прошлому отчёту"; }

  .warehouses-table td:nth-child(2)::before { content: "Остаток"; }
  .warehouses-table td:nth-child(3)::before { content: "К клиенту / возврат"; }
  .warehouses-table td:nth-child(4)::before { content: "Продажи 7 / 28 / 90"; }
  .warehouses-table td:nth-child(5)::before { content: "Скорость / день"; }
  .warehouses-table td:nth-child(6)::before { content: "Дней запаса"; }
  .warehouses-table td:nth-child(7)::before { content: "Обнуление"; }
  .warehouses-table td:nth-child(8)::before { content: "Статус"; }
}
