@agent-link/server 0.1.84 → 0.1.86

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.
package/web/style.css CHANGED
@@ -1,2233 +1,2233 @@
1
- *,
2
- *::before,
3
- *::after {
4
- box-sizing: border-box;
5
- margin: 0;
6
- padding: 0;
7
- }
8
-
9
- /* Keyboard focus outlines (visible only for keyboard navigation) */
10
- :focus-visible {
11
- outline: 2px solid var(--accent);
12
- outline-offset: 2px;
13
- }
14
-
15
- :focus:not(:focus-visible) {
16
- outline: none;
17
- }
18
-
19
- :root {
20
- --bg-primary: #0f172a;
21
- --bg-secondary: #1e293b;
22
- --bg-tertiary: #334155;
23
- --text-primary: #f1f5f9;
24
- --text-secondary: #94a3b8;
25
- --accent: #2563eb;
26
- --accent-hover: #1d4ed8;
27
- --success: #22c55e;
28
- --warning: #f59e0b;
29
- --error: #ef4444;
30
- --border: #475569;
31
- --code-bg: #1a1a2e;
32
- --code-header-bg: #16162a;
33
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
34
- }
35
-
36
- /* ── Light theme ── */
37
- [data-theme="light"] {
38
- --bg-primary: #fefcf8;
39
- --bg-secondary: #f5f3ef;
40
- --bg-tertiary: #e8e6e1;
41
- --text-primary: #1a1a1a;
42
- --text-secondary: #4b5563;
43
- --accent: #2563eb;
44
- --accent-hover: #1d4ed8;
45
- --success: #16a34a;
46
- --warning: #d97706;
47
- --error: #dc2626;
48
- --border: #d1d5db;
49
- --code-bg: #f1f3f5;
50
- --code-header-bg: #e9ecef;
51
- }
52
-
53
- body {
54
- background-color: var(--bg-primary);
55
- color: var(--text-primary);
56
- min-height: 100vh;
57
- min-height: 100dvh;
58
- overscroll-behavior: none;
59
- }
60
-
61
- #app {
62
- position: fixed;
63
- inset: 0;
64
- }
65
-
66
- /* ── Layout ── */
67
- .layout {
68
- display: flex;
69
- flex-direction: column;
70
- height: 100%;
71
- }
72
-
73
- .top-bar {
74
- display: flex;
75
- align-items: center;
76
- justify-content: space-between;
77
- padding: 0.5rem 1rem;
78
- background: var(--bg-secondary);
79
- border-bottom: 1px solid var(--border);
80
- flex-shrink: 0;
81
- }
82
-
83
- .top-bar-left {
84
- display: flex;
85
- align-items: center;
86
- gap: 0.5rem;
87
- }
88
-
89
- .sidebar-toggle {
90
- display: flex;
91
- align-items: center;
92
- justify-content: center;
93
- width: 30px;
94
- height: 30px;
95
- background: none;
96
- border: none;
97
- border-radius: 4px;
98
- color: var(--text-secondary);
99
- cursor: pointer;
100
- transition: color 0.15s, background 0.15s;
101
- }
102
-
103
- .sidebar-toggle:hover {
104
- color: var(--text-primary);
105
- background: var(--bg-tertiary);
106
- }
107
-
108
- .top-bar h1 {
109
- font-size: 1.1rem;
110
- font-weight: 700;
111
- }
112
-
113
- .top-bar-info {
114
- display: flex;
115
- align-items: center;
116
- gap: 0.75rem;
117
- }
118
-
119
- .agent-label {
120
- color: var(--text-secondary);
121
- font-size: 0.85rem;
122
- }
123
-
124
- .theme-toggle {
125
- display: flex;
126
- align-items: center;
127
- justify-content: center;
128
- width: 32px;
129
- height: 32px;
130
- background: none;
131
- border: 1px solid var(--border);
132
- border-radius: 8px;
133
- color: var(--text-secondary);
134
- cursor: pointer;
135
- transition: color 0.15s, background 0.15s, border-color 0.15s;
136
- }
137
-
138
- .theme-toggle:hover {
139
- color: var(--text-primary);
140
- background: var(--bg-tertiary);
141
- border-color: var(--text-secondary);
142
- }
143
-
144
- /* ── Center card (no session / waiting) ── */
145
- .center-card {
146
- flex: 1;
147
- display: flex;
148
- align-items: center;
149
- justify-content: center;
150
- padding: 2rem;
151
- }
152
-
153
- .status-card {
154
- background: var(--bg-secondary);
155
- border: 1px solid var(--border);
156
- border-radius: 12px;
157
- padding: 1.5rem 2rem;
158
- min-width: 320px;
159
- text-align: center;
160
- }
161
-
162
- .status-card .status {
163
- font-size: 1.1rem;
164
- margin-bottom: 0.75rem;
165
- }
166
-
167
- .status-card .info {
168
- margin-bottom: 0.5rem;
169
- font-size: 0.95rem;
170
- }
171
-
172
- .status-card .label {
173
- color: var(--text-secondary);
174
- }
175
-
176
- /* ── Badges ── */
177
- .muted {
178
- color: var(--text-secondary);
179
- font-size: 0.85rem;
180
- }
181
-
182
- .badge {
183
- padding: 2px 8px;
184
- border-radius: 4px;
185
- font-weight: 600;
186
- font-size: 0.9rem;
187
- }
188
-
189
- .badge.connected {
190
- color: var(--success);
191
- background: rgba(34, 197, 94, 0.1);
192
- }
193
-
194
- .badge.disconnected {
195
- color: var(--error);
196
- background: rgba(239, 68, 68, 0.1);
197
- }
198
-
199
- .badge.connecting\.\.\. {
200
- color: var(--warning);
201
- background: rgba(245, 158, 11, 0.1);
202
- }
203
-
204
- .badge.reconnecting\.\.\. {
205
- color: var(--warning);
206
- background: rgba(245, 158, 11, 0.1);
207
- }
208
-
209
- .badge.waiting {
210
- color: var(--warning);
211
- background: rgba(245, 158, 11, 0.1);
212
- }
213
-
214
- .badge.error,
215
- .badge.no\ session {
216
- color: var(--error);
217
- background: rgba(239, 68, 68, 0.1);
218
- }
219
-
220
- .error-msg {
221
- color: var(--error);
222
- font-size: 0.85rem;
223
- margin-top: 0.75rem;
224
- }
225
-
226
- /* ── Main body (sidebar + chat) ── */
227
- .main-body {
228
- flex: 1;
229
- display: flex;
230
- min-height: 0;
231
- }
232
-
233
- /* ── Sidebar ── */
234
- .sidebar {
235
- width: 260px;
236
- flex-shrink: 0;
237
- background: var(--bg-secondary);
238
- border-right: 1px solid var(--border);
239
- display: flex;
240
- flex-direction: column;
241
- overflow: hidden;
242
- }
243
-
244
- .sidebar-section {
245
- padding: 0.75rem;
246
- border-bottom: 1px solid var(--border);
247
- }
248
-
249
- .sidebar-workdir {
250
- overflow: hidden;
251
- }
252
-
253
- .sidebar-hostname {
254
- display: flex;
255
- align-items: center;
256
- gap: 6px;
257
- font-size: 0.85rem;
258
- font-weight: 500;
259
- color: var(--text-primary);
260
- margin-bottom: 10px;
261
- padding-bottom: 10px;
262
- border-bottom: 1px solid var(--border);
263
- }
264
-
265
- .sidebar-hostname-icon {
266
- flex-shrink: 0;
267
- opacity: 0.6;
268
- }
269
-
270
- .sidebar-workdir-label {
271
- font-size: 0.7rem;
272
- text-transform: uppercase;
273
- letter-spacing: 0.05em;
274
- color: var(--text-secondary);
275
- margin-bottom: 4px;
276
- }
277
-
278
- .sidebar-workdir-path {
279
- font-size: 0.8rem;
280
- color: var(--text-primary);
281
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
282
- word-break: break-all;
283
- line-height: 1.3;
284
- }
285
-
286
- /* ── Working Directory History ── */
287
- .workdir-history {
288
- margin-top: 10px;
289
- padding-top: 10px;
290
- border-top: 1px solid var(--border);
291
- }
292
- .workdir-history-label {
293
- font-size: 0.65rem;
294
- text-transform: uppercase;
295
- letter-spacing: 0.05em;
296
- color: var(--text-secondary);
297
- margin-bottom: 6px;
298
- opacity: 0.7;
299
- }
300
- .workdir-history-list {
301
- display: flex;
302
- flex-direction: column;
303
- gap: 2px;
304
- }
305
- .workdir-history-item {
306
- display: flex;
307
- align-items: center;
308
- gap: 6px;
309
- padding: 4px 6px;
310
- border-radius: 4px;
311
- cursor: pointer;
312
- transition: background 0.15s;
313
- }
314
- .workdir-history-item:hover {
315
- background: var(--bg-tertiary);
316
- }
317
- .workdir-history-path {
318
- font-size: 0.72rem;
319
- color: var(--text-secondary);
320
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
321
- overflow: hidden;
322
- text-overflow: ellipsis;
323
- white-space: nowrap;
324
- flex: 1;
325
- min-width: 0;
326
- }
327
- .workdir-history-item:hover .workdir-history-path {
328
- color: var(--text-primary);
329
- }
330
- .workdir-history-delete {
331
- display: none;
332
- align-items: center;
333
- justify-content: center;
334
- width: 18px;
335
- height: 18px;
336
- background: none;
337
- border: none;
338
- border-radius: 3px;
339
- color: var(--text-secondary);
340
- cursor: pointer;
341
- padding: 0;
342
- flex-shrink: 0;
343
- transition: color 0.15s, background 0.15s;
344
- }
345
- .workdir-history-item:hover .workdir-history-delete {
346
- display: flex;
347
- }
348
- .workdir-history-delete:hover {
349
- color: var(--error);
350
- background: rgba(239, 68, 68, 0.1);
351
- }
352
-
353
- .sidebar-sessions {
354
- flex: 1;
355
- display: flex;
356
- flex-direction: column;
357
- overflow: hidden;
358
- }
359
-
360
- .sidebar-version-footer {
361
- padding: 6px 12px;
362
- font-size: 0.65rem;
363
- color: var(--text-secondary);
364
- opacity: 0.5;
365
- text-align: center;
366
- border-top: 1px solid var(--border);
367
- flex-shrink: 0;
368
- }
369
-
370
- .sidebar-version-sep {
371
- margin: 0 3px;
372
- }
373
-
374
- .sidebar-section-header {
375
- display: flex;
376
- align-items: center;
377
- justify-content: space-between;
378
- font-size: 0.75rem;
379
- text-transform: uppercase;
380
- letter-spacing: 0.05em;
381
- color: var(--text-secondary);
382
- margin-bottom: 8px;
383
- }
384
-
385
- .sidebar-refresh-btn {
386
- display: flex;
387
- align-items: center;
388
- justify-content: center;
389
- width: 24px;
390
- height: 24px;
391
- background: none;
392
- border: none;
393
- border-radius: 4px;
394
- color: var(--text-secondary);
395
- cursor: pointer;
396
- transition: color 0.15s;
397
- }
398
-
399
- .sidebar-refresh-btn:hover {
400
- color: var(--text-primary);
401
- }
402
-
403
- .sidebar-refresh-btn:disabled {
404
- opacity: 0.4;
405
- cursor: not-allowed;
406
- }
407
-
408
- @keyframes spin {
409
- from { transform: rotate(0deg); }
410
- to { transform: rotate(360deg); }
411
- }
412
-
413
- .spinning {
414
- animation: spin 0.8s linear infinite;
415
- }
416
-
417
- .new-conversation-btn {
418
- display: flex;
419
- align-items: center;
420
- gap: 6px;
421
- width: 100%;
422
- padding: 6px 8px;
423
- background: none;
424
- border: 1px dashed var(--border);
425
- border-radius: 6px;
426
- color: var(--text-secondary);
427
- font-size: 0.82rem;
428
- cursor: pointer;
429
- transition: color 0.15s, border-color 0.15s, background 0.15s;
430
- margin-bottom: 8px;
431
- }
432
-
433
- .new-conversation-btn:hover {
434
- color: var(--text-primary);
435
- border-color: var(--text-secondary);
436
- background: var(--bg-tertiary);
437
- }
438
-
439
- .new-conversation-btn:disabled {
440
- opacity: 0.4;
441
- cursor: not-allowed;
442
- }
443
-
444
- .sidebar-loading,
445
- .sidebar-empty {
446
- font-size: 0.8rem;
447
- color: var(--text-secondary);
448
- text-align: center;
449
- padding: 1rem 0;
450
- }
451
-
452
- .session-list {
453
- flex: 1;
454
- overflow-y: auto;
455
- display: flex;
456
- flex-direction: column;
457
- gap: 2px;
458
- }
459
-
460
- .session-group {
461
- margin-bottom: 0.5rem;
462
- }
463
-
464
- .session-group-label {
465
- font-size: 0.68rem;
466
- font-weight: 600;
467
- text-transform: uppercase;
468
- letter-spacing: 0.04em;
469
- color: var(--text-secondary);
470
- padding: 0.4rem 8px 0.2rem;
471
- opacity: 0.7;
472
- }
473
-
474
- .session-item {
475
- padding: 8px 10px;
476
- border-radius: 8px;
477
- cursor: pointer;
478
- transition: background 0.15s, transform 0.1s;
479
- border-left: 3px solid transparent;
480
- }
481
-
482
- .session-item:hover {
483
- background: var(--bg-tertiary);
484
- }
485
-
486
- .session-item:active {
487
- transform: scale(0.98);
488
- }
489
-
490
- .session-item.active {
491
- background: var(--bg-tertiary);
492
- border-left-color: var(--accent);
493
- }
494
-
495
- .session-title {
496
- font-size: 0.82rem;
497
- color: var(--text-primary);
498
- overflow: hidden;
499
- text-overflow: ellipsis;
500
- white-space: nowrap;
501
- line-height: 1.3;
502
- }
503
-
504
- .session-meta {
505
- font-size: 0.7rem;
506
- color: var(--text-secondary);
507
- margin-top: 2px;
508
- display: flex;
509
- align-items: center;
510
- justify-content: space-between;
511
- }
512
-
513
- .session-delete-btn {
514
- display: none;
515
- align-items: center;
516
- justify-content: center;
517
- width: 20px;
518
- height: 20px;
519
- background: none;
520
- border: none;
521
- border-radius: 4px;
522
- color: var(--text-secondary);
523
- cursor: pointer;
524
- padding: 0;
525
- transition: color 0.15s, background 0.15s;
526
- }
527
-
528
- .session-item:hover .session-delete-btn {
529
- display: flex;
530
- }
531
-
532
- .session-delete-btn:hover {
533
- color: var(--error);
534
- background: rgba(239, 68, 68, 0.1);
535
- }
536
-
537
- /* ── Delete confirmation dialog ── */
538
- .delete-confirm-dialog {
539
- width: 360px;
540
- background: var(--bg-secondary);
541
- border: 1px solid var(--border);
542
- border-radius: 12px;
543
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
544
- }
545
-
546
- .delete-confirm-header {
547
- padding: 12px 16px;
548
- font-size: 0.95rem;
549
- font-weight: 600;
550
- border-bottom: 1px solid var(--border);
551
- }
552
-
553
- .delete-confirm-body {
554
- padding: 16px;
555
- font-size: 0.88rem;
556
- line-height: 1.5;
557
- }
558
-
559
- .delete-confirm-body p {
560
- margin-bottom: 6px;
561
- }
562
-
563
- .delete-confirm-title {
564
- font-weight: 500;
565
- color: var(--text-primary);
566
- overflow: hidden;
567
- text-overflow: ellipsis;
568
- white-space: nowrap;
569
- padding: 6px 10px;
570
- background: var(--bg-tertiary);
571
- border-radius: 6px;
572
- }
573
-
574
- .delete-confirm-warning {
575
- font-size: 0.78rem;
576
- color: var(--text-secondary);
577
- margin-top: 4px;
578
- }
579
-
580
- .delete-confirm-footer {
581
- padding: 10px 16px;
582
- display: flex;
583
- justify-content: flex-end;
584
- gap: 8px;
585
- border-top: 1px solid var(--border);
586
- }
587
-
588
- .delete-confirm-btn {
589
- padding: 6px 20px;
590
- background: var(--error);
591
- color: #fff;
592
- border: none;
593
- border-radius: 8px;
594
- font-size: 0.85rem;
595
- font-weight: 600;
596
- cursor: pointer;
597
- transition: background 0.15s;
598
- }
599
-
600
- .delete-confirm-btn:hover {
601
- background: #dc2626;
602
- }
603
-
604
- /* ── Auth Dialog ── */
605
- .auth-dialog {
606
- background: var(--bg-secondary);
607
- border: 1px solid var(--border);
608
- border-radius: 12px;
609
- width: 360px;
610
- max-width: 90vw;
611
- box-shadow: 0 8px 32px rgba(0,0,0,0.3);
612
- }
613
-
614
- .auth-dialog-header {
615
- display: flex;
616
- align-items: center;
617
- gap: 10px;
618
- padding: 20px 24px 16px;
619
- font-size: 1rem;
620
- font-weight: 600;
621
- color: var(--text-primary);
622
- }
623
-
624
- .auth-dialog-header svg {
625
- color: var(--accent);
626
- }
627
-
628
- .auth-dialog-locked .auth-dialog-header svg {
629
- color: var(--error);
630
- }
631
-
632
- .auth-dialog-body {
633
- padding: 0 24px 16px;
634
- }
635
-
636
- .auth-dialog-body p {
637
- margin: 0 0 12px 0;
638
- color: var(--text-secondary);
639
- font-size: 0.85rem;
640
- }
641
-
642
- .auth-password-input {
643
- width: 100%;
644
- padding: 10px 12px;
645
- background: var(--bg-tertiary);
646
- border: 1px solid var(--border);
647
- border-radius: 8px;
648
- color: var(--text-primary);
649
- font-size: 0.9rem;
650
- outline: none;
651
- box-sizing: border-box;
652
- margin-bottom: 4px;
653
- }
654
-
655
- .auth-password-input:focus {
656
- border-color: var(--accent);
657
- }
658
-
659
- .auth-error {
660
- color: var(--error) !important;
661
- font-size: 0.82rem !important;
662
- margin-top: 8px !important;
663
- }
664
-
665
- .auth-attempts {
666
- color: var(--text-secondary) !important;
667
- font-size: 0.78rem !important;
668
- }
669
-
670
- .auth-locked-hint {
671
- font-size: 0.78rem !important;
672
- color: var(--text-secondary) !important;
673
- }
674
-
675
- .auth-dialog-footer {
676
- padding: 12px 24px 20px;
677
- display: flex;
678
- justify-content: flex-end;
679
- }
680
-
681
- .auth-submit-btn {
682
- background: var(--accent);
683
- color: #fff;
684
- border: none;
685
- padding: 8px 24px;
686
- border-radius: 8px;
687
- font-size: 0.85rem;
688
- font-weight: 600;
689
- cursor: pointer;
690
- transition: background 0.15s;
691
- }
692
-
693
- .auth-submit-btn:hover:not(:disabled) {
694
- background: var(--accent-hover);
695
- }
696
-
697
- .auth-submit-btn:disabled {
698
- opacity: 0.4;
699
- cursor: not-allowed;
700
- }
701
-
702
- /* ── Chat area (message list + input) ── */
703
- .chat-area {
704
- flex: 1;
705
- display: flex;
706
- flex-direction: column;
707
- min-height: 0;
708
- }
709
-
710
- /* ── Message list ── */
711
- .message-list {
712
- flex: 1;
713
- overflow-y: auto;
714
- padding: 1.5rem 1.5rem 1rem;
715
- display: flex;
716
- flex-direction: column;
717
- gap: 0.25rem;
718
- }
719
-
720
- .message-list-inner {
721
- max-width: 768px;
722
- width: 100%;
723
- margin: 0 auto;
724
- display: flex;
725
- flex-direction: column;
726
- gap: 0.25rem;
727
- }
728
-
729
- .empty-state {
730
- flex: 1;
731
- display: flex;
732
- flex-direction: column;
733
- align-items: center;
734
- justify-content: center;
735
- gap: 0.5rem;
736
- color: var(--text-secondary);
737
- }
738
-
739
- .empty-state-icon {
740
- font-size: 2.5rem;
741
- opacity: 0.5;
742
- margin-bottom: 0.5rem;
743
- }
744
-
745
- .empty-state strong {
746
- color: var(--text-primary);
747
- }
748
-
749
- /* ── Messages ── */
750
- .message {
751
- display: flex;
752
- flex-direction: column;
753
- }
754
-
755
- .message-user {
756
- margin-top: 1.25rem;
757
- }
758
-
759
- .message-role-label {
760
- font-size: 0.75rem;
761
- font-weight: 600;
762
- text-transform: uppercase;
763
- letter-spacing: 0.03em;
764
- margin-bottom: 0.3rem;
765
- padding-left: 0.1rem;
766
- }
767
-
768
- .message-role-label.user-label {
769
- color: var(--text-secondary);
770
- }
771
-
772
- .message-role-label.assistant-label {
773
- color: var(--accent);
774
- }
775
-
776
- .message-bubble {
777
- padding: 0.6rem 0.9rem;
778
- border-radius: 10px;
779
- font-size: 0.94rem;
780
- line-height: 1.6;
781
- word-wrap: break-word;
782
- position: relative;
783
- }
784
-
785
- .user-bubble {
786
- background: var(--bg-tertiary);
787
- color: var(--text-primary);
788
- }
789
-
790
- .assistant-bubble {
791
- background: transparent;
792
- padding: 0.2rem 0;
793
- }
794
-
795
- /* ── Message actions (copy button, shown on hover) ── */
796
- .message-actions {
797
- position: absolute;
798
- top: 0;
799
- right: 0;
800
- display: flex;
801
- gap: 2px;
802
- opacity: 0;
803
- transition: opacity 0.15s;
804
- }
805
-
806
- .message-bubble:hover .message-actions {
807
- opacity: 1;
808
- }
809
-
810
- .icon-btn {
811
- display: flex;
812
- align-items: center;
813
- justify-content: center;
814
- width: 26px;
815
- height: 26px;
816
- background: var(--bg-tertiary);
817
- border: 1px solid var(--border);
818
- border-radius: 4px;
819
- color: var(--text-secondary);
820
- cursor: pointer;
821
- transition: color 0.15s;
822
- }
823
-
824
- .icon-btn:hover {
825
- color: var(--text-primary);
826
- }
827
-
828
- /* ── Markdown body in assistant messages ── */
829
- .markdown-body {
830
- line-height: 1.6;
831
- }
832
-
833
- .markdown-body p {
834
- margin-bottom: 0.5em;
835
- }
836
-
837
- .markdown-body p:last-child {
838
- margin-bottom: 0;
839
- }
840
-
841
- .markdown-body ul, .markdown-body ol {
842
- padding-left: 1.5em;
843
- margin-bottom: 0.5em;
844
- }
845
-
846
- .markdown-body li {
847
- margin-bottom: 0.2em;
848
- }
849
-
850
- .markdown-body strong {
851
- font-weight: 600;
852
- }
853
-
854
- .markdown-body code {
855
- background: var(--bg-tertiary);
856
- padding: 0.15em 0.35em;
857
- border-radius: 3px;
858
- font-size: 0.85em;
859
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
860
- }
861
-
862
- .markdown-body pre {
863
- margin: 0.5em 0;
864
- overflow-x: auto;
865
- }
866
-
867
- .markdown-body pre code {
868
- background: none;
869
- padding: 0;
870
- border-radius: 0;
871
- font-size: 0.85em;
872
- display: block;
873
- padding: 0.8em;
874
- }
875
-
876
- .markdown-body blockquote {
877
- border-left: 3px solid var(--border);
878
- padding-left: 0.8em;
879
- color: var(--text-secondary);
880
- margin: 0.5em 0;
881
- }
882
-
883
- .markdown-body hr {
884
- border: none;
885
- border-top: 1px solid var(--border);
886
- margin: 0.75em 0;
887
- }
888
-
889
- .markdown-body table {
890
- border-collapse: collapse;
891
- margin: 0.5em 0;
892
- font-size: 0.88em;
893
- }
894
-
895
- .markdown-body th, .markdown-body td {
896
- border: 1px solid var(--border);
897
- padding: 0.4em 0.6em;
898
- }
899
-
900
- .markdown-body th {
901
- background: var(--bg-tertiary);
902
- }
903
-
904
- /* ── Code block wrapper (with copy button) ── */
905
- .code-block-wrapper {
906
- position: relative;
907
- margin: 0.5em 0;
908
- border-radius: 8px;
909
- overflow: hidden;
910
- background: var(--code-bg);
911
- }
912
-
913
- .code-block-header {
914
- display: flex;
915
- justify-content: space-between;
916
- align-items: center;
917
- padding: 6px 12px;
918
- background: var(--code-header-bg);
919
- }
920
-
921
- .code-lang {
922
- font-size: 11px;
923
- color: var(--text-secondary);
924
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
925
- }
926
-
927
- .code-copy-btn {
928
- display: flex;
929
- align-items: center;
930
- padding: 2px 6px;
931
- border: none;
932
- border-radius: 3px;
933
- background: transparent;
934
- color: var(--text-secondary);
935
- cursor: pointer;
936
- transition: color 0.15s;
937
- }
938
-
939
- .code-copy-btn:hover {
940
- color: var(--text-primary);
941
- }
942
-
943
- .code-block-wrapper pre {
944
- margin: 0;
945
- }
946
-
947
- .code-block-wrapper pre code {
948
- padding: 0.8em 1em;
949
- }
950
-
951
- /* ── Tool use lines (collapsible, compact, subdued) ── */
952
- .tool-line-wrapper {
953
- max-width: 100%;
954
- padding-left: 0.25rem;
955
- overflow: hidden;
956
- }
957
-
958
- .tool-line {
959
- display: flex;
960
- align-items: center;
961
- gap: 6px;
962
- padding: 3px 6px;
963
- border-radius: 4px;
964
- font-size: 0.8rem;
965
- cursor: pointer;
966
- user-select: none;
967
- transition: background 0.15s;
968
- color: var(--text-secondary);
969
- min-width: 0;
970
- overflow: hidden;
971
- }
972
-
973
- .tool-line:hover {
974
- background: var(--bg-tertiary);
975
- }
976
-
977
- .tool-icon {
978
- flex-shrink: 0;
979
- display: flex;
980
- align-items: center;
981
- color: var(--text-secondary);
982
- opacity: 0.6;
983
- }
984
-
985
- .tool-name {
986
- font-weight: 500;
987
- color: var(--text-secondary);
988
- overflow: hidden;
989
- text-overflow: ellipsis;
990
- white-space: nowrap;
991
- min-width: 0;
992
- }
993
-
994
- .tool-summary {
995
- color: var(--text-secondary);
996
- overflow: hidden;
997
- text-overflow: ellipsis;
998
- white-space: nowrap;
999
- flex: 1;
1000
- min-width: 0;
1001
- }
1002
-
1003
- .tool-status-icon {
1004
- color: var(--text-secondary);
1005
- font-weight: normal;
1006
- flex-shrink: 0;
1007
- font-size: 0.75rem;
1008
- opacity: 0.7;
1009
- }
1010
-
1011
- .tool-line.completed .tool-status-icon {
1012
- color: var(--success);
1013
- opacity: 0.6;
1014
- }
1015
-
1016
- .running-dots {
1017
- display: inline-flex;
1018
- gap: 2px;
1019
- }
1020
-
1021
- .running-dots span {
1022
- width: 3px;
1023
- height: 3px;
1024
- border-radius: 50%;
1025
- background: var(--text-secondary);
1026
- animation: typing 1.2s infinite ease-in-out;
1027
- }
1028
-
1029
- .running-dots span:nth-child(2) { animation-delay: 0.2s; }
1030
- .running-dots span:nth-child(3) { animation-delay: 0.4s; }
1031
-
1032
- .tool-toggle {
1033
- color: var(--text-secondary);
1034
- font-size: 0.6rem;
1035
- flex-shrink: 0;
1036
- margin-left: auto;
1037
- opacity: 0.5;
1038
- }
1039
-
1040
- .tool-expand {
1041
- margin-top: 2px;
1042
- margin-left: 20px;
1043
- border-left: 1px solid var(--border);
1044
- padding-left: 8px;
1045
- overflow: hidden;
1046
- animation: toolExpand 0.15s ease-out;
1047
- }
1048
-
1049
- @keyframes toolExpand {
1050
- from { opacity: 0; max-height: 0; }
1051
- to { opacity: 1; max-height: 500px; }
1052
- }
1053
-
1054
- .tool-block {
1055
- background: var(--bg-secondary);
1056
- border-radius: 4px;
1057
- padding: 0.4rem 0.6rem;
1058
- margin-top: 0.25rem;
1059
- overflow-x: auto;
1060
- font-size: 0.75rem;
1061
- line-height: 1.4;
1062
- max-height: 200px;
1063
- overflow-y: auto;
1064
- white-space: pre-wrap;
1065
- word-break: break-all;
1066
- color: var(--text-secondary);
1067
- }
1068
-
1069
- .tool-output {
1070
- border-left: 2px solid var(--success);
1071
- color: var(--text-primary);
1072
- }
1073
-
1074
- /* ── Formatted tool input (Read, Write, Bash, Glob, Grep) ── */
1075
- .tool-input-formatted {
1076
- padding: 0.3rem 0.5rem;
1077
- margin-top: 0.25rem;
1078
- font-size: 0.75rem;
1079
- line-height: 1.5;
1080
- color: var(--text-secondary);
1081
- word-break: break-all;
1082
- }
1083
-
1084
- .tool-input-meta {
1085
- color: var(--text-secondary);
1086
- opacity: 0.6;
1087
- }
1088
-
1089
- .tool-input-cmd {
1090
- background: var(--bg-secondary);
1091
- padding: 0.1rem 0.4rem;
1092
- border-radius: 3px;
1093
- font-size: 0.73rem;
1094
- word-break: break-all;
1095
- white-space: pre-wrap;
1096
- }
1097
-
1098
- /* ── TodoWrite checklist ── */
1099
- .todo-list {
1100
- display: flex;
1101
- flex-direction: column;
1102
- gap: 2px;
1103
- }
1104
-
1105
- .todo-item {
1106
- display: flex;
1107
- align-items: baseline;
1108
- gap: 6px;
1109
- font-size: 0.75rem;
1110
- line-height: 1.4;
1111
- color: var(--text-secondary);
1112
- }
1113
-
1114
- .todo-item.todo-done {
1115
- opacity: 0.55;
1116
- }
1117
-
1118
- .todo-item.todo-active {
1119
- color: var(--text-primary);
1120
- }
1121
-
1122
- .todo-icon {
1123
- flex-shrink: 0;
1124
- width: 1em;
1125
- text-align: center;
1126
- font-size: 0.7rem;
1127
- opacity: 0.5;
1128
- }
1129
-
1130
- .todo-icon.done {
1131
- color: var(--success);
1132
- opacity: 0.8;
1133
- }
1134
-
1135
- .todo-icon.active {
1136
- color: #58a6ff;
1137
- opacity: 1;
1138
- font-size: 0.55rem;
1139
- }
1140
-
1141
- .todo-text {
1142
- word-break: break-word;
1143
- }
1144
-
1145
- /* ── Task / WebFetch formatted fields ── */
1146
- .task-field {
1147
- font-size: 0.75rem;
1148
- line-height: 1.5;
1149
- color: var(--text-secondary);
1150
- }
1151
-
1152
- .task-field + .task-field {
1153
- margin-top: 2px;
1154
- }
1155
-
1156
- .task-prompt {
1157
- background: var(--bg-secondary);
1158
- border-radius: 3px;
1159
- padding: 0.3rem 0.5rem;
1160
- margin-top: 3px;
1161
- font-size: 0.73rem;
1162
- line-height: 1.4;
1163
- color: var(--text-secondary);
1164
- white-space: pre-wrap;
1165
- word-break: break-word;
1166
- max-height: 150px;
1167
- overflow-y: auto;
1168
- }
1169
-
1170
- .tool-link {
1171
- color: #58a6ff;
1172
- font-size: 0.75rem;
1173
- word-break: break-all;
1174
- text-decoration: none;
1175
- }
1176
-
1177
- .tool-link:hover {
1178
- text-decoration: underline;
1179
- }
1180
-
1181
- [data-theme="light"] .todo-icon.active {
1182
- color: #0969da;
1183
- }
1184
-
1185
- [data-theme="light"] .tool-link {
1186
- color: #0969da;
1187
- }
1188
-
1189
- /* ── Edit tool diff view ── */
1190
- .tool-diff {
1191
- background: var(--bg-secondary);
1192
- border-radius: 4px;
1193
- padding: 0.4rem 0.6rem;
1194
- margin-top: 0.25rem;
1195
- overflow-x: auto;
1196
- font-size: 0.75rem;
1197
- line-height: 1.5;
1198
- max-height: 300px;
1199
- overflow-y: auto;
1200
- font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
1201
- }
1202
-
1203
- .diff-file {
1204
- color: var(--text-secondary);
1205
- margin-bottom: 0.35rem;
1206
- font-weight: 500;
1207
- }
1208
-
1209
- .diff-replace-all {
1210
- opacity: 0.6;
1211
- font-weight: 400;
1212
- }
1213
-
1214
- .diff-lines {
1215
- border-radius: 3px;
1216
- overflow: hidden;
1217
- }
1218
-
1219
- .diff-removed, .diff-added {
1220
- white-space: pre-wrap;
1221
- word-break: break-all;
1222
- padding: 0 0.4rem;
1223
- }
1224
-
1225
- .diff-removed {
1226
- background: rgba(248, 81, 73, 0.15);
1227
- color: #f85149;
1228
- }
1229
-
1230
- .diff-added {
1231
- background: rgba(63, 185, 80, 0.15);
1232
- color: #3fb950;
1233
- }
1234
-
1235
- .diff-sign {
1236
- display: inline-block;
1237
- width: 1.2em;
1238
- user-select: none;
1239
- opacity: 0.7;
1240
- }
1241
-
1242
- [data-theme="light"] .diff-removed {
1243
- background: rgba(208, 46, 38, 0.12);
1244
- color: #b31d28;
1245
- }
1246
-
1247
- [data-theme="light"] .diff-added {
1248
- background: rgba(34, 134, 58, 0.12);
1249
- color: #22863a;
1250
- }
1251
-
1252
- /* ── Context summary (collapsible continuation notice) ── */
1253
- .context-summary-wrapper {
1254
- margin: 0.75rem 0;
1255
- }
1256
-
1257
- /* ── AskUserQuestion interactive card ── */
1258
- .ask-question-wrapper {
1259
- max-width: 100%;
1260
- padding-left: 0.25rem;
1261
- margin: 0.5rem 0;
1262
- }
1263
-
1264
- .ask-question-card {
1265
- background: var(--bg-secondary);
1266
- border: 1px solid var(--accent);
1267
- border-radius: 10px;
1268
- padding: 0.8rem 1rem;
1269
- display: flex;
1270
- flex-direction: column;
1271
- gap: 0.75rem;
1272
- }
1273
-
1274
- .ask-question-block {
1275
- display: flex;
1276
- flex-direction: column;
1277
- gap: 0.5rem;
1278
- }
1279
-
1280
- .ask-question-header {
1281
- font-size: 0.7rem;
1282
- font-weight: 600;
1283
- text-transform: uppercase;
1284
- letter-spacing: 0.04em;
1285
- color: var(--accent);
1286
- }
1287
-
1288
- .ask-question-text {
1289
- font-size: 0.9rem;
1290
- color: var(--text-primary);
1291
- line-height: 1.5;
1292
- }
1293
-
1294
- .ask-question-options {
1295
- display: flex;
1296
- flex-direction: column;
1297
- gap: 6px;
1298
- }
1299
-
1300
- .ask-question-option {
1301
- padding: 8px 12px;
1302
- border: 1px solid var(--border);
1303
- border-radius: 8px;
1304
- cursor: pointer;
1305
- transition: border-color 0.15s, background 0.15s;
1306
- }
1307
-
1308
- .ask-question-option:hover {
1309
- border-color: var(--text-secondary);
1310
- background: var(--bg-tertiary);
1311
- }
1312
-
1313
- .ask-question-option.selected {
1314
- border-color: var(--accent);
1315
- background: rgba(37, 99, 235, 0.1);
1316
- }
1317
-
1318
- .ask-option-label {
1319
- font-size: 0.88rem;
1320
- font-weight: 500;
1321
- color: var(--text-primary);
1322
- }
1323
-
1324
- .ask-option-desc {
1325
- font-size: 0.78rem;
1326
- color: var(--text-secondary);
1327
- margin-top: 2px;
1328
- line-height: 1.4;
1329
- }
1330
-
1331
- .ask-question-custom {
1332
- margin-top: 2px;
1333
- }
1334
-
1335
- .ask-question-custom input {
1336
- width: 100%;
1337
- padding: 6px 10px;
1338
- background: var(--bg-primary);
1339
- border: 1px solid var(--border);
1340
- border-radius: 6px;
1341
- color: var(--text-primary);
1342
- font-size: 0.85rem;
1343
- font-family: inherit;
1344
- outline: none;
1345
- transition: border-color 0.15s;
1346
- }
1347
-
1348
- .ask-question-custom input::placeholder {
1349
- color: var(--text-secondary);
1350
- }
1351
-
1352
- .ask-question-custom input:focus {
1353
- border-color: var(--accent);
1354
- }
1355
-
1356
- .ask-question-actions {
1357
- display: flex;
1358
- justify-content: flex-end;
1359
- }
1360
-
1361
- .ask-question-submit {
1362
- padding: 6px 20px;
1363
- background: var(--accent);
1364
- color: #fff;
1365
- border: none;
1366
- border-radius: 8px;
1367
- font-size: 0.85rem;
1368
- font-weight: 600;
1369
- cursor: pointer;
1370
- transition: background 0.15s, opacity 0.15s;
1371
- }
1372
-
1373
- .ask-question-submit:hover:not(:disabled) {
1374
- background: var(--accent-hover);
1375
- }
1376
-
1377
- .ask-question-submit:disabled {
1378
- opacity: 0.3;
1379
- cursor: not-allowed;
1380
- }
1381
-
1382
- .ask-question-answered {
1383
- display: flex;
1384
- align-items: center;
1385
- gap: 6px;
1386
- padding: 4px 8px;
1387
- font-size: 0.82rem;
1388
- color: var(--text-secondary);
1389
- }
1390
-
1391
- .ask-answered-icon {
1392
- color: var(--success);
1393
- font-size: 0.8rem;
1394
- }
1395
-
1396
- .ask-answered-text {
1397
- font-style: italic;
1398
- }
1399
-
1400
- .context-summary-bar {
1401
- display: flex;
1402
- align-items: center;
1403
- gap: 6px;
1404
- padding: 6px 10px;
1405
- border-radius: 6px;
1406
- border: 1px dashed var(--border);
1407
- font-size: 0.78rem;
1408
- color: var(--text-secondary);
1409
- cursor: pointer;
1410
- transition: background 0.15s;
1411
- }
1412
-
1413
- .context-summary-bar:hover {
1414
- background: var(--bg-tertiary);
1415
- }
1416
-
1417
- .context-summary-icon {
1418
- flex-shrink: 0;
1419
- opacity: 0.5;
1420
- }
1421
-
1422
- .context-summary-label {
1423
- flex: 1;
1424
- }
1425
-
1426
- .context-summary-toggle {
1427
- font-size: 0.72rem;
1428
- opacity: 0.6;
1429
- flex-shrink: 0;
1430
- }
1431
-
1432
- .context-summary-body {
1433
- margin-top: 6px;
1434
- padding: 0.6rem 0.8rem;
1435
- background: var(--bg-secondary);
1436
- border-radius: 6px;
1437
- border: 1px solid var(--border);
1438
- font-size: 0.82rem;
1439
- color: var(--text-secondary);
1440
- max-height: 400px;
1441
- overflow-y: auto;
1442
- }
1443
-
1444
- .context-summary-body .markdown-body {
1445
- font-size: 0.82rem;
1446
- color: var(--text-secondary);
1447
- }
1448
-
1449
- /* ── System message ── */
1450
- .system-msg {
1451
- text-align: center;
1452
- color: var(--text-secondary);
1453
- font-size: 0.8rem;
1454
- font-style: italic;
1455
- padding: 0.25rem 0;
1456
- }
1457
-
1458
- .system-msg.command-output-msg {
1459
- text-align: left;
1460
- font-style: normal;
1461
- font-size: 0.85rem;
1462
- padding: 0.5rem 0;
1463
- }
1464
-
1465
- .system-msg.error-msg {
1466
- text-align: left;
1467
- font-style: normal;
1468
- color: #ef4444;
1469
- background: rgba(239, 68, 68, 0.08);
1470
- border: 1px solid rgba(239, 68, 68, 0.2);
1471
- border-radius: 8px;
1472
- padding: 0.75rem 1rem;
1473
- font-size: 0.85rem;
1474
- word-break: break-word;
1475
- overflow-wrap: break-word;
1476
- }
1477
-
1478
- /* ── History loading indicator ── */
1479
- .history-loading {
1480
- display: flex;
1481
- align-items: center;
1482
- justify-content: center;
1483
- gap: 0.5rem;
1484
- padding: 2rem 0;
1485
- color: var(--text-secondary);
1486
- font-size: 0.85rem;
1487
- }
1488
-
1489
- .history-loading-spinner {
1490
- width: 16px;
1491
- height: 16px;
1492
- border: 2px solid var(--border);
1493
- border-top-color: var(--accent);
1494
- border-radius: 50%;
1495
- animation: spin 0.8s linear infinite;
1496
- }
1497
-
1498
- /* ── Load more button ── */
1499
- .load-more-wrapper {
1500
- display: flex;
1501
- justify-content: center;
1502
- padding: 0.75rem 0;
1503
- }
1504
-
1505
- .load-more-btn {
1506
- background: var(--bg-tertiary);
1507
- color: var(--text-secondary);
1508
- border: 1px solid var(--border);
1509
- border-radius: 6px;
1510
- padding: 0.4rem 1.2rem;
1511
- font-size: 0.8rem;
1512
- cursor: pointer;
1513
- transition: background 0.15s, color 0.15s;
1514
- }
1515
-
1516
- .load-more-btn:hover {
1517
- background: var(--accent);
1518
- color: #fff;
1519
- border-color: var(--accent);
1520
- }
1521
-
1522
- /* ── Typing indicator ── */
1523
- .typing-indicator {
1524
- display: flex;
1525
- align-items: center;
1526
- gap: 4px;
1527
- padding: 0.5rem 0.9rem;
1528
- }
1529
-
1530
- .typing-indicator span {
1531
- width: 6px;
1532
- height: 6px;
1533
- border-radius: 50%;
1534
- background: var(--text-secondary);
1535
- animation: typing 1.2s infinite ease-in-out;
1536
- }
1537
-
1538
- .typing-indicator span:nth-child(2) {
1539
- animation-delay: 0.2s;
1540
- }
1541
-
1542
- .typing-indicator span:nth-child(3) {
1543
- animation-delay: 0.4s;
1544
- }
1545
-
1546
- @keyframes typing {
1547
- 0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
1548
- 30% { opacity: 1; transform: scale(1); }
1549
- }
1550
-
1551
- /* ── Context compaction inline message ── */
1552
- .compact-msg {
1553
- display: inline-flex;
1554
- align-items: center;
1555
- gap: 6px;
1556
- color: var(--warning) !important;
1557
- font-style: normal !important;
1558
- font-weight: 500;
1559
- }
1560
-
1561
- .compact-inline-spinner {
1562
- display: inline-block;
1563
- width: 12px;
1564
- height: 12px;
1565
- border: 2px solid rgba(245, 158, 11, 0.3);
1566
- border-top-color: var(--warning);
1567
- border-radius: 50%;
1568
- animation: spin 0.8s linear infinite;
1569
- flex-shrink: 0;
1570
- }
1571
-
1572
- .compact-done-icon {
1573
- color: var(--success, #22c55e);
1574
- font-weight: 700;
1575
- font-style: normal;
1576
- }
1577
-
1578
- /* ── Input area ── */
1579
- .input-area {
1580
- flex-shrink: 0;
1581
- padding: 0 1.5rem 1rem;
1582
- background: transparent;
1583
- position: relative;
1584
- }
1585
-
1586
- .input-card {
1587
- max-width: 768px;
1588
- margin: 0 auto;
1589
- background: var(--bg-secondary);
1590
- border: 1px solid var(--border);
1591
- border-radius: 16px;
1592
- padding: 0.5rem;
1593
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
1594
- transition: border-color 0.2s, box-shadow 0.2s;
1595
- }
1596
-
1597
- .input-card:focus-within {
1598
- border-color: var(--accent);
1599
- box-shadow: 0 2px 16px rgba(37, 99, 235, 0.12);
1600
- }
1601
-
1602
- .input-card textarea {
1603
- width: 100%;
1604
- background: transparent;
1605
- border: none;
1606
- color: var(--text-primary);
1607
- padding: 0.4rem 0.6rem;
1608
- font-family: inherit;
1609
- font-size: 0.92rem;
1610
- resize: none;
1611
- outline: none;
1612
- line-height: 1.5;
1613
- max-height: 160px;
1614
- overflow-y: auto;
1615
- }
1616
-
1617
- .input-card textarea::placeholder {
1618
- color: var(--text-secondary);
1619
- }
1620
-
1621
- .input-bottom-row {
1622
- display: flex;
1623
- justify-content: space-between;
1624
- align-items: center;
1625
- padding: 0.1rem 0.25rem 0;
1626
- }
1627
-
1628
- .send-btn {
1629
- background: var(--accent);
1630
- color: #fff;
1631
- border: none;
1632
- border-radius: 10px;
1633
- width: 32px;
1634
- height: 32px;
1635
- font-size: 0.9rem;
1636
- font-weight: 600;
1637
- cursor: pointer;
1638
- display: flex;
1639
- align-items: center;
1640
- justify-content: center;
1641
- transition: background 0.15s, opacity 0.15s;
1642
- }
1643
-
1644
- .send-btn:hover:not(:disabled) {
1645
- background: var(--accent-hover);
1646
- }
1647
-
1648
- .send-btn:disabled {
1649
- opacity: 0.3;
1650
- cursor: not-allowed;
1651
- }
1652
-
1653
- /* ── Stop button ── */
1654
- .stop-btn {
1655
- background: var(--error);
1656
- }
1657
-
1658
- .stop-btn:hover {
1659
- background: #dc2626;
1660
- }
1661
-
1662
- /* ── Streaming cursor ── */
1663
- .assistant-bubble.streaming .markdown-body > *:last-child::after,
1664
- .assistant-bubble.streaming .message-content:not(.markdown-body)::after {
1665
- content: '';
1666
- display: inline-block;
1667
- width: 2px;
1668
- height: 1em;
1669
- background: var(--accent);
1670
- margin-left: 2px;
1671
- vertical-align: text-bottom;
1672
- animation: blink-cursor 0.8s steps(2) infinite;
1673
- }
1674
-
1675
- @keyframes blink-cursor {
1676
- 0% { opacity: 1; }
1677
- 50% { opacity: 0; }
1678
- }
1679
-
1680
- /* ── Sidebar change-dir button ── */
1681
- .sidebar-workdir-header {
1682
- display: flex;
1683
- align-items: center;
1684
- justify-content: space-between;
1685
- }
1686
-
1687
- .sidebar-change-dir-btn {
1688
- display: flex;
1689
- align-items: center;
1690
- justify-content: center;
1691
- width: 22px;
1692
- height: 22px;
1693
- background: none;
1694
- border: 1px solid var(--border);
1695
- border-radius: 4px;
1696
- color: var(--text-secondary);
1697
- cursor: pointer;
1698
- transition: color 0.15s, background 0.15s;
1699
- }
1700
-
1701
- .sidebar-change-dir-btn:hover {
1702
- color: var(--text-primary);
1703
- background: var(--bg-tertiary);
1704
- }
1705
-
1706
- .sidebar-change-dir-btn:disabled {
1707
- opacity: 0.4;
1708
- cursor: not-allowed;
1709
- }
1710
-
1711
- /* ── Folder Picker Modal ── */
1712
- .folder-picker-overlay {
1713
- position: fixed;
1714
- top: 0; left: 0; right: 0; bottom: 0;
1715
- background: rgba(0, 0, 0, 0.5);
1716
- z-index: 1000;
1717
- display: flex;
1718
- align-items: center;
1719
- justify-content: center;
1720
- }
1721
-
1722
- .folder-picker-dialog {
1723
- width: 440px;
1724
- height: 520px;
1725
- background: var(--bg-secondary);
1726
- border: 1px solid var(--border);
1727
- border-radius: 12px;
1728
- display: flex;
1729
- flex-direction: column;
1730
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
1731
- }
1732
-
1733
- .folder-picker-header {
1734
- display: flex;
1735
- justify-content: space-between;
1736
- align-items: center;
1737
- padding: 12px 16px;
1738
- font-size: 0.95rem;
1739
- font-weight: 600;
1740
- border-bottom: 1px solid var(--border);
1741
- }
1742
-
1743
- .folder-picker-close {
1744
- background: none;
1745
- border: none;
1746
- color: var(--text-secondary);
1747
- font-size: 1.2rem;
1748
- cursor: pointer;
1749
- padding: 0 4px;
1750
- line-height: 1;
1751
- }
1752
-
1753
- .folder-picker-close:hover {
1754
- color: var(--text-primary);
1755
- }
1756
-
1757
- .folder-picker-nav {
1758
- display: flex;
1759
- align-items: center;
1760
- gap: 8px;
1761
- padding: 8px 16px;
1762
- font-size: 0.78rem;
1763
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
1764
- color: var(--text-secondary);
1765
- border-bottom: 1px solid var(--border);
1766
- }
1767
-
1768
- .folder-picker-up {
1769
- display: flex;
1770
- align-items: center;
1771
- justify-content: center;
1772
- width: 24px;
1773
- height: 24px;
1774
- background: none;
1775
- border: 1px solid var(--border);
1776
- border-radius: 4px;
1777
- color: var(--text-secondary);
1778
- cursor: pointer;
1779
- flex-shrink: 0;
1780
- transition: color 0.15s, background 0.15s;
1781
- }
1782
-
1783
- .folder-picker-up:hover {
1784
- color: var(--text-primary);
1785
- background: var(--bg-tertiary);
1786
- }
1787
-
1788
- .folder-picker-up:disabled {
1789
- opacity: 0.3;
1790
- cursor: not-allowed;
1791
- }
1792
-
1793
- .folder-picker-current {
1794
- overflow: hidden;
1795
- text-overflow: ellipsis;
1796
- white-space: nowrap;
1797
- flex: 1;
1798
- }
1799
-
1800
- .folder-picker-path-input {
1801
- flex: 1;
1802
- background: var(--bg-primary);
1803
- color: var(--text-primary);
1804
- border: 1px solid var(--border);
1805
- border-radius: 4px;
1806
- padding: 4px 8px;
1807
- font-size: 0.85rem;
1808
- font-family: monospace;
1809
- outline: none;
1810
- }
1811
-
1812
- .folder-picker-path-input:focus {
1813
- border-color: var(--accent);
1814
- }
1815
-
1816
- .folder-picker-list {
1817
- flex: 1;
1818
- overflow-y: auto;
1819
- min-height: 200px;
1820
- max-height: 350px;
1821
- padding: 4px 0;
1822
- }
1823
-
1824
- .folder-picker-loading {
1825
- display: flex;
1826
- align-items: center;
1827
- gap: 8px;
1828
- padding: 16px;
1829
- color: var(--text-secondary);
1830
- font-size: 0.82rem;
1831
- }
1832
-
1833
- .folder-picker-item {
1834
- display: flex;
1835
- align-items: center;
1836
- gap: 8px;
1837
- padding: 6px 16px;
1838
- font-size: 0.85rem;
1839
- cursor: pointer;
1840
- color: var(--text-primary);
1841
- transition: background 0.1s;
1842
- user-select: none;
1843
- }
1844
-
1845
- .folder-picker-item:hover {
1846
- background: var(--bg-tertiary);
1847
- }
1848
-
1849
- .folder-picker-item svg {
1850
- flex-shrink: 0;
1851
- color: var(--text-secondary);
1852
- }
1853
-
1854
- .folder-picker-selected {
1855
- background: var(--accent) !important;
1856
- color: #fff !important;
1857
- }
1858
-
1859
- .folder-picker-selected svg {
1860
- color: #fff !important;
1861
- }
1862
-
1863
- .folder-picker-empty {
1864
- text-align: center;
1865
- padding: 2rem;
1866
- color: var(--text-secondary);
1867
- font-size: 0.82rem;
1868
- }
1869
-
1870
- .folder-picker-footer {
1871
- padding: 10px 16px;
1872
- display: flex;
1873
- justify-content: flex-end;
1874
- gap: 8px;
1875
- border-top: 1px solid var(--border);
1876
- }
1877
-
1878
- .folder-picker-cancel {
1879
- padding: 6px 16px;
1880
- background: none;
1881
- color: var(--text-secondary);
1882
- border: 1px solid var(--border);
1883
- border-radius: 8px;
1884
- font-size: 0.85rem;
1885
- cursor: pointer;
1886
- transition: color 0.15s, background 0.15s;
1887
- }
1888
-
1889
- .folder-picker-cancel:hover {
1890
- color: var(--text-primary);
1891
- background: var(--bg-tertiary);
1892
- }
1893
-
1894
- .folder-picker-confirm {
1895
- padding: 6px 20px;
1896
- background: var(--accent);
1897
- color: #fff;
1898
- border: none;
1899
- border-radius: 8px;
1900
- font-size: 0.85rem;
1901
- font-weight: 600;
1902
- cursor: pointer;
1903
- transition: background 0.15s;
1904
- }
1905
-
1906
- .folder-picker-confirm:hover {
1907
- background: var(--accent-hover);
1908
- }
1909
-
1910
- .folder-picker-confirm:disabled {
1911
- opacity: 0.4;
1912
- cursor: not-allowed;
1913
- }
1914
-
1915
- /* ── File Upload: Attachment Bar ── */
1916
- .attachment-bar {
1917
- display: flex;
1918
- flex-wrap: wrap;
1919
- gap: 6px;
1920
- padding: 6px 8px;
1921
- border-top: 1px solid var(--border);
1922
- }
1923
-
1924
- .attachment-chip {
1925
- display: flex;
1926
- align-items: center;
1927
- gap: 6px;
1928
- background: var(--bg-tertiary);
1929
- border: 1px solid var(--border);
1930
- border-radius: 8px;
1931
- padding: 4px 8px;
1932
- font-size: 0.78rem;
1933
- color: var(--text-primary);
1934
- max-width: 220px;
1935
- }
1936
-
1937
- .attachment-thumb {
1938
- width: 28px;
1939
- height: 28px;
1940
- object-fit: cover;
1941
- border-radius: 4px;
1942
- flex-shrink: 0;
1943
- }
1944
-
1945
- .attachment-file-icon {
1946
- display: flex;
1947
- align-items: center;
1948
- justify-content: center;
1949
- width: 28px;
1950
- height: 28px;
1951
- background: var(--bg-secondary);
1952
- border-radius: 4px;
1953
- flex-shrink: 0;
1954
- color: var(--text-secondary);
1955
- }
1956
-
1957
- .attachment-info {
1958
- overflow: hidden;
1959
- min-width: 0;
1960
- }
1961
-
1962
- .attachment-name {
1963
- overflow: hidden;
1964
- text-overflow: ellipsis;
1965
- white-space: nowrap;
1966
- font-weight: 500;
1967
- }
1968
-
1969
- .attachment-size {
1970
- color: var(--text-secondary);
1971
- font-size: 0.7rem;
1972
- }
1973
-
1974
- .attachment-remove {
1975
- background: none;
1976
- border: none;
1977
- color: var(--text-secondary);
1978
- cursor: pointer;
1979
- padding: 0 2px;
1980
- font-size: 1rem;
1981
- line-height: 1;
1982
- flex-shrink: 0;
1983
- transition: color 0.15s;
1984
- }
1985
-
1986
- .attachment-remove:hover {
1987
- color: var(--error);
1988
- }
1989
-
1990
- /* ── Paperclip attach button ── */
1991
- .attach-btn {
1992
- background: none;
1993
- border: none;
1994
- color: var(--text-secondary);
1995
- cursor: pointer;
1996
- display: flex;
1997
- align-items: center;
1998
- justify-content: center;
1999
- width: 32px;
2000
- height: 32px;
2001
- border-radius: 8px;
2002
- transition: color 0.15s, background 0.15s;
2003
- }
2004
-
2005
- .attach-btn:hover {
2006
- color: var(--text-primary);
2007
- background: var(--bg-tertiary);
2008
- }
2009
-
2010
- .attach-btn:disabled {
2011
- opacity: 0.3;
2012
- cursor: not-allowed;
2013
- }
2014
-
2015
- /* ── Drag-over highlight on input card ── */
2016
- .input-card.drag-over {
2017
- border-color: var(--accent);
2018
- box-shadow: 0 0 0 2px var(--accent), 0 2px 12px rgba(99, 102, 241, 0.15);
2019
- }
2020
-
2021
- /* ── Attachments displayed in sent messages ── */
2022
- .message-attachments {
2023
- display: flex;
2024
- flex-wrap: wrap;
2025
- gap: 6px;
2026
- margin-top: 6px;
2027
- }
2028
-
2029
- .message-attachment-chip {
2030
- display: flex;
2031
- align-items: center;
2032
- gap: 4px;
2033
- background: var(--bg-secondary);
2034
- border: 1px solid var(--border);
2035
- border-radius: 6px;
2036
- padding: 3px 8px;
2037
- font-size: 0.75rem;
2038
- color: var(--text-secondary);
2039
- }
2040
-
2041
- .message-attachment-thumb {
2042
- width: 20px;
2043
- height: 20px;
2044
- object-fit: cover;
2045
- border-radius: 3px;
2046
- }
2047
-
2048
- .message-attachment-file-icon {
2049
- display: flex;
2050
- align-items: center;
2051
- color: var(--text-secondary);
2052
- }
2053
-
2054
- /* ── Sidebar backdrop (mobile overlay) ── */
2055
- .sidebar-backdrop {
2056
- display: none;
2057
- }
2058
-
2059
- /* ══════════════════════════════════════════
2060
- Mobile responsive — max-width: 768px
2061
- ══════════════════════════════════════════ */
2062
- @media (max-width: 768px) {
2063
- /* Prevent page-level horizontal scroll */
2064
- html, body {
2065
- overflow-x: hidden;
2066
- }
2067
-
2068
- .layout, .main-body, .chat-area {
2069
- overflow-x: hidden;
2070
- max-width: 100vw;
2071
- }
2072
-
2073
- /* Sidebar as fixed overlay */
2074
- .sidebar {
2075
- position: fixed;
2076
- top: 0;
2077
- left: 0;
2078
- bottom: 0;
2079
- width: 280px;
2080
- max-width: 85vw;
2081
- z-index: 100;
2082
- box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
2083
- }
2084
-
2085
- .sidebar-backdrop {
2086
- display: block;
2087
- position: fixed;
2088
- inset: 0;
2089
- background: rgba(0, 0, 0, 0.4);
2090
- z-index: 99;
2091
- }
2092
-
2093
- /* Top bar */
2094
- .top-bar {
2095
- padding: 0 0.75rem;
2096
- }
2097
-
2098
- .agent-label {
2099
- display: none;
2100
- }
2101
-
2102
- /* Message area */
2103
- .message-list {
2104
- padding: 0.75rem 0.75rem 0.5rem;
2105
- }
2106
-
2107
- .message-list-inner {
2108
- max-width: 100%;
2109
- min-width: 0;
2110
- }
2111
-
2112
- /* Constrain message rows and bubbles */
2113
- .message-row {
2114
- min-width: 0;
2115
- max-width: 100%;
2116
- }
2117
-
2118
- .message-bubble {
2119
- min-width: 0;
2120
- max-width: 100%;
2121
- overflow: hidden;
2122
- overflow-wrap: anywhere;
2123
- word-break: break-word;
2124
- }
2125
-
2126
- /* Message content: contain all overflow within the bubble */
2127
- .message-content {
2128
- min-width: 0;
2129
- max-width: 100%;
2130
- overflow-wrap: anywhere;
2131
- word-break: break-word;
2132
- }
2133
-
2134
- .message-content pre {
2135
- max-width: 100%;
2136
- overflow-x: auto;
2137
- }
2138
-
2139
- /* Code block wrappers */
2140
- .code-block-wrapper {
2141
- max-width: 100%;
2142
- }
2143
-
2144
- .code-block-wrapper pre {
2145
- max-width: 100%;
2146
- overflow-x: auto;
2147
- }
2148
-
2149
- .markdown-body code {
2150
- word-break: break-all;
2151
- }
2152
-
2153
- .markdown-body pre {
2154
- max-width: 100%;
2155
- }
2156
-
2157
- .markdown-body table {
2158
- display: block;
2159
- max-width: 100%;
2160
- overflow-x: auto;
2161
- }
2162
-
2163
- /* Input area */
2164
- .input-area {
2165
- padding: 0 0.75rem 0.75rem;
2166
- }
2167
-
2168
- .input-card {
2169
- max-width: 100%;
2170
- }
2171
-
2172
- /* Folder picker */
2173
- .folder-picker-dialog {
2174
- width: calc(100vw - 2rem);
2175
- max-width: 440px;
2176
- }
2177
-
2178
- /* Status card */
2179
- .status-card {
2180
- min-width: 0;
2181
- width: 100%;
2182
- max-width: 320px;
2183
- }
2184
-
2185
- /* Tool blocks */
2186
- .tool-expand {
2187
- margin-left: 0;
2188
- min-width: 0;
2189
- max-width: 100%;
2190
- overflow: hidden;
2191
- }
2192
-
2193
- .tool-block {
2194
- max-width: 100%;
2195
- overflow-x: auto;
2196
- }
2197
-
2198
- .tool-output-content pre {
2199
- font-size: 0.8rem;
2200
- max-width: 100%;
2201
- }
2202
-
2203
- .tool-input-formatted {
2204
- max-width: 100%;
2205
- overflow-wrap: anywhere;
2206
- }
2207
-
2208
- /* AskUserQuestion — larger tap targets */
2209
- .ask-question-option {
2210
- min-height: 44px;
2211
- }
2212
- }
2213
-
2214
- /* ══════════════════════════════════════════
2215
- Extra-small screens — max-width: 480px
2216
- ══════════════════════════════════════════ */
2217
- @media (max-width: 480px) {
2218
- .message-list {
2219
- padding: 0.5rem 0.5rem 0.5rem;
2220
- }
2221
-
2222
- .input-area {
2223
- padding: 0 0.5rem 0.5rem;
2224
- }
2225
-
2226
- .top-bar {
2227
- padding: 0 0.5rem;
2228
- }
2229
-
2230
- .folder-picker-dialog {
2231
- width: calc(100vw - 1rem);
2232
- }
2233
- }
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ margin: 0;
6
+ padding: 0;
7
+ }
8
+
9
+ /* Keyboard focus outlines (visible only for keyboard navigation) */
10
+ :focus-visible {
11
+ outline: 2px solid var(--accent);
12
+ outline-offset: 2px;
13
+ }
14
+
15
+ :focus:not(:focus-visible) {
16
+ outline: none;
17
+ }
18
+
19
+ :root {
20
+ --bg-primary: #0f172a;
21
+ --bg-secondary: #1e293b;
22
+ --bg-tertiary: #334155;
23
+ --text-primary: #f1f5f9;
24
+ --text-secondary: #94a3b8;
25
+ --accent: #2563eb;
26
+ --accent-hover: #1d4ed8;
27
+ --success: #22c55e;
28
+ --warning: #f59e0b;
29
+ --error: #ef4444;
30
+ --border: #475569;
31
+ --code-bg: #1a1a2e;
32
+ --code-header-bg: #16162a;
33
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
34
+ }
35
+
36
+ /* ── Light theme ── */
37
+ [data-theme="light"] {
38
+ --bg-primary: #fefcf8;
39
+ --bg-secondary: #f5f3ef;
40
+ --bg-tertiary: #e8e6e1;
41
+ --text-primary: #1a1a1a;
42
+ --text-secondary: #4b5563;
43
+ --accent: #2563eb;
44
+ --accent-hover: #1d4ed8;
45
+ --success: #16a34a;
46
+ --warning: #d97706;
47
+ --error: #dc2626;
48
+ --border: #d1d5db;
49
+ --code-bg: #f1f3f5;
50
+ --code-header-bg: #e9ecef;
51
+ }
52
+
53
+ body {
54
+ background-color: var(--bg-primary);
55
+ color: var(--text-primary);
56
+ min-height: 100vh;
57
+ min-height: 100dvh;
58
+ overscroll-behavior: none;
59
+ }
60
+
61
+ #app {
62
+ position: fixed;
63
+ inset: 0;
64
+ }
65
+
66
+ /* ── Layout ── */
67
+ .layout {
68
+ display: flex;
69
+ flex-direction: column;
70
+ height: 100%;
71
+ }
72
+
73
+ .top-bar {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: space-between;
77
+ padding: 0.5rem 1rem;
78
+ background: var(--bg-secondary);
79
+ border-bottom: 1px solid var(--border);
80
+ flex-shrink: 0;
81
+ }
82
+
83
+ .top-bar-left {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 0.5rem;
87
+ }
88
+
89
+ .sidebar-toggle {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ width: 30px;
94
+ height: 30px;
95
+ background: none;
96
+ border: none;
97
+ border-radius: 4px;
98
+ color: var(--text-secondary);
99
+ cursor: pointer;
100
+ transition: color 0.15s, background 0.15s;
101
+ }
102
+
103
+ .sidebar-toggle:hover {
104
+ color: var(--text-primary);
105
+ background: var(--bg-tertiary);
106
+ }
107
+
108
+ .top-bar h1 {
109
+ font-size: 1.1rem;
110
+ font-weight: 700;
111
+ }
112
+
113
+ .top-bar-info {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: 0.75rem;
117
+ }
118
+
119
+ .agent-label {
120
+ color: var(--text-secondary);
121
+ font-size: 0.85rem;
122
+ }
123
+
124
+ .theme-toggle {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ width: 32px;
129
+ height: 32px;
130
+ background: none;
131
+ border: 1px solid var(--border);
132
+ border-radius: 8px;
133
+ color: var(--text-secondary);
134
+ cursor: pointer;
135
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
136
+ }
137
+
138
+ .theme-toggle:hover {
139
+ color: var(--text-primary);
140
+ background: var(--bg-tertiary);
141
+ border-color: var(--text-secondary);
142
+ }
143
+
144
+ /* ── Center card (no session / waiting) ── */
145
+ .center-card {
146
+ flex: 1;
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ padding: 2rem;
151
+ }
152
+
153
+ .status-card {
154
+ background: var(--bg-secondary);
155
+ border: 1px solid var(--border);
156
+ border-radius: 12px;
157
+ padding: 1.5rem 2rem;
158
+ min-width: 320px;
159
+ text-align: center;
160
+ }
161
+
162
+ .status-card .status {
163
+ font-size: 1.1rem;
164
+ margin-bottom: 0.75rem;
165
+ }
166
+
167
+ .status-card .info {
168
+ margin-bottom: 0.5rem;
169
+ font-size: 0.95rem;
170
+ }
171
+
172
+ .status-card .label {
173
+ color: var(--text-secondary);
174
+ }
175
+
176
+ /* ── Badges ── */
177
+ .muted {
178
+ color: var(--text-secondary);
179
+ font-size: 0.85rem;
180
+ }
181
+
182
+ .badge {
183
+ padding: 2px 8px;
184
+ border-radius: 4px;
185
+ font-weight: 600;
186
+ font-size: 0.9rem;
187
+ }
188
+
189
+ .badge.connected {
190
+ color: var(--success);
191
+ background: rgba(34, 197, 94, 0.1);
192
+ }
193
+
194
+ .badge.disconnected {
195
+ color: var(--error);
196
+ background: rgba(239, 68, 68, 0.1);
197
+ }
198
+
199
+ .badge.connecting\.\.\. {
200
+ color: var(--warning);
201
+ background: rgba(245, 158, 11, 0.1);
202
+ }
203
+
204
+ .badge.reconnecting\.\.\. {
205
+ color: var(--warning);
206
+ background: rgba(245, 158, 11, 0.1);
207
+ }
208
+
209
+ .badge.waiting {
210
+ color: var(--warning);
211
+ background: rgba(245, 158, 11, 0.1);
212
+ }
213
+
214
+ .badge.error,
215
+ .badge.no\ session {
216
+ color: var(--error);
217
+ background: rgba(239, 68, 68, 0.1);
218
+ }
219
+
220
+ .error-msg {
221
+ color: var(--error);
222
+ font-size: 0.85rem;
223
+ margin-top: 0.75rem;
224
+ }
225
+
226
+ /* ── Main body (sidebar + chat) ── */
227
+ .main-body {
228
+ flex: 1;
229
+ display: flex;
230
+ min-height: 0;
231
+ }
232
+
233
+ /* ── Sidebar ── */
234
+ .sidebar {
235
+ width: 260px;
236
+ flex-shrink: 0;
237
+ background: var(--bg-secondary);
238
+ border-right: 1px solid var(--border);
239
+ display: flex;
240
+ flex-direction: column;
241
+ overflow: hidden;
242
+ }
243
+
244
+ .sidebar-section {
245
+ padding: 0.75rem;
246
+ border-bottom: 1px solid var(--border);
247
+ }
248
+
249
+ .sidebar-workdir {
250
+ overflow: hidden;
251
+ }
252
+
253
+ .sidebar-hostname {
254
+ display: flex;
255
+ align-items: center;
256
+ gap: 6px;
257
+ font-size: 0.85rem;
258
+ font-weight: 500;
259
+ color: var(--text-primary);
260
+ margin-bottom: 10px;
261
+ padding-bottom: 10px;
262
+ border-bottom: 1px solid var(--border);
263
+ }
264
+
265
+ .sidebar-hostname-icon {
266
+ flex-shrink: 0;
267
+ opacity: 0.6;
268
+ }
269
+
270
+ .sidebar-workdir-label {
271
+ font-size: 0.7rem;
272
+ text-transform: uppercase;
273
+ letter-spacing: 0.05em;
274
+ color: var(--text-secondary);
275
+ margin-bottom: 4px;
276
+ }
277
+
278
+ .sidebar-workdir-path {
279
+ font-size: 0.8rem;
280
+ color: var(--text-primary);
281
+ font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
282
+ word-break: break-all;
283
+ line-height: 1.3;
284
+ }
285
+
286
+ /* ── Working Directory History ── */
287
+ .workdir-history {
288
+ margin-top: 10px;
289
+ padding-top: 10px;
290
+ border-top: 1px solid var(--border);
291
+ }
292
+ .workdir-history-label {
293
+ font-size: 0.65rem;
294
+ text-transform: uppercase;
295
+ letter-spacing: 0.05em;
296
+ color: var(--text-secondary);
297
+ margin-bottom: 6px;
298
+ opacity: 0.7;
299
+ }
300
+ .workdir-history-list {
301
+ display: flex;
302
+ flex-direction: column;
303
+ gap: 2px;
304
+ }
305
+ .workdir-history-item {
306
+ display: flex;
307
+ align-items: center;
308
+ gap: 6px;
309
+ padding: 4px 6px;
310
+ border-radius: 4px;
311
+ cursor: pointer;
312
+ transition: background 0.15s;
313
+ }
314
+ .workdir-history-item:hover {
315
+ background: var(--bg-tertiary);
316
+ }
317
+ .workdir-history-path {
318
+ font-size: 0.72rem;
319
+ color: var(--text-secondary);
320
+ font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
321
+ overflow: hidden;
322
+ text-overflow: ellipsis;
323
+ white-space: nowrap;
324
+ flex: 1;
325
+ min-width: 0;
326
+ }
327
+ .workdir-history-item:hover .workdir-history-path {
328
+ color: var(--text-primary);
329
+ }
330
+ .workdir-history-delete {
331
+ display: none;
332
+ align-items: center;
333
+ justify-content: center;
334
+ width: 18px;
335
+ height: 18px;
336
+ background: none;
337
+ border: none;
338
+ border-radius: 3px;
339
+ color: var(--text-secondary);
340
+ cursor: pointer;
341
+ padding: 0;
342
+ flex-shrink: 0;
343
+ transition: color 0.15s, background 0.15s;
344
+ }
345
+ .workdir-history-item:hover .workdir-history-delete {
346
+ display: flex;
347
+ }
348
+ .workdir-history-delete:hover {
349
+ color: var(--error);
350
+ background: rgba(239, 68, 68, 0.1);
351
+ }
352
+
353
+ .sidebar-sessions {
354
+ flex: 1;
355
+ display: flex;
356
+ flex-direction: column;
357
+ overflow: hidden;
358
+ }
359
+
360
+ .sidebar-version-footer {
361
+ padding: 6px 12px;
362
+ font-size: 0.65rem;
363
+ color: var(--text-secondary);
364
+ opacity: 0.5;
365
+ text-align: center;
366
+ border-top: 1px solid var(--border);
367
+ flex-shrink: 0;
368
+ }
369
+
370
+ .sidebar-version-sep {
371
+ margin: 0 3px;
372
+ }
373
+
374
+ .sidebar-section-header {
375
+ display: flex;
376
+ align-items: center;
377
+ justify-content: space-between;
378
+ font-size: 0.75rem;
379
+ text-transform: uppercase;
380
+ letter-spacing: 0.05em;
381
+ color: var(--text-secondary);
382
+ margin-bottom: 8px;
383
+ }
384
+
385
+ .sidebar-refresh-btn {
386
+ display: flex;
387
+ align-items: center;
388
+ justify-content: center;
389
+ width: 24px;
390
+ height: 24px;
391
+ background: none;
392
+ border: none;
393
+ border-radius: 4px;
394
+ color: var(--text-secondary);
395
+ cursor: pointer;
396
+ transition: color 0.15s;
397
+ }
398
+
399
+ .sidebar-refresh-btn:hover {
400
+ color: var(--text-primary);
401
+ }
402
+
403
+ .sidebar-refresh-btn:disabled {
404
+ opacity: 0.4;
405
+ cursor: not-allowed;
406
+ }
407
+
408
+ @keyframes spin {
409
+ from { transform: rotate(0deg); }
410
+ to { transform: rotate(360deg); }
411
+ }
412
+
413
+ .spinning {
414
+ animation: spin 0.8s linear infinite;
415
+ }
416
+
417
+ .new-conversation-btn {
418
+ display: flex;
419
+ align-items: center;
420
+ gap: 6px;
421
+ width: 100%;
422
+ padding: 6px 8px;
423
+ background: none;
424
+ border: 1px dashed var(--border);
425
+ border-radius: 6px;
426
+ color: var(--text-secondary);
427
+ font-size: 0.82rem;
428
+ cursor: pointer;
429
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
430
+ margin-bottom: 8px;
431
+ }
432
+
433
+ .new-conversation-btn:hover {
434
+ color: var(--text-primary);
435
+ border-color: var(--text-secondary);
436
+ background: var(--bg-tertiary);
437
+ }
438
+
439
+ .new-conversation-btn:disabled {
440
+ opacity: 0.4;
441
+ cursor: not-allowed;
442
+ }
443
+
444
+ .sidebar-loading,
445
+ .sidebar-empty {
446
+ font-size: 0.8rem;
447
+ color: var(--text-secondary);
448
+ text-align: center;
449
+ padding: 1rem 0;
450
+ }
451
+
452
+ .session-list {
453
+ flex: 1;
454
+ overflow-y: auto;
455
+ display: flex;
456
+ flex-direction: column;
457
+ gap: 2px;
458
+ }
459
+
460
+ .session-group {
461
+ margin-bottom: 0.5rem;
462
+ }
463
+
464
+ .session-group-label {
465
+ font-size: 0.68rem;
466
+ font-weight: 600;
467
+ text-transform: uppercase;
468
+ letter-spacing: 0.04em;
469
+ color: var(--text-secondary);
470
+ padding: 0.4rem 8px 0.2rem;
471
+ opacity: 0.7;
472
+ }
473
+
474
+ .session-item {
475
+ padding: 8px 10px;
476
+ border-radius: 8px;
477
+ cursor: pointer;
478
+ transition: background 0.15s, transform 0.1s;
479
+ border-left: 3px solid transparent;
480
+ }
481
+
482
+ .session-item:hover {
483
+ background: var(--bg-tertiary);
484
+ }
485
+
486
+ .session-item:active {
487
+ transform: scale(0.98);
488
+ }
489
+
490
+ .session-item.active {
491
+ background: var(--bg-tertiary);
492
+ border-left-color: var(--accent);
493
+ }
494
+
495
+ .session-title {
496
+ font-size: 0.82rem;
497
+ color: var(--text-primary);
498
+ overflow: hidden;
499
+ text-overflow: ellipsis;
500
+ white-space: nowrap;
501
+ line-height: 1.3;
502
+ }
503
+
504
+ .session-meta {
505
+ font-size: 0.7rem;
506
+ color: var(--text-secondary);
507
+ margin-top: 2px;
508
+ display: flex;
509
+ align-items: center;
510
+ justify-content: space-between;
511
+ }
512
+
513
+ .session-delete-btn {
514
+ display: none;
515
+ align-items: center;
516
+ justify-content: center;
517
+ width: 20px;
518
+ height: 20px;
519
+ background: none;
520
+ border: none;
521
+ border-radius: 4px;
522
+ color: var(--text-secondary);
523
+ cursor: pointer;
524
+ padding: 0;
525
+ transition: color 0.15s, background 0.15s;
526
+ }
527
+
528
+ .session-item:hover .session-delete-btn {
529
+ display: flex;
530
+ }
531
+
532
+ .session-delete-btn:hover {
533
+ color: var(--error);
534
+ background: rgba(239, 68, 68, 0.1);
535
+ }
536
+
537
+ /* ── Delete confirmation dialog ── */
538
+ .delete-confirm-dialog {
539
+ width: 360px;
540
+ background: var(--bg-secondary);
541
+ border: 1px solid var(--border);
542
+ border-radius: 12px;
543
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
544
+ }
545
+
546
+ .delete-confirm-header {
547
+ padding: 12px 16px;
548
+ font-size: 0.95rem;
549
+ font-weight: 600;
550
+ border-bottom: 1px solid var(--border);
551
+ }
552
+
553
+ .delete-confirm-body {
554
+ padding: 16px;
555
+ font-size: 0.88rem;
556
+ line-height: 1.5;
557
+ }
558
+
559
+ .delete-confirm-body p {
560
+ margin-bottom: 6px;
561
+ }
562
+
563
+ .delete-confirm-title {
564
+ font-weight: 500;
565
+ color: var(--text-primary);
566
+ overflow: hidden;
567
+ text-overflow: ellipsis;
568
+ white-space: nowrap;
569
+ padding: 6px 10px;
570
+ background: var(--bg-tertiary);
571
+ border-radius: 6px;
572
+ }
573
+
574
+ .delete-confirm-warning {
575
+ font-size: 0.78rem;
576
+ color: var(--text-secondary);
577
+ margin-top: 4px;
578
+ }
579
+
580
+ .delete-confirm-footer {
581
+ padding: 10px 16px;
582
+ display: flex;
583
+ justify-content: flex-end;
584
+ gap: 8px;
585
+ border-top: 1px solid var(--border);
586
+ }
587
+
588
+ .delete-confirm-btn {
589
+ padding: 6px 20px;
590
+ background: var(--error);
591
+ color: #fff;
592
+ border: none;
593
+ border-radius: 8px;
594
+ font-size: 0.85rem;
595
+ font-weight: 600;
596
+ cursor: pointer;
597
+ transition: background 0.15s;
598
+ }
599
+
600
+ .delete-confirm-btn:hover {
601
+ background: #dc2626;
602
+ }
603
+
604
+ /* ── Auth Dialog ── */
605
+ .auth-dialog {
606
+ background: var(--bg-secondary);
607
+ border: 1px solid var(--border);
608
+ border-radius: 12px;
609
+ width: 360px;
610
+ max-width: 90vw;
611
+ box-shadow: 0 8px 32px rgba(0,0,0,0.3);
612
+ }
613
+
614
+ .auth-dialog-header {
615
+ display: flex;
616
+ align-items: center;
617
+ gap: 10px;
618
+ padding: 20px 24px 16px;
619
+ font-size: 1rem;
620
+ font-weight: 600;
621
+ color: var(--text-primary);
622
+ }
623
+
624
+ .auth-dialog-header svg {
625
+ color: var(--accent);
626
+ }
627
+
628
+ .auth-dialog-locked .auth-dialog-header svg {
629
+ color: var(--error);
630
+ }
631
+
632
+ .auth-dialog-body {
633
+ padding: 0 24px 16px;
634
+ }
635
+
636
+ .auth-dialog-body p {
637
+ margin: 0 0 12px 0;
638
+ color: var(--text-secondary);
639
+ font-size: 0.85rem;
640
+ }
641
+
642
+ .auth-password-input {
643
+ width: 100%;
644
+ padding: 10px 12px;
645
+ background: var(--bg-tertiary);
646
+ border: 1px solid var(--border);
647
+ border-radius: 8px;
648
+ color: var(--text-primary);
649
+ font-size: 0.9rem;
650
+ outline: none;
651
+ box-sizing: border-box;
652
+ margin-bottom: 4px;
653
+ }
654
+
655
+ .auth-password-input:focus {
656
+ border-color: var(--accent);
657
+ }
658
+
659
+ .auth-error {
660
+ color: var(--error) !important;
661
+ font-size: 0.82rem !important;
662
+ margin-top: 8px !important;
663
+ }
664
+
665
+ .auth-attempts {
666
+ color: var(--text-secondary) !important;
667
+ font-size: 0.78rem !important;
668
+ }
669
+
670
+ .auth-locked-hint {
671
+ font-size: 0.78rem !important;
672
+ color: var(--text-secondary) !important;
673
+ }
674
+
675
+ .auth-dialog-footer {
676
+ padding: 12px 24px 20px;
677
+ display: flex;
678
+ justify-content: flex-end;
679
+ }
680
+
681
+ .auth-submit-btn {
682
+ background: var(--accent);
683
+ color: #fff;
684
+ border: none;
685
+ padding: 8px 24px;
686
+ border-radius: 8px;
687
+ font-size: 0.85rem;
688
+ font-weight: 600;
689
+ cursor: pointer;
690
+ transition: background 0.15s;
691
+ }
692
+
693
+ .auth-submit-btn:hover:not(:disabled) {
694
+ background: var(--accent-hover);
695
+ }
696
+
697
+ .auth-submit-btn:disabled {
698
+ opacity: 0.4;
699
+ cursor: not-allowed;
700
+ }
701
+
702
+ /* ── Chat area (message list + input) ── */
703
+ .chat-area {
704
+ flex: 1;
705
+ display: flex;
706
+ flex-direction: column;
707
+ min-height: 0;
708
+ }
709
+
710
+ /* ── Message list ── */
711
+ .message-list {
712
+ flex: 1;
713
+ overflow-y: auto;
714
+ padding: 1.5rem 1.5rem 1rem;
715
+ display: flex;
716
+ flex-direction: column;
717
+ gap: 0.25rem;
718
+ }
719
+
720
+ .message-list-inner {
721
+ max-width: 768px;
722
+ width: 100%;
723
+ margin: 0 auto;
724
+ display: flex;
725
+ flex-direction: column;
726
+ gap: 0.25rem;
727
+ }
728
+
729
+ .empty-state {
730
+ flex: 1;
731
+ display: flex;
732
+ flex-direction: column;
733
+ align-items: center;
734
+ justify-content: center;
735
+ gap: 0.5rem;
736
+ color: var(--text-secondary);
737
+ }
738
+
739
+ .empty-state-icon {
740
+ font-size: 2.5rem;
741
+ opacity: 0.5;
742
+ margin-bottom: 0.5rem;
743
+ }
744
+
745
+ .empty-state strong {
746
+ color: var(--text-primary);
747
+ }
748
+
749
+ /* ── Messages ── */
750
+ .message {
751
+ display: flex;
752
+ flex-direction: column;
753
+ }
754
+
755
+ .message-user {
756
+ margin-top: 1.25rem;
757
+ }
758
+
759
+ .message-role-label {
760
+ font-size: 0.75rem;
761
+ font-weight: 600;
762
+ text-transform: uppercase;
763
+ letter-spacing: 0.03em;
764
+ margin-bottom: 0.3rem;
765
+ padding-left: 0.1rem;
766
+ }
767
+
768
+ .message-role-label.user-label {
769
+ color: var(--text-secondary);
770
+ }
771
+
772
+ .message-role-label.assistant-label {
773
+ color: var(--accent);
774
+ }
775
+
776
+ .message-bubble {
777
+ padding: 0.6rem 0.9rem;
778
+ border-radius: 10px;
779
+ font-size: 0.94rem;
780
+ line-height: 1.6;
781
+ word-wrap: break-word;
782
+ position: relative;
783
+ }
784
+
785
+ .user-bubble {
786
+ background: var(--bg-tertiary);
787
+ color: var(--text-primary);
788
+ }
789
+
790
+ .assistant-bubble {
791
+ background: transparent;
792
+ padding: 0.2rem 0;
793
+ }
794
+
795
+ /* ── Message actions (copy button, shown on hover) ── */
796
+ .message-actions {
797
+ position: absolute;
798
+ top: 0;
799
+ right: 0;
800
+ display: flex;
801
+ gap: 2px;
802
+ opacity: 0;
803
+ transition: opacity 0.15s;
804
+ }
805
+
806
+ .message-bubble:hover .message-actions {
807
+ opacity: 1;
808
+ }
809
+
810
+ .icon-btn {
811
+ display: flex;
812
+ align-items: center;
813
+ justify-content: center;
814
+ width: 26px;
815
+ height: 26px;
816
+ background: var(--bg-tertiary);
817
+ border: 1px solid var(--border);
818
+ border-radius: 4px;
819
+ color: var(--text-secondary);
820
+ cursor: pointer;
821
+ transition: color 0.15s;
822
+ }
823
+
824
+ .icon-btn:hover {
825
+ color: var(--text-primary);
826
+ }
827
+
828
+ /* ── Markdown body in assistant messages ── */
829
+ .markdown-body {
830
+ line-height: 1.6;
831
+ }
832
+
833
+ .markdown-body p {
834
+ margin-bottom: 0.5em;
835
+ }
836
+
837
+ .markdown-body p:last-child {
838
+ margin-bottom: 0;
839
+ }
840
+
841
+ .markdown-body ul, .markdown-body ol {
842
+ padding-left: 1.5em;
843
+ margin-bottom: 0.5em;
844
+ }
845
+
846
+ .markdown-body li {
847
+ margin-bottom: 0.2em;
848
+ }
849
+
850
+ .markdown-body strong {
851
+ font-weight: 600;
852
+ }
853
+
854
+ .markdown-body code {
855
+ background: var(--bg-tertiary);
856
+ padding: 0.15em 0.35em;
857
+ border-radius: 3px;
858
+ font-size: 0.85em;
859
+ font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
860
+ }
861
+
862
+ .markdown-body pre {
863
+ margin: 0.5em 0;
864
+ overflow-x: auto;
865
+ }
866
+
867
+ .markdown-body pre code {
868
+ background: none;
869
+ padding: 0;
870
+ border-radius: 0;
871
+ font-size: 0.85em;
872
+ display: block;
873
+ padding: 0.8em;
874
+ }
875
+
876
+ .markdown-body blockquote {
877
+ border-left: 3px solid var(--border);
878
+ padding-left: 0.8em;
879
+ color: var(--text-secondary);
880
+ margin: 0.5em 0;
881
+ }
882
+
883
+ .markdown-body hr {
884
+ border: none;
885
+ border-top: 1px solid var(--border);
886
+ margin: 0.75em 0;
887
+ }
888
+
889
+ .markdown-body table {
890
+ border-collapse: collapse;
891
+ margin: 0.5em 0;
892
+ font-size: 0.88em;
893
+ }
894
+
895
+ .markdown-body th, .markdown-body td {
896
+ border: 1px solid var(--border);
897
+ padding: 0.4em 0.6em;
898
+ }
899
+
900
+ .markdown-body th {
901
+ background: var(--bg-tertiary);
902
+ }
903
+
904
+ /* ── Code block wrapper (with copy button) ── */
905
+ .code-block-wrapper {
906
+ position: relative;
907
+ margin: 0.5em 0;
908
+ border-radius: 8px;
909
+ overflow: hidden;
910
+ background: var(--code-bg);
911
+ }
912
+
913
+ .code-block-header {
914
+ display: flex;
915
+ justify-content: space-between;
916
+ align-items: center;
917
+ padding: 6px 12px;
918
+ background: var(--code-header-bg);
919
+ }
920
+
921
+ .code-lang {
922
+ font-size: 11px;
923
+ color: var(--text-secondary);
924
+ font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
925
+ }
926
+
927
+ .code-copy-btn {
928
+ display: flex;
929
+ align-items: center;
930
+ padding: 2px 6px;
931
+ border: none;
932
+ border-radius: 3px;
933
+ background: transparent;
934
+ color: var(--text-secondary);
935
+ cursor: pointer;
936
+ transition: color 0.15s;
937
+ }
938
+
939
+ .code-copy-btn:hover {
940
+ color: var(--text-primary);
941
+ }
942
+
943
+ .code-block-wrapper pre {
944
+ margin: 0;
945
+ }
946
+
947
+ .code-block-wrapper pre code {
948
+ padding: 0.8em 1em;
949
+ }
950
+
951
+ /* ── Tool use lines (collapsible, compact, subdued) ── */
952
+ .tool-line-wrapper {
953
+ max-width: 100%;
954
+ padding-left: 0.25rem;
955
+ overflow: hidden;
956
+ }
957
+
958
+ .tool-line {
959
+ display: flex;
960
+ align-items: center;
961
+ gap: 6px;
962
+ padding: 3px 6px;
963
+ border-radius: 4px;
964
+ font-size: 0.8rem;
965
+ cursor: pointer;
966
+ user-select: none;
967
+ transition: background 0.15s;
968
+ color: var(--text-secondary);
969
+ min-width: 0;
970
+ overflow: hidden;
971
+ }
972
+
973
+ .tool-line:hover {
974
+ background: var(--bg-tertiary);
975
+ }
976
+
977
+ .tool-icon {
978
+ flex-shrink: 0;
979
+ display: flex;
980
+ align-items: center;
981
+ color: var(--text-secondary);
982
+ opacity: 0.6;
983
+ }
984
+
985
+ .tool-name {
986
+ font-weight: 500;
987
+ color: var(--text-secondary);
988
+ overflow: hidden;
989
+ text-overflow: ellipsis;
990
+ white-space: nowrap;
991
+ min-width: 0;
992
+ }
993
+
994
+ .tool-summary {
995
+ color: var(--text-secondary);
996
+ overflow: hidden;
997
+ text-overflow: ellipsis;
998
+ white-space: nowrap;
999
+ flex: 1;
1000
+ min-width: 0;
1001
+ }
1002
+
1003
+ .tool-status-icon {
1004
+ color: var(--text-secondary);
1005
+ font-weight: normal;
1006
+ flex-shrink: 0;
1007
+ font-size: 0.75rem;
1008
+ opacity: 0.7;
1009
+ }
1010
+
1011
+ .tool-line.completed .tool-status-icon {
1012
+ color: var(--success);
1013
+ opacity: 0.6;
1014
+ }
1015
+
1016
+ .running-dots {
1017
+ display: inline-flex;
1018
+ gap: 2px;
1019
+ }
1020
+
1021
+ .running-dots span {
1022
+ width: 3px;
1023
+ height: 3px;
1024
+ border-radius: 50%;
1025
+ background: var(--text-secondary);
1026
+ animation: typing 1.2s infinite ease-in-out;
1027
+ }
1028
+
1029
+ .running-dots span:nth-child(2) { animation-delay: 0.2s; }
1030
+ .running-dots span:nth-child(3) { animation-delay: 0.4s; }
1031
+
1032
+ .tool-toggle {
1033
+ color: var(--text-secondary);
1034
+ font-size: 0.6rem;
1035
+ flex-shrink: 0;
1036
+ margin-left: auto;
1037
+ opacity: 0.5;
1038
+ }
1039
+
1040
+ .tool-expand {
1041
+ margin-top: 2px;
1042
+ margin-left: 20px;
1043
+ border-left: 1px solid var(--border);
1044
+ padding-left: 8px;
1045
+ overflow: hidden;
1046
+ animation: toolExpand 0.15s ease-out;
1047
+ }
1048
+
1049
+ @keyframes toolExpand {
1050
+ from { opacity: 0; max-height: 0; }
1051
+ to { opacity: 1; max-height: 500px; }
1052
+ }
1053
+
1054
+ .tool-block {
1055
+ background: var(--bg-secondary);
1056
+ border-radius: 4px;
1057
+ padding: 0.4rem 0.6rem;
1058
+ margin-top: 0.25rem;
1059
+ overflow-x: auto;
1060
+ font-size: 0.75rem;
1061
+ line-height: 1.4;
1062
+ max-height: 200px;
1063
+ overflow-y: auto;
1064
+ white-space: pre-wrap;
1065
+ word-break: break-all;
1066
+ color: var(--text-secondary);
1067
+ }
1068
+
1069
+ .tool-output {
1070
+ border-left: 2px solid var(--success);
1071
+ color: var(--text-primary);
1072
+ }
1073
+
1074
+ /* ── Formatted tool input (Read, Write, Bash, Glob, Grep) ── */
1075
+ .tool-input-formatted {
1076
+ padding: 0.3rem 0.5rem;
1077
+ margin-top: 0.25rem;
1078
+ font-size: 0.75rem;
1079
+ line-height: 1.5;
1080
+ color: var(--text-secondary);
1081
+ word-break: break-all;
1082
+ }
1083
+
1084
+ .tool-input-meta {
1085
+ color: var(--text-secondary);
1086
+ opacity: 0.6;
1087
+ }
1088
+
1089
+ .tool-input-cmd {
1090
+ background: var(--bg-secondary);
1091
+ padding: 0.1rem 0.4rem;
1092
+ border-radius: 3px;
1093
+ font-size: 0.73rem;
1094
+ word-break: break-all;
1095
+ white-space: pre-wrap;
1096
+ }
1097
+
1098
+ /* ── TodoWrite checklist ── */
1099
+ .todo-list {
1100
+ display: flex;
1101
+ flex-direction: column;
1102
+ gap: 2px;
1103
+ }
1104
+
1105
+ .todo-item {
1106
+ display: flex;
1107
+ align-items: baseline;
1108
+ gap: 6px;
1109
+ font-size: 0.75rem;
1110
+ line-height: 1.4;
1111
+ color: var(--text-secondary);
1112
+ }
1113
+
1114
+ .todo-item.todo-done {
1115
+ opacity: 0.55;
1116
+ }
1117
+
1118
+ .todo-item.todo-active {
1119
+ color: var(--text-primary);
1120
+ }
1121
+
1122
+ .todo-icon {
1123
+ flex-shrink: 0;
1124
+ width: 1em;
1125
+ text-align: center;
1126
+ font-size: 0.7rem;
1127
+ opacity: 0.5;
1128
+ }
1129
+
1130
+ .todo-icon.done {
1131
+ color: var(--success);
1132
+ opacity: 0.8;
1133
+ }
1134
+
1135
+ .todo-icon.active {
1136
+ color: #58a6ff;
1137
+ opacity: 1;
1138
+ font-size: 0.55rem;
1139
+ }
1140
+
1141
+ .todo-text {
1142
+ word-break: break-word;
1143
+ }
1144
+
1145
+ /* ── Task / WebFetch formatted fields ── */
1146
+ .task-field {
1147
+ font-size: 0.75rem;
1148
+ line-height: 1.5;
1149
+ color: var(--text-secondary);
1150
+ }
1151
+
1152
+ .task-field + .task-field {
1153
+ margin-top: 2px;
1154
+ }
1155
+
1156
+ .task-prompt {
1157
+ background: var(--bg-secondary);
1158
+ border-radius: 3px;
1159
+ padding: 0.3rem 0.5rem;
1160
+ margin-top: 3px;
1161
+ font-size: 0.73rem;
1162
+ line-height: 1.4;
1163
+ color: var(--text-secondary);
1164
+ white-space: pre-wrap;
1165
+ word-break: break-word;
1166
+ max-height: 150px;
1167
+ overflow-y: auto;
1168
+ }
1169
+
1170
+ .tool-link {
1171
+ color: #58a6ff;
1172
+ font-size: 0.75rem;
1173
+ word-break: break-all;
1174
+ text-decoration: none;
1175
+ }
1176
+
1177
+ .tool-link:hover {
1178
+ text-decoration: underline;
1179
+ }
1180
+
1181
+ [data-theme="light"] .todo-icon.active {
1182
+ color: #0969da;
1183
+ }
1184
+
1185
+ [data-theme="light"] .tool-link {
1186
+ color: #0969da;
1187
+ }
1188
+
1189
+ /* ── Edit tool diff view ── */
1190
+ .tool-diff {
1191
+ background: var(--bg-secondary);
1192
+ border-radius: 4px;
1193
+ padding: 0.4rem 0.6rem;
1194
+ margin-top: 0.25rem;
1195
+ overflow-x: auto;
1196
+ font-size: 0.75rem;
1197
+ line-height: 1.5;
1198
+ max-height: 300px;
1199
+ overflow-y: auto;
1200
+ font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
1201
+ }
1202
+
1203
+ .diff-file {
1204
+ color: var(--text-secondary);
1205
+ margin-bottom: 0.35rem;
1206
+ font-weight: 500;
1207
+ }
1208
+
1209
+ .diff-replace-all {
1210
+ opacity: 0.6;
1211
+ font-weight: 400;
1212
+ }
1213
+
1214
+ .diff-lines {
1215
+ border-radius: 3px;
1216
+ overflow: hidden;
1217
+ }
1218
+
1219
+ .diff-removed, .diff-added {
1220
+ white-space: pre-wrap;
1221
+ word-break: break-all;
1222
+ padding: 0 0.4rem;
1223
+ }
1224
+
1225
+ .diff-removed {
1226
+ background: rgba(248, 81, 73, 0.15);
1227
+ color: #f85149;
1228
+ }
1229
+
1230
+ .diff-added {
1231
+ background: rgba(63, 185, 80, 0.15);
1232
+ color: #3fb950;
1233
+ }
1234
+
1235
+ .diff-sign {
1236
+ display: inline-block;
1237
+ width: 1.2em;
1238
+ user-select: none;
1239
+ opacity: 0.7;
1240
+ }
1241
+
1242
+ [data-theme="light"] .diff-removed {
1243
+ background: rgba(208, 46, 38, 0.12);
1244
+ color: #b31d28;
1245
+ }
1246
+
1247
+ [data-theme="light"] .diff-added {
1248
+ background: rgba(34, 134, 58, 0.12);
1249
+ color: #22863a;
1250
+ }
1251
+
1252
+ /* ── Context summary (collapsible continuation notice) ── */
1253
+ .context-summary-wrapper {
1254
+ margin: 0.75rem 0;
1255
+ }
1256
+
1257
+ /* ── AskUserQuestion interactive card ── */
1258
+ .ask-question-wrapper {
1259
+ max-width: 100%;
1260
+ padding-left: 0.25rem;
1261
+ margin: 0.5rem 0;
1262
+ }
1263
+
1264
+ .ask-question-card {
1265
+ background: var(--bg-secondary);
1266
+ border: 1px solid var(--accent);
1267
+ border-radius: 10px;
1268
+ padding: 0.8rem 1rem;
1269
+ display: flex;
1270
+ flex-direction: column;
1271
+ gap: 0.75rem;
1272
+ }
1273
+
1274
+ .ask-question-block {
1275
+ display: flex;
1276
+ flex-direction: column;
1277
+ gap: 0.5rem;
1278
+ }
1279
+
1280
+ .ask-question-header {
1281
+ font-size: 0.7rem;
1282
+ font-weight: 600;
1283
+ text-transform: uppercase;
1284
+ letter-spacing: 0.04em;
1285
+ color: var(--accent);
1286
+ }
1287
+
1288
+ .ask-question-text {
1289
+ font-size: 0.9rem;
1290
+ color: var(--text-primary);
1291
+ line-height: 1.5;
1292
+ }
1293
+
1294
+ .ask-question-options {
1295
+ display: flex;
1296
+ flex-direction: column;
1297
+ gap: 6px;
1298
+ }
1299
+
1300
+ .ask-question-option {
1301
+ padding: 8px 12px;
1302
+ border: 1px solid var(--border);
1303
+ border-radius: 8px;
1304
+ cursor: pointer;
1305
+ transition: border-color 0.15s, background 0.15s;
1306
+ }
1307
+
1308
+ .ask-question-option:hover {
1309
+ border-color: var(--text-secondary);
1310
+ background: var(--bg-tertiary);
1311
+ }
1312
+
1313
+ .ask-question-option.selected {
1314
+ border-color: var(--accent);
1315
+ background: rgba(37, 99, 235, 0.1);
1316
+ }
1317
+
1318
+ .ask-option-label {
1319
+ font-size: 0.88rem;
1320
+ font-weight: 500;
1321
+ color: var(--text-primary);
1322
+ }
1323
+
1324
+ .ask-option-desc {
1325
+ font-size: 0.78rem;
1326
+ color: var(--text-secondary);
1327
+ margin-top: 2px;
1328
+ line-height: 1.4;
1329
+ }
1330
+
1331
+ .ask-question-custom {
1332
+ margin-top: 2px;
1333
+ }
1334
+
1335
+ .ask-question-custom input {
1336
+ width: 100%;
1337
+ padding: 6px 10px;
1338
+ background: var(--bg-primary);
1339
+ border: 1px solid var(--border);
1340
+ border-radius: 6px;
1341
+ color: var(--text-primary);
1342
+ font-size: 0.85rem;
1343
+ font-family: inherit;
1344
+ outline: none;
1345
+ transition: border-color 0.15s;
1346
+ }
1347
+
1348
+ .ask-question-custom input::placeholder {
1349
+ color: var(--text-secondary);
1350
+ }
1351
+
1352
+ .ask-question-custom input:focus {
1353
+ border-color: var(--accent);
1354
+ }
1355
+
1356
+ .ask-question-actions {
1357
+ display: flex;
1358
+ justify-content: flex-end;
1359
+ }
1360
+
1361
+ .ask-question-submit {
1362
+ padding: 6px 20px;
1363
+ background: var(--accent);
1364
+ color: #fff;
1365
+ border: none;
1366
+ border-radius: 8px;
1367
+ font-size: 0.85rem;
1368
+ font-weight: 600;
1369
+ cursor: pointer;
1370
+ transition: background 0.15s, opacity 0.15s;
1371
+ }
1372
+
1373
+ .ask-question-submit:hover:not(:disabled) {
1374
+ background: var(--accent-hover);
1375
+ }
1376
+
1377
+ .ask-question-submit:disabled {
1378
+ opacity: 0.3;
1379
+ cursor: not-allowed;
1380
+ }
1381
+
1382
+ .ask-question-answered {
1383
+ display: flex;
1384
+ align-items: center;
1385
+ gap: 6px;
1386
+ padding: 4px 8px;
1387
+ font-size: 0.82rem;
1388
+ color: var(--text-secondary);
1389
+ }
1390
+
1391
+ .ask-answered-icon {
1392
+ color: var(--success);
1393
+ font-size: 0.8rem;
1394
+ }
1395
+
1396
+ .ask-answered-text {
1397
+ font-style: italic;
1398
+ }
1399
+
1400
+ .context-summary-bar {
1401
+ display: flex;
1402
+ align-items: center;
1403
+ gap: 6px;
1404
+ padding: 6px 10px;
1405
+ border-radius: 6px;
1406
+ border: 1px dashed var(--border);
1407
+ font-size: 0.78rem;
1408
+ color: var(--text-secondary);
1409
+ cursor: pointer;
1410
+ transition: background 0.15s;
1411
+ }
1412
+
1413
+ .context-summary-bar:hover {
1414
+ background: var(--bg-tertiary);
1415
+ }
1416
+
1417
+ .context-summary-icon {
1418
+ flex-shrink: 0;
1419
+ opacity: 0.5;
1420
+ }
1421
+
1422
+ .context-summary-label {
1423
+ flex: 1;
1424
+ }
1425
+
1426
+ .context-summary-toggle {
1427
+ font-size: 0.72rem;
1428
+ opacity: 0.6;
1429
+ flex-shrink: 0;
1430
+ }
1431
+
1432
+ .context-summary-body {
1433
+ margin-top: 6px;
1434
+ padding: 0.6rem 0.8rem;
1435
+ background: var(--bg-secondary);
1436
+ border-radius: 6px;
1437
+ border: 1px solid var(--border);
1438
+ font-size: 0.82rem;
1439
+ color: var(--text-secondary);
1440
+ max-height: 400px;
1441
+ overflow-y: auto;
1442
+ }
1443
+
1444
+ .context-summary-body .markdown-body {
1445
+ font-size: 0.82rem;
1446
+ color: var(--text-secondary);
1447
+ }
1448
+
1449
+ /* ── System message ── */
1450
+ .system-msg {
1451
+ text-align: center;
1452
+ color: var(--text-secondary);
1453
+ font-size: 0.8rem;
1454
+ font-style: italic;
1455
+ padding: 0.25rem 0;
1456
+ }
1457
+
1458
+ .system-msg.command-output-msg {
1459
+ text-align: left;
1460
+ font-style: normal;
1461
+ font-size: 0.85rem;
1462
+ padding: 0.5rem 0;
1463
+ }
1464
+
1465
+ .system-msg.error-msg {
1466
+ text-align: left;
1467
+ font-style: normal;
1468
+ color: #ef4444;
1469
+ background: rgba(239, 68, 68, 0.08);
1470
+ border: 1px solid rgba(239, 68, 68, 0.2);
1471
+ border-radius: 8px;
1472
+ padding: 0.75rem 1rem;
1473
+ font-size: 0.85rem;
1474
+ word-break: break-word;
1475
+ overflow-wrap: break-word;
1476
+ }
1477
+
1478
+ /* ── History loading indicator ── */
1479
+ .history-loading {
1480
+ display: flex;
1481
+ align-items: center;
1482
+ justify-content: center;
1483
+ gap: 0.5rem;
1484
+ padding: 2rem 0;
1485
+ color: var(--text-secondary);
1486
+ font-size: 0.85rem;
1487
+ }
1488
+
1489
+ .history-loading-spinner {
1490
+ width: 16px;
1491
+ height: 16px;
1492
+ border: 2px solid var(--border);
1493
+ border-top-color: var(--accent);
1494
+ border-radius: 50%;
1495
+ animation: spin 0.8s linear infinite;
1496
+ }
1497
+
1498
+ /* ── Load more button ── */
1499
+ .load-more-wrapper {
1500
+ display: flex;
1501
+ justify-content: center;
1502
+ padding: 0.75rem 0;
1503
+ }
1504
+
1505
+ .load-more-btn {
1506
+ background: var(--bg-tertiary);
1507
+ color: var(--text-secondary);
1508
+ border: 1px solid var(--border);
1509
+ border-radius: 6px;
1510
+ padding: 0.4rem 1.2rem;
1511
+ font-size: 0.8rem;
1512
+ cursor: pointer;
1513
+ transition: background 0.15s, color 0.15s;
1514
+ }
1515
+
1516
+ .load-more-btn:hover {
1517
+ background: var(--accent);
1518
+ color: #fff;
1519
+ border-color: var(--accent);
1520
+ }
1521
+
1522
+ /* ── Typing indicator ── */
1523
+ .typing-indicator {
1524
+ display: flex;
1525
+ align-items: center;
1526
+ gap: 4px;
1527
+ padding: 0.5rem 0.9rem;
1528
+ }
1529
+
1530
+ .typing-indicator span {
1531
+ width: 6px;
1532
+ height: 6px;
1533
+ border-radius: 50%;
1534
+ background: var(--text-secondary);
1535
+ animation: typing 1.2s infinite ease-in-out;
1536
+ }
1537
+
1538
+ .typing-indicator span:nth-child(2) {
1539
+ animation-delay: 0.2s;
1540
+ }
1541
+
1542
+ .typing-indicator span:nth-child(3) {
1543
+ animation-delay: 0.4s;
1544
+ }
1545
+
1546
+ @keyframes typing {
1547
+ 0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
1548
+ 30% { opacity: 1; transform: scale(1); }
1549
+ }
1550
+
1551
+ /* ── Context compaction inline message ── */
1552
+ .compact-msg {
1553
+ display: inline-flex;
1554
+ align-items: center;
1555
+ gap: 6px;
1556
+ color: var(--warning) !important;
1557
+ font-style: normal !important;
1558
+ font-weight: 500;
1559
+ }
1560
+
1561
+ .compact-inline-spinner {
1562
+ display: inline-block;
1563
+ width: 12px;
1564
+ height: 12px;
1565
+ border: 2px solid rgba(245, 158, 11, 0.3);
1566
+ border-top-color: var(--warning);
1567
+ border-radius: 50%;
1568
+ animation: spin 0.8s linear infinite;
1569
+ flex-shrink: 0;
1570
+ }
1571
+
1572
+ .compact-done-icon {
1573
+ color: var(--success, #22c55e);
1574
+ font-weight: 700;
1575
+ font-style: normal;
1576
+ }
1577
+
1578
+ /* ── Input area ── */
1579
+ .input-area {
1580
+ flex-shrink: 0;
1581
+ padding: 0 1.5rem 1rem;
1582
+ background: transparent;
1583
+ position: relative;
1584
+ }
1585
+
1586
+ .input-card {
1587
+ max-width: 768px;
1588
+ margin: 0 auto;
1589
+ background: var(--bg-secondary);
1590
+ border: 1px solid var(--border);
1591
+ border-radius: 16px;
1592
+ padding: 0.5rem;
1593
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
1594
+ transition: border-color 0.2s, box-shadow 0.2s;
1595
+ }
1596
+
1597
+ .input-card:focus-within {
1598
+ border-color: var(--accent);
1599
+ box-shadow: 0 2px 16px rgba(37, 99, 235, 0.12);
1600
+ }
1601
+
1602
+ .input-card textarea {
1603
+ width: 100%;
1604
+ background: transparent;
1605
+ border: none;
1606
+ color: var(--text-primary);
1607
+ padding: 0.4rem 0.6rem;
1608
+ font-family: inherit;
1609
+ font-size: 0.92rem;
1610
+ resize: none;
1611
+ outline: none;
1612
+ line-height: 1.5;
1613
+ max-height: 160px;
1614
+ overflow-y: auto;
1615
+ }
1616
+
1617
+ .input-card textarea::placeholder {
1618
+ color: var(--text-secondary);
1619
+ }
1620
+
1621
+ .input-bottom-row {
1622
+ display: flex;
1623
+ justify-content: space-between;
1624
+ align-items: center;
1625
+ padding: 0.1rem 0.25rem 0;
1626
+ }
1627
+
1628
+ .send-btn {
1629
+ background: var(--accent);
1630
+ color: #fff;
1631
+ border: none;
1632
+ border-radius: 10px;
1633
+ width: 32px;
1634
+ height: 32px;
1635
+ font-size: 0.9rem;
1636
+ font-weight: 600;
1637
+ cursor: pointer;
1638
+ display: flex;
1639
+ align-items: center;
1640
+ justify-content: center;
1641
+ transition: background 0.15s, opacity 0.15s;
1642
+ }
1643
+
1644
+ .send-btn:hover:not(:disabled) {
1645
+ background: var(--accent-hover);
1646
+ }
1647
+
1648
+ .send-btn:disabled {
1649
+ opacity: 0.3;
1650
+ cursor: not-allowed;
1651
+ }
1652
+
1653
+ /* ── Stop button ── */
1654
+ .stop-btn {
1655
+ background: var(--error);
1656
+ }
1657
+
1658
+ .stop-btn:hover {
1659
+ background: #dc2626;
1660
+ }
1661
+
1662
+ /* ── Streaming cursor ── */
1663
+ .assistant-bubble.streaming .markdown-body > *:last-child::after,
1664
+ .assistant-bubble.streaming .message-content:not(.markdown-body)::after {
1665
+ content: '';
1666
+ display: inline-block;
1667
+ width: 2px;
1668
+ height: 1em;
1669
+ background: var(--accent);
1670
+ margin-left: 2px;
1671
+ vertical-align: text-bottom;
1672
+ animation: blink-cursor 0.8s steps(2) infinite;
1673
+ }
1674
+
1675
+ @keyframes blink-cursor {
1676
+ 0% { opacity: 1; }
1677
+ 50% { opacity: 0; }
1678
+ }
1679
+
1680
+ /* ── Sidebar change-dir button ── */
1681
+ .sidebar-workdir-header {
1682
+ display: flex;
1683
+ align-items: center;
1684
+ justify-content: space-between;
1685
+ }
1686
+
1687
+ .sidebar-change-dir-btn {
1688
+ display: flex;
1689
+ align-items: center;
1690
+ justify-content: center;
1691
+ width: 22px;
1692
+ height: 22px;
1693
+ background: none;
1694
+ border: 1px solid var(--border);
1695
+ border-radius: 4px;
1696
+ color: var(--text-secondary);
1697
+ cursor: pointer;
1698
+ transition: color 0.15s, background 0.15s;
1699
+ }
1700
+
1701
+ .sidebar-change-dir-btn:hover {
1702
+ color: var(--text-primary);
1703
+ background: var(--bg-tertiary);
1704
+ }
1705
+
1706
+ .sidebar-change-dir-btn:disabled {
1707
+ opacity: 0.4;
1708
+ cursor: not-allowed;
1709
+ }
1710
+
1711
+ /* ── Folder Picker Modal ── */
1712
+ .folder-picker-overlay {
1713
+ position: fixed;
1714
+ top: 0; left: 0; right: 0; bottom: 0;
1715
+ background: rgba(0, 0, 0, 0.5);
1716
+ z-index: 1000;
1717
+ display: flex;
1718
+ align-items: center;
1719
+ justify-content: center;
1720
+ }
1721
+
1722
+ .folder-picker-dialog {
1723
+ width: 440px;
1724
+ height: 520px;
1725
+ background: var(--bg-secondary);
1726
+ border: 1px solid var(--border);
1727
+ border-radius: 12px;
1728
+ display: flex;
1729
+ flex-direction: column;
1730
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
1731
+ }
1732
+
1733
+ .folder-picker-header {
1734
+ display: flex;
1735
+ justify-content: space-between;
1736
+ align-items: center;
1737
+ padding: 12px 16px;
1738
+ font-size: 0.95rem;
1739
+ font-weight: 600;
1740
+ border-bottom: 1px solid var(--border);
1741
+ }
1742
+
1743
+ .folder-picker-close {
1744
+ background: none;
1745
+ border: none;
1746
+ color: var(--text-secondary);
1747
+ font-size: 1.2rem;
1748
+ cursor: pointer;
1749
+ padding: 0 4px;
1750
+ line-height: 1;
1751
+ }
1752
+
1753
+ .folder-picker-close:hover {
1754
+ color: var(--text-primary);
1755
+ }
1756
+
1757
+ .folder-picker-nav {
1758
+ display: flex;
1759
+ align-items: center;
1760
+ gap: 8px;
1761
+ padding: 8px 16px;
1762
+ font-size: 0.78rem;
1763
+ font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
1764
+ color: var(--text-secondary);
1765
+ border-bottom: 1px solid var(--border);
1766
+ }
1767
+
1768
+ .folder-picker-up {
1769
+ display: flex;
1770
+ align-items: center;
1771
+ justify-content: center;
1772
+ width: 24px;
1773
+ height: 24px;
1774
+ background: none;
1775
+ border: 1px solid var(--border);
1776
+ border-radius: 4px;
1777
+ color: var(--text-secondary);
1778
+ cursor: pointer;
1779
+ flex-shrink: 0;
1780
+ transition: color 0.15s, background 0.15s;
1781
+ }
1782
+
1783
+ .folder-picker-up:hover {
1784
+ color: var(--text-primary);
1785
+ background: var(--bg-tertiary);
1786
+ }
1787
+
1788
+ .folder-picker-up:disabled {
1789
+ opacity: 0.3;
1790
+ cursor: not-allowed;
1791
+ }
1792
+
1793
+ .folder-picker-current {
1794
+ overflow: hidden;
1795
+ text-overflow: ellipsis;
1796
+ white-space: nowrap;
1797
+ flex: 1;
1798
+ }
1799
+
1800
+ .folder-picker-path-input {
1801
+ flex: 1;
1802
+ background: var(--bg-primary);
1803
+ color: var(--text-primary);
1804
+ border: 1px solid var(--border);
1805
+ border-radius: 4px;
1806
+ padding: 4px 8px;
1807
+ font-size: 0.85rem;
1808
+ font-family: monospace;
1809
+ outline: none;
1810
+ }
1811
+
1812
+ .folder-picker-path-input:focus {
1813
+ border-color: var(--accent);
1814
+ }
1815
+
1816
+ .folder-picker-list {
1817
+ flex: 1;
1818
+ overflow-y: auto;
1819
+ min-height: 200px;
1820
+ max-height: 350px;
1821
+ padding: 4px 0;
1822
+ }
1823
+
1824
+ .folder-picker-loading {
1825
+ display: flex;
1826
+ align-items: center;
1827
+ gap: 8px;
1828
+ padding: 16px;
1829
+ color: var(--text-secondary);
1830
+ font-size: 0.82rem;
1831
+ }
1832
+
1833
+ .folder-picker-item {
1834
+ display: flex;
1835
+ align-items: center;
1836
+ gap: 8px;
1837
+ padding: 6px 16px;
1838
+ font-size: 0.85rem;
1839
+ cursor: pointer;
1840
+ color: var(--text-primary);
1841
+ transition: background 0.1s;
1842
+ user-select: none;
1843
+ }
1844
+
1845
+ .folder-picker-item:hover {
1846
+ background: var(--bg-tertiary);
1847
+ }
1848
+
1849
+ .folder-picker-item svg {
1850
+ flex-shrink: 0;
1851
+ color: var(--text-secondary);
1852
+ }
1853
+
1854
+ .folder-picker-selected {
1855
+ background: var(--accent) !important;
1856
+ color: #fff !important;
1857
+ }
1858
+
1859
+ .folder-picker-selected svg {
1860
+ color: #fff !important;
1861
+ }
1862
+
1863
+ .folder-picker-empty {
1864
+ text-align: center;
1865
+ padding: 2rem;
1866
+ color: var(--text-secondary);
1867
+ font-size: 0.82rem;
1868
+ }
1869
+
1870
+ .folder-picker-footer {
1871
+ padding: 10px 16px;
1872
+ display: flex;
1873
+ justify-content: flex-end;
1874
+ gap: 8px;
1875
+ border-top: 1px solid var(--border);
1876
+ }
1877
+
1878
+ .folder-picker-cancel {
1879
+ padding: 6px 16px;
1880
+ background: none;
1881
+ color: var(--text-secondary);
1882
+ border: 1px solid var(--border);
1883
+ border-radius: 8px;
1884
+ font-size: 0.85rem;
1885
+ cursor: pointer;
1886
+ transition: color 0.15s, background 0.15s;
1887
+ }
1888
+
1889
+ .folder-picker-cancel:hover {
1890
+ color: var(--text-primary);
1891
+ background: var(--bg-tertiary);
1892
+ }
1893
+
1894
+ .folder-picker-confirm {
1895
+ padding: 6px 20px;
1896
+ background: var(--accent);
1897
+ color: #fff;
1898
+ border: none;
1899
+ border-radius: 8px;
1900
+ font-size: 0.85rem;
1901
+ font-weight: 600;
1902
+ cursor: pointer;
1903
+ transition: background 0.15s;
1904
+ }
1905
+
1906
+ .folder-picker-confirm:hover {
1907
+ background: var(--accent-hover);
1908
+ }
1909
+
1910
+ .folder-picker-confirm:disabled {
1911
+ opacity: 0.4;
1912
+ cursor: not-allowed;
1913
+ }
1914
+
1915
+ /* ── File Upload: Attachment Bar ── */
1916
+ .attachment-bar {
1917
+ display: flex;
1918
+ flex-wrap: wrap;
1919
+ gap: 6px;
1920
+ padding: 6px 8px;
1921
+ border-top: 1px solid var(--border);
1922
+ }
1923
+
1924
+ .attachment-chip {
1925
+ display: flex;
1926
+ align-items: center;
1927
+ gap: 6px;
1928
+ background: var(--bg-tertiary);
1929
+ border: 1px solid var(--border);
1930
+ border-radius: 8px;
1931
+ padding: 4px 8px;
1932
+ font-size: 0.78rem;
1933
+ color: var(--text-primary);
1934
+ max-width: 220px;
1935
+ }
1936
+
1937
+ .attachment-thumb {
1938
+ width: 28px;
1939
+ height: 28px;
1940
+ object-fit: cover;
1941
+ border-radius: 4px;
1942
+ flex-shrink: 0;
1943
+ }
1944
+
1945
+ .attachment-file-icon {
1946
+ display: flex;
1947
+ align-items: center;
1948
+ justify-content: center;
1949
+ width: 28px;
1950
+ height: 28px;
1951
+ background: var(--bg-secondary);
1952
+ border-radius: 4px;
1953
+ flex-shrink: 0;
1954
+ color: var(--text-secondary);
1955
+ }
1956
+
1957
+ .attachment-info {
1958
+ overflow: hidden;
1959
+ min-width: 0;
1960
+ }
1961
+
1962
+ .attachment-name {
1963
+ overflow: hidden;
1964
+ text-overflow: ellipsis;
1965
+ white-space: nowrap;
1966
+ font-weight: 500;
1967
+ }
1968
+
1969
+ .attachment-size {
1970
+ color: var(--text-secondary);
1971
+ font-size: 0.7rem;
1972
+ }
1973
+
1974
+ .attachment-remove {
1975
+ background: none;
1976
+ border: none;
1977
+ color: var(--text-secondary);
1978
+ cursor: pointer;
1979
+ padding: 0 2px;
1980
+ font-size: 1rem;
1981
+ line-height: 1;
1982
+ flex-shrink: 0;
1983
+ transition: color 0.15s;
1984
+ }
1985
+
1986
+ .attachment-remove:hover {
1987
+ color: var(--error);
1988
+ }
1989
+
1990
+ /* ── Paperclip attach button ── */
1991
+ .attach-btn {
1992
+ background: none;
1993
+ border: none;
1994
+ color: var(--text-secondary);
1995
+ cursor: pointer;
1996
+ display: flex;
1997
+ align-items: center;
1998
+ justify-content: center;
1999
+ width: 32px;
2000
+ height: 32px;
2001
+ border-radius: 8px;
2002
+ transition: color 0.15s, background 0.15s;
2003
+ }
2004
+
2005
+ .attach-btn:hover {
2006
+ color: var(--text-primary);
2007
+ background: var(--bg-tertiary);
2008
+ }
2009
+
2010
+ .attach-btn:disabled {
2011
+ opacity: 0.3;
2012
+ cursor: not-allowed;
2013
+ }
2014
+
2015
+ /* ── Drag-over highlight on input card ── */
2016
+ .input-card.drag-over {
2017
+ border-color: var(--accent);
2018
+ box-shadow: 0 0 0 2px var(--accent), 0 2px 12px rgba(99, 102, 241, 0.15);
2019
+ }
2020
+
2021
+ /* ── Attachments displayed in sent messages ── */
2022
+ .message-attachments {
2023
+ display: flex;
2024
+ flex-wrap: wrap;
2025
+ gap: 6px;
2026
+ margin-top: 6px;
2027
+ }
2028
+
2029
+ .message-attachment-chip {
2030
+ display: flex;
2031
+ align-items: center;
2032
+ gap: 4px;
2033
+ background: var(--bg-secondary);
2034
+ border: 1px solid var(--border);
2035
+ border-radius: 6px;
2036
+ padding: 3px 8px;
2037
+ font-size: 0.75rem;
2038
+ color: var(--text-secondary);
2039
+ }
2040
+
2041
+ .message-attachment-thumb {
2042
+ width: 20px;
2043
+ height: 20px;
2044
+ object-fit: cover;
2045
+ border-radius: 3px;
2046
+ }
2047
+
2048
+ .message-attachment-file-icon {
2049
+ display: flex;
2050
+ align-items: center;
2051
+ color: var(--text-secondary);
2052
+ }
2053
+
2054
+ /* ── Sidebar backdrop (mobile overlay) ── */
2055
+ .sidebar-backdrop {
2056
+ display: none;
2057
+ }
2058
+
2059
+ /* ══════════════════════════════════════════
2060
+ Mobile responsive — max-width: 768px
2061
+ ══════════════════════════════════════════ */
2062
+ @media (max-width: 768px) {
2063
+ /* Prevent page-level horizontal scroll */
2064
+ html, body {
2065
+ overflow-x: hidden;
2066
+ }
2067
+
2068
+ .layout, .main-body, .chat-area {
2069
+ overflow-x: hidden;
2070
+ max-width: 100vw;
2071
+ }
2072
+
2073
+ /* Sidebar as fixed overlay */
2074
+ .sidebar {
2075
+ position: fixed;
2076
+ top: 0;
2077
+ left: 0;
2078
+ bottom: 0;
2079
+ width: 280px;
2080
+ max-width: 85vw;
2081
+ z-index: 100;
2082
+ box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
2083
+ }
2084
+
2085
+ .sidebar-backdrop {
2086
+ display: block;
2087
+ position: fixed;
2088
+ inset: 0;
2089
+ background: rgba(0, 0, 0, 0.4);
2090
+ z-index: 99;
2091
+ }
2092
+
2093
+ /* Top bar */
2094
+ .top-bar {
2095
+ padding: 0 0.75rem;
2096
+ }
2097
+
2098
+ .agent-label {
2099
+ display: none;
2100
+ }
2101
+
2102
+ /* Message area */
2103
+ .message-list {
2104
+ padding: 0.75rem 0.75rem 0.5rem;
2105
+ }
2106
+
2107
+ .message-list-inner {
2108
+ max-width: 100%;
2109
+ min-width: 0;
2110
+ }
2111
+
2112
+ /* Constrain message rows and bubbles */
2113
+ .message-row {
2114
+ min-width: 0;
2115
+ max-width: 100%;
2116
+ }
2117
+
2118
+ .message-bubble {
2119
+ min-width: 0;
2120
+ max-width: 100%;
2121
+ overflow: hidden;
2122
+ overflow-wrap: anywhere;
2123
+ word-break: break-word;
2124
+ }
2125
+
2126
+ /* Message content: contain all overflow within the bubble */
2127
+ .message-content {
2128
+ min-width: 0;
2129
+ max-width: 100%;
2130
+ overflow-wrap: anywhere;
2131
+ word-break: break-word;
2132
+ }
2133
+
2134
+ .message-content pre {
2135
+ max-width: 100%;
2136
+ overflow-x: auto;
2137
+ }
2138
+
2139
+ /* Code block wrappers */
2140
+ .code-block-wrapper {
2141
+ max-width: 100%;
2142
+ }
2143
+
2144
+ .code-block-wrapper pre {
2145
+ max-width: 100%;
2146
+ overflow-x: auto;
2147
+ }
2148
+
2149
+ .markdown-body code {
2150
+ word-break: break-all;
2151
+ }
2152
+
2153
+ .markdown-body pre {
2154
+ max-width: 100%;
2155
+ }
2156
+
2157
+ .markdown-body table {
2158
+ display: block;
2159
+ max-width: 100%;
2160
+ overflow-x: auto;
2161
+ }
2162
+
2163
+ /* Input area */
2164
+ .input-area {
2165
+ padding: 0 0.75rem 0.75rem;
2166
+ }
2167
+
2168
+ .input-card {
2169
+ max-width: 100%;
2170
+ }
2171
+
2172
+ /* Folder picker */
2173
+ .folder-picker-dialog {
2174
+ width: calc(100vw - 2rem);
2175
+ max-width: 440px;
2176
+ }
2177
+
2178
+ /* Status card */
2179
+ .status-card {
2180
+ min-width: 0;
2181
+ width: 100%;
2182
+ max-width: 320px;
2183
+ }
2184
+
2185
+ /* Tool blocks */
2186
+ .tool-expand {
2187
+ margin-left: 0;
2188
+ min-width: 0;
2189
+ max-width: 100%;
2190
+ overflow: hidden;
2191
+ }
2192
+
2193
+ .tool-block {
2194
+ max-width: 100%;
2195
+ overflow-x: auto;
2196
+ }
2197
+
2198
+ .tool-output-content pre {
2199
+ font-size: 0.8rem;
2200
+ max-width: 100%;
2201
+ }
2202
+
2203
+ .tool-input-formatted {
2204
+ max-width: 100%;
2205
+ overflow-wrap: anywhere;
2206
+ }
2207
+
2208
+ /* AskUserQuestion — larger tap targets */
2209
+ .ask-question-option {
2210
+ min-height: 44px;
2211
+ }
2212
+ }
2213
+
2214
+ /* ══════════════════════════════════════════
2215
+ Extra-small screens — max-width: 480px
2216
+ ══════════════════════════════════════════ */
2217
+ @media (max-width: 480px) {
2218
+ .message-list {
2219
+ padding: 0.5rem 0.5rem 0.5rem;
2220
+ }
2221
+
2222
+ .input-area {
2223
+ padding: 0 0.5rem 0.5rem;
2224
+ }
2225
+
2226
+ .top-bar {
2227
+ padding: 0 0.5rem;
2228
+ }
2229
+
2230
+ .folder-picker-dialog {
2231
+ width: calc(100vw - 1rem);
2232
+ }
2233
+ }