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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1537685
 
e1b869a
 
1537685
 
e1b869a
1537685
 
 
e1b869a
1537685
 
e1b869a
1537685
 
e1b869a
1537685
e1b869a
1537685
e1b869a
1537685
e1b869a
1537685
 
e1b869a
1537685
e1b869a
 
1537685
 
 
e1b869a
 
1537685
e1b869a
 
1537685
 
e1b869a
 
e4a867e
 
1537685
 
 
e4a867e
 
1537685
 
 
371d2bb
1537685
0152d38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.12), transparent 40%),
        radial-gradient(circle at 80% 25%, rgba(139, 92, 246, 0.1), transparent 45%),
        radial-gradient(circle at 50% 70%, rgba(16, 185, 129, 0.08), transparent 50%),
        radial-gradient(circle at 10% 85%, rgba(236, 72, 153, 0.08), transparent 45%),
        linear-gradient(135deg, #0a0e27 0%, #1a1f3a 25%, #0f1629 50%, #1e2139 75%, #0d1425 100%) !important;
    /* animation: gridScroll 30s linear infinite; */
}

/* Hexagon pattern overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 25px, rgba(174, 246, 59, 0.015) 35px, rgba(93, 205, 18, 0.015) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 25px, rgba(139, 92, 246, 0.015) 35px, rgba(139, 92, 246, 0.015) 70px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ------------------------- */
/* FORCE GRADIO TO NOT WRAP  */
/* ------------------------- */

/* Outer Gradio container */
.gradio-container,
.gradio-container .wrap,
.gradio-container .contain {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: stretch !important;
}

/* Prevent Gradio auto-min-width */
.gradio-container .contain>div[id^="component-"] {
    min-width: auto !important;
    flex: 1 !important;
}

/* Space between cards */
.gradio-container .contain>div[id^="component-"]>.gr-group,
.gradio-container .contain>div[id^="component-"]>div {
    margin: 10px 15px !important;
}

.gradio-container.gradio-container-6-1-0 .contain input[class*="svelte-"] {
  color: white;
}


/* .gradio-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #17203D !important;
    min-height: 100vh;
} */
.header-box {
    position: relative;
    padding: 0px 30px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.25), transparent 55%),
        radial-gradient(circle at 85% 20%, rgba(45, 135, 255, 0.22), transparent 70%),
        linear-gradient(135deg, #0e1a2b, #0f1032, #03011a);
    color: white;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 0 50px 90px -20px rgba(0, 0, 0, 0.6);

    display: flex;
    justify-content: space-;
    align-items: center;
    /* width:100%; */

}

.header-title {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.compact-section {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 10px;
    margin: 8px;
    height: calc(100vh - 180px);
    overflow-y: auto;
}

.card-box {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* Compact Upload Box */
.compact-upload-box {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 12px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    max-width: 280px;
}

.compact-upload-box .upload-container {
    height: 180px !important;
    min-height: 180px !important;
}

.compact-upload-box input[type="file"] {
    height: 140px !important;
    min-height: 140px !important;
}

.how-to-use h3,
.how-to-use li {
    color: white;
}

.how-to-use {
    background: rgba(255, 255, 255, 0.12);
    /* frosted glass transparency */
    backdrop-filter: blur(12px) saturate(160%);
    /* glass blur effect */
    -webkit-backdrop-filter: blur(12px) saturate(160%);

    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);

    margin-bottom: 20px;
    max-height: 196px;
    height: 100%;

    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    /* soft floating shadow */

    transition: all 0.3s ease;
}

.how-to-use:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.upload-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    max-height: 100px;
    height: 100%;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.25);
    transition: 0.3s ease;
}

.first-row {
    max-height: 250px;
    height: 100%;
}

.upload-card:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}



/* Floating Ask Me Button */
button.floating-chat-btn,
.floating-chat-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 1000 !important;
    width: 65px !important;
    height: 65px !important;
    min-width: 65px !important;
    min-height: 65px !important;
    max-width: 65px !important;
    max-height: 65px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6) !important;
    cursor: pointer !important;
    font-size: 32px !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

