@duckcodeailabs/dql-ui 1.0.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/icons/dql-glyphs.d.ts +19 -0
  2. package/dist/icons/dql-glyphs.d.ts.map +1 -0
  3. package/dist/icons/dql-glyphs.js +23 -0
  4. package/dist/icons/dql-glyphs.js.map +1 -0
  5. package/dist/icons/index.d.ts +3 -0
  6. package/dist/icons/index.d.ts.map +1 -0
  7. package/dist/icons/index.js +9 -0
  8. package/dist/icons/index.js.map +1 -0
  9. package/dist/index.d.ts +7 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +14 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/primitives/CellChrome.d.ts +43 -0
  14. package/dist/primitives/CellChrome.d.ts.map +1 -0
  15. package/dist/primitives/CellChrome.js +46 -0
  16. package/dist/primitives/CellChrome.js.map +1 -0
  17. package/dist/primitives/Kbd.d.ts +12 -0
  18. package/dist/primitives/Kbd.d.ts.map +1 -0
  19. package/dist/primitives/Kbd.js +23 -0
  20. package/dist/primitives/Kbd.js.map +1 -0
  21. package/dist/primitives/PanelFrame.d.ts +67 -0
  22. package/dist/primitives/PanelFrame.d.ts.map +1 -0
  23. package/dist/primitives/PanelFrame.js +27 -0
  24. package/dist/primitives/PanelFrame.js.map +1 -0
  25. package/dist/primitives/PublishedCellChrome.d.ts +20 -0
  26. package/dist/primitives/PublishedCellChrome.d.ts.map +1 -0
  27. package/dist/primitives/PublishedCellChrome.js +47 -0
  28. package/dist/primitives/PublishedCellChrome.js.map +1 -0
  29. package/dist/primitives/SegmentedControl.d.ts +16 -0
  30. package/dist/primitives/SegmentedControl.d.ts.map +1 -0
  31. package/dist/primitives/SegmentedControl.js +33 -0
  32. package/dist/primitives/SegmentedControl.js.map +1 -0
  33. package/dist/primitives/Shell.d.ts +44 -0
  34. package/dist/primitives/Shell.d.ts.map +1 -0
  35. package/dist/primitives/Shell.js +78 -0
  36. package/dist/primitives/Shell.js.map +1 -0
  37. package/dist/primitives/TrustBadge.d.ts +8 -0
  38. package/dist/primitives/TrustBadge.d.ts.map +1 -0
  39. package/dist/primitives/TrustBadge.js +13 -0
  40. package/dist/primitives/TrustBadge.js.map +1 -0
  41. package/dist/tokens/index.d.ts +5 -0
  42. package/dist/tokens/index.d.ts.map +1 -1
  43. package/dist/tokens/index.js +14 -1
  44. package/dist/tokens/index.js.map +1 -1
  45. package/package.json +12 -4
  46. package/src/styles/globals.css +518 -0
  47. package/src/styles/panel.css +448 -0
  48. package/src/styles/tokens.css +1977 -0
