/*
 * KOrder styles · public/css/06e-admin-reports-dashboard.css
 * Admin: reports and dashboard KPIs / charts.
 *
 * public/css/*.css used to be one public/styles.css. The files are cut from it in order
 * and index.html loads them in that same order, which is the CSS cascade order: do not
 * reorder the <link> tags, and add a rule to the file that owns its screen.
 * Map: public/css/README.md
 */

.report-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.compact-head {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compact-head h3 {
  margin: 0;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f8f4ed;
}

.report-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-list strong {
  color: var(--ink);
  white-space: nowrap;
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

.dash-kpi {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dash-kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dash-kpi-value {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
}

.dash-kpi-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dash-section {
  margin-top: 14px;
}

.dash-charts-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dash-chart-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dash-chart-card h3 {
  margin: 0;
  font-size: 15px;
}

.dash-chart-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-svg .chart-axis {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart-svg .chart-val {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.chart-svg .chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.dash-pie-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.dash-pie-row .chart-svg {
  max-width: 220px;
}

.dash-legend {
  display: grid;
  gap: 6px;
}

.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.dash-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}

.dash-legend-item .muted-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-charts-3 {
    grid-template-columns: 1fr;
  }

  .dash-pie-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
