/* ──────────────────────────────────────────────────────────────
 * Admin panel — chart card styles + language toggle
 * ────────────────────────────────────────────────────────────── */

/* language toggle in sidebar footer */
.admin-lang-toggle {
  display: flex; gap: 0; margin-bottom: 8px;
  background: #0d1119; border: 1px solid #1e2621; border-radius: 6px;
  padding: 2px; width: max-content;
}
.admin-lang-toggle button {
  padding: 3px 9px; background: transparent; color: #7d847f;
  border: 0; border-radius: 4px; font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer; letter-spacing: .5px;
}
.admin-lang-toggle button.active {
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #021209;
}

/* chart panel — more data-rich than existing .panel */
.chart-panel {
  background: #0f1311;
  border: 1px solid #1e2621;
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.chart-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,.35), transparent);
}
.chart-panel .head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px; gap: 16px;
}
.chart-panel .head h3 {
  font-size: 14px; font-weight: 700; color: #d8dcd9; margin: 0 0 3px;
  letter-spacing: -.2px;
}
.chart-panel .head .sub {
  color: #7d847f; font-size: 12px; line-height: 1.4;
}
.chart-panel .head .total {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 22px; font-weight: 800; color: #22c55e;
  white-space: nowrap; line-height: 1;
}
.chart-panel .head .total .tiny {
  display: block; font-size: 10px; font-weight: 600; color: #7d847f;
  text-transform: uppercase; letter-spacing: 1px; margin-top: 4px;
}
.chart-panel .body { min-height: 160px; }
.chart-panel .footer-note {
  margin-top: 10px; font-size: 11px; color: #4a4f4b;
  font-family: 'JetBrains Mono', monospace;
  display: flex; align-items: center; gap: 8px;
}
.chart-panel .footer-note::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 6px #22c55e;
  animation: chartLivePulse 1.6s ease-in-out infinite;
}
@keyframes chartLivePulse {
  0%, 100% { opacity: 1; } 50% { opacity: .3; }
}

/* stat-card sparkline */
.stat.with-spark { position: relative; padding-bottom: 36px; }
.stat.with-spark .spark {
  position: absolute; left: 12px; right: 12px; bottom: 8px;
  height: 24px; pointer-events: none;
}

/* donut legend */
.donut-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.donut-legend .item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #d8dcd9;
  font-family: 'JetBrains Mono', monospace;
}
.donut-legend .item .swatch {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.donut-legend .item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .item .v { color: #22c55e; font-weight: 700; }

/* chart grid helpers */
.chart-grid { display: grid; gap: 14px; }
.chart-grid.g2 { grid-template-columns: 2fr 1fr; }
.chart-grid.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .chart-grid.g2, .chart-grid.g3 { grid-template-columns: 1fr; } }
