/* Аналитика и дашборды (M5) */
.analytics-filters .filter-bar { align-items: flex-end; }
.analytics-filters select[multiple] { min-width: 170px; }
.more-filters { margin-top: 10px; }
.more-filters summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.filter-actions { display: flex; gap: 8px; margin-top: 12px; }
.card + .card, .dash-bar + .widgets { margin-top: 16px; }
.saved-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.saved-item { display: inline-flex; align-items: center; gap: 2px; }
.inline-form { display: inline; margin: 0; }
.save-form { display: flex; gap: 8px; flex-wrap: wrap; }
.save-form input[type=text] { min-width: 240px; }
.report-card .card-head { align-items: baseline; }
.report-note { margin: 0 0 10px; font-size: 13px; }
.chart-box { margin-bottom: 14px; max-width: 920px; }
.report-table td, .report-table th { white-space: nowrap; }
.report-table td:first-child, .report-table th:first-child { position: sticky; left: 0; background: var(--surface); font-weight: 600; }
.delta.is-up { color: var(--success); font-weight: 600; }
.delta.is-down { color: var(--danger); font-weight: 600; }
.dash-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.dash-tabs .tab { text-decoration: none; }
.dash-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.dash-bar .filter-bar { margin: 0; align-items: flex-end; }
.dash-edit { display: flex; gap: 8px; }
.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.widget { margin: 0 !important; grid-column: span 2; min-width: 0; }
.widget-small { grid-column: span 1; }
.widget-report { grid-column: span 4; }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.widget-head h3 { color: var(--muted); font-size: 13px; font-weight: 600; }
.widget-tools { display: flex; gap: 2px; }
.widget-tools .icon-btn { width: 26px; height: 26px; }
.tile-value { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.top-failed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.top-failed li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tf-name small { display: block; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.custom-dates[hidden], [data-kind-show][hidden] { display: none; }
@media (max-width: 900px) {
  .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget-report { grid-column: span 2; }
}
@media print {
  .analytics-filters, .saved-filters, .dash-bar, .widget-tools { display: none !important; }
  .report-table td:first-child, .report-table th:first-child { position: static; }
  .report-table td, .report-table th { white-space: normal; padding: 4px 6px; font-size: 11px; }
  .card { box-shadow: none; break-inside: avoid; }
}
body.print .analytics-filters, body.print .saved-filters { display: none !important; }
