roboticus-api 0.11.3

HTTP routes, WebSocket, auth, rate limiting, and dashboard for the Roboticus agent runtime
Documentation
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
.card { background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -3px rgba(6,14,32,0.5); }
.card-title { font-family: var(--font-headline); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
.card-value { font-size: 1.25rem; font-weight: 600; }
.card-mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.session-nick { transition: color 0.15s; }
.copy-id-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.125rem; height: 1.125rem; padding: 0; margin-left: 0.375rem; background: none; border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--muted); cursor: pointer; vertical-align: middle; transition: color 0.15s, border-color 0.15s; flex-shrink: 0; }
.copy-id-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-id-btn svg { width: 0.6875rem; height: 0.6875rem; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.75rem; font-weight: 500; }
.badge.success { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.badge.error { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.badge.warning { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.badge.muted { background: rgba(113, 113, 122, 0.2); color: var(--muted); }
.badge.success::before { content: '✓'; font-size: 0.68rem; line-height: 1; }
.badge.warning::before { content: '!'; font-size: 0.68rem; line-height: 1; }
.badge.error::before { content: '×'; font-size: 0.7rem; line-height: 1; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; align-items: stretch; }
.overview-grid > div > .composite-card { height: 100%; display: flex; flex-direction: column; }
.overview-grid > div > .composite-card .cc-header { flex: 0 0 auto; }
.overview-grid > div > .composite-card .cc-chart-wrap { flex: 0 0 auto; }
.overview-grid > div > .composite-card .cc-footer { flex: 0 0 auto; margin-top: auto; }
.overview-fleet-slot { grid-column: 1 / -1; min-width: 0; }
.composite-card { padding: 0; overflow: hidden; }
.composite-card:hover { transform: translateY(-2px); }
.cc-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1rem 1.25rem 0; }
.cc-left { display: flex; flex-direction: column; gap: 0.125rem; }
.cc-label { font-family: var(--font-headline); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.cc-value { font-family: var(--font-headline); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.cc-sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.125rem; font-family: var(--font-mono); }
.cc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.cc-delta { font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.5rem; border-radius: 3px; }
.cc-delta.up { color: var(--success); background: rgba(34,197,94,0.12); }
.cc-delta.down { color: var(--error); background: rgba(239,68,68,0.12); }
.cc-delta.flat { color: var(--muted); background: rgba(113,113,122,0.12); }
.cc-chart-wrap { position: relative; }
.cc-chart-axis { position: absolute; right: 0.5rem; font-size: 0.625rem; color: var(--muted); font-family: var(--font-mono); line-height: 1; pointer-events: none; user-select: none; }
.cc-chart-axis.top { top: 0.35rem; }
.cc-chart-axis.bottom { bottom: 0.2rem; }
.cc-chart { width: 100%; height: 64px; display: block; margin-top: 0.5rem; }
.cc-footer { display: flex; gap: 1rem; padding: 0.625rem 1.25rem; border-top: 1px solid var(--border-ghost); background: rgba(0,0,0,0.15); }
.cc-stat { display: flex; flex-direction: column; }
.cc-stat-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cc-stat-value { font-size: 0.8125rem; font-weight: 600; font-family: var(--font-mono); }
.overview-status { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:0.75rem; margin-bottom:0.75rem; }
.overview-meta { display:flex; flex-wrap:wrap; gap:0.5rem; align-items:center; }
.overview-attention { margin-bottom:0.75rem; }
.overview-onboarding { margin-bottom:0.75rem; }
.cc-agents-row { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem 1.25rem 1rem; }
.cc-agent-pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.3rem 0.625rem; border-radius: 3px; font-size: 0.75rem; background: rgba(255,255,255,0.04); border: 1px solid var(--border-ghost); }
.cc-agent-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.fleet-legend-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.25rem 1.5rem; padding: 0.625rem 1.25rem 0.75rem;
  border-top: 1px solid var(--border-ghost); background: rgba(0,0,0,0.15);
}
.fleet-legend-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; padding: 0.2rem 0; min-width: 0;
}
.fleet-legend-swatch {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.fleet-legend-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text);
}
.fleet-legend-state {
  font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); flex-shrink: 0;
}
.fleet-legend-state.running { color: var(--success); }
.fleet-legend-pct {
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted);
  min-width: 2.5em; text-align: right; flex-shrink: 0;
}
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%); background-size: 200% 100%; animation: skeleton 1.2s ease-in-out infinite; border-radius: 4px; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-ghost); }
table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-ghost); }
th { background: var(--surface-2); color: var(--muted); font-family: var(--font-headline); font-weight: 500; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.1em; position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-3); }
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); color: var(--outline); font-size: 0.6875rem; cursor: pointer; transition: all 0.2s; font-family: var(--font-headline); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--accent); color: #000; border: none; border-radius: var(--radius-sm); font-size: 0.6875rem; font-family: var(--font-headline); font-weight: 700; cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.15em; }
.btn:hover { box-shadow: 0 0 20px var(--accent-glow); transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border-ghost); }
.btn.secondary:hover { background: var(--surface-3); border-color: var(--accent); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.skill-card { cursor: pointer; }
.skill-card .card-value { font-size: 1rem; }
.skill-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.skill-info { flex: 1; min-width: 0; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; background: var(--surface-4); border: 1px solid var(--border-ghost); border-radius: 11px; cursor: pointer; transition: background 0.2s; }
.toggle-track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: var(--muted); border-radius: 50%; transition: transform 0.2s, background 0.2s; }
.toggle input:checked + .toggle-track { background: rgba(193,128,255,0.2); border-color: rgba(193,128,255,0.5); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.toggle input:disabled + .toggle-track { background: rgba(148,163,184,0.2); cursor: not-allowed; }
.toggle input:disabled + .toggle-track::after { background: var(--muted); }
.toggle input:checked:disabled + .toggle-track { background: rgba(148,163,184,0.35); }
.toggle input:checked:disabled + .toggle-track::after { transform: translateX(18px); background: rgba(203,213,225,0.9); }
.message-thread { flex: 1; overflow-y: auto; min-height: 0; }
.message { margin-bottom: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-xl); max-width: 85%; }
.message.user { margin-left: auto; background: var(--surface-3); border: 1px solid var(--border-ghost); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl); }
.message.assistant { margin-right: auto; background: var(--surface-2); border: 1px solid rgba(193,128,255,0.15); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--radius-sm); box-shadow: 0 0 20px rgba(193,128,255,0.03); }
.message .md-table { width: auto; margin: 0.5rem 0; font-size: 0.8125rem; }
.message .md-table th, .message .md-table td { padding: 0.375rem 0.75rem; border: 1px solid var(--border-ghost); }
.message .md-table th { background: rgba(255,255,255,0.04); }
.message-role { font-family: var(--font-headline); font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.5rem; }
.ctx-expand-btn { background: none; border: none; color: var(--tertiary); cursor: pointer; padding: 2px 6px; font-family: var(--font-headline); font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; line-height: 1.2; transition: all 0.15s; margin-left: auto; }
.ctx-expand-btn:hover { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }
.ctx-detail { margin-top: 0.5rem; padding: 0.625rem; background: rgba(0,0,0,0.2); border-radius: 3px; border: 1px solid var(--border-ghost); font-size: 0.75rem; }
.ctx-detail .ctx-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 0.375rem 0; gap: 1px; }
.ctx-detail .ctx-bar span { display: block; height: 100%; transition: width 0.3s; }
.ctx-detail .ctx-bar .sys { background: var(--accent); }
.ctx-detail .ctx-bar .mem { background: var(--success); }
.ctx-detail .ctx-bar .hist { background: var(--warning); }
.ctx-detail .ctx-bar .free { background: rgba(255,255,255,0.05); }
.ctx-detail .ctx-legend { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.ctx-detail .ctx-legend span { display: flex; align-items: center; gap: 0.25rem; font-size: 0.6875rem; color: var(--muted); }
.ctx-detail .ctx-legend span::before { content: ''; width: 8px; height: 8px; border-radius: 2px; }
.ctx-detail .ctx-legend .l-sys::before { background: var(--accent); }
.ctx-detail .ctx-legend .l-mem::before { background: var(--success); }
.ctx-detail .ctx-legend .l-hist::before { background: var(--warning); }
.ctx-section { margin-top: 0.5rem; }
.ctx-section summary { cursor: pointer; color: var(--muted); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ctx-section pre { margin: 0.25rem 0 0; font-size: 0.75rem; white-space: pre-wrap; word-break: break-all; color: var(--text); max-height: 200px; overflow-y: auto; }
.ctx-explorer-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; min-height: 500px; }
.ctx-timeline { background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); overflow-y: auto; max-height: 600px; }
.ctx-timeline-item { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border-ghost); cursor: pointer; transition: background 0.15s; font-size: 0.8125rem; }
.ctx-timeline-item:hover { background: rgba(255,255,255,0.03); }
.ctx-timeline-item.active { background: var(--accent-dim); border-left: 3px solid var(--accent); }
.ctx-turn-detail { background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); padding: 1rem; }
.ctx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.ctx-stat { background: rgba(0,0,0,0.15); border-radius: 4px; padding: 0.625rem; text-align: center; }
.ctx-stat .val { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.ctx-stat .lbl { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; margin-top: 0.125rem; }
.ctx-tips { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ctx-tip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.625rem; line-height: 1.3; cursor: default; }
.ctx-tip.info { background: rgba(59,130,246,0.15); color: #93bbfd; border: 1px solid rgba(59,130,246,0.3); }
.ctx-tip.warning { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.ctx-tip.critical { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.ctx-tip .tip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ctx-tip.info .tip-dot { background: #3b82f6; }
.ctx-tip.warning .tip-dot { background: #f59e0b; }
.ctx-tip.critical .tip-dot { background: #ef4444; }
.ctx-tip-detail { margin-top: 0.375rem; padding: 0.375rem 0.5rem; background: rgba(0,0,0,0.15); border-radius: 3px; font-size: 0.6875rem; color: var(--muted); }
.ctx-tip-detail strong { color: var(--text); font-weight: 600; }
.hint-banner {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(193, 128, 255, 0.35);
  background: rgba(193, 128, 255, 0.08);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}
.hint-banner .hint-main { display: flex; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.hint-banner .hint-icon { font-size: 0.95rem; line-height: 1; margin-top: 1px; flex-shrink: 0; }
.hint-banner .hint-text { color: var(--text); }
.hint-banner .hint-dismiss {
  border: 1px solid var(--border-ghost);
  background: var(--surface-3);
  color: var(--text);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  flex-shrink: 0;
}
.hint-banner .hint-dismiss:hover { border-color: var(--accent); color: var(--accent); }
.hint-pref-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hint-pref-modal {
  width: min(430px, 92vw);
  background: var(--surface-3);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  padding: 1.25rem;
}
.hint-pref-title { font-family: var(--font-headline); font-size: 1.125rem; font-weight: 700; margin-bottom: 0.45rem; letter-spacing: 0.05em; }
.hint-pref-copy { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.85rem; }
.hint-pref-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.hint-help-wiki-block {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-ghost);
}
.hint-help-wiki-block a {
  color: var(--accent);
  font-size: 0.875rem;
  text-decoration: none;
  word-break: break-word;
}
.hint-help-wiki-block a:hover { text-decoration: underline; }
.hint-help-wiki-desc { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.5rem; }
.hint-help-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.25rem; }
.hint-help-toggle-row .hint-help-toggle-label { font-size: 0.8125rem; color: var(--text); }
.header-help-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  border: 1px solid var(--border-ghost);
  border-radius: 4px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: var(--font);
}
.header-help-btn:hover { border-color: var(--accent); color: var(--text); }
.header-help-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ctx-analyze-btn { margin-top: 0.5rem; font-size: 0.6875rem; padding: 0.25rem 0.625rem; }
.ctx-insights { margin-top: 1rem; }
.streaming-content { white-space: pre-wrap; word-break: break-word; }
.streaming-content::after { content: '\2588'; animation: cursorBlink 0.8s step-end infinite; color: var(--tertiary); text-shadow: 0 0 8px rgba(125,233,255,0.6); }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.thinking-indicator { margin-right: auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.625rem; }
.thinking-brain { display: inline-block; font-size: 1.25rem; animation: brainBounce 1.2s ease-in-out infinite; }
.thinking-dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: dotPulse 1.4s ease-in-out infinite; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes brainBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-6px) rotate(8deg); }
}
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}
.config-block { background: var(--bg); border: 1px solid var(--border-ghost); border-radius: 4px; padding: 1rem; font-family: var(--font-mono); font-size: 0.8125rem; overflow-x: auto; margin-bottom: 0.5rem; white-space: pre-wrap; word-break: break-word; }
.config-section { margin-bottom: 1rem; }
.config-section summary { cursor: pointer; padding: 0.5rem 0; color: var(--accent); font-family: var(--font-headline); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-top: 0.5rem; }
.chart-bar { flex: 1; min-width: 8px; background: linear-gradient(180deg, var(--accent) 0%, rgba(193,128,255,0.3) 100%); border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: height 0.3s; }
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.75rem 1.25rem; background: var(--surface-3); border: 1px solid var(--border-ghost); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 0.8125rem; animation: toastIn 0.25s ease; backdrop-filter: blur(20px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(6,14,32,0.9); backdrop-filter: blur(20px); border-top: 1px solid var(--border-ghost); padding: 0.375rem 0.25rem calc(0.375rem + env(safe-area-inset-bottom, 0px)); z-index: 100; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mobile-nav a { flex: 0 0 auto; min-width: 3.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.375rem 0.5rem; font-family: var(--font-headline); font-size: 0.5625rem; letter-spacing: 0.05em; text-decoration: none; color: rgba(222, 229, 255, 0.4); cursor: pointer; white-space: nowrap; }
.mobile-nav a.active { color: var(--tertiary); text-shadow: 0 0 8px var(--tertiary); }
.mobile-nav a .nav-icon { width: 16px; height: 16px; }
.settings-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.settings-actions .btn { min-width: 80px; justify-content: center; }
.settings-editor { position: relative; }
.settings-editor-fullheight { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.json-editor-wrap {
  position: relative; flex: 1; min-height: 400px; max-height: 70vh; border: 1px solid var(--border-ghost); border-radius: 4px;
  background: var(--bg); overflow: auto;
}
.json-editor-wrap textarea, .json-editor-wrap .json-highlight {
  margin: 0; padding: 1rem; font-family: var(--font-mono); font-size: 0.8125rem;
  line-height: 1.6; tab-size: 2; white-space: pre-wrap; word-wrap: break-word;
  overflow: hidden; width: 100%; min-height: 100%; box-sizing: border-box;
}
.json-editor-wrap textarea {
  position: absolute; top: 0; left: 0; resize: none; background: transparent; color: transparent;
  caret-color: var(--text); outline: none; border: none; z-index: 2;
  width: 100%; height: 100%; min-height: 100%;
}
.json-editor-wrap textarea:focus ~ .json-editor-focus-ring,
.json-editor-wrap textarea:focus { outline: none; }
.json-editor-wrap:focus-within { border-color: var(--accent); }
.json-editor-wrap textarea.has-error ~ .json-editor-focus-ring,
.json-editor-wrap.has-error { border-color: var(--error); }
.json-highlight {
  position: relative; z-index: 1; pointer-events: none;
  color: var(--text); overflow: hidden;
}
.json-highlight .jh-key { color: var(--tertiary); }
.json-highlight .jh-str { color: var(--success); }
.json-highlight .jh-num { color: var(--secondary); }
.json-highlight .jh-bool { color: var(--accent); }
.json-highlight .jh-null { color: var(--outline); font-style: italic; }
.json-highlight .jh-brace { color: var(--muted); }
.json-highlight .jh-section { color: var(--tertiary); font-weight: 700; }
.json-highlight .jh-comment { color: var(--muted); font-style: italic; }
.settings-editor textarea {
  width: 100%; min-height: 360px; padding: 1rem; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-ghost); border-radius: 4px; font-family: var(--font-mono); font-size: 0.8125rem;
  line-height: 1.6; resize: vertical; tab-size: 2; outline: none; transition: border-color 0.15s;
}
.json-editor-wrap textarea { background: transparent; color: transparent; border: none; }
.settings-editor textarea:focus { border-color: var(--accent); }
.settings-editor textarea.has-error { border-color: var(--error); }
.settings-lint { font-size: 0.75rem; margin-top: 0.375rem; min-height: 1.25rem; font-family: var(--font-mono); }
.settings-lint.ok { color: var(--success); }
.settings-lint.err { color: var(--error); }
.settings-form { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-section { background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); padding: 1.25rem; }
.settings-section-title { font-family: var(--font-headline); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.75rem; font-weight: 600; }
.settings-row { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.settings-row:last-child { margin-bottom: 0; }
.settings-label { font-family: var(--font-headline); font-size: 0.625rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.settings-input {
  padding: 0.375rem 0.625rem; background: var(--surface-4); color: var(--text);
  border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.8125rem;
  outline: none; transition: border-color 0.2s; width: 100%;
}
.settings-input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim); }
.settings-input[type="number"] { max-width: 120px; }
.settings-toggle-wrap { display: flex; align-items: center; gap: 0.5rem; }
.settings-toggle-label { font-size: 0.75rem; color: var(--muted); }
.settings-nested { margin-left: 0.75rem; padding-left: 0.75rem; border-left: 2px solid var(--border-ghost); }
.channel-subsection { margin-top: 0.75rem; padding: 0.875rem 1rem; background: var(--bg); border: 1px solid var(--border-ghost); border-radius: 4px; }
.channel-subsection + .channel-subsection { margin-top: 0.5rem; }
.channel-subsection-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-ghost); display: flex; align-items: center; gap: 0.5rem; }
.channel-subsection-title .badge { font-size: 0.55rem; vertical-align: middle; }
.channel-subsection.disabled { opacity: 0.55; }
.channels-divider { border: none; border-top: 1px solid var(--border-ghost); margin: 1rem 0 0.5rem; }
.settings-dirty-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); margin-left: 0.5rem; vertical-align: middle; }
.settings-input::placeholder { color: var(--muted); opacity: 0.45; font-style: italic; }
.settings-input.warn { border-color: var(--error); background: rgba(239,68,68,0.06); }
.settings-label.warn { color: var(--error); }
.settings-warn-icon { color: var(--error); font-size: 0.75rem; margin-left: 0.25rem; }
.model-order-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.model-order-item { display: grid; grid-template-columns: 16px minmax(160px,1fr) auto auto auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0.5rem; border: 1px solid var(--border-ghost); border-radius: 4px; background: var(--bg); }
.model-order-item.dragging { opacity: 0.55; border-style: dashed; }
.model-order-item.drop-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim) inset; }
.model-order-handle { color: var(--muted); cursor: grab; user-select: none; font-size: 0.75rem; letter-spacing: -1px; text-align: center; }
.model-order-name { font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-order-actions { display: flex; gap: 0.35rem; align-items: center; }
.model-order-btn { font-size: 0.65rem; padding: 0.2rem 0.45rem; border: 1px solid var(--border-ghost); border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.model-order-btn:hover { color: var(--text); border-color: var(--accent); }
.model-order-add { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center; }
.settings-provider-card { background: var(--bg); border: 1px solid var(--border-ghost); border-radius: 4px; padding: 0.75rem; margin-bottom: 0.75rem; }
.settings-provider-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; padding-bottom: 0.375rem; border-bottom: 1px solid var(--border-ghost); }
.settings-provider-name { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.settings-provider-add { display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.75rem; background: none; border: 1px dashed var(--border-ghost); border-radius: 4px; color: var(--muted); font-family: var(--font); font-size: 0.75rem; cursor: pointer; width: 100%; justify-content: center; transition: all 0.15s; }
.settings-provider-add:hover { border-color: var(--accent); color: var(--accent); }
.key-manage-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--border-ghost); }
.key-manage-row input { flex: 1; font-family: var(--font); font-size: 0.75rem; padding: 0.3rem 0.5rem; background: var(--panel); border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--fg); }
.key-manage-row input:focus { outline: none; border-color: var(--accent); }
.key-manage-btn { font-family: var(--font); font-size: 0.675rem; padding: 0.25rem 0.625rem; border-radius: 3px; cursor: pointer; border: 1px solid; transition: all 0.15s; white-space: nowrap; }
.key-manage-btn.save { background: var(--success); border-color: var(--success); color: #fff; }
.key-manage-btn.save:hover { opacity: 0.85; }
.key-manage-btn.remove { background: none; border-color: var(--error); color: var(--error); }
.key-manage-btn.remove:hover { background: var(--error); color: #fff; }
.key-manage-msg { font-size: 0.675rem; margin-left: 0.25rem; }
.grade-stars { display: flex; gap: 0.125rem; margin-top: 0.375rem; align-items: center; }
.grade-stars .star { font-size: 1rem; cursor: pointer; color: var(--border); transition: color 0.15s; user-select: none; line-height: 1; }
.grade-stars .star:hover, .grade-stars .star.hovered { color: var(--warning); }
.grade-stars .star.filled { color: var(--warning); }
.grade-stars .grade-comment-toggle { font-size: 0.625rem; color: var(--muted); cursor: pointer; margin-left: 0.375rem; border: none; background: none; font-family: var(--font); }
.grade-stars .grade-comment-toggle:hover { color: var(--text); }
.grade-comment-row { display: flex; gap: 0.375rem; align-items: center; margin-top: 0.25rem; }
.grade-comment-row input { flex: 1; font-family: var(--font); font-size: 0.6875rem; padding: 0.25rem 0.5rem; background: var(--surface); border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--text); outline: none; }
.grade-comment-row input:focus { border-color: var(--accent); }
.grade-comment-row .grade-save-btn { font-size: 0.625rem; padding: 0.2rem 0.5rem; background: var(--accent); border: none; border-radius: 3px; color: #fff; cursor: pointer; font-family: var(--font); }
.grade-badge { display: inline-flex; align-items: center; gap: 0.125rem; font-size: 0.5625rem; color: var(--warning); margin-left: 0.25rem; }
.session-chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 56px - 3rem); min-height: 0; }
.session-chat-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-ghost); margin-bottom: 0.75rem; flex-shrink: 0; }
.session-chat-input { display: flex; gap: 0.5rem; flex-shrink: 0; padding-top: 0.75rem; border-top: 1px solid var(--border-ghost); margin-top: auto; align-items: flex-end; }
.session-chat-input textarea { flex: 1; padding: 0.625rem 1rem; background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); color: var(--text); font-family: var(--font); font-size: 0.8125rem; outline: none; transition: border-color 0.2s; resize: none; min-height: 2.25rem; max-height: 8rem; overflow-y: auto; line-height: 1.5; field-sizing: content; }
.session-chat-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim); }
.session-chat-input textarea:disabled { opacity: 0.4; pointer-events: none; }
.session-chat-input .btn:disabled { opacity: 0.4; pointer-events: none; }
.chain-preset-btn { padding: 0.25rem 0.5rem; background: var(--surface); border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--muted); font-size: 0.625rem; font-family: var(--font); cursor: pointer; transition: all 0.15s; }
.chain-preset-btn:hover { color: var(--text); border-color: var(--accent); }
.chain-preset-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.metrics-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.75rem; }
.metrics-legend-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; }
.metrics-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.metrics-legend-val { color: var(--muted); font-family: var(--font-mono); }
.metrics-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.metrics-stat { background: var(--bg); border: 1px solid var(--border-ghost); border-radius: 4px; padding: 0.625rem 0.75rem; }
.metrics-stat-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.metrics-stat-value { font-size: 1rem; font-weight: 700; margin-top: 0.125rem; font-family: var(--font-mono); }
.routing-profile-grid { display: grid; grid-template-columns: minmax(220px, 260px) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.routing-slider-row { margin-bottom: 0.75rem; }
.routing-slider-row label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; }
.routing-slider-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.routing-profile-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.model-graph-wrap { position: relative; height: 320px; border: 1px solid var(--border-ghost); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(193,128,255,0.06), rgba(193,128,255,0.01)); overflow: hidden; }
.model-graph-svg { width: 100%; height: 100%; display: block; }
.model-graph-node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.6; cursor: pointer; }
.model-graph-node-unusable { fill: rgba(255,255,255,0.06); stroke: var(--muted); stroke-dasharray: 3 2; }
.model-graph-node-label { fill: var(--text); font-size: 10px; font-family: var(--font-mono); text-anchor: middle; pointer-events: none; }
.model-graph-edge { stroke: var(--border); stroke-opacity: 0.75; cursor: pointer; }
.model-graph-edge.active { stroke: var(--accent); stroke-opacity: 0.95; }
.model-graph-node.active { fill: rgba(193,128,255,0.18); }
.model-graph-faded { opacity: 0.3; }
.model-graph-detail { margin-top: 0.65rem; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 960px) { .routing-profile-grid { grid-template-columns: 1fr; } .model-graph-wrap { height: 250px; } }
.cal-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; flex-shrink: 0; }
.cal-header-left { display: flex; align-items: center; gap: 1rem; }
.cal-title { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.cal-nav { display: flex; gap: 0.25rem; }
.cal-nav button { width: 28px; height: 28px; background: var(--surface); border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--muted); font-size: 0.875rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.15s, border-color 0.15s; font-family: var(--font); }
.cal-nav button:hover { color: var(--text); border-color: var(--accent); }
.cal-header-right { display: flex; align-items: center; gap: 0.5rem; }
.cal-body { display: grid; grid-template-columns: 1fr 240px; flex: 1; min-height: 0; overflow: hidden; }
@media (max-width: 900px) { .cal-body { grid-template-columns: 1fr; } .cal-sidebar { display: none; } }
.cal-grid-wrap { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-ghost); }
.cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border-ghost); flex-shrink: 0; }
.cal-dow { padding: 0.375rem 0.25rem; text-align: center; font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; flex: 1; min-height: 0; }
.cal-day { background: var(--bg); padding: 0.25rem 0.375rem; cursor: pointer; transition: background 0.15s; position: relative; border-right: 1px solid var(--border-ghost); border-bottom: 1px solid var(--border-ghost); overflow: hidden; display: flex; flex-direction: column; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: rgba(193,128,255,0.04); }
.cal-day.other-month { opacity: 0.3; }
.cal-day.today { background: rgba(193,128,255,0.06); }
.cal-day.today::after { content: ''; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.cal-day.selected { background: var(--accent-dim); outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.cal-day-num { font-size: 0.6875rem; color: var(--muted); margin-bottom: 0.125rem; line-height: 1; flex-shrink: 0; }
.cal-day.today .cal-day-num { color: var(--accent); font-weight: 700; }
.cal-events { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow: hidden; }
.cal-evt { font-size: 0.5625rem; padding: 1px 4px; border-radius: 2px; color: #fff; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; flex-shrink: 0; transition: filter 0.15s; }
.cal-evt:hover { filter: brightness(1.2); }
.cal-evt.fail { box-shadow: inset 0 0 0 1px rgba(239,68,68,0.6); }
.cal-evt.past { opacity: 0.75; cursor: default; }
.cal-evt.past:hover { filter: none; }
.cal-edit-info { font-size: 0.6875rem; color: var(--muted); background: rgba(193,128,255,0.08); border: 1px solid var(--border-ghost); border-radius: 4px; padding: 0.5rem 0.625rem; line-height: 1.4; }
.cal-edit-info strong { color: var(--text); font-weight: 600; }
.cal-legend-btn.disabled { opacity: 0.3; pointer-events: none; cursor: not-allowed; }
.cal-sidebar { display: flex; flex-direction: column; overflow-y: auto; background: var(--surface-2); }
.cal-sidebar-section { padding: 0.75rem; border-bottom: 1px solid var(--border-ghost); }
.cal-sidebar-title { font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.cal-legend-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; font-size: 0.75rem; cursor: pointer; transition: opacity 0.15s; }
.cal-legend-item:hover { opacity: 0.8; }
.cal-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.cal-legend-info { flex: 1; min-width: 0; }
.cal-legend-name { font-weight: 600; font-size: 0.75rem; }
.cal-legend-sched { font-size: 0.625rem; color: var(--muted); font-family: var(--font-mono); }
.cal-legend-actions { display: flex; gap: 0.25rem; }
.cal-legend-btn { width: 20px; height: 20px; background: none; border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--muted); font-size: 0.625rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; font-family: var(--font); }
.cal-legend-btn:hover { color: var(--text); border-color: var(--accent); }
.cal-legend-btn.danger:hover { color: var(--error); border-color: var(--error); }
.cal-detail { padding: 0.75rem; }
.cal-detail-title { font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.5rem; }
.cal-detail-run { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; font-size: 0.6875rem; border-bottom: 1px solid var(--border-ghost); }
.cal-detail-run:last-child { border-bottom: none; }
.cal-detail-dot { width: 6px; height: 6px; border-radius: 1px; flex-shrink: 0; }
.cal-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.cal-modal { background: var(--surface-3); border: 1px solid var(--border-ghost); border-radius: var(--radius-xl); width: 380px; max-width: 90vw; box-shadow: 0 16px 48px rgba(6,14,32,0.6); backdrop-filter: blur(20px); }
.cal-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-ghost); }
.cal-modal-header h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cal-modal-close { background: none; border: none; color: var(--muted); font-size: 1.25rem; cursor: pointer; line-height: 1; font-family: var(--font); }
.cal-modal-close:hover { color: var(--text); }
.cal-modal-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cal-modal-row { display: flex; flex-direction: column; gap: 0.25rem; }
.cal-modal-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cal-modal-input { padding: 0.375rem 0.625rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-ghost); border-radius: 3px; font-family: var(--font-mono); font-size: 0.8125rem; outline: none; width: 100%; }
.cal-modal-input:focus { border-color: var(--accent); }
.cal-modal-select { padding: 0.375rem 0.625rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-ghost); border-radius: 3px; font-family: var(--font-mono); font-size: 0.8125rem; outline: none; width: 100%; appearance: none; }
.cal-modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; padding: 0.75rem 1rem; border-top: 1px solid var(--border-ghost); }
.cal-modal-footer .btn { font-size: 0.75rem; padding: 0.375rem 0.875rem; }
.cal-color-row { display: flex; gap: 0.375rem; }
.cal-color-swatch { width: 24px; height: 24px; border-radius: 3px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s; }
.cal-color-swatch.active { border-color: var(--text); }
.cal-color-swatch:hover { border-color: var(--muted); }
.cal-sched-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cal-sched-row .cal-modal-select { width: auto; min-width: 100px; }
.cal-sched-inline { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--text); }
.cal-sched-input-sm { width: 52px; padding: 0.3rem 0.4rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-ghost); border-radius: 3px; font-family: var(--font-mono); font-size: 0.8125rem; text-align: center; outline: none; }
.cal-sched-input-sm:focus { border-color: var(--accent); }
.cal-days-row { display: flex; gap: 0.25rem; }
.cal-day-btn { width: 30px; height: 26px; background: var(--surface); border: 1px solid var(--border-ghost); border-radius: 3px; color: var(--muted); font-size: 0.625rem; font-family: var(--font); cursor: pointer; transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-day-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.cal-day-btn:hover { border-color: var(--accent); color: var(--text); }
.cal-sched-summary { font-size: 0.6875rem; color: var(--muted); font-family: var(--font-mono); padding: 0.5rem 0.625rem; background: rgba(255,255,255,0.02); border: 1px solid var(--border-ghost); border-radius: 3px; margin-top: 0.25rem; }
.theme-picker { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.theme-btn { background: none; border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 0.3rem 0.625rem; color: var(--muted); font-family: var(--font-headline); font-size: 0.5625rem; cursor: pointer; display: flex; align-items: center; gap: 0.375rem; transition: color 0.15s, border-color 0.15s; text-transform: uppercase; letter-spacing: 0.1em; }
.theme-btn:hover { color: var(--text); border-color: var(--accent); }
.theme-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.theme-dropdown { display: none; position: absolute; right: 0; top: 100%; margin-top: 0.375rem; background: var(--surface-3); border: 1px solid var(--border-ghost); border-radius: var(--radius-xl); box-shadow: var(--shadow); backdrop-filter: blur(20px); z-index: 9000; min-width: 340px; max-height: 480px; overflow-y: auto; padding: 0.5rem; }
.theme-dropdown.open { display: block; }
.theme-option { display: flex; align-items: flex-start; gap: 0.625rem; padding: 0.5rem; font-family: var(--font-headline); font-size: 0.625rem; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; border: none; background: none; width: 100%; text-align: left; border-radius: var(--radius); }
.theme-option:hover { background: var(--surface-4); color: var(--text); }
.theme-option.active { color: var(--accent); border: 1px solid var(--accent-dim); background: var(--accent-dim); }
.theme-option-swatch { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.theme-preview { width: 80px; height: 50px; border-radius: var(--radius); flex-shrink: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); position: relative; }
.theme-preview-inner { width: 100%; height: 100%; display: flex; flex-direction: column; }
.theme-preview-header { height: 12px; display: flex; align-items: center; padding: 0 4px; gap: 2px; }
.theme-preview-dot { width: 3px; height: 3px; border-radius: 50%; }
.theme-preview-body { flex: 1; display: flex; gap: 2px; padding: 3px; }
.theme-preview-sidebar { width: 16px; border-radius: 1px; }
.theme-preview-content { flex: 1; border-radius: 1px; display: flex; flex-direction: column; gap: 2px; padding: 2px; }
.theme-preview-line { height: 3px; border-radius: 1px; }
.theme-info { flex: 1; min-width: 0; }
.theme-info-name { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.theme-info-desc { font-size: 0.5625rem; opacity: 0.7; text-transform: none; letter-spacing: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-info-meta { font-size: 0.5rem; opacity: 0.5; margin-top: 2px; text-transform: none; letter-spacing: 0; }
/* ── Theme Catalog Modal ─────────────────────────────── */
.theme-catalog-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 9500; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.theme-catalog-overlay.open { display: flex; }
.theme-catalog-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); width: min(640px, 92vw); max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px -12px rgba(0,0,0,0.5); }
.theme-catalog-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-ghost); flex-shrink: 0; }
.theme-catalog-header h3 { font-family: var(--font-headline); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin: 0; }
.theme-catalog-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.25rem; padding: 0.25rem; line-height: 1; }
.theme-catalog-close:hover { color: var(--text); }
.theme-catalog-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; padding: 1rem 1.25rem; overflow-y: auto; flex: 1; }
.theme-catalog-card { display: flex; gap: 1rem; padding: 0.875rem; background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); transition: border-color 0.15s; }
.theme-catalog-card:hover { border-color: var(--accent); }
.theme-catalog-swatch { width: 80px; height: 56px; border-radius: var(--radius); flex-shrink: 0; border: 1px solid rgba(255,255,255,0.08); }
.theme-catalog-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.theme-catalog-card-name { font-family: var(--font-headline); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.theme-catalog-card-desc { font-size: 0.6875rem; color: var(--muted); line-height: 1.4; margin-bottom: auto; }
.theme-catalog-card-meta { font-size: 0.5625rem; color: var(--muted); opacity: 0.6; margin-top: 0.375rem; }
.theme-catalog-install-btn { align-self: flex-start; margin-top: 0.375rem; padding: 0.3rem 0.75rem; font-size: 0.625rem; font-family: var(--font); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent); color: #fff; border: none; border-radius: 3px; cursor: pointer; transition: opacity 0.15s; flex-shrink: 0; }
.theme-catalog-install-btn:hover { opacity: 0.85; }
.theme-catalog-install-btn.installed { background: var(--surface); border: 1px solid var(--border-ghost); color: var(--muted); cursor: default; }
.theme-catalog-browse-btn { display: flex; align-items: center; justify-content: center; gap: 0.375rem; padding: 0.5rem; font-family: var(--font-headline); font-size: 0.625rem; color: var(--muted); cursor: pointer; border: 1px dashed var(--border-ghost); background: none; width: 100%; text-align: center; border-radius: var(--radius); transition: color 0.15s, border-color 0.15s; margin-top: 0.25rem; }
.theme-catalog-browse-btn:hover { color: var(--accent); border-color: var(--accent); }
/* ── Deep Theme Decoration Hooks ─────────────────────── */
.card { border-image: var(--theme-card-border, none); }
hr, .section-divider { background-image: var(--theme-separator, none); height: var(--theme-separator-height, 1px); border: none; }
body { background-image: var(--theme-body-texture, none); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--theme-scrollbar, var(--accent-dim, rgba(193,128,255,0.2))); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* ── Flow Diagram ─────────────────────────────────────── */
.flow-diagram { display: flex; flex-direction: column; gap: 0; padding: 1rem 0; }
.flow-node { position: relative; margin-left: 2rem; padding: 0.75rem 1rem; background: var(--surface-2); border: 1px solid var(--border-ghost); border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s; }
.flow-node:hover { border-color: var(--accent); }
.flow-node::before { content: ''; position: absolute; left: -1.25rem; top: 0; bottom: -1px; width: 2px; background: var(--border-ghost); }
.flow-node:first-child::before { top: 50%; }
.flow-node:last-child::before { bottom: 50%; }
.flow-node::after { content: ''; position: absolute; left: -1.25rem; top: 50%; width: 0.75rem; height: 2px; background: var(--border-ghost); }
.flow-node-header { display: flex; align-items: center; gap: 0.5rem; }
.flow-node-label { font-weight: 600; font-size: 0.8125rem; }
.flow-node-badge { font-size: 0.625rem; padding: 0.1rem 0.4rem; border-radius: 999px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.flow-node-badge.pass { background: var(--success); color: #000; }
.flow-node-badge.skip { background: var(--muted); color: var(--bg); }
.flow-node-badge.retry { background: var(--warning, #f59e0b); color: #000; }
.flow-node-badge.block, .flow-node-badge.fallback { background: var(--error); color: #fff; }
.flow-node-badge.executed { background: var(--accent); color: #000; }
.flow-node-badge.error { background: var(--error); color: #fff; }
.flow-node-duration { font-size: 0.6875rem; color: var(--muted); margin-left: auto; font-family: var(--font-mono); }
.flow-node-detail { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-ghost); font-size: 0.75rem; display: none; }
.flow-node.expanded .flow-node-detail { display: block; }
.flow-node-detail pre { background: var(--bg); padding: 0.5rem; border-radius: 4px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; white-space: pre-wrap; max-height: 300px; overflow-y: auto; }
.flow-rejected { color: var(--error); }
.flow-replacement { color: var(--success); }