/* ============================================================
   Skool.Cool ADMIN — Analytics dashboard styles (ADDITIVE)
   Loaded after skool-components.css. Bespoke building blocks for the
   tabbed school analytics dashboard. All classes are `.dash-` prefixed to
   avoid collisions; reads design tokens only (never raw hex). The tab
   components are standalone with no scoped CSS, so these must be global.
   ============================================================ */

.dash-tabs button i { margin-right: 5px; }

/* Vertical rhythm between dashboard sections */
.dash-stack > * + * { margin-top: 16px; }

/* Section grids */
.dash-grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.dash-grid-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) {
  .dash-grid2, .dash-grid-eq { grid-template-columns: 1fr; }
}

/* KPI sub-label under the number */
.dash-kpi-sub {
  font-size: 11px;
  color: var(--sk-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chart wrapper */
.dash-chart { min-height: 240px; }
.dash-chart-sm { min-height: 200px; }

/* Fill-rate / coverage bars */
.dash-fillcell { display: flex; align-items: center; gap: 8px; }
.dash-fill {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--sk-line);
  overflow: hidden;
}
.dash-fill > span { display: block; height: 100%; border-radius: 4px; }
.dash-fill-pct { font-size: 11px; color: var(--sk-muted); min-width: 40px; text-align: right; }

/* Online / cash split bar */
.dash-split {
  height: 9px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: var(--sk-line);
  margin: 14px 0 8px;
}
.dash-split > span { display: block; height: 100%; }

/* Small metric block (label + number) */
.dash-metric .l { font-size: 12px; color: var(--sk-muted); }
.dash-metric .v {
  font-size: 20px;
  font-weight: 600;
  color: var(--sk-text-strong);
  margin-top: 2px;
  line-height: 1.15;
}
.dash-metric .v.sm { font-size: 16px; }
.dash-metric + .dash-metric {
  border-top: 1px solid var(--sk-border);
  padding-top: 12px;
  margin-top: 12px;
}

/* Inline legend (for donuts) */
.dash-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--sk-muted);
}
.dash-legend span.item { display: inline-flex; align-items: center; gap: 5px; }
.dash-legend .dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* Operations / alert feed rows */
.dash-feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sk-border);
}
.dash-feed-row:last-child { border-bottom: none; }
.dash-feed-ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 15px;
}
.dash-feed-ic.high { background: var(--sk-red-soft); color: #b33127; }
.dash-feed-ic.med { background: var(--sk-amber-soft); color: #9a6a10; }
.dash-feed-ic.low { background: #eef1f1; color: #5b6b6b; }
.dash-feed-main { flex: 1; min-width: 0; }
.dash-feed-main .t { font-size: 13.5px; color: var(--sk-text-strong); }
.dash-feed-main .s {
  font-size: 11.5px;
  color: var(--sk-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-feed-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sk-text-strong);
  text-align: right;
  white-space: nowrap;
}

/* Loading / error inline states */
.dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--sk-muted);
  font-size: 13px;
}

/* Number formatting helpers */
.dash-num-strong { color: var(--sk-text-strong); font-weight: 600; }
.dash-cap { text-transform: capitalize; }
