// AFTER — Dashboard screen const { useState: useStateDB, useMemo: useMemoDb } = React; const DB = { cream: '#fafaf8', black: '#0f0f0f', green: '#3d6b4f', gray: '#6b6b6b', border: '#e2e0db', greenLight: '#e8f0eb', }; const dbStyles = { screen: { background: DB.cream, height: '100%', display: 'flex', flexDirection: 'column' }, scroll: { flex: 1, overflowY: 'auto', padding: '64px 20px 20px' }, headerRow: { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', marginBottom: 24 }, greeting: { fontFamily: '"DM Serif Display", Georgia, serif', fontSize: 30, color: DB.black, lineHeight: 1.2 }, greetingSub: { fontFamily: '"DM Sans", system-ui', fontSize: 14, color: DB.gray, marginTop: 4 }, signOut: { fontFamily: '"DM Sans", system-ui', fontSize: 14, fontWeight: 500, color: DB.gray, cursor: 'pointer', paddingTop: 4 }, card: { background: DB.cream, border: `1px solid ${DB.border}`, borderRadius: 16, padding: 20, marginBottom: 12 }, cardLabel: { fontFamily: '"DM Sans", system-ui', fontSize: 12, fontWeight: 600, color: DB.gray, textTransform: 'uppercase', letterSpacing: '.05em', marginBottom: 12 }, todayLabel: { fontFamily: '"DM Sans", system-ui', fontSize: 14, color: DB.gray }, weightValue: { fontFamily: '"DM Sans", system-ui', fontSize: 36, fontWeight: 600, color: DB.black, lineHeight: 1.1, marginTop: 4, marginBottom: 20 }, input: { height: 48, borderRadius: 12, border: `1px solid ${DB.border}`, background: DB.cream, padding: '0 16px', fontFamily: '"DM Sans", system-ui', fontSize: 16, color: DB.black, outline: 'none', width: '100%', marginBottom: 10, }, btn: { height: 48, borderRadius: 12, background: DB.green, border: 'none', width: '100%', cursor: 'pointer', fontFamily: '"DM Sans", system-ui', fontSize: 16, fontWeight: 600, color: DB.cream, display: 'flex', alignItems: 'center', justifyContent: 'center', }, saved: { fontFamily: '"DM Sans", system-ui', fontSize: 14, fontWeight: 500, color: DB.green, marginTop: 8 }, noiseBody: { fontFamily: '"DM Sans", system-ui', fontSize: 14, color: DB.gray, lineHeight: 1.6, marginBottom: 20 }, chips: { display: 'flex', flexWrap: 'wrap', gap: 8, marginBottom: 20 }, chip: (selected) => ({ width: 40, height: 40, borderRadius: '50%', border: `1px solid ${selected ? DB.green : DB.border}`, background: selected ? DB.green : DB.cream, display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: '"DM Sans", system-ui', fontSize: 14, fontWeight: 600, color: selected ? DB.cream : DB.black, cursor: 'pointer', }), // mini chart chartWrap: { marginTop: 8 }, chartStats: { display: 'flex', gap: 24, marginTop: 12 }, statLabel: { fontFamily: '"DM Sans", system-ui', fontSize: 12, color: DB.gray }, statValue: { fontFamily: '"DM Sans", system-ui', fontSize: 16, fontWeight: 600, color: DB.black }, }; // Simple sparkline SVG function WeightSparkline() { const pts = [184.2, 183.8, 183.5, 183.9, 183.1, 182.8, 182.4]; const W = 310, H = 60, PAD = 8; const min = Math.min(...pts), max = Math.max(...pts), range = max - min || 1; const xs = pts.map((_, i) => PAD + (i / (pts.length - 1)) * (W - PAD * 2)); const ys = pts.map(v => H - PAD - ((v - min) / range) * (H - PAD * 2)); const d = xs.map((x, i) => `${i === 0 ? 'M' : 'L'} ${x} ${ys[i]}`).join(' '); const fill = xs.map((x, i) => `${i === 0 ? 'M' : 'L'} ${x} ${ys[i]}`).join(' ') + ` L ${xs[xs.length-1]} ${H} L ${xs[0]} ${H} Z`; return ( ); } function DashboardScreen() { const [weightInput, setWeightInput] = useStateDB(''); const [score, setScore] = useStateDB(4); return (