diff --git a/src/routes/_authenticated/plan/$planId.tsx b/src/routes/_authenticated/plan/$planId.tsx
index 19b9eb6..4da3ea6 100644
--- a/src/routes/_authenticated/plan/$planId.tsx
+++ b/src/routes/_authenticated/plan/$planId.tsx
@@ -165,6 +165,7 @@ function RouteComponent() {
return () => ctx.revert()
}
}, [])
+ const facColor = plan.carreras?.facultades?.color ?? null
return (
@@ -217,13 +218,22 @@ function RouteComponent() {
{/* stats */}
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -231,12 +241,58 @@ function RouteComponent() {
)
}
+function hexToRgbA(hex?: string | null, a = .25) {
+ if (!hex) return `rgba(37,99,235,${a})`
+ const h = hex.replace("#", "")
+ const v = h.length === 3 ? h.split("").map(c => c + c).join("") : h
+ const n = parseInt(v, 16)
+ const r = (n >> 16) & 255, g = (n >> 8) & 255, b = n & 255
+ return `rgba(${r},${g},${b},${a})`
+}
+
+const fmt = (n?: number | null) => (n !== null && n !== undefined) ? Intl.NumberFormat().format(n) : "—"
/* ===== UI bits ===== */
-function KV({ label, value, className = '' }: { label: string; value?: string | number | null; className?: string }) {
+type StatProps = {
+ label: string
+ value?: React.ReactNode
+ Icon?: React.ComponentType>
+ accent?: string | null // color de facultad (hex) opcional
+ className?: string
+ title?: string
+}
+function StatCard({ label, value = "—", Icon = Icons.Info, accent, className = "", title }: StatProps) {
+ const border = hexToRgbA(accent, .28)
+ const chipBg = hexToRgbA(accent, .08)
+ const glow = hexToRgbA(accent, .14)
+
return (
-
-
{label}
-
{value ?? '—'}
+
+
+
+
+ {value}
+
+
+ {/* glow sutil en hover */}
+
)
}