# UI / UX Rules These rules freeze the approved UI behavior for ALLA OS and CRM-facing work. Future UI should reuse existing dashboard patterns rather than introducing a parallel visual system. ## UX.1 Thai CRM Terminology - `docs/business/crm-terminology.md` is the source of truth for CRM business labels. - Use `src/features/crm/shared/terminology.ts` when CRM UI needs shared stage or role labels. - Keep `CRM` and `Dashboard` in English where the existing product already does so. - Do not rename schema fields, API routes, or internal codes just to match UI wording. ## Dashboard Layout Standards - Use `PageContainer` for dashboard page framing and page headers. - Keep pages inside the existing dashboard shell; do not build a separate CRM shell. - Prefer small, composable sections instead of one oversized page component. - Use cards, tables, and filter bars consistent with existing CRM dashboard and report pages. Reference files: - `src/components/layout/page-container.tsx` - `src/features/crm/dashboard/components/crm-dashboard.tsx` - `src/features/crm/reports/components/pipeline-report-view.tsx` ## Bento Grid Guidelines - Reuse the existing dashboard-card rhythm: summary cards first, then charts/tables/detail sections. - Keep KPI modules visually scannable with clear grouping and limited density per row. - Avoid creating a radically different grid language inside CRM pages. - Match existing spacing, border radius, and card hierarchy from current dashboard/report pages. ## Form Standards - Use TanStack Form via `@/components/ui/tanstack-form`. - Use Zod for submit validation. - Reuse field components from `@/components/forms/fields`. - Keep labels and helper text business-readable. - Use `