button.floating-chat-btn:hover,
.floating-chat-btn:hover {
    transform: scale(1.15) rotate(5deg) !important;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Chat Popup Container */
.chat-popup-box {
    position: fixed !important;
    bottom: 110px !important;
    right: 30px !important;
    width: 480px !important;
    max-height: 75vh !important;
    z-index: 999 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 255, 0.98) 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(102, 126, 234, 0.2) !important;
    overflow: hidden !important;
    animation: slideInUp 0.3s ease-out !important;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 20px 24px !important;
    color: white !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.chat-header h3 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Chat Content */
.chat-content-area {
    padding: 20px !important;
    max-height: calc(75vh - 80px) !important;
    overflow-y: auto !important;
    background: transparent !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

.chat-content-area>* {
    margin-bottom: 15px !important;
}

/* Sample Questions */
.sample-questions-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    padding: 15px 18px !important;
    margin-bottom: 18px !important;
    border: 1px solid rgba(102, 126, 234, 0.15) !important;
}

.sample-questions-box h4 {
    margin: 0 0 12px 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.sample-q-text {
    color: rgb(0, 0, 0) !important;
    font-size: 13px !important;
    margin: 0px !important;
    line-height: 1.15 !important;
    padding: 0px !important;
}

.sample-q-text p {
    color: rgb(0, 0, 0) !important;
    margin: 0px !important;
    padding: 0px !important;
}

/* Question Input */
.question-input-box {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

.question-input-box h4 {
    margin: 0 0 10px 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Minimal textbox styling - let Gradio handle rendering */
.chat-content-area .chat-question-input {
    margin: 12px 0 !important;
}

.chat-content-area textarea,
.chat-content-area input[type="text"] {
    background: #ffffff !important;
    border: 2px solid #667eea !important;
    border-radius: 10px !important;
    padding: 14px !important;
    font-size: 14px !important;
}

.chat-content-area textarea:focus,
.chat-content-area input:focus {
    border-color: #764ba2 !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15) !important;
    outline: none !important;
}



/* Submit Button in Chat */
.chat-submit-btn {
    width: 100% !important;
    padding: 14px !important;
    margin: 15px 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.chat-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5) !important;
}


/* Response Section */
.response-box {
    margin-top: 20px !important;
    border-top: 2px solid #e9ecef !important;
    padding-top: 20px !important;
}

.response-box h4 {
    margin: 0 0 15px 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Tabs in Chat */
.chat-content-area .gr-tabs {
    background: transparent !important;
    border: none !important;
}

.chat-content-area .gr-tab {
    color: #555 !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px 16px !important;
    margin-right: 4px !important;
}

.chat-content-area .gr-tab.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Output fields in chat */
.chat-content-area .gr-textbox,
.chat-content-area .gr-plot,
.chat-content-area .gr-dataframe {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 12px !important;
}

.chat-content-area .gr-textbox textarea {
    color: #333 !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
}

/* Scrollbar for chat content */
.chat-content-area::-webkit-scrollbar {
    width: 6px;
}

.chat-content-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.chat-content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.chat-content-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ------------------------- */
/* FORCE GRADIO TO NOT WRAP  */
/* ------------------------- */


.first-row,
.gr-row,
.gr-column {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: stretch !important;
}

/* General card layout - VISIBLE BORDERS */
.upload-section,
.how-to-use,
.card-box,
.upload-card,
.gr-group,
.gr-column>.gr-group,
.gr-column>div.gr-group {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
    border-radius: 18px !important;
    border: 3px solid rgba(255, 255, 255, 0.7) !important;
    padding: 20px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
    transition: 0.25s ease-in-out !important;
}

/* Hover effect */
.upload-section:hover,
.how-to-use:hover,
.gr-group:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* REMOVE borders from specific sections */
.header-box,
.header-box * {
    border: none !important;
}

/* Remove borders from Sample Questions markdown sections */
.gr-markdown h3:contains("Sample Questions"),
.gr-markdown:has(h3) {
    border: none !important;
}

/* Remove borders from Analysis Results and related output sections */
[id*="output"],
[id*="answer"],
[id*="result"],
.gr-textbox,
.gr-plot,
.gr-dataframe {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* TARGET THE EXACT 3 BOXES BY ID - WHITE BORDERS ONLY */
#display-format-box,
#analysis-type-box,
#visualization-box {
    border: 6px solid #FFFFFF !important;
    border-radius: 18px !important;
    padding: 20px !important;
}

/* ------------------------- */
/*   CARD SIZING & SPACING   */
/* ------------------------- */

.first-row>div,
.first-row>.gr-column,
.first-row>.gr-group {
    flex: 1 !important;
    margin: 10px 15px !important;
}

/* Prevent shrinking */
.gr-group {
    flex-shrink: 0 !important;
}

/* Upload + Display + How-to-use row fixes */
.first-row {
    margin-top: 20px !important;
    padding: 0 25px !important;
    margin-bottom: 80px !important;
    min-height: 200px !important;
}

/* Second row - fixed spacing */
.second-row {
    margin-top: 80px !important;
    padding: 0 25px !important;
    clear: both !important;
}

/* Ensure proper spacing between rows */
.first-row .gr-group {
    margin-bottom: 20px !important;
}

/* Upload section dynamic height */
#upload-wrapper {
    min-height: 180px !important;
    transition: height 0.3s ease !important;
}

/* When upload info is present, expand */
#upload-wrapper .upload-info:not(:empty) {
    min-height: 60px !important;
    padding: 10px !important;
    margin-top: 10px !important;
}

.upload-section {
    width: 100% !important;
    min-height: 165px !important;
}

/* Display Format card width */
.display-format-card {
    min-width: 260px !important;
}

/* ------------------------- */
/*   SECOND ROW (Analysis, Viz, Handling) */
/* ------------------------- */

.gr-row:nth-of-type(2)>.gr-group {
    flex: 1 !important;
    margin: 10px 15px !important;
    min-height: 170px !important;
}

/* ------------------------- */
/*   DATA PREVIEW + ANALYSIS */
/* ------------------------- */

.gr-column>.gr-markdown,
.gr-dataframe,
.gr-plot,
.gr-textbox {
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Improve titles */
.gr-markdown h3,
.gr-markdown h1,
.gr-markdown h2,
.gr-markdown h4,
.gr-markdown h5,
.gr-markdown h6 {
    color: white !important;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3) !important;
}

/* Force all headings white */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: white !important;
}

/* Specific markdown content */
.gr-group .gr-markdown,
.gr-group .gr-markdown * {
    color: white !important;
}

/* Make internal elements visible with white text */
.gr-textbox,
.gr-textbox input,
.gr-textbox textarea,
.gr-file,
.gr-file input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: white !important;
}

