bank20baht-ui 0.0.1

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 (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +190 -0
  3. package/dist/chunks/baht-toast-BlZBbneT.js +324 -0
  4. package/dist/components/baht-form.d.ts +41 -0
  5. package/dist/components/baht-workflow.d.ts +64 -0
  6. package/dist/components/base.d.ts +38 -0
  7. package/dist/components/primitives/baht-accordion.d.ts +26 -0
  8. package/dist/components/primitives/baht-alert.d.ts +17 -0
  9. package/dist/components/primitives/baht-badge.d.ts +19 -0
  10. package/dist/components/primitives/baht-breadcrumbs.d.ts +22 -0
  11. package/dist/components/primitives/baht-button.d.ts +31 -0
  12. package/dist/components/primitives/baht-card.d.ts +18 -0
  13. package/dist/components/primitives/baht-checkbox.d.ts +7 -0
  14. package/dist/components/primitives/baht-code.d.ts +18 -0
  15. package/dist/components/primitives/baht-datepicker.d.ts +6 -0
  16. package/dist/components/primitives/baht-fieldset.d.ts +17 -0
  17. package/dist/components/primitives/baht-file.d.ts +9 -0
  18. package/dist/components/primitives/baht-filter.d.ts +24 -0
  19. package/dist/components/primitives/baht-input.d.ts +6 -0
  20. package/dist/components/primitives/baht-link.d.ts +17 -0
  21. package/dist/components/primitives/baht-list.d.ts +28 -0
  22. package/dist/components/primitives/baht-modal.d.ts +32 -0
  23. package/dist/components/primitives/baht-multiselect.d.ts +8 -0
  24. package/dist/components/primitives/baht-number.d.ts +5 -0
  25. package/dist/components/primitives/baht-otp.d.ts +26 -0
  26. package/dist/components/primitives/baht-pagination.d.ts +21 -0
  27. package/dist/components/primitives/baht-progress.d.ts +16 -0
  28. package/dist/components/primitives/baht-radio.d.ts +5 -0
  29. package/dist/components/primitives/baht-range.d.ts +21 -0
  30. package/dist/components/primitives/baht-rating.d.ts +22 -0
  31. package/dist/components/primitives/baht-select.d.ts +5 -0
  32. package/dist/components/primitives/baht-skeleton.d.ts +16 -0
  33. package/dist/components/primitives/baht-spinner.d.ts +13 -0
  34. package/dist/components/primitives/baht-table.d.ts +44 -0
  35. package/dist/components/primitives/baht-text.d.ts +8 -0
  36. package/dist/components/primitives/baht-textarea.d.ts +5 -0
  37. package/dist/components/primitives/baht-timeline.d.ts +21 -0
  38. package/dist/components/primitives/baht-toast.d.ts +27 -0
  39. package/dist/components/primitives/baht-toggle.d.ts +6 -0
  40. package/dist/components/primitives/baht-tooltip.d.ts +29 -0
  41. package/dist/components/primitives/icons.d.ts +13 -0
  42. package/dist/components/primitives/index.d.ts +38 -0
  43. package/dist/core/approval.d.ts +9 -0
  44. package/dist/core/defaults.d.ts +6 -0
  45. package/dist/core/engine/conditions.d.ts +4 -0
  46. package/dist/core/engine/evaluate.d.ts +8 -0
  47. package/dist/core/engine/expressions.d.ts +3 -0
  48. package/dist/core/index.d.ts +7 -0
  49. package/dist/core/types.d.ts +166 -0
  50. package/dist/core/validators.d.ts +6 -0
  51. package/dist/custom-elements.json +7761 -0
  52. package/dist/engine.js +329 -0
  53. package/dist/index.d.ts +5 -0
  54. package/dist/index.js +1796 -0
  55. package/dist/overlay.d.ts +45 -0
  56. package/dist/overlay.js +121 -0
  57. package/dist/react.d.ts +191 -0
  58. package/dist/react.js +1 -0
  59. package/dist/tokens.css +936 -0
  60. package/dist/vscode.css-custom-data.json +6 -0
  61. package/dist/vscode.html-custom-data.json +479 -0
  62. package/dist/web-types.json +1226 -0
  63. package/package.json +94 -0
@@ -0,0 +1,936 @@
1
+ /* ============================================================
2
+ bahtui design tokens — 20baht design system
3
+ Banknote green · cream paper · engraved details.
4
+
5
+ Every value below is a CSS custom property. Override any of
6
+ them on :root (or any ancestor) to retheme — at build time,
7
+ at runtime ("CSS on the fly"), or by injecting your own sheet.
8
+ ============================================================ */
9
+
10
+ /* Fonts (Google Fonts CDN). Self-host and drop this line if you prefer. */
11
+ @import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");
12
+
13
+ :root {
14
+ /* ---------- Raw scales (reference — prefer the semantic tokens below) ---------- */
15
+
16
+ /* Primary — banknote green */
17
+ --baht-green-50: #EAF5EE;
18
+ --baht-green-100: #D4ECDD;
19
+ --baht-green-200: #AEDABF;
20
+ --baht-green-300: #82C39E;
21
+ --baht-green-400: #4FA577;
22
+ --baht-green-500: #2C8C5B;
23
+ --baht-green-600: #1F7A4E; /* primary */
24
+ --baht-green-700: #186540;
25
+ --baht-green-800: #134F33;
26
+ --baht-green-900: #0D3422;
27
+ --baht-green-950: #061C12;
28
+
29
+ /* Cream / paper neutrals */
30
+ --baht-cream-50: #FDFCF7;
31
+ --baht-cream-100: #FAF6EA; /* page background */
32
+ --baht-cream-200: #F2EBD6;
33
+ --baht-cream-300: #E7E0CD; /* warm border */
34
+ --baht-cream-400: #C9C1A8;
35
+
36
+ /* Cool neutrals (on white surfaces) */
37
+ --baht-gray-50: #F7F8F7;
38
+ --baht-gray-100: #EEF0EE;
39
+ --baht-gray-200: #E5E7E5; /* cool border */
40
+ --baht-gray-300: #CFD2CF;
41
+ --baht-gray-400: #9AA09B;
42
+ --baht-gray-500: #6B7370;
43
+ --baht-gray-600: #4A5249;
44
+ --baht-gray-700: #333A33;
45
+ --baht-gray-800: #1F2521;
46
+ --baht-gray-900: #0E1F17; /* ink */
47
+
48
+ /* Accents */
49
+ --baht-gold-50: #FAF3E0;
50
+ --baht-gold-400: #D9B97A;
51
+ --baht-gold-500: #C9A55C; /* royal gold */
52
+ --baht-gold-600: #A78640;
53
+ --baht-gold-700: #7A6230; /* AA text on gold-50 (5.2:1) */
54
+
55
+ --baht-red-50: #F9E5E1;
56
+ --baht-red-400: #D86B5D;
57
+ --baht-red-500: #C44536; /* temple red */
58
+ --baht-red-600: #A33627;
59
+
60
+ --baht-slate-50: #E6ECF0;
61
+ --baht-slate-500: #3B5A6E; /* info */
62
+
63
+ /* ---------- Theme tier (daisyUI-style knobs — THE flexible theming API) ----------
64
+ Override any of these on :root (or a wrapper, or inline style) and every
65
+ semantic token below derives from them. Hover/active/tint shades are
66
+ computed with color-mix, so one --baht-primary swap rethemes everything. */
67
+ --baht-base-100: #FFFFFF; /* surfaces: cards, inputs, modals */
68
+ --baht-base-200: var(--baht-cream-100); /* page background */
69
+ --baht-base-300: var(--baht-cream-200); /* sunken wells, code chips */
70
+ --baht-base-content: var(--baht-gray-900);
71
+
72
+ --baht-primary: var(--baht-green-600);
73
+ --baht-primary-content: #FFFFFF;
74
+ --baht-secondary: var(--baht-slate-500);
75
+ --baht-secondary-content: #FFFFFF;
76
+ --baht-accent: var(--baht-gold-500);
77
+ --baht-accent-content: var(--baht-gray-900);
78
+ --baht-neutral: var(--baht-gray-900); /* ink: inverse blocks, code panels */
79
+ --baht-neutral-content: var(--baht-cream-50);
80
+
81
+ --baht-info: var(--baht-slate-500);
82
+ --baht-info-content: #FFFFFF;
83
+ --baht-success: var(--baht-green-600);
84
+ --baht-success-content: #FFFFFF;
85
+ --baht-warning: var(--baht-gold-500);
86
+ --baht-warning-content: var(--baht-gray-900);
87
+ --baht-error: var(--baht-red-500);
88
+ --baht-error-content: #FFFFFF;
89
+
90
+ /* ---------- Semantic colors (stable names components consume) ---------- */
91
+ --baht-color-bg: var(--baht-base-200);
92
+ --baht-color-bg-elev: var(--baht-base-100);
93
+ --baht-color-bg-sunken: var(--baht-base-300);
94
+ --baht-color-bg-inverse: var(--baht-neutral);
95
+
96
+ --baht-color-surface: var(--baht-base-100);
97
+ --baht-color-surface-alt: var(--baht-cream-50);
98
+
99
+ --baht-color-text: var(--baht-base-content);
100
+ --baht-color-text-muted: var(--baht-gray-600);
101
+ --baht-color-text-subtle: var(--baht-gray-500);
102
+ --baht-color-text-inverse: var(--baht-neutral-content);
103
+
104
+ --baht-color-border: var(--baht-cream-300);
105
+ --baht-color-border-cool: var(--baht-gray-200);
106
+ --baht-color-border-strong: var(--baht-gray-300);
107
+
108
+ --baht-color-primary: var(--baht-primary);
109
+ --baht-color-primary-hover: color-mix(in oklab, var(--baht-primary) 84%, black);
110
+ --baht-color-primary-active: color-mix(in oklab, var(--baht-primary) 70%, black);
111
+ --baht-color-primary-tint: color-mix(in oklab, var(--baht-primary) 9%, white);
112
+ /* transparent washes for hover/active on light surfaces — derive from
113
+ --baht-primary so every banknote theme recolors them (never a fixed green) */
114
+ --baht-color-primary-wash: color-mix(in oklab, var(--baht-primary) 6%, transparent);
115
+ --baht-color-primary-wash-active: color-mix(in oklab, var(--baht-primary) 10%, transparent);
116
+ --baht-color-primary-contrast: var(--baht-primary-content);
117
+
118
+ --baht-color-success: var(--baht-success);
119
+ --baht-color-warning: var(--baht-warning);
120
+ --baht-color-danger: var(--baht-error);
121
+ --baht-color-danger-hover: color-mix(in oklab, var(--baht-error) 84%, black);
122
+ --baht-color-info: var(--baht-info);
123
+
124
+ --baht-color-error: var(--baht-error); /* alias kept for form validation styling */
125
+ --baht-color-link: color-mix(in oklab, var(--baht-primary) 90%, black);
126
+ --baht-color-focus: var(--baht-primary);
127
+
128
+ /* ---------- Typography ---------- */
129
+ --baht-font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
130
+ --baht-font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
131
+ --baht-font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;
132
+
133
+ /* rem so user font-size settings scale the whole system (WCAG 1.4.4) */
134
+ --baht-text-xs: 0.75rem; /* 12px */
135
+ --baht-text-sm: 0.8125rem; /* 13px */
136
+ --baht-text-base: 0.9375rem; /* 15px */
137
+ --baht-text-md: 1rem; /* 16px */
138
+ --baht-text-lg: 1.125rem; /* 18px */
139
+ --baht-text-xl: 1.3125rem; /* 21px */
140
+ --baht-text-2xl: 1.5625rem; /* 25px */
141
+
142
+ --baht-font-size: 0.875rem; /* 14px */
143
+ --baht-font-size-label: var(--baht-text-sm);
144
+ --baht-font-size-error: var(--baht-text-xs);
145
+ --baht-font-weight-label: 500;
146
+
147
+ --baht-leading-tight: 1.1;
148
+ --baht-leading-normal: 1.5;
149
+ --baht-tracking-tight: -0.02em;
150
+ --baht-tracking-widest: 0.12em;
151
+
152
+ /* ---------- Spacing (4px base) ---------- */
153
+ --baht-space-1: 4px;
154
+ --baht-space-2: 8px;
155
+ --baht-space-3: 12px;
156
+ --baht-space-4: 16px;
157
+ --baht-space-5: 20px;
158
+ --baht-space-6: 24px;
159
+ --baht-space-8: 32px;
160
+ --baht-space-10: 40px;
161
+ --baht-space-12: 48px;
162
+
163
+ /* ---------- Radii (three knobs, daisyUI-style) ---------- */
164
+ --baht-radius-field: 10px; /* inputs, buttons */
165
+ --baht-radius-box: 12px; /* cards, panels, modals */
166
+ --baht-radius-selector: 999px; /* checkboxes, toggles, badges, pills */
167
+
168
+ --baht-radius-xs: 4px; /* chips, badges */
169
+ --baht-radius-sm: 8px; /* inputs (small), menu items */
170
+ --baht-radius: var(--baht-radius-field);
171
+ --baht-radius-md: var(--baht-radius-box);
172
+ --baht-radius-lg: 20px; /* large cards, modals */
173
+ --baht-radius-pill: var(--baht-radius-selector);
174
+
175
+ /* ---------- Borders / effects ---------- */
176
+ --baht-border-width: 1px;
177
+ --baht-border: var(--baht-border-width) solid var(--baht-color-border-cool);
178
+ --baht-depth: 0; /* reserved: extra elevation multiplier */
179
+ --baht-noise: 0; /* reserved: paper-grain overlay opacity */
180
+
181
+ /* ---------- Shadows (two elevations only, never inner) ---------- */
182
+ --baht-shadow-lift: 0 1px 2px rgba(14, 31, 23, 0.06), 0 4px 12px -2px rgba(14, 31, 23, 0.08);
183
+ --baht-shadow-float: 0 4px 16px rgba(14, 31, 23, 0.08), 0 24px 48px -8px rgba(14, 31, 23, 0.12);
184
+
185
+ /* ---------- Motion ("paper" ease — quick start, gentle settle) ---------- */
186
+ --baht-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
187
+ --baht-dur-fast: 120ms;
188
+ --baht-dur-base: 200ms;
189
+ --baht-dur-slow: 320ms;
190
+
191
+ /* ---------- Controls ---------- */
192
+ --baht-size-field: 0.25rem; /* control height = size-field × 10 (0.25rem → 40px) */
193
+ --baht-size-selector: 0.25rem; /* reserved: checkbox/toggle geometry */
194
+ --baht-control-height: calc(var(--baht-size-field) * 10);
195
+ --baht-control-padding-x: var(--baht-space-3);
196
+ --baht-field-gap: var(--baht-space-4);
197
+ }
198
+
199
+ /* ============================================================
200
+ Structural styles (light DOM — override freely per app)
201
+ ============================================================ */
202
+
203
+ .baht-form {
204
+ display: flex;
205
+ flex-wrap: wrap;
206
+ gap: var(--baht-field-gap);
207
+ font-family: var(--baht-font-family);
208
+ font-size: var(--baht-font-size);
209
+ color: var(--baht-color-text);
210
+ }
211
+
212
+ /* width -> flex-basis (spec 01 §3): 1/4 1/2 3/4 full, minus gutters */
213
+ .baht-field { display: block; flex: 0 0 100%; min-width: 0; }
214
+ .baht-field--w-1-4 { flex-basis: calc(25% - var(--baht-field-gap) * 3 / 4); }
215
+ .baht-field--w-1-2 { flex-basis: calc(50% - var(--baht-field-gap) / 2); }
216
+ .baht-field--w-3-4 { flex-basis: calc(75% - var(--baht-field-gap) / 4); }
217
+ .baht-field--w-full { flex-basis: 100%; }
218
+ .baht-field--hidden { display: none; }
219
+
220
+ .baht-label {
221
+ display: block;
222
+ margin-bottom: 6px;
223
+ font-size: var(--baht-font-size-label);
224
+ font-weight: var(--baht-font-weight-label);
225
+ color: var(--baht-gray-800);
226
+ }
227
+ .baht-required-mark { color: var(--baht-color-error); margin-left: 2px; }
228
+
229
+ .baht-control {
230
+ box-sizing: border-box;
231
+ width: 100%;
232
+ min-height: var(--baht-control-height);
233
+ padding: 10px var(--baht-control-padding-x);
234
+ border: 1px solid var(--baht-color-border-strong);
235
+ border-radius: var(--baht-radius);
236
+ background: var(--baht-color-surface);
237
+ color: var(--baht-color-text);
238
+ font: inherit;
239
+ transition:
240
+ border-color var(--baht-dur-fast) var(--baht-ease),
241
+ outline-color var(--baht-dur-fast) var(--baht-ease);
242
+ }
243
+ .baht-control::placeholder { color: var(--baht-gray-500); } /* gray-400 fails 4.5:1 on white */
244
+ .baht-control:focus-visible {
245
+ border-color: var(--baht-color-focus);
246
+ outline: 2px solid var(--baht-color-focus);
247
+ outline-offset: 0;
248
+ }
249
+ .baht-control:disabled { opacity: 0.4; cursor: not-allowed; }
250
+ .baht-control[aria-invalid='true'] { border-color: var(--baht-color-error); }
251
+ .baht-control--textarea { min-height: auto; }
252
+ .baht-control--radio, .baht-control--multiselect, .baht-control--checkbox, .baht-control--toggle {
253
+ border: none; padding: 0; min-height: auto; background: none;
254
+ display: flex; flex-direction: column; gap: var(--baht-space-1);
255
+ }
256
+ .baht-option { display: flex; align-items: center; gap: var(--baht-space-2); cursor: pointer; }
257
+ .baht-option .baht-label { margin: 0; font-weight: normal; font-size: var(--baht-font-size); color: var(--baht-color-text); }
258
+ .baht-option input[type='checkbox'], .baht-option input[type='radio'] { accent-color: var(--baht-color-primary); }
259
+
260
+ /* toggle switch */
261
+ .baht-control--toggle { flex-direction: row; align-items: center; }
262
+ .baht-control--toggle input[type='checkbox'] { position: absolute; opacity: 0; pointer-events: none; }
263
+ .baht-toggle-track {
264
+ width: 36px; height: 20px; border-radius: var(--baht-radius-pill);
265
+ background: var(--baht-gray-300); transition: background var(--baht-dur-fast) var(--baht-ease);
266
+ flex: none; position: relative;
267
+ }
268
+ .baht-toggle-thumb {
269
+ position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
270
+ border-radius: 50%; background: var(--baht-color-surface);
271
+ transition: left var(--baht-dur-fast) var(--baht-ease);
272
+ }
273
+ .baht-control--toggle input:checked + .baht-toggle-track { background: var(--baht-color-primary); }
274
+ .baht-control--toggle input:checked + .baht-toggle-track .baht-toggle-thumb { left: 18px; }
275
+ /* the real checkbox is visually hidden — surface keyboard focus on the track */
276
+ .baht-control--toggle input:focus-visible + .baht-toggle-track {
277
+ outline: 2px solid var(--baht-color-focus);
278
+ outline-offset: 2px;
279
+ }
280
+
281
+ .baht-error {
282
+ margin-top: 6px;
283
+ color: var(--baht-red-600);
284
+ font-size: var(--baht-font-size-error);
285
+ }
286
+ .baht-help {
287
+ margin-top: 6px;
288
+ color: var(--baht-color-text-muted);
289
+ font-size: var(--baht-text-xs);
290
+ }
291
+
292
+ .baht-text { color: var(--baht-color-text); }
293
+ .baht-text--muted, .baht-text--info { color: var(--baht-color-text-muted); }
294
+ .baht-text--heading {
295
+ font-family: var(--baht-font-display);
296
+ font-size: var(--baht-text-2xl);
297
+ font-weight: 500;
298
+ letter-spacing: var(--baht-tracking-tight);
299
+ line-height: var(--baht-leading-tight);
300
+ }
301
+
302
+ /* ============================================================
303
+ Buttons — no scale, no shadow change; color does all the work
304
+ ============================================================ */
305
+
306
+ .baht-button {
307
+ display: inline-flex;
308
+ align-items: center;
309
+ justify-content: center;
310
+ gap: var(--baht-space-2);
311
+ min-height: var(--baht-control-height);
312
+ padding: 10px var(--baht-space-4);
313
+ border: 1px solid transparent;
314
+ border-radius: var(--baht-radius-md);
315
+ background: var(--baht-color-primary);
316
+ color: var(--baht-color-primary-contrast);
317
+ font-family: var(--baht-font-family);
318
+ font-size: var(--baht-font-size);
319
+ font-weight: 500;
320
+ cursor: pointer;
321
+ transition:
322
+ background var(--baht-dur-fast) var(--baht-ease),
323
+ border-color var(--baht-dur-fast) var(--baht-ease),
324
+ color var(--baht-dur-fast) var(--baht-ease);
325
+ }
326
+ .baht-button:hover { background: var(--baht-color-primary-hover); }
327
+ .baht-button:active { background: var(--baht-color-primary-active); }
328
+ .baht-button:focus-visible { outline: 2px solid var(--baht-color-focus); outline-offset: 2px; }
329
+ .baht-button:disabled { opacity: 0.4; cursor: not-allowed; }
330
+ .baht-button:disabled:hover { background: var(--baht-color-primary); }
331
+
332
+ .baht-button--secondary {
333
+ background: var(--baht-color-surface);
334
+ color: var(--baht-color-text);
335
+ border-color: var(--baht-color-border-strong);
336
+ }
337
+ .baht-button--secondary:hover { background: var(--baht-color-primary-wash); }
338
+ .baht-button--secondary:active { background: var(--baht-color-primary-wash-active); }
339
+ .baht-button--secondary:disabled:hover { background: var(--baht-color-surface); }
340
+
341
+ .baht-button--ghost {
342
+ background: transparent;
343
+ color: var(--baht-color-text);
344
+ }
345
+ .baht-button--ghost:hover { background: var(--baht-color-primary-wash); }
346
+ .baht-button--ghost:active { background: var(--baht-color-primary-wash-active); }
347
+ .baht-button--ghost:disabled:hover { background: transparent; }
348
+
349
+ .baht-button--danger { background: var(--baht-color-danger); }
350
+ .baht-button--danger:hover { background: var(--baht-color-danger-hover); }
351
+ .baht-button--danger:active { background: var(--baht-red-600); }
352
+ .baht-button--danger:disabled:hover { background: var(--baht-color-danger); }
353
+
354
+ .baht-button--sm {
355
+ min-height: 32px;
356
+ padding: 6px var(--baht-space-3);
357
+ font-size: var(--baht-text-sm);
358
+ border-radius: var(--baht-radius-sm);
359
+ }
360
+ .baht-button--lg {
361
+ min-height: 48px;
362
+ padding: 14px 22px;
363
+ font-size: var(--baht-text-md);
364
+ border-radius: 14px;
365
+ }
366
+
367
+ /* leading icon inside a button — inherits currentColor, never shrinks */
368
+ .baht-button .baht-icon { flex: 0 0 auto; }
369
+
370
+ /* icon-only: square, centered glyph */
371
+ .baht-button--icon { padding: 0; width: var(--baht-control-height); min-width: var(--baht-control-height); }
372
+ .baht-button--icon.baht-button--sm { width: 32px; min-width: 32px; }
373
+ .baht-button--icon.baht-button--lg { width: 48px; min-width: 48px; }
374
+
375
+ /* back-compat alias used by <baht-workflow>'s Back button */
376
+ .baht-button--back {
377
+ background: var(--baht-color-surface);
378
+ color: var(--baht-color-text);
379
+ border-color: var(--baht-color-border-strong);
380
+ }
381
+ .baht-button--back:hover { background: var(--baht-color-primary-wash); }
382
+ .baht-button--back:disabled:hover { background: var(--baht-color-surface); }
383
+
384
+ /* ============================================================
385
+ Badges — status pills, tags, counters
386
+ ============================================================ */
387
+
388
+ .baht-badge {
389
+ display: inline-flex;
390
+ align-items: center;
391
+ gap: 6px;
392
+ padding: 3px 10px;
393
+ border-radius: var(--baht-radius-pill);
394
+ font-family: var(--baht-font-family);
395
+ font-size: var(--baht-text-xs);
396
+ font-weight: 500;
397
+ background: var(--baht-color-bg-sunken);
398
+ color: var(--baht-gray-800);
399
+ }
400
+ .baht-badge-dot { width: 6px; height: 6px; border-radius: var(--baht-radius-pill); background: var(--baht-gray-500); }
401
+
402
+ .baht-badge--success { background: var(--baht-green-50); color: var(--baht-green-800); }
403
+ .baht-badge--success .baht-badge-dot { background: var(--baht-green-600); }
404
+ .baht-badge--danger { background: var(--baht-red-50); color: var(--baht-red-600); }
405
+ .baht-badge--danger .baht-badge-dot { background: var(--baht-red-500); }
406
+ .baht-badge--warning { background: var(--baht-gold-50); color: var(--baht-gold-700); }
407
+ .baht-badge--warning .baht-badge-dot { background: var(--baht-gold-500); }
408
+ .baht-badge--info { background: var(--baht-slate-50); color: var(--baht-slate-500); }
409
+ .baht-badge--info .baht-badge-dot { background: var(--baht-slate-500); }
410
+
411
+ .baht-badge--outline { background: var(--baht-color-surface); border: 1px solid var(--baht-color-border-cool); color: var(--baht-color-text); padding: 4px 10px; }
412
+ .baht-badge--solid { background: var(--baht-color-primary); color: var(--baht-color-primary-contrast); padding: 4px 10px; }
413
+ .baht-badge--gold { background: var(--baht-gold-500); color: var(--baht-gray-900); padding: 4px 10px; } /* white on gold = 2.3:1 */
414
+ .baht-badge--inverse { background: var(--baht-color-bg-inverse); color: var(--baht-color-text-inverse); padding: 4px 10px; }
415
+ .baht-badge--mono { font-family: var(--baht-font-mono); font-size: 0.6875rem; padding: 4px 8px; background: var(--baht-color-bg-sunken); color: var(--baht-gray-700); }
416
+
417
+ /* ============================================================
418
+ Code — inline chip + block
419
+ ============================================================ */
420
+ .baht-code {
421
+ font-family: var(--baht-font-mono);
422
+ font-size: 0.88em;
423
+ }
424
+ code.baht-code {
425
+ background: var(--baht-color-bg-sunken);
426
+ border: 1px solid var(--baht-color-border);
427
+ padding: 1px 6px;
428
+ border-radius: var(--baht-radius-xs);
429
+ white-space: nowrap;
430
+ }
431
+ .baht-code--block {
432
+ display: block;
433
+ background: var(--baht-color-bg-inverse);
434
+ color: var(--baht-cream-50);
435
+ padding: var(--baht-space-4);
436
+ border-radius: var(--baht-radius-md);
437
+ font-size: var(--baht-text-xs);
438
+ line-height: 1.6;
439
+ overflow-x: auto;
440
+ white-space: pre;
441
+ margin: 0;
442
+ }
443
+
444
+ /* ============================================================
445
+ Workflow chrome
446
+ ============================================================ */
447
+
448
+ .baht-workflow { display: block; font-family: var(--baht-font-family); }
449
+ .baht-workflow-nav {
450
+ display: flex;
451
+ justify-content: flex-end;
452
+ gap: var(--baht-space-2);
453
+ margin-top: var(--baht-space-6);
454
+ }
455
+
456
+ /* approval step (spec 03 §4): read-only summary + decision buttons */
457
+ .baht-approval { display: flex; flex-direction: column; gap: var(--baht-space-4); }
458
+ .baht-approval-summary {
459
+ background: var(--baht-color-bg-sunken);
460
+ border: 1px solid var(--baht-color-border);
461
+ border-radius: var(--baht-radius-md);
462
+ padding: var(--baht-space-4);
463
+ display: flex;
464
+ flex-direction: column;
465
+ gap: var(--baht-space-4);
466
+ }
467
+ .baht-approval-group-title {
468
+ margin: 0 0 var(--baht-space-2);
469
+ font-size: var(--baht-text-xs);
470
+ font-weight: 600;
471
+ text-transform: uppercase;
472
+ letter-spacing: 0.04em;
473
+ color: var(--baht-color-text-muted);
474
+ }
475
+ .baht-approval-rows { margin: 0; }
476
+ .baht-approval-row {
477
+ display: flex;
478
+ justify-content: space-between;
479
+ gap: var(--baht-space-4);
480
+ padding: 6px 0;
481
+ border-bottom: 1px dashed var(--baht-color-border);
482
+ font-size: var(--baht-text-sm);
483
+ }
484
+ .baht-approval-row:last-child { border-bottom: none; }
485
+ .baht-approval-row dt { color: var(--baht-color-text-muted); }
486
+ .baht-approval-row dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
487
+ .baht-approval-empty { margin: 0; color: var(--baht-color-text-muted); font-size: var(--baht-text-sm); }
488
+ .baht-approval-comment { display: flex; flex-direction: column; gap: var(--baht-space-1); }
489
+ .baht-approval-comment-label { font-size: var(--baht-text-sm); font-weight: 500; }
490
+ .baht-approval-comment textarea {
491
+ font-family: var(--baht-font-family);
492
+ font-size: var(--baht-font-size);
493
+ color: var(--baht-color-text);
494
+ background: var(--baht-color-surface);
495
+ border: 1px solid var(--baht-color-border-strong);
496
+ border-radius: var(--baht-radius-sm);
497
+ padding: var(--baht-space-2) var(--baht-space-3);
498
+ resize: vertical;
499
+ }
500
+ .baht-button--reject {
501
+ background: var(--baht-color-surface);
502
+ color: var(--baht-red-600);
503
+ border-color: var(--baht-red-500);
504
+ }
505
+ .baht-button--reject:hover { background: var(--baht-red-50); }
506
+
507
+ /* ============================================================
508
+ Data — table & list (server-side paging: host fetches per page)
509
+ ============================================================ */
510
+
511
+ .baht-table-wrap {
512
+ overflow-x: auto;
513
+ scroll-padding-top: 44px; /* focused rows stay clear of the sticky header (WCAG 2.4.11) */
514
+ background: var(--baht-color-surface);
515
+ border: 1px solid var(--baht-color-border-cool);
516
+ border-radius: var(--baht-radius-md);
517
+ font-family: var(--baht-font-family);
518
+ font-size: var(--baht-font-size);
519
+ color: var(--baht-color-text);
520
+ }
521
+ .baht-table { width: 100%; border-collapse: collapse; }
522
+ .baht-table th {
523
+ position: sticky; top: 0;
524
+ background: var(--baht-color-bg-inverse);
525
+ color: var(--baht-color-text-inverse);
526
+ font-weight: 600; font-size: var(--baht-text-sm);
527
+ text-align: left; padding: 10px var(--baht-space-4);
528
+ white-space: nowrap;
529
+ }
530
+ .baht-table th.baht-table-index { width: 56px; text-align: center; }
531
+ .baht-table td { padding: 12px var(--baht-space-4); border-top: 1px solid var(--baht-color-border-cool); }
532
+ .baht-table td.baht-table-index { text-align: center; color: var(--baht-color-text-subtle); }
533
+ .baht-table tbody tr:nth-child(even) { background: var(--baht-gray-50); }
534
+ .baht-table tbody tr[tabindex]:hover { background: var(--baht-color-primary-tint); cursor: pointer; }
535
+ .baht-table tbody tr[tabindex]:focus-visible { outline: 2px solid var(--baht-color-focus); outline-offset: -2px; }
536
+ .baht-table-state { padding: var(--baht-space-8); text-align: center; color: var(--baht-color-text-muted); }
537
+ .baht-table-state--error { color: var(--baht-red-600); }
538
+ .baht-table-footer { display: flex; justify-content: flex-end; padding: var(--baht-space-2) var(--baht-space-3); border-top: 1px solid var(--baht-color-border-cool); }
539
+
540
+ .baht-list { display: flex; flex-direction: column; font-family: var(--baht-font-family); font-size: var(--baht-font-size); color: var(--baht-color-text); background: var(--baht-color-surface); border: 1px solid var(--baht-color-border-cool); border-radius: var(--baht-radius-md); }
541
+ .baht-list-item { display: flex; align-items: center; gap: var(--baht-space-3); padding: var(--baht-space-3) var(--baht-space-4); border-top: 1px solid var(--baht-color-border-cool); }
542
+ .baht-list-item:first-child { border-top: none; }
543
+ .baht-list-item[tabindex]:hover { background: var(--baht-color-primary-tint); cursor: pointer; }
544
+ .baht-list-item[tabindex]:focus-visible { outline: 2px solid var(--baht-color-focus); outline-offset: -2px; }
545
+ .baht-list-main { flex: 1; min-width: 0; }
546
+ .baht-list-title { font-weight: 500; }
547
+ .baht-list-subtitle { font-size: var(--baht-text-sm); color: var(--baht-color-text-muted); }
548
+ .baht-list-meta { font-size: var(--baht-text-xs); color: var(--baht-color-text-subtle); font-family: var(--baht-font-mono); }
549
+ .baht-list-state { padding: var(--baht-space-6); text-align: center; color: var(--baht-color-text-muted); }
550
+ .baht-list-state--error { color: var(--baht-red-600); }
551
+
552
+ /* ============================================================
553
+ Skeleton & loading — pulse (no gradient shimmer: no gradients in core UI)
554
+ ============================================================ */
555
+
556
+ .baht-skeleton {
557
+ display: block;
558
+ background: var(--baht-gray-100);
559
+ border-radius: var(--baht-radius-sm);
560
+ animation: baht-pulse 1.4s var(--baht-ease) infinite;
561
+ }
562
+ .baht-skeleton--text { height: 1em; border-radius: var(--baht-radius-xs); }
563
+ .baht-skeleton--circle { border-radius: 50%; }
564
+ @keyframes baht-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
565
+
566
+ .baht-spinner {
567
+ display: inline-block;
568
+ width: 20px; height: 20px;
569
+ border: 2px solid var(--baht-gray-200);
570
+ border-top-color: var(--baht-color-primary);
571
+ border-radius: 50%;
572
+ animation: baht-spin 0.7s linear infinite;
573
+ }
574
+ .baht-spinner--sm { width: 14px; height: 14px; }
575
+ .baht-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
576
+ @keyframes baht-spin { to { transform: rotate(360deg); } }
577
+
578
+ /* ============================================================
579
+ Pagination
580
+ ============================================================ */
581
+
582
+ .baht-pagination { display: inline-flex; align-items: center; gap: var(--baht-space-1); font-family: var(--baht-font-family); font-size: var(--baht-text-sm); }
583
+ .baht-pagination button {
584
+ min-width: 32px; height: 32px; padding: 0 var(--baht-space-2);
585
+ border: 1px solid var(--baht-color-border-cool); border-radius: var(--baht-radius-sm);
586
+ background: var(--baht-color-surface); color: var(--baht-color-text);
587
+ font: inherit; cursor: pointer;
588
+ transition: background var(--baht-dur-fast) var(--baht-ease), border-color var(--baht-dur-fast) var(--baht-ease);
589
+ }
590
+ .baht-pagination button:hover { background: var(--baht-color-primary-wash); }
591
+ .baht-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
592
+ .baht-pagination button:disabled:hover { background: var(--baht-color-surface); }
593
+ .baht-pagination button[aria-current='page'] {
594
+ background: var(--baht-color-primary); border-color: var(--baht-color-primary);
595
+ color: var(--baht-color-primary-contrast); font-weight: 600;
596
+ }
597
+ .baht-pagination-ellipsis, .baht-pagination-label { padding: 0 var(--baht-space-2); color: var(--baht-color-text-muted); }
598
+
599
+ /* ============================================================
600
+ Overlay — modal (scrim 0.4, no blur; float shadow; radius 20) & tooltip & toast
601
+ ============================================================ */
602
+
603
+ .baht-modal-scrim {
604
+ position: fixed; inset: 0; z-index: 1000;
605
+ background: rgba(14, 31, 23, 0.4);
606
+ display: flex; align-items: center; justify-content: center;
607
+ padding: var(--baht-space-6);
608
+ animation: baht-fade-in var(--baht-dur-base) var(--baht-ease);
609
+ }
610
+ .baht-modal {
611
+ background: var(--baht-color-surface);
612
+ border-radius: var(--baht-radius-lg);
613
+ box-shadow: var(--baht-shadow-float);
614
+ max-width: 560px; width: 100%; max-height: 85vh;
615
+ display: flex; flex-direction: column;
616
+ font-family: var(--baht-font-family); color: var(--baht-color-text);
617
+ animation: baht-rise-in var(--baht-dur-base) var(--baht-ease);
618
+ }
619
+ .baht-modal-header { display: flex; align-items: center; gap: var(--baht-space-3); padding: var(--baht-space-5) var(--baht-space-6) 0; }
620
+ .baht-modal-title { flex: 1; font-family: var(--baht-font-display); font-size: var(--baht-text-xl); font-weight: 600; letter-spacing: var(--baht-tracking-tight); }
621
+ .baht-modal-close {
622
+ border: none; background: none; cursor: pointer; padding: var(--baht-space-1);
623
+ min-width: 24px; min-height: 24px;
624
+ display: inline-flex; align-items: center; justify-content: center;
625
+ color: var(--baht-color-text-muted); font-size: var(--baht-text-lg); line-height: 1;
626
+ border-radius: var(--baht-radius-xs);
627
+ }
628
+ .baht-modal-close:hover { color: var(--baht-color-text); }
629
+ .baht-modal-body { padding: var(--baht-space-4) var(--baht-space-6) var(--baht-space-6); overflow-y: auto; }
630
+ @keyframes baht-fade-in { from { opacity: 0; } }
631
+ @keyframes baht-rise-in { from { opacity: 0; transform: translateY(6px); } }
632
+
633
+ /* Service dialogs (bank20baht-ui/overlay — dialog.confirm/alert/error/prompt) */
634
+ .baht-dialog--info,
635
+ .baht-dialog--success,
636
+ .baht-dialog--warning,
637
+ .baht-dialog--danger { border-left: 3px solid; padding-left: var(--baht-space-4); }
638
+ .baht-dialog--info { border-left-color: var(--baht-color-info); }
639
+ .baht-dialog--success { border-left-color: var(--baht-color-success); }
640
+ .baht-dialog--warning { border-left-color: var(--baht-color-warning); }
641
+ .baht-dialog--danger { border-left-color: var(--baht-color-danger); }
642
+ .baht-dialog-message { margin: 0; font-size: var(--baht-text-base); line-height: var(--baht-leading-normal); }
643
+ .baht-dialog-detail {
644
+ margin: var(--baht-space-3) 0 0; padding: var(--baht-space-3);
645
+ background: var(--baht-color-bg-sunken); border-radius: var(--baht-radius-sm);
646
+ font-family: var(--baht-font-mono); font-size: var(--baht-text-xs);
647
+ color: var(--baht-color-text-muted);
648
+ white-space: pre-wrap; word-break: break-word;
649
+ max-height: 200px; overflow: auto;
650
+ }
651
+ .baht-dialog-input { width: 100%; margin-top: var(--baht-space-3); }
652
+ .baht-dialog-actions {
653
+ display: flex; justify-content: flex-end; gap: var(--baht-space-2);
654
+ margin-top: var(--baht-space-5);
655
+ }
656
+
657
+ .baht-tooltip-host { position: relative; display: inline-block; }
658
+ .baht-tooltip {
659
+ position: absolute; z-index: 1100;
660
+ background: var(--baht-color-bg-inverse); color: var(--baht-color-text-inverse);
661
+ font-family: var(--baht-font-family); font-size: var(--baht-text-xs);
662
+ padding: 5px 10px; border-radius: var(--baht-radius-sm);
663
+ white-space: nowrap; pointer-events: none;
664
+ opacity: 0; transition: opacity var(--baht-dur-fast) var(--baht-ease);
665
+ }
666
+ .baht-tooltip--top { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
667
+ .baht-tooltip--bottom { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
668
+ .baht-tooltip--left { right: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
669
+ .baht-tooltip--right { left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
670
+ .baht-tooltip-host:hover .baht-tooltip,
671
+ .baht-tooltip-host:focus-within .baht-tooltip { opacity: 1; }
672
+ /* Escape hides the tooltip until pointer/focus leaves (WCAG 1.4.13) */
673
+ .baht-tooltip-host--dismissed:hover .baht-tooltip,
674
+ .baht-tooltip-host--dismissed:focus-within .baht-tooltip { opacity: 0; }
675
+
676
+ .baht-toaster {
677
+ position: fixed; z-index: 1200; bottom: var(--baht-space-6); right: var(--baht-space-6);
678
+ display: flex; flex-direction: column; gap: var(--baht-space-2);
679
+ font-family: var(--baht-font-family);
680
+ }
681
+ .baht-toast {
682
+ display: flex; align-items: center; gap: var(--baht-space-3);
683
+ min-width: 260px; max-width: 380px;
684
+ background: var(--baht-color-surface);
685
+ border: 1px solid var(--baht-color-border-cool);
686
+ border-left: 3px solid var(--baht-color-primary);
687
+ border-radius: var(--baht-radius-md);
688
+ box-shadow: var(--baht-shadow-lift);
689
+ padding: var(--baht-space-3) var(--baht-space-4);
690
+ font-size: var(--baht-font-size); color: var(--baht-color-text);
691
+ animation: baht-rise-in var(--baht-dur-base) var(--baht-ease);
692
+ }
693
+ .baht-toast--success { border-left-color: var(--baht-color-success); }
694
+ .baht-toast--warning { border-left-color: var(--baht-color-warning); }
695
+ .baht-toast--danger { border-left-color: var(--baht-color-danger); }
696
+ .baht-toast--info { border-left-color: var(--baht-color-info); }
697
+ .baht-toast-message { flex: 1; }
698
+ .baht-toast-dismiss {
699
+ border: none; background: none; cursor: pointer; color: var(--baht-color-text-muted);
700
+ font-size: var(--baht-text-md); line-height: 1; padding: 2px;
701
+ min-width: 24px; min-height: 24px;
702
+ display: inline-flex; align-items: center; justify-content: center;
703
+ }
704
+
705
+ /* ============================================================
706
+ Feedback — alert & progress
707
+ ============================================================ */
708
+
709
+ .baht-alert {
710
+ display: flex; gap: var(--baht-space-3); align-items: flex-start;
711
+ border: 1px solid var(--baht-color-border-cool);
712
+ border-left: 3px solid var(--baht-color-info);
713
+ border-radius: var(--baht-radius-md);
714
+ background: var(--baht-color-surface);
715
+ padding: var(--baht-space-4);
716
+ font-family: var(--baht-font-family); font-size: var(--baht-font-size); color: var(--baht-color-text);
717
+ }
718
+ .baht-alert--success { border-left-color: var(--baht-color-success); background: var(--baht-green-50); }
719
+ .baht-alert--warning { border-left-color: var(--baht-color-warning); background: var(--baht-gold-50); }
720
+ .baht-alert--danger { border-left-color: var(--baht-color-danger); background: var(--baht-red-50); }
721
+ .baht-alert--info { border-left-color: var(--baht-color-info); background: var(--baht-slate-50); }
722
+ .baht-alert-main { flex: 1; }
723
+ .baht-alert-title { font-weight: 600; margin-bottom: 2px; }
724
+ .baht-alert-dismiss {
725
+ border: none; background: none; cursor: pointer; color: var(--baht-color-text-muted);
726
+ font-size: var(--baht-text-md); line-height: 1; padding: 2px;
727
+ min-width: 24px; min-height: 24px;
728
+ display: inline-flex; align-items: center; justify-content: center;
729
+ }
730
+
731
+ .baht-progress {
732
+ display: block; width: 100%; height: 8px;
733
+ background: var(--baht-gray-100); border-radius: var(--baht-radius-pill);
734
+ overflow: hidden;
735
+ }
736
+ .baht-progress-bar {
737
+ height: 100%; background: var(--baht-color-primary); border-radius: var(--baht-radius-pill);
738
+ transition: width var(--baht-dur-base) var(--baht-ease);
739
+ }
740
+ .baht-progress--indeterminate .baht-progress-bar { width: 40%; animation: baht-slide 1.2s var(--baht-ease) infinite; }
741
+ .baht-progress--success .baht-progress-bar { background: var(--baht-color-success); }
742
+ .baht-progress--warning .baht-progress-bar { background: var(--baht-color-warning); }
743
+ .baht-progress--danger .baht-progress-bar { background: var(--baht-color-danger); }
744
+ .baht-progress-label { font-family: var(--baht-font-family); font-size: var(--baht-text-xs); color: var(--baht-color-text-muted); margin-top: var(--baht-space-1); }
745
+ @keyframes baht-slide { from { margin-left: -40%; } to { margin-left: 100%; } }
746
+
747
+ /* ============================================================
748
+ Inputs extra — rating, range, otp, filter chips
749
+ ============================================================ */
750
+
751
+ .baht-rating { display: inline-flex; gap: 2px; }
752
+ .baht-rating button {
753
+ border: none; background: none; cursor: pointer; padding: 1px;
754
+ min-width: 24px; min-height: 24px; /* touch target (WCAG 2.5.8) */
755
+ font-size: 1.375rem; line-height: 1; color: var(--baht-gray-300);
756
+ transition: color var(--baht-dur-fast) var(--baht-ease);
757
+ }
758
+ .baht-rating button.baht-rating--on { color: var(--baht-gold-500); }
759
+ .baht-rating button:disabled { cursor: default; }
760
+ .baht-rating button:focus-visible { outline: 2px solid var(--baht-color-focus); outline-offset: 2px; border-radius: 4px; }
761
+
762
+ .baht-range { display: block; font-family: var(--baht-font-family); }
763
+ .baht-range input[type='range'] { width: 100%; accent-color: var(--baht-color-primary); }
764
+ .baht-range-row { display: flex; align-items: center; gap: var(--baht-space-3); }
765
+ .baht-range-value { font-family: var(--baht-font-mono); font-size: var(--baht-text-sm); color: var(--baht-color-text-muted); min-width: 3ch; text-align: right; }
766
+
767
+ .baht-otp { display: inline-flex; gap: var(--baht-space-2); }
768
+ .baht-otp input {
769
+ width: 40px; height: 48px; text-align: center;
770
+ font-family: var(--baht-font-mono); font-size: var(--baht-text-lg);
771
+ border: 1px solid var(--baht-color-border-strong); border-radius: var(--baht-radius);
772
+ background: var(--baht-color-surface); color: var(--baht-color-text);
773
+ transition: border-color var(--baht-dur-fast) var(--baht-ease);
774
+ }
775
+ .baht-otp input:focus-visible { border-color: var(--baht-color-focus); outline: 2px solid var(--baht-color-focus); outline-offset: 0; }
776
+ .baht-otp input:disabled { opacity: 0.4; }
777
+
778
+ .baht-filter { display: inline-flex; flex-wrap: wrap; gap: var(--baht-space-2); font-family: var(--baht-font-family); }
779
+ .baht-filter button {
780
+ padding: 5px 14px; font-size: var(--baht-text-sm); font-weight: 500;
781
+ border: 1px solid var(--baht-color-border-cool); border-radius: var(--baht-radius-pill);
782
+ background: var(--baht-color-surface); color: var(--baht-color-text);
783
+ cursor: pointer; font-family: inherit;
784
+ transition: background var(--baht-dur-fast) var(--baht-ease), border-color var(--baht-dur-fast) var(--baht-ease), color var(--baht-dur-fast) var(--baht-ease);
785
+ }
786
+ .baht-filter button:hover { background: var(--baht-color-primary-wash); }
787
+ .baht-filter button[aria-pressed='true'] {
788
+ background: var(--baht-color-primary); border-color: var(--baht-color-primary);
789
+ color: var(--baht-color-primary-contrast);
790
+ }
791
+
792
+ /* ============================================================
793
+ Structure — card, fieldset, accordion, timeline
794
+ ============================================================ */
795
+
796
+ .baht-card {
797
+ display: block;
798
+ background: var(--baht-color-surface);
799
+ border: 1px solid var(--baht-color-border);
800
+ border-radius: var(--baht-radius-md);
801
+ padding: var(--baht-space-5);
802
+ font-family: var(--baht-font-family); font-size: var(--baht-font-size); color: var(--baht-color-text);
803
+ transition: border-color var(--baht-dur-fast) var(--baht-ease);
804
+ }
805
+ .baht-card--hero { border-radius: var(--baht-radius-lg); padding: var(--baht-space-6); }
806
+ .baht-card-title { font-family: var(--baht-font-display); font-size: var(--baht-text-lg); font-weight: 600; letter-spacing: var(--baht-tracking-tight); margin-bottom: 2px; }
807
+ .baht-card-subtitle { font-size: var(--baht-text-sm); color: var(--baht-color-text-muted); margin-bottom: var(--baht-space-3); }
808
+
809
+ .baht-fieldset {
810
+ border: 1px solid var(--baht-color-border);
811
+ border-radius: var(--baht-radius-md);
812
+ padding: var(--baht-space-5);
813
+ font-family: var(--baht-font-family);
814
+ min-width: 0;
815
+ }
816
+ .baht-fieldset legend {
817
+ padding: 0 var(--baht-space-2);
818
+ font-size: var(--baht-text-sm); font-weight: 600; color: var(--baht-color-text-muted);
819
+ text-transform: uppercase; letter-spacing: var(--baht-tracking-widest);
820
+ }
821
+
822
+ .baht-accordion { display: block; border: 1px solid var(--baht-color-border-cool); border-radius: var(--baht-radius-md); background: var(--baht-color-surface); font-family: var(--baht-font-family); font-size: var(--baht-font-size); color: var(--baht-color-text); }
823
+ .baht-accordion-item { border-top: 1px solid var(--baht-color-border-cool); }
824
+ .baht-accordion-item:first-child { border-top: none; }
825
+ .baht-accordion-trigger {
826
+ display: flex; align-items: center; justify-content: space-between; width: 100%;
827
+ padding: var(--baht-space-4) var(--baht-space-5);
828
+ border: none; background: none; cursor: pointer;
829
+ font: inherit; font-weight: 500; color: inherit; text-align: left;
830
+ }
831
+ .baht-accordion-trigger:hover { background: color-mix(in oklab, var(--baht-color-primary) 4%, transparent); }
832
+ .baht-accordion-chevron { color: var(--baht-color-text-subtle); transition: transform var(--baht-dur-fast) var(--baht-ease); }
833
+ .baht-accordion-item--open .baht-accordion-chevron { transform: rotate(180deg); }
834
+ .baht-accordion-content { padding: 0 var(--baht-space-5) var(--baht-space-4); color: var(--baht-color-text-muted); }
835
+
836
+ .baht-timeline { display: flex; flex-direction: column; font-family: var(--baht-font-family); font-size: var(--baht-font-size); color: var(--baht-color-text); }
837
+ .baht-timeline-item { display: flex; gap: var(--baht-space-3); position: relative; padding-bottom: var(--baht-space-5); }
838
+ .baht-timeline-item:last-child { padding-bottom: 0; }
839
+ .baht-timeline-rail { display: flex; flex-direction: column; align-items: center; }
840
+ .baht-timeline-dot {
841
+ width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px;
842
+ background: var(--baht-color-primary); border: 2px solid var(--baht-color-surface);
843
+ box-shadow: 0 0 0 1px var(--baht-color-border-strong);
844
+ }
845
+ .baht-timeline-dot--success { background: var(--baht-color-success); }
846
+ .baht-timeline-dot--warning { background: var(--baht-color-warning); }
847
+ .baht-timeline-dot--danger { background: var(--baht-color-danger); }
848
+ .baht-timeline-dot--muted { background: var(--baht-gray-400); }
849
+ .baht-timeline-line { flex: 1; width: 1px; background: var(--baht-color-border-strong); margin-top: 2px; }
850
+ .baht-timeline-title { font-weight: 500; }
851
+ .baht-timeline-time { font-family: var(--baht-font-mono); font-size: var(--baht-text-xs); color: var(--baht-color-text-subtle); }
852
+ .baht-timeline-desc { font-size: var(--baht-text-sm); color: var(--baht-color-text-muted); margin-top: 2px; }
853
+
854
+ /* ============================================================
855
+ Navigation — link, breadcrumbs
856
+ ============================================================ */
857
+
858
+ .baht-link {
859
+ color: var(--baht-color-link);
860
+ font-family: var(--baht-font-family);
861
+ text-decoration: underline;
862
+ text-decoration-thickness: 1px;
863
+ text-underline-offset: 3px;
864
+ text-decoration-color: color-mix(in oklab, var(--baht-color-primary) 35%, transparent);
865
+ transition: text-decoration-color var(--baht-dur-fast) var(--baht-ease);
866
+ border-radius: 2px;
867
+ }
868
+ .baht-link:hover { text-decoration-color: var(--baht-color-link); }
869
+ .baht-link:focus-visible { outline: 2px solid var(--baht-color-focus); outline-offset: 2px; }
870
+ .baht-link-external { font-size: 0.85em; }
871
+
872
+ .baht-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--baht-space-2); font-family: var(--baht-font-family); font-size: var(--baht-text-sm); }
873
+ .baht-breadcrumbs .baht-link { font-size: inherit; }
874
+ .baht-breadcrumbs-sep { color: var(--baht-color-text-subtle); }
875
+ .baht-breadcrumbs-current { color: var(--baht-color-text); font-weight: 500; }
876
+
877
+ /* ============================================================
878
+ Accessibility
879
+ ============================================================ */
880
+
881
+ /* Screen-reader-only text (external-link hints, workflow step announcements). */
882
+ .baht-visually-hidden {
883
+ position: absolute;
884
+ width: 1px; height: 1px;
885
+ margin: -1px; padding: 0; border: 0;
886
+ overflow: hidden;
887
+ clip: rect(0 0 0 0);
888
+ clip-path: inset(50%);
889
+ white-space: nowrap;
890
+ }
891
+
892
+ /* One consistent keyboard focus ring for every interactive piece that had none. */
893
+ .baht-accordion-trigger:focus-visible,
894
+ .baht-filter button:focus-visible,
895
+ .baht-pagination button:focus-visible,
896
+ .baht-toast-dismiss:focus-visible,
897
+ .baht-alert-dismiss:focus-visible,
898
+ .baht-modal-close:focus-visible,
899
+ .baht-code--block:focus-visible,
900
+ .baht-table-wrap:focus-visible {
901
+ outline: 2px solid var(--baht-color-focus);
902
+ outline-offset: 2px;
903
+ }
904
+
905
+ @media (prefers-reduced-motion: reduce) {
906
+ .baht-modal-scrim, .baht-modal, .baht-toast { animation: none; }
907
+ .baht-skeleton { animation: none; opacity: 0.6; }
908
+ /* indeterminate: swap the slide for a gentle opacity pulse */
909
+ .baht-progress--indeterminate .baht-progress-bar {
910
+ animation: baht-pulse 2s var(--baht-ease) infinite;
911
+ width: 100%; margin-left: 0;
912
+ }
913
+ .baht-spinner { animation-duration: 1.6s; } /* still conveys "busy", just calmer */
914
+ .baht-control, .baht-button, .baht-link, .baht-filter button, .baht-pagination button,
915
+ .baht-accordion-chevron, .baht-toggle-track, .baht-toggle-thumb, .baht-progress-bar,
916
+ .baht-rating button, .baht-tooltip, .baht-otp input, .baht-card {
917
+ transition: none;
918
+ }
919
+ }
920
+
921
+ @media (forced-colors: active) {
922
+ .baht-toggle-track { border: 1px solid ButtonText; }
923
+ .baht-toggle-thumb { background: ButtonText; }
924
+ .baht-control--toggle input:checked + .baht-toggle-track { background: Highlight; }
925
+ .baht-skeleton { background: GrayText; }
926
+ .baht-progress { border: 1px solid ButtonText; }
927
+ .baht-progress-bar { background: Highlight; }
928
+ .baht-badge { border: 1px solid ButtonText; }
929
+ .baht-badge-dot { background: ButtonText; }
930
+ .baht-rating button.baht-rating--on { color: Highlight; }
931
+ .baht-filter button[aria-pressed='true'],
932
+ .baht-pagination button[aria-current='page'] {
933
+ background: SelectedItem;
934
+ color: SelectedItemText;
935
+ }
936
+ }