feat: Credits-System — Token-Usage-Router, Budget-Verwaltung, Frontend-Übersicht

- Neuer Router /api/token-usage mit Overview, Org-Detail, Monatsstatistik
- Budget-Felder (credits_total, cost_per_credit, token_budget_usd) bei Lizenz-Erstellung
- Token-Nutzung Sub-Tab in Org-Detail mit Verbrauchsbalken und Monatstabelle
- Dashboard Stat-Card für API-Kosten gesamt
- CSS Dark-Theme Styling für Token-Komponenten
Dieser Commit ist enthalten in:
Claude Dev
2026-03-17 23:59:49 +01:00
Ursprung 3828d7c8bf
Commit 7cd36959b0
7 geänderte Dateien mit 333 neuen und 4 gelöschten Zeilen

Datei anzeigen

@@ -763,3 +763,17 @@ tr:hover td {
.cat-header-count::after {
content: ")";
}
/* ===== Token-Nutzung Tab ===== */
.token-overview { padding: 4px 0; }
.token-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.token-stat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.token-stat-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.token-stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.token-budget-bar-section { margin-bottom: 16px; }
.token-budget-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.token-budget-bar-container { width: 100%; height: 10px; background: var(--bg-tertiary); border-radius: 5px; overflow: hidden; }
.token-budget-bar { height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.6s ease, background-color 0.3s ease; }
.token-budget-bar.warning { background: #e67e22; }
.token-budget-bar.critical { background: #e74c3c; }
@media (max-width: 768px) { .token-stats-row { grid-template-columns: repeat(2, 1fr); } }