.gr-dropdown:hover,
.gr-textbox:hover,
.gr-file:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.gr-dropdown:focus-within,
.gr-textbox:focus-within,
.gr-file:focus-within {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* Dropdown options */
.gr-dropdown .dropdown-content,
.gr-dropdown .dropdown-menu {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

/* Labels */
.gr-form label {
    color: #d1d5db !important;
}

/* Make all text content white */
.gr-markdown,
.gr-markdown h1,
.gr-markdown h2,
.gr-markdown h3,
.gr-markdown h4,
.gr-markdown p,
.gr-html,
.gr-html ul,
.gr-html li,
.gr-button,
.gr-dropdown label,
.gr-textbox label,
.gr-file label,
span,
div,
p {
    background: transparent !important;
    color: white !important;
}

/* Dropdown styling - Force white text */
.gr-dropdown,
.gr-dropdown select,
.gr-dropdown .wrap,
.gr-dropdown input,
.gr-dropdown .selected-option {
    background: rgba(0, 0, 0, 0.3) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-weight: 500 !important;
}

/* Dropdown text visibility */
.gr-dropdown * {
    color: white !important;
}

/* Dropdown options menu */
.gr-dropdown .dropdown-content,
.gr-dropdown .dropdown-menu,
.gr-dropdown option,
.gr-dropdown select option {
    background: rgba(30, 41, 59, 0.95) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Force all dropdown text white - AGGRESSIVE */
select,
select option,
.gr-dropdown select,
.gr-dropdown select option,
.gr-dropdown .wrap select,
.gr-dropdown .wrap,
.gr-dropdown input[type="text"],
.gr-dropdown .selected-text,
.gr-dropdown .current-selection {
    color: white !important;
    background: rgba(0, 0, 0, 0.6) !important;
    -webkit-text-fill-color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Gradio specific dropdown classes */
.gr-dropdown .wrap>*,
.gr-dropdown .wrap input,
.gr-dropdown .wrap select,
.gr-dropdown .wrap .selected,
.gr-dropdown .wrap .value {
    color: white !important;
    background: rgba(0, 0, 0, 0.5) !important;
    -webkit-text-fill-color: white !important;
}

/* Override any theme colors */
* [class*="dropdown"] {
    color: white !important;
}

* [class*="dropdown"] * {
    color: white !important;
}

/* File upload text */
.gr-file .file-preview,
.gr-file .upload-text {
    background: transparent !important;
    color: white !important;
}

/* Button text and borders - HIGHLY VISIBLE */
.gr-button,
button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 3px solid rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

/* ------------------------- */
/* BUTTON ENHANCEMENTS       */
/* ------------------------- */
.gr-button-primary,
button[class*="primary"] {
    background: linear-gradient(135deg, #4f63e4, #7a3cff) !important;
    border-radius: 10px !important;
    border: 3px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 4px 14px rgba(79, 99, 228, 0.4) !important;
    transition: 0.25s ease !important;
}

.gr-button-primary:hover,
button[class*="primary"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(79, 99, 228, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
}

.gr-button-secondary,
button[class*="secondary"] {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 3px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 10px !important;
}

.gr-button-secondary:hover,
button[class*="secondary"]:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* ------------------------- */
/*   FIX MISALIGNED ELEMENTS */
/* ------------------------- */

.gr-group>* {
    width: 100% !important;
}

.upload-section .gr-markdown {
    margin-bottom: 8px !important;
}

.overflow-class {
    overflow: visible;
}

/* ---------- Upload wrapper: force size and glass style ---------- */
#upload-wrapper {
    width: 100% !important;
    /* full width of its column */
    min-width: 360px !important;
    /* avoid collapsing on narrow screens */
    max-width: 520px !important;
    /* adjust as needed */
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px !important;
    margin: 8px 12px !important;
    border-radius: 16px !important;
    background: transparent;
    /* border: 1px solid rgba(255,255,255,0.12) !important; */
    backdrop-filter: blur(18px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45) inset, 0 8px 28px rgba(6, 12, 40, 0.45) !important;
    align-self: flex-start !important;
    /* keep it aligned inside row */
}

/* Make the title look consistent */
#upload-wrapper .upload-title h3 {
    color: #e6f0ff !important;
    font-weight: 600 !important;
    margin: 0 0 6px 0 !important;
}

/* Make the file control visually large and centered */
#upload-wrapper .upload-card,
#upload-wrapper .gr-file,
#upload-wrapper input[type="file"] {
    width: 100% !important;
    min-height: 110px !important;
    padding: 16px !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 8px 20px rgba(12, 18, 40, 0.35) !important;
}

/* dataset info text area - BLACK TEXT FOR VISIBILITY */
#upload-wrapper .upload-info,
#upload-wrapper .gr-markdown {
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

/* Make the markdown text content black */
#upload-wrapper .upload-info *,
#upload-wrapper .gr-markdown *,
.upload-info,
.upload-info strong,
.upload-info p {
    color: #000000 !important;
}

/* clear button alignment and style */
#upload-wrapper .upload-clear-btn {
    align-self: flex-end !important;
    margin-top: 6px !important;
}

/* if Gradio wraps the file input in an inner container */
#upload-wrapper [class*="file"],
#upload-wrapper [class*="upload"] {
    width: 100% !important;
}

/* Ensure it doesn't collapse when Gradio enforces min-width elsewhere */
#upload-wrapper>* {
    min-width: 0 !important;
}