@@ -0,0 +1,1977 @@
1
+ /* ============================================================
2
+ DQL — Luna design tokens (ported from DataLex).
3
+ Three themes under [data-theme="obsidian"|"paper"|"white"].
4
+ Consumed via the @theme bridge in globals.css, so switching the
5
+ data-theme attribute on <html> re-skins every Tailwind utility.
6
+ ============================================================ */
7
+
8
+ :root {
9
+ /* Typography (shared) — Hex handoff: Inter UI + JetBrains Mono code. */
10
+ --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
+ --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
12
+ --font-hand: "Caveat", cursive;
13
+ --font-sketch: "Kalam", "Caveat", cursive;
14
+
15
+ /* Density (default: comfortable) */
16
+ --row-h: 26px;
17
+ --row-fs: 12px;
18
+ --row-px: 10px;
19
+ --card-header-h: 32px;
20
+ --card-width: 240px;
21
+ --card-radius: 8px;
22
+
23
+ /* Motion */
24
+ --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
25
+
26
+ /* ================================================================
27
+ DEFAULT THEME = Obsidian (neutral dark, Linear / Vercel style)
28
+ Overridden by [data-theme="paper"|"white"] blocks below.
29
+ ================================================================ */
30
+ color-scheme: dark;
31
+ /* v1.4 obsidian palette — ported from DQL New-UI handoff. Deeper
32
+ charcoal canvas, slightly warmer card surfaces, hairline borders
33
+ that read on the #0b0d12 base without muddying code. */
34
+ --bg-0: #0b0d12;
35
+ --bg-1: #11141b;
36
+ --bg-2: #161a23;
37
+ --bg-3: #1c212d;
38
+ --bg-4: #242938;
39
+ --bg-canvas: #0b0d12;
40
+ --bg-grid: rgba(255,255,255,0.025);
41
+
42
+ --border-subtle: #1b1f28;
43
+ --border-default: #232833;
44
+ --border-strong: #2c3240;
45
+ --border-focus: #5b8cff;
46
+
47
+ --text-primary: #e6e8ee;
48
+ --text-secondary: #9aa0ae;
49
+ --text-tertiary: #626878;
50
+ --text-muted: #4a5060;
51
+
52
+ --accent: #5b8cff;
53
+ --accent-hover: #7aa2ff;
54
+ --accent-dim: rgba(91, 140, 255, 0.14);
55
+ --accent-fg: #0b0d12;
56
+ --accent-on: #0b0d12; /* legacy alias — prefer --accent-fg */
57
+
58
+ /* Neutral hover (generic surface hover — lists, menu items, small buttons) */
59
+ --bg-hover: rgba(255, 255, 255, 0.045);
60
+
61
+ /* Status semantics (error / warning / success / info) — each theme
62
+ supplies a tuned hue + 0.10-0.14 background + 0.30-0.40 border so
63
+ alerts read clean on every surface. Obsidian keeps saturation low
64
+ so semantic colors read as "muted" — distinct but never shouty. */
65
+ --status-error: #f87171;
66
+ --status-error-bg: rgba(248, 113, 113, 0.10);
67
+ --status-error-border: rgba(248, 113, 113, 0.30);
68
+ --status-warning: #fbbf24;
69
+ --status-warning-bg: rgba(251, 191, 36, 0.10);
70
+ --status-warning-border: rgba(251, 191, 36, 0.30);
71
+ --status-success: #4ade80;
72
+ --status-success-bg: rgba(74, 222, 128, 0.10);
73
+ --status-success-border: rgba(74, 222, 128, 0.30);
74
+ --status-info: var(--accent);
75
+ --status-info-bg: var(--accent-dim);
76
+ --status-info-border: rgba(79, 139, 255, 0.30);
77
+
78
+ --pk: #e3b341;
79
+ --fk: #a29bff;
80
+ --idx: #6fd0bb;
81
+ --nn: #6e6e73;
82
+ --nullable: #a29bff;
83
+
84
+ --cat-users: #a29bff;
85
+ --cat-users-soft: rgba(162, 155, 255, 0.10);
86
+ --cat-billing: #4ade80;
87
+ --cat-billing-soft: rgba(74, 222, 128, 0.10);
88
+ --cat-product: #fb923c;
89
+ --cat-product-soft: rgba(251, 146, 60, 0.10);
90
+ --cat-system: #a1a1a6;
91
+ --cat-system-soft: rgba(161, 161, 166, 0.10);
92
+ --cat-access: #f472b6;
93
+ --cat-access-soft: rgba(244, 114, 182, 0.10);
94
+ --cat-audit: #38bdf8;
95
+ --cat-audit-soft: rgba(56, 189, 248, 0.10);
96
+
97
+ --rel-line: #3a3b40;
98
+ --rel-line-strong: #6e6e73;
99
+ --rel-line-active: #ededee;
100
+ --rel-line-dim: rgba(58,59,64,0.5);
101
+
102
+ /* SQL syntax palette (obsidian) — calm, lower-saturation tones so
103
+ the pane reads as neutral instead of party-colored. */
104
+ --sql-keyword: #9cc7ff; /* CREATE, SELECT, JOIN — sky blue */
105
+ --sql-type: #7fd4bf; /* INT, VARCHAR, etc — teal */
106
+ --sql-string: #7fd49c; /* 'abc' — soft green */
107
+ --sql-number: #ffc48c; /* 42, 3.14 — warm amber */
108
+ --sql-function: #e0d89c; /* now(), count() — soft yellow */
109
+ --sql-punctuation: #8b8b92;
110
+ --sql-ident: var(--text-primary);
111
+ --sql-comment: var(--text-tertiary);
112
+
113
+ --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.35);
114
+ --shadow-pop: 0 20px 50px rgba(0,0,0,0.5);
115
+ --scrim: rgba(0,0,0,0.5);
116
+
117
+ /* ============================================================
118
+ Cell-type accent palette (DQL New-UI handoff)
119
+ Each cell type has a tone color used for: pill badge text,
120
+ pill badge background (12% alpha), pill border (50% alpha),
121
+ and the left-edge focus ring when the cell is selected.
122
+ ============================================================ */
123
+ --cell-md: #2fb97a;
124
+ --cell-sql: #3b8ef0;
125
+ --cell-chart: #b067f7;
126
+ --cell-filter: #f26a6a;
127
+ --cell-pivot: #e5a84d;
128
+ --cell-table: #5dd1c8;
129
+ --cell-text: #4a8aef;
130
+ --cell-chat: #8a8f9b;
131
+ --cell-single: #b067f7;
132
+ --cell-kpi: #b067f7;
133
+ --cell-insight: #ffc857;
134
+ --cell-callout: #ff7ac6;
135
+ --cell-goal: #61d095;
136
+ --cell-compare: #7fd4ff;
137
+ --cell-heatmap: #ff9966;
138
+ --cell-narrative:#ffc857;
139
+ --cell-inputs: #9aa0ae;
140
+ --cell-block: #6b8afd;
141
+ }
142
+
143
+ /* Explicit obsidian alias (same as :root default) */
144
+ [data-theme="obsidian"] {
145
+ color-scheme: dark;
146
+ }
147
+
148
+ /* ================================================================
149
+ PAPER — warm light (off-white, print-like, deep ink palette)
150
+ Retuned v1.3.2: crisper gutters, stronger editor borders, inked
151
+ syntax palette — eliminates the washed-out bleed on code surfaces.
152
+ ================================================================ */
153
+ [data-theme="paper"] {
154
+ color-scheme: light;
155
+ /* Hex notebook palette — warm off-white canvas, white surfaces */
156
+ --bg-0: #f3f0ea; /* gutters, chip bg, activity rail inset */
157
+ --bg-1: #fbfaf7; /* app canvas (Hex --bg) */
158
+ --bg-2: #ffffff; /* cards / cells / modals (Hex --surface) */
159
+ --bg-3: #f3f0ea; /* hover / pill bg */
160
+ --bg-4: #e9e6e0; /* subdued elevated */
161
+ --bg-canvas: #fbfaf7;
162
+ --bg-grid: rgba(26, 26, 26, 0.04);
163
+
164
+ --border-subtle: #f0eee9;
165
+ --border-default: #e9e6e0;
166
+ --border-strong: #d9d5cc;
167
+ --border-focus: #6b5dd3;
168
+
169
+ --text-primary: #1a1a1a;
170
+ --text-secondary: #4a4a52;
171
+ --text-tertiary: #8a8d96;
172
+ --text-muted: #b0b2ba;
173
+
174
+ --accent: #6b5dd3; /* Hex purple */
175
+ --accent-hover: #5c4fc2;
176
+ --accent-dim: #f3f0fb; /* Hex --accent-wash */
177
+ --accent-fg: #ffffff;
178
+ --accent-on: #ffffff;
179
+
180
+ --bg-hover: rgba(107, 93, 211, 0.06);
181
+
182
+ --status-error: #c14545;
183
+ --status-error-bg: #fbf2f2;
184
+ --status-error-border: rgba(193, 69, 69, 0.30);
185
+ --status-warning: #b26b1f;
186
+ --status-warning-bg: #fdf6e6;
187
+ --status-warning-border: rgba(178, 107, 31, 0.28);
188
+ --status-success: #2e8b57;
189
+ --status-success-bg: #e8f4ee;
190
+ --status-success-border: rgba(46, 139, 87, 0.30);
191
+ --status-info: var(--accent);
192
+ --status-info-bg: var(--accent-dim);
193
+ --status-info-border: rgba(107, 93, 211, 0.30);
194
+
195
+ --pk: #b26b1f;
196
+ --fk: #6b5dd3;
197
+ --idx: #2e8b57;
198
+ --nn: #8a8d96;
199
+ --nullable: #6b5dd3;
200
+
201
+ --cat-users: #6b5dd3;
202
+ --cat-users-soft: #f3f0fb;
203
+ --cat-billing: #2e8b57;
204
+ --cat-billing-soft: #e8f4ee;
205
+ --cat-product: #f0a04b;
206
+ --cat-product-soft: rgba(240, 160, 75, 0.14);
207
+ --cat-system: #4a4a52;
208
+ --cat-system-soft: #f3f0ea;
209
+ --cat-access: #c14590;
210
+ --cat-access-soft: rgba(193, 69, 144, 0.10);
211
+ --cat-audit: #4a74c9;
212
+ --cat-audit-soft: #eef3fc;
213
+
214
+ --rel-line: #e9e6e0;
215
+ --rel-line-strong: #b0b2ba;
216
+ --rel-line-active: #6b5dd3;
217
+ --rel-line-dim: rgba(233, 230, 224, 0.5);
218
+
219
+ /* SQL syntax palette (Hex light — purple kw, amber strings, etc.) */
220
+ --sql-keyword: #6b5dd3;
221
+ --sql-type: #2e8b57;
222
+ --sql-string: #b26b1f;
223
+ --sql-number: #0a6b5e;
224
+ --sql-function: #f0a04b;
225
+ --sql-punctuation: #4a4a52;
226
+ --sql-ident: var(--text-primary);
227
+ --sql-comment: #8a8d96;
228
+
229
+ --shadow-card: 0 1px 2px rgba(0,0,0,0.02);
230
+ --shadow-pop: 0 10px 30px rgba(26,26,26,0.12);
231
+ --scrim: rgba(26,26,26,0.40);
232
+
233
+ /* Per-cell-kind accent dots (ported verbatim from hex-cells.jsx) */
234
+ --cell-md: #4a4a52;
235
+ --cell-sql: #3b8ef0;
236
+ --cell-chart: #6b5dd3;
237
+ --cell-filter: #c14545;
238
+ --cell-pivot: #e5a84d;
239
+ --cell-table: #5dd1c8;
240
+ --cell-text: #4a4a52;
241
+ --cell-chat: #c14590;
242
+ --cell-single: #6b5dd3;
243
+ --cell-kpi: #6b5dd3;
244
+ --cell-insight: #f0a04b;
245
+ --cell-callout: #c14590;
246
+ --cell-goal: #2e8b57;
247
+ --cell-compare: #4a74c9;
248
+ --cell-heatmap: #f0a04b;
249
+ --cell-narrative:#f0a04b;
250
+ --cell-inputs: #d4a14a;
251
+ --cell-block: #6b5dd3;
252
+ }
253
+
254
+ /* ================================================================
255
+ WHITE — plain analyst-report white (Metabase / Hex / Notion feel)
256
+ Clean #ffffff surfaces, cool-grey structure, blue brand accent.
257
+ Purpose-built for printable reports and exec-facing digests.
258
+ ================================================================ */
259
+ [data-theme="white"] {
260
+ color-scheme: light;
261
+ --bg-0: #f5f6f8;
262
+ --bg-1: #ffffff;
263
+ --bg-2: #ffffff;
264
+ --bg-3: #eef0f3;
265
+ --bg-4: #e1e4e9;
266
+ --bg-canvas: #f7f8fa;
267
+ --bg-grid: rgba(15, 23, 42, 0.04);
268
+
269
+ --border-subtle: rgba(15, 23, 42, 0.08);
270
+ --border-default: rgba(15, 23, 42, 0.14);
271
+ --border-strong: rgba(15, 23, 42, 0.22);
272
+ --border-focus: #2563eb;
273
+
274
+ --text-primary: #0f172a;
275
+ --text-secondary: #475569;
276
+ --text-tertiary: #64748b;
277
+ --text-muted: #94a3b8;
278
+
279
+ --accent: #2563eb;
280
+ --accent-hover: #1d4ed8;
281
+ --accent-dim: rgba(37, 99, 235, 0.10);
282
+ --accent-fg: #ffffff;
283
+ --accent-on: #ffffff;
284
+
285
+ --bg-hover: rgba(15, 23, 42, 0.045);
286
+
287
+ /* White uses crisp, high-contrast semantic tones — a report should
288
+ make a red cell *read* as alarm at a glance. */
289
+ --status-error: #dc2626;
290
+ --status-error-bg: rgba(220, 38, 38, 0.08);
291
+ --status-error-border: rgba(220, 38, 38, 0.30);
292
+ --status-warning: #ca8a04;
293
+ --status-warning-bg: rgba(202, 138, 4, 0.10);
294
+ --status-warning-border: rgba(202, 138, 4, 0.32);
295
+ --status-success: #16a34a;
296
+ --status-success-bg: rgba(22, 163, 74, 0.08);
297
+ --status-success-border: rgba(22, 163, 74, 0.30);
298
+ --status-info: var(--accent);
299
+ --status-info-bg: var(--accent-dim);
300
+ --status-info-border: rgba(37, 99, 235, 0.30);
301
+
302
+ --pk: #ca8a04;
303
+ --fk: #7c3aed;
304
+ --idx: #0891b2;
305
+ --nn: #64748b;
306
+ --nullable: #7c3aed;
307
+
308
+ --cat-users: #7c3aed;
309
+ --cat-users-soft: rgba(124, 58, 237, 0.09);
310
+ --cat-billing: #16a34a;
311
+ --cat-billing-soft: rgba(22, 163, 74, 0.09);
312
+ --cat-product: #ea580c;
313
+ --cat-product-soft: rgba(234, 88, 12, 0.09);
314
+ --cat-system: #64748b;
315
+ --cat-system-soft: rgba(100, 116, 139, 0.10);
316
+ --cat-access: #db2777;
317
+ --cat-access-soft: rgba(219, 39, 119, 0.09);
318
+ --cat-audit: #0891b2;
319
+ --cat-audit-soft: rgba(8, 145, 178, 0.09);
320
+
321
+ --rel-line: #cbd5e1;
322
+ --rel-line-strong: #64748b;
323
+ --rel-line-active: #2563eb;
324
+ --rel-line-dim: rgba(203, 213, 225, 0.5);
325
+
326
+ /* SQL syntax palette (white) — crisp, modern IDE tones on pure white.
327
+ Tuned for Metabase/Hex-style report surfaces: high-contrast and
328
+ easy to scan. */
329
+ --sql-keyword: #1d4ed8; /* crisp blue */
330
+ --sql-type: #0891b2; /* cyan */
331
+ --sql-string: #15803d; /* emerald */
332
+ --sql-number: #c2410c; /* orange */
333
+ --sql-function: #7c3aed; /* violet */
334
+ --sql-punctuation: #475569;
335
+ --sql-ident: var(--text-primary);
336
+ --sql-comment: #94a3b8;
337
+
338
+ --shadow-card: 0 1px 0 rgba(255,255,255,1) inset, 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
339
+ --shadow-pop: 0 20px 50px rgba(15,23,42,0.14);
340
+ --scrim: rgba(15,23,42,0.30);
341
+
342
+ /* Cell-type palette — white (crisp report tones on #ffffff) */
343
+ --cell-md: #15803d;
344
+ --cell-sql: #1d4ed8;
345
+ --cell-chart: #7c3aed;
346
+ --cell-filter: #dc2626;
347
+ --cell-pivot: #ca8a04;
348
+ --cell-table: #0891b2;
349
+ --cell-text: #1d4ed8;
350
+ --cell-chat: #64748b;
351
+ --cell-single: #7c3aed;
352
+ --cell-kpi: #7c3aed;
353
+ --cell-insight: #ca8a04;
354
+ --cell-callout: #db2777;
355
+ --cell-goal: #16a34a;
356
+ --cell-compare: #0891b2;
357
+ --cell-heatmap: #ea580c;
358
+ --cell-narrative:#ca8a04;
359
+ --cell-inputs: #64748b;
360
+ --cell-block: #2563eb;
361
+ }
362
+
363
+ [data-density="compact"] {
364
+ --row-h: 20px;
365
+ --row-fs: 11px;
366
+ --row-px: 8px;
367
+ --card-header-h: 26px;
368
+ --card-width: 210px;
369
+ }
370
+
371
+ [data-density="detailed"] {
372
+ --row-h: 32px;
373
+ --row-fs: 13px;
374
+ --row-px: 12px;
375
+ --card-header-h: 38px;
376
+ --card-width: 280px;
377
+ }
378
+
379
+ /* ============================================================
380
+ Reset
381
+ ============================================================ */
382
+ * { box-sizing: border-box; margin: 0; padding: 0; }
383
+ html, body { height: 100%; }
384
+ body {
385
+ font-family: var(--font-ui);
386
+ font-size: 13px;
387
+ color: var(--text-primary);
388
+ background: var(--bg-0);
389
+ overflow: hidden;
390
+ -webkit-font-smoothing: antialiased;
391
+ -moz-osx-font-smoothing: grayscale;
392
+ }
393
+ button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
394
+ input { font: inherit; color: inherit; }
395
+ :focus { outline: none; }
396
+
397
+ /* scrollbars */
398
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
399
+ ::-webkit-scrollbar-track { background: transparent; }
400
+ ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
401
+ ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: padding-box; border: 2px solid transparent; }
402
+
403
+ /* ============================================================
404
+ App shell grid
405
+ ============================================================ */
406
+ .app {
407
+ display: grid;
408
+ grid-template-rows: 44px 36px 1fr 26px;
409
+ grid-template-columns: 260px 1fr var(--right-w, 320px);
410
+ grid-template-areas:
411
+ "topbar topbar topbar"
412
+ "tabs tabs tabs"
413
+ "left canvas right"
414
+ "status status status";
415
+ height: 100vh;
416
+ background: var(--bg-0);
417
+ }
418
+ /* When the right panel is closed the shell collapses the slot entirely,
419
+ giving the canvas the extra horizontal room. The JSX sets this class on
420
+ `.app` via `!rightPanelOpen`. */
421
+ .app.no-right {
422
+ grid-template-columns: 260px 1fr 0;
423
+ }
424
+
425
+ /* ============================================================
426
+ Top bar
427
+ ============================================================ */
428
+ .topbar {
429
+ grid-area: topbar;
430
+ display: flex;
431
+ align-items: center;
432
+ padding: 0 14px;
433
+ gap: 14px;
434
+ background: var(--bg-1);
435
+ border-bottom: 1px solid var(--border-subtle);
436
+ -webkit-app-region: drag;
437
+ }
438
+ .topbar > * { -webkit-app-region: no-drag; }
439
+
440
+ .traffic-lights {
441
+ display: flex;
442
+ gap: 8px;
443
+ margin-right: 6px;
444
+ }
445
+ .traffic-lights span {
446
+ width: 12px; height: 12px; border-radius: 50%;
447
+ background: #3d4150;
448
+ }
449
+ .traffic-lights span:nth-child(1) { background: #ff5f57; }
450
+ .traffic-lights span:nth-child(2) { background: #ffbd2e; }
451
+ .traffic-lights span:nth-child(3) { background: #28c840; }
452
+
453
+ .brand {
454
+ display: flex; align-items: center; gap: 8px;
455
+ font-weight: 600; font-size: 13px;
456
+ padding-right: 14px;
457
+ border-right: 1px solid var(--border-subtle);
458
+ }
459
+ .brand-mark {
460
+ width: 22px; height: 22px; border-radius: 6px;
461
+ background: linear-gradient(135deg, #5b8cff 0%, #7c5cff 100%);
462
+ display: grid; place-items: center;
463
+ font-size: 11px; font-weight: 700; color: #fff;
464
+ letter-spacing: -0.02em;
465
+ }
466
+
467
+ .toolbar {
468
+ display: flex;
469
+ align-items: center;
470
+ gap: 2px;
471
+ flex: 1;
472
+ }
473
+ .tool-group {
474
+ display: flex; align-items: center; gap: 2px;
475
+ padding: 0 6px;
476
+ border-right: 1px solid var(--border-subtle);
477
+ height: 28px;
478
+ }
479
+ .tool-group:last-child { border-right: 0; }
480
+
481
+ .tool-btn {
482
+ display: inline-flex; align-items: center; gap: 6px;
483
+ height: 28px; padding: 0 8px;
484
+ border-radius: 6px;
485
+ color: var(--text-secondary);
486
+ font-size: 12px;
487
+ transition: all 120ms var(--ease);
488
+ }
489
+ .tool-btn:hover { background: var(--bg-3); color: var(--text-primary); }
490
+ .tool-btn.active { background: var(--bg-3); color: var(--accent); }
491
+ .tool-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
492
+ .tool-btn:disabled { cursor: not-allowed; }
493
+
494
+ /* Segmented view switcher — swaps the main canvas surface
495
+ (Diagram / Table / Views / Enums). Lives inside the top bar, replacing
496
+ the old static "Diagram" pill. Accent-dim fill marks the active segment
497
+ on every Luna theme. */
498
+ .view-switcher {
499
+ display: inline-flex;
500
+ padding: 2px;
501
+ background: var(--bg-2);
502
+ border: 1px solid var(--border-default);
503
+ border-radius: 7px;
504
+ gap: 2px;
505
+ height: 28px;
506
+ align-items: center;
507
+ }
508
+ .view-seg {
509
+ display: inline-flex; align-items: center; gap: 6px;
510
+ padding: 0 10px;
511
+ height: 22px;
512
+ border-radius: 5px;
513
+ background: transparent;
514
+ color: var(--text-secondary);
515
+ font-size: 11.5px;
516
+ font-weight: 500;
517
+ border: 0;
518
+ cursor: pointer;
519
+ transition: background 120ms var(--ease), color 120ms var(--ease);
520
+ white-space: nowrap;
521
+ }
522
+ .view-seg svg { width: 13px; height: 13px; flex-shrink: 0; }
523
+ .view-seg:hover { color: var(--text-primary); }
524
+ .view-seg.active {
525
+ background: var(--accent-dim);
526
+ color: var(--accent);
527
+ }
528
+
529
+ /* Popover shell shared by BellMenu + UserMenu. Positioned by inline style
530
+ but styling + shadow standardised here. */
531
+ .chrome-popover {
532
+ position: absolute;
533
+ z-index: 60;
534
+ background: var(--bg-2);
535
+ border: 1px solid var(--border-strong);
536
+ border-radius: 10px;
537
+ box-shadow: var(--shadow-pop);
538
+ overflow: hidden;
539
+ }
540
+ .chrome-popover-header {
541
+ display: flex; align-items: center; gap: 8px;
542
+ padding: 10px 12px 8px;
543
+ border-bottom: 1px solid var(--border-subtle);
544
+ font-size: 10.5px;
545
+ font-weight: 600;
546
+ letter-spacing: 0.08em;
547
+ text-transform: uppercase;
548
+ color: var(--text-tertiary);
549
+ }
550
+ .chrome-popover-header .spacer { flex: 1; }
551
+ .chrome-popover-body {
552
+ max-height: 360px;
553
+ overflow: auto;
554
+ padding: 6px;
555
+ }
556
+ .chrome-popover-row {
557
+ display: flex; align-items: center; gap: 10px;
558
+ width: 100%;
559
+ padding: 8px 10px;
560
+ border-radius: 6px;
561
+ background: transparent;
562
+ border: 0;
563
+ color: var(--text-primary);
564
+ text-align: left;
565
+ cursor: pointer;
566
+ font-size: 12px;
567
+ transition: background 120ms var(--ease);
568
+ }
569
+ .chrome-popover-row:hover { background: var(--bg-3); }
570
+ .chrome-popover-row .meta {
571
+ font-size: 10.5px;
572
+ color: var(--text-tertiary);
573
+ font-family: var(--font-mono);
574
+ margin-left: auto;
575
+ flex-shrink: 0;
576
+ }
577
+ .chrome-popover-row.danger { color: #ef4444; }
578
+ .chrome-popover-divider {
579
+ height: 1px;
580
+ background: var(--border-subtle);
581
+ margin: 4px 6px;
582
+ }
583
+
584
+ /* Bell — unread dot */
585
+ .bell-btn { position: relative; }
586
+ .bell-btn .unread-dot {
587
+ position: absolute;
588
+ top: 4px;
589
+ right: 4px;
590
+ width: 7px;
591
+ height: 7px;
592
+ border-radius: 4px;
593
+ background: var(--accent);
594
+ border: 1.5px solid var(--bg-1);
595
+ }
596
+
597
+ /* Shell-view wrapper — used by TableView / ViewsView / EnumsView so they
598
+ occupy the same main canvas grid slot as the diagram and scroll
599
+ independently of the shell chrome. */
600
+ .shell-view {
601
+ grid-area: canvas;
602
+ background: var(--bg-0);
603
+ border-left: 1px solid var(--border-subtle);
604
+ border-right: 1px solid var(--border-subtle);
605
+ display: flex;
606
+ flex-direction: column;
607
+ overflow: hidden;
608
+ min-width: 0;
609
+ }
610
+ .shell-view .panel-frame { flex: 1; min-height: 0; }
611
+ .shell-view-density-toggle {
612
+ display: inline-flex;
613
+ border: 1px solid var(--border-default);
614
+ border-radius: 6px;
615
+ overflow: hidden;
616
+ background: var(--bg-1);
617
+ }
618
+ .shell-view-density-toggle button {
619
+ border: 0;
620
+ background: transparent;
621
+ color: var(--text-secondary);
622
+ font-size: 11px;
623
+ font-weight: 500;
624
+ padding: 5px 10px;
625
+ cursor: pointer;
626
+ }
627
+ .shell-view-density-toggle button.active {
628
+ background: var(--accent-dim);
629
+ color: var(--accent);
630
+ }
631
+ .shell-view-table-wrap {
632
+ max-height: 100%;
633
+ overflow: auto;
634
+ border: 1px solid var(--border-default);
635
+ border-radius: 8px;
636
+ background: var(--bg-1);
637
+ }
638
+ .shell-view-table-wrap .panel-table { border: none; border-radius: 0; }
639
+ .shell-view-table-wrap .panel-table tbody tr { cursor: pointer; }
640
+ .shell-view-table-wrap .panel-table tbody tr.active {
641
+ background: var(--accent-dim);
642
+ box-shadow: inset 2px 0 0 var(--accent);
643
+ }
644
+ .shell-view-checkbox {
645
+ width: 13px; height: 13px;
646
+ accent-color: var(--accent);
647
+ cursor: pointer;
648
+ }
649
+ .shell-view-bulkbar {
650
+ display: flex; align-items: center; gap: 10px;
651
+ padding: 8px 12px;
652
+ background: var(--accent-dim);
653
+ border: 1px solid var(--accent);
654
+ border-radius: 8px;
655
+ font-size: 11.5px;
656
+ color: var(--text-primary);
657
+ margin-bottom: 10px;
658
+ }
659
+ .shell-view-bulkbar .spacer { flex: 1; }
660
+
661
+ /* User chip as interactive button (matches .tool-btn hover semantics) */
662
+ .user-chip-btn {
663
+ display: flex; align-items: center; gap: 8px;
664
+ padding: 3px 10px 3px 3px;
665
+ border-radius: 20px;
666
+ border: 1px solid var(--border-default);
667
+ background: transparent;
668
+ font-size: 12px;
669
+ color: var(--text-primary);
670
+ cursor: pointer;
671
+ transition: background 120ms var(--ease), border-color 120ms var(--ease);
672
+ }
673
+ .user-chip-btn:hover {
674
+ background: var(--bg-2);
675
+ border-color: var(--border-strong);
676
+ }
677
+
678
+ .search-launcher {
679
+ display: flex; align-items: center; gap: 8px;
680
+ height: 30px; padding: 0 8px 0 10px;
681
+ background: var(--bg-2);
682
+ border: 1px solid var(--border-default);
683
+ border-radius: 8px;
684
+ color: var(--text-tertiary);
685
+ font-size: 12px;
686
+ min-width: 260px;
687
+ cursor: pointer;
688
+ transition: border-color 140ms var(--ease), background 140ms var(--ease), box-shadow 140ms var(--ease), color 140ms var(--ease);
689
+ }
690
+ .search-launcher:hover {
691
+ border-color: var(--accent);
692
+ color: var(--text-secondary);
693
+ background: var(--bg-1);
694
+ }
695
+ .search-launcher:focus-visible,
696
+ .search-launcher:active {
697
+ outline: none;
698
+ border-color: var(--accent);
699
+ box-shadow: 0 0 0 3px var(--accent-dim);
700
+ color: var(--text-primary);
701
+ }
702
+ .search-launcher .search-launcher-icon {
703
+ color: var(--text-tertiary);
704
+ display: inline-flex;
705
+ align-items: center;
706
+ justify-content: center;
707
+ }
708
+ .search-launcher:hover .search-launcher-icon,
709
+ .search-launcher:focus-visible .search-launcher-icon {
710
+ color: var(--accent);
711
+ }
712
+ .search-launcher .search-launcher-text {
713
+ flex: 1;
714
+ min-width: 0;
715
+ text-align: left;
716
+ overflow: hidden;
717
+ text-overflow: ellipsis;
718
+ white-space: nowrap;
719
+ }
720
+ .search-launcher svg { width: 13px; height: 13px; }
721
+ .kbd {
722
+ margin-left: auto;
723
+ display: inline-flex; align-items: center; gap: 2px;
724
+ padding: 1px 6px;
725
+ background: var(--bg-3);
726
+ border: 1px solid var(--border-default);
727
+ border-radius: 4px;
728
+ font-family: var(--font-mono);
729
+ font-size: 10px;
730
+ font-weight: 600;
731
+ color: var(--text-secondary);
732
+ letter-spacing: 0.04em;
733
+ }
734
+ .search-launcher:hover .kbd {
735
+ border-color: var(--accent);
736
+ color: var(--accent);
737
+ }
738
+
739
+ .user-chip {
740
+ display: flex; align-items: center; gap: 8px;
741
+ padding: 3px 10px 3px 3px;
742
+ border-radius: 20px;
743
+ border: 1px solid var(--border-default);
744
+ font-size: 12px;
745
+ }
746
+ .avatar {
747
+ width: 22px; height: 22px; border-radius: 50%;
748
+ background: linear-gradient(135deg, #ec4899, #f59e0b);
749
+ display: grid; place-items: center;
750
+ font-size: 10px; font-weight: 700; color: #fff;
751
+ }
752
+
753
+ /* ============================================================
754
+ Project tabs row
755
+ ============================================================ */
756
+ .tabs {
757
+ grid-area: tabs;
758
+ display: flex;
759
+ align-items: flex-end;
760
+ padding: 0 10px;
761
+ background: var(--bg-1);
762
+ border-bottom: 1px solid var(--border-subtle);
763
+ gap: 2px;
764
+ overflow-x: auto;
765
+ }
766
+ .tab {
767
+ display: inline-flex; align-items: center; gap: 8px;
768
+ height: 30px; padding: 0 12px;
769
+ background: transparent;
770
+ border-radius: 6px 6px 0 0;
771
+ color: var(--text-tertiary);
772
+ font-size: 12px;
773
+ position: relative;
774
+ transition: color 120ms var(--ease);
775
+ }
776
+ .tab:hover { color: var(--text-secondary); }
777
+ .tab.active {
778
+ background: var(--bg-2);
779
+ color: var(--text-primary);
780
+ }
781
+ .tab.active::after {
782
+ content: ""; position: absolute;
783
+ left: 0; right: 0; bottom: -1px;
784
+ height: 1px; background: var(--bg-2);
785
+ }
786
+ .tab-dot {
787
+ width: 8px; height: 8px; border-radius: 50%;
788
+ background: currentColor; opacity: 0.7;
789
+ }
790
+ .tab.unsaved .tab-close::before { content: "●"; font-size: 10px; }
791
+ .tab-close {
792
+ width: 16px; height: 16px; border-radius: 4px;
793
+ display: grid; place-items: center;
794
+ color: var(--text-muted);
795
+ font-size: 14px; line-height: 1;
796
+ }
797
+ .tab-close:hover { background: var(--bg-3); color: var(--text-primary); }
798
+ .tabs-spacer { flex: 1; }
799
+ .tab-action {
800
+ height: 28px; padding: 0 8px;
801
+ display: inline-flex; align-items: center; gap: 6px;
802
+ color: var(--text-tertiary); font-size: 12px;
803
+ border-radius: 6px;
804
+ }
805
+ .tab-action:hover { background: var(--bg-2); color: var(--text-primary); }
806
+ .tab-action svg { width: 12px; height: 12px; }
807
+
808
+ /* ============================================================
809
+ Left panel
810
+ ============================================================ */
811
+ .left {
812
+ grid-area: left;
813
+ background: var(--bg-1);
814
+ border-right: 1px solid var(--border-subtle);
815
+ display: flex;
816
+ flex-direction: column;
817
+ overflow: hidden;
818
+ }
819
+
820
+ .left-tabs {
821
+ display: flex;
822
+ padding: 6px 6px 0;
823
+ gap: 2px;
824
+ border-bottom: 1px solid var(--border-subtle);
825
+ }
826
+ .left-tab {
827
+ flex: 1;
828
+ height: 30px;
829
+ display: grid; place-items: center;
830
+ font-size: 11px;
831
+ font-weight: 500;
832
+ letter-spacing: 0.04em;
833
+ text-transform: uppercase;
834
+ color: var(--text-tertiary);
835
+ border-radius: 6px 6px 0 0;
836
+ transition: color 120ms var(--ease);
837
+ position: relative;
838
+ }
839
+ .left-tab:hover { color: var(--text-secondary); }
840
+ .left-tab.active {
841
+ color: var(--text-primary);
842
+ }
843
+ .left-tab.active::after {
844
+ content: ""; position: absolute;
845
+ left: 10%; right: 10%; bottom: -1px;
846
+ height: 2px; background: var(--accent); border-radius: 2px;
847
+ }
848
+
849
+ .left-search {
850
+ padding: 10px 10px 6px;
851
+ display: flex;
852
+ gap: 6px;
853
+ }
854
+ .search-field {
855
+ flex: 1;
856
+ display: flex; align-items: center; gap: 6px;
857
+ height: 28px; padding: 0 8px;
858
+ background: var(--bg-2);
859
+ border: 1px solid var(--border-default);
860
+ border-radius: 6px;
861
+ }
862
+ .search-field:focus-within { border-color: var(--accent); background: var(--bg-0); }
863
+ .search-field svg { width: 12px; height: 12px; color: var(--text-tertiary); flex-shrink: 0; }
864
+ .search-field input {
865
+ flex: 1; border: 0; background: transparent;
866
+ font-size: 12px; color: var(--text-primary);
867
+ }
868
+ .search-field input::placeholder { color: var(--text-tertiary); }
869
+ .icon-btn {
870
+ width: 28px; height: 28px;
871
+ display: grid; place-items: center;
872
+ border-radius: 6px;
873
+ color: var(--text-tertiary);
874
+ transition: all 120ms var(--ease);
875
+ }
876
+ .icon-btn:hover { background: var(--bg-3); color: var(--text-primary); }
877
+ .icon-btn svg { width: 14px; height: 14px; }
878
+
879
+ .tree {
880
+ flex: 1;
881
+ overflow-y: auto;
882
+ padding: 2px 4px 20px;
883
+ }
884
+ .tree-section {
885
+ margin-top: 2px;
886
+ }
887
+ .tree-section-header {
888
+ display: flex; align-items: center; gap: 4px;
889
+ height: 24px; padding: 0 6px;
890
+ font-size: 10px; font-weight: 600;
891
+ letter-spacing: 0.08em;
892
+ text-transform: uppercase;
893
+ color: var(--text-tertiary);
894
+ border-radius: 4px;
895
+ user-select: none;
896
+ }
897
+ .tree-section-header:hover { color: var(--text-secondary); }
898
+ .tree-section-header .count {
899
+ color: var(--text-muted);
900
+ font-weight: 500;
901
+ }
902
+ .tree-caret {
903
+ width: 10px; height: 10px;
904
+ transition: transform 150ms var(--ease);
905
+ flex-shrink: 0;
906
+ }
907
+ .tree-section.collapsed .tree-caret { transform: rotate(-90deg); }
908
+ .tree-section.collapsed .tree-items { display: none; }
909
+ .tree-section-header .add {
910
+ margin-left: auto;
911
+ width: 18px; height: 18px;
912
+ display: grid; place-items: center;
913
+ border-radius: 4px;
914
+ color: var(--text-muted);
915
+ opacity: 0;
916
+ }
917
+ .tree-section-header:hover .add { opacity: 1; }
918
+ .tree-section-header .add:hover { background: var(--bg-3); color: var(--text-primary); }
919
+
920
+ .tree-item {
921
+ display: flex; align-items: center; gap: 8px;
922
+ height: 26px;
923
+ padding: 0 6px 0 22px;
924
+ font-size: 12px;
925
+ color: var(--text-secondary);
926
+ border-radius: 5px;
927
+ cursor: pointer;
928
+ transition: background 120ms var(--ease);
929
+ position: relative;
930
+ user-select: none;
931
+ }
932
+ .tree-item:hover { background: var(--bg-2); color: var(--text-primary); }
933
+ .tree-item.active { background: var(--accent-dim); color: var(--text-primary); }
934
+ .tree-item.active::before {
935
+ content: ""; position: absolute;
936
+ left: 0; top: 4px; bottom: 4px; width: 2px;
937
+ background: var(--accent); border-radius: 2px;
938
+ }
939
+ .tree-icon {
940
+ width: 14px; height: 14px;
941
+ flex-shrink: 0;
942
+ color: var(--text-tertiary);
943
+ }
944
+ .tree-item.active .tree-icon { color: var(--accent); }
945
+ .tree-item .badge {
946
+ margin-left: auto;
947
+ font-size: 10px;
948
+ color: var(--text-muted);
949
+ font-family: var(--font-mono);
950
+ }
951
+ .tree-item .swatch {
952
+ width: 8px; height: 8px; border-radius: 2px;
953
+ }
954
+
955
+ /* ============================================================
956
+ Canvas
957
+ ============================================================ */
958
+ .canvas-wrap {
959
+ grid-area: canvas;
960
+ position: relative;
961
+ background: var(--bg-canvas);
962
+ overflow: hidden;
963
+ }
964
+ .canvas-grid {
965
+ position: absolute; inset: 0;
966
+ background-image:
967
+ radial-gradient(circle at 1px 1px, var(--bg-grid) 1px, transparent 0);
968
+ background-size: 24px 24px;
969
+ pointer-events: none;
970
+ }
971
+
972
+ .canvas-chrome {
973
+ position: absolute;
974
+ top: 12px; left: 12px; right: 12px;
975
+ display: flex;
976
+ justify-content: space-between;
977
+ align-items: flex-start;
978
+ pointer-events: none;
979
+ z-index: 10;
980
+ }
981
+ .canvas-title {
982
+ pointer-events: auto;
983
+ display: flex; flex-direction: column; gap: 2px;
984
+ padding: 10px 14px;
985
+ background: color-mix(in srgb, var(--bg-1) 85%, transparent);
986
+ backdrop-filter: blur(12px);
987
+ -webkit-backdrop-filter: blur(12px);
988
+ border: 1px solid var(--border-default);
989
+ border-radius: 10px;
990
+ }
991
+ .canvas-title h1 {
992
+ font-size: 15px; font-weight: 600;
993
+ letter-spacing: -0.01em;
994
+ }
995
+ .canvas-title p {
996
+ font-size: 11px; color: var(--text-tertiary);
997
+ display: flex; align-items: center; gap: 6px;
998
+ }
999
+ .canvas-title .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
1000
+ .canvas-title .engine {
1001
+ font-family: var(--font-mono);
1002
+ font-size: 10px; letter-spacing: 0.04em;
1003
+ color: var(--text-secondary);
1004
+ }
1005
+
1006
+ .canvas-actions {
1007
+ pointer-events: auto;
1008
+ display: flex; gap: 6px;
1009
+ }
1010
+ .canvas-btn {
1011
+ display: inline-flex; align-items: center; gap: 6px;
1012
+ height: 30px; padding: 0 10px;
1013
+ background: color-mix(in srgb, var(--bg-1) 85%, transparent);
1014
+ backdrop-filter: blur(12px);
1015
+ -webkit-backdrop-filter: blur(12px);
1016
+ border: 1px solid var(--border-default);
1017
+ border-radius: 8px;
1018
+ font-size: 12px;
1019
+ color: var(--text-secondary);
1020
+ transition: all 120ms var(--ease);
1021
+ }
1022
+ .canvas-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
1023
+ .canvas-btn.primary {
1024
+ background: var(--accent);
1025
+ color: var(--accent-fg);
1026
+ border-color: var(--accent);
1027
+ }
1028
+ .canvas-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
1029
+ .canvas-btn svg { width: 13px; height: 13px; }
1030
+
1031
+ /* Minimap */
1032
+ .minimap {
1033
+ position: absolute;
1034
+ right: 12px; bottom: 46px;
1035
+ width: 180px; height: 120px;
1036
+ background: color-mix(in srgb, var(--bg-1) 90%, transparent);
1037
+ backdrop-filter: blur(12px);
1038
+ -webkit-backdrop-filter: blur(12px);
1039
+ border: 1px solid var(--border-default);
1040
+ border-radius: 8px;
1041
+ padding: 6px;
1042
+ z-index: 10;
1043
+ }
1044
+ .minimap-title {
1045
+ font-size: 10px; color: var(--text-tertiary);
1046
+ letter-spacing: 0.06em; text-transform: uppercase;
1047
+ margin-bottom: 4px; padding: 0 2px;
1048
+ }
1049
+ .minimap-canvas {
1050
+ position: relative;
1051
+ width: 100%; height: calc(100% - 14px);
1052
+ background: var(--bg-0);
1053
+ border-radius: 4px;
1054
+ overflow: hidden;
1055
+ }
1056
+ .minimap-canvas .mm-table {
1057
+ position: absolute;
1058
+ border-radius: 1px;
1059
+ }
1060
+ .minimap-canvas .mm-viewport {
1061
+ position: absolute;
1062
+ border: 1px solid var(--accent);
1063
+ background: var(--accent-dim);
1064
+ border-radius: 2px;
1065
+ pointer-events: none;
1066
+ }
1067
+
1068
+ /* Zoom bar */
1069
+ .zoom-bar {
1070
+ position: absolute;
1071
+ right: 12px; bottom: 12px;
1072
+ display: flex; align-items: center;
1073
+ background: color-mix(in srgb, var(--bg-1) 90%, transparent);
1074
+ backdrop-filter: blur(12px);
1075
+ -webkit-backdrop-filter: blur(12px);
1076
+ border: 1px solid var(--border-default);
1077
+ border-radius: 8px;
1078
+ height: 30px;
1079
+ z-index: 10;
1080
+ overflow: hidden;
1081
+ }
1082
+ .zoom-btn {
1083
+ width: 30px; height: 30px;
1084
+ display: grid; place-items: center;
1085
+ color: var(--text-secondary);
1086
+ }
1087
+ .zoom-btn:hover { background: var(--bg-3); color: var(--text-primary); }
1088
+ .zoom-level {
1089
+ padding: 0 8px;
1090
+ font-size: 11px;
1091
+ font-family: var(--font-mono);
1092
+ color: var(--text-secondary);
1093
+ border-left: 1px solid var(--border-subtle);
1094
+ border-right: 1px solid var(--border-subtle);
1095
+ height: 100%;
1096
+ display: grid; place-items: center;
1097
+ min-width: 48px;
1098
+ }
1099
+
1100
+ /* Canvas surface */
1101
+ .canvas {
1102
+ position: absolute;
1103
+ inset: 0;
1104
+ overflow: auto;
1105
+ }
1106
+ .canvas-inner {
1107
+ position: relative;
1108
+ }
1109
+ .canvas-stage {
1110
+ position: relative;
1111
+ }
1112
+
1113
+ /* Subject area (group) */
1114
+ .subject-area {
1115
+ position: absolute;
1116
+ border: 1.5px dashed;
1117
+ border-radius: 16px;
1118
+ background: color-mix(in srgb, var(--text-primary) 2%, transparent);
1119
+ pointer-events: none;
1120
+ }
1121
+ .subject-area-label {
1122
+ position: absolute;
1123
+ top: -11px; left: 18px;
1124
+ padding: 2px 10px;
1125
+ font-size: 10px;
1126
+ font-weight: 600;
1127
+ letter-spacing: 0.08em;
1128
+ text-transform: uppercase;
1129
+ background: var(--bg-canvas);
1130
+ border-radius: 4px;
1131
+ }
1132
+
1133
+ /* ============================================================
1134
+ Table card
1135
+ ============================================================ */
1136
+ .table-card {
1137
+ position: absolute;
1138
+ width: var(--card-width);
1139
+ background: var(--bg-2);
1140
+ border: 1px solid var(--border-default);
1141
+ border-radius: var(--card-radius);
1142
+ box-shadow: var(--shadow-card);
1143
+ overflow: hidden;
1144
+ cursor: grab;
1145
+ transition: box-shadow 150ms var(--ease), border-color 120ms var(--ease), transform 150ms var(--ease);
1146
+ user-select: none;
1147
+ }
1148
+ .table-card:hover {
1149
+ border-color: var(--border-strong);
1150
+ box-shadow: var(--shadow-pop);
1151
+ }
1152
+ .table-card.selected {
1153
+ border-color: var(--accent);
1154
+ box-shadow:
1155
+ 0 0 0 1px var(--accent),
1156
+ 0 0 0 4px var(--accent-dim),
1157
+ var(--shadow-pop);
1158
+ }
1159
+
1160
+ .tc-header {
1161
+ display: flex; align-items: center; gap: 8px;
1162
+ height: var(--card-header-h);
1163
+ padding: 0 var(--row-px);
1164
+ background: var(--cat-soft, var(--bg-3));
1165
+ border-bottom: 1px solid var(--border-subtle);
1166
+ position: relative;
1167
+ }
1168
+ .tc-header::before {
1169
+ content: ""; position: absolute;
1170
+ left: 0; top: 0; bottom: 0; width: 3px;
1171
+ background: var(--cat, var(--cat-system));
1172
+ }
1173
+ .tc-icon {
1174
+ width: 14px; height: 14px;
1175
+ color: var(--cat, var(--cat-system));
1176
+ flex-shrink: 0;
1177
+ }
1178
+ .tc-name {
1179
+ font-size: var(--row-fs);
1180
+ font-weight: 600;
1181
+ letter-spacing: -0.005em;
1182
+ color: var(--text-primary);
1183
+ flex: 1;
1184
+ white-space: nowrap;
1185
+ overflow: hidden;
1186
+ text-overflow: ellipsis;
1187
+ }
1188
+ .tc-schema {
1189
+ font-size: 10px;
1190
+ color: var(--text-tertiary);
1191
+ font-family: var(--font-mono);
1192
+ }
1193
+ .tc-badges {
1194
+ display: flex; gap: 4px;
1195
+ align-items: center;
1196
+ }
1197
+ .tc-badge {
1198
+ display: inline-flex; align-items: center;
1199
+ height: 16px; padding: 0 5px;
1200
+ font-size: 9px;
1201
+ font-weight: 600;
1202
+ letter-spacing: 0.04em;
1203
+ border-radius: 3px;
1204
+ font-family: var(--font-mono);
1205
+ color: var(--text-secondary);
1206
+ background: var(--bg-3);
1207
+ }
1208
+
1209
+ .tc-rows {
1210
+ display: flex;
1211
+ flex-direction: column;
1212
+ }
1213
+ .tc-row {
1214
+ display: grid;
1215
+ grid-template-columns: 14px 1fr auto auto;
1216
+ gap: 8px;
1217
+ align-items: center;
1218
+ height: var(--row-h);
1219
+ padding: 0 var(--row-px);
1220
+ font-size: var(--row-fs);
1221
+ color: var(--text-secondary);
1222
+ border-bottom: 1px solid var(--border-subtle);
1223
+ transition: background 120ms var(--ease);
1224
+ }
1225
+ .tc-row:last-child { border-bottom: 0; }
1226
+ .tc-row:hover { background: var(--bg-3); color: var(--text-primary); }
1227
+ .tc-row.pk { font-weight: 500; color: var(--text-primary); }
1228
+
1229
+ .tc-key {
1230
+ display: grid; place-items: center;
1231
+ width: 14px; height: 14px;
1232
+ /* Drag-from-here affordance. Column keys are the start/end anchors for
1233
+ new relationships — the crosshair cursor on hover tells users "pull a
1234
+ line from this dot to another column to link them." */
1235
+ cursor: crosshair;
1236
+ border-radius: 3px;
1237
+ transition: background 120ms var(--ease);
1238
+ }
1239
+ .tc-key:hover { background: var(--bg-3); }
1240
+ .tc-key svg { width: 11px; height: 11px; }
1241
+ .tc-key.pk { color: var(--pk); }
1242
+ .tc-key.fk { color: var(--fk); }
1243
+ .tc-key.idx { color: var(--idx); }
1244
+
1245
+ .tc-col {
1246
+ font-family: var(--font-mono);
1247
+ font-size: calc(var(--row-fs) - 0.5px);
1248
+ letter-spacing: -0.01em;
1249
+ white-space: nowrap;
1250
+ overflow: hidden;
1251
+ text-overflow: ellipsis;
1252
+ }
1253
+
1254
+ .tc-type {
1255
+ font-family: var(--font-mono);
1256
+ font-size: calc(var(--row-fs) - 1px);
1257
+ color: var(--text-tertiary);
1258
+ }
1259
+
1260
+ .tc-nn {
1261
+ font-family: var(--font-mono);
1262
+ font-size: 9px;
1263
+ font-weight: 600;
1264
+ letter-spacing: 0.04em;
1265
+ color: var(--text-muted);
1266
+ min-width: 16px;
1267
+ text-align: right;
1268
+ }
1269
+ .tc-nn.required { color: var(--text-secondary); }
1270
+
1271
+ .tc-footer {
1272
+ display: flex; align-items: center; justify-content: space-between;
1273
+ padding: 4px var(--row-px);
1274
+ font-size: 10px;
1275
+ color: var(--text-muted);
1276
+ background: var(--bg-1);
1277
+ border-top: 1px solid var(--border-subtle);
1278
+ font-family: var(--font-mono);
1279
+ }
1280
+
1281
+ /* ============================================================
1282
+ Right inspector
1283
+ ============================================================ */
1284
+ .right {
1285
+ grid-area: right;
1286
+ background: var(--bg-1);
1287
+ border-left: 1px solid var(--border-subtle);
1288
+ display: flex;
1289
+ flex-direction: column;
1290
+ overflow: hidden;
1291
+ position: relative; /* anchor for .right-resize */
1292
+ }
1293
+
1294
+ /* Drag strip on the LEFT edge of the right panel. 4 px wide, transparent
1295
+ by default, shows an accent glow on hover / drag. The actual drag
1296
+ logic lives in RightPanel.jsx (mousedown → mousemove (RAF) → mouseup
1297
+ (commit to uiStore)). */
1298
+ .right-resize {
1299
+ position: absolute;
1300
+ top: 0; bottom: 0; left: -2px;
1301
+ width: 5px;
1302
+ cursor: ew-resize;
1303
+ z-index: 5;
1304
+ background: transparent;
1305
+ transition: background 120ms var(--ease);
1306
+ }
1307
+ .right-resize:hover,
1308
+ .right-resize.dragging {
1309
+ background: var(--accent-dim);
1310
+ }
1311
+ .right-resize::after {
1312
+ content: "";
1313
+ position: absolute;
1314
+ top: 0; bottom: 0; left: 2px;
1315
+ width: 1px;
1316
+ background: transparent;
1317
+ transition: background 120ms var(--ease);
1318
+ }
1319
+ .right-resize:hover::after,
1320
+ .right-resize.dragging::after {
1321
+ background: var(--accent);
1322
+ }
1323
+
1324
+ /* Inspector tab strip — replaces the old .insp-tabs styling with a row
1325
+ that plays nicely with PanelFrame's toolbar slot. */
1326
+ .inspector-tabs {
1327
+ display: inline-flex;
1328
+ gap: 2px;
1329
+ padding: 2px;
1330
+ background: var(--bg-2);
1331
+ border: 1px solid var(--border-default);
1332
+ border-radius: 7px;
1333
+ }
1334
+ .inspector-tab {
1335
+ padding: 4px 10px;
1336
+ border: 0;
1337
+ border-radius: 5px;
1338
+ background: transparent;
1339
+ color: var(--text-secondary);
1340
+ font-size: 11px;
1341
+ font-weight: 500;
1342
+ cursor: pointer;
1343
+ transition: background 120ms var(--ease), color 120ms var(--ease);
1344
+ white-space: nowrap;
1345
+ }
1346
+ .inspector-tab:hover { color: var(--text-primary); }
1347
+ .inspector-tab.active {
1348
+ background: var(--accent-dim);
1349
+ color: var(--accent);
1350
+ }
1351
+ .inspector-tab:focus-visible {
1352
+ outline: 2px solid var(--accent);
1353
+ outline-offset: 1px;
1354
+ }
1355
+
1356
+ /* Inline edit form used inside relationship / index cards. Flows like a
1357
+ mini .panel-form-grid but pinned to two columns at most so it reads
1358
+ as a "drawer" inside the parent card rather than a full-width form. */
1359
+ .inspector-inline-form {
1360
+ display: grid;
1361
+ grid-template-columns: 1fr 1fr;
1362
+ gap: 8px 10px;
1363
+ padding: 10px;
1364
+ margin-top: 10px;
1365
+ background: var(--bg-0);
1366
+ border: 1px dashed var(--border-default);
1367
+ border-radius: 6px;
1368
+ }
1369
+ .inspector-inline-form .full { grid-column: 1 / -1; }
1370
+
1371
+ /* Segmented ON DELETE / ON UPDATE picker inside the relationship card. */
1372
+ .inspector-action-picker {
1373
+ display: inline-flex;
1374
+ gap: 2px;
1375
+ padding: 2px;
1376
+ background: var(--bg-2);
1377
+ border: 1px solid var(--border-default);
1378
+ border-radius: 6px;
1379
+ flex-wrap: wrap;
1380
+ }
1381
+ .inspector-action-picker button {
1382
+ padding: 3px 8px;
1383
+ border: 0;
1384
+ background: transparent;
1385
+ color: var(--text-secondary);
1386
+ font-size: 10.5px;
1387
+ font-weight: 500;
1388
+ font-family: var(--font-mono);
1389
+ letter-spacing: 0.03em;
1390
+ border-radius: 4px;
1391
+ cursor: pointer;
1392
+ display: inline-flex;
1393
+ align-items: center;
1394
+ gap: 5px;
1395
+ }
1396
+ .inspector-action-picker button .swatch {
1397
+ width: 7px; height: 7px; border-radius: 2px; display: inline-block;
1398
+ }
1399
+ .inspector-action-picker button:hover { color: var(--text-primary); }
1400
+ .inspector-action-picker button.active {
1401
+ background: var(--accent-dim);
1402
+ color: var(--accent);
1403
+ }
1404
+
1405
+ /* Live-SQL preview container. Uses monospace + subtle background so it
1406
+ visually separates from surrounding PanelCards. All syntax colours
1407
+ come from the --sql-* palette defined per Luna theme so the preview
1408
+ reads well on obsidian, paper, and white. */
1409
+ .inspector-sql-pre {
1410
+ margin: 0;
1411
+ padding: 12px;
1412
+ font-family: var(--font-mono);
1413
+ font-size: 11.5px;
1414
+ line-height: 1.55;
1415
+ color: var(--sql-ident, var(--text-primary));
1416
+ background: var(--bg-0);
1417
+ border: 1px solid var(--border-default);
1418
+ border-radius: 8px;
1419
+ overflow: auto;
1420
+ max-height: 440px;
1421
+ white-space: pre;
1422
+ }
1423
+ .inspector-sql-pre .sql-kw { color: var(--sql-keyword); font-weight: 600; }
1424
+ .inspector-sql-pre .sql-type { color: var(--sql-type); }
1425
+ .inspector-sql-pre .sql-str { color: var(--sql-string); }
1426
+ .inspector-sql-pre .sql-num { color: var(--sql-number); }
1427
+ .inspector-sql-pre .sql-fn { color: var(--sql-function); }
1428
+ .inspector-sql-pre .sql-punct { color: var(--sql-punctuation); }
1429
+ .inspector-sql-pre .sql-comment { color: var(--sql-comment); font-style: italic; }
1430
+
1431
+ .insp-header {
1432
+ padding: 14px 16px 10px;
1433
+ border-bottom: 1px solid var(--border-subtle);
1434
+ }
1435
+ .insp-eyebrow {
1436
+ display: flex; align-items: center; gap: 6px;
1437
+ font-size: 10px;
1438
+ font-weight: 600;
1439
+ letter-spacing: 0.08em;
1440
+ text-transform: uppercase;
1441
+ color: var(--text-tertiary);
1442
+ margin-bottom: 4px;
1443
+ }
1444
+ .insp-eyebrow .pill {
1445
+ padding: 1px 6px;
1446
+ border-radius: 3px;
1447
+ background: var(--cat-users-soft);
1448
+ color: var(--cat-users);
1449
+ font-size: 9px;
1450
+ letter-spacing: 0.06em;
1451
+ }
1452
+ .insp-title {
1453
+ display: flex; align-items: center; gap: 10px;
1454
+ margin-bottom: 8px;
1455
+ }
1456
+ .insp-title h2 {
1457
+ font-size: 17px;
1458
+ font-weight: 600;
1459
+ letter-spacing: -0.015em;
1460
+ font-family: var(--font-mono);
1461
+ }
1462
+ .insp-title .copy-btn {
1463
+ width: 22px; height: 22px;
1464
+ display: grid; place-items: center;
1465
+ color: var(--text-muted);
1466
+ border-radius: 4px;
1467
+ }
1468
+ .insp-title .copy-btn:hover { background: var(--bg-3); color: var(--text-primary); }
1469
+ .insp-sub {
1470
+ font-size: 12px;
1471
+ color: var(--text-tertiary);
1472
+ line-height: 1.5;
1473
+ }
1474
+
1475
+ .insp-tabs {
1476
+ display: flex;
1477
+ padding: 0 10px;
1478
+ gap: 2px;
1479
+ border-bottom: 1px solid var(--border-subtle);
1480
+ background: var(--bg-1);
1481
+ }
1482
+ .insp-tab {
1483
+ height: 34px; padding: 0 10px;
1484
+ font-size: 12px;
1485
+ color: var(--text-tertiary);
1486
+ position: relative;
1487
+ }
1488
+ .insp-tab:hover { color: var(--text-secondary); }
1489
+ .insp-tab.active { color: var(--text-primary); }
1490
+ .insp-tab.active::after {
1491
+ content: ""; position: absolute;
1492
+ left: 10px; right: 10px; bottom: -1px;
1493
+ height: 2px; background: var(--accent); border-radius: 2px;
1494
+ }
1495
+
1496
+ .insp-body {
1497
+ flex: 1;
1498
+ overflow-y: auto;
1499
+ padding: 14px 16px 20px;
1500
+ }
1501
+
1502
+ .insp-section {
1503
+ margin-bottom: 18px;
1504
+ }
1505
+ .insp-section-title {
1506
+ display: flex; align-items: center; justify-content: space-between;
1507
+ font-size: 10px;
1508
+ font-weight: 600;
1509
+ letter-spacing: 0.08em;
1510
+ text-transform: uppercase;
1511
+ color: var(--text-tertiary);
1512
+ margin-bottom: 8px;
1513
+ }
1514
+ .insp-section-title .count {
1515
+ color: var(--text-muted);
1516
+ font-family: var(--font-mono);
1517
+ }
1518
+
1519
+ .field {
1520
+ margin-bottom: 10px;
1521
+ }
1522
+ .field-row {
1523
+ display: grid;
1524
+ grid-template-columns: 90px 1fr;
1525
+ gap: 8px;
1526
+ align-items: center;
1527
+ min-height: 28px;
1528
+ }
1529
+ .field-label {
1530
+ font-size: 11px;
1531
+ color: var(--text-tertiary);
1532
+ }
1533
+ .field-input {
1534
+ height: 28px;
1535
+ padding: 0 8px;
1536
+ background: var(--bg-2);
1537
+ border: 1px solid var(--border-default);
1538
+ border-radius: 5px;
1539
+ font-size: 12px;
1540
+ color: var(--text-primary);
1541
+ font-family: var(--font-mono);
1542
+ width: 100%;
1543
+ transition: border-color 120ms var(--ease);
1544
+ }
1545
+ .field-input:focus { border-color: var(--accent); background: var(--bg-0); }
1546
+ .field-input.readonly { color: var(--text-secondary); background: var(--bg-1); }
1547
+
1548
+ .field-select {
1549
+ height: 28px;
1550
+ padding: 0 24px 0 8px;
1551
+ background: var(--bg-2);
1552
+ border: 1px solid var(--border-default);
1553
+ border-radius: 5px;
1554
+ font-size: 12px;
1555
+ color: var(--text-primary);
1556
+ font-family: var(--font-mono);
1557
+ appearance: none;
1558
+ -webkit-appearance: none;
1559
+ width: 100%;
1560
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 4l3 3 3-3' stroke='%239aa3b4' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
1561
+ background-repeat: no-repeat;
1562
+ background-position: right 8px center;
1563
+ cursor: pointer;
1564
+ }
1565
+
1566
+ .field-flags {
1567
+ display: flex;
1568
+ gap: 6px;
1569
+ flex-wrap: wrap;
1570
+ }
1571
+ .flag {
1572
+ display: inline-flex; align-items: center; gap: 5px;
1573
+ height: 24px; padding: 0 8px;
1574
+ background: var(--bg-2);
1575
+ border: 1px solid var(--border-default);
1576
+ border-radius: 5px;
1577
+ font-size: 11px;
1578
+ color: var(--text-secondary);
1579
+ font-family: var(--font-mono);
1580
+ cursor: pointer;
1581
+ transition: all 120ms var(--ease);
1582
+ }
1583
+ .flag:hover { border-color: var(--border-strong); }
1584
+ .flag.on {
1585
+ background: var(--accent-dim);
1586
+ border-color: var(--accent);
1587
+ color: var(--text-primary);
1588
+ }
1589
+ .flag .check {
1590
+ width: 12px; height: 12px;
1591
+ border-radius: 3px;
1592
+ border: 1px solid var(--text-muted);
1593
+ display: grid; place-items: center;
1594
+ }
1595
+ .flag.on .check {
1596
+ background: var(--accent);
1597
+ border-color: var(--accent);
1598
+ color: var(--accent-fg);
1599
+ }
1600
+ .flag.on .check svg { width: 8px; height: 8px; }
1601
+
1602
+ /* Column list inside inspector */
1603
+ .col-list {
1604
+ display: flex; flex-direction: column;
1605
+ gap: 1px;
1606
+ background: var(--bg-2);
1607
+ border: 1px solid var(--border-default);
1608
+ border-radius: 6px;
1609
+ overflow: hidden;
1610
+ }
1611
+ .col-item {
1612
+ display: grid;
1613
+ grid-template-columns: 14px 1fr auto;
1614
+ gap: 8px;
1615
+ align-items: center;
1616
+ padding: 7px 10px;
1617
+ font-size: 12px;
1618
+ color: var(--text-secondary);
1619
+ background: var(--bg-2);
1620
+ cursor: pointer;
1621
+ transition: background 120ms var(--ease);
1622
+ }
1623
+ .col-item:hover { background: var(--bg-3); color: var(--text-primary); }
1624
+ .col-item.active { background: var(--accent-dim); color: var(--text-primary); }
1625
+ .col-item-key { display: grid; place-items: center; }
1626
+ .col-item-key svg { width: 11px; height: 11px; }
1627
+ .col-item-key.pk { color: var(--pk); }
1628
+ .col-item-key.fk { color: var(--fk); }
1629
+ .col-item-name {
1630
+ font-family: var(--font-mono);
1631
+ font-size: 12px;
1632
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
1633
+ }
1634
+ .col-item-type {
1635
+ font-family: var(--font-mono);
1636
+ font-size: 10px;
1637
+ color: var(--text-tertiary);
1638
+ }
1639
+
1640
+ .rel-card {
1641
+ padding: 10px;
1642
+ background: var(--bg-2);
1643
+ border: 1px solid var(--border-default);
1644
+ border-radius: 6px;
1645
+ margin-bottom: 6px;
1646
+ font-size: 12px;
1647
+ }
1648
+ .rel-card .rel-title {
1649
+ font-family: var(--font-mono);
1650
+ font-size: 11px;
1651
+ color: var(--text-primary);
1652
+ margin-bottom: 4px;
1653
+ display: flex; align-items: center; gap: 6px;
1654
+ }
1655
+ .rel-card .rel-cardinality {
1656
+ font-family: var(--font-mono);
1657
+ font-size: 10px;
1658
+ color: var(--text-tertiary);
1659
+ padding: 1px 5px;
1660
+ border-radius: 3px;
1661
+ background: var(--bg-3);
1662
+ }
1663
+ .rel-card .rel-sub {
1664
+ font-size: 11px;
1665
+ color: var(--text-tertiary);
1666
+ font-family: var(--font-mono);
1667
+ }
1668
+
1669
+ /* SQL block — compact, token-driven. Shared by any place rendering a
1670
+ SQL snippet outside the inspector. Same --sql-* palette as the
1671
+ inspector so both surfaces are visually cohesive. */
1672
+ .sql-preview {
1673
+ background: var(--bg-0);
1674
+ border: 1px solid var(--border-default);
1675
+ border-radius: 6px;
1676
+ padding: 10px 12px;
1677
+ font-family: var(--font-mono);
1678
+ font-size: 11px;
1679
+ line-height: 1.6;
1680
+ color: var(--sql-ident, var(--text-primary));
1681
+ overflow-x: auto;
1682
+ white-space: pre;
1683
+ }
1684
+ .sql-kw { color: var(--sql-keyword); font-weight: 600; }
1685
+ .sql-type { color: var(--sql-type); }
1686
+ .sql-str { color: var(--sql-string); }
1687
+ .sql-num { color: var(--sql-number); }
1688
+ .sql-fn { color: var(--sql-function); }
1689
+ .sql-punct { color: var(--sql-punctuation); }
1690
+ .sql-comment { color: var(--sql-comment); font-style: italic; }
1691
+
1692
+ /* ============================================================
1693
+ Status bar
1694
+ ============================================================ */
1695
+ .status {
1696
+ grid-area: status;
1697
+ display: flex;
1698
+ align-items: center;
1699
+ padding: 0 12px;
1700
+ background: var(--bg-1);
1701
+ border-top: 1px solid var(--border-subtle);
1702
+ font-size: 11px;
1703
+ color: var(--text-tertiary);
1704
+ gap: 14px;
1705
+ }
1706
+ .status-item { display: flex; align-items: center; gap: 6px; }
1707
+ .status-item .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
1708
+ .status-item.warn .dot { background: #f59e0b; }
1709
+ .status-item .k {
1710
+ font-family: var(--font-mono);
1711
+ color: var(--text-tertiary);
1712
+ }
1713
+ .status-spacer { flex: 1; }
1714
+
1715
+ .density-toggle {
1716
+ display: flex;
1717
+ background: var(--bg-2);
1718
+ border: 1px solid var(--border-default);
1719
+ border-radius: 5px;
1720
+ overflow: hidden;
1721
+ height: 20px;
1722
+ }
1723
+ .density-toggle button {
1724
+ padding: 0 8px;
1725
+ font-size: 10px;
1726
+ color: var(--text-tertiary);
1727
+ letter-spacing: 0.04em;
1728
+ text-transform: uppercase;
1729
+ transition: all 120ms var(--ease);
1730
+ }
1731
+ .density-toggle button:hover { color: var(--text-primary); }
1732
+ .density-toggle button.active {
1733
+ background: var(--accent);
1734
+ color: var(--accent-fg);
1735
+ }
1736
+
1737
+ /* ============================================================
1738
+ Command palette
1739
+ ============================================================ */
1740
+ .cmd-overlay {
1741
+ position: fixed; inset: 0;
1742
+ background: var(--scrim);
1743
+ backdrop-filter: blur(4px);
1744
+ -webkit-backdrop-filter: blur(4px);
1745
+ z-index: 100;
1746
+ display: grid;
1747
+ place-items: start center;
1748
+ padding-top: 14vh;
1749
+ animation: fadeIn 120ms var(--ease);
1750
+ }
1751
+ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
1752
+ .cmd {
1753
+ width: 640px;
1754
+ max-width: calc(100vw - 32px);
1755
+ background: var(--bg-2);
1756
+ border: 1px solid var(--border-strong);
1757
+ border-radius: 12px;
1758
+ box-shadow: var(--shadow-pop);
1759
+ overflow: hidden;
1760
+ animation: popIn 180ms var(--ease);
1761
+ }
1762
+ @keyframes popIn {
1763
+ from { opacity: 0; transform: translateY(-6px) scale(0.98); }
1764
+ to { opacity: 1; transform: translateY(0) scale(1); }
1765
+ }
1766
+ .cmd-input-wrap {
1767
+ display: flex; align-items: center; gap: 10px;
1768
+ padding: 14px 16px;
1769
+ border-bottom: 1px solid var(--border-subtle);
1770
+ }
1771
+ .cmd-input-wrap svg { width: 16px; height: 16px; color: var(--text-tertiary); }
1772
+ .cmd-input {
1773
+ flex: 1;
1774
+ border: 0; background: transparent;
1775
+ font-size: 15px;
1776
+ color: var(--text-primary);
1777
+ }
1778
+ .cmd-input::placeholder { color: var(--text-tertiary); }
1779
+ .cmd-list {
1780
+ max-height: 380px;
1781
+ overflow-y: auto;
1782
+ padding: 6px;
1783
+ }
1784
+ .cmd-section {
1785
+ padding: 8px 10px 4px;
1786
+ font-size: 10px;
1787
+ letter-spacing: 0.08em;
1788
+ text-transform: uppercase;
1789
+ color: var(--text-tertiary);
1790
+ font-weight: 600;
1791
+ }
1792
+ .cmd-item {
1793
+ display: grid;
1794
+ grid-template-columns: 20px 1fr auto;
1795
+ gap: 10px;
1796
+ align-items: center;
1797
+ padding: 8px 10px;
1798
+ border-radius: 6px;
1799
+ font-size: 13px;
1800
+ color: var(--text-secondary);
1801
+ cursor: pointer;
1802
+ }
1803
+ .cmd-item:hover, .cmd-item.selected { background: var(--bg-3); color: var(--text-primary); }
1804
+ .cmd-item .cmd-icon {
1805
+ width: 16px; height: 16px;
1806
+ color: var(--text-tertiary);
1807
+ display: grid; place-items: center;
1808
+ }
1809
+ .cmd-item.selected .cmd-icon { color: var(--accent); }
1810
+ .cmd-item .cmd-meta {
1811
+ font-size: 10px;
1812
+ color: var(--text-muted);
1813
+ font-family: var(--font-mono);
1814
+ }
1815
+ .cmd-footer {
1816
+ display: flex; align-items: center; gap: 14px;
1817
+ padding: 8px 16px;
1818
+ border-top: 1px solid var(--border-subtle);
1819
+ background: var(--bg-1);
1820
+ font-size: 11px;
1821
+ color: var(--text-tertiary);
1822
+ }
1823
+ .cmd-footer .hint { display: flex; align-items: center; gap: 4px; }
1824
+
1825
+ /* ============================================================
1826
+ Relationship SVG
1827
+ ============================================================ */
1828
+ .rel-svg {
1829
+ position: absolute;
1830
+ inset: 0;
1831
+ pointer-events: none;
1832
+ }
1833
+ .rel-line {
1834
+ fill: none;
1835
+ stroke: var(--rel-line);
1836
+ stroke-width: 1.25;
1837
+ transition: stroke 150ms var(--ease), stroke-width 150ms var(--ease);
1838
+ }
1839
+ .rel-line.strong { stroke: var(--rel-line-strong); }
1840
+ .rel-line.active { stroke: var(--rel-line-active); stroke-width: 1.75; }
1841
+ .rel-glyph {
1842
+ stroke: var(--rel-line);
1843
+ stroke-width: 1.25;
1844
+ fill: none;
1845
+ }
1846
+ .rel-glyph {
1847
+ stroke: var(--rel-line-strong);
1848
+ stroke-width: 1.6;
1849
+ fill: none;
1850
+ }
1851
+ .rel-glyph.active { stroke: var(--rel-line-active); stroke-width: 2; }
1852
+ .rel-glyph.dimmed { stroke: var(--rel-line-dim); }
1853
+ .rel-line.dimmed { stroke: var(--rel-line-dim); }
1854
+ .rel-line.active { stroke: var(--rel-line-active); stroke-width: 2; }
1855
+ .rel-line.identifying { stroke-width: 1.8; }
1856
+ .rel-label {
1857
+ font-family: var(--font-mono);
1858
+ font-size: 9.5px;
1859
+ font-weight: 600;
1860
+ fill: var(--text-secondary);
1861
+ paint-order: stroke;
1862
+ stroke: var(--bg-canvas);
1863
+ stroke-width: 3.5;
1864
+ stroke-linejoin: round;
1865
+ }
1866
+ .rel-label.active { fill: var(--rel-line-active); }
1867
+ .rel-label.dimmed { fill: var(--text-muted); opacity: 0.5; stroke-width: 2; }
1868
+
1869
+ /* Tooltip */
1870
+ .tooltip {
1871
+ position: fixed;
1872
+ padding: 5px 8px;
1873
+ background: var(--bg-4);
1874
+ border: 1px solid var(--border-default);
1875
+ border-radius: 5px;
1876
+ font-size: 11px;
1877
+ color: var(--text-primary);
1878
+ pointer-events: none;
1879
+ z-index: 200;
1880
+ box-shadow: var(--shadow-pop);
1881
+ font-family: var(--font-mono);
1882
+ white-space: nowrap;
1883
+ }
1884
+
1885
+ /* Category color drivers — apply on .table-card */
1886
+ .table-card.cat-users { --cat: var(--cat-users); --cat-soft: var(--cat-users-soft); }
1887
+ .table-card.cat-billing { --cat: var(--cat-billing); --cat-soft: var(--cat-billing-soft); }
1888
+ .table-card.cat-product { --cat: var(--cat-product); --cat-soft: var(--cat-product-soft); }
1889
+ .table-card.cat-system { --cat: var(--cat-system); --cat-soft: var(--cat-system-soft); }
1890
+ .table-card.cat-access { --cat: var(--cat-access); --cat-soft: var(--cat-access-soft); }
1891
+ .table-card.cat-audit { --cat: var(--cat-audit); --cat-soft: var(--cat-audit-soft); }
1892
+
1893
+ .subject-area.cat-users { border-color: color-mix(in srgb, var(--cat-users) 35%, transparent); }
1894
+ .subject-area.cat-users .subject-area-label { color: var(--cat-users); }
1895
+ .subject-area.cat-billing { border-color: color-mix(in srgb, var(--cat-billing) 35%, transparent); }
1896
+ .subject-area.cat-billing .subject-area-label { color: var(--cat-billing); }
1897
+ .subject-area.cat-product { border-color: color-mix(in srgb, var(--cat-product) 35%, transparent); }
1898
+ .subject-area.cat-product .subject-area-label { color: var(--cat-product); }
1899
+ .subject-area.cat-audit { border-color: color-mix(in srgb, var(--cat-audit) 35%, transparent); }
1900
+ .subject-area.cat-audit .subject-area-label { color: var(--cat-audit); }
1901
+ \n
1902
+ /* ============== Relationship additions ============== */
1903
+ .tc-colflags { display: flex; align-items: center; gap: 3px; }
1904
+ .tc-cf { display: inline-grid; place-items: center; width: 12px; height: 12px; color: var(--text-muted); opacity: 0.7; }
1905
+ .tc-cf:hover { opacity: 1; color: var(--text-secondary); }
1906
+ .tc-cf-uq { color: var(--fk); }
1907
+ .tc-cf-ck { color: var(--idx); }
1908
+ .tc-cf-df { color: var(--cat-product); }
1909
+ .tc-cf-gn { color: var(--cat-access); }
1910
+
1911
+ .table-card.junction { border-style: dashed; }
1912
+ .tc-badge.junction { background: var(--cat-access-soft); color: var(--cat-access); }
1913
+ .tc-badge.part { background: var(--cat-audit-soft); color: var(--cat-audit); }
1914
+ .tc-badge.enum { background: var(--cat-system-soft); color: var(--cat-system); }
1915
+
1916
+ .rel-line.identifying { stroke-width: 1.75; }
1917
+ .rel-glyph { stroke: var(--rel-line); stroke-width: 1.25; fill: none; transition: stroke 120ms var(--ease); }
1918
+ .rel-glyph.active { stroke: var(--accent); stroke-width: 1.6; }
1919
+
1920
+ /* Legend */
1921
+ .legend-toggle {
1922
+ position: absolute; left: 12px; bottom: 12px; z-index: 10;
1923
+ display: inline-flex; align-items: center; gap: 6px;
1924
+ height: 30px; padding: 0 10px;
1925
+ background: color-mix(in srgb, var(--bg-1) 85%, transparent); backdrop-filter: blur(12px);
1926
+ border: 1px solid var(--border-default); border-radius: 8px;
1927
+ color: var(--text-secondary); font-size: 12px;
1928
+ }
1929
+ .legend-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); }
1930
+ .legend {
1931
+ position: absolute; left: 12px; bottom: 12px; z-index: 11;
1932
+ width: 280px; max-height: calc(100% - 100px);
1933
+ background: color-mix(in srgb, var(--bg-1) 92%, transparent); backdrop-filter: blur(12px);
1934
+ border: 1px solid var(--border-strong); border-radius: 10px;
1935
+ overflow-y: auto; padding: 10px 12px 14px;
1936
+ box-shadow: var(--shadow-pop);
1937
+ }
1938
+ .legend-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
1939
+ font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
1940
+ .legend-section { margin-top: 12px; }
1941
+ .legend-section-title { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
1942
+ color: var(--text-tertiary); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border-subtle); }
1943
+ .legend-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center;
1944
+ padding: 4px 0; font-size: 11px; color: var(--text-secondary); }
1945
+ .legend-gly { display: grid; place-items: center; color: var(--text-secondary); }
1946
+ .legend-sub { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
1947
+
1948
+ /* Relationship inspector */
1949
+ .rel-insp-kind {
1950
+ display: inline-flex; align-items: center; gap: 8px;
1951
+ padding: 6px 12px;
1952
+ background: var(--accent-dim); border: 1px solid var(--accent);
1953
+ border-radius: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--text-primary);
1954
+ }
1955
+ .rel-route {
1956
+ display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
1957
+ padding: 10px; background: var(--bg-2); border: 1px solid var(--border-default); border-radius: 6px;
1958
+ font-family: var(--font-mono); font-size: 12px;
1959
+ }
1960
+ .rel-route-col { display: flex; flex-direction: column; gap: 3px; }
1961
+ .rel-route-table { font-weight: 600; color: var(--text-primary); }
1962
+ .rel-route-field { color: var(--text-tertiary); font-size: 11px; }
1963
+ .rel-route-card { font-size: 10px; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
1964
+ .rel-route-arrow { color: var(--text-tertiary); }
1965
+
1966
+ .action-picker { display: flex; flex-wrap: wrap; gap: 6px; }
1967
+ .action-picker .action {
1968
+ display: inline-flex; align-items: center; gap: 5px;
1969
+ padding: 5px 8px; border-radius: 5px;
1970
+ background: var(--bg-2); border: 1px solid var(--border-default);
1971
+ font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
1972
+ cursor: pointer;
1973
+ }
1974
+ .action-picker .action.on {
1975
+ background: var(--accent-dim); border-color: var(--accent); color: var(--text-primary);
1976
+ }
1977
+ .action-picker .action .dot { width: 7px; height: 7px; border-radius: 50%; }