@forgecharts/sdk 1.1.34 → 1.1.36

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.
@@ -0,0 +1,4143 @@
1
+ *, *::before, *::after {
2
+ box-sizing: border-box;
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+
7
+ @keyframes spin {
8
+ to { transform: rotate(360deg); }
9
+ }
10
+
11
+ :root {
12
+ /* Dark (default) */
13
+ --bg: #000000;
14
+ --bg-secondary: #0a0a0a;
15
+ --text: #ffffff;
16
+ --text-muted: #888888;
17
+ --border: rgba(255,255,255,0.25);
18
+ --slider-track: rgba(255,255,255,0.22);
19
+ --accent: #ffffff;
20
+ --primary: #2196f3;
21
+ --primary-bg: rgba(33, 150, 243, 0.12);
22
+ --success: #26a69a;
23
+ --success-bg: rgba(38, 166, 154, 0.08);
24
+ --backdrop: rgba(0, 0, 0, 0.55);
25
+ --shadow-dialog: 0 20px 60px rgba(0, 0, 0, 0.6);
26
+ --up: #26a641;
27
+ --down: #f85149;
28
+ --shelf-bg: #1a1a1a;
29
+ --toolbar-bg: #000000;
30
+ --toolbar-hover: rgba(255,255,255,0.08);
31
+ --crosshair-overlay: rgba(255, 255, 255, 0.75);
32
+ --toggle-track: #ffffff;
33
+ --toggle-thumb: #000000;
34
+ font-size: 14px;
35
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
36
+ line-height: 1.5;
37
+ color-scheme: dark;
38
+ }
39
+
40
+ [data-theme="light"] {
41
+ --bg: #ffffff;
42
+ --bg-secondary: #f5f5f5;
43
+ --text: #131722;
44
+ --text-muted: #555555;
45
+ --border: rgba(0,0,0,0.12);
46
+ --slider-track: rgba(0,0,0,0.22);
47
+ --accent: #131722;
48
+ --primary: #1565c0;
49
+ --primary-bg: rgba(21, 101, 192, 0.10);
50
+ --success: #00897b;
51
+ --success-bg: rgba(0, 137, 123, 0.08);
52
+ --backdrop: rgba(0, 0, 0, 0.35);
53
+ --shadow-dialog: 0 20px 60px rgba(0, 0, 0, 0.18);
54
+ --shelf-bg: #ebebeb;
55
+ --toolbar-bg: #ffffff;
56
+ --toolbar-hover: rgba(0,0,0,0.06);
57
+ --crosshair-overlay: rgba(0, 0, 0, 0.6);
58
+ --toggle-track: #131722;
59
+ --toggle-thumb: #ffffff;
60
+ color-scheme: light;
61
+ }
62
+
63
+ html, body, #root {
64
+ height: 100%;
65
+ width: 100%;
66
+ overflow: hidden;
67
+ background: var(--bg);
68
+ color: var(--text);
69
+ }
70
+
71
+ button {
72
+ cursor: pointer;
73
+ border: 1px solid transparent;
74
+ background: transparent;
75
+ color: var(--text-muted);
76
+ padding: 4px 10px;
77
+ border-radius: 4px;
78
+ font-size: 12px;
79
+ font-family: inherit;
80
+ transition: background 0.15s, color 0.15s;
81
+ }
82
+ button:hover { background: var(--toolbar-hover); color: var(--text); }
83
+ button.active { background: var(--toolbar-hover); color: var(--accent); }
84
+
85
+ .drawing-tool-btn {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ width: 32px;
90
+ height: 32px;
91
+ border: 1px solid transparent;
92
+ border-radius: 4px;
93
+ background: transparent;
94
+ color: var(--text-muted);
95
+ cursor: pointer;
96
+ padding: 0;
97
+ transition: background 0.15s, border-color 0.15s, color 0.15s;
98
+ }
99
+ .drawing-tool-btn:hover {
100
+ background: var(--toolbar-hover);
101
+ color: var(--text);
102
+ border-color: transparent;
103
+ }
104
+ .drawing-tool-btn.is-active {
105
+ border-color: transparent;
106
+ color: var(--accent);
107
+ background: var(--toolbar-hover);
108
+ }
109
+
110
+ /* Visibility tool — active state (a hide option is currently in effect) */
111
+ .dt-pointer-main.dt-vis-active,
112
+ .dt-pointer-main.dt-vis-active:hover {
113
+ background: var(--text);
114
+ color: var(--toolbar-bg);
115
+ border-color: transparent;
116
+ }
117
+
118
+ /* ── Pointer tool group (left toolbar) ───────────────────────────────────── */
119
+
120
+ .dt-pointer-group {
121
+ position: relative;
122
+ display: flex;
123
+ align-items: center;
124
+ width: 100%;
125
+ justify-content: center;
126
+ }
127
+
128
+ /* The main (wide) pointer button shrinks to leave room for the expand chevron */
129
+ .dt-pointer-group .dt-pointer-main {
130
+ width: 26px;
131
+ border-radius: 4px 0 0 4px;
132
+ }
133
+
134
+ /* Tiny expand button on the right edge of the pointer tool row */
135
+ .dt-pointer-expand {
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ width: 10px;
140
+ height: 32px;
141
+ background: transparent;
142
+ border: 1px solid transparent;
143
+ border-radius: 0 4px 4px 0;
144
+ color: var(--text-muted);
145
+ cursor: pointer;
146
+ padding: 0;
147
+ transition: background 0.15s, color 0.15s;
148
+ flex-shrink: 0;
149
+ }
150
+ .dt-pointer-expand:hover,
151
+ .dt-pointer-expand.is-open {
152
+ background: var(--toolbar-hover);
153
+ color: var(--text);
154
+ }
155
+
156
+ /* Flyout panel — opens to the right of the left toolbar */
157
+ .dt-pointer-flyout {
158
+ position: absolute;
159
+ left: calc(100% + 6px);
160
+ top: 0;
161
+ z-index: 200;
162
+ background: var(--toolbar-bg);
163
+ border: 1px solid var(--border);
164
+ border-radius: 8px;
165
+ padding: 4px;
166
+ min-width: 168px;
167
+ box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
168
+ }
169
+
170
+ .dt-flyout-label {
171
+ font-size: 10px;
172
+ font-weight: 600;
173
+ color: var(--text-muted);
174
+ padding: 4px 10px 6px;
175
+ letter-spacing: 0.06em;
176
+ text-transform: uppercase;
177
+ user-select: none;
178
+ }
179
+
180
+ .dt-flyout-item {
181
+ display: flex;
182
+ align-items: center;
183
+ gap: 9px;
184
+ width: 100%;
185
+ padding: 6px 10px;
186
+ background: none;
187
+ border: none;
188
+ border-radius: 5px;
189
+ color: var(--text);
190
+ cursor: pointer;
191
+ font-size: 12.5px;
192
+ text-align: left;
193
+ transition: background 0.12s;
194
+ }
195
+ .dt-flyout-item:hover {
196
+ background: var(--toolbar-hover);
197
+ }
198
+ .dt-flyout-item.is-active {
199
+ color: var(--accent);
200
+ background: rgba(88, 166, 255, 0.08);
201
+ }
202
+
203
+ .dt-flyout-icon {
204
+ display: flex;
205
+ align-items: center;
206
+ justify-content: center;
207
+ width: 20px;
208
+ flex-shrink: 0;
209
+ color: inherit;
210
+ }
211
+
212
+ .dt-flyout-name {
213
+ flex: 1;
214
+ }
215
+
216
+ .dt-flyout-check {
217
+ font-size: 11px;
218
+ color: var(--accent);
219
+ flex-shrink: 0;
220
+ }
221
+
222
+ /* Horizontal separator inside flyout */
223
+ .dt-flyout-sep {
224
+ height: 1px;
225
+ background: var(--border);
226
+ margin: 4px 6px;
227
+ }
228
+
229
+ /* Toggle row inside flyout (e.g. "Snap to indicators") */
230
+ .dt-flyout-toggle-row {
231
+ display: flex;
232
+ align-items: center;
233
+ gap: 9px;
234
+ padding: 6px 10px;
235
+ font-size: 12.5px;
236
+ color: var(--text);
237
+ }
238
+
239
+ /* Pill toggle switch */
240
+ .dt-toggle {
241
+ position: relative;
242
+ display: inline-flex;
243
+ align-items: center;
244
+ width: 30px;
245
+ height: 17px;
246
+ border-radius: 9px;
247
+ background: var(--border);
248
+ border: none;
249
+ padding: 0;
250
+ cursor: pointer;
251
+ flex-shrink: 0;
252
+ transition: background 0.2s;
253
+ }
254
+ .dt-toggle.is-on {
255
+ background: var(--accent);
256
+ }
257
+ .dt-toggle-knob {
258
+ position: absolute;
259
+ left: 2px;
260
+ width: 13px;
261
+ height: 13px;
262
+ border-radius: 50%;
263
+ background: var(--toggle-thumb, #fff);
264
+ transition: transform 0.2s;
265
+ pointer-events: none;
266
+ }
267
+ .dt-toggle.is-on .dt-toggle-knob {
268
+ transform: translateX(13px);
269
+ }
270
+
271
+ /* ── Lines menu panel ────────────────────────────────────────────────────── */
272
+
273
+ .dt-lines-group {
274
+ position: relative;
275
+ width: 100%;
276
+ display: flex;
277
+ align-items: center;
278
+ justify-content: center;
279
+ }
280
+
281
+ /* Narrow the main tool button to leave room for the expand chevron */
282
+ .dt-lines-group .dt-lines-main {
283
+ width: 26px;
284
+ border-radius: 4px 0 0 4px;
285
+ }
286
+
287
+ /* Large floating panel that opens to the right of the left toolbar */
288
+ .dt-lines-panel {
289
+ position: absolute;
290
+ left: calc(100% + 6px);
291
+ top: 0;
292
+ z-index: 200;
293
+ background: var(--toolbar-bg);
294
+ border: 1px solid var(--border);
295
+ border-radius: 8px;
296
+ padding: 4px 0 8px;
297
+ min-width: 250px;
298
+ max-height: 80vh;
299
+ overflow-y: auto;
300
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
301
+ }
302
+
303
+ .dt-lines-section {
304
+ padding: 0 0 2px;
305
+ }
306
+
307
+ /* Section heading: LINES / CHANNELS / PITCHFORKS */
308
+ .dt-lines-heading {
309
+ font-size: 10px;
310
+ font-weight: 700;
311
+ letter-spacing: 0.08em;
312
+ color: var(--text-muted);
313
+ padding: 10px 16px 4px;
314
+ user-select: none;
315
+ }
316
+
317
+ /* Individual line tool row */
318
+ .dt-lines-item {
319
+ display: flex;
320
+ align-items: center;
321
+ gap: 10px;
322
+ width: 100%;
323
+ padding: 6px 16px;
324
+ background: none;
325
+ border: none;
326
+ color: var(--text);
327
+ cursor: pointer;
328
+ font-size: 13px;
329
+ text-align: left;
330
+ transition: background 0.1s;
331
+ }
332
+ .dt-lines-item:hover {
333
+ background: var(--toolbar-hover);
334
+ }
335
+ .dt-lines-item.is-active {
336
+ color: var(--accent);
337
+ background: rgba(88, 166, 255, 0.08);
338
+ }
339
+
340
+ .dt-lines-icon {
341
+ display: flex;
342
+ align-items: center;
343
+ justify-content: center;
344
+ width: 20px;
345
+ flex-shrink: 0;
346
+ color: inherit;
347
+ opacity: 0.85;
348
+ }
349
+
350
+ .dt-lines-name {
351
+ flex: 1;
352
+ white-space: nowrap;
353
+ }
354
+
355
+ .dt-lines-shortcut {
356
+ font-size: 11px;
357
+ color: var(--text-muted);
358
+ background: rgba(128, 128, 128, 0.15);
359
+ border-radius: 3px;
360
+ padding: 1px 5px;
361
+ white-space: nowrap;
362
+ flex-shrink: 0;
363
+ }
364
+
365
+ /* ── Fibonacci & Gann panel ─────────────────────────────────────────────── */
366
+
367
+ .dt-fibgann-panel {
368
+ min-width: 290px;
369
+ }
370
+
371
+ /* Each tool row in FibGann panel has a star button on the right */
372
+ .dt-fibgann-item {
373
+ padding-right: 6px;
374
+ }
375
+
376
+ /* Star / favorite toggle button */
377
+ .dt-star-btn {
378
+ display: flex;
379
+ align-items: center;
380
+ justify-content: center;
381
+ width: 22px;
382
+ height: 22px;
383
+ padding: 0;
384
+ background: none;
385
+ border: none;
386
+ border-radius: 3px;
387
+ color: var(--text-muted);
388
+ cursor: pointer;
389
+ flex-shrink: 0;
390
+ opacity: 0;
391
+ transition: opacity 0.12s, background 0.12s;
392
+ }
393
+ .dt-fibgann-item:hover .dt-star-btn,
394
+ .dt-lines-item:hover .dt-star-btn,
395
+ .dt-other-tool-wrap:hover .dt-star-btn,
396
+ .dt-star-btn.is-starred {
397
+ opacity: 1;
398
+ }
399
+ .dt-star-btn:hover {
400
+ background: var(--toolbar-hover);
401
+ }
402
+ .dt-star-btn.is-starred {
403
+ color: #f5a623;
404
+ }
405
+
406
+ /* ── Favorites floating toolbar ─────────────────────────────────────────── */
407
+
408
+ .dt-favorites-toolbar {
409
+ position: fixed;
410
+ z-index: 500;
411
+ display: flex;
412
+ align-items: center;
413
+ gap: 2px;
414
+ padding: 4px 6px;
415
+ background: var(--toolbar-bg);
416
+ border: 1px solid var(--border);
417
+ border-radius: 8px;
418
+ box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
419
+ user-select: none;
420
+ }
421
+
422
+ .dt-favorites-handle {
423
+ display: flex;
424
+ align-items: center;
425
+ justify-content: center;
426
+ width: 14px;
427
+ height: 32px;
428
+ cursor: grab;
429
+ color: var(--text-muted);
430
+ margin-right: 2px;
431
+ flex-shrink: 0;
432
+ }
433
+ .dt-favorites-handle:active {
434
+ cursor: grabbing;
435
+ }
436
+
437
+ .dt-fav-btn {
438
+ width: 30px;
439
+ height: 30px;
440
+ }
441
+
442
+ /* Force cursor hidden for the chart container in crosshair mode.
443
+ The canvas element itself is excluded so JS-set axis resize cursors (ns-resize, ew-resize)
444
+ can still show through when the pointer is over an axis. */
445
+ .chart-crosshair-mode {
446
+ cursor: none !important;
447
+ }
448
+ /* Apply to all children EXCEPT the interactive overlay canvas which controls axis cursors */
449
+ .chart-crosshair-mode *:not(canvas) {
450
+ cursor: none !important;
451
+ }
452
+
453
+ /* Other tool star badge — overlaid in top-right corner */
454
+ .dt-other-tool-wrap {
455
+ position: relative;
456
+ }
457
+ .dt-other-star {
458
+ position: absolute;
459
+ top: 0;
460
+ right: 0;
461
+ width: 15px;
462
+ height: 15px;
463
+ padding: 0;
464
+ border-radius: 3px;
465
+ z-index: 1;
466
+ }
467
+
468
+ .tab-bar {
469
+ display: flex;
470
+ align-items: center;
471
+ gap: 0;
472
+ padding: 0;
473
+ flex-shrink: 0;
474
+ min-width: 0;
475
+ }
476
+
477
+ /* Scrollable tab strip inside the bar */
478
+ .tab-bar-scroll {
479
+ display: flex;
480
+ align-items: center;
481
+ gap: 3px;
482
+ padding: 0;
483
+ min-width: 0;
484
+ overflow-x: auto;
485
+ scrollbar-width: none;
486
+ }
487
+ .tab-bar-scroll::-webkit-scrollbar { display: none; }
488
+
489
+ /* Scroll arrow buttons — collapse to zero width when not needed */
490
+ .tab-scroll-btn {
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: center;
494
+ flex-shrink: 0;
495
+ width: 0;
496
+ height: 24px;
497
+ padding: 0;
498
+ overflow: hidden;
499
+ border: none;
500
+ background: transparent;
501
+ color: var(--text-muted);
502
+ border-radius: 4px;
503
+ cursor: pointer;
504
+ opacity: 0;
505
+ pointer-events: none;
506
+ transition: width 0.12s, opacity 0.15s, color 0.12s, background 0.12s;
507
+ }
508
+ .tab-scroll-btn.visible {
509
+ width: 20px;
510
+ overflow: visible;
511
+ opacity: 1;
512
+ pointer-events: auto;
513
+ }
514
+ .tab-scroll-left.visible { margin-right: 2px; }
515
+ .tab-scroll-right.visible { margin-left: 2px; }
516
+ .tab-scroll-btn:hover {
517
+ color: var(--text);
518
+ background: var(--toolbar-hover);
519
+ }
520
+
521
+ .tab-item {
522
+ display: flex;
523
+ align-items: center;
524
+ gap: 5px;
525
+ padding: 4px 10px;
526
+ border-radius: 6px;
527
+ background: transparent;
528
+ color: var(--text-muted);
529
+ cursor: pointer;
530
+ font-size: 12px;
531
+ white-space: nowrap;
532
+ transition: background 0.12s, color 0.12s;
533
+ user-select: none;
534
+ flex-shrink: 0;
535
+ }
536
+ .tab-item:hover { background: var(--toolbar-hover); color: var(--text); }
537
+ .tab-item.active { background: var(--toolbar-bg); color: var(--text); font-weight: 600; }
538
+
539
+ .tab-label { display: flex; align-items: center; gap: 5px; pointer-events: none; }
540
+
541
+ .tab-saved-dot {
542
+ display: inline-block;
543
+ width: 6px;
544
+ height: 6px;
545
+ border-radius: 50%;
546
+ background: var(--accent);
547
+ opacity: 0.6;
548
+ flex-shrink: 0;
549
+ }
550
+
551
+ .tab-rename-input {
552
+ background: transparent;
553
+ border: none;
554
+ border-bottom: 1px solid var(--accent);
555
+ color: var(--text);
556
+ font-size: 12px;
557
+ font-family: inherit;
558
+ outline: none;
559
+ width: 80px;
560
+ padding: 0;
561
+ }
562
+
563
+ .tab-close {
564
+ display: flex;
565
+ align-items: center;
566
+ justify-content: center;
567
+ width: 15px;
568
+ height: 15px;
569
+ border: none !important;
570
+ background: transparent !important;
571
+ color: var(--text-muted);
572
+ font-size: 15px;
573
+ line-height: 1;
574
+ padding: 0 !important;
575
+ border-radius: 3px;
576
+ opacity: 0;
577
+ transition: opacity 0.1s, background 0.1s;
578
+ flex-shrink: 0;
579
+ }
580
+ .tab-item:hover .tab-close,
581
+ .tab-item.active .tab-close { opacity: 1; }
582
+ .tab-close:hover { background: var(--toolbar-hover) !important; color: var(--text) !important; }
583
+
584
+ .tab-add {
585
+ width: 24px;
586
+ height: 24px;
587
+ border: 1px solid var(--border);
588
+ background: transparent;
589
+ color: var(--text-muted);
590
+ border-radius: 6px;
591
+ font-size: 16px;
592
+ line-height: 1;
593
+ padding: 0;
594
+ flex-shrink: 0;
595
+ display: flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ }
599
+ .tab-add:hover { color: var(--text); border-color: var(--accent); }
600
+
601
+ /* ── Timeframe dropdown ──────────────────────────────────────────────────── */
602
+ .tf-dropdown {
603
+ position: absolute;
604
+ top: calc(100% + 6px);
605
+ right: 0;
606
+ width: 195px;
607
+ max-height: 520px;
608
+ overflow-y: auto;
609
+ scrollbar-width: thin;
610
+ background: var(--toolbar-bg);
611
+ border: 1px solid var(--border);
612
+ border-radius: 8px;
613
+ padding: 0;
614
+ z-index: 1001;
615
+ box-shadow: 0 8px 24px rgba(0,0,0,0.35);
616
+ }
617
+ .tf-dropdown-add-custom {
618
+ display: block;
619
+ width: 100%;
620
+ text-align: left;
621
+ padding: 9px 14px;
622
+ font-size: 12.5px;
623
+ color: var(--text-muted);
624
+ background: transparent;
625
+ border: none;
626
+ border-bottom: 1px solid var(--border);
627
+ cursor: pointer;
628
+ }
629
+ .tf-dropdown-add-custom:hover { background: var(--toolbar-hover); color: var(--text); }
630
+ .tf-dropdown-add-row {
631
+ display: flex;
632
+ gap: 6px;
633
+ padding: 6px 10px 8px;
634
+ align-items: center;
635
+ border-bottom: 1px solid var(--border);
636
+ }
637
+ .tf-dropdown-input {
638
+ flex: 1;
639
+ background: transparent;
640
+ color: var(--text);
641
+ border: 1px solid var(--border);
642
+ border-radius: 5px;
643
+ padding: 5px 8px;
644
+ font-size: 12px;
645
+ outline: none;
646
+ }
647
+ .tf-dropdown-input:focus { border-color: var(--accent); }
648
+ .tf-dropdown-add-btn {
649
+ padding: 5px 10px;
650
+ font-size: 12px;
651
+ border-radius: 5px;
652
+ background: var(--accent);
653
+ color: #fff;
654
+ border: none;
655
+ cursor: pointer;
656
+ }
657
+ .tf-dropdown-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
658
+ .tf-dropdown-group-hdr {
659
+ display: flex;
660
+ align-items: center;
661
+ justify-content: space-between;
662
+ width: 100%;
663
+ padding: 5px 14px 4px;
664
+ font-size: 10px;
665
+ font-weight: 600;
666
+ text-transform: uppercase;
667
+ letter-spacing: 0.07em;
668
+ color: var(--text-muted);
669
+ background: transparent;
670
+ border: none;
671
+ cursor: pointer;
672
+ }
673
+ .tf-dropdown-group-hdr:hover { background: var(--toolbar-hover); }
674
+ .tf-dropdown-chevron {
675
+ font-size: 10px;
676
+ display: inline-block;
677
+ transition: transform 0.15s;
678
+ line-height: 1;
679
+ }
680
+ .tf-dropdown-chevron.collapsed { transform: rotate(180deg); }
681
+ .tf-dropdown-row {
682
+ display: flex;
683
+ align-items: center;
684
+ justify-content: space-between;
685
+ width: 100%;
686
+ padding: 5px 14px 5px 22px;
687
+ font-size: 13px;
688
+ color: var(--text);
689
+ background: transparent;
690
+ border: none;
691
+ cursor: pointer;
692
+ text-align: left;
693
+ }
694
+ .tf-dropdown-row:hover { background: var(--toolbar-hover); }
695
+ .tf-dropdown-row.active { background: var(--accent); color: #fff; }
696
+ .tf-dropdown-row.active .tf-star { color: #fff; }
697
+ .tf-star { color: var(--text-muted, #555); font-size: 12px; flex-shrink: 0; transition: color 0.1s; }
698
+ .tf-star.favorited { color: #f5a623; }
699
+ .tf-star-btn {
700
+ display: inline-flex;
701
+ align-items: center;
702
+ justify-content: center;
703
+ padding: 2px 3px;
704
+ background: transparent;
705
+ border: none;
706
+ cursor: pointer;
707
+ border-radius: 3px;
708
+ line-height: 1;
709
+ }
710
+ .tf-star-btn:hover { background: rgba(128,128,128,0.15); }
711
+
712
+ /* ── Layout dropdown ─────────────────────────────────────────────────────── */
713
+ .layout-menu-root { position: relative; }
714
+
715
+ .layout-dropdown {
716
+ position: absolute;
717
+ top: calc(100% + 6px);
718
+ right: 0;
719
+ min-width: 220px;
720
+ background: var(--toolbar-bg);
721
+ border: 1px solid var(--border);
722
+ border-radius: 8px;
723
+ padding: 6px 0;
724
+ z-index: 1000;
725
+ box-shadow: 0 8px 24px rgba(0,0,0,0.35);
726
+ }
727
+
728
+ .layout-dropdown-item {
729
+ display: flex;
730
+ align-items: center;
731
+ gap: 8px;
732
+ width: 100%;
733
+ text-align: left;
734
+ padding: 7px 14px;
735
+ background: transparent;
736
+ border: none !important;
737
+ border-radius: 0 !important;
738
+ color: var(--text);
739
+ font-size: 13px;
740
+ cursor: pointer;
741
+ white-space: nowrap;
742
+ overflow: hidden;
743
+ text-overflow: ellipsis;
744
+ }
745
+ .layout-menu-icon {
746
+ width: 13px;
747
+ height: 13px;
748
+ flex-shrink: 0;
749
+ opacity: 0.75;
750
+ }
751
+ .layout-dropdown-item:hover { background: var(--toolbar-hover); border-color: transparent !important; }
752
+
753
+ .layout-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
754
+
755
+ .layout-dropdown-section {
756
+ padding: 4px 14px 3px;
757
+ font-size: 11px;
758
+ color: var(--text-muted);
759
+ text-transform: uppercase;
760
+ letter-spacing: 0.5px;
761
+ }
762
+
763
+ .layout-dropdown-empty,
764
+ .layout-dropdown-error {
765
+ padding: 7px 14px;
766
+ font-size: 12px;
767
+ color: var(--text-muted);
768
+ }
769
+ .layout-dropdown-error { color: var(--down); }
770
+
771
+ .layout-save-form {
772
+ padding: 10px 14px;
773
+ display: flex;
774
+ flex-direction: column;
775
+ gap: 8px;
776
+ }
777
+ .layout-save-label { font-size: 12px; color: var(--text-muted); }
778
+
779
+ .layout-save-input {
780
+ background: var(--bg);
781
+ border: 1px solid var(--border);
782
+ border-radius: 4px;
783
+ color: var(--text);
784
+ font-size: 13px;
785
+ padding: 5px 8px;
786
+ outline: none;
787
+ font-family: inherit;
788
+ width: 100%;
789
+ }
790
+ .layout-save-input:focus { border-color: var(--accent); }
791
+
792
+ .layout-save-actions {
793
+ display: flex;
794
+ gap: 6px;
795
+ justify-content: flex-end;
796
+ }
797
+
798
+ /* Active layout highlighted in the list */
799
+ .layout-dropdown-item--current {
800
+ color: var(--accent);
801
+ font-weight: 600;
802
+ }
803
+
804
+ /* Auto-save toggle row */
805
+ .layout-autosave-row {
806
+ display: flex;
807
+ align-items: center;
808
+ gap: 6px;
809
+ cursor: pointer;
810
+ user-select: none;
811
+ }
812
+ .layout-autosave-icon { display: flex; align-items: center; }
813
+ .layout-autosave-status { margin-left: auto; font-size: 11px; }
814
+ /* Toggle switch replacing the old checkbox */
815
+ .layout-toggle-switch {
816
+ position: relative;
817
+ display: inline-block;
818
+ width: 32px;
819
+ height: 18px;
820
+ border-radius: 9px;
821
+ background: var(--border);
822
+ cursor: pointer;
823
+ flex-shrink: 0;
824
+ transition: background 0.2s;
825
+ }
826
+ .layout-toggle-switch.on { background: var(--toggle-track); }
827
+ .layout-toggle-thumb {
828
+ position: absolute;
829
+ top: 2px;
830
+ left: 2px;
831
+ width: 14px;
832
+ height: 14px;
833
+ border-radius: 50%;
834
+ background: var(--toggle-thumb);
835
+ transition: transform 0.2s;
836
+ pointer-events: none;
837
+ }
838
+ .layout-toggle-switch.on .layout-toggle-thumb { transform: translateX(14px); }
839
+
840
+ /* Pulsing dot on the button when auto-save is active */
841
+ .layout-autosave-dot {
842
+ display: inline-block;
843
+ width: 6px;
844
+ height: 6px;
845
+ border-radius: 50%;
846
+ background: var(--up);
847
+ flex-shrink: 0;
848
+ animation: autosave-pulse 2s ease-in-out infinite;
849
+ }
850
+ @keyframes autosave-pulse {
851
+ 0%, 100% { opacity: 1; }
852
+ 50% { opacity: 0.35; }
853
+ }
854
+
855
+ /* ── Toolbar separator ───────────────────────────────────────────────────── */
856
+ .toolbar-sep {
857
+ width: 1px;
858
+ align-self: stretch;
859
+ background: var(--border);
860
+ margin: 3px 2px;
861
+ flex-shrink: 0;
862
+ }
863
+
864
+ /* ── Drawing context menu ──────────────────────────────────────────────────── */
865
+ .drawing-ctx-backdrop {
866
+ position: fixed;
867
+ inset: 0;
868
+ z-index: 9998;
869
+ }
870
+ .drawing-ctx-menu {
871
+ position: fixed;
872
+ z-index: 9999;
873
+ background: var(--toolbar-bg, #111);
874
+ border: 1px solid var(--border);
875
+ border-radius: 6px;
876
+ padding: 4px 0;
877
+ min-width: 130px;
878
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
879
+ }
880
+ .drawing-ctx-item {
881
+ display: block;
882
+ width: 100%;
883
+ background: none;
884
+ border: none;
885
+ color: var(--text, #e0e0e0);
886
+ font-size: 13px;
887
+ text-align: left;
888
+ padding: 6px 14px;
889
+ cursor: pointer;
890
+ }
891
+ .drawing-ctx-item:hover {
892
+ background: var(--toolbar-hover, #222);
893
+ }
894
+
895
+ /* ── Indicators trigger button ───────────────────────────────────────────── */
896
+ .ind-trigger {
897
+ display: inline-flex;
898
+ align-items: center;
899
+ gap: 5px;
900
+ padding: 4px 10px;
901
+ background: transparent;
902
+ color: var(--text-muted);
903
+ border: 1px solid transparent;
904
+ border-radius: 6px;
905
+ font-size: 12.5px;
906
+ font-family: inherit;
907
+ cursor: pointer;
908
+ transition: background 0.15s, color 0.15s;
909
+ white-space: nowrap;
910
+ }
911
+ .ind-trigger:hover,
912
+ .ind-trigger.active {
913
+ background: var(--toolbar-hover);
914
+ color: var(--text);
915
+ }
916
+
917
+ /* ── Indicators dialog ───────────────────────────────────────────────────── */
918
+ .ind-backdrop {
919
+ position: fixed;
920
+ inset: 0;
921
+ z-index: 10000;
922
+ background: var(--backdrop);
923
+ display: flex;
924
+ align-items: center;
925
+ justify-content: center;
926
+ padding: 24px;
927
+ }
928
+ .ind-dialog {
929
+ background: var(--toolbar-bg);
930
+ border: 1px solid var(--border);
931
+ border-radius: 12px;
932
+ width: 520px;
933
+ max-width: 100%;
934
+ max-height: 82vh;
935
+ display: flex;
936
+ flex-direction: column;
937
+ box-shadow: var(--shadow-dialog);
938
+ overflow: hidden;
939
+ }
940
+ .ind-header {
941
+ display: flex;
942
+ align-items: center;
943
+ justify-content: space-between;
944
+ padding: 14px 18px;
945
+ border-bottom: 1px solid var(--border);
946
+ flex-shrink: 0;
947
+ }
948
+ .ind-title {
949
+ font-weight: 700;
950
+ font-size: 14.5px;
951
+ color: var(--text);
952
+ }
953
+ .ind-close {
954
+ background: none;
955
+ border: none;
956
+ color: var(--text-muted);
957
+ cursor: pointer;
958
+ padding: 4px;
959
+ display: flex;
960
+ align-items: center;
961
+ border-radius: 4px;
962
+ }
963
+ .ind-close:hover { color: var(--text); background: var(--toolbar-hover); }
964
+
965
+ /* search */
966
+ .ind-search-row {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 10px;
970
+ padding: 12px 16px;
971
+ border-bottom: 1px solid var(--border);
972
+ flex-shrink: 0;
973
+ }
974
+ .ind-search-input {
975
+ flex: 1;
976
+ background: none;
977
+ border: none;
978
+ outline: none;
979
+ color: var(--text);
980
+ font-size: 13.5px;
981
+ font-family: inherit;
982
+ }
983
+ .ind-search-input::placeholder { color: var(--text-muted); }
984
+ .ind-search-clear {
985
+ background: none;
986
+ border: none;
987
+ color: var(--text-muted);
988
+ cursor: pointer;
989
+ padding: 2px;
990
+ display: flex;
991
+ align-items: center;
992
+ border-radius: 4px;
993
+ }
994
+ .ind-search-clear:hover { color: var(--text); }
995
+
996
+ /* category tabs */
997
+ .ind-tabs {
998
+ display: flex;
999
+ gap: 0;
1000
+ padding: 8px 12px 0;
1001
+ border-bottom: 1px solid var(--border);
1002
+ flex-shrink: 0;
1003
+ overflow-x: auto;
1004
+ }
1005
+ .ind-tab {
1006
+ background: none;
1007
+ border: none;
1008
+ border-bottom: 2px solid transparent;
1009
+ color: var(--text-muted);
1010
+ cursor: pointer;
1011
+ font-size: 12.5px;
1012
+ font-family: inherit;
1013
+ font-weight: 500;
1014
+ padding: 6px 14px 8px;
1015
+ white-space: nowrap;
1016
+ transition: color 0.12s, border-color 0.12s;
1017
+ }
1018
+ .ind-tab:hover { color: var(--text); }
1019
+ .ind-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
1020
+
1021
+ /* list */
1022
+ .ind-list-wrap {
1023
+ flex: 1;
1024
+ overflow-y: auto;
1025
+ padding: 0 0 8px;
1026
+ min-height: 0;
1027
+ }
1028
+ .ind-empty {
1029
+ padding: 36px;
1030
+ text-align: center;
1031
+ color: var(--text-muted);
1032
+ font-size: 13px;
1033
+ }
1034
+ .ind-section-hdr {
1035
+ display: flex;
1036
+ align-items: center;
1037
+ gap: 8px;
1038
+ padding: 10px 18px 6px;
1039
+ font-size: 10.5px;
1040
+ font-weight: 700;
1041
+ text-transform: uppercase;
1042
+ letter-spacing: 0.07em;
1043
+ color: var(--text-muted);
1044
+ border-bottom: 1px solid var(--border);
1045
+ }
1046
+ .ind-section-count {
1047
+ font-size: 10px;
1048
+ background: var(--toolbar-hover);
1049
+ color: var(--text-muted);
1050
+ padding: 1px 6px;
1051
+ border-radius: 10px;
1052
+ font-weight: 600;
1053
+ }
1054
+ .ind-list-row {
1055
+ display: flex;
1056
+ align-items: center;
1057
+ gap: 10px;
1058
+ width: 100%;
1059
+ padding: 9px 18px;
1060
+ background: transparent;
1061
+ border: none;
1062
+ border-bottom: 1px solid var(--border);
1063
+ cursor: pointer;
1064
+ text-align: left;
1065
+ font-family: inherit;
1066
+ transition: background 0.1s;
1067
+ }
1068
+ .ind-list-row:last-child { border-bottom: none; }
1069
+ .ind-list-row:hover { background: var(--toolbar-hover); }
1070
+ .ind-list-row.added { background: var(--success-bg); }
1071
+ .ind-list-info {
1072
+ flex: 1;
1073
+ display: flex;
1074
+ flex-direction: column;
1075
+ gap: 2px;
1076
+ min-width: 0;
1077
+ }
1078
+ .ind-list-name {
1079
+ font-size: 13.5px;
1080
+ font-weight: 600;
1081
+ color: var(--text);
1082
+ white-space: nowrap;
1083
+ overflow: hidden;
1084
+ text-overflow: ellipsis;
1085
+ }
1086
+ .ind-list-meta {
1087
+ font-size: 11px;
1088
+ color: var(--text-muted);
1089
+ }
1090
+ .ind-list-badge {
1091
+ flex-shrink: 0;
1092
+ font-size: 10px;
1093
+ font-weight: 600;
1094
+ text-transform: uppercase;
1095
+ letter-spacing: 0.4px;
1096
+ padding: 2px 7px;
1097
+ border-radius: 4px;
1098
+ }
1099
+ .ind-list-badge.overlay {
1100
+ color: var(--primary);
1101
+ background: var(--primary-bg);
1102
+ }
1103
+ .ind-list-badge.pane {
1104
+ color: var(--text-muted);
1105
+ background: var(--toolbar-hover);
1106
+ }
1107
+ .ind-list-add {
1108
+ flex-shrink: 0;
1109
+ font-size: 11.5px;
1110
+ font-weight: 600;
1111
+ color: var(--primary);
1112
+ display: flex;
1113
+ align-items: center;
1114
+ gap: 4px;
1115
+ opacity: 0;
1116
+ transition: opacity 0.12s;
1117
+ white-space: nowrap;
1118
+ }
1119
+ .ind-list-row:hover .ind-list-add { opacity: 1; }
1120
+ .ind-list-row.added .ind-list-add {
1121
+ opacity: 1;
1122
+ color: var(--success);
1123
+ }
1124
+
1125
+ /* ── Symbol trigger button ───────────────────────────────────────────────── */
1126
+ .sym-trigger {
1127
+ display: inline-flex;
1128
+ align-items: center;
1129
+ gap: 6px;
1130
+ padding: 4px 10px;
1131
+ background: transparent;
1132
+ color: var(--text-muted);
1133
+ border: 1px solid transparent;
1134
+ border-radius: 6px;
1135
+ font-size: 13px;
1136
+ font-weight: 600;
1137
+ font-family: inherit;
1138
+ cursor: pointer;
1139
+ transition: background 0.15s, color 0.15s;
1140
+ white-space: nowrap;
1141
+ }
1142
+ .sym-trigger:hover {
1143
+ background: var(--toolbar-hover);
1144
+ color: var(--text);
1145
+ }
1146
+ .sym-trigger svg { flex-shrink: 0; opacity: 0.6; }
1147
+
1148
+ /* Symbol search dialog */
1149
+ .sym-backdrop {
1150
+ position: fixed;
1151
+ inset: 0;
1152
+ z-index: 10000;
1153
+ background: var(--backdrop);
1154
+ display: flex;
1155
+ align-items: center;
1156
+ justify-content: center;
1157
+ padding: 24px;
1158
+ }
1159
+ .sym-dialog {
1160
+ background: var(--toolbar-bg);
1161
+ border: 1px solid var(--border);
1162
+ border-radius: 10px;
1163
+ width: 680px;
1164
+ max-width: 100%;
1165
+ max-height: 82vh;
1166
+ display: flex;
1167
+ flex-direction: column;
1168
+ box-shadow: var(--shadow-dialog);
1169
+ overflow: hidden;
1170
+ }
1171
+
1172
+ /* header */
1173
+ .sym-header {
1174
+ display: flex;
1175
+ align-items: center;
1176
+ justify-content: space-between;
1177
+ padding: 13px 16px 10px;
1178
+ flex-shrink: 0;
1179
+ border-bottom: 1px solid var(--border);
1180
+ }
1181
+ .sym-header-title {
1182
+ font-size: 13.5px;
1183
+ font-weight: 600;
1184
+ color: var(--text);
1185
+ }
1186
+ .sym-header-close {
1187
+ background: none;
1188
+ border: none;
1189
+ color: var(--text-muted);
1190
+ cursor: pointer;
1191
+ padding: 4px;
1192
+ display: flex;
1193
+ align-items: center;
1194
+ border-radius: 4px;
1195
+ transition: color 0.1s, background 0.1s;
1196
+ }
1197
+ .sym-header-close:hover { color: var(--text); background: var(--toolbar-hover); }
1198
+
1199
+ /* search row */
1200
+ .sym-search-row {
1201
+ display: flex;
1202
+ align-items: center;
1203
+ gap: 10px;
1204
+ padding: 10px 16px;
1205
+ border-bottom: 1px solid var(--border);
1206
+ flex-shrink: 0;
1207
+ }
1208
+ .sym-search-icon { color: var(--text-muted); flex-shrink: 0; }
1209
+ .sym-search-input {
1210
+ flex: 1;
1211
+ background: none;
1212
+ border: none;
1213
+ outline: none;
1214
+ color: var(--text);
1215
+ font-size: 14px;
1216
+ font-family: inherit;
1217
+ }
1218
+ .sym-search-input::placeholder { color: var(--text-muted); }
1219
+ .sym-search-clear {
1220
+ background: none;
1221
+ border: none;
1222
+ color: var(--text-muted);
1223
+ cursor: pointer;
1224
+ padding: 2px;
1225
+ display: flex;
1226
+ align-items: center;
1227
+ border-radius: 4px;
1228
+ flex-shrink: 0;
1229
+ transition: color 0.1s;
1230
+ }
1231
+ .sym-search-clear:hover { color: var(--text); }
1232
+
1233
+ /* pill tabs */
1234
+ .sym-tabs {
1235
+ display: flex;
1236
+ gap: 4px;
1237
+ padding: 8px 14px;
1238
+ flex-shrink: 0;
1239
+ border-bottom: 1px solid var(--border);
1240
+ overflow-x: auto;
1241
+ scrollbar-width: none;
1242
+ }
1243
+ .sym-tabs::-webkit-scrollbar { display: none; }
1244
+ .sym-tab {
1245
+ background: none;
1246
+ border: none;
1247
+ color: var(--text-muted);
1248
+ cursor: pointer;
1249
+ font-size: 12px;
1250
+ font-family: inherit;
1251
+ font-weight: 500;
1252
+ padding: 4px 12px;
1253
+ white-space: nowrap;
1254
+ border-radius: 20px;
1255
+ transition: background 0.12s, color 0.12s;
1256
+ }
1257
+ .sym-tab:hover { background: var(--toolbar-hover); color: var(--text); }
1258
+ .sym-tab.active { background: var(--text); color: var(--toolbar-bg); font-weight: 600; }
1259
+
1260
+ /* results list */
1261
+ .sym-list-wrap {
1262
+ flex: 1;
1263
+ overflow-y: auto;
1264
+ min-height: 0;
1265
+ }
1266
+ .sym-empty {
1267
+ padding: 36px;
1268
+ text-align: center;
1269
+ color: var(--text-muted);
1270
+ font-size: 13px;
1271
+ }
1272
+ .sym-sentinel {
1273
+ height: 1px;
1274
+ flex-shrink: 0;
1275
+ }
1276
+ .sym-loading-more {
1277
+ padding: 10px;
1278
+ text-align: center;
1279
+ color: var(--text-muted);
1280
+ font-size: 12px;
1281
+ }
1282
+ .sym-list {
1283
+ display: flex;
1284
+ flex-direction: column;
1285
+ }
1286
+ .sym-row {
1287
+ display: flex;
1288
+ align-items: center;
1289
+ gap: 10px;
1290
+ padding: 7px 14px;
1291
+ background: none;
1292
+ border: none;
1293
+ cursor: pointer;
1294
+ text-align: left;
1295
+ width: 100%;
1296
+ min-height: 46px;
1297
+ transition: background 0.1s;
1298
+ border-bottom: 1px solid transparent;
1299
+ }
1300
+ .sym-row:hover { background: var(--toolbar-hover); }
1301
+ .sym-row.active { background: var(--primary-bg); }
1302
+ .sym-row + .sym-row { border-top: 1px solid var(--border); }
1303
+ .sym-row-icon {
1304
+ width: 30px;
1305
+ height: 30px;
1306
+ border-radius: 50%;
1307
+ display: flex;
1308
+ align-items: center;
1309
+ justify-content: center;
1310
+ font-size: 13px;
1311
+ font-weight: 700;
1312
+ color: #fff;
1313
+ flex-shrink: 0;
1314
+ letter-spacing: 0;
1315
+ overflow: hidden;
1316
+ }
1317
+ .sym-logo-img {
1318
+ width: 100%;
1319
+ height: 100%;
1320
+ object-fit: contain;
1321
+ border-radius: 50%;
1322
+ display: block;
1323
+ }
1324
+ .sym-row-info {
1325
+ flex: 1;
1326
+ display: flex;
1327
+ flex-direction: column;
1328
+ align-items: flex-start;
1329
+ min-width: 0;
1330
+ gap: 1px;
1331
+ }
1332
+ .sym-row-ticker {
1333
+ font-size: 13px;
1334
+ font-weight: 600;
1335
+ color: var(--text);
1336
+ white-space: nowrap;
1337
+ }
1338
+ .sym-row-name {
1339
+ font-size: 11px;
1340
+ color: var(--text-muted);
1341
+ white-space: nowrap;
1342
+ overflow: hidden;
1343
+ text-overflow: ellipsis;
1344
+ max-width: 280px;
1345
+ }
1346
+ .sym-row-badge {
1347
+ font-size: 10px;
1348
+ color: var(--text-muted);
1349
+ background: var(--toolbar-hover);
1350
+ border-radius: 4px;
1351
+ padding: 2px 7px;
1352
+ white-space: nowrap;
1353
+ flex-shrink: 0;
1354
+ border: 1px solid var(--border);
1355
+ }
1356
+ .sym-row-exchange {
1357
+ font-size: 11.5px;
1358
+ color: var(--text-muted);
1359
+ white-space: nowrap;
1360
+ flex-shrink: 0;
1361
+ min-width: 60px;
1362
+ text-align: right;
1363
+ }
1364
+ .sym-row-exch-icon {
1365
+ width: 22px;
1366
+ height: 22px;
1367
+ border-radius: 50%;
1368
+ display: flex;
1369
+ align-items: center;
1370
+ justify-content: center;
1371
+ font-size: 7px;
1372
+ font-weight: 700;
1373
+ color: #fff;
1374
+ flex-shrink: 0;
1375
+ letter-spacing: 0;
1376
+ }
1377
+
1378
+ /* footer */
1379
+ .sym-footer {
1380
+ padding: 8px 14px;
1381
+ font-size: 11px;
1382
+ color: var(--text-muted);
1383
+ text-align: center;
1384
+ border-top: 1px solid var(--border);
1385
+ flex-shrink: 0;
1386
+ }
1387
+
1388
+ select {
1389
+ background: var(--bg-secondary);
1390
+ color: var(--text);
1391
+ border: 1px solid var(--border);
1392
+ border-radius: 4px;
1393
+ padding: 4px 8px;
1394
+ font-size: 12px;
1395
+ font-family: inherit;
1396
+ outline: none;
1397
+ }
1398
+
1399
+ /* ── Bottom bar ──────────────────────────────────────────────────────────── */
1400
+ .bottom-bar {
1401
+ display: flex;
1402
+ align-items: center;
1403
+ justify-content: space-between;
1404
+ padding: 0 8px;
1405
+ height: 24px;
1406
+ background: var(--toolbar-bg);
1407
+ border-radius: 8px;
1408
+ flex-shrink: 0;
1409
+ }
1410
+
1411
+ .bottom-bar-left {
1412
+ display: flex;
1413
+ align-items: center;
1414
+ gap: 4px;
1415
+ position: relative;
1416
+ }
1417
+
1418
+ .bottom-bar-right {
1419
+ display: flex;
1420
+ align-items: center;
1421
+ gap: 4px;
1422
+ position: relative;
1423
+ }
1424
+
1425
+ .bottom-bar-btn {
1426
+ display: flex;
1427
+ align-items: center;
1428
+ gap: 5px;
1429
+ padding: 2px 8px;
1430
+ background: transparent;
1431
+ border: none !important;
1432
+ border-radius: 4px;
1433
+ color: var(--text-muted);
1434
+ font-size: 12px;
1435
+ cursor: pointer;
1436
+ white-space: nowrap;
1437
+ }
1438
+ .bottom-bar-btn:hover { background: var(--toolbar-hover); color: var(--text); }
1439
+ .bottom-bar-btn.active { color: var(--text); background: var(--toolbar-hover); }
1440
+
1441
+ .bottom-bar-clock {
1442
+ display: flex;
1443
+ align-items: center;
1444
+ padding: 2px 6px;
1445
+ color: var(--text-muted);
1446
+ font-size: 12px;
1447
+ font-variant-numeric: tabular-nums;
1448
+ letter-spacing: 0.03em;
1449
+ white-space: nowrap;
1450
+ pointer-events: none;
1451
+ user-select: none;
1452
+ }
1453
+
1454
+ /* Dropdown opens upward */
1455
+ .bottom-bar-dropdown {
1456
+ position: absolute;
1457
+ bottom: calc(100% + 6px);
1458
+ left: 0;
1459
+ min-width: 220px;
1460
+ max-height: 360px;
1461
+ overflow-y: auto;
1462
+ background: var(--toolbar-bg);
1463
+ border: 1px solid var(--border);
1464
+ border-radius: 8px;
1465
+ padding: 4px 0;
1466
+ z-index: 1000;
1467
+ box-shadow: 0 -8px 24px rgba(0,0,0,0.35);
1468
+ scrollbar-width: thin;
1469
+ scrollbar-color: var(--border) transparent;
1470
+ }
1471
+ .bottom-bar-dropdown::-webkit-scrollbar { width: 5px; }
1472
+ .bottom-bar-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
1473
+
1474
+ .bottom-bar-dropdown-section {
1475
+ padding: 4px 14px 3px;
1476
+ font-size: 11px;
1477
+ color: var(--text-muted);
1478
+ text-transform: uppercase;
1479
+ letter-spacing: 0.5px;
1480
+ pointer-events: none;
1481
+ }
1482
+
1483
+ .bottom-bar-dropdown-item {
1484
+ display: flex;
1485
+ align-items: center;
1486
+ gap: 6px;
1487
+ width: 100%;
1488
+ text-align: left;
1489
+ padding: 6px 14px 6px 30px;
1490
+ background: transparent;
1491
+ border: none !important;
1492
+ border-radius: 0;
1493
+ color: var(--text);
1494
+ font-size: 13px;
1495
+ cursor: pointer;
1496
+ white-space: nowrap;
1497
+ overflow: hidden;
1498
+ text-overflow: ellipsis;
1499
+ position: relative;
1500
+ }
1501
+ .bottom-bar-dropdown-item:hover { background: var(--toolbar-hover); }
1502
+ .bottom-bar-dropdown-item.current { color: var(--accent); }
1503
+
1504
+ .bottom-bar-check {
1505
+ position: absolute;
1506
+ left: 10px;
1507
+ color: var(--accent);
1508
+ font-size: 11px;
1509
+ }
1510
+
1511
+ /* Session dropdown anchored to the right edge */
1512
+ .bottom-bar-dropdown--right {
1513
+ left: auto;
1514
+ right: 0;
1515
+ min-width: 260px;
1516
+ }
1517
+
1518
+ /* Two-line session option label */
1519
+ .bottom-bar-session-label {
1520
+ display: flex;
1521
+ flex-direction: column;
1522
+ gap: 2px;
1523
+ white-space: normal;
1524
+ line-height: 1.3;
1525
+ }
1526
+ .bottom-bar-session-label strong {
1527
+ font-size: 13px;
1528
+ font-weight: 600;
1529
+ color: var(--text);
1530
+ }
1531
+ .bottom-bar-session-label span {
1532
+ font-size: 11px;
1533
+ color: var(--text-muted);
1534
+ }
1535
+
1536
+ /* ── Script Drawer ───────────────────────────────────────────────────────────── */
1537
+ /* ── FloatingPanel shell ─────────────────────────────────────────────────── */
1538
+ .fp-shell {
1539
+ position: fixed;
1540
+ z-index: 200;
1541
+ background: var(--toolbar-bg);
1542
+ border: 1px solid var(--border);
1543
+ border-radius: 8px;
1544
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
1545
+ display: flex;
1546
+ flex-direction: column;
1547
+ overflow: hidden;
1548
+ min-width: 200px;
1549
+ min-height: 120px;
1550
+ }
1551
+
1552
+ .fp-titlebar {
1553
+ display: flex;
1554
+ align-items: center;
1555
+ justify-content: space-between;
1556
+ padding: 8px 12px;
1557
+ border-bottom: 1px solid var(--border);
1558
+ flex-shrink: 0;
1559
+ cursor: grab;
1560
+ user-select: none;
1561
+ background: var(--toolbar-bg);
1562
+ }
1563
+ .fp-titlebar:active { cursor: grabbing; }
1564
+
1565
+ .fp-title {
1566
+ display: flex;
1567
+ align-items: center;
1568
+ gap: 7px;
1569
+ font-size: 13px;
1570
+ font-weight: 700;
1571
+ color: var(--text);
1572
+ pointer-events: none;
1573
+ }
1574
+
1575
+ .fp-close {
1576
+ background: none;
1577
+ border: none !important;
1578
+ color: var(--text-muted);
1579
+ padding: 4px;
1580
+ display: flex;
1581
+ align-items: center;
1582
+ border-radius: 4px;
1583
+ cursor: pointer;
1584
+ flex-shrink: 0;
1585
+ }
1586
+ .fp-close:hover { color: var(--text); background: var(--toolbar-hover) !important; }
1587
+
1588
+ .fp-content {
1589
+ flex: 1;
1590
+ display: flex;
1591
+ flex-direction: column;
1592
+ min-height: 0;
1593
+ overflow: hidden;
1594
+ }
1595
+
1596
+ /* Resize handles — 8 edges + corners */
1597
+ .fp-resize {
1598
+ position: absolute;
1599
+ z-index: 10;
1600
+ }
1601
+ .fp-resize-n { top: -3px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
1602
+ .fp-resize-s { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: s-resize; }
1603
+ .fp-resize-e { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: e-resize; }
1604
+ .fp-resize-w { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: w-resize; }
1605
+ .fp-resize-nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nw-resize; }
1606
+ .fp-resize-ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: ne-resize; }
1607
+ .fp-resize-sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: sw-resize; }
1608
+ .fp-resize-se { bottom: -3px; right: -3px; width: 12px; height: 12px; cursor: se-resize; }
1609
+
1610
+ .script-drawer {
1611
+ flex-shrink: 0;
1612
+ position: relative;
1613
+ display: flex;
1614
+ flex-direction: column;
1615
+ background: var(--toolbar-bg);
1616
+ border: 1px solid var(--border);
1617
+ border-radius: 8px;
1618
+ overflow: hidden;
1619
+ min-height: 0;
1620
+ }
1621
+
1622
+ .script-drawer-resize {
1623
+ position: absolute;
1624
+ left: 0;
1625
+ top: 0;
1626
+ bottom: 0;
1627
+ width: 5px;
1628
+ cursor: col-resize;
1629
+ z-index: 10;
1630
+ border-radius: 8px 0 0 8px;
1631
+ }
1632
+ .script-drawer-resize:hover,
1633
+ .script-drawer-resize:active {
1634
+ background: var(--accent);
1635
+ opacity: 0.25;
1636
+ }
1637
+
1638
+ .script-drawer-header {
1639
+ display: flex;
1640
+ align-items: center;
1641
+ justify-content: space-between;
1642
+ padding: 10px 14px 10px 16px;
1643
+ border-bottom: 1px solid var(--border);
1644
+ flex-shrink: 0;
1645
+ gap: 8px;
1646
+ }
1647
+
1648
+ .script-drawer-title {
1649
+ display: flex;
1650
+ align-items: center;
1651
+ gap: 7px;
1652
+ font-size: 13px;
1653
+ font-weight: 600;
1654
+ color: var(--text);
1655
+ user-select: none;
1656
+ }
1657
+
1658
+ .script-close-btn {
1659
+ display: flex;
1660
+ align-items: center;
1661
+ justify-content: center;
1662
+ background: none;
1663
+ border: none !important;
1664
+ border-radius: 4px !important;
1665
+ color: var(--text-muted);
1666
+ cursor: pointer;
1667
+ padding: 4px;
1668
+ flex-shrink: 0;
1669
+ }
1670
+ .script-close-btn:hover {
1671
+ background: var(--toolbar-hover) !important;
1672
+ color: var(--text);
1673
+ }
1674
+
1675
+ /* Header actions (Save + My Scripts + Close) */
1676
+ .script-header-actions {
1677
+ display: flex;
1678
+ align-items: center;
1679
+ gap: 4px;
1680
+ flex-shrink: 0;
1681
+ }
1682
+
1683
+ .script-header-btn {
1684
+ display: inline-flex;
1685
+ align-items: center;
1686
+ gap: 4px;
1687
+ background: none;
1688
+ border: 1px solid var(--border) !important;
1689
+ border-radius: 4px !important;
1690
+ color: var(--text-muted);
1691
+ cursor: pointer;
1692
+ padding: 3px 8px;
1693
+ font-size: 11px;
1694
+ font-weight: 500;
1695
+ white-space: nowrap;
1696
+ transition: background 0.12s, color 0.12s;
1697
+ }
1698
+ .script-header-btn:hover {
1699
+ background: var(--toolbar-hover) !important;
1700
+ color: var(--text);
1701
+ }
1702
+ .script-header-btn:disabled {
1703
+ opacity: 0.5;
1704
+ cursor: default;
1705
+ }
1706
+
1707
+ /* My Scripts dropdown wrapper */
1708
+ .script-my-scripts-wrap {
1709
+ position: relative;
1710
+ }
1711
+
1712
+ .script-my-scripts-dropdown {
1713
+ position: absolute;
1714
+ top: calc(100% + 6px);
1715
+ right: 0;
1716
+ min-width: 260px;
1717
+ max-height: 340px;
1718
+ overflow-y: auto;
1719
+ background: var(--toolbar-bg);
1720
+ border: 1px solid var(--border);
1721
+ border-radius: 6px;
1722
+ box-shadow: 0 6px 20px rgba(0,0,0,0.35);
1723
+ z-index: 100;
1724
+ padding: 4px 0;
1725
+ }
1726
+
1727
+ .script-my-scripts-empty {
1728
+ padding: 14px 16px;
1729
+ font-size: 12px;
1730
+ color: var(--text-muted);
1731
+ text-align: center;
1732
+ }
1733
+
1734
+ /* Save-name inline prompt at top of dropdown */
1735
+ .script-save-name-prompt {
1736
+ display: flex;
1737
+ align-items: center;
1738
+ gap: 6px;
1739
+ padding: 8px 10px;
1740
+ border-bottom: 1px solid var(--border);
1741
+ }
1742
+ .script-save-name-input {
1743
+ flex: 1;
1744
+ background: var(--bg);
1745
+ border: 1px solid var(--border);
1746
+ border-radius: 4px;
1747
+ color: var(--text);
1748
+ font-size: 12px;
1749
+ padding: 4px 8px;
1750
+ outline: none;
1751
+ }
1752
+ .script-save-name-input:focus {
1753
+ border-color: var(--accent);
1754
+ }
1755
+ .script-save-name-confirm {
1756
+ background: var(--accent);
1757
+ color: #fff;
1758
+ border: none !important;
1759
+ border-radius: 4px !important;
1760
+ font-size: 11px;
1761
+ font-weight: 600;
1762
+ padding: 4px 10px;
1763
+ cursor: pointer;
1764
+ white-space: nowrap;
1765
+ }
1766
+ .script-save-name-confirm:hover { opacity: 0.9; }
1767
+ .script-save-name-confirm:disabled { opacity: 0.5; cursor: default; }
1768
+
1769
+ /* Individual script row */
1770
+ .script-my-scripts-item {
1771
+ display: flex;
1772
+ align-items: center;
1773
+ gap: 4px;
1774
+ padding: 0 4px 0 0;
1775
+ }
1776
+ .script-my-scripts-load {
1777
+ flex: 1;
1778
+ display: flex;
1779
+ align-items: center;
1780
+ gap: 8px;
1781
+ background: none;
1782
+ border: none !important;
1783
+ border-radius: 0 !important;
1784
+ color: var(--text);
1785
+ font-size: 12px;
1786
+ padding: 8px 10px;
1787
+ cursor: pointer;
1788
+ text-align: left;
1789
+ overflow: hidden;
1790
+ }
1791
+ .script-my-scripts-load:hover {
1792
+ background: var(--toolbar-hover) !important;
1793
+ }
1794
+ .script-my-scripts-name {
1795
+ overflow: hidden;
1796
+ text-overflow: ellipsis;
1797
+ white-space: nowrap;
1798
+ }
1799
+ .script-my-scripts-delete {
1800
+ display: flex;
1801
+ align-items: center;
1802
+ justify-content: center;
1803
+ background: none;
1804
+ border: none !important;
1805
+ border-radius: 3px !important;
1806
+ color: var(--text-muted);
1807
+ cursor: pointer;
1808
+ padding: 4px;
1809
+ flex-shrink: 0;
1810
+ opacity: 0.5;
1811
+ transition: opacity 0.12s, color 0.12s;
1812
+ }
1813
+ .script-my-scripts-delete:hover {
1814
+ opacity: 1;
1815
+ color: var(--down, #ef5350);
1816
+ background: var(--toolbar-hover) !important;
1817
+ }
1818
+
1819
+ /* Language badge */
1820
+ .script-lang-badge {
1821
+ display: inline-block;
1822
+ font-size: 9px;
1823
+ font-weight: 700;
1824
+ text-transform: uppercase;
1825
+ letter-spacing: 0.5px;
1826
+ padding: 2px 5px;
1827
+ border-radius: 3px;
1828
+ flex-shrink: 0;
1829
+ line-height: 1;
1830
+ }
1831
+ .script-lang-badge.forge {
1832
+ background: rgba(41, 98, 255, 0.15);
1833
+ color: #2962ff;
1834
+ }
1835
+ .script-lang-badge.pine {
1836
+ background: rgba(255, 152, 0, 0.15);
1837
+ color: #ff9800;
1838
+ }
1839
+
1840
+ /* Language tabs */
1841
+ .script-lang-tabs {
1842
+ display: flex;
1843
+ border-bottom: 1px solid var(--border);
1844
+ flex-shrink: 0;
1845
+ }
1846
+
1847
+ .script-lang-tab {
1848
+ flex: 1;
1849
+ background: none;
1850
+ border: none !important;
1851
+ border-bottom: 2px solid transparent !important;
1852
+ border-radius: 0 !important;
1853
+ color: var(--text-muted);
1854
+ font-size: 12.5px;
1855
+ font-weight: 500;
1856
+ padding: 8px 12px;
1857
+ cursor: pointer;
1858
+ transition: color 0.12s, border-color 0.12s;
1859
+ }
1860
+ .script-lang-tab:hover { color: var(--text); }
1861
+ .script-lang-tab.active {
1862
+ color: var(--accent);
1863
+ border-bottom-color: var(--accent) !important;
1864
+ font-weight: 600;
1865
+ }
1866
+
1867
+ /* Reference section */
1868
+ .script-ref-section {
1869
+ border-bottom: 1px solid var(--border);
1870
+ flex-shrink: 0;
1871
+ }
1872
+
1873
+ .script-ref-toggle {
1874
+ width: 100%;
1875
+ display: flex;
1876
+ align-items: center;
1877
+ gap: 7px;
1878
+ background: none;
1879
+ border: none !important;
1880
+ border-radius: 0 !important;
1881
+ color: var(--text-muted);
1882
+ font-size: 12px;
1883
+ text-align: left;
1884
+ padding: 8px 14px;
1885
+ cursor: pointer;
1886
+ }
1887
+ .script-ref-toggle:hover { background: var(--toolbar-hover) !important; color: var(--text); }
1888
+
1889
+ .script-ref-body {
1890
+ padding: 8px 14px 12px;
1891
+ display: flex;
1892
+ flex-direction: column;
1893
+ gap: 6px;
1894
+ max-height: 220px;
1895
+ overflow-y: auto;
1896
+ }
1897
+
1898
+ .script-ref-group-label {
1899
+ font-size: 10px;
1900
+ font-weight: 700;
1901
+ text-transform: uppercase;
1902
+ letter-spacing: 0.06em;
1903
+ color: var(--text-muted);
1904
+ margin-top: 4px;
1905
+ }
1906
+
1907
+ .script-feature-list {
1908
+ display: flex;
1909
+ flex-wrap: wrap;
1910
+ gap: 4px;
1911
+ }
1912
+
1913
+ .script-feature-pill {
1914
+ font-size: 11px;
1915
+ font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
1916
+ padding: 2px 8px;
1917
+ border-radius: 4px;
1918
+ cursor: default;
1919
+ }
1920
+ .script-feature-pill.series { background: var(--primary-bg); color: #64b5f6; }
1921
+ .script-feature-pill.barstate { background: rgba(171,71,188,0.12); color: #ab47bc; }
1922
+ .script-feature-pill.ta { background: rgba(102,187,106,0.12); color: #81c784; }
1923
+ .script-feature-pill.output { background: rgba(239,83,80,0.12); color: #ef5350; }
1924
+ .script-feature-pill.math { background: rgba(255,183,77,0.12); color: #ffb74d; }
1925
+ .script-feature-pill.color { background: rgba(77,208,225,0.12); color: #4dd0e1; }
1926
+ .script-feature-pill.str { background: rgba(255,138,101,0.12); color: #ff8a65; }
1927
+ .script-feature-pill.util { background: rgba(206,147,216,0.12); color: #ce93d8; }
1928
+
1929
+ [data-theme="light"] .script-feature-pill.series { background: var(--primary-bg); color: var(--primary); }
1930
+ [data-theme="light"] .script-feature-pill.barstate { background: rgba(106,27,154,0.10); color: #6a1b9a; }
1931
+ [data-theme="light"] .script-feature-pill.ta { background: rgba(56,142,60,0.10); color: #2e7d32; }
1932
+ [data-theme="light"] .script-feature-pill.output { background: rgba(198,40,40,0.10); color: #c62828; }
1933
+ [data-theme="light"] .script-feature-pill.math { background: rgba(230,81,0,0.10); color: #e65100; }
1934
+ [data-theme="light"] .script-feature-pill.color { background: rgba(0,151,167,0.10); color: #00838f; }
1935
+ [data-theme="light"] .script-feature-pill.str { background: rgba(191,54,12,0.10); color: #bf360c; }
1936
+ [data-theme="light"] .script-feature-pill.util { background: rgba(123,31,162,0.10); color: #7b1fa2; }
1937
+
1938
+ .script-ref-detail {
1939
+ margin-top: 4px;
1940
+ display: flex;
1941
+ flex-direction: column;
1942
+ gap: 3px;
1943
+ }
1944
+
1945
+ .script-ref-row {
1946
+ display: flex;
1947
+ gap: 8px;
1948
+ align-items: baseline;
1949
+ font-size: 11px;
1950
+ }
1951
+
1952
+ .script-ref-fn {
1953
+ font-family: 'JetBrains Mono', 'Fira Code', monospace;
1954
+ color: var(--text);
1955
+ white-space: nowrap;
1956
+ flex-shrink: 0;
1957
+ font-size: 10.5px;
1958
+ }
1959
+
1960
+ .script-ref-desc {
1961
+ color: var(--text-muted);
1962
+ font-size: 10.5px;
1963
+ }
1964
+
1965
+ /* Code editor */
1966
+ .script-editor-wrap {
1967
+ flex: 1;
1968
+ display: flex;
1969
+ min-height: 0;
1970
+ border-bottom: 1px solid var(--border);
1971
+ position: relative;
1972
+ }
1973
+
1974
+ /* ── Converting overlay ────────────────────────────────────── */
1975
+ .script-converting-overlay {
1976
+ position: absolute;
1977
+ inset: 0;
1978
+ z-index: 5;
1979
+ display: flex;
1980
+ flex-direction: column;
1981
+ align-items: center;
1982
+ justify-content: center;
1983
+ gap: 12px;
1984
+ background: rgba(0, 0, 0, 0.35);
1985
+ }
1986
+
1987
+ .script-converting-spinner {
1988
+ width: 36px;
1989
+ height: 36px;
1990
+ border: 3px solid transparent;
1991
+ border-top-color: var(--primary, #2196f3);
1992
+ border-radius: 50%;
1993
+ animation: script-spin 0.8s linear infinite;
1994
+ }
1995
+
1996
+ .script-converting-label {
1997
+ font-size: 12px;
1998
+ font-weight: 500;
1999
+ color: var(--primary, #2196f3);
2000
+ letter-spacing: 0.5px;
2001
+ }
2002
+
2003
+ @keyframes script-spin {
2004
+ to { transform: rotate(360deg); }
2005
+ }
2006
+
2007
+ .script-editor {
2008
+ flex: 1;
2009
+ width: 100%;
2010
+ background: var(--bg);
2011
+ color: var(--text);
2012
+ font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
2013
+ font-size: 12px;
2014
+ line-height: 1.6;
2015
+ resize: none;
2016
+ border: none;
2017
+ outline: none;
2018
+ padding: 12px 14px;
2019
+ tab-size: 2;
2020
+ }
2021
+
2022
+ /* Diagnostics */
2023
+ .script-errors {
2024
+ background: rgba(239, 83, 80, 0.08);
2025
+ border-bottom: 1px solid rgba(239, 83, 80, 0.25);
2026
+ padding: 8px 14px;
2027
+ display: flex;
2028
+ flex-direction: column;
2029
+ gap: 4px;
2030
+ flex-shrink: 0;
2031
+ max-height: 100px;
2032
+ overflow-y: auto;
2033
+ }
2034
+
2035
+ .script-error-line {
2036
+ display: flex;
2037
+ align-items: flex-start;
2038
+ gap: 6px;
2039
+ font-size: 11.5px;
2040
+ color: var(--down, #ef5350);
2041
+ line-height: 1.5;
2042
+ }
2043
+
2044
+ .script-autofix-btn {
2045
+ display: flex;
2046
+ align-items: center;
2047
+ gap: 5px;
2048
+ margin-top: 4px;
2049
+ padding: 4px 10px;
2050
+ font-size: 11px;
2051
+ font-weight: 600;
2052
+ color: #fff;
2053
+ background: var(--primary);
2054
+ border: none;
2055
+ border-radius: 4px;
2056
+ cursor: pointer;
2057
+ align-self: flex-start;
2058
+ }
2059
+ .script-autofix-btn:hover:not(:disabled) { opacity: 0.85; }
2060
+ .script-autofix-btn:disabled { opacity: 0.4; cursor: default; }
2061
+
2062
+ /* Footer */
2063
+ .script-footer {
2064
+ display: flex;
2065
+ align-items: center;
2066
+ gap: 10px;
2067
+ padding: 10px 14px;
2068
+ flex-shrink: 0;
2069
+ }
2070
+
2071
+ .script-overlay-label {
2072
+ display: flex;
2073
+ align-items: center;
2074
+ gap: 6px;
2075
+ font-size: 12px;
2076
+ color: var(--text-muted);
2077
+ cursor: pointer;
2078
+ user-select: none;
2079
+ flex: 1;
2080
+ }
2081
+ .script-overlay-label input[type="checkbox"] { cursor: pointer; }
2082
+
2083
+ .script-run-btn {
2084
+ display: inline-flex;
2085
+ align-items: center;
2086
+ gap: 6px;
2087
+ padding: 6px 14px;
2088
+ /* Dark mode: black bg, white outline, white text */
2089
+ background: var(--bg);
2090
+ color: var(--text);
2091
+ border: 1.5px solid var(--text) !important;
2092
+ border-radius: 5px;
2093
+ font-size: 12.5px;
2094
+ font-weight: 600;
2095
+ cursor: pointer;
2096
+ transition: opacity 0.15s, background 0.15s;
2097
+ white-space: nowrap;
2098
+ }
2099
+ .script-run-btn:hover { background: var(--toolbar-hover); opacity: 1; }
2100
+
2101
+ /* Light mode: filled dark button with white text */
2102
+ [data-theme="light"] .script-run-btn {
2103
+ background: var(--text);
2104
+ color: var(--bg);
2105
+ border-color: var(--text) !important;
2106
+ }
2107
+ [data-theme="light"] .script-run-btn:hover { opacity: 0.85; }
2108
+
2109
+ /* Conversion review panel */
2110
+ .script-conversion-review {
2111
+ flex: 1;
2112
+ display: flex;
2113
+ flex-direction: column;
2114
+ min-height: 0;
2115
+ overflow: hidden;
2116
+ border-bottom: 1px solid var(--border);
2117
+ }
2118
+
2119
+ .script-conversion-header {
2120
+ display: flex;
2121
+ align-items: center;
2122
+ gap: 8px;
2123
+ padding: 10px 14px;
2124
+ font-size: 12.5px;
2125
+ font-weight: 600;
2126
+ color: var(--up, #4caf50);
2127
+ border-bottom: 1px solid var(--border);
2128
+ flex-shrink: 0;
2129
+ }
2130
+
2131
+ .script-conversion-ok {
2132
+ display: flex;
2133
+ align-items: center;
2134
+ gap: 6px;
2135
+ padding: 7px 14px;
2136
+ font-size: 11.5px;
2137
+ color: var(--up, #4caf50);
2138
+ background: rgba(76, 175, 80, 0.06);
2139
+ border-bottom: 1px solid rgba(76, 175, 80, 0.15);
2140
+ flex-shrink: 0;
2141
+ }
2142
+
2143
+ .script-conversion-warnings {
2144
+ padding: 8px 14px 10px;
2145
+ background: rgba(255, 183, 77, 0.07);
2146
+ border-bottom: 1px solid rgba(255, 183, 77, 0.2);
2147
+ display: flex;
2148
+ flex-direction: column;
2149
+ gap: 3px;
2150
+ flex-shrink: 0;
2151
+ max-height: 130px;
2152
+ overflow-y: auto;
2153
+ }
2154
+
2155
+ .script-conversion-warn-title {
2156
+ font-size: 11px;
2157
+ font-weight: 600;
2158
+ color: var(--warn, #ffb74d);
2159
+ margin-bottom: 3px;
2160
+ }
2161
+
2162
+ .script-conversion-warn-row {
2163
+ display: flex;
2164
+ align-items: baseline;
2165
+ gap: 6px;
2166
+ font-size: 11px;
2167
+ color: var(--text-muted);
2168
+ line-height: 1.5;
2169
+ }
2170
+
2171
+ .script-conversion-warn-dot {
2172
+ color: var(--warn, #ffb74d);
2173
+ flex-shrink: 0;
2174
+ }
2175
+
2176
+ .script-conversion-preview-label {
2177
+ font-size: 10px;
2178
+ font-weight: 700;
2179
+ text-transform: uppercase;
2180
+ letter-spacing: 0.06em;
2181
+ color: var(--text-muted);
2182
+ padding: 7px 14px 3px;
2183
+ flex-shrink: 0;
2184
+ }
2185
+
2186
+ .script-conversion-preview-wrap {
2187
+ flex: 1;
2188
+ display: flex;
2189
+ min-height: 0;
2190
+ }
2191
+
2192
+ .script-conversion-preview {
2193
+ opacity: 0.72;
2194
+ cursor: default;
2195
+ user-select: text;
2196
+ }
2197
+
2198
+ /* ── Pipeline details (confidence / sandbox / validation) ─────────────── */
2199
+ .script-pipeline-details {
2200
+ padding: 6px 10px 2px;
2201
+ display: flex;
2202
+ flex-direction: column;
2203
+ gap: 3px;
2204
+ font-size: 11px;
2205
+ max-height: 200px;
2206
+ overflow-y: auto;
2207
+ flex-shrink: 0;
2208
+ }
2209
+ .script-pipeline-row {
2210
+ display: flex;
2211
+ align-items: center;
2212
+ gap: 6px;
2213
+ }
2214
+ .script-pipeline-label {
2215
+ color: var(--text-muted, #888);
2216
+ min-width: 68px;
2217
+ }
2218
+ .script-pipeline-value { color: var(--text, #ccc); }
2219
+ .script-pipeline-value.ok { color: var(--up, #26a69a); }
2220
+ .script-pipeline-value.fail { color: var(--down, #ef5350); }
2221
+
2222
+ .script-pipeline-badge {
2223
+ display: inline-block;
2224
+ padding: 1px 7px;
2225
+ border-radius: 4px;
2226
+ font-weight: 600;
2227
+ font-size: 10px;
2228
+ letter-spacing: 0.5px;
2229
+ }
2230
+ .script-confidence-high { background: rgba(38,166,154,0.18); color: var(--up, #26a69a); }
2231
+ .script-confidence-medium { background: rgba(255,183,77,0.18); color: #ffb74d; }
2232
+ .script-confidence-low { background: rgba(239,83,80,0.18); color: var(--down, #ef5350); }
2233
+
2234
+ .script-pipeline-section {
2235
+ padding: 4px 0 2px;
2236
+ }
2237
+ .script-pipeline-section-title {
2238
+ font-size: 10px;
2239
+ font-weight: 600;
2240
+ color: var(--text-muted, #888);
2241
+ text-transform: uppercase;
2242
+ letter-spacing: 0.4px;
2243
+ margin-bottom: 2px;
2244
+ }
2245
+
2246
+ /* Approve button (accent fill) */
2247
+ .script-approve-btn {
2248
+ display: inline-flex;
2249
+ align-items: center;
2250
+ gap: 6px;
2251
+ padding: 6px 14px;
2252
+ background: var(--primary);
2253
+ color: #fff;
2254
+ border: 1.5px solid var(--primary) !important;
2255
+ border-radius: 5px;
2256
+ font-size: 12.5px;
2257
+ font-weight: 600;
2258
+ cursor: pointer;
2259
+ transition: opacity 0.15s;
2260
+ white-space: nowrap;
2261
+ }
2262
+ .script-approve-btn:hover { opacity: 0.85; }
2263
+
2264
+ /* Cancel button (ghost) */
2265
+ .script-cancel-btn {
2266
+ display: inline-flex;
2267
+ align-items: center;
2268
+ padding: 6px 14px;
2269
+ background: none;
2270
+ color: var(--text-muted);
2271
+ border: 1.5px solid var(--border) !important;
2272
+ border-radius: 5px;
2273
+ font-size: 12.5px;
2274
+ font-weight: 500;
2275
+ cursor: pointer;
2276
+ transition: color 0.12s, border-color 0.12s;
2277
+ white-space: nowrap;
2278
+ }
2279
+ .script-cancel-btn:hover {
2280
+ color: var(--text);
2281
+ border-color: var(--text-muted) !important;
2282
+ }
2283
+
2284
+ /* ── AI Chat (multi-turn conversation) ───────────────────────────────── */
2285
+ .script-chat-section {
2286
+ border-top: 1px solid var(--border, #333);
2287
+ padding: 6px 10px 8px;
2288
+ display: flex;
2289
+ flex-direction: column;
2290
+ gap: 4px;
2291
+ flex-shrink: 0;
2292
+ }
2293
+ .script-chat-label {
2294
+ display: flex;
2295
+ align-items: center;
2296
+ gap: 5px;
2297
+ font-size: 11px;
2298
+ font-weight: 600;
2299
+ color: var(--text-muted, #888);
2300
+ text-transform: uppercase;
2301
+ letter-spacing: 0.3px;
2302
+ margin-bottom: 2px;
2303
+ }
2304
+ .script-chat-history {
2305
+ max-height: 180px;
2306
+ overflow-y: auto;
2307
+ display: flex;
2308
+ flex-direction: column;
2309
+ gap: 6px;
2310
+ padding: 2px 0;
2311
+ scrollbar-width: thin;
2312
+ }
2313
+ .script-chat-msg {
2314
+ font-size: 11.5px;
2315
+ line-height: 1.45;
2316
+ }
2317
+ .script-chat-msg-role {
2318
+ font-size: 10px;
2319
+ font-weight: 700;
2320
+ text-transform: uppercase;
2321
+ letter-spacing: 0.3px;
2322
+ margin-bottom: 1px;
2323
+ }
2324
+ .script-chat-user .script-chat-msg-role { color: var(--accent, #42a5f5); }
2325
+ .script-chat-assistant .script-chat-msg-role { color: var(--up, #26a69a); }
2326
+ .script-chat-msg-body {
2327
+ color: var(--text, #ccc);
2328
+ white-space: pre-wrap;
2329
+ word-break: break-word;
2330
+ }
2331
+ .script-chat-code-applied {
2332
+ margin-top: 3px;
2333
+ font-size: 10px;
2334
+ color: var(--up, #26a69a);
2335
+ font-style: italic;
2336
+ }
2337
+ .script-chat-input-row {
2338
+ display: flex;
2339
+ gap: 4px;
2340
+ }
2341
+ .script-chat-input {
2342
+ flex: 1;
2343
+ background: var(--bg-secondary);
2344
+ border: 1px solid var(--border);
2345
+ border-radius: 4px;
2346
+ color: var(--text);
2347
+ padding: 5px 8px;
2348
+ font-size: 12px;
2349
+ font-family: inherit;
2350
+ outline: none;
2351
+ }
2352
+ .script-chat-input:focus {
2353
+ border-color: var(--accent, #42a5f5);
2354
+ }
2355
+ .script-chat-input:disabled {
2356
+ opacity: 0.5;
2357
+ }
2358
+ .script-chat-send {
2359
+ padding: 4px 10px;
2360
+ background: var(--primary);
2361
+ color: #fff;
2362
+ border: none;
2363
+ border-radius: 4px;
2364
+ font-size: 14px;
2365
+ font-weight: 700;
2366
+ cursor: pointer;
2367
+ line-height: 1;
2368
+ }
2369
+ .script-chat-send:hover:not(:disabled) { opacity: 0.85; }
2370
+ .script-chat-send:disabled { opacity: 0.4; cursor: default; }
2371
+
2372
+ /* ── Screenshot dropdown ─────────────────────────────────────────────────── */
2373
+ .ss-dropdown {
2374
+ position: absolute;
2375
+ top: calc(100% + 6px);
2376
+ right: 0;
2377
+ min-width: 170px;
2378
+ background: var(--toolbar-bg);
2379
+ border: 1px solid var(--border);
2380
+ border-radius: 8px;
2381
+ padding: 4px 0;
2382
+ z-index: 1001;
2383
+ box-shadow: 0 8px 24px rgba(0,0,0,0.35);
2384
+ }
2385
+ .ss-dropdown-item {
2386
+ display: flex;
2387
+ align-items: center;
2388
+ gap: 8px;
2389
+ width: 100%;
2390
+ padding: 8px 14px;
2391
+ font-size: 13px;
2392
+ color: var(--text);
2393
+ background: transparent;
2394
+ border: none;
2395
+ cursor: pointer;
2396
+ text-align: left;
2397
+ }
2398
+ .ss-dropdown-item:hover { background: var(--toolbar-hover); }
2399
+
2400
+ /* ── Light mode: no borders, grey hover only ─────────────────────────── */
2401
+ [data-theme="light"] button {
2402
+ border-color: transparent;
2403
+ background: transparent;
2404
+ }
2405
+ [data-theme="light"] button:hover {
2406
+ border-color: transparent;
2407
+ background: var(--toolbar-hover);
2408
+ }
2409
+ [data-theme="light"] button.active {
2410
+ border-color: transparent;
2411
+ background: var(--toolbar-hover);
2412
+ color: var(--accent);
2413
+ }
2414
+ /* Keep primary/accent buttons styled in light mode */
2415
+ [data-theme="light"] .ss-btn-primary,
2416
+ [data-theme="light"] .tf-dropdown-add-btn,
2417
+ [data-theme="light"] .csettings-btn--primary {
2418
+ background: var(--primary);
2419
+ color: #fff;
2420
+ border-color: transparent;
2421
+ }
2422
+ [data-theme="light"] .csettings-btn--primary:hover {
2423
+ background: #1976d2;
2424
+ }
2425
+ [data-theme="light"] .csettings-btn--ghost {
2426
+ background: transparent;
2427
+ border-color: var(--border);
2428
+ color: var(--text-muted);
2429
+ }
2430
+ [data-theme="light"] .tf-dropdown-item.active {
2431
+ background: var(--accent);
2432
+ color: var(--toolbar-bg);
2433
+ }
2434
+ /* Dropdown/dialog items stay borderless in light mode */
2435
+ [data-theme="light"] .tf-dropdown-item {
2436
+ border-color: transparent;
2437
+ }
2438
+ /* Tab add button stays framed in light mode so it's discoverable */
2439
+ [data-theme="light"] .tab-add {
2440
+ border-color: var(--border);
2441
+ background: var(--bg);
2442
+ }
2443
+ [data-theme="light"] .tab-add:hover {
2444
+ border-color: var(--primary);
2445
+ color: var(--primary);
2446
+ background: var(--primary-bg);
2447
+ }
2448
+ /* Fix dark-only badge backgrounds in light mode */
2449
+ [data-theme="light"] .ind-list-badge.pane {
2450
+ background: rgba(0,0,0,0.07);
2451
+ }
2452
+ /* Dialogs/dropdowns keep their outline border for structure */
2453
+ [data-theme="light"] .tf-dropdown,
2454
+ [data-theme="light"] .layout-dropdown,
2455
+ [data-theme="light"] .ss-dropdown,
2456
+ [data-theme="light"] .ind-dialog,
2457
+ [data-theme="light"] .drawing-ctx-menu {
2458
+ border-color: var(--border);
2459
+ box-shadow: 0 8px 24px rgba(0,0,0,0.10);
2460
+ }
2461
+
2462
+ /* ── Chart canvas context menu ───────────────────────────────────────────── */
2463
+ .chart-ctx-backdrop {
2464
+ position: fixed;
2465
+ inset: 0;
2466
+ z-index: 9998;
2467
+ }
2468
+ .chart-ctx-menu {
2469
+ position: fixed;
2470
+ z-index: 9999;
2471
+ background: var(--toolbar-bg, #141414);
2472
+ border: 1px solid var(--border);
2473
+ border-radius: 6px;
2474
+ padding: 4px 0;
2475
+ min-width: 180px;
2476
+ box-shadow: 0 4px 20px rgba(0,0,0,0.35);
2477
+ user-select: none;
2478
+ }
2479
+ .chart-ctx-item {
2480
+ display: block;
2481
+ width: 100%;
2482
+ background: none;
2483
+ border: none;
2484
+ color: var(--text, #e0e0e0);
2485
+ font-size: 13px;
2486
+ font-family: inherit;
2487
+ text-align: left;
2488
+ padding: 7px 16px;
2489
+ cursor: pointer;
2490
+ transition: background 0.1s;
2491
+ }
2492
+ .chart-ctx-item:hover {
2493
+ background: var(--toolbar-hover, rgba(255,255,255,0.08));
2494
+ }
2495
+ .chart-ctx-item--danger {
2496
+ color: var(--down, #f85149);
2497
+ }
2498
+ .chart-ctx-divider {
2499
+ height: 1px;
2500
+ background: var(--border);
2501
+ margin: 4px 0;
2502
+ }
2503
+
2504
+ /* ── Chart Settings Dialog ───────────────────────────────────────────────── */
2505
+ .csettings-backdrop {
2506
+ position: fixed;
2507
+ inset: 0;
2508
+ z-index: 10000;
2509
+ background: var(--backdrop, rgba(0,0,0,0.55));
2510
+ display: flex;
2511
+ align-items: center;
2512
+ justify-content: center;
2513
+ }
2514
+ .csettings-dialog {
2515
+ background: var(--toolbar-bg, #141414);
2516
+ border: 1px solid var(--border);
2517
+ border-radius: 10px;
2518
+ box-shadow: var(--shadow-dialog);
2519
+ width: 560px;
2520
+ max-width: calc(100vw - 32px);
2521
+ max-height: calc(100vh - 64px);
2522
+ display: flex;
2523
+ flex-direction: column;
2524
+ overflow: hidden;
2525
+ }
2526
+ .csettings-header {
2527
+ display: flex;
2528
+ align-items: center;
2529
+ justify-content: space-between;
2530
+ padding: 14px 18px;
2531
+ border-bottom: 1px solid var(--border);
2532
+ flex-shrink: 0;
2533
+ }
2534
+ .csettings-title {
2535
+ font-size: 14px;
2536
+ font-weight: 600;
2537
+ color: var(--text, #fff);
2538
+ }
2539
+ .csettings-close {
2540
+ background: none;
2541
+ border: none;
2542
+ color: var(--text-muted, #888);
2543
+ font-size: 16px;
2544
+ cursor: pointer;
2545
+ padding: 2px 6px;
2546
+ border-radius: 4px;
2547
+ line-height: 1;
2548
+ transition: color 0.15s, background 0.15s;
2549
+ }
2550
+ .csettings-close:hover {
2551
+ color: var(--text, #fff);
2552
+ background: var(--toolbar-hover);
2553
+ }
2554
+ .csettings-body {
2555
+ display: flex;
2556
+ flex: 1;
2557
+ overflow: hidden;
2558
+ }
2559
+ .csettings-sidebar {
2560
+ width: 130px;
2561
+ flex-shrink: 0;
2562
+ border-right: 1px solid var(--border);
2563
+ padding: 8px 0;
2564
+ overflow-y: auto;
2565
+ }
2566
+ .csettings-nav-item {
2567
+ display: block;
2568
+ width: 100%;
2569
+ background: none;
2570
+ border: none;
2571
+ color: var(--text-muted, #888);
2572
+ font-size: 13px;
2573
+ font-family: inherit;
2574
+ text-align: left;
2575
+ padding: 8px 16px;
2576
+ cursor: pointer;
2577
+ transition: background 0.1s, color 0.1s;
2578
+ }
2579
+ .csettings-nav-item:hover {
2580
+ background: var(--toolbar-hover);
2581
+ color: var(--text, #fff);
2582
+ }
2583
+ .csettings-nav-item.is-active {
2584
+ color: var(--text, #fff);
2585
+ background: var(--primary-bg, rgba(33,150,243,0.12));
2586
+ border-left: 2px solid var(--primary, #2196f3);
2587
+ padding-left: 14px;
2588
+ }
2589
+ .csettings-content {
2590
+ flex: 1;
2591
+ overflow-y: auto;
2592
+ padding: 16px 20px;
2593
+ }
2594
+ .csettings-section {
2595
+ display: flex;
2596
+ flex-direction: column;
2597
+ gap: 16px;
2598
+ }
2599
+ .csettings-row {
2600
+ display: flex;
2601
+ align-items: center;
2602
+ justify-content: space-between;
2603
+ gap: 12px;
2604
+ }
2605
+ .csettings-label {
2606
+ font-size: 13px;
2607
+ color: var(--text, #e0e0e0);
2608
+ flex: 1;
2609
+ }
2610
+ .csettings-color-wrap {
2611
+ display: flex;
2612
+ align-items: center;
2613
+ gap: 8px;
2614
+ }
2615
+ .csettings-color-input {
2616
+ width: 32px;
2617
+ height: 24px;
2618
+ border: 1px solid var(--border);
2619
+ border-radius: 4px;
2620
+ padding: 2px;
2621
+ background: none;
2622
+ cursor: pointer;
2623
+ }
2624
+ .csettings-color-hex {
2625
+ font-size: 12px;
2626
+ color: var(--text-muted, #888);
2627
+ font-family: monospace;
2628
+ min-width: 56px;
2629
+ }
2630
+ .csettings-toggle {
2631
+ position: relative;
2632
+ display: inline-flex;
2633
+ align-items: center;
2634
+ cursor: pointer;
2635
+ }
2636
+ .csettings-toggle input {
2637
+ position: absolute;
2638
+ opacity: 0;
2639
+ width: 0;
2640
+ height: 0;
2641
+ }
2642
+ .csettings-toggle-track {
2643
+ display: inline-block;
2644
+ width: 36px;
2645
+ height: 20px;
2646
+ background: var(--border);
2647
+ border-radius: 10px;
2648
+ transition: background 0.2s;
2649
+ position: relative;
2650
+ }
2651
+ .csettings-toggle-track::after {
2652
+ content: '';
2653
+ position: absolute;
2654
+ top: 3px;
2655
+ left: 3px;
2656
+ width: 14px;
2657
+ height: 14px;
2658
+ background: var(--text-muted, #888);
2659
+ border-radius: 50%;
2660
+ transition: transform 0.2s, background 0.2s;
2661
+ }
2662
+ .csettings-toggle input:checked + .csettings-toggle-track {
2663
+ background: var(--primary, #2196f3);
2664
+ }
2665
+ .csettings-toggle input:checked + .csettings-toggle-track::after {
2666
+ transform: translateX(16px);
2667
+ background: #fff;
2668
+ }
2669
+ .csettings-footer {
2670
+ display: flex;
2671
+ align-items: center;
2672
+ justify-content: flex-end;
2673
+ gap: 8px;
2674
+ padding: 12px 18px;
2675
+ border-top: 1px solid var(--border);
2676
+ flex-shrink: 0;
2677
+ }
2678
+ .csettings-btn {
2679
+ padding: 6px 18px;
2680
+ border-radius: 6px;
2681
+ font-size: 13px;
2682
+ font-family: inherit;
2683
+ cursor: pointer;
2684
+ transition: background 0.15s, border-color 0.15s;
2685
+ }
2686
+ .csettings-btn--ghost {
2687
+ background: none;
2688
+ border: 1px solid var(--border);
2689
+ color: var(--text-muted, #888);
2690
+ }
2691
+ .csettings-btn--ghost:hover {
2692
+ border-color: var(--text-muted);
2693
+ color: var(--text, #fff);
2694
+ }
2695
+ .csettings-btn--primary {
2696
+ background: var(--primary, #2196f3);
2697
+ border: 1px solid transparent;
2698
+ color: #fff;
2699
+ font-weight: 500;
2700
+ }
2701
+ .csettings-btn--primary:hover {
2702
+ background: #1976d2;
2703
+ }
2704
+
2705
+ [data-theme="light"] .chart-ctx-menu,
2706
+ [data-theme="light"] .csettings-dialog {
2707
+ border-color: var(--border);
2708
+ box-shadow: 0 8px 24px rgba(0,0,0,0.12);
2709
+ }
2710
+ [data-theme="light"] .csettings-nav-item.is-active {
2711
+ background: var(--primary-bg);
2712
+ }
2713
+
2714
+
2715
+ /* ── Watchlist Drawer ────────────────────────────────────────────────────────── */
2716
+ :root {
2717
+ --wl-up: #26a641;
2718
+ --wl-down: #f85149;
2719
+ }
2720
+
2721
+ .wl-drawer {
2722
+ width: 360px; /* overridden by inline style when dragged */
2723
+ flex-shrink: 0;
2724
+ position: relative;
2725
+ display: flex;
2726
+ flex-direction: column;
2727
+ background: var(--toolbar-bg);
2728
+ border: 1px solid var(--border);
2729
+ border-radius: 8px;
2730
+ overflow: hidden;
2731
+ min-height: 0;
2732
+ }
2733
+
2734
+ /* Resize handle */
2735
+ .wl-resize-handle {
2736
+ position: absolute;
2737
+ left: 0;
2738
+ top: 0;
2739
+ bottom: 0;
2740
+ width: 5px;
2741
+ cursor: col-resize;
2742
+ z-index: 10;
2743
+ }
2744
+ .wl-resize-handle:hover,
2745
+ .wl-resize-handle:active {
2746
+ background: var(--accent);
2747
+ opacity: 0.25;
2748
+ }
2749
+
2750
+ /* Header */
2751
+ .wl-header {
2752
+ display: flex;
2753
+ align-items: center;
2754
+ justify-content: space-between;
2755
+ padding: 9px 12px;
2756
+ border-bottom: 1px solid var(--border);
2757
+ flex-shrink: 0;
2758
+ }
2759
+
2760
+ .wl-header-title {
2761
+ display: flex;
2762
+ align-items: center;
2763
+ gap: 6px;
2764
+ font-size: 13px;
2765
+ font-weight: 700;
2766
+ color: var(--text);
2767
+ }
2768
+
2769
+ .wl-close-btn {
2770
+ background: none;
2771
+ border: none !important;
2772
+ color: var(--text-muted);
2773
+ padding: 4px;
2774
+ display: flex;
2775
+ align-items: center;
2776
+ border-radius: 4px;
2777
+ cursor: pointer;
2778
+ }
2779
+ .wl-close-btn:hover { color: var(--text); background: var(--toolbar-hover) !important; }
2780
+
2781
+ /* Add row */
2782
+ .wl-add-row {
2783
+ display: flex;
2784
+ align-items: center;
2785
+ gap: 6px;
2786
+ padding: 7px 10px;
2787
+ border-bottom: 1px solid var(--border);
2788
+ flex-shrink: 0;
2789
+ }
2790
+
2791
+ .wl-add-input {
2792
+ flex: 1;
2793
+ background: var(--toolbar-hover, rgba(255,255,255,0.05));
2794
+ border: 1px solid var(--border);
2795
+ border-radius: 5px;
2796
+ color: var(--text);
2797
+ font-size: 12px;
2798
+ padding: 5px 8px;
2799
+ outline: none;
2800
+ }
2801
+ .wl-add-input::placeholder { color: var(--text-muted); }
2802
+ .wl-add-input:focus { border-color: var(--accent); }
2803
+
2804
+ .wl-add-btn {
2805
+ background: none;
2806
+ border: 1px solid var(--border) !important;
2807
+ border-radius: 5px;
2808
+ color: var(--text-muted);
2809
+ padding: 5px 7px;
2810
+ display: flex;
2811
+ align-items: center;
2812
+ cursor: pointer;
2813
+ }
2814
+ .wl-add-btn:hover { color: var(--text); background: var(--toolbar-hover) !important; }
2815
+
2816
+ .wl-add-error {
2817
+ font-size: 11px;
2818
+ color: var(--wl-down);
2819
+ padding: 3px 12px;
2820
+ flex-shrink: 0;
2821
+ }
2822
+
2823
+ /* Column headers */
2824
+ .wl-col-headers {
2825
+ display: grid;
2826
+ grid-template-columns: 16px 1fr var(--wl-last, 70px) var(--wl-chg, 70px) var(--wl-pct, 60px) var(--wl-vol, 52px);
2827
+ gap: 0;
2828
+ padding: 4px 10px 4px 6px;
2829
+ border-bottom: 1px solid var(--border);
2830
+ flex-shrink: 0;
2831
+ }
2832
+ .wl-col-headers > span {
2833
+ font-size: 10px;
2834
+ font-weight: 600;
2835
+ text-transform: uppercase;
2836
+ letter-spacing: 0.05em;
2837
+ color: var(--text-muted);
2838
+ position: relative;
2839
+ user-select: none;
2840
+ }
2841
+ .wl-col-last, .wl-col-chg, .wl-col-pct, .wl-col-vol { text-align: right; }
2842
+
2843
+ /* Column resize handle — sits on the right edge of each numeric header cell */
2844
+ .wl-col-resize {
2845
+ position: absolute;
2846
+ right: -3px;
2847
+ top: 0;
2848
+ bottom: 0;
2849
+ width: 6px;
2850
+ cursor: col-resize;
2851
+ z-index: 3;
2852
+ }
2853
+ .wl-col-resize:hover,
2854
+ .wl-col-resize:active {
2855
+ background: var(--accent, #2962ff);
2856
+ opacity: 0.35;
2857
+ border-radius: 2px;
2858
+ }
2859
+
2860
+ /* List scroll area */
2861
+ .wl-list {
2862
+ flex: 1;
2863
+ overflow-y: auto;
2864
+ min-height: 0;
2865
+ }
2866
+ .wl-list::-webkit-scrollbar { width: 5px; }
2867
+ .wl-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
2868
+
2869
+ /* Empty state */
2870
+ .wl-empty {
2871
+ padding: 32px 16px;
2872
+ text-align: center;
2873
+ color: var(--text-muted);
2874
+ font-size: 12.5px;
2875
+ line-height: 1.6;
2876
+ }
2877
+
2878
+ /* Group header */
2879
+ .wl-group-header {
2880
+ display: flex;
2881
+ align-items: center;
2882
+ gap: 5px;
2883
+ padding: 5px 10px;
2884
+ background: rgba(255,255,255,0.03);
2885
+ border-bottom: 1px solid var(--border);
2886
+ position: sticky;
2887
+ top: 0;
2888
+ z-index: 1;
2889
+ }
2890
+
2891
+ .wl-group-toggle {
2892
+ background: none;
2893
+ border: none !important;
2894
+ color: var(--text-muted);
2895
+ padding: 2px;
2896
+ cursor: pointer;
2897
+ display: flex;
2898
+ align-items: center;
2899
+ border-radius: 3px;
2900
+ }
2901
+ .wl-group-toggle:hover { color: var(--text); background: var(--toolbar-hover) !important; }
2902
+
2903
+ .wl-group-name {
2904
+ flex: 1;
2905
+ font-size: 11.5px;
2906
+ font-weight: 600;
2907
+ color: var(--text);
2908
+ text-transform: uppercase;
2909
+ letter-spacing: 0.04em;
2910
+ }
2911
+
2912
+ .wl-group-count {
2913
+ font-size: 10px;
2914
+ color: var(--text-muted);
2915
+ background: rgba(255,255,255,0.06);
2916
+ border-radius: 8px;
2917
+ padding: 1px 6px;
2918
+ }
2919
+
2920
+ .wl-group-del {
2921
+ opacity: 0;
2922
+ transition: opacity 0.15s;
2923
+ }
2924
+ .wl-group-header:hover .wl-group-del { opacity: 1; }
2925
+
2926
+ .wl-group-label-ungrouped {
2927
+ font-size: 10px;
2928
+ font-weight: 600;
2929
+ text-transform: uppercase;
2930
+ letter-spacing: 0.05em;
2931
+ color: var(--text-muted);
2932
+ padding: 6px 10px 3px;
2933
+ }
2934
+
2935
+ /* Symbol row */
2936
+ .wl-row {
2937
+ display: grid;
2938
+ grid-template-columns: 16px 1fr var(--wl-last, 70px) var(--wl-chg, 70px) var(--wl-pct, 60px) var(--wl-vol, 52px) auto;
2939
+ align-items: center;
2940
+ gap: 0;
2941
+ padding: 5px 10px 5px 6px;
2942
+ border-bottom: 1px solid var(--border);
2943
+ cursor: pointer;
2944
+ position: relative;
2945
+ transition: background 0.1s;
2946
+ }
2947
+ .wl-row:hover { background: var(--toolbar-hover); }
2948
+ .wl-row.wl-drag-over {
2949
+ border-top: 2px solid var(--accent, #2962ff);
2950
+ }
2951
+
2952
+ /* Drag handle — visible on row hover */
2953
+ .wl-drag-handle {
2954
+ display: flex;
2955
+ align-items: center;
2956
+ justify-content: center;
2957
+ width: 14px;
2958
+ height: 100%;
2959
+ color: var(--text-muted);
2960
+ opacity: 0;
2961
+ cursor: grab;
2962
+ transition: opacity 0.12s;
2963
+ flex-shrink: 0;
2964
+ }
2965
+ .wl-row:hover .wl-drag-handle { opacity: 0.5; }
2966
+ .wl-drag-handle:hover { opacity: 1 !important; }
2967
+
2968
+ .wl-logo {
2969
+ position: absolute;
2970
+ left: 24px;
2971
+ top: 50%;
2972
+ transform: translateY(-50%);
2973
+ width: 12px;
2974
+ height: 12px;
2975
+ object-fit: contain;
2976
+ border-radius: 2px;
2977
+ }
2978
+
2979
+ .wl-symbol {
2980
+ font-size: 12.5px;
2981
+ font-weight: 600;
2982
+ color: var(--text);
2983
+ padding-left: 18px;
2984
+ overflow: hidden;
2985
+ text-overflow: ellipsis;
2986
+ white-space: nowrap;
2987
+ }
2988
+
2989
+ .wl-last, .wl-change, .wl-pct, .wl-vol, .wl-no-data {
2990
+ font-size: 11.5px;
2991
+ text-align: right;
2992
+ color: var(--text-muted);
2993
+ font-variant-numeric: tabular-nums;
2994
+ }
2995
+
2996
+ .wl-last { color: var(--text); }
2997
+
2998
+ /* Price-tick flash animation — text color only, no background flash */
2999
+ @keyframes wl-flash-up {
3000
+ 0% { color: var(--wl-up, #26a69a); }
3001
+ 100% { color: var(--text); }
3002
+ }
3003
+ @keyframes wl-flash-down {
3004
+ 0% { color: var(--wl-down, #ef5350); }
3005
+ 100% { color: var(--text); }
3006
+ }
3007
+ .wl-flash-up { animation: wl-flash-up 0.3s ease-out forwards; }
3008
+ .wl-flash-down { animation: wl-flash-down 0.3s ease-out forwards; }
3009
+
3010
+ .wl-no-data {
3011
+ grid-column: 2 / 6;
3012
+ text-align: right;
3013
+ }
3014
+
3015
+ .wl-remove-btn {
3016
+ background: none;
3017
+ border: none !important;
3018
+ color: var(--text-muted);
3019
+ font-size: 10px;
3020
+ padding: 2px 4px;
3021
+ cursor: pointer;
3022
+ opacity: 0;
3023
+ border-radius: 3px;
3024
+ transition: opacity 0.12s;
3025
+ justify-self: end;
3026
+ }
3027
+ .wl-row:hover .wl-remove-btn,
3028
+ .wl-group-header:hover .wl-remove-btn { opacity: 1; }
3029
+ .wl-remove-btn:hover { color: var(--wl-down); background: rgba(248,81,73,0.1) !important; }
3030
+
3031
+ /* Context menu */
3032
+ .wl-ctx-menu {
3033
+ position: fixed;
3034
+ z-index: 1000;
3035
+ background: var(--toolbar-bg);
3036
+ border: 1px solid var(--border);
3037
+ border-radius: 7px;
3038
+ padding: 4px;
3039
+ min-width: 160px;
3040
+ box-shadow: 0 6px 24px rgba(0,0,0,0.5);
3041
+ }
3042
+
3043
+ .wl-ctx-section {
3044
+ font-size: 10px;
3045
+ font-weight: 700;
3046
+ text-transform: uppercase;
3047
+ letter-spacing: 0.06em;
3048
+ color: var(--text-muted);
3049
+ padding: 4px 10px 2px;
3050
+ }
3051
+
3052
+ .wl-ctx-item {
3053
+ display: block;
3054
+ width: 100%;
3055
+ text-align: left;
3056
+ background: none;
3057
+ border: none !important;
3058
+ border-radius: 4px;
3059
+ color: var(--text);
3060
+ font-size: 12.5px;
3061
+ padding: 6px 10px;
3062
+ cursor: pointer;
3063
+ }
3064
+ .wl-ctx-item:hover { background: var(--toolbar-hover) !important; }
3065
+ .wl-ctx-item--danger { color: var(--wl-down); }
3066
+ .wl-ctx-item--danger:hover { background: rgba(248,81,73,0.1) !important; }
3067
+
3068
+ .wl-ctx-divider {
3069
+ height: 1px;
3070
+ background: var(--border);
3071
+ margin: 3px 0;
3072
+ }
3073
+
3074
+ /* Group dialog */
3075
+ .wl-dialog-backdrop {
3076
+ position: fixed;
3077
+ inset: 0;
3078
+ background: rgba(0,0,0,0.55);
3079
+ display: flex;
3080
+ align-items: center;
3081
+ justify-content: center;
3082
+ z-index: 2000;
3083
+ }
3084
+
3085
+ .wl-dialog {
3086
+ background: var(--toolbar-bg);
3087
+ border: 1px solid var(--border);
3088
+ border-radius: 10px;
3089
+ padding: 20px 22px;
3090
+ width: 280px;
3091
+ display: flex;
3092
+ flex-direction: column;
3093
+ gap: 12px;
3094
+ box-shadow: 0 8px 32px rgba(0,0,0,0.6);
3095
+ }
3096
+
3097
+ .wl-dialog-title {
3098
+ font-size: 14px;
3099
+ font-weight: 700;
3100
+ color: var(--text);
3101
+ }
3102
+
3103
+ .wl-dialog-input {
3104
+ background: var(--toolbar-hover);
3105
+ border: 1px solid var(--border);
3106
+ border-radius: 6px;
3107
+ color: var(--text);
3108
+ font-size: 13px;
3109
+ padding: 8px 10px;
3110
+ outline: none;
3111
+ }
3112
+ .wl-dialog-input:focus { border-color: var(--accent); }
3113
+ .wl-dialog-input::placeholder { color: var(--text-muted); }
3114
+
3115
+ .wl-dialog-actions {
3116
+ display: flex;
3117
+ justify-content: flex-end;
3118
+ gap: 8px;
3119
+ }
3120
+
3121
+ .wl-dialog-cancel {
3122
+ background: none;
3123
+ border: 1px solid var(--border) !important;
3124
+ border-radius: 6px;
3125
+ color: var(--text-muted);
3126
+ font-size: 12.5px;
3127
+ padding: 6px 14px;
3128
+ cursor: pointer;
3129
+ }
3130
+ .wl-dialog-cancel:hover { background: var(--toolbar-hover) !important; color: var(--text); }
3131
+
3132
+ .wl-dialog-confirm {
3133
+ background: var(--accent);
3134
+ border: none !important;
3135
+ border-radius: 6px;
3136
+ color: var(--text);
3137
+ font-size: 12.5px;
3138
+ font-weight: 600;
3139
+ padding: 6px 14px;
3140
+ cursor: pointer;
3141
+ }
3142
+ .wl-dialog-confirm:hover { opacity: 0.85; }
3143
+ .wl-dialog-confirm:disabled { opacity: 0.4; cursor: default; }
3144
+
3145
+ /* ── Trade Drawer — right-side slide-in overlay ──────────────────────────── */
3146
+
3147
+ @keyframes trade-drawer-slide-in {
3148
+ from { transform: translateX(100%); }
3149
+ to { transform: translateX(0); }
3150
+ }
3151
+
3152
+ /* Semi-transparent backdrop behind the drawer stack */
3153
+ .trade-drawer-backdrop {
3154
+ position: absolute;
3155
+ inset: 0;
3156
+ z-index: 200;
3157
+ background: rgba(0, 0, 0, 0.35);
3158
+ cursor: default;
3159
+ }
3160
+
3161
+ /* Base drawer — broker list */
3162
+ .trade-drawer {
3163
+ position: absolute;
3164
+ top: 0;
3165
+ right: 0;
3166
+ bottom: 0;
3167
+ width: 50%;
3168
+ min-width: 340px;
3169
+ z-index: 201;
3170
+ display: flex;
3171
+ flex-direction: column;
3172
+ background: var(--toolbar-bg);
3173
+ border-left: 1px solid var(--border);
3174
+ box-shadow: -6px 0 24px rgba(0, 0, 0, 0.35);
3175
+ animation: trade-drawer-slide-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
3176
+ overflow: hidden;
3177
+ }
3178
+
3179
+ /* Connect sub-drawer — sits over the broker list drawer */
3180
+ .trade-drawer.trade-drawer--connect {
3181
+ z-index: 202;
3182
+ background: var(--bg);
3183
+ border-left: 1px solid var(--border);
3184
+ }
3185
+
3186
+ .trade-drawer-header {
3187
+ display: flex;
3188
+ align-items: center;
3189
+ justify-content: space-between;
3190
+ padding: 11px 14px 11px 16px;
3191
+ border-bottom: 1px solid var(--border);
3192
+ flex-shrink: 0;
3193
+ gap: 8px;
3194
+ }
3195
+
3196
+ .trade-drawer-title {
3197
+ display: flex;
3198
+ align-items: center;
3199
+ gap: 8px;
3200
+ font-size: 13px;
3201
+ font-weight: 600;
3202
+ color: var(--text);
3203
+ user-select: none;
3204
+ }
3205
+
3206
+ .trade-drawer-close {
3207
+ display: flex;
3208
+ align-items: center;
3209
+ gap: 4px;
3210
+ background: none;
3211
+ border: none !important;
3212
+ border-radius: 5px !important;
3213
+ color: var(--text-muted);
3214
+ cursor: pointer;
3215
+ padding: 5px 7px;
3216
+ font-size: 11px;
3217
+ flex-shrink: 0;
3218
+ transition: background 0.12s, color 0.12s;
3219
+ }
3220
+ .trade-drawer-close:hover {
3221
+ background: var(--toolbar-hover) !important;
3222
+ color: var(--text);
3223
+ }
3224
+
3225
+ /* Scrollable broker grid */
3226
+ .trade-drawer-body {
3227
+ flex: 1;
3228
+ overflow-y: auto;
3229
+ overflow-x: hidden;
3230
+ padding: 16px;
3231
+ min-height: 0;
3232
+ }
3233
+
3234
+ /* Form body */
3235
+ .trade-drawer-body.trade-drawer-body--form {
3236
+ padding: 0;
3237
+ overflow-y: auto;
3238
+ }
3239
+
3240
+ /* ── Broker card grid ──────────────────────────────────────────────────────── */
3241
+
3242
+ .broker-grid {
3243
+ display: grid;
3244
+ grid-template-columns: repeat(5, 1fr);
3245
+ gap: 10px;
3246
+ }
3247
+
3248
+ .broker-tile {
3249
+ display: flex;
3250
+ flex-direction: column;
3251
+ gap: 7px;
3252
+ padding: 13px 13px 11px;
3253
+ background: var(--bg);
3254
+ border: 1px solid var(--border);
3255
+ border-radius: 8px;
3256
+ transition: border-color 0.15s;
3257
+ }
3258
+ .broker-tile--available:hover {
3259
+ border-color: var(--accent, #58a6ff);
3260
+ }
3261
+
3262
+ .broker-tile-name {
3263
+ font-size: 12px;
3264
+ font-weight: 700;
3265
+ color: var(--text);
3266
+ white-space: nowrap;
3267
+ overflow: hidden;
3268
+ text-overflow: ellipsis;
3269
+ }
3270
+
3271
+ .broker-tile-desc {
3272
+ font-size: 11px;
3273
+ color: var(--text-muted);
3274
+ line-height: 1.4;
3275
+ flex: 1;
3276
+ }
3277
+
3278
+ .broker-tile-connect {
3279
+ margin-top: 2px;
3280
+ padding: 5px 0;
3281
+ font-size: 11px;
3282
+ font-weight: 500;
3283
+ border-radius: 5px;
3284
+ border: 1px solid var(--primary);
3285
+ background: none;
3286
+ color: var(--primary);
3287
+ cursor: pointer;
3288
+ width: 100%;
3289
+ text-align: center;
3290
+ transition: background 0.12s;
3291
+ }
3292
+ .broker-tile-connect:hover:not(:disabled) {
3293
+ background: var(--primary-bg);
3294
+ }
3295
+ .broker-tile-connect:disabled {
3296
+ opacity: 0.35;
3297
+ cursor: not-allowed;
3298
+ border-color: var(--border);
3299
+ color: var(--text-muted);
3300
+ }
3301
+ .broker-tile-connect--connected {
3302
+ border-color: var(--success, #26a69a);
3303
+ color: var(--success, #26a69a);
3304
+ }
3305
+ .broker-tile-connect--connected:hover {
3306
+ background: rgba(38, 166, 154, 0.1);
3307
+ }
3308
+
3309
+ /* Action row — wraps Start Trading + Disconnect when connected */
3310
+ .broker-tile-action-row {
3311
+ display: flex;
3312
+ flex-direction: column;
3313
+ gap: 6px;
3314
+ margin-top: 8px;
3315
+ }
3316
+ .broker-tile-disconnect {
3317
+ display: flex;
3318
+ align-items: center;
3319
+ justify-content: center;
3320
+ gap: 5px;
3321
+ width: 100%;
3322
+ padding: 6px 10px;
3323
+ font-size: 11px;
3324
+ font-weight: 500;
3325
+ color: var(--text-muted);
3326
+ background: transparent;
3327
+ border: 1px solid var(--border);
3328
+ border-radius: 6px;
3329
+ cursor: pointer;
3330
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
3331
+ }
3332
+ .broker-tile-disconnect:hover {
3333
+ color: #ef5350;
3334
+ border-color: rgba(239, 83, 80, 0.4);
3335
+ background: rgba(239, 83, 80, 0.06);
3336
+ }
3337
+
3338
+ /* Saved connection details shown inside the broker card */
3339
+ .broker-tile-saved {
3340
+ display: flex;
3341
+ align-items: center;
3342
+ gap: 4px;
3343
+ font-size: 11px;
3344
+ color: var(--text-muted);
3345
+ margin: 4px 0 6px;
3346
+ flex-wrap: wrap;
3347
+ min-width: 0;
3348
+ }
3349
+ .broker-tile-saved-account {
3350
+ font-weight: 600;
3351
+ color: var(--text);
3352
+ white-space: nowrap;
3353
+ overflow: hidden;
3354
+ text-overflow: ellipsis;
3355
+ max-width: 130px;
3356
+ }
3357
+ .broker-tile-saved-sep {
3358
+ color: var(--border);
3359
+ }
3360
+ .broker-tile-saved-user {
3361
+ white-space: nowrap;
3362
+ overflow: hidden;
3363
+ text-overflow: ellipsis;
3364
+ max-width: 130px;
3365
+ opacity: 0.75;
3366
+ }
3367
+
3368
+ /* ── Broker status badge ──────────────────────────────────────────────────── */
3369
+
3370
+ .broker-card-status {
3371
+ font-size: 10px;
3372
+ font-weight: 600;
3373
+ padding: 2px 7px;
3374
+ border-radius: 4px;
3375
+ display: inline-block;
3376
+ width: fit-content;
3377
+ }
3378
+ .broker-card-status--available {
3379
+ background: rgba(34, 197, 94, 0.15);
3380
+ color: #22c55e;
3381
+ }
3382
+ .broker-card-status--coming-soon {
3383
+ background: rgba(128, 128, 128, 0.12);
3384
+ color: var(--text-muted);
3385
+ }
3386
+ .broker-card-status--connected {
3387
+ background: var(--success-bg);
3388
+ color: var(--success);
3389
+ }
3390
+
3391
+ /* ── Broker logo badge (connect drawer) ───────────────────────────────────── */
3392
+
3393
+ .broker-logo {
3394
+ display: inline-flex;
3395
+ align-items: center;
3396
+ justify-content: center;
3397
+ width: 22px;
3398
+ height: 22px;
3399
+ border-radius: 5px;
3400
+ font-size: 11px;
3401
+ font-weight: 800;
3402
+ flex-shrink: 0;
3403
+ }
3404
+ .broker-logo--rithmic {
3405
+ background: rgba(88, 166, 255, 0.18);
3406
+ color: var(--accent, #58a6ff);
3407
+ }
3408
+
3409
+ /* ── Rithmic / broker connect form ────────────────────────────────────────── */
3410
+
3411
+ .broker-connect-form {
3412
+ display: flex;
3413
+ flex-direction: column;
3414
+ gap: 0;
3415
+ padding: 16px 20px 24px;
3416
+ }
3417
+
3418
+ .bcf-section-label {
3419
+ font-size: 10px;
3420
+ font-weight: 700;
3421
+ text-transform: uppercase;
3422
+ letter-spacing: 0.06em;
3423
+ color: var(--text-muted);
3424
+ margin-bottom: 8px;
3425
+ }
3426
+
3427
+ .bcf-row {
3428
+ display: flex;
3429
+ flex-direction: column;
3430
+ gap: 4px;
3431
+ margin-bottom: 12px;
3432
+ }
3433
+
3434
+ .bcf-label {
3435
+ font-size: 12px;
3436
+ font-weight: 500;
3437
+ color: var(--text);
3438
+ }
3439
+
3440
+ .bcf-req {
3441
+ color: #f87171;
3442
+ margin-left: 2px;
3443
+ }
3444
+
3445
+ .bcf-input {
3446
+ width: 100%;
3447
+ padding: 7px 10px;
3448
+ font-size: 12px;
3449
+ background: var(--toolbar-bg);
3450
+ border: 1px solid var(--border);
3451
+ border-radius: 5px;
3452
+ color: var(--text);
3453
+ outline: none;
3454
+ transition: border-color 0.12s;
3455
+ box-sizing: border-box;
3456
+ }
3457
+ .bcf-input:focus {
3458
+ border-color: var(--accent, #58a6ff);
3459
+ }
3460
+ .bcf-input--error {
3461
+ border-color: #f87171 !important;
3462
+ }
3463
+
3464
+ .bcf-select {
3465
+ cursor: pointer;
3466
+ appearance: none;
3467
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
3468
+ background-repeat: no-repeat;
3469
+ background-position: right 10px center;
3470
+ padding-right: 28px;
3471
+ }
3472
+
3473
+ .bcf-error {
3474
+ font-size: 11px;
3475
+ color: #f87171;
3476
+ }
3477
+
3478
+ .bcf-actions {
3479
+ display: flex;
3480
+ align-items: center;
3481
+ justify-content: flex-end;
3482
+ gap: 10px;
3483
+ margin-top: 8px;
3484
+ }
3485
+
3486
+ .bcf-saved {
3487
+ display: flex;
3488
+ align-items: center;
3489
+ gap: 5px;
3490
+ font-size: 12px;
3491
+ font-weight: 500;
3492
+ color: #22c55e;
3493
+ }
3494
+
3495
+ .bcf-btn-save {
3496
+ padding: 7px 18px;
3497
+ font-size: 12px;
3498
+ font-weight: 600;
3499
+ border-radius: 5px;
3500
+ border: 1px solid var(--border);
3501
+ background: transparent;
3502
+ color: var(--text);
3503
+ cursor: pointer;
3504
+ transition: background 0.15s, color 0.15s;
3505
+ }
3506
+ .bcf-btn-save:hover:not(:disabled) { background: var(--toolbar-hover); }
3507
+ .bcf-btn-save:disabled { opacity: 0.45; cursor: not-allowed; }
3508
+
3509
+ .bcf-btn-back {
3510
+ padding: 6px 14px;
3511
+ font-size: 12px;
3512
+ font-weight: 500;
3513
+ border-radius: 5px;
3514
+ border: 1px solid var(--border);
3515
+ background: none;
3516
+ color: var(--text-muted);
3517
+ cursor: pointer;
3518
+ transition: background 0.12s;
3519
+ }
3520
+ .bcf-btn-back:hover { background: var(--toolbar-hover); }
3521
+
3522
+ /* API-level error banner */
3523
+ .bcf-api-error {
3524
+ margin: 10px 0 4px;
3525
+ padding: 8px 12px;
3526
+ font-size: 12px;
3527
+ color: #f87171;
3528
+ background: rgba(248, 113, 113, 0.08);
3529
+ border: 1px solid rgba(248, 113, 113, 0.25);
3530
+ border-radius: 5px;
3531
+ }
3532
+
3533
+ /* Empty state */
3534
+ .bcf-empty {
3535
+ font-size: 12px;
3536
+ color: var(--text-muted);
3537
+ padding: 12px 0;
3538
+ }
3539
+
3540
+ /* Account list */
3541
+ .bcf-account-list {
3542
+ display: flex;
3543
+ flex-direction: column;
3544
+ gap: 8px;
3545
+ margin-top: 8px;
3546
+ }
3547
+ .bcf-account-row {
3548
+ display: flex;
3549
+ align-items: center;
3550
+ justify-content: space-between;
3551
+ gap: 12px;
3552
+ padding: 10px 12px;
3553
+ border: 1px solid var(--border);
3554
+ border-radius: 6px;
3555
+ background: var(--bg);
3556
+ }
3557
+ .bcf-account-info {
3558
+ display: flex;
3559
+ flex-direction: column;
3560
+ gap: 2px;
3561
+ min-width: 0;
3562
+ }
3563
+ .bcf-account-name {
3564
+ font-size: 12px;
3565
+ font-weight: 600;
3566
+ color: var(--text);
3567
+ }
3568
+ .bcf-account-type {
3569
+ font-size: 11px;
3570
+ color: var(--text-muted);
3571
+ }
3572
+ .bcf-btn-select {
3573
+ flex-shrink: 0;
3574
+ padding: 5px 14px;
3575
+ font-size: 11px;
3576
+ font-weight: 500;
3577
+ border-radius: 5px;
3578
+ border: 1px solid var(--primary);
3579
+ background: none;
3580
+ color: var(--primary);
3581
+ cursor: pointer;
3582
+ transition: background 0.12s;
3583
+ }
3584
+ .bcf-btn-select:hover:not(:disabled) { background: var(--primary-bg); }
3585
+ .bcf-btn-select:disabled { opacity: 0.45; cursor: not-allowed; }
3586
+
3587
+ /* Success state */
3588
+ .bcf-success {
3589
+ display: flex;
3590
+ flex-direction: column;
3591
+ align-items: center;
3592
+ gap: 12px;
3593
+ padding: 32px 16px;
3594
+ font-size: 13px;
3595
+ font-weight: 500;
3596
+ color: #22c55e;
3597
+ text-align: center;
3598
+ }
3599
+
3600
+ /* Trade button accent in top toolbar */
3601
+ .top-trade-btn {
3602
+ color: var(--accent, #58a6ff) !important;
3603
+ }
3604
+ .top-trade-btn:hover,
3605
+ .top-trade-btn.active {
3606
+ color: var(--accent, #58a6ff) !important;
3607
+ background: rgba(88, 166, 255, 0.12) !important;
3608
+ }
3609
+
3610
+ /* ─── Order Entry Panel ──────────────────────────────────────────────────── */
3611
+
3612
+ .oep-panel {
3613
+ flex-shrink: 0;
3614
+ width: 260px;
3615
+ display: flex;
3616
+ flex-direction: column;
3617
+ background: var(--toolbar-bg);
3618
+ border: 1px solid var(--border);
3619
+ border-radius: 8px;
3620
+ overflow: hidden;
3621
+ min-height: 0;
3622
+ animation: oep-slide-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
3623
+ }
3624
+
3625
+ @keyframes oep-slide-in {
3626
+ from { opacity: 0; transform: translateX(16px); }
3627
+ to { opacity: 1; transform: translateX(0); }
3628
+ }
3629
+
3630
+ .oep-header {
3631
+ display: flex;
3632
+ align-items: center;
3633
+ justify-content: space-between;
3634
+ padding: 10px 12px 9px;
3635
+ border-bottom: 1px solid var(--border);
3636
+ background: var(--shelf-bg);
3637
+ flex-shrink: 0;
3638
+ gap: 8px;
3639
+ }
3640
+
3641
+ .oep-title {
3642
+ display: flex;
3643
+ align-items: center;
3644
+ font-size: 12px;
3645
+ font-weight: 600;
3646
+ color: var(--text);
3647
+ letter-spacing: 0.01em;
3648
+ }
3649
+
3650
+ .oep-broker-badge {
3651
+ font-size: 10px;
3652
+ font-weight: 600;
3653
+ text-transform: uppercase;
3654
+ letter-spacing: 0.06em;
3655
+ color: var(--accent);
3656
+ background: rgba(88, 166, 255, 0.08);
3657
+ border: 1px solid rgba(88, 166, 255, 0.25);
3658
+ border-radius: 4px;
3659
+ padding: 1px 5px;
3660
+ display: inline-flex;
3661
+ align-items: center;
3662
+ gap: 5px;
3663
+ }
3664
+
3665
+ .oep-status-dot {
3666
+ width: 7px;
3667
+ height: 7px;
3668
+ border-radius: 50%;
3669
+ flex-shrink: 0;
3670
+ }
3671
+ .oep-status-dot--connected {
3672
+ background: #26a69a;
3673
+ box-shadow: 0 0 0 0 rgba(38, 166, 154, 0.6);
3674
+ animation: oep-dot-pulse-green 2.4s ease-out infinite;
3675
+ }
3676
+ .oep-status-dot--disconnected {
3677
+ background: #ef5350;
3678
+ box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.6);
3679
+ animation: oep-dot-pulse-red 2.4s ease-out infinite;
3680
+ }
3681
+ .oep-status-dot--connecting {
3682
+ background: #ffa726;
3683
+ animation: oep-dot-blink 1s step-start infinite;
3684
+ }
3685
+
3686
+ @keyframes oep-dot-pulse-green {
3687
+ 0% { box-shadow: 0 0 0 0 rgba(38, 166, 154, 0.55); }
3688
+ 60% { box-shadow: 0 0 0 5px rgba(38, 166, 154, 0); }
3689
+ 100% { box-shadow: 0 0 0 0 rgba(38, 166, 154, 0); }
3690
+ }
3691
+ @keyframes oep-dot-pulse-red {
3692
+ 0% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.55); }
3693
+ 60% { box-shadow: 0 0 0 5px rgba(239, 83, 80, 0); }
3694
+ 100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
3695
+ }
3696
+ @keyframes oep-dot-blink {
3697
+ 0%, 100% { opacity: 1; }
3698
+ 50% { opacity: 0.3; }
3699
+ }
3700
+
3701
+ /* Disconnect button in OEP header, right of broker badge */
3702
+ .oep-disconnect-btn {
3703
+ display: inline-flex;
3704
+ align-items: center;
3705
+ gap: 4px;
3706
+ padding: 2px 7px;
3707
+ font-size: 10px;
3708
+ font-weight: 500;
3709
+ color: var(--text-muted);
3710
+ background: transparent;
3711
+ border: 1px solid var(--border);
3712
+ border-radius: 4px;
3713
+ cursor: pointer;
3714
+ transition: color 0.15s, border-color 0.15s;
3715
+ }
3716
+ .oep-disconnect-btn:hover {
3717
+ color: #ef5350;
3718
+ border-color: rgba(239, 83, 80, 0.4);
3719
+ }
3720
+ .oep-disconnect-btn--connect {
3721
+ color: var(--success, #26a69a);
3722
+ border-color: transparent;
3723
+ }
3724
+ .oep-disconnect-btn--connect:hover {
3725
+ color: var(--success, #26a69a);
3726
+ background: rgba(38, 166, 154, 0.12);
3727
+ border-color: var(--success, #26a69a);
3728
+ }
3729
+
3730
+ .oep-close {
3731
+ display: inline-flex;
3732
+ align-items: center;
3733
+ justify-content: center;
3734
+ width: 22px;
3735
+ height: 22px;
3736
+ border: none;
3737
+ background: transparent;
3738
+ color: var(--text-muted);
3739
+ border-radius: 4px;
3740
+ cursor: pointer;
3741
+ padding: 0;
3742
+ flex-shrink: 0;
3743
+ }
3744
+ .oep-close:hover {
3745
+ background: var(--toolbar-hover);
3746
+ color: var(--text);
3747
+ }
3748
+
3749
+ .oep-body {
3750
+ flex: 1;
3751
+ overflow-y: auto;
3752
+ padding: 10px 12px;
3753
+ display: flex;
3754
+ flex-direction: column;
3755
+ gap: 6px;
3756
+ min-height: 0;
3757
+ }
3758
+ .oep-body--status {
3759
+ flex: 1;
3760
+ display: flex;
3761
+ flex-direction: column;
3762
+ align-items: center;
3763
+ justify-content: center;
3764
+ gap: 12px;
3765
+ padding: 24px 16px;
3766
+ text-align: center;
3767
+ }
3768
+ .oep-retry-btn {
3769
+ margin-top: 4px;
3770
+ padding: 6px 16px;
3771
+ border-radius: 6px;
3772
+ border: 1px solid var(--border);
3773
+ background: var(--surface);
3774
+ color: var(--text);
3775
+ font-size: 12px;
3776
+ cursor: pointer;
3777
+ transition: background 0.15s;
3778
+ }
3779
+ .oep-retry-btn:hover { background: var(--hover); }
3780
+
3781
+ /* ── Account display ── */
3782
+ .oep-account-chip {
3783
+ font-size: 12px;
3784
+ color: var(--text);
3785
+ background: var(--shelf-bg);
3786
+ border: 1px solid var(--border);
3787
+ border-radius: 5px;
3788
+ padding: 5px 8px;
3789
+ white-space: nowrap;
3790
+ overflow: hidden;
3791
+ text-overflow: ellipsis;
3792
+ }
3793
+
3794
+ /* ── Form rows ── */
3795
+ .oep-row {
3796
+ display: flex;
3797
+ flex-direction: column;
3798
+ gap: 3px;
3799
+ }
3800
+
3801
+ .oep-label {
3802
+ font-size: 10px;
3803
+ font-weight: 600;
3804
+ text-transform: uppercase;
3805
+ letter-spacing: 0.06em;
3806
+ color: var(--text-muted);
3807
+ }
3808
+
3809
+ .oep-input,
3810
+ .oep-select {
3811
+ width: 100%;
3812
+ box-sizing: border-box;
3813
+ background: var(--shelf-bg);
3814
+ border: 1px solid var(--border);
3815
+ border-radius: 5px;
3816
+ color: var(--text);
3817
+ font-size: 12px;
3818
+ padding: 5px 8px;
3819
+ outline: none;
3820
+ transition: border-color 0.12s;
3821
+ }
3822
+ .oep-input:focus,
3823
+ .oep-select:focus {
3824
+ border-color: var(--primary);
3825
+ }
3826
+ /* Symbol search button — looks like an input but opens the search dialog */
3827
+ .oep-symbol-btn {
3828
+ display: flex;
3829
+ align-items: center;
3830
+ justify-content: space-between;
3831
+ cursor: pointer;
3832
+ text-align: left;
3833
+ gap: 6px;
3834
+ }
3835
+ .oep-symbol-btn:hover {
3836
+ border-color: var(--primary);
3837
+ }
3838
+ .oep-symbol-btn-text {
3839
+ flex: 1;
3840
+ overflow: hidden;
3841
+ text-overflow: ellipsis;
3842
+ white-space: nowrap;
3843
+ font-weight: 600;
3844
+ letter-spacing: 0.02em;
3845
+ }
3846
+ .oep-select {
3847
+ appearance: none;
3848
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
3849
+ background-repeat: no-repeat;
3850
+ background-position: right 8px center;
3851
+ background-size: 8px 5px;
3852
+ padding-right: 22px;
3853
+ }
3854
+
3855
+ /* ── Buy / Sell toggle ── */
3856
+ .oep-side-toggle {
3857
+ display: flex;
3858
+ border-radius: 6px;
3859
+ overflow: hidden;
3860
+ border: 1px solid var(--border);
3861
+ width: 100%;
3862
+ }
3863
+
3864
+ .oep-side-btn {
3865
+ flex: 1;
3866
+ padding: 7px 4px;
3867
+ font-size: 12px;
3868
+ font-weight: 700;
3869
+ border: none;
3870
+ cursor: pointer;
3871
+ background: transparent;
3872
+ color: var(--text-muted);
3873
+ letter-spacing: 0.03em;
3874
+ transition: background 0.12s, color 0.12s;
3875
+ }
3876
+ .oep-side-btn--buy.oep-side-btn--active {
3877
+ background: rgba(38, 166, 154, 0.18);
3878
+ color: var(--success, #26a69a);
3879
+ }
3880
+ .oep-side-btn--sell.oep-side-btn--active {
3881
+ background: rgba(239, 83, 80, 0.18);
3882
+ color: var(--error, #ef5350);
3883
+ }
3884
+ .oep-side-btn:not(.oep-side-btn--active):hover {
3885
+ background: var(--toolbar-hover);
3886
+ color: var(--text);
3887
+ }
3888
+
3889
+ /* ── Bracket toggle ── */
3890
+ .oep-bracket-toggle {
3891
+ margin-top: 2px;
3892
+ }
3893
+ .oep-checkbox-label {
3894
+ display: flex;
3895
+ align-items: center;
3896
+ gap: 6px;
3897
+ font-size: 11px;
3898
+ color: var(--text-muted);
3899
+ cursor: pointer;
3900
+ user-select: none;
3901
+ }
3902
+ .oep-checkbox-label input[type=checkbox] {
3903
+ accent-color: var(--primary);
3904
+ width: 13px;
3905
+ height: 13px;
3906
+ cursor: pointer;
3907
+ }
3908
+
3909
+ /* ── Tick input with unit ── */
3910
+ .oep-input-tick-wrap {
3911
+ display: flex;
3912
+ align-items: center;
3913
+ gap: 4px;
3914
+ }
3915
+ .oep-input-tick-wrap .oep-input {
3916
+ flex: 1;
3917
+ min-width: 0;
3918
+ }
3919
+ .oep-tick-unit {
3920
+ font-size: 10px;
3921
+ color: var(--text-muted);
3922
+ white-space: nowrap;
3923
+ flex-shrink: 0;
3924
+ }
3925
+
3926
+ /* ── Error / success messages ── */
3927
+ .oep-error {
3928
+ font-size: 11px;
3929
+ color: var(--error, #ef5350);
3930
+ background: rgba(239, 83, 80, 0.08);
3931
+ border: 1px solid rgba(239, 83, 80, 0.25);
3932
+ border-radius: 5px;
3933
+ padding: 5px 8px;
3934
+ line-height: 1.4;
3935
+ }
3936
+
3937
+ .oep-success {
3938
+ display: flex;
3939
+ align-items: center;
3940
+ gap: 5px;
3941
+ font-size: 11px;
3942
+ color: var(--success, #26a69a);
3943
+ background: rgba(38, 166, 154, 0.08);
3944
+ border: 1px solid rgba(38, 166, 154, 0.25);
3945
+ border-radius: 5px;
3946
+ padding: 5px 8px;
3947
+ }
3948
+
3949
+ /* ── Async broker status strip ── */
3950
+ .oep-broker-status {
3951
+ display: flex;
3952
+ align-items: center;
3953
+ gap: 5px;
3954
+ font-size: 11px;
3955
+ border-radius: 5px;
3956
+ padding: 5px 8px;
3957
+ line-height: 1.4;
3958
+ }
3959
+ .oep-broker-status--open {
3960
+ color: #90caf9;
3961
+ background: rgba(144, 202, 249, 0.08);
3962
+ border: 1px solid rgba(144, 202, 249, 0.25);
3963
+ }
3964
+ .oep-broker-status--partial {
3965
+ color: #ffb74d;
3966
+ background: rgba(255, 183, 77, 0.08);
3967
+ border: 1px solid rgba(255, 183, 77, 0.25);
3968
+ }
3969
+ .oep-broker-status--filled {
3970
+ color: var(--success, #26a69a);
3971
+ background: rgba(38, 166, 154, 0.10);
3972
+ border: 1px solid rgba(38, 166, 154, 0.30);
3973
+ font-weight: 600;
3974
+ }
3975
+ .oep-broker-status--rejected {
3976
+ color: var(--error, #ef5350);
3977
+ background: rgba(239, 83, 80, 0.08);
3978
+ border: 1px solid rgba(239, 83, 80, 0.25);
3979
+ }
3980
+ .oep-broker-status--cancelled {
3981
+ color: var(--text-muted);
3982
+ background: rgba(128, 128, 128, 0.06);
3983
+ border: 1px solid rgba(128, 128, 128, 0.18);
3984
+ }
3985
+
3986
+ /* ── Submit button ── */
3987
+ .oep-actions {
3988
+ margin-top: 4px;
3989
+ }
3990
+
3991
+ /* ── Section separator ── */
3992
+ .oep-section-sep {
3993
+ height: 1px;
3994
+ background: var(--border);
3995
+ margin: 10px 0;
3996
+ opacity: 0.5;
3997
+ }
3998
+
3999
+ /* ── Presets ── */
4000
+ .oep-preset-row {
4001
+ display: flex;
4002
+ gap: 6px;
4003
+ margin-bottom: 6px;
4004
+ }
4005
+ .oep-preset-select {
4006
+ flex: 1;
4007
+ }
4008
+ .oep-preset-save-btn {
4009
+ width: 100%;
4010
+ display: flex;
4011
+ align-items: center;
4012
+ justify-content: center;
4013
+ gap: 6px;
4014
+ padding: 6px 10px;
4015
+ font-size: 11px;
4016
+ font-weight: 500;
4017
+ color: var(--text);
4018
+ background: var(--shelf-bg);
4019
+ border: 1px solid var(--border);
4020
+ border-radius: 6px;
4021
+ cursor: pointer;
4022
+ transition: background 0.12s, border-color 0.12s;
4023
+ margin-bottom: 2px;
4024
+ }
4025
+ .oep-preset-save-btn:hover {
4026
+ background: rgba(var(--primary-rgb, 41, 98, 255), 0.08);
4027
+ border-color: var(--primary, #2962ff);
4028
+ }
4029
+ .oep-preset-save-row {
4030
+ display: flex;
4031
+ gap: 4px;
4032
+ align-items: center;
4033
+ }
4034
+ .oep-preset-name-input {
4035
+ flex: 1;
4036
+ min-width: 0;
4037
+ }
4038
+ .oep-preset-confirm-btn {
4039
+ padding: 5px 9px;
4040
+ font-size: 11px;
4041
+ font-weight: 600;
4042
+ color: #fff;
4043
+ background: var(--primary, #2962ff);
4044
+ border: none;
4045
+ border-radius: 5px;
4046
+ cursor: pointer;
4047
+ white-space: nowrap;
4048
+ }
4049
+ .oep-preset-confirm-btn:disabled {
4050
+ opacity: 0.4;
4051
+ cursor: not-allowed;
4052
+ }
4053
+ .oep-preset-cancel-btn {
4054
+ display: flex;
4055
+ align-items: center;
4056
+ justify-content: center;
4057
+ padding: 5px 7px;
4058
+ color: var(--text-muted);
4059
+ background: transparent;
4060
+ border: 1px solid var(--border);
4061
+ border-radius: 5px;
4062
+ cursor: pointer;
4063
+ }
4064
+ .oep-preset-cancel-btn:hover {
4065
+ color: var(--text);
4066
+ border-color: var(--text-muted);
4067
+ }
4068
+
4069
+ /* ── Position management buttons ── */
4070
+ .oep-pos-row {
4071
+ display: flex;
4072
+ gap: 6px;
4073
+ margin-bottom: 6px;
4074
+ }
4075
+ .oep-pos-btn {
4076
+ display: flex;
4077
+ align-items: center;
4078
+ justify-content: center;
4079
+ gap: 5px;
4080
+ padding: 6px 8px;
4081
+ font-size: 11px;
4082
+ font-weight: 500;
4083
+ border-radius: 6px;
4084
+ cursor: pointer;
4085
+ transition: background 0.12s, border-color 0.12s, color 0.12s;
4086
+ white-space: nowrap;
4087
+ }
4088
+ .oep-pos-btn:disabled {
4089
+ opacity: 0.38;
4090
+ cursor: not-allowed;
4091
+ pointer-events: none;
4092
+ }
4093
+ /* Full-width standalone buttons */
4094
+ .oep-pos-btn--close,
4095
+ .oep-pos-btn--flatten {
4096
+ width: 100%;
4097
+ margin-bottom: 6px;
4098
+ }
4099
+ /* Half-width pair buttons */
4100
+ .oep-pos-row .oep-pos-btn {
4101
+ flex: 1;
4102
+ margin-bottom: 0;
4103
+ }
4104
+
4105
+ .oep-pos-btn--close {
4106
+ color: #ef5350;
4107
+ background: rgba(239, 83, 80, 0.06);
4108
+ border: 1px solid rgba(239, 83, 80, 0.3);
4109
+ }
4110
+ .oep-pos-btn--close:hover {
4111
+ background: rgba(239, 83, 80, 0.14);
4112
+ border-color: #ef5350;
4113
+ }
4114
+ .oep-pos-btn--cancel {
4115
+ color: var(--text-muted);
4116
+ background: var(--shelf-bg);
4117
+ border: 1px solid var(--border);
4118
+ }
4119
+ .oep-pos-btn--cancel:hover {
4120
+ color: #ef5350;
4121
+ border-color: rgba(239, 83, 80, 0.5);
4122
+ background: rgba(239, 83, 80, 0.06);
4123
+ }
4124
+ .oep-pos-btn--reverse {
4125
+ color: var(--text-muted);
4126
+ background: var(--shelf-bg);
4127
+ border: 1px solid var(--border);
4128
+ }
4129
+ .oep-pos-btn--reverse:hover {
4130
+ color: var(--text);
4131
+ border-color: var(--text-muted);
4132
+ background: rgba(128, 128, 128, 0.08);
4133
+ }
4134
+ .oep-pos-btn--flatten {
4135
+ color: var(--text-muted);
4136
+ background: var(--shelf-bg);
4137
+ border: 1px solid var(--border);
4138
+ }
4139
+ .oep-pos-btn--flatten:hover {
4140
+ color: var(--text);
4141
+ border-color: var(--text-muted);
4142
+ background: rgba(128, 128, 128, 0.08);
4143
+ }