@stwd/react 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.
Files changed (67) hide show
  1. package/README.md +99 -0
  2. package/dist/components/ApprovalQueue.d.ts +6 -0
  3. package/dist/components/ApprovalQueue.d.ts.map +1 -0
  4. package/dist/components/ApprovalQueue.js +44 -0
  5. package/dist/components/ApprovalQueue.js.map +1 -0
  6. package/dist/components/PolicyControls.d.ts +6 -0
  7. package/dist/components/PolicyControls.d.ts.map +1 -0
  8. package/dist/components/PolicyControls.js +224 -0
  9. package/dist/components/PolicyControls.js.map +1 -0
  10. package/dist/components/SpendDashboard.d.ts +6 -0
  11. package/dist/components/SpendDashboard.d.ts.map +1 -0
  12. package/dist/components/SpendDashboard.js +52 -0
  13. package/dist/components/SpendDashboard.js.map +1 -0
  14. package/dist/components/TransactionHistory.d.ts +6 -0
  15. package/dist/components/TransactionHistory.d.ts.map +1 -0
  16. package/dist/components/TransactionHistory.js +34 -0
  17. package/dist/components/TransactionHistory.js.map +1 -0
  18. package/dist/components/WalletOverview.d.ts +6 -0
  19. package/dist/components/WalletOverview.d.ts.map +1 -0
  20. package/dist/components/WalletOverview.js +40 -0
  21. package/dist/components/WalletOverview.js.map +1 -0
  22. package/dist/hooks/useApprovals.d.ts +14 -0
  23. package/dist/hooks/useApprovals.d.ts.map +1 -0
  24. package/dist/hooks/useApprovals.js +75 -0
  25. package/dist/hooks/useApprovals.js.map +1 -0
  26. package/dist/hooks/usePolicies.d.ts +14 -0
  27. package/dist/hooks/usePolicies.d.ts.map +1 -0
  28. package/dist/hooks/usePolicies.js +75 -0
  29. package/dist/hooks/usePolicies.js.map +1 -0
  30. package/dist/hooks/useSpend.d.ts +11 -0
  31. package/dist/hooks/useSpend.d.ts.map +1 -0
  32. package/dist/hooks/useSpend.js +42 -0
  33. package/dist/hooks/useSpend.js.map +1 -0
  34. package/dist/hooks/useSteward.d.ts +6 -0
  35. package/dist/hooks/useSteward.d.ts.map +1 -0
  36. package/dist/hooks/useSteward.js +8 -0
  37. package/dist/hooks/useSteward.js.map +1 -0
  38. package/dist/hooks/useTransactions.d.ts +24 -0
  39. package/dist/hooks/useTransactions.d.ts.map +1 -0
  40. package/dist/hooks/useTransactions.js +78 -0
  41. package/dist/hooks/useTransactions.js.map +1 -0
  42. package/dist/hooks/useWallet.d.ts +16 -0
  43. package/dist/hooks/useWallet.d.ts.map +1 -0
  44. package/dist/hooks/useWallet.js +46 -0
  45. package/dist/hooks/useWallet.js.map +1 -0
  46. package/dist/index.d.ts +16 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +19 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/provider.d.ts +11 -0
  51. package/dist/provider.d.ts.map +1 -0
  52. package/dist/provider.js +81 -0
  53. package/dist/provider.js.map +1 -0
  54. package/dist/styles.css +796 -0
  55. package/dist/types.d.ts +223 -0
  56. package/dist/types.d.ts.map +1 -0
  57. package/dist/types.js +2 -0
  58. package/dist/types.js.map +1 -0
  59. package/dist/utils/format.d.ts +41 -0
  60. package/dist/utils/format.d.ts.map +1 -0
  61. package/dist/utils/format.js +138 -0
  62. package/dist/utils/format.js.map +1 -0
  63. package/dist/utils/theme.d.ts +5 -0
  64. package/dist/utils/theme.d.ts.map +1 -0
  65. package/dist/utils/theme.js +35 -0
  66. package/dist/utils/theme.js.map +1 -0
  67. package/package.json +54 -0
