@authrim/sveltekit 0.1.0 → 0.1.2

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 (34) hide show
  1. package/LICENSE +191 -191
  2. package/README.md +527 -531
  3. package/dist/components/AuthProvider.svelte +56 -56
  4. package/dist/components/ProtectedRoute.svelte +71 -71
  5. package/dist/components/SignInButton.svelte +93 -93
  6. package/dist/components/SignOutButton.svelte +72 -72
  7. package/dist/components/UserProfile.svelte +71 -71
  8. package/dist/ui/account/LinkAccountButton.svelte +133 -133
  9. package/dist/ui/account/LinkedAccountsList.svelte +233 -233
  10. package/dist/ui/account/UnlinkAccountButton.svelte +179 -179
  11. package/dist/ui/forms/EmailCodeForm.svelte +224 -224
  12. package/dist/ui/forms/PasskeyConditionalInput.svelte +173 -173
  13. package/dist/ui/forms/SocialLoginButtons.svelte +209 -209
  14. package/dist/ui/helpers/AuthError.svelte +124 -124
  15. package/dist/ui/helpers/AuthLoading.svelte +83 -83
  16. package/dist/ui/helpers/OTPInput.svelte +214 -214
  17. package/dist/ui/helpers/ResendCodeButton.svelte +140 -140
  18. package/dist/ui/passkey/PasskeyDeleteButton.svelte +177 -177
  19. package/dist/ui/passkey/PasskeyList.svelte +225 -225
  20. package/dist/ui/passkey/PasskeyRegisterButton.svelte +52 -52
  21. package/dist/ui/session/SessionExpiryIndicator.svelte +109 -109
  22. package/dist/ui/session/SessionList.svelte +231 -231
  23. package/dist/ui/session/SessionRevokeButton.svelte +72 -72
  24. package/dist/ui/shared/Badge.svelte +100 -100
  25. package/dist/ui/shared/Button.svelte +213 -213
  26. package/dist/ui/shared/Card.svelte +85 -85
  27. package/dist/ui/shared/Input.svelte +192 -192
  28. package/dist/ui/shared/Spinner.svelte +75 -75
  29. package/dist/ui/styles/base.css +168 -168
  30. package/dist/ui/styles/theme.css +279 -279
  31. package/dist/ui/templates/AccountSettingsTemplate.svelte +205 -205
  32. package/dist/ui/templates/LoginTemplate.svelte +234 -234
  33. package/dist/ui/templates/SignUpTemplate.svelte +345 -345
  34. package/package.json +112 -111
