@authrim/setup 0.1.63 → 0.1.64

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 (60) hide show
  1. package/dist/__tests__/migrate.test.d.ts +5 -0
  2. package/dist/__tests__/migrate.test.d.ts.map +1 -0
  3. package/dist/__tests__/migrate.test.js +273 -0
  4. package/dist/__tests__/migrate.test.js.map +1 -0
  5. package/dist/__tests__/paths.test.d.ts +2 -0
  6. package/dist/__tests__/paths.test.d.ts.map +1 -0
  7. package/dist/__tests__/paths.test.js +257 -0
  8. package/dist/__tests__/paths.test.js.map +1 -0
  9. package/dist/cli/commands/config.d.ts +1 -0
  10. package/dist/cli/commands/config.d.ts.map +1 -1
  11. package/dist/cli/commands/config.js +41 -7
  12. package/dist/cli/commands/config.js.map +1 -1
  13. package/dist/cli/commands/deploy.d.ts +1 -0
  14. package/dist/cli/commands/deploy.d.ts.map +1 -1
  15. package/dist/cli/commands/deploy.js +181 -19
  16. package/dist/cli/commands/deploy.js.map +1 -1
  17. package/dist/cli/commands/init.d.ts.map +1 -1
  18. package/dist/cli/commands/init.js +267 -82
  19. package/dist/cli/commands/init.js.map +1 -1
  20. package/dist/cli/commands/migrate.d.ts +21 -0
  21. package/dist/cli/commands/migrate.d.ts.map +1 -0
  22. package/dist/cli/commands/migrate.js +166 -0
  23. package/dist/cli/commands/migrate.js.map +1 -0
  24. package/dist/core/admin.d.ts +18 -1
  25. package/dist/core/admin.d.ts.map +1 -1
  26. package/dist/core/admin.js +36 -7
  27. package/dist/core/admin.js.map +1 -1
  28. package/dist/core/config.d.ts +10 -2
  29. package/dist/core/config.d.ts.map +1 -1
  30. package/dist/core/config.js +6 -2
  31. package/dist/core/config.js.map +1 -1
  32. package/dist/core/keys.d.ts +55 -4
  33. package/dist/core/keys.d.ts.map +1 -1
  34. package/dist/core/keys.js +104 -12
  35. package/dist/core/keys.js.map +1 -1
  36. package/dist/core/lock.d.ts +60 -3
  37. package/dist/core/lock.d.ts.map +1 -1
  38. package/dist/core/lock.js +108 -4
  39. package/dist/core/lock.js.map +1 -1
  40. package/dist/core/migrate.d.ts +95 -0
  41. package/dist/core/migrate.d.ts.map +1 -0
  42. package/dist/core/migrate.js +549 -0
  43. package/dist/core/migrate.js.map +1 -0
  44. package/dist/core/paths.d.ts +171 -0
  45. package/dist/core/paths.d.ts.map +1 -0
  46. package/dist/core/paths.js +319 -0
  47. package/dist/core/paths.js.map +1 -0
  48. package/dist/core/wrangler-sync.d.ts +88 -0
  49. package/dist/core/wrangler-sync.d.ts.map +1 -0
  50. package/dist/core/wrangler-sync.js +242 -0
  51. package/dist/core/wrangler-sync.js.map +1 -0
  52. package/dist/index.js +16 -1
  53. package/dist/index.js.map +1 -1
  54. package/dist/web/api.d.ts.map +1 -1
  55. package/dist/web/api.js +102 -28
  56. package/dist/web/api.js.map +1 -1
  57. package/dist/web/ui.d.ts.map +1 -1
  58. package/dist/web/ui.js +831 -273
  59. package/dist/web/ui.js.map +1 -1
  60. package/package.json +1 -1
package/dist/web/ui.js CHANGED
@@ -14,18 +14,74 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
14
14
  <meta charset="UTF-8">
15
15
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
16
  <title>Authrim Setup</title>
17
+ <link rel="preconnect" href="https://fonts.googleapis.com">
18
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
19
+ <link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap" rel="stylesheet">
17
20
  <style>
18
21
  :root {
22
+ /* Typography */
23
+ --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
24
+ --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
25
+ --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
26
+
27
+ /* Light theme colors */
19
28
  --primary: #2563eb;
20
29
  --primary-dark: #1d4ed8;
21
- --success: #10b981;
22
- --error: #ef4444;
23
- --warning: #f59e0b;
24
- --bg: #f8fafc;
25
- --card-bg: #ffffff;
26
- --text: #1e293b;
27
- --text-muted: #64748b;
28
- --border: #e2e8f0;
30
+ --primary-light: #3b82f6;
31
+ --accent: #c2410c;
32
+ --success: #059669;
33
+ --error: #dc2626;
34
+ --warning: #d97706;
35
+ --bg: #f8f5e3;
36
+ --bg-secondary: #f3eed6;
37
+ --card-bg: #fffefa;
38
+ --card-bg-hover: #fdfcf4;
39
+ --text: #1c1917;
40
+ --text-muted: #57534e;
41
+ --text-subtle: #78716c;
42
+ --border: #d6d3d1;
43
+ --border-light: #e7e5e4;
44
+
45
+ /* Splash */
46
+ --splash-bg: #1c1917;
47
+ --splash-text: #f8f5e3;
48
+
49
+ /* Shadows & Effects */
50
+ --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
51
+ --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06);
52
+ --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.08);
53
+ --shadow-card: 0 1px 3px rgba(28, 25, 23, 0.04), 0 4px 12px rgba(28, 25, 23, 0.02);
54
+
55
+ /* Transitions */
56
+ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
57
+ --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
58
+ --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
59
+ }
60
+
61
+ /* Dark theme */
62
+ [data-theme="dark"] {
63
+ --primary: #60a5fa;
64
+ --primary-dark: #3b82f6;
65
+ --primary-light: #93c5fd;
66
+ --accent: #fb923c;
67
+ --success: #34d399;
68
+ --error: #f87171;
69
+ --warning: #fbbf24;
70
+ --bg: #0c0a09;
71
+ --bg-secondary: #1c1917;
72
+ --card-bg: #1c1917;
73
+ --card-bg-hover: #292524;
74
+ --text: #fafaf9;
75
+ --text-muted: #a8a29e;
76
+ --text-subtle: #78716c;
77
+ --border: #44403c;
78
+ --border-light: #292524;
79
+ --splash-bg: #0c0a09;
80
+ --splash-text: #f8f5e3;
81
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
82
+ --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
83
+ --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
84
+ --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
29
85
  }
30
86
 
31
87
  * {
@@ -35,155 +91,409 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
35
91
  }
36
92
 
37
93
  body {
38
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
94
+ font-family: var(--font-sans);
39
95
  background: var(--bg);
40
96
  color: var(--text);
41
97
  line-height: 1.6;
42
98
  min-height: 100vh;
99
+ transition: background-color var(--transition-slow), color var(--transition-slow);
100
+ }
101
+
102
+ /* Subtle grain texture */
103
+ body::before {
104
+ content: '';
105
+ position: fixed;
106
+ top: 0;
107
+ left: 0;
108
+ width: 100%;
109
+ height: 100%;
110
+ pointer-events: none;
111
+ opacity: 0.015;
112
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
113
+ z-index: 9998;
114
+ }
115
+
116
+ [data-theme="dark"] body::before {
117
+ opacity: 0.03;
118
+ }
119
+
120
+ /* ========================================
121
+ SPLASH SCREEN
122
+ ======================================== */
123
+ .splash {
124
+ position: fixed;
125
+ inset: 0;
126
+ z-index: 10000;
127
+ background: var(--splash-bg);
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ opacity: 1;
132
+ visibility: visible;
133
+ transition: opacity 600ms ease, visibility 600ms ease;
43
134
  }
44
135
 
