- Server component at /portal/templates/[id] queries documentTemplates with formTemplate relation
- notFound() for archived/missing templates
- TemplatePageClient: state owner mirroring DocumentPageClient pattern
- deriveRolesFromFields initializes Buyer/Seller defaults or extracts from existing fields
- handlePersist merges textFillData hints into f.hint for type='text' fields
- handleAiAutoPlace POSTs to /api/templates/[id]/ai-prepare and increments aiPlacementKey
- Role rename/remove re-fetches fields and PATCHes with updated signerEmail values
- TemplatePanel: 280px right panel with inline styles matching portal design system
- Signers/Roles section with color dots, click-to-rename, remove with ConfirmDialog
- Add role input with preset chips (Buyer, Co-Buyer, Seller, Co-Seller)
- AI Auto-place button (navy) with spinner/loading state and error display
- Save Template button (gold) with success 'Saved' text fading after 3s