claude-code-cost 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,809 @@
1
+ /* #region VARIABLES */
2
+
3
+ :root {
4
+ --bg-deep: #101114;
5
+ --bg-surface: #16181c;
6
+ --bg-elevated: #1e2025;
7
+ --bg-hover: #282a30;
8
+ --border: #363840;
9
+ --text-primary: #f0f1f3;
10
+ --text-secondary: #c2c4c9;
11
+ --text-tertiary: #9a9da5;
12
+ --text-muted: #7d808a;
13
+ --accent: #e86f33;
14
+ --accent-text: #f0a070;
15
+ --accent-dim: rgba(232, 111, 51, 0.22);
16
+ --accent-glow: rgba(232, 111, 51, 0.55);
17
+ --success: #3ecf8e;
18
+ --success-dim: rgba(62, 207, 142, 0.18);
19
+ --warning: #f0b429;
20
+ --warning-dim: rgba(240, 180, 41, 0.18);
21
+ --error: #ef4444;
22
+ --error-dim: rgba(239, 68, 68, 0.18);
23
+ --mono: 'IBM Plex Mono', monospace;
24
+ --serif: 'Playfair Display', serif;
25
+ --chart-1: #d4723a;
26
+ --chart-2: #5b9bd5;
27
+ --chart-3: #4dab82;
28
+ --chart-4: #d4a03a;
29
+ --chart-5: #a87edb;
30
+ --chart-6: #d4697a;
31
+ }
32
+
33
+ /* #endregion */
34
+
35
+ /* #region RESET */
36
+
37
+ * {
38
+ box-sizing: border-box;
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+
43
+ body {
44
+ font-family: var(--mono);
45
+ font-size: 13px;
46
+ background: var(--bg-deep);
47
+ color: var(--text-primary);
48
+ line-height: 1.5;
49
+ height: calc(100vh / 1.2);
50
+ display: flex;
51
+ zoom: 1.2;
52
+ flex-direction: column;
53
+ overflow: hidden;
54
+ -webkit-font-smoothing: antialiased;
55
+ }
56
+
57
+ /* #endregion */
58
+
59
+ /* #region SCROLLBAR */
60
+
61
+ ::-webkit-scrollbar {
62
+ width: 6px;
63
+ height: 6px;
64
+ }
65
+ ::-webkit-scrollbar-track {
66
+ background: transparent;
67
+ }
68
+ ::-webkit-scrollbar-thumb {
69
+ background: var(--border);
70
+ border-radius: 3px;
71
+ }
72
+ ::-webkit-scrollbar-thumb:hover {
73
+ background: var(--text-muted);
74
+ }
75
+
76
+ /* #endregion */
77
+
78
+ /* #region TOPBAR */
79
+
80
+ .topbar {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 12px;
84
+ padding: 10px 16px;
85
+ background: var(--bg-surface);
86
+ border-bottom: 1px solid var(--border);
87
+ flex-shrink: 0;
88
+ z-index: 10;
89
+ }
90
+
91
+ .topbar-logo {
92
+ display: flex;
93
+ align-items: center;
94
+ gap: 10px;
95
+ }
96
+
97
+ .topbar-logo .logo-mark {
98
+ width: 24px;
99
+ height: 24px;
100
+ background: var(--accent);
101
+ border-radius: 6px;
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ }
106
+
107
+ .topbar-logo .logo-mark svg {
108
+ width: 14px;
109
+ height: 14px;
110
+ color: white;
111
+ }
112
+
113
+ .topbar-logo .logo-text {
114
+ font-family: var(--serif);
115
+ font-size: 17px;
116
+ font-weight: 500;
117
+ letter-spacing: -0.02em;
118
+ }
119
+
120
+ .spacer {
121
+ flex: 1;
122
+ }
123
+
124
+ .topbar-nav {
125
+ display: flex;
126
+ gap: 2px;
127
+ background: var(--bg-elevated);
128
+ border: 1px solid var(--border);
129
+ border-radius: 6px;
130
+ padding: 2px;
131
+ }
132
+
133
+ .topbar-nav-btn {
134
+ padding: 4px 12px;
135
+ border-radius: 4px;
136
+ font-size: 11px;
137
+ font-weight: 500;
138
+ cursor: pointer;
139
+ border: none;
140
+ background: transparent;
141
+ color: var(--text-tertiary);
142
+ font-family: var(--mono);
143
+ transition: all 0.15s ease;
144
+ text-transform: uppercase;
145
+ letter-spacing: 0.03em;
146
+ }
147
+
148
+ .topbar-nav-btn:hover {
149
+ color: var(--text-secondary);
150
+ }
151
+
152
+ .topbar-nav-btn.active {
153
+ background: var(--accent-dim);
154
+ color: var(--accent-text);
155
+ }
156
+
157
+ .topbar-select {
158
+ background: var(--bg-elevated);
159
+ border: 1px solid var(--border);
160
+ border-radius: 6px;
161
+ color: var(--text-secondary);
162
+ font-family: var(--mono);
163
+ font-size: 11px;
164
+ padding: 4px 8px;
165
+ outline: none;
166
+ cursor: pointer;
167
+ }
168
+ .topbar-select:focus {
169
+ border-color: var(--accent);
170
+ }
171
+ .topbar-select option {
172
+ background: var(--bg-surface);
173
+ color: var(--text-primary);
174
+ }
175
+
176
+ .topbar-btn {
177
+ display: flex;
178
+ align-items: center;
179
+ gap: 5px;
180
+ padding: 6px 10px;
181
+ border-radius: 6px;
182
+ font-size: 11px;
183
+ font-weight: 500;
184
+ cursor: pointer;
185
+ border: 1px solid var(--border);
186
+ background: var(--bg-elevated);
187
+ color: var(--text-tertiary);
188
+ font-family: var(--mono);
189
+ transition: all 0.15s ease;
190
+ white-space: nowrap;
191
+ text-transform: uppercase;
192
+ letter-spacing: 0.03em;
193
+ text-decoration: none;
194
+ }
195
+ .topbar-btn:hover {
196
+ border-color: var(--accent);
197
+ color: var(--text-secondary);
198
+ }
199
+ .topbar-btn svg {
200
+ color: var(--text-muted);
201
+ }
202
+ .topbar-btn.loading svg {
203
+ animation: spin 1s linear infinite;
204
+ }
205
+
206
+ @keyframes spin {
207
+ from {
208
+ transform: rotate(0deg);
209
+ }
210
+ to {
211
+ transform: rotate(360deg);
212
+ }
213
+ }
214
+
215
+ /* #endregion */
216
+
217
+ /* #region LAYOUT */
218
+
219
+ .dashboard {
220
+ flex: 1;
221
+ overflow-y: auto;
222
+ overflow-x: hidden;
223
+ padding: 20px 24px;
224
+ }
225
+
226
+ .dashboard-content {
227
+ max-width: 1200px;
228
+ margin: 0 auto;
229
+ }
230
+
231
+ .view {
232
+ display: none;
233
+ }
234
+
235
+ .view.active {
236
+ display: block;
237
+ }
238
+
239
+ /* #endregion */
240
+
241
+ /* #region CARDS */
242
+
243
+ .cards-row {
244
+ display: grid;
245
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
246
+ gap: 12px;
247
+ margin-bottom: 20px;
248
+ }
249
+
250
+ .stat-card {
251
+ background: var(--bg-elevated);
252
+ border: 1px solid var(--border);
253
+ border-radius: 8px;
254
+ padding: 16px;
255
+ transition: border-color 0.15s ease;
256
+ }
257
+
258
+ .stat-card:hover {
259
+ border-color: var(--accent-dim);
260
+ }
261
+
262
+ .stat-card .card-label {
263
+ font-size: 10px;
264
+ text-transform: uppercase;
265
+ letter-spacing: 0.05em;
266
+ color: var(--text-muted);
267
+ margin-bottom: 6px;
268
+ }
269
+
270
+ .stat-card .card-value {
271
+ font-size: 22px;
272
+ font-weight: 600;
273
+ color: var(--text-primary);
274
+ font-family: var(--mono);
275
+ }
276
+
277
+ .stat-card .card-value.cost {
278
+ color: var(--accent-text);
279
+ }
280
+
281
+ .stat-card .card-sub {
282
+ font-size: 10px;
283
+ color: var(--text-muted);
284
+ margin-top: 4px;
285
+ }
286
+
287
+ /* #endregion */
288
+
289
+ /* #region CHARTS */
290
+
291
+ .charts-row {
292
+ display: grid;
293
+ grid-template-columns: 3fr 2fr;
294
+ gap: 16px;
295
+ margin-bottom: 20px;
296
+ }
297
+
298
+ .chart-box {
299
+ background: var(--bg-elevated);
300
+ border: 1px solid var(--border);
301
+ border-radius: 8px;
302
+ padding: 16px;
303
+ overflow: hidden;
304
+ min-width: 0;
305
+ }
306
+
307
+ .chart-box .chart-title {
308
+ font-size: 11px;
309
+ text-transform: uppercase;
310
+ letter-spacing: 0.05em;
311
+ color: var(--text-muted);
312
+ margin-bottom: 12px;
313
+ }
314
+
315
+ .chart-box canvas {
316
+ max-width: 100%;
317
+ max-height: 150px;
318
+ }
319
+
320
+ .cache-stats {
321
+ display: flex;
322
+ gap: 16px;
323
+ margin-top: 12px;
324
+ }
325
+
326
+ .cache-stat {
327
+ display: flex;
328
+ flex-direction: column;
329
+ gap: 2px;
330
+ }
331
+
332
+ .cache-stat .cache-label {
333
+ font-size: 10px;
334
+ color: var(--text-muted);
335
+ text-transform: uppercase;
336
+ letter-spacing: 0.03em;
337
+ }
338
+
339
+ .cache-stat .cache-value {
340
+ font-size: 14px;
341
+ font-weight: 500;
342
+ color: var(--text-secondary);
343
+ }
344
+
345
+ /* #endregion */
346
+
347
+ /* #region TABLE */
348
+
349
+ .section-title {
350
+ font-size: 11px;
351
+ text-transform: uppercase;
352
+ letter-spacing: 0.05em;
353
+ color: var(--text-muted);
354
+ margin-bottom: 12px;
355
+ }
356
+
357
+ .data-table {
358
+ width: 100%;
359
+ border-collapse: collapse;
360
+ font-size: 12px;
361
+ }
362
+
363
+ .data-table th {
364
+ text-align: left;
365
+ padding: 8px 12px;
366
+ font-size: 10px;
367
+ text-transform: uppercase;
368
+ letter-spacing: 0.05em;
369
+ color: var(--text-muted);
370
+ border-bottom: 1px solid var(--border);
371
+ cursor: pointer;
372
+ user-select: none;
373
+ white-space: nowrap;
374
+ }
375
+
376
+ .data-table th:hover {
377
+ color: var(--accent-text);
378
+ }
379
+
380
+ .data-table th.sorted {
381
+ color: var(--accent-text);
382
+ }
383
+
384
+ .data-table th .sort-arrow {
385
+ margin-left: 4px;
386
+ font-size: 9px;
387
+ }
388
+
389
+ .data-table td {
390
+ padding: 10px 12px;
391
+ border-bottom: 1px solid var(--border);
392
+ color: var(--text-secondary);
393
+ vertical-align: middle;
394
+ }
395
+
396
+ .data-table tr {
397
+ transition: background 0.1s ease;
398
+ }
399
+
400
+ .data-table tbody tr:hover {
401
+ background: var(--bg-hover);
402
+ cursor: pointer;
403
+ }
404
+
405
+ .data-table tbody tr.kb-selected {
406
+ background: var(--accent-dim);
407
+ outline: 1px solid var(--accent);
408
+ outline-offset: -1px;
409
+ }
410
+
411
+ .data-table .cost-cell {
412
+ color: var(--accent-text);
413
+ font-weight: 500;
414
+ }
415
+
416
+ .data-table .muted {
417
+ color: var(--text-muted);
418
+ }
419
+
420
+ .data-table .truncate {
421
+ max-width: 300px;
422
+ overflow: hidden;
423
+ text-overflow: ellipsis;
424
+ white-space: nowrap;
425
+ }
426
+
427
+ .model-badge {
428
+ display: inline-block;
429
+ padding: 2px 6px;
430
+ border-radius: 4px;
431
+ font-size: 10px;
432
+ background: var(--bg-hover);
433
+ color: var(--text-tertiary);
434
+ border: 1px solid var(--border);
435
+ }
436
+
437
+ /* #endregion */
438
+
439
+ /* #region BREADCRUMB */
440
+
441
+ .breadcrumb {
442
+ display: flex;
443
+ align-items: center;
444
+ gap: 8px;
445
+ margin-bottom: 16px;
446
+ font-size: 12px;
447
+ }
448
+
449
+ .breadcrumb a {
450
+ color: var(--accent-text);
451
+ text-decoration: none;
452
+ cursor: pointer;
453
+ }
454
+
455
+ .breadcrumb a:hover {
456
+ text-decoration: underline;
457
+ }
458
+
459
+ .breadcrumb .sep {
460
+ color: var(--text-muted);
461
+ }
462
+
463
+ .breadcrumb .current {
464
+ color: var(--text-secondary);
465
+ }
466
+
467
+ /* #endregion */
468
+
469
+ /* #region DETAIL */
470
+
471
+ .detail-header {
472
+ display: flex;
473
+ gap: 16px;
474
+ margin-bottom: 20px;
475
+ flex-wrap: wrap;
476
+ }
477
+
478
+ .detail-stat {
479
+ display: flex;
480
+ flex-direction: column;
481
+ gap: 2px;
482
+ }
483
+
484
+ .detail-stat .detail-label {
485
+ font-size: 10px;
486
+ color: var(--text-muted);
487
+ text-transform: uppercase;
488
+ letter-spacing: 0.03em;
489
+ }
490
+
491
+ .detail-stat .detail-value {
492
+ font-size: 16px;
493
+ font-weight: 500;
494
+ color: var(--text-secondary);
495
+ }
496
+
497
+ .detail-stat .detail-value.cost {
498
+ color: var(--accent-text);
499
+ }
500
+
501
+ .messages-table {
502
+ width: 100%;
503
+ border-collapse: collapse;
504
+ font-size: 11px;
505
+ }
506
+
507
+ .messages-table th {
508
+ text-align: left;
509
+ padding: 6px 10px;
510
+ font-size: 10px;
511
+ text-transform: uppercase;
512
+ letter-spacing: 0.05em;
513
+ color: var(--text-muted);
514
+ border-bottom: 1px solid var(--border);
515
+ white-space: nowrap;
516
+ }
517
+
518
+ .messages-table td {
519
+ padding: 6px 10px;
520
+ border-bottom: 1px solid var(--border);
521
+ color: var(--text-secondary);
522
+ }
523
+
524
+ .messages-table .cost-cell {
525
+ color: var(--accent-text);
526
+ font-weight: 500;
527
+ }
528
+
529
+ .messages-table .cumulative {
530
+ color: var(--text-muted);
531
+ font-size: 10px;
532
+ }
533
+
534
+ /* #endregion */
535
+
536
+ /* #region LOADING */
537
+
538
+ .loading-state {
539
+ display: flex;
540
+ align-items: center;
541
+ justify-content: center;
542
+ gap: 10px;
543
+ height: 200px;
544
+ color: var(--text-muted);
545
+ font-size: 12px;
546
+ }
547
+
548
+ .loading-spinner {
549
+ width: 16px;
550
+ height: 16px;
551
+ border: 2px solid var(--border);
552
+ border-top-color: var(--accent);
553
+ border-radius: 50%;
554
+ animation: spin 0.8s linear infinite;
555
+ }
556
+
557
+ .empty-state {
558
+ display: flex;
559
+ flex-direction: column;
560
+ align-items: center;
561
+ justify-content: center;
562
+ gap: 8px;
563
+ padding: 60px 20px;
564
+ color: var(--text-muted);
565
+ font-size: 12px;
566
+ text-align: center;
567
+ }
568
+
569
+ .empty-state .empty-icon {
570
+ font-size: 32px;
571
+ opacity: 0.5;
572
+ margin-bottom: 8px;
573
+ }
574
+
575
+ /* #endregion */
576
+
577
+ /* #region MODAL */
578
+
579
+ .modal-overlay {
580
+ position: fixed;
581
+ inset: 0;
582
+ background: rgba(0, 0, 0, 0.5);
583
+ display: none;
584
+ align-items: center;
585
+ justify-content: center;
586
+ z-index: 10000;
587
+ }
588
+
589
+ .modal-overlay.visible {
590
+ display: flex;
591
+ }
592
+
593
+ .modal-box {
594
+ background: var(--bg-surface);
595
+ border: 1px solid var(--border);
596
+ border-radius: 12px;
597
+ width: 90%;
598
+ max-width: 500px;
599
+ max-height: 90vh;
600
+ padding: 24px;
601
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
602
+ overflow-y: auto;
603
+ }
604
+
605
+ .modal-header {
606
+ display: flex;
607
+ align-items: center;
608
+ justify-content: space-between;
609
+ margin-bottom: 20px;
610
+ }
611
+
612
+ .modal-title {
613
+ font-size: 18px;
614
+ font-weight: 600;
615
+ color: var(--text-primary);
616
+ }
617
+
618
+ .modal-body {
619
+ color: var(--text-secondary);
620
+ line-height: 1.6;
621
+ }
622
+
623
+ .modal-body p {
624
+ margin: 0 0 12px;
625
+ }
626
+
627
+ .modal-body p:last-child {
628
+ margin-bottom: 0;
629
+ }
630
+
631
+ .modal-body a {
632
+ color: var(--accent-text);
633
+ }
634
+
635
+ .modal-close {
636
+ margin-top: 20px;
637
+ width: 100%;
638
+ padding: 8px;
639
+ background: var(--bg-elevated);
640
+ border: 1px solid var(--border);
641
+ border-radius: 6px;
642
+ color: var(--text-secondary);
643
+ cursor: pointer;
644
+ font-family: var(--mono);
645
+ font-size: 12px;
646
+ text-transform: uppercase;
647
+ }
648
+
649
+ .modal-close:hover {
650
+ background: var(--bg-hover);
651
+ color: var(--text-primary);
652
+ }
653
+
654
+ .modal-section p {
655
+ margin: 0 0 8px 0;
656
+ font-size: 12px;
657
+ color: var(--text-secondary);
658
+ line-height: 1.6;
659
+ }
660
+
661
+ .modal-section p:last-child {
662
+ margin-bottom: 0;
663
+ }
664
+
665
+ .modal-divider {
666
+ border: none;
667
+ border-top: 1px solid var(--border);
668
+ margin: 16px 0;
669
+ }
670
+
671
+ .shortcut-grid {
672
+ display: grid;
673
+ grid-template-columns: 1fr 1fr;
674
+ gap: 20px;
675
+ }
676
+
677
+ .shortcut-section {
678
+ margin: 0 0 8px 0;
679
+ color: var(--text-primary);
680
+ font-size: 13px;
681
+ font-weight: 600;
682
+ }
683
+
684
+ .shortcut-table {
685
+ width: 100%;
686
+ font-size: 12px;
687
+ }
688
+
689
+ .shortcut-table td {
690
+ padding: 3px 0;
691
+ color: var(--text-secondary);
692
+ }
693
+
694
+ .shortcut-table td:first-child {
695
+ width: 120px;
696
+ }
697
+
698
+ .shortcut-table td:last-child {
699
+ color: var(--text-primary);
700
+ }
701
+
702
+ .shortcut-table kbd {
703
+ background: var(--bg-hover);
704
+ padding: 1px 6px;
705
+ border-radius: 4px;
706
+ font-family: var(--mono);
707
+ font-size: 11px;
708
+ border: 1px solid var(--border);
709
+ }
710
+
711
+ /* #endregion */
712
+
713
+ /* #region TOAST */
714
+
715
+ .toast-container {
716
+ position: fixed;
717
+ bottom: 16px;
718
+ right: 16px;
719
+ z-index: 100;
720
+ }
721
+
722
+ .toast {
723
+ background: var(--bg-elevated);
724
+ border: 1px solid var(--border);
725
+ border-radius: 6px;
726
+ padding: 8px 14px;
727
+ font-size: 11px;
728
+ color: var(--text-secondary);
729
+ animation: slideIn 0.2s ease;
730
+ }
731
+
732
+ @keyframes slideIn {
733
+ from {
734
+ opacity: 0;
735
+ transform: translateY(10px);
736
+ }
737
+ to {
738
+ opacity: 1;
739
+ transform: translateY(0);
740
+ }
741
+ }
742
+
743
+ /* #endregion */
744
+
745
+ /* #region LIGHT_THEME */
746
+
747
+ body.light {
748
+ --bg-deep: #e8e6e3;
749
+ --bg-surface: #f4f3f1;
750
+ --bg-elevated: #dddbd8;
751
+ --bg-hover: #d2d0cc;
752
+ --border: #a09b94;
753
+ --text-primary: #0a0a0a;
754
+ --text-secondary: #444444;
755
+ --text-tertiary: #666666;
756
+ --text-muted: #888888;
757
+ --accent-text: #b85a20;
758
+ --accent-dim: rgba(232, 111, 51, 0.18);
759
+ --accent-glow: rgba(232, 111, 51, 0.5);
760
+ --success: #1a8a5a;
761
+ --success-dim: rgba(26, 138, 90, 0.15);
762
+ --warning: #b07d0a;
763
+ --warning-dim: rgba(176, 125, 10, 0.15);
764
+ --error: #c53030;
765
+ --error-dim: rgba(197, 48, 48, 0.15);
766
+ --chart-1: #d4723a;
767
+ --chart-2: #5b9bd5;
768
+ --chart-3: #4dab82;
769
+ --chart-4: #d4a03a;
770
+ --chart-5: #a87edb;
771
+ --chart-6: #d4697a;
772
+ }
773
+
774
+ /* #endregion */
775
+
776
+ /* #region RESPONSIVE */
777
+
778
+ @media (max-width: 900px) {
779
+ .charts-row {
780
+ grid-template-columns: 1fr;
781
+ }
782
+ .cards-row {
783
+ grid-template-columns: repeat(2, 1fr);
784
+ }
785
+ }
786
+
787
+ @media (max-width: 600px) {
788
+ .topbar {
789
+ flex-wrap: wrap;
790
+ gap: 8px;
791
+ padding: 8px 12px;
792
+ }
793
+ .topbar-nav {
794
+ order: 10;
795
+ width: 100%;
796
+ }
797
+ .topbar-nav-btn {
798
+ flex: 1;
799
+ text-align: center;
800
+ }
801
+ .cards-row {
802
+ grid-template-columns: 1fr;
803
+ }
804
+ .dashboard {
805
+ padding: 12px;
806
+ }
807
+ }
808
+
809
+ /* #endregion */