136
+ .splash.fade-out {
137
+ opacity: 0;
138
+ visibility: hidden;
139
+ }
140
+
141
+ .splash-content {
142
+ text-align: center;
143
+ opacity: 0;
144
+ transform: translateY(16px);
145
+ animation: splash-reveal 800ms ease forwards;
146
+ animation-delay: 200ms;
147
+ }
148
+
149
+ .splash-logo {
150
+ display: flex;
151
+ align-items: center;
152
+ justify-content: center;
153
+ gap: 1rem;
154
+ margin-bottom: 1.5rem;
155
+ }
156
+
157
+ .splash-icon {
158
+ width: 56px;
159
+ height: 56px;
160
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
161
+ border-radius: 14px;
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ font-size: 1.75rem;
166
+ box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
167
+ }
168
+
169
+ .splash-title {
170
+ font-family: var(--font-serif);
171
+ font-size: clamp(3rem, 8vw, 4.5rem);
172
+ font-weight: 600;
173
+ color: var(--splash-text);
174
+ letter-spacing: -0.03em;
175
+ line-height: 1;
176
+ }
177
+
178
+ .splash-tagline {
179
+ font-family: var(--font-sans);
180
+ font-size: 0.9rem;
181
+ font-weight: 500;
182
+ color: var(--text-subtle);
183
+ letter-spacing: 0.15em;
184
+ text-transform: uppercase;
185
+ margin-bottom: 3rem;
186
+ }
187
+
188
+ .splash-loader {
189
+ width: 40px;
190
+ height: 40px;
191
+ margin: 0 auto;
192
+ border: 2px solid var(--border);
193
+ border-top-color: var(--primary);
194
+ border-radius: 50%;
195
+ animation: spin 1s linear infinite;
196
+ }
197
+
198
+ @keyframes splash-reveal {
199
+ to {
200
+ opacity: 1;
201
+ transform: translateY(0);
202
+ }
203
+ }
204
+
205
+ /* ========================================
206
+ THEME TOGGLE
207
+ ======================================== */
208
+ .theme-toggle {
209
+ position: fixed;
210
+ top: 1.25rem;
211
+ right: 1.5rem;
212
+ z-index: 100;
213
+ width: 44px;
214
+ height: 44px;
215
+ background: var(--card-bg);
216
+ border: 1px solid var(--border);
217
+ border-radius: 12px;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ cursor: pointer;
222
+ font-size: 1.25rem;
223
+ transition: all var(--transition-fast);
224
+ box-shadow: var(--shadow-sm);
225
+ }
226
+
227
+ .theme-toggle:hover {
228
+ background: var(--card-bg-hover);
229
+ border-color: var(--primary);
230
+ transform: scale(1.05);
231
+ }
232
+
233
+ .theme-toggle:active {
234
+ transform: scale(0.95);
235
+ }
236
+
237
+ /* ========================================
238
+ LAYOUT
239
+ ======================================== */
45
240
  .container {
46
- max-width: 800px;
241
+ max-width: 820px;
47
242
  margin: 0 auto;
48
- padding: 2rem;
243
+ padding: 2.5rem 2rem;
49
244
  }
50
245
 
51
246
  header {
52
247
  text-align: center;
53
- margin-bottom: 2rem;
248
+ margin-bottom: 2.5rem;
249
+ padding-top: 0.5rem;
250
+ }
251
+
252
+ .header-brand {
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ gap: 0.75rem;
257
+ margin-bottom: 0.75rem;
258
+ }
259
+
260
+ .header-icon {
261
+ width: 48px;
262
+ height: 48px;
263
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
264
+ border-radius: 12px;
265
+ display: flex;
266
+ align-items: center;
267
+ justify-content: center;
268
+ font-size: 1.5rem;
269
+ box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
54
270
  }
55
271
 
56
272
  h1 {
57
- font-size: 2rem;
273
+ font-family: var(--font-serif);
274
+ font-size: clamp(2rem, 5vw, 2.75rem);
275
+ font-weight: 600;
276
+ color: var(--text);
277
+ letter-spacing: -0.02em;
278
+ line-height: 1.1;
279
+ }
280
+
281
+ .header-wizard {
282
+ font-family: var(--font-serif);
283
+ font-size: 1.25rem;
284
+ font-weight: 400;
285
+ font-style: italic;
58
286
  color: var(--primary);
59
- margin-bottom: 0.5rem;
287
+ margin-bottom: 0.25rem;
60
288
  }
61
289
 
62
290
  .subtitle {
291
+ font-family: var(--font-sans);
292
+ font-size: 0.9rem;
63
293
  color: var(--text-muted);
294
+ letter-spacing: 0.02em;
64
295
  }
65
296
 
297
+ /* ========================================
298
+ CARDS
299
+ ======================================== */
66
300
  .card {
67
301
  background: var(--card-bg);
68
- border-radius: 12px;
69
- padding: 1.5rem;
70
- margin-bottom: 1.5rem;
71
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
302
+ border-radius: 16px;
303
+ border: 1px solid var(--border-light);
304
+ padding: 2rem;
305
+ margin-bottom: 1.75rem;
306
+ box-shadow: var(--shadow-card);
307
+ transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
308
+ }
309
+
310
+ .card:hover {
311
+ border-color: var(--border);
72
312
  }
73
313
 
74
314
  .card-title {
75
- font-size: 1.25rem;
315
+ font-family: var(--font-sans);
316
+ font-size: 1.35rem;
76
317
  font-weight: 600;
77
- margin-bottom: 1rem;
318
+ margin-bottom: 1.25rem;
78
319
  display: flex;
79
320
  align-items: center;
80
- gap: 0.5rem;
321
+ gap: 0.625rem;
322
+ color: var(--text);
81
323
  }
82
324
 
325
+ /* ========================================
326
+ STATUS BADGES
327
+ ======================================== */
83
328
  .status-badge {
84
- font-size: 0.75rem;
85
- padding: 0.25rem 0.5rem;
86
- border-radius: 9999px;
87
- font-weight: 500;
329
+ font-family: var(--font-sans);
330
+ font-size: 0.7rem;
331
+ font-weight: 600;
332
+ padding: 0.3rem 0.625rem;
333
+ border-radius: 6px;
334
+ letter-spacing: 0.02em;
335
+ text-transform: uppercase;
336
+ }
337
+
338
+ .status-pending {
339
+ background: var(--bg-secondary);
340
+ color: var(--text-muted);
341
+ }
342
+ .status-running {
343
+ background: rgba(37, 99, 235, 0.1);
344
+ color: var(--primary);
345
+ }
346
+ .status-success {
347
+ background: rgba(5, 150, 105, 0.1);
348
+ color: var(--success);
349
+ }
350
+ .status-error {
351
+ background: rgba(220, 38, 38, 0.1);
352
+ color: var(--error);
353
+ }
354
+ .status-warning {
355
+ background: rgba(217, 119, 6, 0.1);
356
+ color: var(--warning);
88
357
  }
89
358
 
