/* Statistik / Doughnut-Charts */

.stats-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  align-items:stretch;
}

.stat-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  min-width:0;
}

.stat-card h3{
  margin:0;
  font-size:1rem;
}

.stat-summary{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:180px;
  border-color:rgba(225,75,75,.45);
  background:linear-gradient(135deg, rgba(225,75,75,.18), var(--panel));
}

.stat-summary strong{
  display:block;
  margin-top:8px;
  font-size:clamp(2.4rem, 5vw, 4rem);
  line-height:1;
  color:#fff;
}

.stat-summary span{
  color:var(--muted);
  font-weight:800;
}

.chart-card{
  display:grid;
  gap:12px;
}

.chart-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.chart-card-header p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:.9rem;
}

.chart-canvas-wrap{
  position:relative;
  height:230px;
  min-height:230px;
}

.chart-canvas-wrap canvas{
  width:100% !important;
  height:100% !important;
}

.chart-legend-fallback{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:7px;
}

.chart-legend-fallback li{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:.86rem;
}

.chart-legend-fallback strong{
  color:var(--text);
}

.legend-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  box-shadow:0 0 0 2px rgba(255,255,255,.06);
}

@media (max-width:980px){
  .stats-grid{
    grid-template-columns:1fr;
  }

  .chart-canvas-wrap{
    height:220px;
    min-height:220px;
  }
}


