'use client'; /* KpiCardMobile — phase 03 (DASH-01). * * Phone-sized KPI card for the 2×2 dashboard grid. Renders a label, * a large numeric value, and an optional caption. tone="attention" * adds a left-edge destructive border for SLA breaches > 0. * * Pure presentational — no fetch, no state. Parent provides values. */ import { Card, CardContent } from '@/components/ui/card'; import { cn } from '@/lib/utils'; export type KpiTone = 'default' | 'attention'; interface KpiCardMobileProps { label: string; value: number | string; caption?: string; tone?: KpiTone; } const TONE_BORDER: Record = { default: 'border-l-transparent', attention: 'border-l-destructive', }; export function KpiCardMobile({ label, value, caption, tone = 'default' }: KpiCardMobileProps) { const display = typeof value === 'number' ? value.toLocaleString() : value; return (

{label}

{display}

{caption &&

{caption}

}
); }