/* Optional responsive tweak: allow it to expand on larger screens */
@media (min-width: 1280px) {
    #upload-wrapper {
        max-width: 640px !important;
    }
}

/* How to Use Box - Top Right Corner */
.how-to-use-sidebar {
    position: fixed !important;
    top: 150px !important;
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    width: 260px !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.how-to-use-content {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 18px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s ease !important;
}

.how-to-use-content:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-3px) !important;
}

.how-to-use-content h3 {
    color: white !important;
    margin: 0 0 10px 0 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3) !important;
}

.how-to-use-content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.how-to-use-content li {
    color: white !important;
    margin: 7px 0 !important;
    padding-left: 0 !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    opacity: 0.9 !important;
}

/* Main container - Full width to cover left area */
.gradio-container {
    margin-left: 0 !important;
    padding-left: 20px !important;
}

/* Responsive: Remove margin on smaller screens */
@media (max-width: 1200px) {
    .gradio-container {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .how-to-use-sidebar {
        display: none !important;
    }
}

/* Custom Dropdown Styling */
.custom-dropdown {
    width: 100%;
}

.custom-dropdown label {
    color: white !important;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-button {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
}

.dropdown-button:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.dropdown-arrow {
    color: #666;
    font-size: 12px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #eee;
}

.dropdown-item:hover {
    background: #f0f8ff;
}

.dropdown-item.selected {
    background: #3b82f6;
    color: white;
}

.selected-columns {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.selected-tag span {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
}

.selected-tag span:hover {
    opacity: 1;
}

/* ========================= */
/* FIX: Prevent Dropdown Text Input */
/* ========================= */

/* Make dropdown input read-only - prevent typing */
.gr-dropdown input[type="text"] {
    cursor: pointer !important;
    user-select: none !important;
    caret-color: transparent !important;
}

/* Allow clicking on the dropdown container itself */
.gr-dropdown .wrap {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure ALL dropdowns are clickable */
.gr-dropdown,
.gr-dropdown *,
.gr-dropdown button,
.gr-dropdown .wrap,
.gr-dropdown select {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Make sure dropdown button/arrow is visible and clickable */
.gr-dropdown button,
.gr-dropdown button svg,
.gr-dropdown .icon,
button[aria-label*="dropdown"],
button[class*="dropdown"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure Group containers don't block dropdowns */
#display-format-box,
#analysis-type-box,
#visualization-box {
    pointer-events: auto !important;
}

#display-format-box *,
#analysis-type-box *,
#visualization-box * {
    pointer-events: auto !important;
}

/* Ensure column selector appears in correct order */
.gr-checkbox-group {
    order: 0 !important;
}


/* FORCE Column Selector Labels to be BLACK - Very Specific */
[data-testid="checkbox-group"] label,
[data-testid="checkbox-group"] label span,
[data-testid="checkbox-group"] span,
.wrap[data-testid="checkbox-group"] label,
.wrap[data-testid="checkbox-group"] span,
label[class*="svelte"] span,
.checkbox-group label,
.checkbox-group span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Target any span inside checkbox labels */
input[type="checkbox"]+span,
input[type="checkbox"]~span,
label:has(input[type="checkbox"]) span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Force all spans near checkboxes to be black */
span[class*="svelte"] {
    color: #000000 !important;
}

/* Transparent background for checkbox container */
[data-testid="checkbox-group"],
[data-testid="checkbox-group"]>div {
    background: transparent !important;
}

/* Match wrap sizes for dropdowns */
div.wrap.svelte-vomtx {
    min-height: auto !important;
    height: auto !important;
}

div.wrap.svelte-vomtx,
div.secondarywrap {
    padding: 8px !important;
}

/* Make dropdown labels white */
.gr-dropdown label,
.gr-dropdown .label {
    color: white !important;
}


/* Display Format dropdown label - white text */
.gradio-container.gradio-container-4-20-0 .contain span[class*="svelte"] {
    color: rgb(255, 255, 255) !important;
}



/* ===========================================================
   FIX: Force white text for the Gradio block-info label
   =========================================================== */

span[data-testid="block-info"],
.gradio-container span[data-testid="block-info"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* If the framework switches from <span> to <p>, also cover this */
p[data-testid="block-info"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


.svelte-vomtxz.container {
    border: 2px solid white !important;
    border-radius: 8px !important;
    padding: 10px !important;
}

/* Remove ALL purple outlines and focus states */
*,
*:focus,
*:focus-visible,
*:active,
button,
button:focus,
button:focus-visible,
button:active,
input,
input:focus,
input:focus-visible,
textarea,
textarea:focus,
textarea:focus-visible,
select,
select:focus,
.gr-button,
.gr-button:focus,
.gr-textbox,
.gr-textbox:focus,
.gr-tab,
.gr-tab:focus,
.gr-tab:active,
[role="tab"],
[role="tab"]:focus,
[role="tab"]:active,
.floating-chat-btn:focus,
.chat-close-btn:focus,
.chat-popup-box *,
.chat-popup-box *:focus,
.chat-popup-box *:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Force remove Gradio default focus styles */
.gradio-container *:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove browser default focus ring */
:focus {
    outline: none !important;
}

/* Remove any purple/blue focus indicators */
*[style*="outline"],
*[style*="box-shadow"] {
    outline: none !important;
    box-shadow: none !important;
}