REST API Endpoints
GET /api/health — Status & B2 health
GET /api/folders — List all folders with counts
POST /api/folders — Create folder
GET /api/notes?folder_id=...&search=... — Notes list
POST /api/notes — Create note (syncs to B2)
PUT /api/notes/:id — Update note
DELETE /api/notes/:id — Move to trash / delete
POST /api/notes/:id/pin — Toggle pinned state
POST /api/notes/:id/attachments — Upload image/drawing to B2
POST /api/sync — Batch offline reconciliation