From d38f0a4cc26d804fefad38acc6c90b079dde7ee1 Mon Sep 17 00:00:00 2001 From: Aleksandar Date: Thu, 11 Dec 2025 13:32:35 +0100 Subject: [PATCH] style: enhance card colors and improve typography hierarchy --- .../analytics/AnalyticsDashboard.tsx | 30 ++++---- apps/admin/src/components/ui/StatsCard.tsx | 76 +++++++++++-------- 2 files changed, 60 insertions(+), 46 deletions(-) diff --git a/apps/admin/src/components/analytics/AnalyticsDashboard.tsx b/apps/admin/src/components/analytics/AnalyticsDashboard.tsx index e4825b8..f76b01d 100644 --- a/apps/admin/src/components/analytics/AnalyticsDashboard.tsx +++ b/apps/admin/src/components/analytics/AnalyticsDashboard.tsx @@ -79,27 +79,27 @@ export function AnalyticsDashboard() {
{/* Key Metrics Cards */}
-
-

Total Athletes

-
-
{totalUsers}
- active +
+

Total Athletes

+
+
{totalUsers}
+ active
-
-

Total Revenue

-
-
${totalRevenue.toLocaleString()}
- ytd +
+

Total Revenue

+
+
${totalRevenue.toLocaleString()}
+ ytd
-
-

Active Members

-
-
{activeMembers}
- members +
+

Active Members

+
+
{activeMembers}
+ members
diff --git a/apps/admin/src/components/ui/StatsCard.tsx b/apps/admin/src/components/ui/StatsCard.tsx index 7e23530..a277723 100644 --- a/apps/admin/src/components/ui/StatsCard.tsx +++ b/apps/admin/src/components/ui/StatsCard.tsx @@ -13,56 +13,70 @@ interface StatsCardProps { export function StatsCard({ title, value, change, trend, icon: Icon, color = "blue" }: StatsCardProps) { const colorStyles = { blue: { - bg: "bg-gradient-to-br from-blue-600 to-blue-700", - iconBg: "bg-blue-500/20 text-blue-300", - light: "from-blue-50 to-blue-100/50", + bg: "bg-gradient-to-br from-blue-600 to-blue-800", + text: "text-blue-800", + light: "from-blue-100/80 to-blue-150/80", + badge: "bg-blue-200/60 text-blue-900", + icon: "bg-blue-600/30 text-blue-700", }, green: { - bg: "bg-gradient-to-br from-emerald-600 to-emerald-700", - iconBg: "bg-emerald-500/20 text-emerald-300", - light: "from-emerald-50 to-emerald-100/50", + bg: "bg-gradient-to-br from-emerald-600 to-emerald-800", + text: "text-emerald-800", + light: "from-emerald-100/80 to-emerald-150/80", + badge: "bg-emerald-200/60 text-emerald-900", + icon: "bg-emerald-600/30 text-emerald-700", }, purple: { - bg: "bg-gradient-to-br from-purple-600 to-purple-700", - iconBg: "bg-purple-500/20 text-purple-300", - light: "from-purple-50 to-purple-100/50", + bg: "bg-gradient-to-br from-purple-600 to-purple-800", + text: "text-purple-800", + light: "from-purple-100/80 to-purple-150/80", + badge: "bg-purple-200/60 text-purple-900", + icon: "bg-purple-600/30 text-purple-700", }, orange: { - bg: "bg-gradient-to-br from-orange-600 to-orange-700", - iconBg: "bg-orange-500/20 text-orange-300", - light: "from-orange-50 to-orange-100/50", + bg: "bg-gradient-to-br from-orange-600 to-orange-800", + text: "text-orange-800", + light: "from-orange-100/80 to-orange-150/80", + badge: "bg-orange-200/60 text-orange-900", + icon: "bg-orange-600/30 text-orange-700", }, }; const styles = colorStyles[color]; return ( - -
- - + + + {title} -
- +
+
- -
+ +
{value}
{change && ( -
-

- +

+ + {trend === "up" ? "↑" : trend === "down" ? "↓" : "→"} {change} + + vs last month +
+ )} + + + ); {trend === "up" ? "↑" : trend === "down" ? "↓" : "→"} {change}