llm-deep-trace 0.1.0

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 (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/bin/llm-deep-trace.js +24 -0
  4. package/next.config.ts +8 -0
  5. package/package.json +56 -0
  6. package/postcss.config.mjs +5 -0
  7. package/public/banner-v2.png +0 -0
  8. package/public/file.svg +1 -0
  9. package/public/globe.svg +1 -0
  10. package/public/logo.png +0 -0
  11. package/public/next.svg +1 -0
  12. package/public/vercel.svg +1 -0
  13. package/public/window.svg +1 -0
  14. package/src/app/api/agent-config/route.ts +31 -0
  15. package/src/app/api/all-sessions/route.ts +9 -0
  16. package/src/app/api/analytics/route.ts +379 -0
  17. package/src/app/api/detect-agents/route.ts +170 -0
  18. package/src/app/api/image/route.ts +73 -0
  19. package/src/app/api/search/route.ts +28 -0
  20. package/src/app/api/session-by-key/route.ts +21 -0
  21. package/src/app/api/sessions/[sessionId]/messages/route.ts +46 -0
  22. package/src/app/api/sse/route.ts +86 -0
  23. package/src/app/favicon.ico +0 -0
  24. package/src/app/globals.css +3518 -0
  25. package/src/app/icon.svg +4 -0
  26. package/src/app/layout.tsx +20 -0
  27. package/src/app/page.tsx +5 -0
  28. package/src/components/AnalyticsDashboard.tsx +393 -0
  29. package/src/components/App.tsx +243 -0
  30. package/src/components/CopyButton.tsx +42 -0
  31. package/src/components/Logo.tsx +20 -0
  32. package/src/components/MainPanel.tsx +1128 -0
  33. package/src/components/MessageRenderer.tsx +983 -0
  34. package/src/components/SessionTree.tsx +505 -0
  35. package/src/components/SettingsPanel.tsx +160 -0
  36. package/src/components/SetupView.tsx +206 -0
  37. package/src/components/Sidebar.tsx +714 -0
  38. package/src/components/ThemeToggle.tsx +54 -0
  39. package/src/lib/client-utils.ts +360 -0
  40. package/src/lib/normalizers.ts +371 -0
  41. package/src/lib/sessions.ts +1223 -0
  42. package/src/lib/store.ts +518 -0
  43. package/src/lib/types.ts +112 -0
  44. package/src/lib/useSSE.ts +81 -0
  45. package/tsconfig.json +34 -0
@@ -0,0 +1,3518 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=JetBrains+Mono:wght@400&display=swap');
2
+
3
+ :root {
4
+ --bg: #0D0D0F;
5
+ --surface: #121214;
6
+ --raised: #18181B;
7
+ --border: #27272A;
8
+ --accent: #9B72EF;
9
+ --accent-dim: rgba(155, 114, 239, 0.10);
10
+ --accent-border: rgba(155, 114, 239, 0.25);
11
+ --text-1: #E4E4E7;
12
+ --text-2: #71717A;
13
+ --text-3: #3F3F46;
14
+ --green: #10B981;
15
+ --red: #EF4444;
16
+ --amber: #F59E0B;
17
+ --blue: #3B82F6;
18
+ --indigo: #888899;
19
+ --thinking-bg: rgba(113, 113, 122, 0.06);
20
+ --mono: 'JetBrains Mono', ui-monospace, monospace;
21
+ --sans: 'Inter', system-ui, -apple-system, sans-serif;
22
+ --radius: 6px;
23
+ --sidebar-w: 280px;
24
+ }
25
+
26
+ *, *::before, *::after {
27
+ margin: 0;
28
+ padding: 0;
29
+ box-sizing: border-box;
30
+ }
31
+
32
+ html, body {
33
+ height: 100%;
34
+ overflow: hidden;
35
+ background: var(--bg);
36
+ color: var(--text-1);
37
+ font-family: var(--sans);
38
+ font-size: 14px;
39
+ font-weight: 400;
40
+ line-height: 1.5;
41
+ -webkit-font-smoothing: antialiased;
42
+ -moz-osx-font-smoothing: grayscale;
43
+ }
44
+
45
+ /* ── Layout ───────────────────────── */
46
+
47
+ .app-shell {
48
+ display: flex;
49
+ height: 100vh;
50
+ width: 100vw;
51
+ }
52
+
53
+ /* ── Scrollbar ────────────────────── */
54
+
55
+ .scroller {
56
+ scrollbar-width: thin;
57
+ scrollbar-color: var(--border) transparent;
58
+ }
59
+ .scroller::-webkit-scrollbar { width: 4px; }
60
+ .scroller::-webkit-scrollbar-track { background: transparent; }
61
+ .scroller::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
62
+
63
+ /* ── Sidebar ──────────────────────── */
64
+
65
+ .sidebar {
66
+ position: relative;
67
+ display: flex;
68
+ flex-direction: column;
69
+ background: var(--surface);
70
+ border-right: 1px solid var(--border);
71
+ flex-shrink: 0;
72
+ user-select: none;
73
+ }
74
+
75
+ .sidebar-header {
76
+ flex-shrink: 0;
77
+ padding: 16px 16px 12px;
78
+ border-bottom: 1px solid var(--border);
79
+ }
80
+
81
+ .sidebar-title-row {
82
+ display: flex;
83
+ align-items: center;
84
+ gap: 8px;
85
+ margin-bottom: 12px;
86
+ }
87
+
88
+ /* ── App logo ── */
89
+ .app-logo {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 8px;
93
+ color: var(--text-3);
94
+ }
95
+
96
+ .app-logo-name {
97
+ font-size: 13px;
98
+ font-weight: 500;
99
+ color: var(--text-1);
100
+ letter-spacing: 0.03em;
101
+ }
102
+
103
+ .sidebar-count {
104
+ margin-left: auto;
105
+ font-family: var(--mono);
106
+ font-size: 10px;
107
+ color: var(--text-3);
108
+ }
109
+
110
+ /* Sidebar resize handle */
111
+
112
+ .sidebar-resize-handle {
113
+ position: absolute;
114
+ top: 0;
115
+ right: -2px;
116
+ width: 4px;
117
+ height: 100%;
118
+ cursor: col-resize;
119
+ z-index: 20;
120
+ background: transparent;
121
+ transition: background 0.15s;
122
+ }
123
+
124
+ .sidebar-resize-handle:hover {
125
+ background: var(--accent-border);
126
+ }
127
+
128
+ /* Sidebar footer */
129
+
130
+ .sidebar-footer {
131
+ flex-shrink: 0;
132
+ padding: 8px 12px;
133
+ border-top: 1px solid var(--border);
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: 6px;
137
+ }
138
+
139
+ .sidebar-footer-group {
140
+ display: flex;
141
+ gap: 4px;
142
+ }
143
+
144
+ .sidebar-footer-btn {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 5px;
148
+ flex: 1;
149
+ padding: 5px 8px;
150
+ background: transparent;
151
+ border: 1px solid var(--border);
152
+ border-radius: var(--radius);
153
+ color: var(--text-3);
154
+ font-family: var(--sans);
155
+ font-size: 11px;
156
+ cursor: pointer;
157
+ transition: all 0.12s;
158
+ white-space: nowrap;
159
+ }
160
+
161
+ .sidebar-footer-btn:hover {
162
+ border-color: var(--accent-border);
163
+ color: var(--text-2);
164
+ }
165
+
166
+ .sidebar-settings-btn {
167
+ display: flex;
168
+ align-items: center;
169
+ gap: 6px;
170
+ width: 100%;
171
+ padding: 6px 10px;
172
+ background: transparent;
173
+ border: 1px solid var(--border);
174
+ border-radius: var(--radius);
175
+ color: var(--text-3);
176
+ font-family: var(--sans);
177
+ font-size: 11px;
178
+ cursor: pointer;
179
+ transition: all 0.12s;
180
+ }
181
+
182
+ .sidebar-settings-btn:hover {
183
+ border-color: var(--accent-border);
184
+ color: var(--text-2);
185
+ }
186
+
187
+ .sidebar-settings-btn.active {
188
+ background: var(--accent-dim);
189
+ border-color: var(--accent-border);
190
+ color: var(--accent);
191
+ }
192
+
193
+ /* Search input */
194
+
195
+ .search-wrap {
196
+ position: relative;
197
+ margin-bottom: 10px;
198
+ }
199
+
200
+ .search-icon {
201
+ position: absolute;
202
+ left: 10px;
203
+ top: 50%;
204
+ transform: translateY(-50%);
205
+ color: var(--text-3);
206
+ pointer-events: none;
207
+ }
208
+
209
+ .search-input {
210
+ width: 100%;
211
+ padding: 7px 32px 7px 30px;
212
+ background: var(--raised);
213
+ border: 1px solid var(--border);
214
+ border-radius: var(--radius);
215
+ color: var(--text-1);
216
+ font-family: var(--sans);
217
+ font-size: 12px;
218
+ outline: none;
219
+ transition: border-color 0.15s;
220
+ user-select: text;
221
+ }
222
+
223
+ .search-input:focus {
224
+ border-color: var(--accent);
225
+ }
226
+
227
+ .search-input::placeholder {
228
+ color: var(--text-3);
229
+ }
230
+
231
+ .search-kbd {
232
+ position: absolute;
233
+ right: 8px;
234
+ top: 50%;
235
+ transform: translateY(-50%);
236
+ font-family: var(--mono);
237
+ font-size: 10px;
238
+ color: var(--text-3);
239
+ pointer-events: none;
240
+ }
241
+
242
+ /* Source filters */
243
+
244
+ .source-filters {
245
+ display: flex;
246
+ gap: 6px;
247
+ }
248
+
249
+ .source-filter {
250
+ cursor: pointer;
251
+ user-select: none;
252
+ }
253
+
254
+ .source-filter input { display: none; }
255
+
256
+ .source-filter-label {
257
+ display: inline-block;
258
+ font-size: 10px;
259
+ font-weight: 500;
260
+ letter-spacing: 0.04em;
261
+ padding: 2px 8px;
262
+ border-radius: var(--radius);
263
+ border: 1px solid transparent;
264
+ transition: opacity 0.15s;
265
+ }
266
+
267
+ .source-filter-label.active { opacity: 1; }
268
+ .source-filter-label.inactive { opacity: 0.25; }
269
+
270
+ .source-filter-label[data-source="kova"] {
271
+ color: #9B72EF;
272
+ background: rgba(155, 114, 239, 0.08);
273
+ border-color: rgba(155, 114, 239, 0.18);
274
+ }
275
+ .source-filter-label[data-source="claude"] {
276
+ color: #3B82F6;
277
+ background: rgba(59, 130, 246, 0.08);
278
+ border-color: rgba(59, 130, 246, 0.18);
279
+ }
280
+ .source-filter-label[data-source="codex"] {
281
+ color: #F59E0B;
282
+ background: rgba(245, 158, 11, 0.08);
283
+ border-color: rgba(245, 158, 11, 0.18);
284
+ }
285
+
286
+ /* Session list */
287
+
288
+ .session-list {
289
+ flex: 1;
290
+ overflow-y: auto;
291
+ }
292
+
293
+ .session-list-empty {
294
+ padding: 32px;
295
+ text-align: center;
296
+ font-size: 12px;
297
+ color: var(--text-3);
298
+ }
299
+
300
+ .session-item {
301
+ position: relative;
302
+ cursor: pointer;
303
+ padding: 10px 16px;
304
+ border-bottom: 1px solid var(--border);
305
+ transition: background 0.12s;
306
+ user-select: none;
307
+ }
308
+
309
+ .session-item:hover {
310
+ background: var(--raised);
311
+ }
312
+
313
+ .session-item.selected {
314
+ background: var(--accent-dim);
315
+ }
316
+
317
+ .session-item.selected:hover {
318
+ background: var(--accent-dim);
319
+ }
320
+
321
+ .session-item.selected::before {
322
+ content: '';
323
+ position: absolute;
324
+ left: 0;
325
+ top: 0;
326
+ bottom: 0;
327
+ width: 2px;
328
+ background: var(--accent);
329
+ }
330
+
331
+ .session-item.subagent {
332
+ padding-left: 24px;
333
+ }
334
+
335
+ /* Compact sidebar mode */
336
+ .session-item.compact {
337
+ padding: 6px 16px;
338
+ }
339
+ .session-item.compact.subagent {
340
+ padding-left: 24px;
341
+ }
342
+
343
+ .session-row {
344
+ display: flex;
345
+ align-items: center;
346
+ gap: 8px;
347
+ margin-bottom: 4px;
348
+ }
349
+
350
+ .session-item.compact .session-row {
351
+ margin-bottom: 0;
352
+ }
353
+
354
+ .expand-btn {
355
+ display: flex;
356
+ align-items: center;
357
+ padding: 2px;
358
+ background: none;
359
+ border: none;
360
+ color: var(--text-3);
361
+ cursor: pointer;
362
+ }
363
+
364
+ .expand-chevron {
365
+ display: block;
366
+ transition: transform 0.15s;
367
+ }
368
+
369
+ .expand-chevron.open {
370
+ transform: rotate(90deg);
371
+ }
372
+
373
+ .session-dot {
374
+ width: 6px;
375
+ height: 6px;
376
+ border-radius: 50%;
377
+ flex-shrink: 0;
378
+ }
379
+
380
+ .session-dot.active {
381
+ background: var(--green);
382
+ box-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
383
+ }
384
+
385
+ .session-dot.inactive { background: var(--text-3); }
386
+ .session-dot.subagent { background: var(--accent); }
387
+
388
+ .session-label, .session-time, .session-meta, .session-preview, .session-source {
389
+ user-select: none;
390
+ }
391
+
392
+ .session-label {
393
+ flex: 1;
394
+ font-size: 13px;
395
+ font-weight: 500;
396
+ color: var(--text-1);
397
+ overflow: hidden;
398
+ text-overflow: ellipsis;
399
+ white-space: nowrap;
400
+ min-width: 0;
401
+ }
402
+
403
+ .session-label.sub {
404
+ font-size: 12px;
405
+ }
406
+
407
+ .session-time {
408
+ font-family: var(--mono);
409
+ font-size: 10px;
410
+ color: var(--text-3);
411
+ white-space: nowrap;
412
+ flex-shrink: 0;
413
+ }
414
+
415
+ .session-meta {
416
+ display: flex;
417
+ align-items: center;
418
+ gap: 6px;
419
+ margin-bottom: 2px;
420
+ }
421
+
422
+ .session-source {
423
+ font-size: 10px;
424
+ font-weight: 500;
425
+ letter-spacing: 0.04em;
426
+ color: var(--text-2);
427
+ }
428
+
429
+ .session-msgs {
430
+ font-family: var(--mono);
431
+ font-size: 10px;
432
+ color: var(--text-3);
433
+ }
434
+
435
+ .session-preview {
436
+ font-size: 12px;
437
+ color: var(--text-3);
438
+ overflow: hidden;
439
+ text-overflow: ellipsis;
440
+ white-space: nowrap;
441
+ line-height: 1.4;
442
+ }
443
+
444
+ .subagent-children {
445
+ border-left: 1px solid var(--border);
446
+ margin-left: 20px;
447
+ }
448
+
449
+ /* ── Settings Panel ──────────────── */
450
+
451
+ .settings-panel {
452
+ flex: 1;
453
+ display: flex;
454
+ flex-direction: column;
455
+ overflow: hidden;
456
+ }
457
+
458
+ .settings-header {
459
+ display: flex;
460
+ align-items: center;
461
+ justify-content: space-between;
462
+ padding: 12px 16px;
463
+ border-bottom: 1px solid var(--border);
464
+ }
465
+
466
+ .settings-title {
467
+ font-size: 13px;
468
+ font-weight: 500;
469
+ color: var(--text-1);
470
+ }
471
+
472
+ .settings-close {
473
+ display: flex;
474
+ align-items: center;
475
+ justify-content: center;
476
+ width: 24px;
477
+ height: 24px;
478
+ background: none;
479
+ border: 1px solid var(--border);
480
+ border-radius: var(--radius);
481
+ color: var(--text-3);
482
+ cursor: pointer;
483
+ transition: all 0.12s;
484
+ }
485
+
486
+ .settings-close:hover {
487
+ color: var(--text-1);
488
+ border-color: var(--accent-border);
489
+ }
490
+
491
+ .settings-body {
492
+ flex: 1;
493
+ overflow-y: auto;
494
+ padding: 12px 16px;
495
+ }
496
+
497
+ .settings-section {
498
+ margin-bottom: 20px;
499
+ }
500
+
501
+ .settings-section-title {
502
+ font-size: 10px;
503
+ font-weight: 500;
504
+ text-transform: uppercase;
505
+ letter-spacing: 0.06em;
506
+ color: var(--text-3);
507
+ margin-bottom: 8px;
508
+ }
509
+
510
+ /* Theme buttons in settings */
511
+ .settings-theme-row {
512
+ display: flex;
513
+ gap: 4px;
514
+ }
515
+
516
+ .settings-theme-btn {
517
+ display: flex;
518
+ align-items: center;
519
+ gap: 5px;
520
+ padding: 5px 10px;
521
+ background: transparent;
522
+ border: 1px solid var(--border);
523
+ border-radius: var(--radius);
524
+ color: var(--text-3);
525
+ font-family: var(--sans);
526
+ font-size: 11px;
527
+ cursor: pointer;
528
+ transition: all 0.12s;
529
+ }
530
+
531
+ .settings-theme-btn:hover {
532
+ border-color: var(--accent-border);
533
+ color: var(--text-2);
534
+ }
535
+
536
+ .settings-theme-btn.active {
537
+ background: var(--accent-dim);
538
+ border-color: var(--accent-border);
539
+ color: var(--accent);
540
+ }
541
+
542
+ /* Block colors */
543
+ .settings-colors-list {
544
+ display: flex;
545
+ flex-direction: column;
546
+ gap: 6px;
547
+ }
548
+
549
+ .settings-color-row {
550
+ display: flex;
551
+ align-items: center;
552
+ gap: 8px;
553
+ }
554
+
555
+ .settings-color-label {
556
+ font-size: 11px;
557
+ color: var(--text-2);
558
+ flex: 1;
559
+ min-width: 0;
560
+ }
561
+
562
+ .settings-color-swatch {
563
+ width: 14px;
564
+ height: 14px;
565
+ border-radius: 3px;
566
+ flex-shrink: 0;
567
+ border: 1px solid var(--border);
568
+ }
569
+
570
+ .settings-color-input {
571
+ width: 24px;
572
+ height: 20px;
573
+ padding: 0;
574
+ border: none;
575
+ background: none;
576
+ cursor: pointer;
577
+ flex-shrink: 0;
578
+ }
579
+
580
+ .settings-color-input::-webkit-color-swatch-wrapper { padding: 0; }
581
+ .settings-color-input::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 3px; }
582
+
583
+ .settings-color-reset {
584
+ background: none;
585
+ border: none;
586
+ color: var(--text-3);
587
+ font-family: var(--mono);
588
+ font-size: 9px;
589
+ cursor: pointer;
590
+ padding: 1px 4px;
591
+ flex-shrink: 0;
592
+ }
593
+
594
+ .settings-color-reset:hover {
595
+ color: var(--accent);
596
+ }
597
+
598
+ /* Display toggles */
599
+ .settings-toggle-row {
600
+ display: flex;
601
+ align-items: center;
602
+ gap: 8px;
603
+ padding: 4px 0;
604
+ cursor: pointer;
605
+ }
606
+
607
+ .settings-toggle-row input[type="checkbox"] {
608
+ width: 14px;
609
+ height: 14px;
610
+ accent-color: var(--accent);
611
+ cursor: pointer;
612
+ }
613
+
614
+ .settings-toggle-label {
615
+ font-size: 12px;
616
+ color: var(--text-2);
617
+ }
618
+
619
+ /* ── Theme toggle (kept for backward compat) ── */
620
+
621
+ .theme-toggle {
622
+ margin-left: auto;
623
+ display: flex;
624
+ align-items: center;
625
+ gap: 2px;
626
+ padding: 2px 3px;
627
+ border-radius: var(--radius);
628
+ background: var(--raised);
629
+ border: 1px solid var(--border);
630
+ }
631
+
632
+ .theme-btn {
633
+ display: flex;
634
+ align-items: center;
635
+ justify-content: center;
636
+ width: 22px;
637
+ height: 22px;
638
+ border-radius: var(--radius);
639
+ border: none;
640
+ cursor: pointer;
641
+ transition: background 0.15s, color 0.15s;
642
+ }
643
+
644
+ .theme-btn.active {
645
+ background: var(--bg);
646
+ color: var(--text-1);
647
+ }
648
+
649
+ .theme-btn.inactive {
650
+ background: none;
651
+ color: var(--text-3);
652
+ }
653
+
654
+ /* ── Main panel ───────────────────── */
655
+
656
+ .main-panel {
657
+ flex: 1;
658
+ display: flex;
659
+ flex-direction: column;
660
+ background: var(--bg);
661
+ min-width: 0;
662
+ }
663
+
664
+ .main-header {
665
+ flex-shrink: 0;
666
+ padding: 12px 24px;
667
+ background: var(--surface);
668
+ border-bottom: 1px solid var(--border);
669
+ }
670
+
671
+ .main-header-top {
672
+ display: flex;
673
+ flex-wrap: wrap;
674
+ align-items: center;
675
+ gap: 12px;
676
+ }
677
+
678
+ .main-session-label {
679
+ font-size: 13px;
680
+ font-weight: 500;
681
+ color: var(--text-1);
682
+ }
683
+
684
+ .main-session-id {
685
+ font-family: var(--mono);
686
+ font-size: 10px;
687
+ color: var(--text-3);
688
+ cursor: pointer;
689
+ padding: 2px 8px;
690
+ background: var(--raised);
691
+ border: 1px solid var(--border);
692
+ border-radius: var(--radius);
693
+ }
694
+
695
+ .main-session-id:hover {
696
+ border-color: var(--accent);
697
+ color: var(--text-2);
698
+ }
699
+
700
+ .main-meta {
701
+ font-size: 11px;
702
+ color: var(--text-3);
703
+ }
704
+
705
+ .main-meta b {
706
+ color: var(--text-2);
707
+ font-weight: 500;
708
+ }
709
+
710
+ .main-spacer { flex: 1; }
711
+
712
+ .live-indicator {
713
+ display: flex;
714
+ align-items: center;
715
+ gap: 5px;
716
+ font-family: var(--mono);
717
+ font-size: 10px;
718
+ font-weight: 500;
719
+ }
720
+
721
+ .live-dot {
722
+ width: 6px;
723
+ height: 6px;
724
+ border-radius: 50%;
725
+ }
726
+
727
+ .main-toolbar {
728
+ display: flex;
729
+ align-items: center;
730
+ gap: 6px;
731
+ margin-top: 8px;
732
+ }
733
+
734
+ .toolbar-btn {
735
+ padding: 4px 10px;
736
+ font-family: var(--sans);
737
+ font-size: 11px;
738
+ border-radius: var(--radius);
739
+ border: 1px solid var(--border);
740
+ background: transparent;
741
+ color: var(--text-3);
742
+ cursor: pointer;
743
+ transition: all 0.12s;
744
+ }
745
+
746
+ .toolbar-btn:hover {
747
+ border-color: var(--accent-border);
748
+ color: var(--text-2);
749
+ }
750
+
751
+ .toolbar-btn.active {
752
+ background: var(--accent-dim);
753
+ border-color: var(--accent-border);
754
+ color: var(--accent);
755
+ }
756
+
757
+ /* Search bar (in-message) */
758
+
759
+ .msg-search-bar {
760
+ display: flex;
761
+ align-items: center;
762
+ gap: 8px;
763
+ padding: 8px 24px;
764
+ background: var(--surface);
765
+ border-bottom: 1px solid var(--border);
766
+ }
767
+
768
+ .msg-search-input {
769
+ flex: 1;
770
+ padding: 5px 10px;
771
+ background: var(--raised);
772
+ border: 1px solid var(--border);
773
+ border-radius: var(--radius);
774
+ color: var(--text-1);
775
+ font-family: var(--sans);
776
+ font-size: 12px;
777
+ outline: none;
778
+ }
779
+
780
+ .msg-search-input:focus {
781
+ border-color: var(--accent);
782
+ }
783
+
784
+ .msg-search-count {
785
+ font-family: var(--mono);
786
+ font-size: 10px;
787
+ color: var(--text-3);
788
+ white-space: nowrap;
789
+ }
790
+
791
+ .msg-search-btn {
792
+ display: flex;
793
+ align-items: center;
794
+ justify-content: center;
795
+ width: 26px;
796
+ height: 26px;
797
+ background: var(--raised);
798
+ border: 1px solid var(--border);
799
+ border-radius: var(--radius);
800
+ color: var(--text-3);
801
+ cursor: pointer;
802
+ }
803
+
804
+ .msg-search-btn:hover {
805
+ border-color: var(--accent-border);
806
+ color: var(--text-2);
807
+ }
808
+
809
+ /* Empty state */
810
+
811
+ .empty-state {
812
+ flex: 1;
813
+ display: flex;
814
+ flex-direction: column;
815
+ align-items: center;
816
+ justify-content: center;
817
+ gap: 8px;
818
+ color: var(--text-3);
819
+ }
820
+
821
+ .empty-icon {
822
+ display: flex;
823
+ align-items: center;
824
+ justify-content: center;
825
+ width: 40px;
826
+ height: 40px;
827
+ border-radius: var(--radius);
828
+ border: 1px solid var(--border);
829
+ color: var(--text-3);
830
+ }
831
+
832
+ .empty-title {
833
+ font-size: 14px;
834
+ font-weight: 500;
835
+ color: var(--text-2);
836
+ }
837
+
838
+ .empty-hint {
839
+ font-size: 11px;
840
+ color: var(--text-3);
841
+ }
842
+
843
+ /* ── Messages thread ──────────────── */
844
+
845
+ .messages-thread {
846
+ flex: 1;
847
+ overflow-y: auto;
848
+ padding: 16px 20px;
849
+ }
850
+
851
+ .messages-inner {
852
+ max-width: 100%;
853
+ }
854
+
855
+ .loading-state {
856
+ display: flex;
857
+ align-items: center;
858
+ justify-content: center;
859
+ gap: 10px;
860
+ padding: 40px;
861
+ font-size: 12px;
862
+ color: var(--text-3);
863
+ }
864
+
865
+ /* ── Messages ─────────────────────── */
866
+
867
+ .msg {
868
+ margin-bottom: 16px;
869
+ display: flex;
870
+ flex-direction: column;
871
+ }
872
+
873
+ /* ── User bubble — right side ── */
874
+ .msg-user {
875
+ align-self: flex-end;
876
+ max-width: 70%;
877
+ background: #9B72EF;
878
+ color: #fff;
879
+ border-radius: 18px 18px 4px 18px;
880
+ padding: 10px 16px;
881
+ position: relative;
882
+ }
883
+
884
+ .msg-user-text {
885
+ font-size: 14px;
886
+ line-height: 1.6;
887
+ color: #fff;
888
+ word-break: break-word;
889
+ }
890
+
891
+ /* copy button inside user bubble */
892
+ .msg-user .copy-btn {
893
+ background: rgba(255,255,255,0.15);
894
+ border-color: rgba(255,255,255,0.25);
895
+ color: rgba(255,255,255,0.8);
896
+ }
897
+ .msg-user .copy-btn:hover {
898
+ background: rgba(255,255,255,0.25);
899
+ color: #fff;
900
+ border-color: rgba(255,255,255,0.5);
901
+ }
902
+
903
+ /* ── Assistant card — left side ── */
904
+ .msg-assistant {
905
+ align-self: flex-start;
906
+ max-width: 88%;
907
+ background: var(--surface);
908
+ border: 1px solid var(--border);
909
+ border-radius: 4px 12px 12px 12px;
910
+ padding: 12px 16px;
911
+ }
912
+
913
+ .msg-text {
914
+ line-height: 1.6;
915
+ word-break: break-word;
916
+ }
917
+
918
+ .msg-time {
919
+ font-family: var(--mono);
920
+ font-size: 10px;
921
+ color: var(--text-3);
922
+ margin-top: 8px;
923
+ }
924
+
925
+ /* ── Copy button ──────────────────── */
926
+
927
+ .copyable { position: relative; }
928
+
929
+ .copy-btn {
930
+ position: absolute;
931
+ top: 6px;
932
+ right: 6px;
933
+ width: 26px;
934
+ height: 26px;
935
+ background: var(--raised);
936
+ border: 1px solid var(--border);
937
+ color: var(--text-3);
938
+ border-radius: var(--radius);
939
+ cursor: pointer;
940
+ display: flex;
941
+ align-items: center;
942
+ justify-content: center;
943
+ opacity: 0;
944
+ transition: opacity 0.15s, color 0.15s, border-color 0.15s;
945
+ z-index: 5;
946
+ }
947
+
948
+ .copyable:hover .copy-btn { opacity: 1; }
949
+ .copy-btn:hover { color: var(--text-1); border-color: var(--accent-border); }
950
+ .copy-btn.copied { color: var(--green) !important; border-color: var(--green) !important; opacity: 1 !important; }
951
+
952
+ /* ── Thinking block ───────────────── */
953
+
954
+ .thinking-block {
955
+ margin: 6px 0;
956
+ border-radius: var(--radius);
957
+ overflow: hidden;
958
+ border: 1px solid color-mix(in srgb, var(--block-accent, #6366F1) 25%, var(--border));
959
+ background: var(--thinking-bg);
960
+ }
961
+
962
+ .thinking-block.expanded {
963
+ background: color-mix(in srgb, var(--block-accent, #6366F1) 5%, var(--surface));
964
+ }
965
+
966
+ .thinking-header {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 8px;
970
+ padding: 7px 10px;
971
+ cursor: pointer;
972
+ user-select: none;
973
+ font-size: 12px;
974
+ color: var(--text-3);
975
+ transition: color 0.12s, background 0.12s;
976
+ }
977
+
978
+ .thinking-header:hover {
979
+ color: var(--text-2);
980
+ background: color-mix(in srgb, var(--block-accent, #6366F1) 8%, transparent);
981
+ }
982
+
983
+ .thinking-chevron {
984
+ transition: transform 0.15s;
985
+ font-size: 9px;
986
+ flex-shrink: 0;
987
+ display: flex;
988
+ }
989
+
990
+ .thinking-chevron.open { transform: rotate(90deg); }
991
+
992
+ .thinking-label {
993
+ font-family: var(--mono);
994
+ font-size: 11px;
995
+ color: var(--text-3);
996
+ }
997
+
998
+ .thinking-body {
999
+ max-height: 0;
1000
+ overflow: hidden;
1001
+ transition: max-height 0.3s ease;
1002
+ }
1003
+
1004
+ .thinking-body.open {
1005
+ max-height: 480px;
1006
+ overflow-y: auto;
1007
+ }
1008
+
1009
+ .thinking-body-inner {
1010
+ padding: 8px 12px 10px 12px;
1011
+ font-size: 12px;
1012
+ color: var(--text-3);
1013
+ white-space: pre-wrap;
1014
+ word-break: break-word;
1015
+ font-family: var(--mono);
1016
+ line-height: 1.5;
1017
+ }
1018
+
1019
+ /* ── Tool call (with accent dot) ── */
1020
+
1021
+ .tool-call {
1022
+ margin: 6px 0;
1023
+ border-radius: var(--radius);
1024
+ overflow: hidden;
1025
+ background: var(--raised);
1026
+ border-left: 3px solid var(--block-accent, var(--border));
1027
+ }
1028
+
1029
+ .tool-call.expanded {
1030
+ background: color-mix(in srgb, var(--block-accent, var(--indigo)) 6%, var(--surface));
1031
+ }
1032
+
1033
+ .tool-call-header {
1034
+ display: flex;
1035
+ align-items: center;
1036
+ gap: 8px;
1037
+ padding: 6px 10px;
1038
+ cursor: pointer;
1039
+ user-select: none;
1040
+ transition: color 0.12s, background 0.12s;
1041
+ }
1042
+
1043
+ .tool-call-header:hover {
1044
+ background: color-mix(in srgb, var(--block-accent, var(--indigo)) 8%, transparent);
1045
+ }
1046
+
1047
+ .tool-call-header:hover .tc-name-label { color: var(--text-1); }
1048
+
1049
+ .tc-chevron {
1050
+ transition: transform 0.15s;
1051
+ flex-shrink: 0;
1052
+ display: flex;
1053
+ color: var(--text-3);
1054
+ }
1055
+
1056
+ .tc-chevron.open { transform: rotate(90deg); }
1057
+
1058
+ .tc-dot {
1059
+ width: 4px;
1060
+ height: 4px;
1061
+ border-radius: 50%;
1062
+ flex-shrink: 0;
1063
+ }
1064
+
1065
+ .tc-name-label {
1066
+ font-family: var(--mono);
1067
+ font-size: 11px;
1068
+ font-weight: 500;
1069
+ color: var(--block-accent, var(--text-2));
1070
+ transition: color 0.12s;
1071
+ }
1072
+
1073
+ .tc-desc {
1074
+ font-size: 11px;
1075
+ color: var(--text-3);
1076
+ overflow: hidden;
1077
+ text-overflow: ellipsis;
1078
+ white-space: nowrap;
1079
+ flex: 1;
1080
+ }
1081
+
1082
+ .tool-call-body {
1083
+ display: none;
1084
+ padding: 8px 0 8px 8px;
1085
+ }
1086
+
1087
+ .tool-call-body.open {
1088
+ display: block;
1089
+ }
1090
+
1091
+ .tc-shell {
1092
+ background: var(--surface);
1093
+ border-radius: var(--radius);
1094
+ padding: 8px 12px;
1095
+ font-family: var(--mono);
1096
+ font-size: 12px;
1097
+ line-height: 1.5;
1098
+ overflow-x: auto;
1099
+ border: 1px solid var(--border);
1100
+ position: relative;
1101
+ }
1102
+
1103
+ .tc-shell:hover .copy-btn { opacity: 1; }
1104
+ .tc-shell .workdir { color: var(--text-3); font-size: 10px; margin-bottom: 4px; }
1105
+ .tc-shell .prompt { color: var(--green); }
1106
+ .tc-shell .cmd { color: var(--text-1); }
1107
+
1108
+ .tc-file-path {
1109
+ font-family: var(--mono);
1110
+ font-size: 11px;
1111
+ color: var(--blue);
1112
+ margin-bottom: 6px;
1113
+ display: flex;
1114
+ align-items: center;
1115
+ gap: 6px;
1116
+ }
1117
+
1118
+ .tc-search-query {
1119
+ font-size: 13px;
1120
+ color: var(--text-1);
1121
+ display: flex;
1122
+ align-items: center;
1123
+ gap: 8px;
1124
+ }
1125
+
1126
+ /* Pre wrap (code blocks in markdown) */
1127
+
1128
+ .pre-wrap { position: relative; margin: 8px 0; }
1129
+ .pre-wrap:hover .copy-btn { opacity: 1; }
1130
+ .pre-wrap .lang-tag {
1131
+ position: absolute;
1132
+ top: 8px;
1133
+ left: 10px;
1134
+ font-family: var(--mono);
1135
+ font-size: 10px;
1136
+ color: var(--text-3);
1137
+ pointer-events: none;
1138
+ user-select: none;
1139
+ }
1140
+ .pre-wrap pre {
1141
+ background: var(--surface);
1142
+ padding: 10px 14px;
1143
+ border-radius: var(--radius);
1144
+ overflow-x: auto;
1145
+ border: 1px solid var(--border);
1146
+ margin: 0;
1147
+ }
1148
+ .pre-wrap pre.has-lang-tag { padding-top: 28px; }
1149
+ .pre-wrap .copy-btn { top: 5px; right: 5px; }
1150
+
1151
+ /* JSON collapse */
1152
+
1153
+ .tc-json-toggle {
1154
+ cursor: pointer;
1155
+ font-size: 11px;
1156
+ color: var(--text-3);
1157
+ font-family: var(--mono);
1158
+ padding: 4px 0;
1159
+ display: flex;
1160
+ align-items: center;
1161
+ gap: 4px;
1162
+ }
1163
+
1164
+ .tc-json-toggle:hover { color: var(--text-2); }
1165
+
1166
+ .tc-json-body {
1167
+ display: none;
1168
+ background: var(--surface);
1169
+ border-radius: var(--radius);
1170
+ padding: 8px 12px;
1171
+ font-family: var(--mono);
1172
+ font-size: 11px;
1173
+ white-space: pre-wrap;
1174
+ word-break: break-word;
1175
+ max-height: 350px;
1176
+ overflow-y: auto;
1177
+ border: 1px solid var(--border);
1178
+ margin-top: 6px;
1179
+ color: var(--text-2);
1180
+ }
1181
+
1182
+ .tc-json-body.open { display: block; }
1183
+
1184
+ .jk { color: #7DD3FC; }
1185
+ .js { color: #86EFAC; }
1186
+ .jn { color: #FCA5A5; }
1187
+ .jb { color: #FCD34D; }
1188
+ .jnl { color: #94A3B8; font-style: italic; }
1189
+
1190
+ /* ── Tool result (collapsible with accent) ── */
1191
+
1192
+ .tool-result-wrap {
1193
+ margin: 4px 0 8px 0;
1194
+ border-radius: var(--radius);
1195
+ }
1196
+
1197
+ .tool-result-wrap.expanded {
1198
+ background: color-mix(in srgb, var(--block-accent, var(--indigo)) 2%, transparent);
1199
+ }
1200
+
1201
+ .tool-result-header {
1202
+ display: flex;
1203
+ align-items: center;
1204
+ gap: 8px;
1205
+ padding: 6px 0;
1206
+ cursor: pointer;
1207
+ user-select: none;
1208
+ transition: color 0.12s;
1209
+ }
1210
+
1211
+ .tool-result-header:hover .tr-status-inline { color: var(--text-2); }
1212
+
1213
+ .tr-status-inline {
1214
+ font-family: var(--mono);
1215
+ font-size: 10px;
1216
+ color: var(--text-3);
1217
+ flex-shrink: 0;
1218
+ }
1219
+
1220
+ .tr-status-inline.err { color: var(--red); }
1221
+
1222
+ .tr-summary {
1223
+ font-size: 11px;
1224
+ color: var(--text-3);
1225
+ overflow: hidden;
1226
+ text-overflow: ellipsis;
1227
+ white-space: nowrap;
1228
+ flex: 1;
1229
+ }
1230
+
1231
+ .tool-result-body {
1232
+ padding: 4px 0 4px 8px;
1233
+ }
1234
+
1235
+ /* Legacy .tool-result kept for compat */
1236
+ .tool-result {
1237
+ margin: 4px 0 8px 0;
1238
+ }
1239
+
1240
+ .tr-status {
1241
+ font-family: var(--mono);
1242
+ font-size: 10px;
1243
+ color: var(--text-3);
1244
+ margin-bottom: 4px;
1245
+ display: flex;
1246
+ align-items: center;
1247
+ gap: 6px;
1248
+ }
1249
+
1250
+ .tr-status.err { color: var(--red); }
1251
+
1252
+ .tr-terminal {
1253
+ background: var(--surface);
1254
+ border-radius: var(--radius);
1255
+ padding: 8px 12px;
1256
+ font-family: var(--mono);
1257
+ font-size: 11.5px;
1258
+ line-height: 1.55;
1259
+ white-space: pre-wrap;
1260
+ word-break: break-word;
1261
+ overflow-x: auto;
1262
+ max-height: 280px;
1263
+ overflow-y: auto;
1264
+ border: 1px solid var(--border);
1265
+ color: var(--text-1);
1266
+ position: relative;
1267
+ }
1268
+
1269
+ .tr-terminal:hover .copy-btn { opacity: 1; }
1270
+
1271
+ .tr-success {
1272
+ font-size: 12px;
1273
+ color: var(--green);
1274
+ display: flex;
1275
+ align-items: center;
1276
+ gap: 6px;
1277
+ }
1278
+
1279
+ .tr-search-results {
1280
+ display: flex;
1281
+ flex-direction: column;
1282
+ gap: 8px;
1283
+ }
1284
+
1285
+ .tr-search-card {
1286
+ border: 1px solid var(--border);
1287
+ border-radius: var(--radius);
1288
+ padding: 8px 12px;
1289
+ }
1290
+
1291
+ .tr-search-card .sr-title { font-size: 12px; color: var(--blue); font-weight: 500; }
1292
+ .tr-search-card .sr-url { font-size: 10px; color: var(--text-3); margin: 2px 0; word-break: break-all; font-family: var(--mono); }
1293
+ .tr-search-card .sr-snip { font-size: 11px; color: var(--text-2); line-height: 1.4; }
1294
+
1295
+ /* Message tool result — speech bubble */
1296
+
1297
+ .tr-message-bubble {
1298
+ border-left: 3px solid var(--amber);
1299
+ background: rgba(245, 158, 11, 0.04);
1300
+ border-radius: 0 var(--radius) var(--radius) 0;
1301
+ padding: 8px 12px;
1302
+ }
1303
+
1304
+ .tr-message-target {
1305
+ font-family: var(--mono);
1306
+ font-size: 10px;
1307
+ font-weight: 500;
1308
+ color: var(--amber);
1309
+ margin-bottom: 4px;
1310
+ text-transform: uppercase;
1311
+ letter-spacing: 0.04em;
1312
+ }
1313
+
1314
+ .tr-message-content {
1315
+ font-size: 12px;
1316
+ color: var(--text-1);
1317
+ line-height: 1.5;
1318
+ white-space: pre-wrap;
1319
+ word-break: break-word;
1320
+ }
1321
+
1322
+ /* Markdown result collapse */
1323
+
1324
+ .tr-md-report { margin: 4px 0; }
1325
+
1326
+ .tr-md-header {
1327
+ display: flex;
1328
+ align-items: flex-start;
1329
+ gap: 6px;
1330
+ cursor: pointer;
1331
+ padding: 4px 0;
1332
+ transition: color 0.12s;
1333
+ }
1334
+
1335
+ .tr-md-header:hover { color: var(--text-2); }
1336
+ .tr-md-preview { font-size: 11px; color: var(--text-3); flex: 1; line-height: 1.4; }
1337
+
1338
+ .tr-md-body {
1339
+ display: none;
1340
+ padding: 8px 0 4px 16px;
1341
+ border-left: 1px solid var(--border);
1342
+ margin-left: 4px;
1343
+ margin-top: 4px;
1344
+ position: relative;
1345
+ }
1346
+
1347
+ .tr-md-body.open { display: block; }
1348
+ .tr-md-body .copy-btn { position: absolute; top: 6px; right: 2px; }
1349
+
1350
+ /* Show more button */
1351
+
1352
+ .show-more {
1353
+ background: none;
1354
+ border: 1px solid var(--border);
1355
+ color: var(--text-3);
1356
+ padding: 3px 10px;
1357
+ border-radius: var(--radius);
1358
+ cursor: pointer;
1359
+ font-family: var(--sans);
1360
+ font-size: 10px;
1361
+ margin-top: 6px;
1362
+ transition: color 0.12s, border-color 0.12s;
1363
+ }
1364
+
1365
+ .show-more:hover { color: var(--text-1); border-color: var(--accent); }
1366
+
1367
+ /* ── Spawn nav ────────────────────── */
1368
+
1369
+ .spawn-nav-card { margin-top: 8px; }
1370
+
1371
+ .spawn-nav-status {
1372
+ font-size: 11px;
1373
+ color: var(--green);
1374
+ font-weight: 500;
1375
+ display: flex;
1376
+ align-items: center;
1377
+ gap: 6px;
1378
+ margin-bottom: 8px;
1379
+ }
1380
+
1381
+ .spawn-nav-status.err { color: var(--amber); }
1382
+ .spawn-nav-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
1383
+
1384
+ .spawn-session-btn {
1385
+ display: flex;
1386
+ align-items: center;
1387
+ background: var(--surface);
1388
+ border: 1px solid var(--border);
1389
+ border-radius: var(--radius);
1390
+ cursor: pointer;
1391
+ transition: border-color 0.15s;
1392
+ text-align: left;
1393
+ width: 100%;
1394
+ overflow: hidden;
1395
+ font-family: var(--sans);
1396
+ }
1397
+
1398
+ .spawn-session-btn:hover { border-color: var(--accent); }
1399
+
1400
+ .ssb-body { flex: 1; padding: 10px 12px; min-width: 0; }
1401
+ .ssb-title { font-size: 12px; font-weight: 500; color: var(--text-1); margin-bottom: 3px; }
1402
+ .ssb-key { font-family: var(--mono); font-size: 10px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1403
+
1404
+ .ssb-arrow-col {
1405
+ padding: 0 14px;
1406
+ align-self: stretch;
1407
+ display: flex;
1408
+ align-items: center;
1409
+ justify-content: center;
1410
+ border-left: 1px solid var(--border);
1411
+ color: var(--text-3);
1412
+ font-size: 16px;
1413
+ transition: color 0.15s;
1414
+ }
1415
+
1416
+ .spawn-session-btn:hover .ssb-arrow-col { color: var(--accent); }
1417
+
1418
+ /* ── Event dividers ───────────────── */
1419
+
1420
+ .event-divider {
1421
+ display: flex;
1422
+ align-items: center;
1423
+ gap: 12px;
1424
+ padding: 16px 0;
1425
+ color: var(--text-3);
1426
+ font-size: 11px;
1427
+ }
1428
+
1429
+ .event-divider::before,
1430
+ .event-divider::after {
1431
+ content: '';
1432
+ flex: 1;
1433
+ height: 1px;
1434
+ background: var(--border);
1435
+ }
1436
+
1437
+ .event-inner {
1438
+ display: flex;
1439
+ flex-direction: column;
1440
+ align-items: center;
1441
+ gap: 3px;
1442
+ cursor: pointer;
1443
+ white-space: nowrap;
1444
+ }
1445
+
1446
+ .event-summary {
1447
+ max-height: 0;
1448
+ overflow: hidden;
1449
+ transition: max-height 0.3s;
1450
+ font-size: 11px;
1451
+ color: var(--text-3);
1452
+ max-width: 540px;
1453
+ text-align: left;
1454
+ white-space: pre-wrap;
1455
+ word-break: break-word;
1456
+ line-height: 1.4;
1457
+ }
1458
+
1459
+ .event-summary.open { max-height: 260px; overflow-y: auto; padding-top: 5px; }
1460
+
1461
+ .model-inner {
1462
+ display: flex;
1463
+ align-items: center;
1464
+ gap: 6px;
1465
+ white-space: nowrap;
1466
+ font-family: var(--mono);
1467
+ font-size: 10px;
1468
+ }
1469
+
1470
+ .model-name { color: var(--text-2); font-weight: 500; }
1471
+ .model-sep { color: var(--text-3); }
1472
+ .model-extra { color: var(--text-3); }
1473
+
1474
+ .model-error {
1475
+ color: var(--red);
1476
+ font-size: 10px;
1477
+ font-family: var(--mono);
1478
+ }
1479
+
1480
+ .event-pill {
1481
+ text-align: center;
1482
+ padding: 3px 0;
1483
+ font-family: var(--mono);
1484
+ font-size: 10px;
1485
+ color: var(--text-3);
1486
+ }
1487
+
1488
+ /* ── Markdown ─────────────────────── */
1489
+
1490
+ .md-content { font-size: 14px; }
1491
+ .md-content p { margin-bottom: 8px; }
1492
+ .md-content p:last-child { margin-bottom: 0; }
1493
+ .md-content h1 { font-size: 17px; font-weight: 500; color: var(--text-1); margin: 16px 0 8px; }
1494
+ .md-content h2 { font-size: 15px; font-weight: 500; color: var(--text-1); margin: 14px 0 6px; }
1495
+ .md-content h3 { font-size: 13px; font-weight: 500; color: var(--text-1); margin: 12px 0 4px; }
1496
+ .md-content ul, .md-content ol { padding-left: 18px; margin-bottom: 8px; }
1497
+ .md-content li { margin-bottom: 3px; }
1498
+ .md-content code {
1499
+ background: var(--raised);
1500
+ padding: 1px 5px;
1501
+ border-radius: 4px;
1502
+ font-family: var(--mono);
1503
+ font-size: 12px;
1504
+ color: #C4B5FD;
1505
+ }
1506
+ .md-content pre code {
1507
+ background: none;
1508
+ padding: 0;
1509
+ font-size: 12px;
1510
+ color: var(--text-1);
1511
+ line-height: 1.55;
1512
+ }
1513
+ .md-content blockquote {
1514
+ border-left: 2px solid var(--accent);
1515
+ padding-left: 12px;
1516
+ color: var(--text-2);
1517
+ margin: 8px 0;
1518
+ }
1519
+ .md-content a { color: var(--accent); text-decoration: none; }
1520
+ .md-content a:hover { text-decoration: underline; }
1521
+ .md-content table { border-collapse: collapse; margin: 8px 0; width: 100%; font-size: 12px; }
1522
+ .md-content th, .md-content td { border: 1px solid var(--border); padding: 5px 10px; }
1523
+ .md-content th { background: var(--raised); font-weight: 500; }
1524
+ .md-content hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
1525
+ .md-content img { max-width: 100%; border-radius: var(--radius); }
1526
+
1527
+ /* ── Search highlight ─────────────── */
1528
+
1529
+ mark.search-hl { background: rgba(250, 204, 21, 0.22); color: var(--text-1); border-radius: 2px; padding: 0 1px; }
1530
+ mark.search-hl.current { background: rgba(250, 204, 21, 0.52); }
1531
+
1532
+ /* ── Spinner ──────────────────────── */
1533
+
1534
+ @keyframes spin { to { transform: rotate(360deg); } }
1535
+
1536
+ .spinner {
1537
+ width: 16px;
1538
+ height: 16px;
1539
+ border: 2px solid var(--border);
1540
+ border-top-color: var(--accent);
1541
+ border-radius: 50%;
1542
+ animation: spin 0.7s linear infinite;
1543
+ }
1544
+
1545
+ /* ── Responsive ───────────────────── */
1546
+
1547
+ @media (max-width: 860px) {
1548
+ :root { --sidebar-w: 220px; }
1549
+ }
1550
+
1551
+ /* ── Thinking hint ───────────────── */
1552
+
1553
+ .thinking-sep {
1554
+ font-size: 10px;
1555
+ color: var(--text-3);
1556
+ opacity: 0.5;
1557
+ }
1558
+
1559
+ .thinking-hint {
1560
+ font-size: 10px;
1561
+ color: var(--text-3);
1562
+ font-family: var(--mono);
1563
+ opacity: 0.6;
1564
+ }
1565
+
1566
+ .thinking-header:hover .thinking-hint { opacity: 1; }
1567
+
1568
+ /* ── Tool call args list ─────────── */
1569
+
1570
+ .tc-args-list {
1571
+ display: flex;
1572
+ flex-direction: column;
1573
+ gap: 2px;
1574
+ }
1575
+
1576
+ .tc-args-empty {
1577
+ font-size: 11px;
1578
+ color: var(--text-3);
1579
+ font-style: italic;
1580
+ }
1581
+
1582
+ .tc-arg-row {
1583
+ display: flex;
1584
+ gap: 6px;
1585
+ align-items: baseline;
1586
+ font-family: var(--mono);
1587
+ font-size: 11.5px;
1588
+ line-height: 1.5;
1589
+ }
1590
+
1591
+ .tc-arg-key {
1592
+ color: var(--text-3);
1593
+ flex-shrink: 0;
1594
+ font-size: 11px;
1595
+ }
1596
+
1597
+ .tc-arg-sep {
1598
+ color: var(--text-3);
1599
+ flex-shrink: 0;
1600
+ font-size: 10px;
1601
+ }
1602
+
1603
+ .tc-arg-val {
1604
+ color: var(--text-1);
1605
+ word-break: break-word;
1606
+ white-space: pre-wrap;
1607
+ }
1608
+
1609
+ .tc-arg-toggle {
1610
+ background: none;
1611
+ border: none;
1612
+ color: var(--accent);
1613
+ cursor: pointer;
1614
+ font-family: var(--mono);
1615
+ font-size: 10px;
1616
+ padding: 0 4px;
1617
+ }
1618
+
1619
+ .tc-arg-toggle:hover {
1620
+ text-decoration: underline;
1621
+ }
1622
+
1623
+ /* ── Search result number ────────── */
1624
+
1625
+ .sr-number {
1626
+ font-family: var(--mono);
1627
+ font-size: 10px;
1628
+ color: var(--text-3);
1629
+ margin-right: 4px;
1630
+ }
1631
+
1632
+ /* ── Bot icon (subagent parent indicator) ── */
1633
+
1634
+ .bot-icon {
1635
+ flex-shrink: 0;
1636
+ opacity: 0.85;
1637
+ }
1638
+
1639
+ /* ── Subagent badge ──────────────── */
1640
+
1641
+ .subagent-badge {
1642
+ font-size: 9px;
1643
+ font-family: var(--mono);
1644
+ color: var(--accent);
1645
+ background: var(--accent-dim);
1646
+ border: 1px solid var(--accent-border);
1647
+ padding: 1px 5px;
1648
+ border-radius: 3px;
1649
+ flex-shrink: 0;
1650
+ letter-spacing: 0.02em;
1651
+ }
1652
+
1653
+ /* ── Light Theme ─────────────────── */
1654
+
1655
+ .theme-light {
1656
+ --bg: #F7F7F8;
1657
+ --surface: #FFFFFF;
1658
+ --raised: #F0F0F3;
1659
+ --border: #E2E2E6;
1660
+ --accent: #7C5CC5;
1661
+ --accent-dim: rgba(124, 92, 197, 0.06);
1662
+ --accent-border: rgba(124, 92, 197, 0.18);
1663
+ --text-1: #111115;
1664
+ --text-2: #44444C;
1665
+ --text-3: #8E8E96;
1666
+ --green: #059669;
1667
+ --red: #DC2626;
1668
+ --amber: #D97706;
1669
+ --blue: #2563EB;
1670
+ --thinking-bg: rgba(142, 142, 150, 0.06);
1671
+ }
1672
+
1673
+ /* Light: inline code */
1674
+ .theme-light .md-content code {
1675
+ color: #7C3AED;
1676
+ background: #EDEDF0;
1677
+ }
1678
+
1679
+ /* Light: JSON syntax */
1680
+ .theme-light .jk { color: #1D4ED8; }
1681
+ .theme-light .js { color: #166534; }
1682
+ .theme-light .jn { color: #B91C1C; }
1683
+ .theme-light .jb { color: #B45309; }
1684
+ .theme-light .jnl { color: #6B7280; font-style: italic; }
1685
+
1686
+ /* Light: hljs code highlighting overrides */
1687
+ .theme-light pre code.hljs,
1688
+ .theme-light code.hljs,
1689
+ .theme-light .hljs {
1690
+ color: #111115;
1691
+ background: #F0F0F3;
1692
+ }
1693
+ .theme-light .hljs-keyword,
1694
+ .theme-light .hljs-selector-tag,
1695
+ .theme-light .hljs-type { color: #7C3AED; }
1696
+ .theme-light .hljs-string,
1697
+ .theme-light .hljs-addition,
1698
+ .theme-light .hljs-regexp { color: #166534; }
1699
+ .theme-light .hljs-number,
1700
+ .theme-light .hljs-literal { color: #B91C1C; }
1701
+ .theme-light .hljs-comment,
1702
+ .theme-light .hljs-quote,
1703
+ .theme-light .hljs-meta { color: #6B7280; }
1704
+ .theme-light .hljs-function .hljs-title,
1705
+ .theme-light .hljs-title { color: #1D4ED8; }
1706
+ .theme-light .hljs-variable,
1707
+ .theme-light .hljs-template-variable,
1708
+ .theme-light .hljs-attr { color: #B45309; }
1709
+ .theme-light .hljs-built_in,
1710
+ .theme-light .hljs-builtin-name { color: #0369A1; }
1711
+ .theme-light .hljs-tag { color: #B91C1C; }
1712
+ .theme-light .hljs-name { color: #7C3AED; }
1713
+ .theme-light .hljs-attribute { color: #B45309; }
1714
+ .theme-light .hljs-symbol,
1715
+ .theme-light .hljs-bullet { color: #059669; }
1716
+ .theme-light .hljs-deletion { color: #B91C1C; background: rgba(185, 28, 28, 0.08); }
1717
+ .theme-light .hljs-section { color: #1D4ED8; font-weight: 500; }
1718
+ .theme-light .hljs-emphasis { font-style: italic; }
1719
+ .theme-light .hljs-strong { font-weight: 700; }
1720
+
1721
+ /* Light: search highlight */
1722
+ .theme-light mark.search-hl { background: rgba(250, 204, 21, 0.35); color: #111115; }
1723
+ .theme-light mark.search-hl.current { background: rgba(250, 204, 21, 0.65); }
1724
+
1725
+ /* Light: source filter badges */
1726
+ .theme-light .source-filter-label[data-source="kova"] {
1727
+ background: rgba(155, 114, 239, 0.10);
1728
+ border-color: rgba(155, 114, 239, 0.25);
1729
+ }
1730
+ .theme-light .source-filter-label[data-source="claude"] {
1731
+ background: rgba(59, 130, 246, 0.10);
1732
+ border-color: rgba(59, 130, 246, 0.25);
1733
+ }
1734
+ .theme-light .source-filter-label[data-source="codex"] {
1735
+ background: rgba(245, 158, 11, 0.10);
1736
+ border-color: rgba(245, 158, 11, 0.25);
1737
+ }
1738
+
1739
+ /* Light: session dot */
1740
+ .theme-light .session-dot.active {
1741
+ box-shadow: 0 0 5px rgba(5, 150, 105, 0.3);
1742
+ }
1743
+
1744
+ /* Light: chat bubbles */
1745
+ .theme-light .msg-user {
1746
+ background: #7C3AED;
1747
+ }
1748
+ .theme-light .msg-assistant {
1749
+ background: #F4F4F7;
1750
+ border-color: #E0E0E8;
1751
+ }
1752
+
1753
+ /* Light: thinking blocks */
1754
+ .theme-light .thinking-body-inner {
1755
+ background: #F3F3F5;
1756
+ border-radius: 0 var(--radius) var(--radius) 0;
1757
+ }
1758
+
1759
+ /* Light: terminal prompt */
1760
+ .theme-light .tc-shell .prompt { color: #059669; }
1761
+
1762
+ /* Light: message bubble */
1763
+ .theme-light .tr-message-bubble {
1764
+ background: rgba(245, 158, 11, 0.06);
1765
+ }
1766
+
1767
+ /* ── Block Toggle Toolbar ────────── */
1768
+
1769
+ .block-toggle-strip {
1770
+ display: flex;
1771
+ align-items: center;
1772
+ gap: 5px;
1773
+ height: 34px;
1774
+ padding: 0 14px;
1775
+ background: var(--surface);
1776
+ border-bottom: 1px solid var(--border);
1777
+ flex-shrink: 0;
1778
+ overflow-x: auto;
1779
+ }
1780
+
1781
+ .block-strip-label {
1782
+ font-size: 10px;
1783
+ font-weight: 600;
1784
+ color: var(--text-3);
1785
+ text-transform: uppercase;
1786
+ letter-spacing: 0.07em;
1787
+ margin-right: 4px;
1788
+ flex-shrink: 0;
1789
+ user-select: none;
1790
+ }
1791
+
1792
+ .block-pill {
1793
+ display: inline-flex;
1794
+ align-items: center;
1795
+ padding: 3px 9px;
1796
+ font-family: var(--sans);
1797
+ font-size: 11px;
1798
+ font-weight: 500;
1799
+ border-radius: 9999px;
1800
+ border: 1px solid;
1801
+ background: transparent;
1802
+ cursor: pointer;
1803
+ white-space: nowrap;
1804
+ transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
1805
+ line-height: 1.3;
1806
+ user-select: none;
1807
+ }
1808
+
1809
+ .block-pill:hover { opacity: 0.78; }
1810
+
1811
+ /* three-state pill */
1812
+ .block-pill.block-pill-tri.state-expanded { /* filled — handled inline */ }
1813
+ .block-pill.block-pill-tri.state-collapsed { /* outlined — handled inline */ }
1814
+ .block-pill.block-pill-tri.state-hidden {
1815
+ opacity: 0.45;
1816
+ border-style: dashed;
1817
+ }
1818
+
1819
+ /* ── Tree Panel Toggle Button ────── */
1820
+
1821
+ .tree-panel-btn {
1822
+ display: flex;
1823
+ align-items: center;
1824
+ justify-content: center;
1825
+ width: 30px;
1826
+ height: 26px;
1827
+ padding: 0;
1828
+ flex-shrink: 0;
1829
+ }
1830
+
1831
+ /* ── Session Tree Panel ──────────── */
1832
+
1833
+ .tree-panel {
1834
+ width: 380px;
1835
+ flex-shrink: 0;
1836
+ display: flex;
1837
+ flex-direction: column;
1838
+ background: var(--bg);
1839
+ border-left: 1px solid var(--border);
1840
+ animation: slideInRight 0.2s ease;
1841
+ }
1842
+
1843
+ @keyframes slideInRight {
1844
+ from { transform: translateX(100%); opacity: 0; }
1845
+ to { transform: translateX(0); opacity: 1; }
1846
+ }
1847
+
1848
+ .tree-panel-header {
1849
+ display: flex;
1850
+ align-items: center;
1851
+ justify-content: space-between;
1852
+ padding: 12px 16px;
1853
+ border-bottom: 1px solid var(--border);
1854
+ background: var(--surface);
1855
+ flex-shrink: 0;
1856
+ }
1857
+
1858
+ .tree-panel-title {
1859
+ font-size: 13px;
1860
+ font-weight: 500;
1861
+ color: var(--text-1);
1862
+ }
1863
+
1864
+ .tree-panel-close {
1865
+ display: flex;
1866
+ align-items: center;
1867
+ justify-content: center;
1868
+ width: 24px;
1869
+ height: 24px;
1870
+ background: none;
1871
+ border: 1px solid var(--border);
1872
+ border-radius: var(--radius);
1873
+ color: var(--text-3);
1874
+ cursor: pointer;
1875
+ transition: all 0.12s;
1876
+ }
1877
+
1878
+ .tree-panel-close:hover {
1879
+ color: var(--text-1);
1880
+ border-color: var(--accent-border);
1881
+ }
1882
+
1883
+ .tree-panel-body {
1884
+ flex: 1;
1885
+ position: relative;
1886
+ overflow: hidden;
1887
+ }
1888
+
1889
+ /* ── React Flow overrides ────────── */
1890
+
1891
+ .session-tree-flow {
1892
+ background: var(--bg) !important;
1893
+ }
1894
+
1895
+ .session-tree-flow .react-flow__background {
1896
+ display: none !important;
1897
+ }
1898
+
1899
+ .session-tree-flow .react-flow__edge-path {
1900
+ stroke: var(--border);
1901
+ }
1902
+
1903
+ .session-tree-flow .react-flow__controls,
1904
+ .session-tree-flow .react-flow__minimap {
1905
+ display: none !important;
1906
+ }
1907
+
1908
+ .tree-handle {
1909
+ width: 6px !important;
1910
+ height: 6px !important;
1911
+ background: var(--border) !important;
1912
+ border: none !important;
1913
+ min-width: 0 !important;
1914
+ min-height: 0 !important;
1915
+ }
1916
+
1917
+ /* ── Tree Node Card ──────────────── */
1918
+
1919
+ .tree-node-card {
1920
+ width: 210px;
1921
+ padding: 8px 12px;
1922
+ background: var(--surface);
1923
+ border: 1px solid var(--border);
1924
+ border-radius: var(--radius);
1925
+ cursor: pointer;
1926
+ transition: border-color 0.15s, box-shadow 0.15s;
1927
+ }
1928
+
1929
+ .tree-node-card:hover {
1930
+ border-color: var(--accent-border);
1931
+ }
1932
+
1933
+ /* Root session node */
1934
+ .tree-node-root {
1935
+ border-color: #9B72EF;
1936
+ box-shadow: 0 0 0 1px rgba(155, 114, 239, 0.2);
1937
+ }
1938
+
1939
+ .tree-node-root .tree-node-title {
1940
+ font-weight: 600;
1941
+ color: #9B72EF;
1942
+ }
1943
+
1944
+ /* Turn node */
1945
+ .tree-node-turn {
1946
+ width: 210px;
1947
+ }
1948
+
1949
+ .tree-turn-label {
1950
+ font-size: 10px;
1951
+ font-family: var(--mono);
1952
+ font-weight: 600;
1953
+ color: var(--text-2);
1954
+ text-transform: uppercase;
1955
+ letter-spacing: 0.04em;
1956
+ }
1957
+
1958
+ .tree-node-preview {
1959
+ font-size: 11px;
1960
+ color: var(--text-3);
1961
+ overflow: hidden;
1962
+ text-overflow: ellipsis;
1963
+ white-space: nowrap;
1964
+ margin-top: 2px;
1965
+ line-height: 1.3;
1966
+ }
1967
+
1968
+ /* Subagent branch node */
1969
+ .tree-node-subagent {
1970
+ width: 200px;
1971
+ padding: 6px 10px;
1972
+ border-color: rgba(155, 114, 239, 0.3);
1973
+ background: var(--surface);
1974
+ }
1975
+
1976
+ .tree-node-subagent:hover {
1977
+ border-color: #9B72EF;
1978
+ }
1979
+
1980
+ .tree-node-arrow-row {
1981
+ margin-top: 2px;
1982
+ color: #9B72EF;
1983
+ opacity: 0.7;
1984
+ }
1985
+
1986
+ .tree-node-top {
1987
+ display: flex;
1988
+ align-items: center;
1989
+ gap: 6px;
1990
+ }
1991
+
1992
+ .tree-node-title {
1993
+ font-size: 12px;
1994
+ font-weight: 500;
1995
+ color: var(--text-1);
1996
+ overflow: hidden;
1997
+ text-overflow: ellipsis;
1998
+ white-space: nowrap;
1999
+ flex: 1;
2000
+ min-width: 0;
2001
+ }
2002
+
2003
+ .tree-node-badge {
2004
+ font-size: 9px;
2005
+ font-family: var(--mono);
2006
+ font-weight: 500;
2007
+ padding: 1px 5px;
2008
+ border-radius: 3px;
2009
+ background: var(--accent-dim);
2010
+ border: 1px solid var(--accent-border);
2011
+ color: var(--accent);
2012
+ flex-shrink: 0;
2013
+ text-transform: uppercase;
2014
+ letter-spacing: 0.03em;
2015
+ }
2016
+
2017
+ /* Scroll-to highlight animation */
2018
+ @keyframes scrollHighlight {
2019
+ 0% { background: rgba(155, 114, 239, 0.15); }
2020
+ 100% { background: transparent; }
2021
+ }
2022
+
2023
+ .msg-scroll-highlight {
2024
+ animation: scrollHighlight 1.5s ease-out;
2025
+ border-radius: var(--radius);
2026
+ }
2027
+
2028
+ /* ── Light theme: tree panel ─────── */
2029
+
2030
+ .theme-light .session-tree-flow {
2031
+ background: #F5F5F7 !important;
2032
+ }
2033
+
2034
+ .theme-light .tree-node-card {
2035
+ background: #FFFFFF;
2036
+ border-color: #E2E2E6;
2037
+ }
2038
+
2039
+ .theme-light .tree-node-card.current {
2040
+ border-color: #7C5CC5;
2041
+ box-shadow: 0 0 0 1px rgba(124, 92, 197, 0.25);
2042
+ }
2043
+
2044
+ .theme-light .session-tree-minimap {
2045
+ background: #FFFFFF !important;
2046
+ border-color: #E2E2E6 !important;
2047
+ }
2048
+
2049
+ /* ── Subagent count badge ────────── */
2050
+
2051
+ .subagent-count-badge {
2052
+ font-size: 10px;
2053
+ font-family: var(--mono);
2054
+ color: var(--accent);
2055
+ flex-shrink: 0;
2056
+ }
2057
+
2058
+ /* ── Subagent node clickable styling ── */
2059
+
2060
+ .tree-node-subagent {
2061
+ cursor: pointer;
2062
+ transition: border-color 0.15s, box-shadow 0.15s;
2063
+ }
2064
+
2065
+ .tree-node-subagent:hover {
2066
+ border-color: #9B72EF;
2067
+ box-shadow: 0 0 8px rgba(155, 114, 239, 0.35);
2068
+ }
2069
+
2070
+ /* ── LLM Ref Popover ────────────── */
2071
+
2072
+ .llm-ref-popover {
2073
+ position: absolute;
2074
+ top: 100%;
2075
+ right: 0;
2076
+ margin-top: 4px;
2077
+ z-index: 50;
2078
+ background: var(--surface);
2079
+ border: 1px solid var(--border);
2080
+ border-radius: var(--radius);
2081
+ padding: 10px 12px;
2082
+ min-width: 280px;
2083
+ max-width: 480px;
2084
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
2085
+ }
2086
+
2087
+ .llm-ref-path {
2088
+ font-family: var(--mono);
2089
+ font-size: 11px;
2090
+ color: var(--text-2);
2091
+ word-break: break-all;
2092
+ line-height: 1.5;
2093
+ margin-bottom: 8px;
2094
+ padding: 6px 8px;
2095
+ background: var(--raised);
2096
+ border-radius: 4px;
2097
+ border: 1px solid var(--border);
2098
+ }
2099
+
2100
+ .llm-ref-actions {
2101
+ display: flex;
2102
+ gap: 6px;
2103
+ }
2104
+
2105
+ .llm-ref-btn {
2106
+ flex: 1;
2107
+ padding: 5px 10px;
2108
+ font-family: var(--sans);
2109
+ font-size: 11px;
2110
+ background: var(--raised);
2111
+ border: 1px solid var(--border);
2112
+ border-radius: var(--radius);
2113
+ color: var(--text-2);
2114
+ cursor: pointer;
2115
+ transition: all 0.12s;
2116
+ }
2117
+
2118
+ .llm-ref-btn:hover {
2119
+ border-color: var(--accent);
2120
+ color: var(--text-1);
2121
+ }
2122
+
2123
+ /* ── Session Stats Bar ──────────── */
2124
+
2125
+ .stats-bar {
2126
+ border-bottom: 1px solid var(--border);
2127
+ background: var(--surface);
2128
+ flex-shrink: 0;
2129
+ }
2130
+
2131
+ .stats-summary {
2132
+ display: flex;
2133
+ align-items: center;
2134
+ gap: 16px;
2135
+ padding: 6px 24px;
2136
+ cursor: pointer;
2137
+ user-select: none;
2138
+ transition: background 0.12s;
2139
+ }
2140
+
2141
+ .stats-summary:hover {
2142
+ background: var(--raised);
2143
+ }
2144
+
2145
+ .stats-item {
2146
+ display: flex;
2147
+ align-items: center;
2148
+ gap: 4px;
2149
+ font-family: var(--mono);
2150
+ font-size: 10px;
2151
+ color: var(--text-3);
2152
+ white-space: nowrap;
2153
+ }
2154
+
2155
+ .stats-tools-inline {
2156
+ font-size: 10px;
2157
+ color: var(--text-3);
2158
+ opacity: 0.7;
2159
+ }
2160
+
2161
+ .stats-expand-hint {
2162
+ margin-left: auto;
2163
+ font-size: 10px;
2164
+ font-family: var(--mono);
2165
+ color: var(--text-3);
2166
+ opacity: 0.5;
2167
+ }
2168
+
2169
+ .stats-summary:hover .stats-expand-hint {
2170
+ opacity: 1;
2171
+ }
2172
+
2173
+ .stats-detail {
2174
+ padding: 4px 24px 8px;
2175
+ border-top: 1px solid var(--border);
2176
+ }
2177
+
2178
+ .stats-detail-row {
2179
+ display: flex;
2180
+ justify-content: space-between;
2181
+ padding: 2px 0;
2182
+ font-size: 11px;
2183
+ color: var(--text-2);
2184
+ }
2185
+
2186
+ .stats-detail-row.sub {
2187
+ padding-left: 16px;
2188
+ color: var(--text-3);
2189
+ font-size: 10px;
2190
+ }
2191
+
2192
+ .stats-detail-row span:last-child {
2193
+ font-family: var(--mono);
2194
+ color: var(--text-3);
2195
+ }
2196
+
2197
+ /* ── Error Badge ────────────────── */
2198
+
2199
+ .error-badge-btn {
2200
+ display: flex;
2201
+ align-items: center;
2202
+ gap: 5px;
2203
+ padding: 3px 10px;
2204
+ font-family: var(--mono);
2205
+ font-size: 10px;
2206
+ font-weight: 500;
2207
+ color: var(--red);
2208
+ background: rgba(239, 68, 68, 0.08);
2209
+ border: 1px solid rgba(239, 68, 68, 0.25);
2210
+ border-radius: var(--radius);
2211
+ cursor: pointer;
2212
+ transition: all 0.12s;
2213
+ flex-shrink: 0;
2214
+ }
2215
+
2216
+ .error-badge-btn:hover {
2217
+ background: rgba(239, 68, 68, 0.15);
2218
+ border-color: var(--red);
2219
+ }
2220
+
2221
+ /* ── Export Dropdown ─────────────── */
2222
+
2223
+ .export-dropdown {
2224
+ position: absolute;
2225
+ top: 100%;
2226
+ right: 0;
2227
+ margin-top: 4px;
2228
+ z-index: 50;
2229
+ background: var(--surface);
2230
+ border: 1px solid var(--border);
2231
+ border-radius: var(--radius);
2232
+ min-width: 180px;
2233
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
2234
+ overflow: hidden;
2235
+ }
2236
+
2237
+ .export-option {
2238
+ display: flex;
2239
+ align-items: center;
2240
+ gap: 8px;
2241
+ width: 100%;
2242
+ padding: 8px 12px;
2243
+ background: none;
2244
+ border: none;
2245
+ border-bottom: 1px solid var(--border);
2246
+ color: var(--text-2);
2247
+ font-family: var(--sans);
2248
+ font-size: 12px;
2249
+ cursor: pointer;
2250
+ text-align: left;
2251
+ transition: background 0.12s;
2252
+ }
2253
+
2254
+ .export-option:last-child {
2255
+ border-bottom: none;
2256
+ }
2257
+
2258
+ .export-option:hover {
2259
+ background: var(--raised);
2260
+ color: var(--text-1);
2261
+ }
2262
+
2263
+ /* ── Full-text search results ──── */
2264
+
2265
+ .ft-result {
2266
+ padding: 8px 16px;
2267
+ }
2268
+
2269
+ .ft-snippet {
2270
+ font-size: 11px;
2271
+ color: var(--text-3);
2272
+ line-height: 1.4;
2273
+ overflow: hidden;
2274
+ text-overflow: ellipsis;
2275
+ white-space: nowrap;
2276
+ margin-top: 2px;
2277
+ font-family: var(--mono);
2278
+ }
2279
+
2280
+ /* ── Light theme additions ──────── */
2281
+
2282
+ .theme-light .llm-ref-popover {
2283
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
2284
+ }
2285
+
2286
+ .theme-light .export-dropdown {
2287
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
2288
+ }
2289
+
2290
+ .theme-light .error-badge-btn {
2291
+ background: rgba(220, 38, 38, 0.06);
2292
+ border-color: rgba(220, 38, 38, 0.2);
2293
+ }
2294
+
2295
+ .theme-light .tree-node-subagent:hover {
2296
+ box-shadow: 0 0 8px rgba(124, 92, 197, 0.3);
2297
+ }
2298
+
2299
+ /* ── Tray Handle (right edge) ────── */
2300
+
2301
+ .tray-handle {
2302
+ position: fixed;
2303
+ right: 0;
2304
+ top: 50%;
2305
+ transform: translateY(-50%);
2306
+ z-index: 30;
2307
+ width: 16px;
2308
+ height: 48px;
2309
+ display: flex;
2310
+ align-items: center;
2311
+ justify-content: center;
2312
+ background: var(--surface);
2313
+ border: 1px solid var(--border);
2314
+ border-right: none;
2315
+ border-radius: 6px 0 0 6px;
2316
+ cursor: pointer;
2317
+ color: var(--text-3);
2318
+ transition: color 0.15s, background 0.15s, width 0.15s;
2319
+ }
2320
+
2321
+ .tray-handle:hover {
2322
+ color: var(--text-1);
2323
+ background: var(--raised);
2324
+ width: 20px;
2325
+ }
2326
+
2327
+ .tray-handle.open {
2328
+ color: var(--accent);
2329
+ }
2330
+
2331
+ /* ── Tree Panel Wrap + Resize ────── */
2332
+
2333
+ .tree-panel-wrap {
2334
+ position: relative;
2335
+ flex-shrink: 0;
2336
+ display: flex;
2337
+ animation: slideInRight 0.2s ease;
2338
+ }
2339
+
2340
+ .tree-resize-handle {
2341
+ position: absolute;
2342
+ top: 0;
2343
+ left: -2px;
2344
+ width: 4px;
2345
+ height: 100%;
2346
+ cursor: col-resize;
2347
+ z-index: 20;
2348
+ background: transparent;
2349
+ transition: background 0.15s;
2350
+ }
2351
+
2352
+ .tree-resize-handle:hover {
2353
+ background: var(--accent-border);
2354
+ }
2355
+
2356
+ /* ── Live pulsing dot ────────────── */
2357
+
2358
+ @keyframes pulse {
2359
+ 0%, 100% { opacity: 1; }
2360
+ 50% { opacity: 0.4; }
2361
+ }
2362
+
2363
+ .session-dot.live {
2364
+ background: var(--green);
2365
+ box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
2366
+ animation: pulse 2s ease-in-out infinite;
2367
+ }
2368
+
2369
+ /* ── Live badge (small, in sidebar) ── */
2370
+
2371
+ .live-badge-small {
2372
+ font-size: 9px;
2373
+ font-family: var(--mono);
2374
+ font-weight: 500;
2375
+ color: var(--green);
2376
+ background: rgba(16, 185, 129, 0.08);
2377
+ border: 1px solid rgba(16, 185, 129, 0.2);
2378
+ padding: 0 4px;
2379
+ border-radius: 3px;
2380
+ flex-shrink: 0;
2381
+ letter-spacing: 0.03em;
2382
+ }
2383
+
2384
+ /* ── Live badge (header) ─────────── */
2385
+
2386
+ .live-badge {
2387
+ display: flex;
2388
+ align-items: center;
2389
+ gap: 5px;
2390
+ font-size: 10px;
2391
+ font-family: var(--mono);
2392
+ font-weight: 500;
2393
+ color: var(--green);
2394
+ background: rgba(16, 185, 129, 0.08);
2395
+ border: 1px solid rgba(16, 185, 129, 0.2);
2396
+ padding: 2px 8px;
2397
+ border-radius: var(--radius);
2398
+ flex-shrink: 0;
2399
+ }
2400
+
2401
+ .live-badge-dot {
2402
+ width: 6px;
2403
+ height: 6px;
2404
+ border-radius: 50%;
2405
+ background: var(--green);
2406
+ animation: pulse 2s ease-in-out infinite;
2407
+ }
2408
+
2409
+ /* ── Context Menu ────────────────── */
2410
+
2411
+ .ctx-menu {
2412
+ position: fixed;
2413
+ z-index: 100;
2414
+ background: var(--surface);
2415
+ border: 1px solid var(--border);
2416
+ border-radius: var(--radius);
2417
+ min-width: 140px;
2418
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
2419
+ overflow: hidden;
2420
+ padding: 4px 0;
2421
+ }
2422
+
2423
+ .ctx-menu-item {
2424
+ display: block;
2425
+ width: 100%;
2426
+ padding: 6px 14px;
2427
+ background: none;
2428
+ border: none;
2429
+ color: var(--text-2);
2430
+ font-family: var(--sans);
2431
+ font-size: 12px;
2432
+ cursor: pointer;
2433
+ text-align: left;
2434
+ transition: background 0.1s;
2435
+ }
2436
+
2437
+ .ctx-menu-item:hover {
2438
+ background: var(--raised);
2439
+ color: var(--text-1);
2440
+ }
2441
+
2442
+ /* ── Sidebar Tabs ────────────────── */
2443
+
2444
+ .sidebar-tabs {
2445
+ display: grid;
2446
+ grid-template-columns: repeat(3, 1fr);
2447
+ gap: 2px;
2448
+ margin-top: 8px;
2449
+ }
2450
+
2451
+ .sidebar-tab {
2452
+ flex: 1;
2453
+ padding: 3px 4px;
2454
+ font-family: var(--sans);
2455
+ font-size: 10px;
2456
+ font-weight: 500;
2457
+ background: transparent;
2458
+ border: 1px solid var(--border);
2459
+ border-radius: var(--radius);
2460
+ color: var(--text-3);
2461
+ cursor: pointer;
2462
+ transition: all 0.12s;
2463
+ display: flex;
2464
+ align-items: center;
2465
+ justify-content: center;
2466
+ gap: 3px;
2467
+ white-space: nowrap;
2468
+ }
2469
+
2470
+ .sidebar-tab:hover {
2471
+ border-color: var(--accent-border);
2472
+ color: var(--text-2);
2473
+ }
2474
+
2475
+ .sidebar-tab.active {
2476
+ background: var(--accent-dim);
2477
+ border-color: var(--accent-border);
2478
+ color: var(--accent);
2479
+ }
2480
+
2481
+ .sidebar-tab-count {
2482
+ font-family: var(--mono);
2483
+ font-size: 9px;
2484
+ background: var(--accent-dim);
2485
+ border: 1px solid var(--accent-border);
2486
+ color: var(--accent);
2487
+ padding: 0 4px;
2488
+ border-radius: 3px;
2489
+ }
2490
+
2491
+ /* ── Archived session style ──────── */
2492
+
2493
+ .session-item.archived {
2494
+ opacity: 0.55;
2495
+ }
2496
+
2497
+ /* ── New provider source filter badges ── */
2498
+
2499
+ .source-filter-label[data-source="kimi"] {
2500
+ color: #06B6D4;
2501
+ background: rgba(6, 182, 212, 0.08);
2502
+ border-color: rgba(6, 182, 212, 0.18);
2503
+ }
2504
+ .source-filter-label[data-source="gemini"] {
2505
+ color: #22C55E;
2506
+ background: rgba(34, 197, 94, 0.08);
2507
+ border-color: rgba(34, 197, 94, 0.18);
2508
+ }
2509
+ .source-filter-label[data-source="copilot"] {
2510
+ color: #A1A1AA;
2511
+ background: rgba(161, 161, 170, 0.08);
2512
+ border-color: rgba(161, 161, 170, 0.18);
2513
+ }
2514
+ .source-filter-label[data-source="factory"] {
2515
+ color: #F97316;
2516
+ background: rgba(249, 115, 22, 0.08);
2517
+ border-color: rgba(249, 115, 22, 0.18);
2518
+ }
2519
+ .source-filter-label[data-source="opencode"] {
2520
+ color: #14B8A6;
2521
+ background: rgba(20, 184, 166, 0.08);
2522
+ border-color: rgba(20, 184, 166, 0.18);
2523
+ }
2524
+
2525
+ /* ── Light theme: new provider badges ── */
2526
+
2527
+ .theme-light .source-filter-label[data-source="kimi"] {
2528
+ background: rgba(6, 182, 212, 0.10);
2529
+ border-color: rgba(6, 182, 212, 0.25);
2530
+ }
2531
+ .theme-light .source-filter-label[data-source="gemini"] {
2532
+ background: rgba(34, 197, 94, 0.10);
2533
+ border-color: rgba(34, 197, 94, 0.25);
2534
+ }
2535
+ .theme-light .source-filter-label[data-source="copilot"] {
2536
+ background: rgba(82, 82, 91, 0.10);
2537
+ border-color: rgba(82, 82, 91, 0.25);
2538
+ }
2539
+ .theme-light .source-filter-label[data-source="factory"] {
2540
+ background: rgba(249, 115, 22, 0.10);
2541
+ border-color: rgba(249, 115, 22, 0.25);
2542
+ }
2543
+ .theme-light .source-filter-label[data-source="opencode"] {
2544
+ background: rgba(20, 184, 166, 0.10);
2545
+ border-color: rgba(20, 184, 166, 0.25);
2546
+ }
2547
+
2548
+ /* ── Light theme: context menu ───── */
2549
+
2550
+ .theme-light .ctx-menu {
2551
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
2552
+ }
2553
+
2554
+ /* ── New provider source filter badges ── */
2555
+
2556
+ .source-filter-label[data-source="aider"] {
2557
+ color: #EC4899;
2558
+ background: rgba(236, 72, 153, 0.08);
2559
+ border-color: rgba(236, 72, 153, 0.18);
2560
+ }
2561
+ .source-filter-label[data-source="continue"] {
2562
+ color: #8B5CF6;
2563
+ background: rgba(139, 92, 246, 0.08);
2564
+ border-color: rgba(139, 92, 246, 0.18);
2565
+ }
2566
+ .source-filter-label[data-source="cursor"] {
2567
+ color: #6366F1;
2568
+ background: rgba(99, 102, 241, 0.08);
2569
+ border-color: rgba(99, 102, 241, 0.18);
2570
+ }
2571
+
2572
+ .theme-light .source-filter-label[data-source="aider"] {
2573
+ background: rgba(236, 72, 153, 0.10);
2574
+ border-color: rgba(236, 72, 153, 0.25);
2575
+ }
2576
+ .theme-light .source-filter-label[data-source="continue"] {
2577
+ background: rgba(139, 92, 246, 0.10);
2578
+ border-color: rgba(139, 92, 246, 0.25);
2579
+ }
2580
+ .theme-light .source-filter-label[data-source="cursor"] {
2581
+ background: rgba(99, 102, 241, 0.10);
2582
+ border-color: rgba(99, 102, 241, 0.25);
2583
+ }
2584
+
2585
+ /* ── Tree Panel Header Actions ───── */
2586
+
2587
+ .tree-panel-actions {
2588
+ display: flex;
2589
+ align-items: center;
2590
+ gap: 6px;
2591
+ }
2592
+
2593
+ .tree-panel-reset {
2594
+ display: flex;
2595
+ align-items: center;
2596
+ justify-content: center;
2597
+ width: 24px;
2598
+ height: 24px;
2599
+ background: none;
2600
+ border: 1px solid var(--border);
2601
+ border-radius: var(--radius);
2602
+ color: var(--text-3);
2603
+ cursor: pointer;
2604
+ transition: all 0.12s;
2605
+ }
2606
+
2607
+ .tree-panel-reset:hover {
2608
+ color: var(--text-1);
2609
+ border-color: var(--accent-border);
2610
+ }
2611
+
2612
+ /* ── Image Thumbnails & Lightbox ─── */
2613
+
2614
+ .msg-image-thumb {
2615
+ max-width: 400px;
2616
+ max-height: 280px;
2617
+ border-radius: var(--radius);
2618
+ border: 1px solid var(--border);
2619
+ cursor: pointer;
2620
+ transition: border-color 0.15s, box-shadow 0.15s;
2621
+ display: block;
2622
+ margin: 8px 0;
2623
+ object-fit: contain;
2624
+ }
2625
+
2626
+ .msg-image-thumb:hover {
2627
+ border-color: var(--accent);
2628
+ box-shadow: 0 0 12px rgba(155, 114, 239, 0.2);
2629
+ }
2630
+
2631
+ .msg-image-row {
2632
+ display: flex;
2633
+ flex-wrap: wrap;
2634
+ gap: 8px;
2635
+ margin-top: 4px;
2636
+ }
2637
+
2638
+ .msg-lightbox {
2639
+ position: fixed;
2640
+ inset: 0;
2641
+ z-index: 200;
2642
+ background: rgba(0, 0, 0, 0.85);
2643
+ display: flex;
2644
+ align-items: center;
2645
+ justify-content: center;
2646
+ cursor: pointer;
2647
+ animation: fadeIn 0.15s ease;
2648
+ }
2649
+
2650
+ @keyframes fadeIn {
2651
+ from { opacity: 0; }
2652
+ to { opacity: 1; }
2653
+ }
2654
+
2655
+ .msg-lightbox-img {
2656
+ max-width: 90vw;
2657
+ max-height: 90vh;
2658
+ border-radius: var(--radius);
2659
+ cursor: default;
2660
+ box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
2661
+ }
2662
+
2663
+ .msg-lightbox-close {
2664
+ position: absolute;
2665
+ top: 20px;
2666
+ right: 20px;
2667
+ display: flex;
2668
+ align-items: center;
2669
+ justify-content: center;
2670
+ width: 36px;
2671
+ height: 36px;
2672
+ background: rgba(0, 0, 0, 0.6);
2673
+ border: 1px solid rgba(255, 255, 255, 0.15);
2674
+ border-radius: var(--radius);
2675
+ color: #fff;
2676
+ cursor: pointer;
2677
+ transition: background 0.12s;
2678
+ }
2679
+
2680
+ .msg-lightbox-close:hover {
2681
+ background: rgba(0, 0, 0, 0.8);
2682
+ }
2683
+
2684
+ /* ── Analytics Dashboard ─────────── */
2685
+
2686
+ .analytics-dashboard {
2687
+ flex: 1;
2688
+ display: flex;
2689
+ flex-direction: column;
2690
+ background: var(--bg);
2691
+ min-width: 0;
2692
+ overflow-y: auto;
2693
+ }
2694
+
2695
+ .analytics-header {
2696
+ display: flex;
2697
+ align-items: center;
2698
+ gap: 12px;
2699
+ padding: 16px 24px;
2700
+ background: var(--surface);
2701
+ border-bottom: 1px solid var(--border);
2702
+ flex-shrink: 0;
2703
+ }
2704
+
2705
+ .analytics-title {
2706
+ font-size: 15px;
2707
+ font-weight: 500;
2708
+ color: var(--text-1);
2709
+ }
2710
+
2711
+ .analytics-total {
2712
+ font-family: var(--mono);
2713
+ font-size: 11px;
2714
+ color: var(--text-3);
2715
+ }
2716
+
2717
+ .analytics-body {
2718
+ max-width: 800px;
2719
+ margin: 0 auto;
2720
+ padding: 24px;
2721
+ display: flex;
2722
+ flex-direction: column;
2723
+ gap: 32px;
2724
+ width: 100%;
2725
+ }
2726
+
2727
+ .analytics-section {
2728
+ background: var(--surface);
2729
+ border: 1px solid var(--border);
2730
+ border-radius: var(--radius);
2731
+ padding: 16px 20px;
2732
+ }
2733
+
2734
+ .analytics-section-title {
2735
+ font-size: 12px;
2736
+ font-weight: 500;
2737
+ color: var(--text-2);
2738
+ margin-bottom: 10px;
2739
+ letter-spacing: 0.02em;
2740
+ }
2741
+
2742
+ .analytics-legend {
2743
+ display: flex;
2744
+ flex-wrap: wrap;
2745
+ gap: 10px 16px;
2746
+ margin-bottom: 14px;
2747
+ }
2748
+
2749
+ .analytics-legend-item {
2750
+ display: flex;
2751
+ align-items: center;
2752
+ gap: 5px;
2753
+ font-size: 11px;
2754
+ color: var(--text-2);
2755
+ }
2756
+
2757
+ .analytics-legend-dot {
2758
+ width: 8px;
2759
+ height: 8px;
2760
+ border-radius: 2px;
2761
+ flex-shrink: 0;
2762
+ }
2763
+
2764
+ .analytics-empty {
2765
+ font-size: 12px;
2766
+ color: var(--text-3);
2767
+ padding: 20px;
2768
+ text-align: center;
2769
+ }
2770
+
2771
+ /* Chart container */
2772
+ .analytics-chart-wrap {
2773
+ overflow-x: auto;
2774
+ }
2775
+
2776
+ .analytics-svg {
2777
+ display: block;
2778
+ }
2779
+
2780
+ .analytics-bar-label {
2781
+ fill: var(--text-2);
2782
+ font-family: var(--mono);
2783
+ font-size: 9px;
2784
+ }
2785
+
2786
+ .analytics-axis-label {
2787
+ fill: var(--text-3);
2788
+ font-family: var(--mono);
2789
+ font-size: 9px;
2790
+ }
2791
+
2792
+ /* Provider horizontal bars */
2793
+ .analytics-hbar-list {
2794
+ display: flex;
2795
+ flex-direction: column;
2796
+ gap: 8px;
2797
+ }
2798
+
2799
+ .analytics-hbar-row {
2800
+ display: flex;
2801
+ align-items: center;
2802
+ gap: 10px;
2803
+ }
2804
+
2805
+ .analytics-hbar-label {
2806
+ font-size: 11px;
2807
+ font-weight: 500;
2808
+ min-width: 70px;
2809
+ text-align: right;
2810
+ }
2811
+
2812
+ .analytics-hbar-track {
2813
+ flex: 1;
2814
+ height: 16px;
2815
+ background: var(--raised);
2816
+ border-radius: 4px;
2817
+ overflow: hidden;
2818
+ }
2819
+
2820
+ .analytics-hbar-fill {
2821
+ height: 100%;
2822
+ border-radius: 4px;
2823
+ opacity: 0.85;
2824
+ transition: width 0.3s ease;
2825
+ }
2826
+
2827
+ .analytics-hbar-value {
2828
+ font-family: var(--mono);
2829
+ font-size: 10px;
2830
+ color: var(--text-3);
2831
+ min-width: 70px;
2832
+ white-space: nowrap;
2833
+ }
2834
+
2835
+ /* Top tools list */
2836
+ .analytics-tools-list {
2837
+ display: flex;
2838
+ flex-direction: column;
2839
+ gap: 6px;
2840
+ }
2841
+
2842
+ .analytics-tool-row {
2843
+ display: flex;
2844
+ align-items: center;
2845
+ gap: 8px;
2846
+ }
2847
+
2848
+ .analytics-tool-rank {
2849
+ font-family: var(--mono);
2850
+ font-size: 10px;
2851
+ color: var(--text-3);
2852
+ min-width: 20px;
2853
+ text-align: right;
2854
+ }
2855
+
2856
+ .analytics-tool-name {
2857
+ font-family: var(--mono);
2858
+ font-size: 11px;
2859
+ color: var(--text-1);
2860
+ min-width: 100px;
2861
+ }
2862
+
2863
+ .analytics-tool-bar-track {
2864
+ flex: 1;
2865
+ height: 12px;
2866
+ background: var(--raised);
2867
+ border-radius: 3px;
2868
+ overflow: hidden;
2869
+ }
2870
+
2871
+ .analytics-tool-bar-fill {
2872
+ height: 100%;
2873
+ background: var(--accent);
2874
+ border-radius: 3px;
2875
+ opacity: 0.7;
2876
+ }
2877
+
2878
+ .analytics-tool-count {
2879
+ font-family: var(--mono);
2880
+ font-size: 10px;
2881
+ color: var(--text-3);
2882
+ min-width: 40px;
2883
+ text-align: right;
2884
+ }
2885
+
2886
+ /* Token totals grid */
2887
+ .analytics-token-grid {
2888
+ display: grid;
2889
+ grid-template-columns: repeat(4, 1fr);
2890
+ gap: 12px;
2891
+ }
2892
+
2893
+ .analytics-token-card {
2894
+ background: var(--raised);
2895
+ border: 1px solid var(--border);
2896
+ border-radius: var(--radius);
2897
+ padding: 12px;
2898
+ text-align: center;
2899
+ }
2900
+
2901
+ .analytics-token-value {
2902
+ font-family: var(--mono);
2903
+ font-size: 16px;
2904
+ font-weight: 500;
2905
+ color: var(--accent);
2906
+ margin-bottom: 4px;
2907
+ }
2908
+
2909
+ .analytics-token-label {
2910
+ font-size: 10px;
2911
+ color: var(--text-3);
2912
+ }
2913
+
2914
+ /* ── Light theme: analytics ──────── */
2915
+
2916
+ .theme-light .analytics-token-card {
2917
+ background: #F0F0F3;
2918
+ }
2919
+
2920
+ .theme-light .analytics-hbar-track,
2921
+ .theme-light .analytics-tool-bar-track {
2922
+ background: #EDEDF0;
2923
+ }
2924
+
2925
+ /* ── Setup / First-run View ──────── */
2926
+
2927
+ .setup-view {
2928
+ display: flex;
2929
+ flex-direction: column;
2930
+ align-items: center;
2931
+ height: 100vh;
2932
+ background: var(--bg);
2933
+ overflow: hidden;
2934
+ padding: 40px 24px 0;
2935
+ }
2936
+
2937
+ .setup-header {
2938
+ display: flex;
2939
+ flex-direction: column;
2940
+ align-items: center;
2941
+ gap: 10px;
2942
+ margin-bottom: 24px;
2943
+ text-align: center;
2944
+ flex-shrink: 0;
2945
+ }
2946
+
2947
+ .setup-logo {
2948
+ opacity: 0.95;
2949
+ filter: drop-shadow(0 0 28px rgba(155, 114, 239, 0.45)) drop-shadow(0 0 8px rgba(155, 114, 239, 0.2));
2950
+ animation: setup-logo-float 4s ease-in-out infinite;
2951
+ }
2952
+
2953
+ @keyframes setup-logo-float {
2954
+ 0%, 100% { transform: translateY(0px); }
2955
+ 50% { transform: translateY(-6px); }
2956
+ }
2957
+
2958
+ .setup-title {
2959
+ font-size: 28px;
2960
+ font-weight: 700;
2961
+ color: var(--text-1);
2962
+ letter-spacing: -0.5px;
2963
+ margin: 0;
2964
+ }
2965
+
2966
+ .setup-subtitle {
2967
+ font-size: 14px;
2968
+ color: var(--text-2);
2969
+ margin: 0;
2970
+ }
2971
+
2972
+ .setup-scan-bar {
2973
+ width: 280px;
2974
+ height: 2px;
2975
+ background: var(--border);
2976
+ border-radius: 2px;
2977
+ overflow: hidden;
2978
+ margin-top: 4px;
2979
+ }
2980
+
2981
+ .setup-scan-fill {
2982
+ height: 100%;
2983
+ width: 40%;
2984
+ background: #9B72EF;
2985
+ border-radius: 2px;
2986
+ animation: setup-scan-slide 1.4s ease-in-out infinite;
2987
+ }
2988
+
2989
+ @keyframes setup-scan-slide {
2990
+ 0% { transform: translateX(-100%); }
2991
+ 100% { transform: translateX(350%); }
2992
+ }
2993
+
2994
+ .setup-agent-list {
2995
+ width: 100%;
2996
+ max-width: 720px;
2997
+ flex: 1;
2998
+ overflow-y: auto;
2999
+ display: flex;
3000
+ flex-direction: column;
3001
+ gap: 2px;
3002
+ padding-bottom: 8px;
3003
+ }
3004
+
3005
+ .setup-agent-row {
3006
+ display: grid;
3007
+ grid-template-columns: 10px 160px 1fr;
3008
+ align-items: start;
3009
+ gap: 16px;
3010
+ padding: 14px 16px;
3011
+ background: var(--surface);
3012
+ border: 1px solid var(--border);
3013
+ border-radius: 8px;
3014
+ transition: border-color 0.15s;
3015
+ }
3016
+
3017
+ .setup-agent-row.has-sessions {
3018
+ border-color: rgba(155,114,239,0.25);
3019
+ }
3020
+
3021
+ .setup-agent-dot {
3022
+ width: 8px;
3023
+ height: 8px;
3024
+ border-radius: 50%;
3025
+ margin-top: 4px;
3026
+ flex-shrink: 0;
3027
+ }
3028
+
3029
+ .setup-agent-info {
3030
+ display: flex;
3031
+ flex-direction: column;
3032
+ gap: 3px;
3033
+ min-width: 0;
3034
+ }
3035
+
3036
+ .setup-agent-name {
3037
+ font-size: 13px;
3038
+ font-weight: 600;
3039
+ color: var(--text-1);
3040
+ }
3041
+
3042
+ .setup-agent-count {
3043
+ font-size: 11px;
3044
+ font-family: var(--mono);
3045
+ }
3046
+
3047
+ .setup-agent-count.found { color: #22C55E; }
3048
+ .setup-agent-count.empty { color: var(--text-3); }
3049
+
3050
+ .setup-agent-paths {
3051
+ display: flex;
3052
+ flex-direction: column;
3053
+ gap: 6px;
3054
+ min-width: 0;
3055
+ }
3056
+
3057
+ .setup-path-row {
3058
+ display: flex;
3059
+ align-items: center;
3060
+ gap: 8px;
3061
+ min-width: 0;
3062
+ }
3063
+
3064
+ .setup-path-label {
3065
+ font-size: 10px;
3066
+ font-weight: 500;
3067
+ color: var(--text-3);
3068
+ text-transform: uppercase;
3069
+ letter-spacing: 0.06em;
3070
+ width: 52px;
3071
+ flex-shrink: 0;
3072
+ }
3073
+
3074
+ .setup-path-auto {
3075
+ display: flex;
3076
+ align-items: center;
3077
+ gap: 8px;
3078
+ min-width: 0;
3079
+ flex: 1;
3080
+ }
3081
+
3082
+ .setup-path-found {
3083
+ font-size: 11px;
3084
+ font-family: var(--mono);
3085
+ color: var(--text-2);
3086
+ overflow: hidden;
3087
+ text-overflow: ellipsis;
3088
+ white-space: nowrap;
3089
+ flex: 1;
3090
+ min-width: 0;
3091
+ }
3092
+
3093
+ .setup-path-missing {
3094
+ font-size: 11px;
3095
+ font-family: var(--mono);
3096
+ color: var(--text-3);
3097
+ opacity: 0.6;
3098
+ flex: 1;
3099
+ }
3100
+
3101
+ .setup-path-custom-btn {
3102
+ font-size: 10px;
3103
+ font-weight: 500;
3104
+ color: var(--text-3);
3105
+ background: var(--raised);
3106
+ border: 1px solid var(--border);
3107
+ border-radius: 4px;
3108
+ padding: 2px 8px;
3109
+ cursor: pointer;
3110
+ flex-shrink: 0;
3111
+ white-space: nowrap;
3112
+ transition: color 0.15s, border-color 0.15s;
3113
+ }
3114
+
3115
+ .setup-path-custom-btn:hover {
3116
+ color: var(--text-1);
3117
+ border-color: #9B72EF;
3118
+ }
3119
+
3120
+ .setup-path-input-wrap {
3121
+ display: flex;
3122
+ align-items: center;
3123
+ gap: 4px;
3124
+ flex: 1;
3125
+ min-width: 0;
3126
+ }
3127
+
3128
+ .setup-path-input {
3129
+ flex: 1;
3130
+ min-width: 0;
3131
+ font-size: 11px;
3132
+ font-family: var(--mono);
3133
+ background: var(--bg);
3134
+ border: 1px solid var(--border);
3135
+ border-radius: 4px;
3136
+ padding: 3px 8px;
3137
+ color: var(--text-1);
3138
+ outline: none;
3139
+ }
3140
+
3141
+ .setup-path-input:focus {
3142
+ border-color: #9B72EF;
3143
+ }
3144
+
3145
+ .setup-path-clear {
3146
+ font-size: 13px;
3147
+ color: var(--text-3);
3148
+ background: none;
3149
+ border: none;
3150
+ cursor: pointer;
3151
+ padding: 0 2px;
3152
+ line-height: 1;
3153
+ flex-shrink: 0;
3154
+ }
3155
+
3156
+ .setup-path-clear:hover { color: var(--text-1); }
3157
+
3158
+ .setup-footer {
3159
+ display: flex;
3160
+ align-items: center;
3161
+ justify-content: center;
3162
+ gap: 16px;
3163
+ padding: 20px 24px 28px;
3164
+ flex-shrink: 0;
3165
+ width: 100%;
3166
+ }
3167
+
3168
+ .setup-start-btn {
3169
+ display: inline-flex;
3170
+ align-items: center;
3171
+ padding: 10px 24px;
3172
+ background: #9B72EF;
3173
+ color: #fff;
3174
+ font-size: 14px;
3175
+ font-weight: 600;
3176
+ border: none;
3177
+ border-radius: 8px;
3178
+ cursor: pointer;
3179
+ transition: opacity 0.15s;
3180
+ }
3181
+
3182
+ .setup-start-btn:hover { opacity: 0.88; }
3183
+ .setup-start-btn:disabled { opacity: 0.5; cursor: default; }
3184
+
3185
+ .setup-skip-btn {
3186
+ font-size: 13px;
3187
+ color: var(--text-3);
3188
+ background: none;
3189
+ border: none;
3190
+ cursor: pointer;
3191
+ padding: 0;
3192
+ }
3193
+
3194
+ .setup-skip-btn:hover { color: var(--text-1); }
3195
+
3196
+ /* ── Star button ────────────────── */
3197
+ .star-btn {
3198
+ background: none;
3199
+ border: none;
3200
+ padding: 0 2px;
3201
+ cursor: pointer;
3202
+ color: var(--text-3);
3203
+ opacity: 0;
3204
+ flex-shrink: 0;
3205
+ display: flex;
3206
+ align-items: center;
3207
+ transition: opacity 0.1s, color 0.1s;
3208
+ }
3209
+ .session-item:hover .star-btn,
3210
+ .star-btn.starred { opacity: 1; }
3211
+ .star-btn.starred { color: #F59E0B; }
3212
+ .star-btn:hover { color: #F59E0B; }
3213
+
3214
+ /* ── Pin button & pinned strip ───── */
3215
+ .msg-wrap {
3216
+ position: relative;
3217
+ }
3218
+ .msg-wrap:hover .pin-btn,
3219
+ .pin-btn.active { opacity: 1; }
3220
+
3221
+ .pin-btn {
3222
+ position: absolute;
3223
+ top: 6px;
3224
+ right: 6px;
3225
+ background: var(--raised);
3226
+ border: 1px solid var(--border);
3227
+ border-radius: 5px;
3228
+ padding: 3px 5px;
3229
+ cursor: pointer;
3230
+ color: var(--text-3);
3231
+ opacity: 0;
3232
+ z-index: 2;
3233
+ transition: opacity 0.12s, color 0.12s;
3234
+ display: flex;
3235
+ align-items: center;
3236
+ }
3237
+ .pin-btn.active { color: #9B72EF; border-color: #9B72EF; background: rgba(155,114,239,0.08); }
3238
+ .pin-btn:hover { color: #9B72EF; }
3239
+
3240
+ .msg-pinned { background: rgba(155,114,239,0.04); border-radius: 6px; }
3241
+
3242
+ .pinned-strip {
3243
+ background: var(--surface);
3244
+ border-bottom: 1px solid var(--border);
3245
+ flex-shrink: 0;
3246
+ }
3247
+ .pinned-strip-header {
3248
+ display: flex;
3249
+ align-items: center;
3250
+ padding: 6px 16px;
3251
+ font-size: 11px;
3252
+ font-weight: 600;
3253
+ color: var(--text-2);
3254
+ cursor: pointer;
3255
+ user-select: none;
3256
+ gap: 2px;
3257
+ }
3258
+ .pinned-strip-chevron { margin-left: auto; font-size: 9px; color: var(--text-3); }
3259
+ .pinned-strip-items { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 4px; }
3260
+ .pinned-strip-item {
3261
+ display: flex;
3262
+ align-items: center;
3263
+ gap: 8px;
3264
+ padding: 5px 10px;
3265
+ background: var(--raised);
3266
+ border: 1px solid var(--border);
3267
+ border-radius: 6px;
3268
+ cursor: pointer;
3269
+ font-size: 12px;
3270
+ color: var(--text-2);
3271
+ transition: border-color 0.12s;
3272
+ }
3273
+ .pinned-strip-item:hover { border-color: #9B72EF; color: var(--text-1); }
3274
+ .pinned-preview { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3275
+ .pinned-unpin {
3276
+ background: none; border: none; cursor: pointer;
3277
+ color: var(--text-3); font-size: 15px; padding: 0 2px; line-height: 1;
3278
+ flex-shrink: 0;
3279
+ }
3280
+ .pinned-unpin:hover { color: var(--text-1); }
3281
+
3282
+ /* ── Analytics dashboard ─────────────────────────────── */
3283
+ .analytics-dash {
3284
+ padding: 20px 24px;
3285
+ display: flex;
3286
+ flex-direction: column;
3287
+ gap: 20px;
3288
+ max-width: 900px;
3289
+ }
3290
+ .analytics-loading { padding: 40px 24px; color: var(--text-3); font-size: 13px; }
3291
+
3292
+ /* Controls */
3293
+ .analytics-controls {
3294
+ display: flex;
3295
+ align-items: center;
3296
+ gap: 10px;
3297
+ flex-wrap: wrap;
3298
+ }
3299
+ .analytics-filter-group {
3300
+ display: flex;
3301
+ gap: 4px;
3302
+ }
3303
+ .analytics-pill {
3304
+ background: var(--raised);
3305
+ border: 1px solid var(--border);
3306
+ border-radius: 6px;
3307
+ padding: 4px 10px;
3308
+ font-size: 12px;
3309
+ color: var(--text-2);
3310
+ cursor: pointer;
3311
+ transition: background 0.12s, color 0.12s, border-color 0.12s;
3312
+ }
3313
+ .analytics-pill:hover { color: var(--text-1); border-color: var(--text-3); }
3314
+ .analytics-pill.active { background: rgba(155,114,239,0.15); border-color: #9B72EF; color: #9B72EF; }
3315
+ .analytics-filter-group.small .analytics-pill { font-size: 11px; padding: 3px 8px; }
3316
+ .analytics-agent-select {
3317
+ background: var(--raised);
3318
+ border: 1px solid var(--border);
3319
+ border-radius: 6px;
3320
+ padding: 4px 10px;
3321
+ font-size: 12px;
3322
+ color: var(--text-2);
3323
+ cursor: pointer;
3324
+ margin-left: auto;
3325
+ }
3326
+
3327
+ /* Stat cards */
3328
+ .stat-cards-row {
3329
+ display: grid;
3330
+ grid-template-columns: repeat(4, 1fr);
3331
+ gap: 12px;
3332
+ }
3333
+ @media (max-width: 700px) {
3334
+ .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
3335
+ }
3336
+ .stat-card {
3337
+ background: var(--surface);
3338
+ border: 1px solid var(--border);
3339
+ border-radius: 10px;
3340
+ padding: 14px 16px;
3341
+ }
3342
+ .stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
3343
+ .stat-value { font-size: 24px; font-weight: 700; color: var(--text-1); line-height: 1.1; }
3344
+ .stat-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
3345
+
3346
+ /* Section */
3347
+ .analytics-section {
3348
+ background: var(--surface);
3349
+ border: 1px solid var(--border);
3350
+ border-radius: 10px;
3351
+ padding: 16px 18px;
3352
+ display: flex;
3353
+ flex-direction: column;
3354
+ gap: 12px;
3355
+ }
3356
+ .analytics-section-header {
3357
+ display: flex;
3358
+ align-items: center;
3359
+ gap: 8px;
3360
+ flex-wrap: wrap;
3361
+ }
3362
+ .analytics-section-title { font-size: 12px; font-weight: 600; color: var(--text-1); }
3363
+ .analytics-section-hint { font-size: 11px; color: var(--text-3); margin-left: auto; }
3364
+
3365
+ /* Provider legend */
3366
+ .provider-legend {
3367
+ display: flex;
3368
+ gap: 12px;
3369
+ flex-wrap: wrap;
3370
+ }
3371
+ .legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2); }
3372
+ .legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
3373
+
3374
+ /* Chart */
3375
+ .chart-area { width: 100%; overflow: hidden; }
3376
+ .chart-x-labels {
3377
+ display: flex;
3378
+ justify-content: space-between;
3379
+ padding: 0 2px;
3380
+ }
3381
+ .chart-x-label { font-size: 10px; color: var(--text-3); }
3382
+
3383
+ /* Two-col layout */
3384
+ .analytics-two-col {
3385
+ display: grid;
3386
+ grid-template-columns: 1fr 1fr;
3387
+ gap: 16px;
3388
+ }
3389
+ @media (max-width: 700px) {
3390
+ .analytics-two-col { grid-template-columns: 1fr; }
3391
+ }
3392
+
3393
+ /* Agent breakdown */
3394
+ .agent-breakdown { display: flex; flex-direction: column; gap: 8px; }
3395
+ .agent-breakdown-row { display: flex; align-items: center; gap: 8px; }
3396
+ .agent-breakdown-name { font-size: 12px; width: 60px; font-weight: 500; flex-shrink: 0; }
3397
+ .agent-breakdown-bar-wrap { flex: 1; height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
3398
+ .agent-breakdown-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
3399
+ .agent-breakdown-val { font-size: 12px; color: var(--text-1); width: 40px; text-align: right; }
3400
+ .agent-breakdown-pct { font-size: 11px; color: var(--text-3); width: 32px; text-align: right; }
3401
+
3402
+ /* Heatmap */
3403
+ .heatmap-wrap { display: flex; flex-direction: column; gap: 2px; }
3404
+ .heatmap-hours-row { display: flex; gap: 2px; }
3405
+ .heatmap-day-label { width: 28px; flex-shrink: 0; font-size: 10px; color: var(--text-3); display: flex; align-items: center; }
3406
+ .heatmap-hour-label { flex: 1; font-size: 9px; color: var(--text-3); text-align: center; }
3407
+ .heatmap-row { display: flex; gap: 2px; align-items: center; }
3408
+ .heatmap-cell {
3409
+ flex: 1;
3410
+ height: 14px;
3411
+ border-radius: 2px;
3412
+ transition: opacity 0.1s;
3413
+ cursor: default;
3414
+ }
3415
+ .heatmap-cell:hover { opacity: 0.8; }
3416
+
3417
+ /* Tool bars */
3418
+ .tool-bars { display: flex; flex-direction: column; gap: 7px; }
3419
+ .tool-bar-row { display: flex; align-items: center; gap: 8px; }
3420
+ .tool-rank { font-size: 10px; color: var(--text-3); width: 16px; text-align: right; }
3421
+ .tool-name { font-size: 12px; color: var(--text-2); width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
3422
+ .tool-bar-wrap { flex: 1; height: 5px; background: var(--raised); border-radius: 3px; overflow: hidden; }
3423
+ .tool-bar { height: 100%; background: #3B82F6; border-radius: 3px; }
3424
+ .tool-count { font-size: 12px; color: var(--text-1); width: 40px; text-align: right; }
3425
+
3426
+ /* Token grid */
3427
+ .token-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
3428
+ .token-cell { display: flex; flex-direction: column; gap: 2px; }
3429
+ .token-label { font-size: 11px; color: var(--text-3); }
3430
+ .token-value { font-size: 18px; font-weight: 600; color: var(--text-1); }
3431
+
3432
+ /* Dist bars */
3433
+ .dist-bars { display: flex; flex-direction: column; gap: 7px; }
3434
+ .dist-row { display: flex; align-items: center; gap: 8px; }
3435
+ .dist-label { font-size: 12px; color: var(--text-2); width: 50px; }
3436
+ .dist-bar-wrap { flex: 1; height: 5px; background: var(--raised); border-radius: 3px; overflow: hidden; }
3437
+ .dist-bar { height: 100%; background: #9B72EF; border-radius: 3px; }
3438
+ .dist-count { font-size: 12px; color: var(--text-1); width: 36px; text-align: right; }
3439
+
3440
+ /* ── Block pill separator ────────── */
3441
+ .block-pill-sep {
3442
+ width: 1px;
3443
+ height: 16px;
3444
+ background: var(--border);
3445
+ align-self: center;
3446
+ flex-shrink: 0;
3447
+ margin: 0 3px;
3448
+ }
3449
+
3450
+ /* ── Export button + dropdown ──────── */
3451
+ .export-btn-wrap {
3452
+ position: relative;
3453
+ display: flex;
3454
+ align-items: center;
3455
+ }
3456
+ .export-dropdown {
3457
+ position: absolute;
3458
+ top: calc(100% + 6px);
3459
+ right: 0;
3460
+ background: var(--surface);
3461
+ border: 1px solid var(--border);
3462
+ border-radius: 8px;
3463
+ padding: 6px;
3464
+ z-index: 50;
3465
+ min-width: 188px;
3466
+ box-shadow: 0 8px 24px rgba(0,0,0,0.4);
3467
+ display: flex;
3468
+ flex-direction: column;
3469
+ gap: 2px;
3470
+ }
3471
+ .export-option {
3472
+ display: flex;
3473
+ align-items: center;
3474
+ gap: 8px;
3475
+ padding: 7px 10px;
3476
+ background: none;
3477
+ border: none;
3478
+ border-radius: 6px;
3479
+ cursor: pointer;
3480
+ font-size: 12px;
3481
+ color: var(--text-1);
3482
+ text-align: left;
3483
+ transition: background 0.1s;
3484
+ }
3485
+ .export-option:hover { background: var(--raised); }
3486
+ .export-note {
3487
+ font-size: 10px;
3488
+ color: var(--text-3);
3489
+ padding: 3px 10px 2px;
3490
+ border-top: 1px solid var(--border);
3491
+ margin-top: 2px;
3492
+ }
3493
+
3494
+ /* ── panel-icon-btn (generic icon button in panel header) ─ */
3495
+ .panel-icon-btn {
3496
+ display: flex;
3497
+ align-items: center;
3498
+ justify-content: center;
3499
+ width: 28px;
3500
+ height: 26px;
3501
+ background: transparent;
3502
+ border: 1px solid var(--border);
3503
+ border-radius: var(--radius);
3504
+ color: var(--text-3);
3505
+ cursor: pointer;
3506
+ transition: all 0.12s;
3507
+ flex-shrink: 0;
3508
+ }
3509
+ .panel-icon-btn:hover {
3510
+ border-color: var(--accent-border);
3511
+ color: var(--text-2);
3512
+ background: var(--raised);
3513
+ }
3514
+ .panel-icon-btn.active {
3515
+ background: var(--accent-dim);
3516
+ border-color: var(--accent-border);
3517
+ color: var(--accent);
3518
+ }