.stats-head {
  align-items: flex-end;
}
.stats-actions {
  display: flex;
  gap: 10px;
}
.stats-actions select {
  min-width: 130px;
}
.stats-time {
  color: var(--muted, #7d8490);
  margin: 0 0 18px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stats-card {
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e4e6e9);
  border-top: 4px solid #555;
  border-radius: 14px;
  padding: 18px;
  min-width: 0;
}
.stats-card.youtube {
  border-top-color: #ff0033;
}
.stats-card.instagram {
  border-top-color: #c13584;
}
.stats-card.threads {
  border-top-color: #111;
}
.stats-card.web {
  border-top-color: #2f7ee6;
}
.stats-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stats-card h2 {
  font-size: 18px;
  margin: 0;
}
.source-state {
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 99px;
  background: #edf8f1;
  color: #197345;
}
.source-state.warn {
  background: #fff3dc;
  color: #8a5a00;
}
.stats-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.stats-metrics span {
  display: block;
  color: #7d8490;
  font-size: 12px;
}
.stats-metrics strong {
  font-size: 22px;
}
.stats-card svg {
  width: 100%;
  height: 72px;
  overflow: visible;
}
.stats-card polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.stats-warning,
.stats-empty-chart {
  font-size: 12px;
  color: #8a5a00;
}
.stats-table-panel {
  margin-top: 20px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e4e6e9);
  border-radius: 14px;
  padding: 18px;
}
.stats-table-wrap {
  overflow: auto;
}
.stats-table-panel table {
  width: 100%;
  border-collapse: collapse;
}
.stats-table-panel th,
.stats-table-panel td {
  text-align: left;
  padding: 12px;
  border-top: 1px solid var(--line, #e4e6e9);
  font-size: 13px;
}
.stats-table-panel a {
  color: inherit;
}
.stats-table-panel td:nth-child(3),
.stats-table-panel td:nth-child(4) {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 650px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stats-head {
    align-items: stretch;
  }
  .stats-actions {
    width: 100%;
  }
  .stats-actions > * {
    flex: 1;
  }
}