90
- .status-pending { background: var(--border); color: var(--text-muted); }
91
- .status-running { background: #dbeafe; color: var(--primary); }
92
- .status-success { background: #d1fae5; color: var(--success); }
93
- .status-error { background: #fee2e2; color: var(--error); }
94
- .status-warning { background: #fef3c7; color: #b45309; }
359
+ [data-theme="dark"] .status-running { background: rgba(96, 165, 250, 0.15); }
360
+ [data-theme="dark"] .status-success { background: rgba(52, 211, 153, 0.15); }
361
+ [data-theme="dark"] .status-error { background: rgba(248, 113, 113, 0.15); }
362
+ [data-theme="dark"] .status-warning { background: rgba(251, 191, 36, 0.15); }
95
363
 
96
- /* Mode selection cards */
364
+ /* ========================================
365
+ MODE SELECTION CARDS
366
+ ======================================== */
97
367
  .mode-cards {
98
368
  display: grid;
99
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
100
- gap: 1rem;
101
- margin-bottom: 1rem;
369
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
370
+ gap: 1.25rem;
371
+ margin-bottom: 1.25rem;
102
372
  }
103
373
 
104
374
  .mode-card {
105
- border: 2px solid var(--border);
106
- border-radius: 12px;
107
- padding: 1.5rem;
375
+ background: var(--card-bg);
376
+ border: 2px solid var(--border-light);
377
+ border-radius: 14px;
378
+ padding: 1.75rem;
108
379
  cursor: pointer;
109
- transition: all 0.2s;
380
+ transition: all var(--transition-base);
110
381
  position: relative;
111
382
  }
112
383
 
113
384
  .mode-card:hover {
114
385
  border-color: var(--primary);
115
- background: #f8fafc;
386
+ background: var(--card-bg-hover);
387
+ transform: translateY(-2px);
388
+ box-shadow: var(--shadow-md);
116
389
  }
117
390
 
118
391
  .mode-card.selected {
119
392
  border-color: var(--primary);
120
- background: #eff6ff;
393
+ background: rgba(37, 99, 235, 0.04);
394
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
395
+ }
396
+
397
+ [data-theme="dark"] .mode-card.selected {
398
+ background: rgba(96, 165, 250, 0.08);
399
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
121
400
  }
122
401
 
123
402
  .mode-card .mode-icon {
124
- font-size: 2rem;
125
- margin-bottom: 0.5rem;
403
+ font-size: 2.25rem;
404
+ margin-bottom: 0.75rem;
405
+ display: block;
126
406
  }
127
407
 
128
408
  .mode-card h3 {
409
+ font-family: var(--font-sans);
129
410
  font-size: 1.1rem;
411
+ font-weight: 600;
130
412
  margin-bottom: 0.5rem;
413
+ color: var(--text);
131
414
  }
132
415
 
133
416
  .mode-card p {
134
- font-size: 0.875rem;
417
+ font-size: 0.9rem;
135
418
  color: var(--text-muted);
136
- margin-bottom: 0.75rem;
419
+ margin-bottom: 0.875rem;
420
+ line-height: 1.5;
137
421
  }
138
422
 
139
423
  .mode-card ul {
140
424
  font-size: 0.8rem;
141
- color: var(--text-muted);
425
+ color: var(--text-subtle);
142
426
  margin-left: 1rem;
427
+ line-height: 1.6;
143
428
  }
144
429
 
145
430
  .mode-card ul li {
146
- margin-bottom: 0.25rem;
431
+ margin-bottom: 0.3rem;
147
432
  }
148
433
 
149
434
  .mode-badge {
150
435
  position: absolute;
151
- top: -8px;
152
- right: 10px;
153
- background: var(--primary);
436
+ top: -10px;
437
+ right: 12px;
438
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
154
439
  color: white;
155
- font-size: 0.7rem;
156
- padding: 0.2rem 0.5rem;
157
- border-radius: 4px;
158
- font-weight: 500;
440
+ font-family: var(--font-sans);
441
+ font-size: 0.65rem;
442
+ font-weight: 600;
443
+ padding: 0.35rem 0.625rem;
444
+ border-radius: 6px;
445
+ letter-spacing: 0.03em;
446
+ text-transform: uppercase;
447
+ box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
159
448
  }
160
449
 
450
+ /* ========================================
451
+ FORMS
452
+ ======================================== */
161
453
  .form-group {
162
- margin-bottom: 1rem;
454
+ margin-bottom: 1.25rem;
163
455
  }
164
456
 
165
457
  label {
166
458
  display: block;
459
+ font-family: var(--font-sans);
167
460
  font-weight: 500;
461
+ font-size: 0.9rem;
168
462
  margin-bottom: 0.5rem;
463
+ color: var(--text);
169
464
  }
170
465
 
171
466
  input[type="text"],
172
467
  input[type="password"],
468
+ input[type="email"],
173
469
  input[type="file"],
174
470
  select {
175
471
  width: 100%;
176
- padding: 0.75rem;
472
+ padding: 0.875rem 1rem;
177
473
  border: 1px solid var(--border);
178
- border-radius: 8px;
179
- font-size: 1rem;
180
- transition: border-color 0.2s;
474
+ border-radius: 10px;
475
+ font-family: var(--font-sans);
476
+ font-size: 0.95rem;
477
+ background: var(--card-bg);
478
+ color: var(--text);
479
+ transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
480
+ }
481
+
482
+ input::placeholder,
483
+ select::placeholder {
484
+ color: var(--text-subtle);
181
485
  }
182
486
 
183
487
  input:focus,
184
488
  select:focus {
185
489
  outline: none;
186
490
  border-color: var(--primary);
491
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
492
+ }
493
+
494
+ [data-theme="dark"] input:focus,
495
+ [data-theme="dark"] select:focus {
496
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
187
497
  }
188
498
 
189
499
  /* Fix browser autofill/autocomplete styling */
@@ -191,9 +501,17 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
191
501
  input:-webkit-autofill:hover,
192
502
  input:-webkit-autofill:focus,
193
503
  input:-webkit-autofill:active {
194
- -webkit-box-shadow: 0 0 0 30px white inset !important;
195
- -webkit-text-fill-color: #1e293b !important;
196
- caret-color: #1e293b !important;
504
+ -webkit-box-shadow: 0 0 0 30px var(--card-bg) inset !important;
505
+ -webkit-text-fill-color: var(--text) !important;
506
+ caret-color: var(--text) !important;
507
+ }
508
+
509
+ small {
510
+ display: block;
511
+ font-size: 0.8rem;
512
+ color: var(--text-muted);
513
+ margin-top: 0.375rem;
514
+ line-height: 1.4;
197
515
  }
198
516
 
199
517
  .checkbox-group {
@@ -206,28 +524,42 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
206
524
  display: flex;
207
525
  align-items: center;
208
526
  gap: 0.5rem;
527
+ cursor: pointer;
209
528
  }
210
529
 
211
- /* Infrastructure info section */
530
+ .checkbox-item input[type="checkbox"] {
531
+ width: 18px;
532
+ height: 18px;
533
+ accent-color: var(--primary);
534
+ cursor: pointer;
535
+ }
536
+
537
+ /* ========================================
538
+ INFRASTRUCTURE INFO SECTION
539
+ ======================================== */
212
540
  .infra-section {
213
- background: #f8fafc;
214
- border: 1px solid var(--border);
215
- border-radius: 8px;
216
- padding: 1rem;
217
- margin-bottom: 1rem;
541
+ background: var(--bg-secondary);
542
+ border: 1px solid var(--border-light);
543
+ border-radius: 12px;
544
+ padding: 1.25rem;
545
+ margin-bottom: 1.25rem;
218
546
  }
219
547
 
220
548
  .infra-section h4 {
221
- margin: 0 0 0.75rem 0;
222
- font-size: 0.9rem;
549
+ margin: 0 0 0.875rem 0;
550
+ font-family: var(--font-sans);
551
+ font-size: 0.85rem;
552
+ font-weight: 600;
223
553
  color: var(--text-muted);
554
+ text-transform: uppercase;
555
+ letter-spacing: 0.04em;
224
556
  }
225
557
 
226
558
  .infra-item {
227
559
  display: flex;
228
560
  justify-content: space-between;
229
- padding: 0.25rem 0;
230
- font-size: 0.85rem;
561
+ padding: 0.375rem 0;
562
+ font-size: 0.875rem;
231
563
  }
232
564
 
233
565
  .infra-label {
@@ -235,22 +567,27 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
235
567
  }
236
568
 
237
569
  .infra-value {
238
- font-family: monospace;
570
+ font-family: var(--font-mono);
571
+ font-size: 0.8rem;
239
572
  color: var(--primary);
240
573
  }
241
574
 
242
- /* Domain configuration section */
575
+ /* ========================================
576
+ DOMAIN CONFIGURATION SECTION
577
+ ======================================== */
243
578
  .domain-section {
244
- background: var(--bg);
245
- border: 1px solid var(--border);
246
- border-radius: 8px;
247
- padding: 1rem;
248
- margin-bottom: 1rem;
579
+ background: var(--bg-secondary);
580
+ border: 1px solid var(--border-light);
581
+ border-radius: 12px;
582
+ padding: 1.25rem;
583
+ margin-bottom: 1.25rem;
249
584
  }
250
585
 
251
586
  .domain-section h4 {
252
- margin: 0 0 0.5rem 0;
253
- font-size: 0.95rem;
587
+ margin: 0 0 0.625rem 0;
588
+ font-family: var(--font-sans);
589
+ font-size: 1rem;
590
+ font-weight: 600;
254
591
  color: var(--text);
255
592
  display: flex;
256
593
  align-items: center;
@@ -261,9 +598,14 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
261
598
  font-size: 0.8rem;
262
599
  color: var(--text-muted);
263
600
  margin-bottom: 1rem;
264
- padding: 0.5rem;
265
- background: #f0f9ff;
266
- border-radius: 4px;
601
+ padding: 0.625rem 0.75rem;
602
+ background: rgba(37, 99, 235, 0.06);
603
+ border-radius: 8px;
604
+ line-height: 1.5;
605
+ }
606
+
607
+ [data-theme="dark"] .domain-section .section-hint {
608
+ background: rgba(96, 165, 250, 0.1);
267
609
  }
268
610
 
269
611
  .domain-row {
@@ -294,14 +636,15 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
294
636
 
295
637
  .domain-default {
296
638
  position: absolute;
297
- right: 10px;
639
+ right: 12px;
298
640
  top: 50%;
299
641
  transform: translateY(-50%);
300
- font-size: 0.7rem;
301
- color: var(--text-muted);
302
- background: #f1f5f9;
303
- padding: 2px 6px;
304
- border-radius: 4px;
642
+ font-family: var(--font-mono);
643
+ font-size: 0.65rem;
644
+ color: var(--text-subtle);
645
+ background: var(--bg);
646
+ padding: 3px 8px;
647
+ border-radius: 5px;
305
648
  max-width: 160px;
306
649
  overflow: hidden;
307
650
  text-overflow: ellipsis;
@@ -309,11 +652,15 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
309
652
  }
310
653
 
311
654
  .issuer-preview {
312
- margin-top: 0.75rem;
313
- padding: 0.5rem;
314
- background: #f0fdf4;
315
- border-radius: 4px;
316
- font-size: 0.85rem;
655
+ margin-top: 0.875rem;
656
+ padding: 0.625rem 0.75rem;
657
+ background: rgba(5, 150, 105, 0.08);
658
+ border-radius: 8px;
659
+ font-size: 0.875rem;
660
+ }
661
+
662
+ [data-theme="dark"] .issuer-preview {
663
+ background: rgba(52, 211, 153, 0.1);
317
664
  }
318
665
 
319
666
  .issuer-preview .label {
@@ -322,82 +669,101 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
322
669
  }
323
670
 
324
671
  .issuer-preview .value {
325
- color: #16a34a;
326
- font-family: monospace;
672
+ color: var(--success);
673
+ font-family: var(--font-mono);
674
+ font-size: 0.8rem;
327
675
  word-break: break-all;
328
676
  }
329
677
 
678
+ /* ========================================
679
+ BUTTONS
680
+ ======================================== */
330
681
  button {
331
- padding: 0.75rem 1.5rem;
332
- border-radius: 8px;
333
- font-size: 1rem;
334
- font-weight: 500;
682
+ padding: 0.875rem 1.75rem;
683
+ border-radius: 10px;
684
+ font-family: var(--font-sans);
685
+ font-size: 0.95rem;
686
+ font-weight: 600;
335
687
  cursor: pointer;
336
- transition: all 0.2s;
688
+ transition: all var(--transition-fast);
337
689
  border: none;
338
690
  }
339
691
 
340
692
  .btn-primary {
341
- background: var(--primary);
693
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
342
694
  color: white;
695
+ box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
343
696
  }
344
697
 
345
698
  .btn-primary:hover:not(:disabled) {
346
- background: var(--primary-dark);
699
+ transform: translateY(-1px);
700
+ box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
701
+ }
702
+
703
+ .btn-primary:active:not(:disabled) {
704
+ transform: translateY(0);
347
705
  }
348
706
 
349
707
  .btn-primary:disabled {
350
- opacity: 0.6;
708
+ opacity: 0.5;
351
709
  cursor: not-allowed;
710
+ box-shadow: none;
352
711
  }
353
712
 
354
713
  .btn-secondary {
355
- background: var(--border);
714
+ background: var(--bg-secondary);
356
715
  color: var(--text);
716
+ border: 1px solid var(--border);
357
717
  }
358
718
 
359
719
  .btn-secondary:hover {
360
- background: #cbd5e1;
720
+ background: var(--border-light);
721
+ border-color: var(--border);
361
722
  }
362
723
 
363
724
  .button-group {
364
725
  display: flex;
365
726
  gap: 1rem;
366
- margin-top: 1.5rem;
727
+ margin-top: 2rem;
367
728
  }
368
729
 
730
+ /* ========================================
731
+ PROGRESS LOG
732
+ ======================================== */
369
733
  .progress-log {
370
- background: #1e293b;
371
- border-radius: 8px;
372
- padding: 1rem;
373
- max-height: 300px;
734
+ background: #0f172a;
735
+ border-radius: 12px;
736
+ padding: 1.25rem;
737
+ max-height: 320px;
374
738
  overflow-y: auto;
375
- font-family: 'Monaco', 'Menlo', monospace;
376
- font-size: 0.875rem;
739
+ font-family: var(--font-mono);
740
+ font-size: 0.8rem;
741
+ border: 1px solid #1e293b;
377
742
  }
378
743
 
379
744
  .progress-log pre {
380
745
  color: #e2e8f0;
381
746
  white-space: pre-wrap;
382
747
  word-break: break-word;
748
+ line-height: 1.6;
383
749
  }
384
750
 
385
751
  /* Progress UI Components */
386
752
  .progress-container {
387
- margin: 1rem 0;
753
+ margin: 1.25rem 0;
388
754
  }
389
755
 
390
756
  .progress-status {
391
757
  display: flex;
392
758
  align-items: center;
393
- gap: 0.75rem;
394
- margin-bottom: 0.75rem;
759
+ gap: 0.875rem;
760
+ margin-bottom: 1rem;
395
761
  }
396
762
 
397
763
  .progress-status .spinner {
398
- width: 20px;
399
- height: 20px;
400
- border: 2px solid #e2e8f0;
764
+ width: 22px;
765
+ height: 22px;
766
+ border: 2px solid var(--border);
401
767
  border-top-color: var(--primary);
402
768
  border-radius: 50%;
403
769
  animation: spin 0.8s linear infinite;
@@ -408,72 +774,82 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
408
774
  }
409
775
 
410
776
  .progress-bar-wrapper {
411
- background: #e2e8f0;
412
- border-radius: 4px;
413
- height: 8px;
777
+ background: var(--bg-secondary);
778
+ border-radius: 6px;
779
+ height: 10px;
414
780
  overflow: hidden;
415
- margin-bottom: 0.5rem;
781
+ margin-bottom: 0.625rem;
416
782
  }
417
783
 
418
784
  .progress-bar {
419
785
  height: 100%;
420
- background: var(--primary);
421
- border-radius: 4px;
422
- transition: width 0.3s ease;
786
+ background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
787
+ border-radius: 6px;
788
+ transition: width 0.4s ease;
423
789
  }
424
790
 
425
791
  .progress-text {
426
- font-size: 0.875rem;
792
+ font-family: var(--font-sans);
793
+ font-size: 0.85rem;
427
794
  color: var(--text-muted);
428
795
  }
429
796
 
430
797
  .log-toggle {
431
- display: flex;
798
+ display: inline-flex;
432
799
  align-items: center;
433
800
  gap: 0.5rem;
434
- padding: 0.5rem 0.75rem;
435
- background: #f1f5f9;
436
- border: 1px solid var(--border);
437
- border-radius: 6px;
801
+ padding: 0.625rem 1rem;
802
+ background: var(--bg-secondary);
803
+ border: 1px solid var(--border-light);
804
+ border-radius: 8px;
438
805
  cursor: pointer;
439
- font-size: 0.875rem;
806
+ font-family: var(--font-sans);
807
+ font-size: 0.85rem;
440
808
  color: var(--text-muted);
441
809
  margin-top: 1rem;
810
+ transition: all var(--transition-fast);
442
811
  }
443
812
 
444
813
  .log-toggle:hover {
445
- background: #e2e8f0;
814
+ background: var(--border-light);
815
+ color: var(--text);
446
816
  }
447
817
 
448
818
  .log-toggle .arrow {
449
- transition: transform 0.2s;
819
+ transition: transform var(--transition-fast);
450
820
  }
451
821
 
452
822
  .log-toggle.open .arrow {
453
823
  transform: rotate(90deg);
454
824
  }
455
825
 
826
+ /* ========================================
827
+ STEP INDICATOR
828
+ ======================================== */
456
829
  .step-indicator {
457
830
  display: flex;
458
831
  justify-content: center;
459
- gap: 0.5rem;
460
- margin-bottom: 2rem;
832
+ gap: 0.375rem;
833
+ margin-bottom: 2.5rem;
461
834
  }
462
835
 
463
836
  .step {
464
- width: 40px;
465
- height: 40px;
837
+ width: 38px;
838
+ height: 38px;
466
839
  border-radius: 50%;
467
840
  display: flex;
468
841
  align-items: center;
469
842
  justify-content: center;
843
+ font-family: var(--font-sans);
470
844
  font-weight: 600;
471
- font-size: 0.875rem;
845
+ font-size: 0.85rem;
846
+ transition: all var(--transition-base);
472
847
  }
473
848
 
474
849
  .step-active {
475
- background: var(--primary);
850
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
476
851
  color: white;
852
+ box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
477
853
  }
478
854
 
479
855
  .step-complete {
@@ -482,52 +858,104 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
482
858
  }
483
859
 
484
860
  .step-pending {
485
- background: var(--border);
486
- color: var(--text-muted);
861
+ background: var(--bg-secondary);
862
+ color: var(--text-subtle);
863
+ border: 1px solid var(--border-light);
487
864
  }
488
865
 
489
866
  .step-connector {
490
- width: 40px;
867
+ width: 32px;
491
868
  height: 2px;
492
- background: var(--border);
869
+ background: var(--border-light);
493
870
  align-self: center;
494
871
  }
495
872
 
873
+ /* ========================================
874
+ ALERTS
875
+ ======================================== */
496
876
  .alert {
497
- padding: 1rem;
498
- border-radius: 8px;
499
- margin-bottom: 1rem;
877
+ padding: 1rem 1.25rem;
878
+ border-radius: 10px;
879
+ margin-bottom: 1.25rem;
880
+ font-size: 0.9rem;
881
+ line-height: 1.5;
500
882
  }
501
883
 
502
- .alert-success { background: #d1fae5; color: #065f46; }
503
- .alert-error { background: #fee2e2; color: #991b1b; }
504
- .alert-warning { background: #fef3c7; color: #92400e; }
505
- .alert-info { background: #dbeafe; color: #1e40af; }
884
+ .alert-success {
885
+ background: rgba(5, 150, 105, 0.08);
886
+ color: var(--success);
887
+ border: 1px solid rgba(5, 150, 105, 0.2);
888
+ }
889
+ .alert-error {
890
+ background: rgba(220, 38, 38, 0.08);
891
+ color: var(--error);
892
+ border: 1px solid rgba(220, 38, 38, 0.2);
893
+ }
894
+ .alert-warning {
895
+ background: rgba(217, 119, 6, 0.08);
896
+ color: var(--warning);
897
+ border: 1px solid rgba(217, 119, 6, 0.2);
898
+ }
899
+ .alert-info {
900
+ background: rgba(37, 99, 235, 0.06);
901
+ color: var(--primary);
902
+ border: 1px solid rgba(37, 99, 235, 0.15);
903
+ }
904
+
905
+ [data-theme="dark"] .alert-success {
906
+ background: rgba(52, 211, 153, 0.1);
907
+ border-color: rgba(52, 211, 153, 0.25);
908
+ }
909
+ [data-theme="dark"] .alert-error {
910
+ background: rgba(248, 113, 113, 0.1);
911
+ border-color: rgba(248, 113, 113, 0.25);
912
+ }
913
+ [data-theme="dark"] .alert-warning {
914
+ background: rgba(251, 191, 36, 0.1);
915
+ border-color: rgba(251, 191, 36, 0.25);
916
+ }
917
+ [data-theme="dark"] .alert-info {
918
+ background: rgba(96, 165, 250, 0.1);
919
+ border-color: rgba(96, 165, 250, 0.2);
920
+ }
506
921
 
922
+ /* ========================================
923
+ URL DISPLAY
924
+ ======================================== */
507
925
  .url-display {
508
- background: var(--bg);
509
- padding: 1rem;
510
- border-radius: 8px;
511
- margin-top: 1rem;
926
+ background: var(--bg-secondary);
927
+ padding: 1.25rem;
928
+ border-radius: 12px;
929
+ margin-top: 1.25rem;
930
+ border: 1px solid var(--border-light);
512
931
  }
513
932
 
514
933
  .url-item {
515
934
  display: flex;
516
- gap: 0.5rem;
517
- margin-bottom: 0.5rem;
935
+ gap: 0.75rem;
936
+ margin-bottom: 0.625rem;
937
+ align-items: baseline;
518
938
  }
519
939
 
520
940
  .url-label {
521
- font-weight: 500;
522
- min-width: 100px;
941
+ font-family: var(--font-sans);
942
+ font-weight: 600;
943
+ font-size: 0.85rem;
944
+ min-width: 110px;
945
+ color: var(--text-muted);
523
946
  }
524
947
 
525
948
  .url-value {
949
+ font-family: var(--font-mono);
950
+ font-size: 0.8rem;
526
951
  color: var(--primary);
527
952
  word-break: break-all;
528
953
  overflow-wrap: break-word;
529
954
  }
530
955
 
956
+ /* ========================================
957
+ FILE INPUT
958
+ ======================================== */
531
959
  .file-input-wrapper {
532
960
  position: relative;
533
961
  overflow: hidden;
@@ -545,74 +973,92 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
545
973
  }
546
974
 
547
975
  .file-input-btn {
548
- display: inline-block;
549
- padding: 0.75rem 1.5rem;
550
- background: var(--border);
976
+ display: inline-flex;
977
+ align-items: center;
978
+ gap: 0.5rem;
979
+ padding: 0.875rem 1.5rem;
980
+ background: var(--bg-secondary);
551
981
  color: var(--text);
552
- border-radius: 8px;
982
+ border: 1px solid var(--border);
983
+ border-radius: 10px;
553
984
  cursor: pointer;
985
+ font-family: var(--font-sans);
986
+ font-weight: 500;
987
+ transition: all var(--transition-fast);
554
988
  }
555
989
 
556
990
  .file-input-btn:hover {
557
- background: #cbd5e1;
991
+ background: var(--border-light);
992
+ border-color: var(--primary);
558
993
  }
559
994
 
560
995
  .config-preview {
561
- background: var(--bg);
562
- border-radius: 8px;
996
+ background: var(--bg-secondary);
997
+ border: 1px solid var(--border-light);
998
+ border-radius: 10px;
563
999
  padding: 1rem;
564
1000
  margin-top: 1rem;
565
- font-family: 'Monaco', 'Menlo', monospace;
566
- font-size: 0.8rem;
1001
+ font-family: var(--font-mono);
1002
+ font-size: 0.75rem;
567
1003
  max-height: 200px;
568
1004
  overflow-y: auto;
1005
+ line-height: 1.5;
569
1006
  }
570
1007
 
571
1008
  .hidden { display: none; }
572
1009
 
573
- /* Modal styles */
1010
+ /* ========================================
1011
+ MODAL
1012
+ ======================================== */
574
1013
  .modal {
575
1014
  position: fixed;
576
- top: 0;
577
- left: 0;
578
- right: 0;
579
- bottom: 0;
1015
+ inset: 0;
580
1016
  z-index: 1000;
581
1017
  display: flex;
582
1018
  align-items: center;
583
1019
  justify-content: center;
584
1020
  }
585
1021
  .modal.hidden { display: none; }
1022
+
586
1023
  .modal-backdrop {
587
1024
  position: absolute;
588
- top: 0;
589
- left: 0;
590
- right: 0;
591
- bottom: 0;
592
- background: rgba(0, 0, 0, 0.5);
1025
+ inset: 0;
1026
+ background: rgba(0, 0, 0, 0.6);
1027
+ backdrop-filter: blur(4px);
593
1028
  }
1029
+
594
1030
  .modal-content {
595
1031
  position: relative;
596
1032
  background: var(--card-bg);
597
- border-radius: 12px;
598
- padding: 1.5rem;
599
- max-width: 450px;
1033
+ border-radius: 16px;
1034
+ padding: 2rem;
1035
+ max-width: 460px;
600
1036
  width: 90%;
601
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
1037
+ box-shadow: var(--shadow-lg);
1038
+ border: 1px solid var(--border-light);
602
1039
  }
603
1040
 
604
- /* Resource preview styles */
605
- .resource-preview {
606
- background: var(--bg);
607
- border: 1px solid var(--border);
608
- border-radius: 8px;
609
- padding: 1rem;
1041
+ .modal-content h3 {
1042
+ font-family: var(--font-sans);
1043
+ font-size: 1.25rem;
1044
+ font-weight: 600;
610
1045
  margin-bottom: 1rem;
611
1046
  }
612
1047
 
1048
+ /* ========================================
1049
+ RESOURCE PREVIEW
1050
+ ======================================== */
1051
+ .resource-preview {
1052
+ background: var(--bg-secondary);
1053
+ border: 1px solid var(--border-light);
1054
+ border-radius: 12px;
1055
+ padding: 1.25rem;
1056
+ margin-bottom: 1.25rem;
1057
+ }
1058
+
613
1059
  .resource-list {
614
1060
  display: grid;
615
- gap: 1rem;
1061
+ gap: 1.25rem;
616
1062
  }
617
1063
 
618
1064
  .resource-category {
@@ -621,6 +1067,8 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
621
1067
 
622
1068
  .resource-category strong {
623
1069
  display: block;
1070
+ font-family: var(--font-sans);
1071
+ font-weight: 600;
624
1072
  margin-bottom: 0.5rem;
625
1073
  color: var(--text);
626
1074
  }
@@ -632,9 +1080,9 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
632
1080
  }
633
1081
 
634
1082
  .resource-category li {
635
- font-family: 'Monaco', 'Menlo', monospace;
636
- font-size: 0.8rem;
637
- margin-bottom: 0.25rem;
1083
+ font-family: var(--font-mono);
1084
+ font-size: 0.75rem;
1085
+ margin-bottom: 0.3rem;
638
1086
  }
639
1087
 
640
1088
  /* Progress spinner */
@@ -658,6 +1106,8 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
658
1106
  align-items: center;
659
1107
  margin-bottom: 0.5rem;
660
1108
  color: #e2e8f0;
1109
+ font-family: var(--font-mono);
1110
+ font-size: 0.8rem;
661
1111
  }
662
1112
 
663
1113
  .progress-item.complete {
@@ -668,28 +1118,32 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
668
1118
  color: var(--error);
669
1119
  }
670
1120
 
671
- /* Environment cards */
1121
+ /* ========================================
1122
+ ENVIRONMENT CARDS
1123
+ ======================================== */
672
1124
  .env-cards {
673
1125
  display: grid;
674
1126
  gap: 1rem;
675
- margin-bottom: 1rem;
1127
+ margin-bottom: 1.25rem;
676
1128
  }
677
1129
 
678
1130
  .env-card {
679
- border: 1px solid var(--border);
680
- border-radius: 8px;
681
- padding: 1rem;
1131
+ background: var(--card-bg);
1132
+ border: 1px solid var(--border-light);
1133
+ border-radius: 12px;
1134
+ padding: 1.25rem;
682
1135
  display: flex;
683
1136
  justify-content: space-between;
684
1137
  align-items: center;
685
1138
  cursor: pointer;
686
- transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
1139
+ transition: all var(--transition-fast);
687
1140
  }
688
1141
 
689
1142
  .env-card:hover {
690
1143
  border-color: var(--primary);
691
- background: #f8fafc;
692
- box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
1144
+ background: var(--card-bg-hover);
1145
+ box-shadow: var(--shadow-md);
1146
+ transform: translateY(-1px);
693
1147
  }
694
1148
 
695
1149
  .env-card-info {
@@ -697,14 +1151,16 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
697
1151
  }
698
1152
 
699
1153
  .env-card-name {
1154
+ font-family: var(--font-sans);
700
1155
  font-size: 1.1rem;
701
1156
  font-weight: 600;
702
1157
  margin-bottom: 0.5rem;
1158
+ color: var(--text);
703
1159
  }
704
1160
 
705
1161
  .env-card-stats {
706
1162
  display: flex;
707
- gap: 1rem;
1163
+ gap: 1.25rem;
708
1164
  font-size: 0.8rem;
709
1165
  color: var(--text-muted);
710
1166
  }
@@ -712,70 +1168,79 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
712
1168
  .env-card-stat {
713
1169
  display: flex;
714
1170
  align-items: center;
715
- gap: 0.25rem;
1171
+ gap: 0.375rem;
716
1172
  }
717
1173
 
718
1174
  .env-card-actions {
719
1175
  display: flex;
720
- gap: 0.5rem;
1176
+ gap: 0.625rem;
721
1177
  }
722
1178
 
723
1179
  .btn-danger {
724
1180
  background: var(--error);
725
1181
  color: white;
726
- padding: 0.5rem 1rem;
727
- font-size: 0.875rem;
1182
+ padding: 0.625rem 1rem;
1183
+ font-size: 0.85rem;
1184
+ border-radius: 8px;
728
1185
  }
729
1186
 
730
1187
  .btn-danger:hover {
731
- background: #dc2626;
1188
+ background: #b91c1c;
1189
+ transform: translateY(-1px);
732
1190
  }
733
1191
 
734
1192
  .btn-info {
735
1193
  background: var(--primary);
736
1194
  color: white;
737
- padding: 0.5rem 1rem;
738
- font-size: 0.875rem;
1195
+ padding: 0.625rem 1rem;
1196
+ font-size: 0.85rem;
1197
+ border-radius: 8px;
739
1198
  }
740
1199
 
741
1200
  .btn-info:hover {
742
1201
  background: var(--primary-dark);
1202
+ transform: translateY(-1px);
743
1203
  }
744
1204
 
745
- /* Resource list in details view */
1205
+ /* ========================================
1206
+ RESOURCE LIST (Details view)
1207
+ ======================================== */
746
1208
  .resource-section {
747
- margin-bottom: 1.5rem;
1209
+ margin-bottom: 1.75rem;
748
1210
  }
749
1211
 
750
1212
  .resource-section-title {
1213
+ font-family: var(--font-sans);
751
1214
  font-size: 1rem;
752
1215
  font-weight: 600;
753
- margin-bottom: 0.75rem;
1216
+ margin-bottom: 0.875rem;
754
1217
  display: flex;
755
1218
  align-items: center;
756
1219
  gap: 0.5rem;
1220
+ color: var(--text);
757
1221
  }
758
1222
 
759
1223
  .resource-section-title .count {
760
1224
  font-size: 0.8rem;
761
1225
  color: var(--text-muted);
762
- font-weight: normal;
1226
+ font-weight: 500;
763
1227
  }
764
1228
 
765
1229
  .resource-list {
766
- background: var(--bg);
767
- border-radius: 8px;
768
- padding: 0.75rem;
1230
+ background: var(--bg-secondary);
1231
+ border-radius: 10px;
1232
+ padding: 0.875rem;
1233
+ border: 1px solid var(--border-light);
769
1234
  }
770
1235
 
771
1236
  .resource-item {
772
- font-family: 'Monaco', 'Menlo', monospace;
773
- font-size: 0.8rem;
774
- padding: 0.25rem 0.5rem;
775
- margin-bottom: 0.25rem;
1237
+ font-family: var(--font-mono);
1238
+ font-size: 0.75rem;
1239
+ padding: 0.5rem 0.75rem;
1240
+ margin-bottom: 0.375rem;
776
1241
  background: var(--card-bg);
777
- border-radius: 4px;
778
- border: 1px solid var(--border);
1242
+ border-radius: 6px;
1243
+ border: 1px solid var(--border-light);
779
1244
  }
780
1245
 
781
1246
  .resource-item:last-child {
@@ -783,14 +1248,14 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
783
1248
  }
784
1249
 
785
1250
  .resource-item-name {
786
- font-weight: 500;
1251
+ font-weight: 600;
787
1252
  }
788
1253
 
789
1254
  .resource-item-details {
790
- font-size: 0.75rem;
1255
+ font-size: 0.7rem;
791
1256
  color: var(--text-muted);
792
1257
  margin-top: 0.25rem;
793
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1258
+ font-family: var(--font-sans);
794
1259
  }
795
1260
 
796
1261
  .resource-item-details span {
@@ -817,29 +1282,35 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
817
1282
  font-size: 0.875rem;
818
1283
  }
819
1284
 
820
- /* Delete options */
1285
+ /* ========================================
1286
+ DELETE OPTIONS
1287
+ ======================================== */
821
1288
  .delete-options {
822
1289
  display: grid;
823
- gap: 0.75rem;
1290
+ gap: 0.875rem;
824
1291
  }
825
1292
 
826
1293
  .delete-option {
827
1294
  display: flex;
828
1295
  align-items: center;
829
- gap: 0.75rem;
830
- padding: 0.75rem;
831
- border: 1px solid var(--border);
832
- border-radius: 8px;
1296
+ gap: 0.875rem;
1297
+ padding: 1rem;
1298
+ border: 1px solid var(--border-light);
1299
+ border-radius: 10px;
833
1300
  cursor: pointer;
1301
+ background: var(--card-bg);
1302
+ transition: all var(--transition-fast);
834
1303
  }
835
1304
 
836
1305
  .delete-option:hover {
837
- background: var(--bg);
1306
+ background: var(--bg-secondary);
1307
+ border-color: var(--border);
838
1308
  }
839
1309
 
840
1310
  .delete-option input[type="checkbox"] {
841
1311
  width: 18px;
842
1312
  height: 18px;
1313
+ accent-color: var(--error);
843
1314
  }
844
1315
 
845
1316
  .delete-option span {
@@ -852,37 +1323,43 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
852
1323
  font-size: 0.8rem;
853
1324
  }
854
1325
 
855
- /* Database configuration styles */
1326
+ /* ========================================
1327
+ DATABASE CONFIGURATION
1328
+ ======================================== */
856
1329
  .database-config-grid {
857
1330
  display: grid;
858
1331
  grid-template-columns: 1fr 1fr;
859
1332
  gap: 1.5rem;
860
- margin-bottom: 1.5rem;
1333
+ margin-bottom: 1.75rem;
861
1334
  }
862
1335
 
863
1336
  .database-config-stack {
864
1337
  display: flex;
865
1338
  flex-direction: column;
866
1339
  gap: 1.5rem;
867
- margin-bottom: 1.5rem;
1340
+ margin-bottom: 1.75rem;
868
1341
  }
869
1342
 
870
1343
  .database-card {
871
- background: var(--bg);
872
- border: 1px solid var(--border);
873
- border-radius: 0.5rem;
874
- padding: 1.25rem;
1344
+ background: var(--bg-secondary);
1345
+ border: 1px solid var(--border-light);
1346
+ border-radius: 12px;
1347
+ padding: 1.5rem;
875
1348
  }
876
1349
 
877
1350
  .database-card h3 {
878
- margin: 0 0 1rem 0;
1351
+ margin: 0 0 1.125rem 0;
1352
+ font-family: var(--font-sans);
879
1353
  font-size: 1.1rem;
1354
+ font-weight: 600;
1355
+ color: var(--text);
880
1356
  }
881
1357
 
882
1358
  .db-description {
883
1359
  font-size: 0.875rem;
884
1360
  color: var(--text-muted);
885
- margin-bottom: 1rem;
1361
+ margin-bottom: 1.25rem;
1362
+ line-height: 1.6;
886
1363
  }
887
1364
 
888
1365
  .db-description p {
@@ -895,21 +1372,28 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
895
1372
  }
896
1373
 
897
1374
  .db-description li {
898
- margin-bottom: 0.25rem;
1375
+ margin-bottom: 0.3rem;
899
1376
  }
900
1377
 
901
1378
  .db-hint {
902
1379
  font-style: italic;
903
- margin-top: 0.75rem;
904
- padding: 0.5rem;
905
- background: #f0f9ff;
906
- border-radius: 4px;
1380
+ margin-top: 0.875rem;
1381
+ padding: 0.625rem 0.75rem;
1382
+ background: rgba(37, 99, 235, 0.06);
1383
+ border-radius: 8px;
1384
+ font-size: 0.85rem;
1385
+ }
1386
+
1387
+ [data-theme="dark"] .db-hint {
1388
+ background: rgba(96, 165, 250, 0.1);
907
1389
  }
908
1390
 
909
1391
  .region-selection h4 {
910
- margin: 0 0 0.75rem 0;
1392
+ margin: 0 0 0.875rem 0;
1393
+ font-family: var(--font-sans);
911
1394
  font-size: 0.95rem;
912
1395
  font-weight: 600;
1396
+ color: var(--text);
913
1397
  }
914
1398
 
915
1399
  .radio-group {
@@ -921,24 +1405,27 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
921
1405
  .radio-item {
922
1406
  display: flex;
923
1407
  align-items: center;
924
- gap: 0.5rem;
1408
+ gap: 0.625rem;
925
1409
  cursor: pointer;
926
- padding: 0.25rem 0;
1410
+ padding: 0.375rem 0;
1411
+ font-size: 0.9rem;
927
1412
  }
928
1413
 
929
1414
  .radio-item input[type="radio"] {
930
1415
  margin: 0;
931
- width: 16px;
932
- height: 16px;
1416
+ width: 18px;
1417
+ height: 18px;
1418
+ accent-color: var(--primary);
933
1419
  }
934
1420
 
935
1421
  .radio-separator {
936
- font-size: 0.75rem;
937
- color: var(--text-muted);
938
- margin: 0.5rem 0 0.25rem 0;
939
- font-weight: 500;
1422
+ font-family: var(--font-sans);
1423
+ font-size: 0.7rem;
1424
+ color: var(--text-subtle);
1425
+ margin: 0.75rem 0 0.375rem 0;
1426
+ font-weight: 600;
940
1427
  text-transform: uppercase;
941
- letter-spacing: 0.05em;
1428
+ letter-spacing: 0.08em;
942
1429
  }
943
1430
 
944
1431
  @media (max-width: 768px) {
@@ -949,21 +1436,31 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
949
1436
  </style>
950
1437
  </head>
951
1438
  <body>
1439
+ <!-- Splash Screen -->
1440
+ <div id="splash" class="splash">
1441
+ <div class="splash-content">
1442
+ <div class="splash-logo">
1443
+ <div class="splash-icon">🔐</div>
1444
+ <span class="splash-title">Authrim</span>
1445
+ </div>
1446
+ <p class="splash-tagline">Identity & Access Platform</p>
1447
+ <div class="splash-loader"></div>
1448
+ </div>
1449
+ </div>
1450
+
1451
+ <!-- Theme Toggle -->
1452
+ <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">🌙</button>
1453
+
952
1454
  <div class="container">
953
1455
  <header>
954
- <h1>🔐 Authrim Setup</h1>
1456
+ <div class="header-brand">
1457
+ <div class="header-icon">🔐</div>
1458
+ <h1>Authrim</h1>
1459
+ </div>
1460
+ <p class="header-wizard">Setup Wizard</p>
955
1461
  <p class="subtitle">OIDC Provider on Cloudflare Workers</p>
956
1462
  </header>
957
1463
 
958
- <!-- Development Warning Banner -->
959
- <div style="background: #fef3c7; border: 2px solid #f59e0b; border-radius: 0.5rem; padding: 1rem; margin-bottom: 1.5rem; text-align: center;">
960
- <strong style="color: #92400e;">⚠️ WARNING: Under Development!</strong>
961
- <p style="color: #78350f; margin: 0.5rem 0 0 0; font-size: 0.875rem;">
962
- This project is still under active development and does not work correctly yet.<br>
963
- Admin UI is incomplete and does not support login functionality.
964
- </p>
965
- </div>
966
-
967
1464
  <div class="step-indicator" id="step-indicator">
968
1465
  <div class="step step-active" id="step-1">1</div>
969
1466
  <div class="step-connector"></div>
@@ -1822,6 +2319,67 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
1822
2319
  </div>
1823
2320
 
1824
2321
  <script>
2322
+ // ========================================
2323
+ // THEME MANAGEMENT
2324
+ // ========================================
2325
+ function initTheme() {
2326
+ const savedTheme = localStorage.getItem('authrim-theme');
2327
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
2328
+ const theme = savedTheme || (prefersDark ? 'dark' : 'light');
2329
+ document.documentElement.setAttribute('data-theme', theme);
2330
+ updateThemeToggle(theme);
2331
+ }
2332
+
2333
+ function toggleTheme() {
2334
+ const current = document.documentElement.getAttribute('data-theme') || 'light';
2335
+ const newTheme = current === 'dark' ? 'light' : 'dark';
2336
+ document.documentElement.setAttribute('data-theme', newTheme);
2337
+ localStorage.setItem('authrim-theme', newTheme);
2338
+ updateThemeToggle(newTheme);
2339
+ }
2340
+
2341
+ function updateThemeToggle(theme) {
2342
+ const toggle = document.getElementById('theme-toggle');
2343
+ if (toggle) {
2344
+ toggle.textContent = theme === 'dark' ? '☀️' : '🌙';
2345
+ toggle.setAttribute('aria-label', theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode');
2346
+ }
2347
+ }
2348
+
2349
+ // Listen for system preference changes
2350
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
2351
+ if (!localStorage.getItem('authrim-theme')) {
2352
+ const theme = e.matches ? 'dark' : 'light';
2353
+ document.documentElement.setAttribute('data-theme', theme);
2354
+ updateThemeToggle(theme);
2355
+ }
2356
+ });
2357
+
2358
+ // Initialize theme immediately
2359
+ initTheme();
2360
+
2361
+ // Theme toggle event
2362
+ document.getElementById('theme-toggle').addEventListener('click', toggleTheme);
2363
+
2364
+ // ========================================
2365
+ // SPLASH SCREEN
2366
+ // ========================================
2367
+ function hideSplash() {
2368
+ const splash = document.getElementById('splash');
2369
+ if (splash) {
2370
+ splash.classList.add('fade-out');
2371
+ setTimeout(() => {
2372
+ splash.style.display = 'none';
2373
+ }, 600);
2374
+ }
2375
+ }
2376
+
2377
+ // Hide splash after 2500ms
2378
+ setTimeout(hideSplash, 2500);
2379
+
2380
+ // ========================================
2381
+ // MAIN APPLICATION
2382
+ // ========================================
1825
2383
  // Session token for API authentication (embedded by server)
1826
2384
  const SESSION_TOKEN = '${safeToken}';
1827
2385
  const MANAGE_ONLY = ${manageOnlyFlag};
@@ -2872,8 +3430,8 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
2872
3430
  output.textContent += '\\n';
2873
3431
  scrollToBottom(log);
2874
3432
 
2875
- // Show keys saved location (full path with environment)
2876
- keysPath.textContent = workingDirectory ? workingDirectory + '/.keys/' + config.env + '/' : './.keys/' + config.env + '/';
3433
+ // Show keys saved location (new structure: .authrim/{env}/keys/)
3434
+ keysPath.textContent = workingDirectory ? workingDirectory + '/.authrim/' + config.env + '/keys/' : './.authrim/' + config.env + '/keys/';
2877
3435
 
2878
3436
  // Provision resources
2879
3437
  output.textContent += '☁️ Provisioning Cloudflare resources...\\n';
@@ -3049,7 +3607,7 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
3049
3607
 
3050
3608
  output.textContent += ' API URL: ' + apiUrl + '\\n';
3051
3609
  output.textContent += ' Login UI URL: ' + loginUiUrl + '\\n';
3052
- output.textContent += ' Keys Dir: .keys/' + config.env + '\\n';
3610
+ output.textContent += ' Keys Dir: .authrim/' + config.env + '/keys/\\n';
3053
3611
  scrollToBottom(log);
3054
3612
 
3055
3613
  let adminSetupResult;
@@ -3059,7 +3617,7 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
3059
3617
  body: {
3060
3618
  env: config.env,
3061
3619
  baseUrl: apiUrl, // Setup page is served by ar-auth worker (API)
3062
- keysDir: '.keys',
3620
+ // keysDir is auto-detected by API using paths.ts
3063
3621
  },
3064
3622
  });
3065
3623
  output.textContent += ' API Response: ' + JSON.stringify(adminSetupResult) + '\\n';
@@ -3180,8 +3738,8 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
3180
3738
 
3181
3739
  // Resource naming functions
3182
3740
  function getResourceNames(env) {
3183
- // Keys are stored in environment-specific subdirectory: .keys/{env}/
3184
- const keysDir = workingDirectory ? workingDirectory + '/.keys/' + env : '.keys/' + env;
3741
+ // Keys are stored in environment-specific subdirectory: .authrim/{env}/keys/
3742
+ const keysDir = workingDirectory ? workingDirectory + '/.authrim/' + env + '/keys' : '.authrim/' + env + '/keys';
3185
3743
  return {
3186
3744
  d1: [
3187
3745
  env + '-authrim-core-db',
@@ -3348,7 +3906,7 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
3348
3906
  policy: true,
3349
3907
  },
3350
3908
  keys: {
3351
- secretsPath: './.keys/',
3909
+ secretsPath: './keys/', // Relative path within .authrim/{env}/ structure
3352
3910
  },
3353
3911
  database: config.database || {
3354
3912
  core: { location: 'auto', jurisdiction: 'none' },