@@ -1,279 +1,279 @@
1
- /**
2
- * Authrim UI Theme
3
- *
4
- * Design Direction: Refined Brutalist
5
- * - Sharp geometric forms with subtle softening
6
- * - Monochromatic base with electric accent colors
7
- * - Bold typography with precise spacing
8
- * - Micro-interactions that feel intentional
9
- */
10
-
11
- @import url('https://fonts.googleapis.com/css2?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&family=JetBrains+Mono:wght@400;500&display=swap');
12
-
13
- :root,
14
- [data-theme="light"] {
15
- /* === Typography === */
16
- --authrim-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
17
- --authrim-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
18
-
19
- /* === Color Palette === */
20
- /* Primary - Electric Indigo */
21
- --authrim-color-primary: #4f46e5;
22
- --authrim-color-primary-hover: #4338ca;
23
- --authrim-color-primary-active: #3730a3;
24
- --authrim-color-primary-subtle: #eef2ff;
25
- --authrim-color-primary-text: #ffffff;
26
-
27
- /* Accent - Vivid Coral */
28
- --authrim-color-accent: #f43f5e;
29
- --authrim-color-accent-hover: #e11d48;
30
- --authrim-color-accent-subtle: #fff1f2;
31
-
32
- /* Success - Emerald */
33
- --authrim-color-success: #059669;
34
- --authrim-color-success-hover: #047857;
35
- --authrim-color-success-subtle: #ecfdf5;
36
- --authrim-color-success-text: #065f46;
37
-
38
- /* Warning - Amber */
39
- --authrim-color-warning: #d97706;
40
- --authrim-color-warning-hover: #b45309;
41
- --authrim-color-warning-subtle: #fffbeb;
42
- --authrim-color-warning-text: #92400e;
43
-
44
- /* Error - Rose */
45
- --authrim-color-error: #e11d48;
46
- --authrim-color-error-hover: #be123c;
47
- --authrim-color-error-subtle: #fff1f2;
48
- --authrim-color-error-text: #9f1239;
49
-
50
- /* Info - Cyan */
51
- --authrim-color-info: #0891b2;
52
- --authrim-color-info-hover: #0e7490;
53
- --authrim-color-info-subtle: #ecfeff;
54
- --authrim-color-info-text: #155e75;
55
-
56
- /* === Neutrals === */
57
- --authrim-color-bg: #ffffff;
58
- --authrim-color-bg-elevated: #fafafa;
59
- --authrim-color-bg-subtle: #f4f4f5;
60
- --authrim-color-bg-muted: #e4e4e7;
61
- --authrim-color-bg-inverse: #18181b;
62
-
63
- --authrim-color-text: #09090b;
64
- --authrim-color-text-secondary: #52525b;
65
- --authrim-color-text-muted: #a1a1aa;
66
- --authrim-color-text-inverse: #fafafa;
67
-
68
- --authrim-color-border: #e4e4e7;
69
- --authrim-color-border-subtle: #f4f4f5;
70
- --authrim-color-border-strong: #d4d4d8;
71
- --authrim-color-border-focus: var(--authrim-color-primary);
72
-
73
- /* === Shadows === */
74
- --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
75
- --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
76
- --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
77
- --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
78
- --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
79
- --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
80
- --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
81
-
82
- /* === Radii === */
83
- --authrim-radius-sm: 6px;
84
- --authrim-radius-md: 10px;
85
- --authrim-radius-lg: 14px;
86
- --authrim-radius-xl: 20px;
87
- --authrim-radius-full: 9999px;
88
-
89
- /* === Spacing === */
90
- --authrim-space-0: 0;
91
- --authrim-space-1: 4px;
92
- --authrim-space-2: 8px;
93
- --authrim-space-3: 12px;
94
- --authrim-space-4: 16px;
95
- --authrim-space-5: 20px;
96
- --authrim-space-6: 24px;
97
- --authrim-space-8: 32px;
98
- --authrim-space-10: 40px;
99
- --authrim-space-12: 48px;
100
- --authrim-space-16: 64px;
101
-
102
- /* === Typography Scale === */
103
- --authrim-text-xs: 0.75rem;
104
- --authrim-text-sm: 0.875rem;
105
- --authrim-text-base: 1rem;
106
- --authrim-text-lg: 1.125rem;
107
- --authrim-text-xl: 1.25rem;
108
- --authrim-text-2xl: 1.5rem;
109
- --authrim-text-3xl: 1.875rem;
110
-
111
- --authrim-leading-tight: 1.25;
112
- --authrim-leading-snug: 1.375;
113
- --authrim-leading-normal: 1.5;
114
- --authrim-leading-relaxed: 1.625;
115
-
116
- --authrim-tracking-tight: -0.025em;
117
- --authrim-tracking-normal: 0;
118
- --authrim-tracking-wide: 0.025em;
119
-
120
- /* === Transitions === */
121
- --authrim-duration-instant: 50ms;
122
- --authrim-duration-fast: 100ms;
123
- --authrim-duration-normal: 200ms;
124
- --authrim-duration-slow: 300ms;
125
- --authrim-duration-slower: 500ms;
126
-
127
- --authrim-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
128
- --authrim-ease-in: cubic-bezier(0.4, 0, 1, 1);
129
- --authrim-ease-out: cubic-bezier(0, 0, 0.2, 1);
130
- --authrim-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
131
-
132
- /* === Z-Index === */
133
- --authrim-z-base: 0;
134
- --authrim-z-dropdown: 50;
135
- --authrim-z-sticky: 100;
136
- --authrim-z-modal: 200;
137
- --authrim-z-popover: 300;
138
- --authrim-z-tooltip: 400;
139
- }
140
-
141
- [data-theme="dark"] {
142
- /* === Color Palette === */
143
- /* Primary - Electric Indigo (adjusted for dark) */
144
- --authrim-color-primary: #818cf8;
145
- --authrim-color-primary-hover: #a5b4fc;
146
- --authrim-color-primary-active: #6366f1;
147
- --authrim-color-primary-subtle: rgba(129, 140, 248, 0.15);
148
- --authrim-color-primary-text: #09090b;
149
-
150
- /* Accent - Vivid Coral */
151
- --authrim-color-accent: #fb7185;
152
- --authrim-color-accent-hover: #fda4af;
153
- --authrim-color-accent-subtle: rgba(251, 113, 133, 0.15);
154
-
155
- /* Success */
156
- --authrim-color-success: #34d399;
157
- --authrim-color-success-hover: #6ee7b7;
158
- --authrim-color-success-subtle: rgba(52, 211, 153, 0.15);
159
- --authrim-color-success-text: #6ee7b7;
160
-
161
- /* Warning */
162
- --authrim-color-warning: #fbbf24;
163
- --authrim-color-warning-hover: #fcd34d;
164
- --authrim-color-warning-subtle: rgba(251, 191, 36, 0.15);
165
- --authrim-color-warning-text: #fcd34d;
166
-
167
- /* Error */
168
- --authrim-color-error: #fb7185;
169
- --authrim-color-error-hover: #fda4af;
170
- --authrim-color-error-subtle: rgba(251, 113, 133, 0.15);
171
- --authrim-color-error-text: #fda4af;
172
-
173
- /* Info */
174
- --authrim-color-info: #22d3ee;
175
- --authrim-color-info-hover: #67e8f9;
176
- --authrim-color-info-subtle: rgba(34, 211, 238, 0.15);
177
- --authrim-color-info-text: #67e8f9;
178
-
179
- /* === Neutrals === */
180
- --authrim-color-bg: #09090b;
181
- --authrim-color-bg-elevated: #18181b;
182
- --authrim-color-bg-subtle: #27272a;
183
- --authrim-color-bg-muted: #3f3f46;
184
- --authrim-color-bg-inverse: #fafafa;
185
-
186
- --authrim-color-text: #fafafa;
187
- --authrim-color-text-secondary: #a1a1aa;
188
- --authrim-color-text-muted: #71717a;
189
- --authrim-color-text-inverse: #09090b;
190
-
191
- --authrim-color-border: #27272a;
192
- --authrim-color-border-subtle: #18181b;
193
- --authrim-color-border-strong: #3f3f46;
194
- --authrim-color-border-focus: var(--authrim-color-primary);
195
-
196
- /* === Shadows (adjusted for dark) === */
197
- --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
198
- --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
199
- --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
200
- --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
201
- --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
202
- --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
203
- --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
204
- }
205
-
206
- /*
207
- * System preference detection
208
- * Applies dark theme when:
209
- * 1. User's system prefers dark mode AND
210
- * 2. No explicit data-theme="light" is set
211
- *
212
- * Note: [data-theme="dark"] selector (above) handles explicit dark theme selection.
213
- * This media query handles automatic detection when no theme is explicitly set.
214
- */
215
- @media (prefers-color-scheme: dark) {
216
- :root:not([data-theme="light"]):not([data-theme="dark"]) {
217
- /* Inherits dark theme variables - uses same values as [data-theme="dark"] */
218
- /* Primary - Electric Indigo (adjusted for dark) */
219
- --authrim-color-primary: #818cf8;
220
- --authrim-color-primary-hover: #a5b4fc;
221
- --authrim-color-primary-active: #6366f1;
222
- --authrim-color-primary-subtle: rgba(129, 140, 248, 0.15);
223
- --authrim-color-primary-text: #09090b;
224
-
225
- /* Accent - Vivid Coral */
226
- --authrim-color-accent: #fb7185;
227
- --authrim-color-accent-hover: #fda4af;
228
- --authrim-color-accent-subtle: rgba(251, 113, 133, 0.15);
229
-
230
- /* Success */
231
- --authrim-color-success: #34d399;
232
- --authrim-color-success-hover: #6ee7b7;
233
- --authrim-color-success-subtle: rgba(52, 211, 153, 0.15);
234
- --authrim-color-success-text: #6ee7b7;
235
-
236
- /* Warning */
237
- --authrim-color-warning: #fbbf24;
238
- --authrim-color-warning-hover: #fcd34d;
239
- --authrim-color-warning-subtle: rgba(251, 191, 36, 0.15);
240
- --authrim-color-warning-text: #fcd34d;
241
-
242
- /* Error */
243
- --authrim-color-error: #fb7185;
244
- --authrim-color-error-hover: #fda4af;
245
- --authrim-color-error-subtle: rgba(251, 113, 133, 0.15);
246
- --authrim-color-error-text: #fda4af;
247
-
248
- /* Info */
249
- --authrim-color-info: #22d3ee;
250
- --authrim-color-info-hover: #67e8f9;
251
- --authrim-color-info-subtle: rgba(34, 211, 238, 0.15);
252
- --authrim-color-info-text: #67e8f9;
253
-
254
- /* Neutrals */
255
- --authrim-color-bg: #09090b;
256
- --authrim-color-bg-elevated: #18181b;
257
- --authrim-color-bg-subtle: #27272a;
258
- --authrim-color-bg-muted: #3f3f46;
259
- --authrim-color-bg-inverse: #fafafa;
260
-
261
- --authrim-color-text: #fafafa;
262
- --authrim-color-text-secondary: #a1a1aa;
263
- --authrim-color-text-muted: #71717a;
264
- --authrim-color-text-inverse: #09090b;
265
-
266
- --authrim-color-border: #27272a;
267
- --authrim-color-border-subtle: #18181b;
268
- --authrim-color-border-strong: #3f3f46;
269
-
270
- /* Shadows (adjusted for dark) */
271
- --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
272
- --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
273
- --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
274
- --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
275
- --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
276
- --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
277
- --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
278
- }
279
- }
1
+ /**
2
+ * Authrim UI Theme
3
+ *
4
+ * Design Direction: Refined Brutalist
5
+ * - Sharp geometric forms with subtle softening
6
+ * - Monochromatic base with electric accent colors
7
+ * - Bold typography with precise spacing
8
+ * - Micro-interactions that feel intentional
9
+ */
10
+
11
+ @import url('https://fonts.googleapis.com/css2?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&family=JetBrains+Mono:wght@400;500&display=swap');
12
+
13
+ :root,
14
+ [data-theme="light"] {
15
+ /* === Typography === */
16
+ --authrim-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
17
+ --authrim-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
18
+
19
+ /* === Color Palette === */
20
+ /* Primary - Electric Indigo */
21
+ --authrim-color-primary: #4f46e5;
22
+ --authrim-color-primary-hover: #4338ca;
23
+ --authrim-color-primary-active: #3730a3;
24
+ --authrim-color-primary-subtle: #eef2ff;
25
+ --authrim-color-primary-text: #ffffff;
26
+
27
+ /* Accent - Vivid Coral */
28
+ --authrim-color-accent: #f43f5e;
29
+ --authrim-color-accent-hover: #e11d48;
30
+ --authrim-color-accent-subtle: #fff1f2;
31
+
32
+ /* Success - Emerald */
33
+ --authrim-color-success: #059669;
34
+ --authrim-color-success-hover: #047857;
35
+ --authrim-color-success-subtle: #ecfdf5;
36
+ --authrim-color-success-text: #065f46;
37
+
38
+ /* Warning - Amber */
39
+ --authrim-color-warning: #d97706;
40
+ --authrim-color-warning-hover: #b45309;
41
+ --authrim-color-warning-subtle: #fffbeb;
42
+ --authrim-color-warning-text: #92400e;
43
+
44
+ /* Error - Rose */
45
+ --authrim-color-error: #e11d48;
46
+ --authrim-color-error-hover: #be123c;
47
+ --authrim-color-error-subtle: #fff1f2;
48
+ --authrim-color-error-text: #9f1239;
49
+
50
+ /* Info - Cyan */
51
+ --authrim-color-info: #0891b2;
52
+ --authrim-color-info-hover: #0e7490;
53
+ --authrim-color-info-subtle: #ecfeff;
54
+ --authrim-color-info-text: #155e75;
55
+
56
+ /* === Neutrals === */
57
+ --authrim-color-bg: #ffffff;
58
+ --authrim-color-bg-elevated: #fafafa;
59
+ --authrim-color-bg-subtle: #f4f4f5;
60
+ --authrim-color-bg-muted: #e4e4e7;
61
+ --authrim-color-bg-inverse: #18181b;
62
+
63
+ --authrim-color-text: #09090b;
64
+ --authrim-color-text-secondary: #52525b;
65
+ --authrim-color-text-muted: #a1a1aa;
66
+ --authrim-color-text-inverse: #fafafa;
67
+
68
+ --authrim-color-border: #e4e4e7;
69
+ --authrim-color-border-subtle: #f4f4f5;
70
+ --authrim-color-border-strong: #d4d4d8;
71
+ --authrim-color-border-focus: var(--authrim-color-primary);
72
+
73
+ /* === Shadows === */
74
+ --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
75
+ --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
76
+ --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
77
+ --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
78
+ --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
79
+ --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
80
+ --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
81
+
82
+ /* === Radii === */
83
+ --authrim-radius-sm: 6px;
84
+ --authrim-radius-md: 10px;
85
+ --authrim-radius-lg: 14px;
86
+ --authrim-radius-xl: 20px;
87
+ --authrim-radius-full: 9999px;
88
+
89
+ /* === Spacing === */
90
+ --authrim-space-0: 0;
91
+ --authrim-space-1: 4px;
92
+ --authrim-space-2: 8px;
93
+ --authrim-space-3: 12px;
94
+ --authrim-space-4: 16px;
95
+ --authrim-space-5: 20px;
96
+ --authrim-space-6: 24px;
97
+ --authrim-space-8: 32px;
98
+ --authrim-space-10: 40px;
99
+ --authrim-space-12: 48px;
100
+ --authrim-space-16: 64px;
101
+
102
+ /* === Typography Scale === */
103
+ --authrim-text-xs: 0.75rem;
104
+ --authrim-text-sm: 0.875rem;
105
+ --authrim-text-base: 1rem;
106
+ --authrim-text-lg: 1.125rem;
107
+ --authrim-text-xl: 1.25rem;
108
+ --authrim-text-2xl: 1.5rem;
109
+ --authrim-text-3xl: 1.875rem;
110
+
111
+ --authrim-leading-tight: 1.25;
112
+ --authrim-leading-snug: 1.375;
113
+ --authrim-leading-normal: 1.5;
114
+ --authrim-leading-relaxed: 1.625;
115
+
116
+ --authrim-tracking-tight: -0.025em;
117
+ --authrim-tracking-normal: 0;
118
+ --authrim-tracking-wide: 0.025em;
119
+
120
+ /* === Transitions === */
121
+ --authrim-duration-instant: 50ms;
122
+ --authrim-duration-fast: 100ms;
123
+ --authrim-duration-normal: 200ms;
124
+ --authrim-duration-slow: 300ms;
125
+ --authrim-duration-slower: 500ms;
126
+
127
+ --authrim-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
128
+ --authrim-ease-in: cubic-bezier(0.4, 0, 1, 1);
129
+ --authrim-ease-out: cubic-bezier(0, 0, 0.2, 1);
130
+ --authrim-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
131
+
132
+ /* === Z-Index === */
133
+ --authrim-z-base: 0;
134
+ --authrim-z-dropdown: 50;
135
+ --authrim-z-sticky: 100;
136
+ --authrim-z-modal: 200;
137
+ --authrim-z-popover: 300;
138
+ --authrim-z-tooltip: 400;
139
+ }
140
+
141
+ [data-theme="dark"] {
142
+ /* === Color Palette === */
143
+ /* Primary - Electric Indigo (adjusted for dark) */
144
+ --authrim-color-primary: #818cf8;
145
+ --authrim-color-primary-hover: #a5b4fc;
146
+ --authrim-color-primary-active: #6366f1;
147
+ --authrim-color-primary-subtle: rgba(129, 140, 248, 0.15);
148
+ --authrim-color-primary-text: #09090b;
149
+
150
+ /* Accent - Vivid Coral */
151
+ --authrim-color-accent: #fb7185;
152
+ --authrim-color-accent-hover: #fda4af;
153
+ --authrim-color-accent-subtle: rgba(251, 113, 133, 0.15);
154
+
155
+ /* Success */
156
+ --authrim-color-success: #34d399;
157
+ --authrim-color-success-hover: #6ee7b7;
158
+ --authrim-color-success-subtle: rgba(52, 211, 153, 0.15);
159
+ --authrim-color-success-text: #6ee7b7;
160
+
161
+ /* Warning */
162
+ --authrim-color-warning: #fbbf24;
163
+ --authrim-color-warning-hover: #fcd34d;
164
+ --authrim-color-warning-subtle: rgba(251, 191, 36, 0.15);
165
+ --authrim-color-warning-text: #fcd34d;
166
+
167
+ /* Error */
168
+ --authrim-color-error: #fb7185;
169
+ --authrim-color-error-hover: #fda4af;
170
+ --authrim-color-error-subtle: rgba(251, 113, 133, 0.15);
171
+ --authrim-color-error-text: #fda4af;
172
+
173
+ /* Info */
174
+ --authrim-color-info: #22d3ee;
175
+ --authrim-color-info-hover: #67e8f9;
176
+ --authrim-color-info-subtle: rgba(34, 211, 238, 0.15);
177
+ --authrim-color-info-text: #67e8f9;
178
+
179
+ /* === Neutrals === */
180
+ --authrim-color-bg: #09090b;
181
+ --authrim-color-bg-elevated: #18181b;
182
+ --authrim-color-bg-subtle: #27272a;
183
+ --authrim-color-bg-muted: #3f3f46;
184
+ --authrim-color-bg-inverse: #fafafa;
185
+
186
+ --authrim-color-text: #fafafa;
187
+ --authrim-color-text-secondary: #a1a1aa;
188
+ --authrim-color-text-muted: #71717a;
189
+ --authrim-color-text-inverse: #09090b;
190
+
191
+ --authrim-color-border: #27272a;
192
+ --authrim-color-border-subtle: #18181b;
193
+ --authrim-color-border-strong: #3f3f46;
194
+ --authrim-color-border-focus: var(--authrim-color-primary);
195
+
196
+ /* === Shadows (adjusted for dark) === */
197
+ --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
198
+ --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
199
+ --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
200
+ --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
201
+ --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
202
+ --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
203
+ --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
204
+ }
205
+
206
+ /*
207
+ * System preference detection
208
+ * Applies dark theme when:
209
+ * 1. User's system prefers dark mode AND
210
+ * 2. No explicit data-theme="light" is set
211
+ *
212
+ * Note: [data-theme="dark"] selector (above) handles explicit dark theme selection.
213
+ * This media query handles automatic detection when no theme is explicitly set.
214
+ */
215
+ @media (prefers-color-scheme: dark) {
216
+ :root:not([data-theme="light"]):not([data-theme="dark"]) {
217
+ /* Inherits dark theme variables - uses same values as [data-theme="dark"] */
218
+ /* Primary - Electric Indigo (adjusted for dark) */
219
+ --authrim-color-primary: #818cf8;
220
+ --authrim-color-primary-hover: #a5b4fc;
221
+ --authrim-color-primary-active: #6366f1;
222
+ --authrim-color-primary-subtle: rgba(129, 140, 248, 0.15);
223
+ --authrim-color-primary-text: #09090b;
224
+
225
+ /* Accent - Vivid Coral */
226
+ --authrim-color-accent: #fb7185;
227
+ --authrim-color-accent-hover: #fda4af;
228
+ --authrim-color-accent-subtle: rgba(251, 113, 133, 0.15);
229
+
230
+ /* Success */
231
+ --authrim-color-success: #34d399;
232
+ --authrim-color-success-hover: #6ee7b7;
233
+ --authrim-color-success-subtle: rgba(52, 211, 153, 0.15);
234
+ --authrim-color-success-text: #6ee7b7;
235
+
236
+ /* Warning */
237
+ --authrim-color-warning: #fbbf24;
238
+ --authrim-color-warning-hover: #fcd34d;
239
+ --authrim-color-warning-subtle: rgba(251, 191, 36, 0.15);
240
+ --authrim-color-warning-text: #fcd34d;
241
+
242
+ /* Error */
243
+ --authrim-color-error: #fb7185;
244
+ --authrim-color-error-hover: #fda4af;
245
+ --authrim-color-error-subtle: rgba(251, 113, 133, 0.15);
246
+ --authrim-color-error-text: #fda4af;
247
+
248
+ /* Info */
249
+ --authrim-color-info: #22d3ee;
250
+ --authrim-color-info-hover: #67e8f9;
251
+ --authrim-color-info-subtle: rgba(34, 211, 238, 0.15);
252
+ --authrim-color-info-text: #67e8f9;
253
+
254
+ /* Neutrals */
255
+ --authrim-color-bg: #09090b;
256
+ --authrim-color-bg-elevated: #18181b;
257
+ --authrim-color-bg-subtle: #27272a;
258
+ --authrim-color-bg-muted: #3f3f46;
259
+ --authrim-color-bg-inverse: #fafafa;
260
+
261
+ --authrim-color-text: #fafafa;
262
+ --authrim-color-text-secondary: #a1a1aa;
263
+ --authrim-color-text-muted: #71717a;
264
+ --authrim-color-text-inverse: #09090b;
265
+
266
+ --authrim-color-border: #27272a;
267
+ --authrim-color-border-subtle: #18181b;
268
+ --authrim-color-border-strong: #3f3f46;
269
+
270
+ /* Shadows (adjusted for dark) */
271
+ --authrim-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
272
+ --authrim-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
273
+ --authrim-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
274
+ --authrim-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
275
+ --authrim-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
276
+ --authrim-shadow-focus: 0 0 0 3px var(--authrim-color-primary-subtle);
277
+ --authrim-shadow-focus-error: 0 0 0 3px var(--authrim-color-error-subtle);
278
+ }
279
+ }