diff --git a/migrations/1777003849000_add-personal-notes.js b/migrations/1777003849000_add-personal-notes.js
new file mode 100644
index 0000000..94f91e8
--- /dev/null
+++ b/migrations/1777003849000_add-personal-notes.js
@@ -0,0 +1,25 @@
+/**
+ * Personal Notes — lightweight per-user scratchpad living under
+ * Clinical Tools. Distinct from user_memories (which feed AI
+ * prompts as style hints / templates): personal_notes are pure
+ * clinician notes, never injected into an AI call. Title + rich-
+ * text body, encrypted at rest like memories so row dumps are
+ * useless without the app crypto key.
+ */
+
+exports.up = (pgm) => {
+ pgm.createTable('personal_notes', {
+ id: { type: 'serial', primaryKey: true },
+ user_id: { type: 'integer', notNull: true, references: 'users(id)', onDelete: 'CASCADE' },
+ title: { type: 'text', notNull: true },
+ body: { type: 'text', notNull: true, default: '' },
+ created_at: { type: 'timestamptz', notNull: true, default: pgm.func('NOW()') },
+ updated_at: { type: 'timestamptz', notNull: true, default: pgm.func('NOW()') },
+ });
+ pgm.createIndex('personal_notes', 'user_id');
+ pgm.createIndex('personal_notes', ['user_id', 'updated_at']);
+};
+
+exports.down = (pgm) => {
+ pgm.dropTable('personal_notes');
+};
diff --git a/public/components/notes.html b/public/components/notes.html
new file mode 100644
index 0000000..e137c58
--- /dev/null
+++ b/public/components/notes.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Recording
+ 00:00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Hello 👋
+
Pick a note on the left, or start a fresh one. You can type, paste, or tap Dictate to let AI clean up your voice into a polished note.
+
+
+
Press Ctrl+S to save
+
Dictate works even offline with Browser Whisper
+
Encrypted at rest — only you can read them
+
+
+
+
+
diff --git a/public/css/styles.css b/public/css/styles.css
index 2dffdca..5eae5ea 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -853,3 +853,100 @@ textarea.full-input{resize:vertical;}
.lh-webdav-dir{color:var(--g700);font-weight:500;}
.lh-webdav-file{color:var(--g600);}
.lh-webdav-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+
+/* ── Notes tab — personal scratchpad (under Clinical Tools) ───── */
+.notes-layout{display:grid;grid-template-columns:320px 1fr;gap:14px;align-items:flex-start;min-height:70vh;}
+@media (max-width:900px){.notes-layout{grid-template-columns:1fr;}}
+
+.notes-sidebar{background:white;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;max-height:80vh;}
+.notes-sidebar-head{padding:10px;border-bottom:1px solid var(--g200);background:var(--g50);display:flex;flex-direction:column;gap:8px;}
+.notes-new-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;font-size:13px;font-weight:600;}
+.notes-search{position:relative;}
+.notes-search i{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:var(--g400);font-size:12px;pointer-events:none;}
+.notes-search input{width:100%;padding:7px 10px 7px 30px;border:1px solid var(--g300);border-radius:6px;font-size:13px;font-family:inherit;box-sizing:border-box;background:white;}
+.notes-search input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-light);}
+
+.notes-list{flex:1;overflow-y:auto;padding:4px;}
+.notes-empty{padding:24px 14px;text-align:center;color:var(--g400);font-size:13px;line-height:1.5;}
+.notes-list-item{display:block;width:100%;text-align:left;padding:10px 12px;border:none;background:transparent;border-radius:8px;cursor:pointer;margin-bottom:2px;font-family:inherit;transition:background 0.1s;border-left:3px solid transparent;}
+.notes-list-item:hover{background:var(--g50);}
+.notes-list-item.active{background:var(--blue-light);border-left-color:var(--blue);}
+.notes-list-title{font-size:13.5px;font-weight:600;color:var(--g800);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px;}
+.notes-list-snippet{font-size:12px;color:var(--g500);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;}
+.notes-list-when{font-size:11px;color:var(--g400);margin-top:4px;}
+
+.notes-editor{background:white;border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:70vh;}
+.notes-editor.hidden{display:none;}
+.notes-editor-head{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--g200);background:var(--g50);border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);flex-wrap:wrap;}
+.notes-title-input{flex:1;min-width:180px;padding:8px 10px;border:1px solid transparent;border-radius:6px;font-size:16px;font-weight:600;color:var(--g900);font-family:inherit;background:transparent;}
+.notes-title-input:focus{outline:none;background:white;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-light);}
+.notes-editor-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
+.notes-status{font-size:12px;color:var(--g500);min-width:60px;text-align:right;}
+.notes-status-dirty{color:var(--amber);}
+.notes-status-saving{color:var(--g500);}
+.notes-status-ok{color:#059669;}
+.notes-status-err{color:var(--red);}
+
+.notes-body-editor{flex:1;display:flex;flex-direction:column;min-height:280px;}
+.notes-body-editor .tp-toolbar{position:sticky;top:0;z-index:5;}
+.notes-body-editor .tp-content{flex:1;padding:14px 18px;font-size:14px;line-height:1.6;color:var(--g800);overflow-y:auto;min-height:220px;}
+.notes-body-editor .tp-content:focus-within .ProseMirror{outline:none;}
+.notes-body-editor .ProseMirror{outline:none;min-height:200px;}
+.notes-body-editor .ProseMirror p{margin:0 0 8px;}
+.notes-body-editor .ProseMirror h2{font-size:18px;font-weight:700;color:var(--g900);margin:16px 0 8px;}
+.notes-body-editor .ProseMirror h3{font-size:15px;font-weight:700;color:var(--g800);margin:12px 0 6px;}
+.notes-body-editor .ProseMirror ul,.notes-body-editor .ProseMirror ol{margin:0 0 8px 24px;}
+.notes-body-editor .ProseMirror blockquote{border-left:3px solid var(--g300);margin:0 0 8px;padding:2px 0 2px 12px;color:var(--g600);font-style:italic;}
+.notes-body-editor .ProseMirror pre{background:var(--g900);color:#e5e7eb;padding:10px 14px;border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;overflow-x:auto;margin:0 0 8px;}
+.notes-body-editor .ProseMirror code{background:var(--g100);padding:1px 5px;border-radius:4px;font-size:12.5px;}
+.notes-body-editor .ProseMirror a{color:var(--blue);text-decoration:underline;}
+.notes-body-editor .notes-body-fallback{width:100%;height:100%;min-height:260px;padding:14px 18px;border:none;font-size:14px;line-height:1.6;font-family:inherit;color:var(--g800);resize:vertical;box-sizing:border-box;}
+
+.notes-editor-foot{padding:8px 14px;border-top:1px solid var(--g200);font-size:11px;color:var(--g400);display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;}
+.notes-meta{font-size:11px;color:var(--g400);}
+
+.notes-empty-state{background:white;border-radius:var(--radius);box-shadow:var(--shadow);padding:60px 24px;text-align:center;color:var(--g400);display:flex;flex-direction:column;align-items:center;gap:14px;min-height:70vh;justify-content:center;}
+.notes-empty-state i{font-size:64px;color:var(--g300);}
+.notes-empty-state p{font-size:14px;line-height:1.5;max-width:320px;margin:0;}
+.notes-empty-state.hidden{display:none;}
+
+/* Voice-to-note recording bar inside the editor head */
+.notes-voice-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:0;}
+.notes-voice-bar .btn-sm{font-size:12px;padding:6px 10px;}
+.notes-rec-indicator{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--red);font-weight:600;}
+.notes-rec-indicator .pulse-dot{width:8px;height:8px;background:var(--red);border-radius:50%;animation:notes-pulse 1.2s ease-in-out infinite;}
+.notes-rec-indicator .pulse-dot.paused{animation:none;opacity:0.5;}
+@keyframes notes-pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:0.35;transform:scale(1.25);}}
+.notes-rec-timer{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--g600);}
+
+/* Notes — friendlier touches */
+.notes-empty-state .notes-empty-card{max-width:440px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:12px;}
+.notes-empty-icon{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#fef3c7,#fde68a);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(245,158,11,0.25);}
+.notes-empty-icon i{font-size:30px;color:#b45309;}
+.notes-empty-state h3{margin:4px 0 0;font-size:20px;font-weight:600;color:var(--g800);}
+.notes-empty-state p{font-size:14px;line-height:1.55;color:var(--g500);margin:0;}
+.notes-empty-cta{margin-top:4px;padding:10px 20px;border-radius:10px;font-weight:600;display:inline-flex;align-items:center;gap:8px;box-shadow:0 2px 6px rgba(37,99,235,0.25);}
+.notes-empty-cta:hover{box-shadow:0 4px 10px rgba(37,99,235,0.35);}
+.notes-empty-tips{margin-top:16px;display:flex;flex-direction:column;gap:8px;font-size:12.5px;color:var(--g500);text-align:left;align-self:stretch;padding:14px 18px;background:var(--g50);border-radius:10px;}
+.notes-empty-tips div{display:flex;align-items:center;gap:10px;}
+.notes-empty-tips i{color:var(--blue);font-size:13px;width:16px;text-align:center;}
+.notes-empty-tips kbd{background:white;border:1px solid var(--g300);border-radius:4px;padding:1px 6px;font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;box-shadow:0 1px 0 var(--g200);}
+
+.notes-list-item{position:relative;transition:background 0.15s, transform 0.15s;}
+.notes-list-item:hover{transform:translateX(1px);}
+.notes-list-item.active{box-shadow:inset 0 0 0 1px var(--blue-light);}
+
+.notes-sidebar-head{padding:12px;}
+.notes-new-btn{border-radius:10px;padding:9px 14px;font-size:13.5px;box-shadow:0 1px 3px rgba(37,99,235,0.2);}
+.notes-new-btn:hover{box-shadow:0 2px 6px rgba(37,99,235,0.3);}
+
+.notes-title-input{font-size:18px;letter-spacing:-0.01em;}
+.notes-title-input::placeholder{color:var(--g400);font-weight:500;}
+
+.notes-editor-head{gap:12px;padding:12px 16px;}
+.notes-body-editor{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);}
+.notes-body-editor .tp-toolbar{border-bottom:1px solid var(--g100);background:#fdfdfd;}
+
+/* subtle card float on hover for the whole editor */
+.notes-editor{transition:box-shadow 0.2s;}
+.notes-editor:hover{box-shadow:0 4px 16px rgba(0,0,0,0.06);}
diff --git a/public/index.html b/public/index.html
index 718db31..f263044 100644
--- a/public/index.html
+++ b/public/index.html
@@ -248,6 +248,10 @@
Pagers & Extensions
+