LeroyDyer commited on
Commit
5dca874
·
verified ·
1 Parent(s): e51fc37

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1769 -0
app.py CHANGED
@@ -40,6 +40,1775 @@ CLIENT =OpenAI(
40
  ) # Global state for client
41
  console= Console()
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  @dataclass
44
  class ParsedResponse:
45
  """Fixed ParsedResponse data model"""
 
40
  ) # Global state for client
41
  console= Console()
42
 
43
+ class CONFIG:
44
+
45
+ def __init__(self):
46
+ self.custom_css = """
47
+
48
+ .gradio-container {
49
+ background-color: rgba(243, 48, 4, 0.85);
50
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
51
+ background-size: cover;
52
+ background-position: center;
53
+ background-repeat: no-repeat;
54
+ border-radius: 20px;
55
+ }
56
+
57
+
58
+ .agent-card { padding: 10px; margin: 5px 0; border-radius: 8px; background: #f0f8ff; }
59
+ .agent-card.active { background: #e6f2ff; border-left: 3px solid #3399FF; }
60
+ .status-indicator { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
61
+ .online { background-color: #4CAF50; }
62
+ .offline { background-color: #F44336; }
63
+ .console-log { font-family: monospace; font-size: 0.9em; background: #1e1e1e; color: #00ff00; padding: 10px; border-radius: 5px; height: 500px; overflow-y: auto; }
64
+ .log-entry { margin: 2px 0; }
65
+ .log-public { color: #00ff00; }
66
+ .log-direct { color: #ffaa00; }
67
+ .log-system { color: #00aaff; }
68
+ .message-controls { background: #f5f5f5; padding: 10px; border-radius: 5px; margin-bottom: 10px; }
69
+
70
+ .console-log {
71
+ font-family: monospace;
72
+ font-size: 0.85em;
73
+ background: #1e1e1e;
74
+ color: #00ff00;
75
+ padding: 10px;
76
+ border-radius: 5px;
77
+ height: 600px;
78
+ overflow-y: auto;
79
+ word-wrap: break-word;
80
+ white-space: pre-wrap;
81
+ }
82
+
83
+ .log-entry {
84
+ margin: 4px 0;
85
+ padding: 2px 4px;
86
+ border-left: 2px solid #333;
87
+ }
88
+
89
+ .log-public {
90
+ color: #00ff00;
91
+ border-left-color: #00aa00;
92
+ }
93
+
94
+ .log-direct {
95
+ color: #ffaa00;
96
+ border-left-color: #ff8800;
97
+ }
98
+
99
+ .log-system {
100
+ color: #00aaff;
101
+ border-left-color: #0088ff;
102
+ }
103
+
104
+ .lcars-container {
105
+ background: #000d1a;
106
+ color: #7EC8E3;
107
+ font-family: 'Courier New', monospace;
108
+ padding: 20px;
109
+ border-radius: 0;
110
+ }
111
+ .lcars-title {
112
+ color: #7EC8E3;
113
+ text-align: center;
114
+ font-size: 2.2em;
115
+ text-shadow: 0 0 10px #7EC8E3, 0 0 20px rgba(126, 200, 227, 0.5);
116
+ margin-bottom: 10px;
117
+ letter-spacing: 2px;
118
+ }
119
+ .lcars-subtitle {
120
+ color: #aaa;
121
+ text-align: center;
122
+ font-style: italic;
123
+ margin-bottom: 30px;
124
+ }
125
+ /* Glowing Input Boxes */
126
+ .gr-box input, .gr-box textarea {
127
+ background: #001122 !important;
128
+ color: #7EC8E3 !important;
129
+ border: 1px solid #7EC8E3 !important;
130
+ box-shadow: 0 0 8px rgba(126, 200, 227, 0.3) !important;
131
+ font-family: 'Courier New', monospace !important;
132
+ }
133
+ .gr-button {
134
+ background: linear-gradient(90deg, #003366, #0055aa) !important;
135
+ color: #7EC8E3 !important;
136
+ border: 1px solid #7EC8E3 !important;
137
+ box-shadow: 0 0 10px rgba(126, 200, 227, 0.4) !important;
138
+ font-family: 'Courier New', monospace !important;
139
+ font-weight: bold !important;
140
+ letter-spacing: 1px;
141
+ transition: all 0.3s ease;
142
+ }
143
+ .gr-button:hover {
144
+ background: linear-gradient(90deg, #004488, #0077cc) !important;
145
+ box-shadow: 0 0 15px rgba(126, 200, 227, 0.6) !important;
146
+ transform: scale(1.05);
147
+ }
148
+ /* Output Panels */
149
+ .lcars-output-panel {
150
+ border: 2px solid #7EC8E3;
151
+ border-radius: 12px;
152
+ padding: 15px;
153
+ background: #00141a;
154
+ box-shadow: 0 0 15px rgba(126, 200, 227, 0.2);
155
+ margin-top: 10px;
156
+ }
157
+ .lcars-error {
158
+ color: #ff6b6b;
159
+ font-weight: bold;
160
+ text-shadow: 0 0 5px rgba(255,107,107,0.5);
161
+ padding: 20px;
162
+ text-align: center;
163
+ }
164
+ .lcars-log {
165
+ max-height: 400px;
166
+ overflow-y: auto;
167
+ background: #001018;
168
+ border: 1px solid #7EC8E3;
169
+ border-radius: 8px;
170
+ padding: 10px;
171
+ }
172
+ .lcars-step {
173
+ margin-bottom: 15px;
174
+ padding: 10px;
175
+ background: #000c14;
176
+ border-left: 3px solid #7EC8E3;
177
+ }
178
+ .lcars-step h4 {
179
+ margin: 0 0 8px 0;
180
+ color: #7EC8E3;
181
+ }
182
+ .lcars-step pre {
183
+ white-space: pre-wrap;
184
+ background: #00080c;
185
+ padding: 10px;
186
+ border-radius: 5px;
187
+ color: #ccc;
188
+ font-size: 0.9em;
189
+ margin: 10px 0 0 0;
190
+ }
191
+ code {
192
+ background: #000f1f;
193
+ color: #7EC8E3;
194
+ padding: 2px 6px;
195
+ border-radius: 4px;
196
+ font-family: 'Courier New';
197
+ }
198
+ @keyframes glow-pulse {
199
+ 0% { opacity: 0.8; }
200
+ 50% { opacity: 1; }
201
+ 100% { opacity: 0.8; }
202
+ }
203
+ iframe {
204
+ animation: glow-pulse 2.5s infinite ease-in-out;
205
+ }
206
+ .gr-form { background: transparent !important; }
207
+
208
+ /* =========================
209
+ LCARS47 Bridge Theme
210
+ Seamless Drop-In
211
+ ========================= */
212
+
213
+ :root {
214
+ /* Core LCARS Palette */
215
+ --lcars-bg: #000814;
216
+ --lcars-panel: #111827;
217
+ --lcars-red: #CC6666;
218
+ --lcars-gold: #FFCC66;
219
+
220
+
221
+ --lcars-cyan: #66CCCC;
222
+
223
+ --lcars-text: #FFFFFF;
224
+ --lcars-muted: #AAAAAA;
225
+ --lcars-orange: #FF9966;
226
+ --lcars-purple: #663399;
227
+ --lcars-rose: #FF6F91;
228
+ --lcars-gold: #FFC766;
229
+
230
+ --lcars-peach: #FFCC99;
231
+ --lcars-blue: #9999FF;
232
+
233
+ --lcars-lavender: #CCCCFF;
234
+ --lcars-tan: #FFCC99;
235
+ --lcars-rust: #CC6666;
236
+ --lcars-gold: #FFCC66;
237
+ --lcars-bg: #F5F0FF;
238
+ --lcars-panel: #E8E0F5;
239
+ --lcars-text: #2D2D5F;
240
+ --lcars-text-light: #5F5F8F;
241
+ --lcars-border: #9999CC;
242
+ --lcars-accent: #6666CC;
243
+ --lcars-dark: #111317;
244
+ /* Shared component vars */
245
+ --radius-large: 24px;
246
+ --radius-full: 50%;
247
+ --pulse-speed: 2s;
248
+ --font-stack: "Arial Narrow", "Helvetica Neue", sans-serif;
249
+ }
250
+
251
+ .lcars-thinking {{
252
+ background: linear-gradient(135deg, {self.colors['panel']}, #001122) !important;
253
+ border-left: 4px solid {self.colors['info']} !important;
254
+ color: {self.colors['text']} !important;
255
+ padding: 15px !important;
256
+ border-radius: 0px 15px 15px 0px !important;
257
+ }}
258
+
259
+
260
+ .gradio-container {{background-color: rgba(243, 48, 4, 0.85);
261
+ background: linear-gradient(135deg, {self.colors['background']}, #001122) !important;
262
+ color: {self.colors['text']} !important;
263
+ font-family: 'Courier New', monospace !important;
264
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
265
+ background-size: cover;
266
+ background-position: center;
267
+ background-repeat: no-repeat;
268
+ border-radius: 20px;
269
+ }}
270
+ #left-panel {
271
+ flex: 0 0 250px !important; /* fixed width */
272
+ max-width: 350px !important;
273
+ padding: 20px !important;
274
+ }
275
+ @keyframes pulse {
276
+ 0% { box-shadow: 0 0 5px var(--lcars-orange); }
277
+ 50% { box-shadow: 0 0 20px var(--lcars-orange); }
278
+ 100% { box-shadow: 0 0 5px var(--lcars-orange); }
279
+ }
280
+ .pulse-animation {
281
+ animation: pulse 2s infinite;
282
+ }
283
+
284
+
285
+ /* Panels */
286
+ .lcars-panel {
287
+ background-color: var(--lcars-panel);
288
+ border-radius: var(--radius-large);
289
+ padding: 1rem;
290
+ margin: 0.5rem;
291
+ box-shadow: 0 0 8px rgba(0,0,0,0.6);
292
+ }
293
+ /* Inputs & Outputs */
294
+ .lcars-input {{
295
+ background: {self.colors['panel']} !important;
296
+ color: {self.colors['text']} !important;
297
+ border: 2px solid {self.colors['primary']} !important;
298
+ border-radius: 0px 10px 10px 0px !important;
299
+ padding: 10px !important;
300
+ }}
301
+ .lcars-output {{
302
+ background: linear-gradient(135deg, {self.colors['background']}, {self.colors['panel']}) !important;
303
+ color: {self.colors['text']} !important;
304
+ border: 2px solid {self.colors['success']} !important;
305
+ border-radius: 0px 15px 15px 0px !important;
306
+ padding: 15px !important;
307
+ font-family: 'Courier New', monospace !important;
308
+ }}
309
+ /* Responsive */
310
+ @media (max-width: 768px) {
311
+ .gradio-container { padding: 10px; }
312
+ #lcars_logo { height: 150px !important; width: 150px !important; }
313
+ }
314
+
315
+
316
+ /* Code & Thinking blocks */
317
+ .lcars-code {{
318
+ background: {self.colors['background']} !important;
319
+ color: {self.colors['success']} !important;
320
+ border: 1px solid {self.colors['success']} !important;
321
+ border-radius: 5px !important;
322
+ font-family: 'Courier New', monospace !important;
323
+ }}
324
+ .lcars-thinking {{
325
+ background: linear-gradient(135deg, {self.colors['panel']}, #001122) !important;
326
+ border-left: 4px solid {self.colors['info']} !important;
327
+ color: {self.colors['text']} !important;
328
+ padding: 15px !important;
329
+ border-radius: 0px 15px 15px 0px !important;
330
+ }}
331
+ .lcars-artifact {{
332
+ background: {self.colors['panel']} !important;
333
+ border: 2px solid {self.colors['border']} !important;
334
+ color: {self.colors['text']} !important;
335
+ border-radius: 0px 15px 15px 0px !important;
336
+ padding: 15px !important;
337
+ margin: 10px 0 !important;
338
+ }}
339
+ /* Headers */
340
+ .lcars-header {
341
+ background: var(--lcars-red);
342
+ color: var(--lcars-text);
343
+ border-radius: var(--radius-large);
344
+ padding: 0.75rem 1.5rem;
345
+ text-transform: uppercase;
346
+ font-size: 1.25rem;
347
+ }
348
+ /* Chatbox */
349
+ .chatbox > div {
350
+ background: var(--lcars-dark) !important;
351
+ border-radius: 18px !important;
352
+ border: 2px solid var(--lcars-purple) !important;
353
+ }
354
+ /* =========================
355
+ Buttons / Tabs / Chips
356
+ ========================= */
357
+
358
+ button, .lcars-tab, .lcars-chip {
359
+ background: var(--lcars-gold);
360
+ border: none;
361
+ border-radius: var(--radius-large);
362
+ padding: 0.5rem 1rem;
363
+ margin: 0.25rem;
364
+ color: var(--lcars-bg);
365
+ font-weight: bold;
366
+ font-size: 1rem;
367
+ transition: all 0.3s ease-in-out;
368
+ cursor: pointer;
369
+ }
370
+
371
+ button:hover, .lcars-tab:hover, .lcars-chip:hover {
372
+ background: var(--lcars-orange);
373
+ color: var(--lcars-text);
374
+ }
375
+
376
+ /* Circular buttons */
377
+ button.round, .lcars-chip.round {
378
+ border-radius: var(--radius-full);
379
+ padding: 0.75rem;
380
+ width: 3rem;
381
+ height: 3rem;
382
+ text-align: center;
383
+ }
384
+
385
+ /* =========================
386
+ Containers (Code, JSON, Chat, Artifacts)
387
+ ========================= */
388
+
389
+ .json-container, .code-container, .chat-container, .artifact-container {
390
+ border-radius: var(--radius-large);
391
+ padding: 1rem;
392
+ margin: 0.5rem 0;
393
+ background: var(--lcars-panel);
394
+ color: var(--lcars-text);
395
+ font-family: monospace;
396
+ font-size: 0.9rem;
397
+ line-height: 1.4;
398
+ white-space: pre-wrap;
399
+ overflow-x: auto;
400
+ }
401
+
402
+ /* =========================
403
+ Artifact / Chat / Code Borders
404
+ ========================= */
405
+
406
+ .artifact-container {
407
+ border: 3px solid var(--lcars-gold);
408
+ animation: pulse-yellow var(--pulse-speed) infinite;
409
+ }
410
+
411
+ .chat-container {
412
+ border: 3px solid var(--lcars-red);
413
+ animation: pulse-red var(--pulse-speed) infinite;
414
+ }
415
+
416
+ .code-container {
417
+ border: 3px solid var(--lcars-purple);
418
+ animation: pulse-orange var(--pulse-speed) infinite;
419
+ }
420
+
421
+ /* =========================
422
+ Animations
423
+ ========================= */
424
+
425
+ @keyframes pulse-red {
426
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-red); }
427
+ 50% { box-shadow: 0 0 20px var(--lcars-red); }
428
+ }
429
+
430
+ @keyframes pulse-yellow {
431
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-gold); }
432
+ 50% { box-shadow: 0 0 20px var(--lcars-gold); }
433
+ }
434
+
435
+ @keyframes pulse-orange {
436
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-orange); }
437
+ 50% { box-shadow: 0 0 20px var(--lcars-orange); }
438
+ }
439
+
440
+ /* Thought styling */
441
+ .thought {
442
+ opacity: 0.8;
443
+ font-family: "Courier New", monospace;
444
+ border: 1px rgb(229, 128, 12) solid;
445
+ padding: 10px;
446
+ border-radius: 5px;
447
+ display: none;
448
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
449
+ }
450
+ .thought-prompt {
451
+ opacity: 0.8;
452
+ font-family: "Courier New", monospace;
453
+ }
454
+ /* =========================
455
+ Metadata & Thought Blocks
456
+ ========================= */
457
+
458
+ .metadata-display, .thought-block {
459
+ background: var(--lcars-blue);
460
+ border-radius: var(--radius-large);
461
+ padding: 0.75rem;
462
+ margin: 0.5rem 0;
463
+ color: var(--lcars-bg);
464
+ font-weight: bold;
465
+ }
466
+ .metadata-display {
467
+ background: var(--lcars-panel);
468
+ border-left: 4px solid var(--lcars-blue);
469
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
470
+ padding: 10px;
471
+ border-radius: 5px;
472
+ overflow-y: auto;
473
+ max-height: 300px;
474
+ }
475
+ .metadata-display .json-container {
476
+ font-family: monospace;
477
+ font-size: 0.9em;
478
+ background: #6b50111a;
479
+ }
480
+
481
+ .primary {
482
+ background: linear-gradient(45deg, var(--lcars-orange), #ffaa33) !important;
483
+
484
+ color: hwb(90 7% 5% / 0.102);
485
+ font-family: "Courier New", monospace;
486
+ border: 1px rgb(229, 128, 12) solid;
487
+ }
488
+ .secondary {
489
+ background: linear-gradient(45deg, var(--lcars-blue), #33aacc) !important;
490
+ color: #6b50111a;
491
+ font-family: "Courier New", monospace;
492
+ border: 1px rgb(229, 128, 12) solid;
493
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
494
+ }
495
+ ::-webkit-scrollbar-thumb:hover {
496
+ background-color: var(--lcars-gold);
497
+ }
498
+ #lcars_logo {
499
+ border-radius: 15px;
500
+ border: 2px solid var(--lcars-orange);
501
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
502
+ }
503
+
504
+
505
+
506
+ .lcars-tab {{
507
+ background: {self.colors['panel']} !important;
508
+ color: {self.colors['text']} !important;
509
+ border: 2px solid {self.colors['primary']} !important;
510
+ border-radius: 0px 10px 0px 0px !important;
511
+ }}
512
+ .lcars-tab.selected {{
513
+ background: {self.colors['primary']} !important;
514
+ color: {self.colors['background']} !important;
515
+ }}
516
+ .lcars-panel.lcars-empty {
517
+ text-align: center;
518
+ font-style: italic;
519
+ color: var(--lcars-text-light);
520
+ }
521
+
522
+ .lcars-panel.lcars-error {
523
+ background: #FFE5E5;
524
+ border-color: var(--lcars-rust);
525
+ color: #CC0000;
526
+ }
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ /* Input fields */
538
+ .lcars-input input,
539
+ .lcars-input textarea {
540
+ background: white !important;
541
+ border: 2px solid var(--lcars-border) !important;
542
+ border-radius: 8px !important;
543
+ color: var(--lcars-text) !important;
544
+ padding: 10px !important;
545
+ font-size: 14px !important;
546
+ }
547
+
548
+ .lcars-input input:focus,
549
+ .lcars-input textarea:focus {
550
+ border-color: var(--lcars-accent) !important;
551
+ outline: none !important;
552
+ box-shadow: 0 0 8px rgba(102, 102, 204, 0.3) !important;
553
+ }
554
+
555
+ /* Dropdowns and selects */
556
+ .lcars-dropdown select,
557
+ .lcars-dropdown input {
558
+ background: white !important;
559
+ border: 2px solid var(--lcars-border) !important;
560
+ border-radius: 8px !important;
561
+ color: var(--lcars-text) !important;
562
+ padding: 8px !important;
563
+ }
564
+
565
+ /* Checkboxes */
566
+ .lcars-checkbox label {
567
+ background: var(--lcars-panel) !important;
568
+ border: 2px solid var(--lcars-border) !important;
569
+ border-radius: 8px !important;
570
+ padding: 8px 12px !important;
571
+ margin: 4px !important;
572
+ transition: all 0.2s ease !important;
573
+ }
574
+
575
+ .lcars-checkbox label:hover {
576
+ background: var(--lcars-lavender) !important;
577
+ border-color: var(--lcars-accent) !important;
578
+ }
579
+
580
+ /* Radio buttons */
581
+ .lcars-radio label {
582
+ background: var(--lcars-panel) !important;
583
+ border: 2px solid var(--lcars-border) !important;
584
+ border-radius: 20px !important;
585
+ padding: 8px 16px !important;
586
+ margin: 4px !important;
587
+ }
588
+
589
+ /* Display fields */
590
+ .lcars-display input {
591
+ background: var(--lcars-panel) !important;
592
+ border: 2px solid var(--lcars-border) !important;
593
+ border-radius: 8px !important;
594
+ color: var(--lcars-text) !important;
595
+ font-family: 'Courier New', monospace !important;
596
+ padding: 10px !important;
597
+ }
598
+
599
+ /* Accordions */
600
+ .lcars-accordion {
601
+ background: var(--lcars-panel) !important;
602
+ border: 2px solid var(--lcars-border) !important;
603
+ border-radius: 12px !important;
604
+ margin: 8px 0 !important;
605
+ }
606
+
607
+ .lcars-accordion summary {
608
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
609
+ color: var(--lcars-text) !important;
610
+ font-weight: bold !important;
611
+ padding: 12px !important;
612
+ border-radius: 10px !important;
613
+ cursor: pointer !important;
614
+ }
615
+
616
+ /* Participant Cards & Collapsible Layout */
617
+ .lcars-participants-container {
618
+ display: flex;
619
+ flex-direction: column;
620
+ gap: 15px;
621
+ width: 100%;
622
+ }
623
+
624
+ /* Base Card Styles */
625
+ .lcars-collapsible-card {
626
+ border: 1px solid #444;
627
+ border-radius: 8px;
628
+ background: #1a1a1a;
629
+ color: #fff;
630
+ overflow: hidden;
631
+ transition: all 0.3s ease;
632
+ }
633
+
634
+ .lcars-collapsible-card.collapsed .lcars-participant-expanded {
635
+ display: none;
636
+ }
637
+
638
+ .lcars-collapsible-card.expanded .lcars-participant-collapsed {
639
+ display: none;
640
+ }
641
+
642
+ .lcars-collapsible-card.expanded .lcars-collapse-icon {
643
+ transform: rotate(90deg);
644
+ }
645
+
646
+ /* Card Headers */
647
+ .lcars-participant-header {
648
+ background: #3366cc;
649
+ color: white;
650
+ padding: 12px 15px;
651
+ display: flex;
652
+ justify-content: space-between;
653
+ align-items: center;
654
+ cursor: pointer;
655
+ border-bottom: 2px solid #ffcc00;
656
+ transition: background 0.2s ease;
657
+ }
658
+
659
+ .lcars-participant-header:hover {
660
+ background: #2a55a8;
661
+ }
662
+
663
+ .lcars-participant-name {
664
+ font-weight: bold;
665
+ font-size: 1.1em;
666
+ }
667
+
668
+ .lcars-collapse-icon {
669
+ transition: transform 0.3s ease;
670
+ font-size: 0.8em;
671
+ }
672
+
673
+ /* Badges */
674
+ .lcars-badge-manager {
675
+ background: #ffcc00;
676
+ color: #000;
677
+ padding: 4px 8px;
678
+ border-radius: 12px;
679
+ font-size: 0.8em;
680
+ font-weight: bold;
681
+ letter-spacing: 1px;
682
+ box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
683
+ }
684
+
685
+ .lcars-badge-agent {
686
+ background: #00cc66;
687
+ color: #000;
688
+ padding: 4px 8px;
689
+ border-radius: 12px;
690
+ font-size: 0.8em;
691
+ font-weight: bold;
692
+ letter-spacing: 1px;
693
+ box-shadow: 0 2px 4px rgba(0, 204, 102, 0.3);
694
+ }
695
+
696
+ .lcars-badge-human {
697
+ background: #9966cc;
698
+ color: #fff;
699
+ padding: 4px 8px;
700
+ border-radius: 12px;
701
+ font-size: 0.8em;
702
+ font-weight: bold;
703
+ letter-spacing: 1px;
704
+ box-shadow: 0 2px 4px rgba(153, 102, 255, 0.3);
705
+ }
706
+
707
+ /* Card Content Sections */
708
+ .lcars-participant-collapsed,
709
+ .lcars-participant-expanded {
710
+ padding: 15px;
711
+ }
712
+
713
+ .lcars-participant-preview {
714
+ display: flex;
715
+ flex-direction: column;
716
+ gap: 8px;
717
+ }
718
+
719
+ .lcars-info-section {
720
+ margin-bottom: 20px;
721
+ padding-bottom: 15px;
722
+ border-bottom: 1px solid #333;
723
+ }
724
+
725
+ .lcars-info-section:last-child {
726
+ border-bottom: none;
727
+ margin-bottom: 0;
728
+ }
729
+
730
+ .lcars-section-title {
731
+ color: #ffcc00;
732
+ font-weight: bold;
733
+ font-size: 0.9em;
734
+ text-transform: uppercase;
735
+ letter-spacing: 1px;
736
+ margin-bottom: 10px;
737
+ border-bottom: 1px solid #444;
738
+ padding-bottom: 5px;
739
+ }
740
+
741
+ /* Info Rows */
742
+ .lcars-info-row {
743
+ display: flex;
744
+ margin-bottom: 8px;
745
+ line-height: 1.4;
746
+ color: var(--lcars-text-light);
747
+ }
748
+
749
+ .lcars-info-row.full-width {
750
+ flex-direction: column;
751
+ }
752
+
753
+ .lcars-label {
754
+ color: #ffcc00;
755
+ font-weight: bold;
756
+ min-width: 120px;
757
+ margin-right: 10px;
758
+ font-size: 0.9em;
759
+ }
760
+
761
+ /* Lists */
762
+ .lcars-goals-list li {
763
+ margin-bottom: 5px;
764
+ line-height: 1.4;
765
+ color: #e0e0e0;
766
+ }
767
+
768
+ /* Template Styling */
769
+ .lcars-template-container {
770
+ background: rgba(255, 255, 255, 0.05);
771
+ border: 1px solid #444;
772
+ border-radius: 4px;
773
+ padding: 10px;
774
+ max-height: 200px;
775
+ overflow-y: auto;
776
+ }
777
+
778
+ .lcars-template-preview {
779
+ color: #e0e0e0;
780
+ font-family: monospace;
781
+ font-size: 0.85em;
782
+ line-height: 1.4;
783
+ white-space: pre-wrap;
784
+ }
785
+
786
+ .lcars-template-truncated {
787
+ color: #ffcc00;
788
+ font-size: 0.8em;
789
+ font-style: italic;
790
+ margin-top: 8px;
791
+ }
792
+
793
+ .lcars-no-template {
794
+ color: #888;
795
+ font-style: italic;
796
+ }
797
+
798
+ /* More Skills Indicator */
799
+ .lcars-more-skills {
800
+ color: #ffcc00;
801
+ font-size: 0.8em;
802
+ font-style: italic;
803
+ margin-top: 5px;
804
+ display: block;
805
+ }
806
+
807
+ /* Agent Details Panel */
808
+ .lcars-agent-details {
809
+ background: white;
810
+ border: 3px solid var(--lcars-border);
811
+ border-radius: 12px;
812
+ overflow: hidden;
813
+ box-shadow: 0 4px 12px rgba(102, 102, 204, 0.2);
814
+ }
815
+
816
+ .lcars-agent-header {
817
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender));
818
+ padding: 16px;
819
+ display: flex;
820
+ justify-content: space-between;
821
+ align-items: center;
822
+ }
823
+
824
+ .lcars-agent-name {
825
+ font-size: 20px;
826
+ font-weight: bold;
827
+ color: white;
828
+ text-transform: uppercase;
829
+ letter-spacing: 2px;
830
+ }
831
+
832
+ .lcars-status-connected {
833
+ background: #66CC66;
834
+ color: white;
835
+ padding: 6px 14px;
836
+ border-radius: 16px;
837
+ font-size: 12px;
838
+ font-weight: bold;
839
+ }
840
+
841
+ .lcars-status-available {
842
+ background: var(--lcars-orange);
843
+ color: white;
844
+ padding: 6px 14px;
845
+ border-radius: 16px;
846
+ font-size: 12px;
847
+ font-weight: bold;
848
+ }
849
+
850
+ .lcars-agent-body {
851
+ padding: 18px;
852
+ }
853
+
854
+ .lcars-detail-row {
855
+ margin: 12px 0;
856
+ display: flex;
857
+ gap: 10px;
858
+ }
859
+
860
+ .lcars-detail-label {
861
+ font-weight: bold;
862
+ color: var(--lcars-accent);
863
+ min-width: 120px;
864
+ text-transform: uppercase;
865
+ font-size: 12px;
866
+ letter-spacing: 1px;
867
+ }
868
+
869
+ .lcars-detail-value {
870
+ color: var(--lcars-text);
871
+ flex: 1;
872
+ }
873
+
874
+ .lcars-model-badge {
875
+ background: var(--lcars-panel);
876
+ color: var(--lcars-accent);
877
+ padding: 4px 10px;
878
+ border-radius: 6px;
879
+ font-family: 'Courier New', monospace;
880
+ font-size: 12px;
881
+ }
882
+
883
+ .lcars-detail-section {
884
+ margin: 16px 0;
885
+ padding: 12px;
886
+ background: var(--lcars-panel);
887
+ border-radius: 8px;
888
+ }
889
+
890
+ .lcars-skills-list {
891
+ line-height: 2;
892
+ }
893
+
894
+ .lcars-skill-item {
895
+ color: var(--lcars-text-light);
896
+ font-size: 13px;
897
+ margin-left: 8px;
898
+ }
899
+
900
+ .lcars-expertise {
901
+ color: var(--lcars-text-light);
902
+ font-size: 13px;
903
+ line-height: 1.8;
904
+ }
905
+
906
+ /* Pattern Details */
907
+ .lcars-pattern-details {
908
+ border: 1px solid #444;
909
+ border-radius: 8px;
910
+ margin: 10px 0;
911
+ background: #1a1a1a;
912
+ color: #fff;
913
+ }
914
+
915
+ .lcars-pattern-header {
916
+ background: #3366cc;
917
+ color: white;
918
+ padding: 12px 15px;
919
+ font-weight: bold;
920
+ font-size: 1.1em;
921
+ text-align: center;
922
+ border-bottom: 2px solid #ffcc00;
923
+ }
924
+
925
+ .lcars-pattern-body {
926
+ padding: 15px;
927
+ }
928
+
929
+ .lcars-pattern-section {
930
+ margin-bottom: 20px;
931
+ display: block;
932
+ }
933
+
934
+ .lcars-pattern-section:last-child {
935
+ margin-bottom: 0;
936
+ }
937
+
938
+ .lcars-pattern-label {
939
+ font-weight: bold;
940
+ color: #ffcc00;
941
+ margin-bottom: 5px;
942
+ font-size: 0.9em;
943
+ text-transform: uppercase;
944
+ letter-spacing: 1px;
945
+ }
946
+
947
+ .lcars-pattern-text {
948
+ color: #fa0404;
949
+ line-height: 1.5;
950
+ }
951
+
952
+ /* Log display */
953
+ .lcars-log-panel {
954
+ background: #00008734;
955
+ color: #050505;
956
+ font-family: 'Courier New', monospace;
957
+ font-size: 16px;
958
+ border-radius: 8px;
959
+ padding: 12px;
960
+ max-height: 500px;
961
+ overflow-y: auto;
962
+ box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
963
+ }
964
+
965
+ .lcars-log-panel.lcars-empty {
966
+ color: #999;
967
+ text-align: center;
968
+ font-style: italic;
969
+ }
970
+
971
+ .lcars-log-entries {
972
+ display: flex;
973
+ flex-direction: column;
974
+ gap: 4px;
975
+ }
976
+
977
+ .lcars-log-entry {
978
+ padding: 6px 10px;
979
+ border-left: 3px solid transparent;
980
+ border-radius: 3px;
981
+ transition: all 0.2s ease;
982
+ }
983
+
984
+ .lcars-log-entry:hover {
985
+ background: rgba(255, 255, 255, 0.05);
986
+ }
987
+
988
+ .lcars-log-info {
989
+ border-left-color: #5c635cda;
990
+ color: #1636e7;
991
+ }
992
+
993
+ .lcars-log-error {
994
+ border-left-color: #202120;
995
+ color: #1636e7;
996
+ }
997
+
998
+ .lcars-log-level {
999
+ font-weight: bold;
1000
+ margin-right: 8px;
1001
+ }
1002
+
1003
+ /* Chatbot styling */
1004
+ .lcars-chatbot {
1005
+ border: 3px solid var(--lcars-border) !important;
1006
+ border-radius: 12px !important;
1007
+ background: white !important;
1008
+ }
1009
+
1010
+ .gradio-container {
1011
+ background-color: rgba(243, 48, 4, 0.85);
1012
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1013
+ background-size: cover;
1014
+ background-position: center;
1015
+ background-repeat: no-repeat;
1016
+ border-radius: 20px;
1017
+ }
1018
+ .tab-nav button {
1019
+ background: var(--lcars-panel) !important;
1020
+ border: 2px solid var(--lcars-border) !important;
1021
+ color: var(--lcars-text) !important;
1022
+ border-radius: 8px 8px 0 0 !important;
1023
+ margin-right: 4px !important;
1024
+ font-weight: bold !important;
1025
+ }
1026
+
1027
+ .tab-nav button.selected {
1028
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1029
+ color: var(--lcars-text) !important;
1030
+ border-bottom: none !important;
1031
+ }
1032
+
1033
+ /* Ensure vertical stacking of participants */
1034
+ .lcars-participants-container {
1035
+ display: flex !important;
1036
+ flex-direction: column !important;
1037
+ gap: 16px !important;
1038
+ width: 100% !important;
1039
+ max-width: 100% !important;
1040
+ margin: 0 auto !important;
1041
+ align-items: stretch !important; /* Ensures full width alignment */
1042
+ }
1043
+
1044
+ /* Make sure each participant card respects container flow */
1045
+ .lcars-participant-card-manager,
1046
+ .lcars-participant-card-agent,
1047
+ .lcars-participant-card-human {
1048
+ display: flex !important;
1049
+ flex-direction: column !important;
1050
+ break-inside: avoid !important; /* Prevents awkward splits in print/PDF */
1051
+ position: relative !important;
1052
+ width: 100% !important;
1053
+ box-sizing: border-box !important;
1054
+ background: white !important;
1055
+ color: #2D2D5F !important;
1056
+ }
1057
+ .lcars-content {
1058
+ background: rgba(0, 0, 0, 0.95) !important;
1059
+ border: 2px solid #ff9900 !important;
1060
+ color: #ffffff !important;
1061
+ font-family: 'Times New Roman', serif !important;
1062
+ padding: 20px !important;
1063
+ height: 600px !important;
1064
+ overflow-y: auto !important;
1065
+ }
1066
+ .gr-button:hover {
1067
+ background: linear-gradient(45deg, #ffcc00, #ff9900) !important;
1068
+ box-shadow: 0 0 15px rgba(255, 153, 0, 0.8) !important;
1069
+ }
1070
+ .block {
1071
+ background: rgba(0, 0, 0, 0.8) !important;
1072
+ border: 2px solid #ff9900 !important;
1073
+ border-radius: 0px !important;
1074
+ }
1075
+ /* Scrollbar */
1076
+ ::-webkit-scrollbar {{ width: 12px; }}
1077
+ ::-webkit-scrollbar-track {{ background: {self.colors['background']}; }}
1078
+ ::-webkit-scrollbar-thumb {{
1079
+ background: {self.colors['primary']};
1080
+ border-radius: 0px 10px 10px 0px;
1081
+ }}
1082
+ ::-webkit-scrollbar-thumb:hover {{ background: {self.colors['accent']}; }}
1083
+
1084
+
1085
+ .lcars-button,
1086
+ button[variant="primary"] {
1087
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1088
+ color: var(--lcars-text) !important;
1089
+ }
1090
+
1091
+ .lcars-button-add {
1092
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender)) !important;
1093
+ color: white !important;
1094
+ }
1095
+
1096
+ .lcars-button-send,
1097
+ .lcars-button-task {
1098
+ background: linear-gradient(135deg, var(--lcars-purple), var(--lcars-lavender)) !important;
1099
+ color: white !important;
1100
+ }
1101
+
1102
+ .lcars-button-remove {
1103
+ background: linear-gradient(135deg, var(--lcars-rust), #FF9999) !important;
1104
+ color: white !important;
1105
+ }
1106
+
1107
+ .lcars-button-secondary,
1108
+ .lcars-button-create {
1109
+ background: linear-gradient(135deg, var(--lcars-gold), var(--lcars-tan)) !important;
1110
+ color: var(--lcars-text) !important;
1111
+ }
1112
+ .gradio-container {{background-color: rgba(243, 48, 4, 0.85);
1113
+ background: linear-gradient(135deg, {self.colors['background']}, #001122) !important;
1114
+ color: {self.colors['text']} !important;
1115
+ font-family: 'Courier New', monospace !important;
1116
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1117
+ background-size: cover;
1118
+ background-position: center;
1119
+ background-repeat: no-repeat;
1120
+ border-radius: 20px;
1121
+ }}
1122
+ """
1123
+ self.LCARS_LIGHT_CSS= """/* LCARS Light Theme - Star Trek Inspired */
1124
+
1125
+ :root {
1126
+ --lcars-orange: #FF9966;
1127
+ --lcars-peach: #FFCC99;
1128
+ --lcars-blue: #9999FF;
1129
+ --lcars-purple: #CC99CC;
1130
+ --lcars-lavender: #CCCCFF;
1131
+ --lcars-tan: #FFCC99;
1132
+ --lcars-rust: #CC6666;
1133
+ --lcars-gold: #FFCC66;
1134
+ --lcars-bg: #F5F0FF;
1135
+ --lcars-panel: #E8E0F5;
1136
+ --lcars-text: #2D2D5F;
1137
+ --lcars-text-light: #5F5F8F;
1138
+ --lcars-border: #9999CC;
1139
+ --lcars-accent: #6666CC;
1140
+ }
1141
+
1142
+ body {
1143
+ background: var(--lcars-bg) !important;
1144
+ font-family: 'Arial', 'Helvetica', sans-serif !important;
1145
+ color: var(--lcars-text) !important;
1146
+ }
1147
+
1148
+ /* Main containers */
1149
+ .lcars-container {
1150
+ background: var(--lcars-panel) !important;
1151
+ border: 2px solid var(--lcars-border) !important;
1152
+ border-radius: 12px !important;
1153
+ padding: 16px !important;
1154
+ }
1155
+ .gradio-container {
1156
+ background-color: rgba(243, 48, 4, 0.85);
1157
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1158
+ background-size: cover;
1159
+ background-position: center;
1160
+ background-repeat: no-repeat;
1161
+ border-radius: 20px;
1162
+ }
1163
+ /* Buttons */
1164
+ .lcars-button,
1165
+ .lcars-button-add,
1166
+ .lcars-button-send,
1167
+ .lcars-button-task,
1168
+ .lcars-button-secondary,
1169
+ .lcars-button-create,
1170
+ .lcars-button-remove {
1171
+ border-radius: 20px !important;
1172
+ font-weight: bold !important;
1173
+ text-transform: uppercase !important;
1174
+ letter-spacing: 1px !important;
1175
+ border: none !important;
1176
+ padding: 12px 24px !important;
1177
+ transition: all 0.3s ease !important;
1178
+ }
1179
+
1180
+ .lcars-button,
1181
+ button[variant="primary"] {
1182
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1183
+ color: var(--lcars-text) !important;
1184
+ }
1185
+
1186
+ .lcars-button-add {
1187
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender)) !important;
1188
+ color: white !important;
1189
+ }
1190
+
1191
+ .lcars-button-send,
1192
+ .lcars-button-task {
1193
+ background: linear-gradient(135deg, var(--lcars-purple), var(--lcars-lavender)) !important;
1194
+ color: white !important;
1195
+ }
1196
+
1197
+ .lcars-button-remove {
1198
+ background: linear-gradient(135deg, var(--lcars-rust), #FF9999) !important;
1199
+ color: white !important;
1200
+ }
1201
+
1202
+ .lcars-button-secondary,
1203
+ .lcars-button-create {
1204
+ background: linear-gradient(135deg, var(--lcars-gold), var(--lcars-tan)) !important;
1205
+ color: var(--lcars-text) !important;
1206
+ }
1207
+
1208
+ button:hover {
1209
+ transform: translateY(-2px) !important;
1210
+ box-shadow: 0 6px 20px rgba(102, 102, 204, 0.3) !important;
1211
+ }
1212
+
1213
+ /* Input fields */
1214
+ .lcars-input input,
1215
+ .lcars-input textarea {
1216
+ background: white !important;
1217
+ border: 2px solid var(--lcars-border) !important;
1218
+ border-radius: 8px !important;
1219
+ color: var(--lcars-text) !important;
1220
+ padding: 10px !important;
1221
+ font-size: 14px !important;
1222
+ }
1223
+
1224
+ .lcars-input input:focus,
1225
+ .lcars-input textarea:focus {
1226
+ border-color: var(--lcars-accent) !important;
1227
+ outline: none !important;
1228
+ box-shadow: 0 0 8px rgba(102, 102, 204, 0.3) !important;
1229
+ }
1230
+
1231
+ /* Dropdowns and selects */
1232
+ .lcars-dropdown select,
1233
+ .lcars-dropdown input {
1234
+ background: white !important;
1235
+ border: 2px solid var(--lcars-border) !important;
1236
+ border-radius: 8px !important;
1237
+ color: var(--lcars-text) !important;
1238
+ padding: 8px !important;
1239
+ }
1240
+
1241
+ /* Checkboxes */
1242
+ .lcars-checkbox label {
1243
+ background: var(--lcars-panel) !important;
1244
+ border: 2px solid var(--lcars-border) !important;
1245
+ border-radius: 8px !important;
1246
+ padding: 8px 12px !important;
1247
+ margin: 4px !important;
1248
+ transition: all 0.2s ease !important;
1249
+ }
1250
+
1251
+ .lcars-checkbox label:hover {
1252
+ background: var(--lcars-lavender) !important;
1253
+ border-color: var(--lcars-accent) !important;
1254
+ }
1255
+
1256
+ /* Radio buttons */
1257
+ .lcars-radio label {
1258
+ background: var(--lcars-panel) !important;
1259
+ border: 2px solid var(--lcars-border) !important;
1260
+ border-radius: 20px !important;
1261
+ padding: 8px 16px !important;
1262
+ margin: 4px !important;
1263
+ }
1264
+
1265
+ /* Display fields */
1266
+ .lcars-display input {
1267
+ background: var(--lcars-panel) !important;
1268
+ border: 2px solid var(--lcars-border) !important;
1269
+ border-radius: 8px !important;
1270
+ color: var(--lcars-text) !important;
1271
+ font-family: 'Courier New', monospace !important;
1272
+ padding: 10px !important;
1273
+ }
1274
+
1275
+ /* Accordions */
1276
+ .lcars-accordion {
1277
+ background: var(--lcars-panel) !important;
1278
+ border: 2px solid var(--lcars-border) !important;
1279
+ border-radius: 12px !important;
1280
+ margin: 8px 0 !important;
1281
+ }
1282
+
1283
+ .lcars-accordion summary {
1284
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1285
+ color: var(--lcars-text) !important;
1286
+ font-weight: bold !important;
1287
+ padding: 12px !important;
1288
+ border-radius: 10px !important;
1289
+ cursor: pointer !important;
1290
+ }
1291
+
1292
+ /* Participant Cards & Collapsible Layout */
1293
+ .lcars-participants-container {
1294
+ display: flex;
1295
+ flex-direction: column;
1296
+ gap: 15px;
1297
+ width: 100%;
1298
+ }
1299
+
1300
+ /* Base Card Styles */
1301
+ .lcars-collapsible-card {
1302
+ border: 1px solid #444;
1303
+ border-radius: 8px;
1304
+ background: #1a1a1a;
1305
+ color: #fff;
1306
+ overflow: hidden;
1307
+ transition: all 0.3s ease;
1308
+ }
1309
+
1310
+ .lcars-collapsible-card.collapsed .lcars-participant-expanded {
1311
+ display: none;
1312
+ }
1313
+
1314
+ .lcars-collapsible-card.expanded .lcars-participant-collapsed {
1315
+ display: none;
1316
+ }
1317
+
1318
+ .lcars-collapsible-card.expanded .lcars-collapse-icon {
1319
+ transform: rotate(90deg);
1320
+ }
1321
+
1322
+ /* Card Headers */
1323
+ .lcars-participant-header {
1324
+ background: #3366cc;
1325
+ color: white;
1326
+ padding: 12px 15px;
1327
+ display: flex;
1328
+ justify-content: space-between;
1329
+ align-items: center;
1330
+ cursor: pointer;
1331
+ border-bottom: 2px solid #ffcc00;
1332
+ transition: background 0.2s ease;
1333
+ }
1334
+
1335
+ .lcars-participant-header:hover {
1336
+ background: #2a55a8;
1337
+ }
1338
+
1339
+ .lcars-participant-name {
1340
+ font-weight: bold;
1341
+ font-size: 1.1em;
1342
+ }
1343
+
1344
+ .lcars-collapse-icon {
1345
+ transition: transform 0.3s ease;
1346
+ font-size: 0.8em;
1347
+ }
1348
+
1349
+ /* Badges */
1350
+ .lcars-badge-manager {
1351
+ background: #ffcc00;
1352
+ color: #000;
1353
+ padding: 4px 8px;
1354
+ border-radius: 12px;
1355
+ font-size: 0.8em;
1356
+ font-weight: bold;
1357
+ letter-spacing: 1px;
1358
+ box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
1359
+ }
1360
+
1361
+ .lcars-badge-agent {
1362
+ background: #00cc66;
1363
+ color: #000;
1364
+ padding: 4px 8px;
1365
+ border-radius: 12px;
1366
+ font-size: 0.8em;
1367
+ font-weight: bold;
1368
+ letter-spacing: 1px;
1369
+ box-shadow: 0 2px 4px rgba(0, 204, 102, 0.3);
1370
+ }
1371
+
1372
+ .lcars-badge-human {
1373
+ background: #9966cc;
1374
+ color: #fff;
1375
+ padding: 4px 8px;
1376
+ border-radius: 12px;
1377
+ font-size: 0.8em;
1378
+ font-weight: bold;
1379
+ letter-spacing: 1px;
1380
+ box-shadow: 0 2px 4px rgba(153, 102, 255, 0.3);
1381
+ }
1382
+
1383
+ /* Card Content Sections */
1384
+ .lcars-participant-collapsed,
1385
+ .lcars-participant-expanded {
1386
+ padding: 15px;
1387
+ }
1388
+
1389
+ .lcars-participant-preview {
1390
+ display: flex;
1391
+ flex-direction: column;
1392
+ gap: 8px;
1393
+ }
1394
+
1395
+ .lcars-info-section {
1396
+ margin-bottom: 20px;
1397
+ padding-bottom: 15px;
1398
+ border-bottom: 1px solid #333;
1399
+ }
1400
+
1401
+ .lcars-info-section:last-child {
1402
+ border-bottom: none;
1403
+ margin-bottom: 0;
1404
+ }
1405
+
1406
+ .lcars-section-title {
1407
+ color: #ffcc00;
1408
+ font-weight: bold;
1409
+ font-size: 0.9em;
1410
+ text-transform: uppercase;
1411
+ letter-spacing: 1px;
1412
+ margin-bottom: 10px;
1413
+ border-bottom: 1px solid #444;
1414
+ padding-bottom: 5px;
1415
+ }
1416
+
1417
+ /* Info Rows */
1418
+ .lcars-info-row {
1419
+ display: flex;
1420
+ margin-bottom: 8px;
1421
+ line-height: 1.4;
1422
+ color: var(--lcars-text-light);
1423
+ }
1424
+
1425
+ .lcars-info-row.full-width {
1426
+ flex-direction: column;
1427
+ }
1428
+
1429
+ .lcars-label {
1430
+ color: #ffcc00;
1431
+ font-weight: bold;
1432
+ min-width: 120px;
1433
+ margin-right: 10px;
1434
+ font-size: 0.9em;
1435
+ }
1436
+
1437
+ /* Lists */
1438
+ .lcars-goals-list li {
1439
+ margin-bottom: 5px;
1440
+ line-height: 1.4;
1441
+ color: #e0e0e0;
1442
+ }
1443
+
1444
+ /* Template Styling */
1445
+ .lcars-template-container {
1446
+ background: rgba(255, 255, 255, 0.05);
1447
+ border: 1px solid #444;
1448
+ border-radius: 4px;
1449
+ padding: 10px;
1450
+ max-height: 200px;
1451
+ overflow-y: auto;
1452
+ }
1453
+
1454
+ .lcars-template-preview {
1455
+ color: #e0e0e0;
1456
+ font-family: monospace;
1457
+ font-size: 0.85em;
1458
+ line-height: 1.4;
1459
+ white-space: pre-wrap;
1460
+ }
1461
+
1462
+ .lcars-template-truncated {
1463
+ color: #ffcc00;
1464
+ font-size: 0.8em;
1465
+ font-style: italic;
1466
+ margin-top: 8px;
1467
+ }
1468
+
1469
+ .lcars-no-template {
1470
+ color: #888;
1471
+ font-style: italic;
1472
+ }
1473
+
1474
+ /* More Skills Indicator */
1475
+ .lcars-more-skills {
1476
+ color: #ffcc00;
1477
+ font-size: 0.8em;
1478
+ font-style: italic;
1479
+ margin-top: 5px;
1480
+ display: block;
1481
+ }
1482
+
1483
+ /* Agent Details Panel */
1484
+ .lcars-agent-details {
1485
+ background: white;
1486
+ border: 3px solid var(--lcars-border);
1487
+ border-radius: 12px;
1488
+ overflow: hidden;
1489
+ box-shadow: 0 4px 12px rgba(102, 102, 204, 0.2);
1490
+ }
1491
+
1492
+ .lcars-agent-header {
1493
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender));
1494
+ padding: 16px;
1495
+ display: flex;
1496
+ justify-content: space-between;
1497
+ align-items: center;
1498
+ }
1499
+
1500
+ .lcars-agent-name {
1501
+ font-size: 20px;
1502
+ font-weight: bold;
1503
+ color: white;
1504
+ text-transform: uppercase;
1505
+ letter-spacing: 2px;
1506
+ }
1507
+
1508
+ .lcars-status-connected {
1509
+ background: #66CC66;
1510
+ color: white;
1511
+ padding: 6px 14px;
1512
+ border-radius: 16px;
1513
+ font-size: 12px;
1514
+ font-weight: bold;
1515
+ }
1516
+
1517
+ .lcars-status-available {
1518
+ background: var(--lcars-orange);
1519
+ color: white;
1520
+ padding: 6px 14px;
1521
+ border-radius: 16px;
1522
+ font-size: 12px;
1523
+ font-weight: bold;
1524
+ }
1525
+
1526
+ .lcars-agent-body {
1527
+ padding: 18px;
1528
+ }
1529
+
1530
+ .lcars-detail-row {
1531
+ margin: 12px 0;
1532
+ display: flex;
1533
+ gap: 10px;
1534
+ }
1535
+
1536
+ .lcars-detail-label {
1537
+ font-weight: bold;
1538
+ color: var(--lcars-accent);
1539
+ min-width: 120px;
1540
+ text-transform: uppercase;
1541
+ font-size: 12px;
1542
+ letter-spacing: 1px;
1543
+ }
1544
+
1545
+ .lcars-detail-value {
1546
+ color: var(--lcars-text);
1547
+ flex: 1;
1548
+ }
1549
+
1550
+ .lcars-model-badge {
1551
+ background: var(--lcars-panel);
1552
+ color: var(--lcars-accent);
1553
+ padding: 4px 10px;
1554
+ border-radius: 6px;
1555
+ font-family: 'Courier New', monospace;
1556
+ font-size: 12px;
1557
+ }
1558
+
1559
+ .lcars-detail-section {
1560
+ margin: 16px 0;
1561
+ padding: 12px;
1562
+ background: var(--lcars-panel);
1563
+ border-radius: 8px;
1564
+ }
1565
+
1566
+ .lcars-skills-list {
1567
+ line-height: 2;
1568
+ }
1569
+
1570
+ .lcars-skill-item {
1571
+ color: var(--lcars-text-light);
1572
+ font-size: 13px;
1573
+ margin-left: 8px;
1574
+ }
1575
+
1576
+ .lcars-expertise {
1577
+ color: var(--lcars-text-light);
1578
+ font-size: 13px;
1579
+ line-height: 1.8;
1580
+ }
1581
+
1582
+ /* Pattern Details */
1583
+ .lcars-pattern-details {
1584
+ border: 1px solid #444;
1585
+ border-radius: 8px;
1586
+ margin: 10px 0;
1587
+ background: #1a1a1a;
1588
+ color: #fff;
1589
+ }
1590
+
1591
+ .lcars-pattern-header {
1592
+ background: #3366cc;
1593
+ color: white;
1594
+ padding: 12px 15px;
1595
+ font-weight: bold;
1596
+ font-size: 1.1em;
1597
+ text-align: center;
1598
+ border-bottom: 2px solid #ffcc00;
1599
+ }
1600
+
1601
+ .lcars-pattern-body {
1602
+ padding: 15px;
1603
+ }
1604
+
1605
+ .lcars-pattern-section {
1606
+ margin-bottom: 20px;
1607
+ display: block;
1608
+ }
1609
+
1610
+ .lcars-pattern-section:last-child {
1611
+ margin-bottom: 0;
1612
+ }
1613
+
1614
+ .lcars-pattern-label {
1615
+ font-weight: bold;
1616
+ color: #ffcc00;
1617
+ margin-bottom: 5px;
1618
+ font-size: 0.9em;
1619
+ text-transform: uppercase;
1620
+ letter-spacing: 1px;
1621
+ }
1622
+
1623
+ .lcars-pattern-text {
1624
+ color: #fa0404;
1625
+ line-height: 1.5;
1626
+ }
1627
+
1628
+ /* Log display */
1629
+ .lcars-log-panel {
1630
+ background: #00008734;
1631
+ color: #050505;
1632
+ font-family: 'Courier New', monospace;
1633
+ font-size: 16px;
1634
+ border-radius: 8px;
1635
+ padding: 12px;
1636
+ max-height: 500px;
1637
+ overflow-y: auto;
1638
+ box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
1639
+ }
1640
+
1641
+ .lcars-log-panel.lcars-empty {
1642
+ color: #999;
1643
+ text-align: center;
1644
+ font-style: italic;
1645
+ }
1646
+
1647
+ .lcars-log-entries {
1648
+ display: flex;
1649
+ flex-direction: column;
1650
+ gap: 4px;
1651
+ }
1652
+
1653
+ .lcars-log-entry {
1654
+ padding: 6px 10px;
1655
+ border-left: 3px solid transparent;
1656
+ border-radius: 3px;
1657
+ transition: all 0.2s ease;
1658
+ }
1659
+
1660
+ .lcars-log-entry:hover {
1661
+ background: rgba(255, 255, 255, 0.05);
1662
+ }
1663
+
1664
+ .lcars-log-info {
1665
+ border-left-color: #00FF00;
1666
+ color: #00FF00;
1667
+ }
1668
+
1669
+ .lcars-log-error {
1670
+ border-left-color: #FF3333;
1671
+ color: #FF6666;
1672
+ }
1673
+
1674
+ .lcars-log-level {
1675
+ font-weight: bold;
1676
+ margin-right: 8px;
1677
+ }
1678
+
1679
+ /* Chatbot styling */
1680
+ .lcars-chatbot {
1681
+ border: 3px solid var(--lcars-border) !important;
1682
+ border-radius: 12px !important;
1683
+ background: white !important;
1684
+ }
1685
+
1686
+ /* Panels */
1687
+ .lcars-panel {
1688
+ background: var(--lcars-panel);
1689
+ border: 2px solid var(--lcars-border);
1690
+ border-radius: 10px;
1691
+ padding: 14px;
1692
+ color: var(--lcars-text-light);
1693
+ }
1694
+
1695
+ .lcars-panel.lcars-empty {
1696
+ text-align: center;
1697
+ font-style: italic;
1698
+ color: var(--lcars-text-light);
1699
+ }
1700
+
1701
+ .lcars-panel.lcars-error {
1702
+ background: #FFE5E5;
1703
+ border-color: var(--lcars-rust);
1704
+ color: #CC0000;
1705
+ }
1706
+
1707
+ /* Scrollbar styling */
1708
+ ::-webkit-scrollbar {
1709
+ width: 10px;
1710
+ }
1711
+
1712
+ ::-webkit-scrollbar-track {
1713
+ background: var(--lcars-panel);
1714
+ border-radius: 5px;
1715
+ }
1716
+
1717
+ ::-webkit-scrollbar-thumb {
1718
+ background: var(--lcars-border);
1719
+ border-radius: 5px;
1720
+ }
1721
+
1722
+ ::-webkit-scrollbar-thumb:hover {
1723
+ background: var(--lcars-accent);
1724
+ }
1725
+
1726
+ /* Headers and titles */
1727
+ h1, h2, h3, h4 {
1728
+ color: var(--lcars-accent) !important;
1729
+ }
1730
+
1731
+ /* Tabs */
1732
+ .tab-nav button {
1733
+ background: var(--lcars-panel) !important;
1734
+ border: 2px solid var(--lcars-border) !important;
1735
+ color: var(--lcars-text) !important;
1736
+ border-radius: 8px 8px 0 0 !important;
1737
+ margin-right: 4px !important;
1738
+ font-weight: bold !important;
1739
+ }
1740
+
1741
+ .tab-nav button.selected {
1742
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1743
+ color: var(--lcars-text) !important;
1744
+ border-bottom: none !important;
1745
+ }
1746
+
1747
+ /* Ensure vertical stacking of participants */
1748
+ .lcars-participants-container {
1749
+ display: flex !important;
1750
+ flex-direction: column !important;
1751
+ gap: 16px !important;
1752
+ width: 100% !important;
1753
+ max-width: 100% !important;
1754
+ margin: 0 auto !important;
1755
+ align-items: stretch !important; /* Ensures full width alignment */
1756
+ }
1757
+ .lcars-services-header {
1758
+ border-top: 2px solid #996600;
1759
+ margin-top: 10px;
1760
+ padding-top: 10px;
1761
+ }
1762
+
1763
+ .lcars-service-header {
1764
+ background: linear-gradient(90deg, #996600, #cc9900) !important;
1765
+ color: #000 !important;
1766
+ font-weight: bold;
1767
+ }
1768
+
1769
+ .lcars-service {
1770
+ background: rgba(153, 102, 0, 0.1) !important;
1771
+ border-left: 3px solid #996600;
1772
+ }
1773
+ /* Make sure each participant card respects container flow */
1774
+ .lcars-participant-card-manager,
1775
+ .lcars-participant-card-agent,
1776
+ .lcars-participant-card-human {
1777
+ display: flex !important;
1778
+ flex-direction: column !important;
1779
+ break-inside: avoid !important; /* Prevents awkward splits in print/PDF */
1780
+ position: relative !important;
1781
+ width: 100% !important;
1782
+ box-sizing: border-box !important;
1783
+ background: white !important;
1784
+ color: #2D2D5F !important;
1785
+ }
1786
+ .gradio-container {{background-color: rgba(243, 48, 4, 0.85);
1787
+ background: linear-gradient(135deg, {self.colors['background']}, #001122) !important;
1788
+ color: {self.colors['text']} !important;
1789
+ font-family: 'Courier New', monospace !important;
1790
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1791
+ background-size: cover;
1792
+ background-position: center;
1793
+ background-repeat: no-repeat;
1794
+ border-radius: 20px;
1795
+ }}
1796
+ """
1797
+
1798
+ self.COLORS = {
1799
+ 'primary': "#f58105fc", # LCARS Orange
1800
+ 'secondary': "#95B3F8", # LCARS Purple
1801
+ 'accent': "#9CDDEA", # Light Orange
1802
+ 'success': "#17ea68", # Light Blue
1803
+ 'warning': "#FFEA07", # Yellow
1804
+ 'error': "#e80c0c", # Red
1805
+ 'info': "#181919", # Light Green
1806
+ 'text': "#111010", # White
1807
+ 'background': "#0B0B0BB3", # Black
1808
+ 'panel': "#0808F0", # Dark Blue
1809
+ 'border': "#E3FC03FF" # Orange Border
1810
+ }
1811
+ config = CONFIG()
1812
  @dataclass
1813
  class ParsedResponse:
1814
  """Fixed ParsedResponse data model"""