@@ -0,0 +1,796 @@
1
+ /* @stwd/react — Base Stylesheet
2
+ * All styles use CSS custom properties set by <StewardProvider>.
3
+ * Override any --stwd-* variable to customize.
4
+ */
5
+
6
+ /* ─── Root ─── */
7
+ .stwd-root {
8
+ font-family: var(--stwd-font, Inter, system-ui, sans-serif);
9
+ color: var(--stwd-text, #FAFAFA);
10
+ line-height: 1.5;
11
+ }
12
+
13
+ /* ─── Cards ─── */
14
+ .stwd-card {
15
+ background: var(--stwd-surface, #1A1A2E);
16
+ border-radius: var(--stwd-radius, 12px);
17
+ padding: 1.25rem;
18
+ margin-bottom: 1rem;
19
+ }
20
+
21
+ /* ─── Typography ─── */
22
+ .stwd-heading {
23
+ font-size: 1.125rem;
24
+ font-weight: 600;
25
+ margin: 0 0 0.75rem;
26
+ color: var(--stwd-text);
27
+ }
28
+
29
+ .stwd-subheading {
30
+ font-size: 0.9375rem;
31
+ font-weight: 600;
32
+ margin: 1rem 0 0.5rem;
33
+ color: var(--stwd-text);
34
+ }
35
+
36
+ .stwd-muted-text {
37
+ color: var(--stwd-muted, #6B7280);
38
+ font-size: 0.875rem;
39
+ }
40
+
41
+ /* ─── Badges ─── */
42
+ .stwd-badge {
43
+ display: inline-block;
44
+ padding: 0.125rem 0.5rem;
45
+ border-radius: 9999px;
46
+ font-size: 0.75rem;
47
+ font-weight: 500;
48
+ text-transform: capitalize;
49
+ }
50
+
51
+ .stwd-badge-success { color: var(--stwd-success, #10B981); background: rgba(16, 185, 129, 0.1); }
52
+ .stwd-badge-error { color: var(--stwd-error, #EF4444); background: rgba(239, 68, 68, 0.1); }
53
+ .stwd-badge-warning { color: var(--stwd-warning, #F59E0B); background: rgba(245, 158, 11, 0.1); }
54
+ .stwd-badge-muted { color: var(--stwd-muted, #6B7280); background: rgba(107, 114, 128, 0.1); }
55
+
56
+ /* ─── Buttons ─── */
57
+ .stwd-btn {
58
+ display: inline-flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ gap: 0.375rem;
62
+ padding: 0.5rem 1rem;
63
+ border: none;
64
+ border-radius: var(--stwd-radius, 12px);
65
+ font-size: 0.875rem;
66
+ font-weight: 500;
67
+ cursor: pointer;
68
+ transition: opacity 0.15s, background 0.15s;
69
+ font-family: inherit;
70
+ }
71
+ .stwd-btn:disabled {
72
+ opacity: 0.5;
73
+ cursor: not-allowed;
74
+ }
75
+
76
+ .stwd-btn-primary {
77
+ background: var(--stwd-primary, #8B5CF6);
78
+ color: #fff;
79
+ }
80
+ .stwd-btn-primary:hover:not(:disabled) { opacity: 0.9; }
81
+
82
+ .stwd-btn-secondary {
83
+ background: rgba(255, 255, 255, 0.08);
84
+ color: var(--stwd-text);
85
+ border: 1px solid rgba(255, 255, 255, 0.12);
86
+ }
87
+ .stwd-btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
88
+
89
+ .stwd-btn-ghost {
90
+ background: transparent;
91
+ color: var(--stwd-muted);
92
+ padding: 0.25rem 0.5rem;
93
+ }
94
+ .stwd-btn-ghost:hover:not(:disabled) { color: var(--stwd-text); }
95
+
96
+ .stwd-btn-success {
97
+ background: var(--stwd-success, #10B981);
98
+ color: #fff;
99
+ }
100
+
101
+ .stwd-btn-error {
102
+ background: var(--stwd-error, #EF4444);
103
+ color: #fff;
104
+ }
105
+
106
+ .stwd-btn-sm {
107
+ padding: 0.25rem 0.5rem;
108
+ font-size: 0.75rem;
109
+ }
110
+
111
+ /* ─── Inputs ─── */
112
+ .stwd-input,
113
+ .stwd-select {
114
+ width: 100%;
115
+ padding: 0.5rem 0.75rem;
116
+ background: rgba(255, 255, 255, 0.05);
117
+ border: 1px solid rgba(255, 255, 255, 0.12);
118
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
119
+ color: var(--stwd-text);
120
+ font-size: 0.875rem;
121
+ font-family: inherit;
122
+ outline: none;
123
+ transition: border-color 0.15s;
124
+ }
125
+ .stwd-input:focus,
126
+ .stwd-select:focus {
127
+ border-color: var(--stwd-primary, #8B5CF6);
128
+ }
129
+ .stwd-input:disabled,
130
+ .stwd-select:disabled {
131
+ opacity: 0.5;
132
+ }
133
+ .stwd-input-sm {
134
+ width: 5rem;
135
+ }
136
+
137
+ /* ─── Toggle Switch ─── */
138
+ .stwd-toggle {
139
+ position: relative;
140
+ display: inline-block;
141
+ width: 44px;
142
+ height: 24px;
143
+ flex-shrink: 0;
144
+ }
145
+ .stwd-toggle input {
146
+ opacity: 0;
147
+ width: 0;
148
+ height: 0;
149
+ }
150
+ .stwd-toggle-slider {
151
+ position: absolute;
152
+ inset: 0;
153
+ background: rgba(255, 255, 255, 0.12);
154
+ border-radius: 12px;
155
+ cursor: pointer;
156
+ transition: background 0.2s;
157
+ }
158
+ .stwd-toggle-slider::before {
159
+ content: "";
160
+ position: absolute;
161
+ width: 18px;
162
+ height: 18px;
163
+ left: 3px;
164
+ top: 3px;
165
+ background: white;
166
+ border-radius: 50%;
167
+ transition: transform 0.2s;
168
+ }
169
+ .stwd-toggle input:checked + .stwd-toggle-slider {
170
+ background: var(--stwd-primary, #8B5CF6);
171
+ }
172
+ .stwd-toggle input:checked + .stwd-toggle-slider::before {
173
+ transform: translateX(20px);
174
+ }
175
+ .stwd-toggle input:disabled + .stwd-toggle-slider {
176
+ opacity: 0.5;
177
+ cursor: not-allowed;
178
+ }
179
+
180
+ /* ─── Links ─── */
181
+ .stwd-link {
182
+ color: var(--stwd-accent, #A78BFA);
183
+ text-decoration: none;
184
+ font-size: 0.875rem;
185
+ }
186
+ .stwd-link:hover { text-decoration: underline; }
187
+
188
+ /* ─── Loading / Empty / Error ─── */
189
+ .stwd-loading {
190
+ text-align: center;
191
+ padding: 2rem;
192
+ color: var(--stwd-muted);
193
+ }
194
+
195
+ .stwd-empty-state {
196
+ text-align: center;
197
+ padding: 2rem;
198
+ }
199
+ .stwd-empty-icon {
200
+ font-size: 2rem;
201
+ margin-bottom: 0.5rem;
202
+ }
203
+ .stwd-empty-text {
204
+ color: var(--stwd-muted);
205
+ font-size: 0.875rem;
206
+ }
207
+
208
+ .stwd-error-text {
209
+ color: var(--stwd-error, #EF4444);
210
+ font-size: 0.875rem;
211
+ margin-bottom: 0.5rem;
212
+ }
213
+
214
+ /* ─── Wallet Overview ─── */
215
+ .stwd-wallet-header {
216
+ display: flex;
217
+ align-items: center;
218
+ justify-content: space-between;
219
+ margin-bottom: 0.75rem;
220
+ }
221
+
222
+ .stwd-wallet-addresses {
223
+ display: flex;
224
+ flex-direction: column;
225
+ gap: 0.5rem;
226
+ margin-bottom: 1rem;
227
+ }
228
+
229
+ .stwd-address-row {
230
+ display: flex;
231
+ align-items: center;
232
+ gap: 0.5rem;
233
+ }
234
+
235
+ .stwd-chain-badge {
236
+ display: inline-block;
237
+ padding: 0.125rem 0.5rem;
238
+ border-radius: 4px;
239
+ font-size: 0.6875rem;
240
+ font-weight: 700;
241
+ letter-spacing: 0.05em;
242
+ background: rgba(255, 255, 255, 0.08);
243
+ color: var(--stwd-accent);
244
+ }
245
+
246
+ .stwd-address {
247
+ font-family: "SF Mono", "Fira Code", monospace;
248
+ font-size: 0.8125rem;
249
+ color: var(--stwd-text);
250
+ }
251
+
252
+ .stwd-address-full {
253
+ font-family: "SF Mono", "Fira Code", monospace;
254
+ font-size: 0.75rem;
255
+ word-break: break-all;
256
+ color: var(--stwd-text);
257
+ }
258
+
259
+ .stwd-wallet-balance {
260
+ padding: 0.75rem;
261
+ background: rgba(255, 255, 255, 0.03);
262
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
263
+ margin-bottom: 1rem;
264
+ }
265
+
266
+ .stwd-balance-label {
267
+ font-size: 0.75rem;
268
+ color: var(--stwd-muted);
269
+ text-transform: uppercase;
270
+ letter-spacing: 0.05em;
271
+ margin-bottom: 0.25rem;
272
+ }
273
+
274
+ .stwd-balance-value {
275
+ font-size: 1.5rem;
276
+ font-weight: 700;
277
+ }
278
+
279
+ .stwd-balance-chain {
280
+ font-size: 0.75rem;
281
+ color: var(--stwd-muted);
282
+ margin-top: 0.25rem;
283
+ }
284
+
285
+ .stwd-wallet-qr {
286
+ margin-top: 1rem;
287
+ }
288
+
289
+ .stwd-qr-placeholder {
290
+ padding: 1rem;
291
+ border: 1px dashed rgba(255, 255, 255, 0.15);
292
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
293
+ text-align: center;
294
+ }
295
+
296
+ .stwd-qr-label {
297
+ font-weight: 600;
298
+ margin-bottom: 0.5rem;
299
+ }
300
+
301
+ /* ─── Transaction History ─── */
302
+ .stwd-tx-list {
303
+ display: flex;
304
+ flex-direction: column;
305
+ gap: 0.5rem;
306
+ }
307
+
308
+ .stwd-tx-row {
309
+ display: flex;
310
+ flex-wrap: wrap;
311
+ align-items: center;
312
+ justify-content: space-between;
313
+ gap: 0.5rem;
314
+ padding: 0.625rem 0;
315
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
316
+ }
317
+ .stwd-tx-row:last-child { border-bottom: none; }
318
+
319
+ .stwd-tx-clickable {
320
+ cursor: pointer;
321
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
322
+ padding: 0.625rem;
323
+ }
324
+ .stwd-tx-clickable:hover { background: rgba(255, 255, 255, 0.03); }
325
+
326
+ .stwd-tx-main {
327
+ display: flex;
328
+ align-items: center;
329
+ gap: 0.75rem;
330
+ flex: 1;
331
+ min-width: 0;
332
+ }
333
+
334
+ .stwd-tx-meta {
335
+ display: flex;
336
+ align-items: center;
337
+ gap: 0.5rem;
338
+ flex-shrink: 0;
339
+ }
340
+
341
+ .stwd-tx-time {
342
+ font-size: 0.75rem;
343
+ color: var(--stwd-muted);
344
+ }
345
+
346
+ .stwd-tx-policies {
347
+ display: flex;
348
+ flex-wrap: wrap;
349
+ gap: 0.25rem;
350
+ width: 100%;
351
+ margin-top: 0.25rem;
352
+ }
353
+
354
+ .stwd-pagination {
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: center;
358
+ gap: 1rem;
359
+ margin-top: 1rem;
360
+ padding-top: 0.75rem;
361
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
362
+ }
363
+
364
+ .stwd-page-info {
365
+ font-size: 0.875rem;
366
+ color: var(--stwd-muted);
367
+ }
368
+
369
+ /* ─── Policy Controls ─── */
370
+ .stwd-policy-header {
371
+ display: flex;
372
+ align-items: center;
373
+ justify-content: space-between;
374
+ margin-bottom: 0.75rem;
375
+ }
376
+
377
+ .stwd-policy-list {
378
+ display: flex;
379
+ flex-direction: column;
380
+ gap: 0.75rem;
381
+ }
382
+
383
+ .stwd-policy-item {
384
+ padding: 0.75rem;
385
+ background: rgba(255, 255, 255, 0.02);
386
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
387
+ border: 1px solid rgba(255, 255, 255, 0.06);
388
+ }
389
+
390
+ .stwd-policy-item.stwd-enforced {
391
+ opacity: 0.7;
392
+ }
393
+
394
+ .stwd-policy-item-header {
395
+ display: flex;
396
+ align-items: flex-start;
397
+ justify-content: space-between;
398
+ gap: 1rem;
399
+ }
400
+
401
+ .stwd-policy-info {
402
+ flex: 1;
403
+ }
404
+
405
+ .stwd-policy-name {
406
+ font-weight: 600;
407
+ font-size: 0.9375rem;
408
+ display: flex;
409
+ align-items: center;
410
+ gap: 0.375rem;
411
+ }
412
+
413
+ .stwd-lock-icon {
414
+ font-size: 0.875rem;
415
+ }
416
+
417
+ .stwd-policy-desc {
418
+ font-size: 0.8125rem;
419
+ color: var(--stwd-muted);
420
+ margin-top: 0.25rem;
421
+ }
422
+
423
+ .stwd-policy-config {
424
+ margin-top: 0.75rem;
425
+ padding-top: 0.75rem;
426
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
427
+ }
428
+
429
+ .stwd-enforced-label {
430
+ font-size: 0.75rem;
431
+ color: var(--stwd-muted);
432
+ margin-top: 0.5rem;
433
+ font-style: italic;
434
+ }
435
+
436
+ .stwd-config-grid {
437
+ display: grid;
438
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
439
+ gap: 0.75rem;
440
+ }
441
+
442
+ .stwd-config-stack {
443
+ display: flex;
444
+ flex-direction: column;
445
+ gap: 0.75rem;
446
+ }
447
+
448
+ .stwd-config-field {
449
+ display: flex;
450
+ flex-direction: column;
451
+ gap: 0.375rem;
452
+ }
453
+ .stwd-config-field label {
454
+ font-size: 0.8125rem;
455
+ font-weight: 500;
456
+ color: var(--stwd-muted);
457
+ }
458
+
459
+ .stwd-policy-actions {
460
+ display: flex;
461
+ align-items: center;
462
+ justify-content: flex-end;
463
+ gap: 0.5rem;
464
+ margin-top: 1rem;
465
+ padding-top: 0.75rem;
466
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
467
+ }
468
+
469
+ /* Address List */
470
+ .stwd-address-list {
471
+ display: flex;
472
+ flex-direction: column;
473
+ gap: 0.375rem;
474
+ }
475
+
476
+ .stwd-address-item {
477
+ display: flex;
478
+ align-items: center;
479
+ justify-content: space-between;
480
+ padding: 0.375rem 0.5rem;
481
+ background: rgba(255, 255, 255, 0.03);
482
+ border-radius: 4px;
483
+ }
484
+
485
+ .stwd-address-add {
486
+ display: flex;
487
+ gap: 0.5rem;
488
+ }
489
+ .stwd-address-add .stwd-input {
490
+ flex: 1;
491
+ }
492
+
493
+ /* Time Window */
494
+ .stwd-time-range {
495
+ display: flex;
496
+ align-items: center;
497
+ gap: 0.5rem;
498
+ }
499
+
500
+ .stwd-day-picker {
501
+ display: flex;
502
+ gap: 0.25rem;
503
+ }
504
+
505
+ .stwd-day-btn {
506
+ padding: 0.375rem 0.625rem;
507
+ border: 1px solid rgba(255, 255, 255, 0.12);
508
+ border-radius: 4px;
509
+ background: transparent;
510
+ color: var(--stwd-muted);
511
+ font-size: 0.75rem;
512
+ cursor: pointer;
513
+ font-family: inherit;
514
+ }
515
+ .stwd-day-btn.stwd-day-active {
516
+ background: var(--stwd-primary, #8B5CF6);
517
+ color: #fff;
518
+ border-color: var(--stwd-primary);
519
+ }
520
+ .stwd-day-btn:disabled {
521
+ opacity: 0.5;
522
+ cursor: not-allowed;
523
+ }
524
+
525
+ /* Chain Checklist */
526
+ .stwd-chain-checklist {
527
+ display: flex;
528
+ flex-direction: column;
529
+ gap: 0.5rem;
530
+ }
531
+
532
+ .stwd-chain-option {
533
+ display: flex;
534
+ align-items: center;
535
+ gap: 0.5rem;
536
+ cursor: pointer;
537
+ }
538
+ .stwd-chain-option input { cursor: pointer; }
539
+
540
+ .stwd-chain-name {
541
+ font-size: 0.875rem;
542
+ font-weight: 500;
543
+ }
544
+
545
+ .stwd-chain-symbol {
546
+ font-size: 0.75rem;
547
+ color: var(--stwd-muted);
548
+ }
549
+
550
+ /* ─── Approval Queue ─── */
551
+ .stwd-approval-header {
552
+ display: flex;
553
+ align-items: center;
554
+ gap: 0.5rem;
555
+ margin-bottom: 0.75rem;
556
+ }
557
+
558
+ .stwd-approval-list {
559
+ display: flex;
560
+ flex-direction: column;
561
+ gap: 0.75rem;
562
+ }
563
+
564
+ .stwd-approval-item {
565
+ padding: 0.75rem;
566
+ background: rgba(255, 255, 255, 0.02);
567
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
568
+ border: 1px solid rgba(255, 255, 255, 0.06);
569
+ }
570
+
571
+ .stwd-approval-main {
572
+ margin-bottom: 0.5rem;
573
+ }
574
+
575
+ .stwd-approval-to code {
576
+ font-size: 0.8125rem;
577
+ }
578
+
579
+ .stwd-approval-value {
580
+ font-size: 1.125rem;
581
+ font-weight: 700;
582
+ margin: 0.25rem 0;
583
+ }
584
+
585
+ .stwd-approval-meta {
586
+ display: flex;
587
+ align-items: center;
588
+ gap: 0.5rem;
589
+ }
590
+
591
+ .stwd-approval-time {
592
+ font-size: 0.75rem;
593
+ color: var(--stwd-muted);
594
+ }
595
+
596
+ .stwd-approval-reasons {
597
+ margin: 0.5rem 0;
598
+ }
599
+
600
+ .stwd-approval-reasons-label {
601
+ font-size: 0.75rem;
602
+ color: var(--stwd-muted);
603
+ margin-bottom: 0.25rem;
604
+ }
605
+
606
+ .stwd-approval-actions {
607
+ display: flex;
608
+ justify-content: flex-end;
609
+ gap: 0.5rem;
610
+ margin-top: 0.75rem;
611
+ }
612
+
613
+ /* ─── Spend Dashboard ─── */
614
+ .stwd-spend-header {
615
+ display: flex;
616
+ align-items: center;
617
+ justify-content: space-between;
618
+ margin-bottom: 1rem;
619
+ }
620
+
621
+ .stwd-spend-stats-grid {
622
+ display: grid;
623
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
624
+ gap: 0.75rem;
625
+ margin-bottom: 1rem;
626
+ }
627
+
628
+ .stwd-stat-card {
629
+ padding: 0.75rem;
630
+ background: rgba(255, 255, 255, 0.03);
631
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
632
+ }
633
+
634
+ .stwd-stat-label {
635
+ font-size: 0.75rem;
636
+ color: var(--stwd-muted);
637
+ text-transform: uppercase;
638
+ letter-spacing: 0.05em;
639
+ margin-bottom: 0.25rem;
640
+ }
641
+
642
+ .stwd-stat-value {
643
+ font-size: 1.25rem;
644
+ font-weight: 700;
645
+ }
646
+
647
+ /* Budget Bars */
648
+ .stwd-budget-section {
649
+ margin-bottom: 1rem;
650
+ }
651
+
652
+ .stwd-budget-bar-group {
653
+ margin-bottom: 0.75rem;
654
+ }
655
+
656
+ .stwd-budget-bar-label {
657
+ display: flex;
658
+ justify-content: space-between;
659
+ font-size: 0.8125rem;
660
+ margin-bottom: 0.25rem;
661
+ }
662
+
663
+ .stwd-budget-bar-track {
664
+ height: 8px;
665
+ background: rgba(255, 255, 255, 0.06);
666
+ border-radius: 4px;
667
+ overflow: hidden;
668
+ }
669
+
670
+ .stwd-budget-bar-fill {
671
+ height: 100%;
672
+ border-radius: 4px;
673
+ transition: width 0.3s ease;
674
+ }
675
+
676
+ .stwd-budget-bar-detail {
677
+ font-size: 0.6875rem;
678
+ color: var(--stwd-muted);
679
+ margin-top: 0.125rem;
680
+ }
681
+
682
+ /* Bar Chart */
683
+ .stwd-chart-section {
684
+ margin-bottom: 1rem;
685
+ }
686
+
687
+ .stwd-bar-chart {
688
+ display: flex;
689
+ align-items: flex-end;
690
+ gap: 2px;
691
+ height: 120px;
692
+ padding-bottom: 1.25rem;
693
+ }
694
+
695
+ .stwd-bar-col {
696
+ flex: 1;
697
+ display: flex;
698
+ flex-direction: column;
699
+ align-items: center;
700
+ justify-content: flex-end;
701
+ height: 100%;
702
+ position: relative;
703
+ }
704
+
705
+ .stwd-bar {
706
+ width: 100%;
707
+ max-width: 24px;
708
+ background: var(--stwd-primary, #8B5CF6);
709
+ border-radius: 2px 2px 0 0;
710
+ transition: height 0.3s ease;
711
+ }
712
+
713
+ .stwd-bar-col .stwd-bar-label {
714
+ position: absolute;
715
+ bottom: -1.25rem;
716
+ font-size: 0.5625rem;
717
+ color: var(--stwd-muted);
718
+ white-space: nowrap;
719
+ }
720
+
721
+ /* Top Destinations */
722
+ .stwd-destinations-section {
723
+ margin-bottom: 0.5rem;
724
+ }
725
+
726
+ .stwd-destination-list {
727
+ display: flex;
728
+ flex-direction: column;
729
+ gap: 0.5rem;
730
+ }
731
+
732
+ .stwd-destination-row {
733
+ display: flex;
734
+ align-items: center;
735
+ gap: 0.75rem;
736
+ }
737
+
738
+ .stwd-destination-amount {
739
+ font-size: 0.875rem;
740
+ font-weight: 500;
741
+ margin-left: auto;
742
+ }
743
+
744
+ /* ─── Modal ─── */
745
+ .stwd-modal-overlay {
746
+ position: fixed;
747
+ inset: 0;
748
+ background: rgba(0, 0, 0, 0.6);
749
+ display: flex;
750
+ align-items: center;
751
+ justify-content: center;
752
+ z-index: 9999;
753
+ }
754
+
755
+ .stwd-modal {
756
+ background: var(--stwd-surface, #1A1A2E);
757
+ border-radius: var(--stwd-radius, 12px);
758
+ padding: 1.5rem;
759
+ max-width: 480px;
760
+ width: calc(100% - 2rem);
761
+ max-height: 80vh;
762
+ overflow-y: auto;
763
+ }
764
+
765
+ .stwd-modal-actions {
766
+ display: flex;
767
+ justify-content: flex-end;
768
+ gap: 0.5rem;
769
+ margin-top: 1rem;
770
+ }
771
+
772
+ /* Template Cards */
773
+ .stwd-template-list {
774
+ display: flex;
775
+ flex-direction: column;
776
+ gap: 0.75rem;
777
+ margin-bottom: 1rem;
778
+ }
779
+
780
+ .stwd-template-card {
781
+ padding: 0.75rem;
782
+ background: rgba(255, 255, 255, 0.03);
783
+ border-radius: calc(var(--stwd-radius, 12px) / 2);
784
+ border: 1px solid rgba(255, 255, 255, 0.06);
785
+ }
786
+
787
+ .stwd-template-name {
788
+ font-weight: 600;
789
+ margin-bottom: 0.25rem;
790
+ }
791
+
792
+ .stwd-template-desc {
793
+ font-size: 0.8125rem;
794
+ color: var(--stwd-muted);
795
+ margin-bottom: 0.5rem;
796
+ }