/* === Dashboard === */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.kpi-card .kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kpi-card .kpi-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.kpi-card .kpi-icon { font-size: 22px; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; color: var(--text); }
.kpi-card .kpi-change { font-size: 12px; margin-top: 4px; }
.kpi-card .kpi-change.up { color: var(--success); }
.kpi-card .kpi-change.down { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }

/* Mini charts */
.chart-container { position: relative; }
.chart-bar-group { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 8px; }
.chart-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-width: 20px;
  transition: height .4s ease;
  position: relative;
  cursor: pointer;
}
.chart-bar:hover { opacity: .85; }
.chart-bar .chart-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  margin-bottom: 4px;
}
.chart-bar:hover .chart-tooltip { display: block; }
.chart-labels { display: flex; gap: 6px; margin-top: 6px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--text-muted); }

/* Donut chart */
.donut-chart { width: 140px; height: 140px; margin: 0 auto; }
.donut-legend { margin-top: 16px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Activity feed */
.activity-list { max-height: 320px; overflow-y: auto; }
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.activity-text { font-size: 13px; }
.activity-time { font-size: 11px; color: var(--text-muted); }

/* Quick stats */
.quick-stat { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.quick-stat:last-child { border-bottom: none; }
.quick-stat-label { font-size: 13px; color: var(--text-secondary); }
.quick-stat-value { font-size: 15px; font-weight: 600; }

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