/* Admin charts — Chart.js canvas container, rendered by admin/stats/_chart.
   Height comes from the partial's inline style (Chart.js runs with
   maintainAspectRatio: false). */

.admin-chart {
  margin-bottom: 1.5rem;
  position: relative;
  width: 100%;
}

/* Chart hover tooltip — external HTML (Chart.js plugins.tooltip.external,
   built by chart_controller.js) so the body can be a real two-column table:
   swatch + series name left, value right-aligned. Positioned at the tooltip
   caret relative to .admin-chart above. */

.admin-chart-tooltip {
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.75rem;
  left: 0;
  opacity: 0;
  padding: 0.5rem 0.75rem;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.admin-chart-tooltip-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.admin-chart-tooltip table {
  border-collapse: collapse;
}

.admin-chart-tooltip td:last-child {
  padding-left: 1rem;
  text-align: right;
}

.admin-chart-tooltip-swatch {
  border-radius: 2px;
  display: inline-block;
  height: 10px;
  margin-right: 0.375rem;
  vertical-align: middle;
  width: 10px;
}

/* Stats-table sparklines — inline SVG rendered by admin/stats/_sparkline.
   The viewBox is count-sized with preserveAspectRatio="none", so the fixed
   on-screen footprint lives here. */

.admin-sparkline {
  display: block; /* kills the inline-SVG baseline gap */
  height: 28px;
  width: 120px;
}

.admin-sparkline-area {
  fill: var(--light-blue);
  fill-opacity: 0.2;
  stroke: none;
}

.admin-sparkline-line {
  fill: none;
  stroke: var(--light-blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
