/* NAS AI App — chart toolkit styles (2026-08-01). Companion to js/core/charts.js.
 * Deliberately does NOT touch app.css's existing tokens or .card — every color below is a CSS var
 * with a literal fallback (var(--navy, #0b2545)) per the concurrent design-tokens lane's instruction,
 * since app.css may not have defined every token yet when this file loads. */

.chart {
  margin: 0;
  display: inline-block;
  max-width: 100%;
}

.chart-svg {
  display: block;
  max-width: 100%;
  height: auto;
  font-family: inherit;
}

.chart-caption {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #5f6b74);
  line-height: 1.3;
}

.chart-empty {
  padding: 8px 0;
}

.chart-empty-note {
  color: var(--muted, #5f6b74);
  font-style: italic;
}

.chart-label,
.chart-axis-label {
  font-size: 10px;
  fill: var(--muted, #5f6b74);
}

/* Mono stack for printed numbers, matching the design's IBM Plex Mono treatment for figures — falls
 * back to the system monospace font rather than requiring that font to be loaded. */
.chart-value {
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  fill: var(--ink, #16232e);
}

.chart-value-flag {
  fill: var(--red, #c1272d);
}

.chart-legend-label {
  font-size: 10px;
  fill: var(--ink, #16232e);
}

/* ---- coverage dial (shape 04) — rendered as HTML, not pure SVG text, so the ring sits beside the
 * count the way design_handoff 1i's "18/21 · 3 open seats" layout does. ---- */
.chart-dial-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chart-dial-text {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

.chart-dial-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--navy, #0b2545);
}

.chart-dial-max {
  color: var(--muted, #5f6b74);
  font-weight: 600;
}

.chart-dial-gap {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.chart-dial-gap-short {
  color: var(--red, #c1272d);
}

.chart-dial-gap-full {
  color: var(--green, #2f7d4f);
}

/* ---- dashboard compositions ---- */

.dashboard {
  display: block;
  width: 100%;
}

.dash-caption {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy, #0b2545);
}

.dash-tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-tile {
  flex: 1 1 110px;
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid var(--line, #cdd6e2);
  border-radius: var(--radius, 12px);
  background: var(--surface, #ffffff);
}

.dash-tile-label {
  margin: 0;
  font-size: 11px;
  color: var(--muted, #5f6b74);
}

.dash-tile-value {
  margin: 2px 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy, #0b2545);
}

.dash-two-up-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.dash-two-up-cell {
  flex: 1 1 220px;
  min-width: 0;
}

.dash-kpi-trend-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-kpi-big {
  min-width: 100px;
}

.dash-kpi-value {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy, #0b2545);
}

.dash-kpi-trend-chart {
  flex: 1 1 140px;
  min-width: 0;
}

.dash-bullet-grid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-bullet-cell {
  flex: 1 1 240px;
  min-width: 0;
}

@media (max-width: 480px) {
  .dash-tile-row,
  .dash-two-up-row,
  .dash-bullet-grid-row {
    flex-direction: column;
  }
}
