'use client'; interface CountdownRingProps { progress: number; // 0-1, where 1 = full, 0 = empty size?: number; strokeWidth?: number; color?: string; trackColor?: string; children?: React.ReactNode; } export function CountdownRing({ progress, size = 200, strokeWidth = 8, color, trackColor = 'var(--cm-surface-muted)', children, }: CountdownRingProps) { const radius = (size - strokeWidth) / 2; const circumference = 2 * Math.PI * radius; const offset = circumference * (1 - Math.min(1, Math.max(0, progress))); // Color transitions: green → yellow → orange → red const dynamicColor = color ?? getProgressColor(progress); return (