forge
Explore
Log in

Don't you dare go Hollow

🎨 colored text reaches WCAG AA contrast

Browse files at this commit

9f9eebfcbf60eb7130ada34b03400eefa274b745Burak BoduroğluParent: 8433af2
  • fix
    • 🎨 colored text reaches WCAG AA contrast
Show full message
fix: 🎨 colored text reaches WCAG AA contrast
- measured in light mode on the #F7F7F7 page: brand as text 2.5:1,
  warning 2.0:1, success 3.1:1, destructive 4.2:1 (AA needs 4.5:1)
- new text tokens primary/success/warning/info/destructive-text: darker in
  light mode, equal to the fills in dark mode; fills stay as they are
- light primary text is --brand-ink, or for a custom palette color the
  darkest-needed step of its hue (accentTextLightness, tested across hues)
- every text-{primary,success,warning,info,destructive} utility moves to
  its -text token (253 uses); opacity variants stay decorative
- token doc records the rule

110 changed files +313 -233

docs/ui/ui-redesign-tokens.mdmodified+11 -0
@@ -31,6 +31,17 @@ Dark:
31 Success, warning, destructive, and info remain semantic. Custom palette choice31 Success, warning, destructive, and info remain semantic. Custom palette choice
32 continues to override `--ui-accent`, which feeds `--primary`.32 continues to override `--ui-accent`, which feeds `--primary`.
33 33
34+Colored text uses the `*-text` tokens, never the fills: `text-primary-text`,
35+`text-success-text`, `text-warning-text`, `text-info-text`,
36+`text-destructive-text`. The fills (`bg-primary`, `bg-warning/10`, dots,
37+rings) keep their bright values; the text tokens are darker in light mode so
38+small text reaches WCAG AA (4.5:1) on the `#F7F7F7` page and white cards —
39+the brand fill as text measured 2.5:1 and warning 2.0:1. Light-mode primary
40+text is `--brand-ink`, or for a custom palette color the darkest-needed step
41+of that hue (`accentTextLightness` in `preferences-context.tsx`). In dark mode
42+the text tokens equal the fills. Opacity variants like `text-primary/30` stay
43+on the fill for decoration only.
44+
34 ## Typography45 ## Typography
35 46
36 - UI: native system sans (`ui-sans-serif`, `system-ui`, `-apple-system`,47 - UI: native system sans (`ui-sans-serif`, `system-ui`, `-apple-system`,
src/app.tsxmodified+1 -1
@@ -34,7 +34,7 @@ function RootErrorFallback(props: { error: unknown; reset: () => void }) {
34 return (34 return (
35 <div class="flex min-h-[var(--app-viewport)] items-center justify-center bg-background px-4">35 <div class="flex min-h-[var(--app-viewport)] items-center justify-center bg-background px-4">
36 <div class="w-full max-w-[420px] space-y-5 rounded-xl border border-border-line bg-surface-base p-8 text-center shadow-[0_10px_24px_-4px_rgba(0,0,0,0.10)]">36 <div class="w-full max-w-[420px] space-y-5 rounded-xl border border-border-line bg-surface-base p-8 text-center shadow-[0_10px_24px_-4px_rgba(0,0,0,0.10)]">
37- <div class="mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-destructive/10 text-destructive">37+ <div class="mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-destructive/10 text-destructive-text">
38 <IconAlert class="h-6 w-6" />38 <IconAlert class="h-6 w-6" />
39 </div>39 </div>
40 <div class="space-y-2">40 <div class="space-y-2">
src/components/ai/celebi-launcher.tsxmodified+1 -1
@@ -47,7 +47,7 @@ export function CelebiLauncher() {
47 47
48 return (48 return (
49 <section class="mx-auto flex max-w-3xl flex-col items-center gap-5 rounded-xl border border-dashed border-primary/25 bg-primary/[0.03] px-6 py-10 text-center">49 <section class="mx-auto flex max-w-3xl flex-col items-center gap-5 rounded-xl border border-dashed border-primary/25 bg-primary/[0.03] px-6 py-10 text-center">
50- <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary">50+ <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary-text">
51 <IconSparkles class="h-6 w-6" />51 <IconSparkles class="h-6 w-6" />
52 </div>52 </div>
53 <div class="space-y-1">53 <div class="space-y-1">
src/components/ai/note-studio-panel.tsxmodified+1 -1
@@ -79,7 +79,7 @@ export function NoteStudioPanel() {
79 when={selected()}79 when={selected()}
80 fallback={80 fallback={
81 <section class="flex min-h-44 flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-primary/25 bg-primary/[0.03] px-6 py-8 text-center">81 <section class="flex min-h-44 flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-primary/25 bg-primary/[0.03] px-6 py-8 text-center">
82- <div class="flex h-11 w-11 items-center justify-center rounded-full bg-primary/10 text-primary">82+ <div class="flex h-11 w-11 items-center justify-center rounded-full bg-primary/10 text-primary-text">
83 <IconWaveform class="h-5 w-5" />83 <IconWaveform class="h-5 w-5" />
84 </div>84 </div>
85 <div>85 <div>
src/components/appointments/book-appointment-form.tsxmodified+1 -1
@@ -66,7 +66,7 @@ export function BookAppointmentForm(props: {
66 />66 />
67 </div>67 </div>
68 68
69- {error() && <p class="text-sm text-destructive">{error()}</p>}69+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
70 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">70 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">
71 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>71 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>
72 {t("appointments.book")}72 {t("appointments.book")}
src/components/appointments/publish-slots-form.tsxmodified+1 -1
@@ -148,7 +148,7 @@ export function PublishSlotsForm(props: {
148 </Show>148 </Show>
149 </div>149 </div>
150 150
151- {error() && <p class="text-sm text-destructive">{error()}</p>}151+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
152 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">152 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">
153 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>153 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>
154 {t("appointments.publish")}154 {t("appointments.publish")}
src/components/appointments/reschedule-form.tsxmodified+1 -1
@@ -84,7 +84,7 @@ export function RescheduleForm(props: {
84 </div>84 </div>
85 </div>85 </div>
86 86
87- {error() && <p class="text-sm text-destructive">{error()}</p>}87+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
88 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">88 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">
89 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>89 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>
90 {t("appointments.reschedule")}90 {t("appointments.reschedule")}
src/components/attendance/attendance-report-view.tsxmodified+1 -1
@@ -47,7 +47,7 @@ export function AttendanceReportView(props: { report: AttendanceReport; compact?
47 header: t("nav.courses"),47 header: t("nav.courses"),
48 meta: { stickyLeft: true },48 meta: { stickyLeft: true },
49 cell: (cell) => (49 cell: (cell) => (
50- <Link to="/courses/$id" params={{ id: cell.row.original.course.id }} class="block truncate font-medium hover:text-primary hover:underline">50+ <Link to="/courses/$id" params={{ id: cell.row.original.course.id }} class="block truncate font-medium hover:text-primary-text hover:underline">
51 {cell.row.original.course.title}51 {cell.row.original.course.title}
52 </Link>52 </Link>
53 ),53 ),
src/components/builder/builder-header.tsxmodified+1 -1
@@ -18,7 +18,7 @@ export function BuilderHeader() {
18 return (18 return (
19 <div class="flex flex-wrap items-center justify-between gap-3 rounded-xl border border-border-line bg-surface-base px-4 py-2.5">19 <div class="flex flex-wrap items-center justify-between gap-3 rounded-xl border border-border-line bg-surface-base px-4 py-2.5">
20 <Link to="/builder" class="flex min-w-0 items-center gap-2 text-sm font-semibold text-text-strong">20 <Link to="/builder" class="flex min-w-0 items-center gap-2 text-sm font-semibold text-text-strong">
21- <IconShieldCheck class="h-4 w-4 shrink-0 text-primary" />21+ <IconShieldCheck class="h-4 w-4 shrink-0 text-primary-text" />
22 <span class="truncate">{t("builder.console")}</span>22 <span class="truncate">{t("builder.console")}</span>
23 </Link>23 </Link>
24 <div class="flex min-w-0 items-center gap-3">24 <div class="flex min-w-0 items-center gap-3">
src/components/classes/blueprint-panel.tsxmodified+1 -1
@@ -166,7 +166,7 @@ export function BlueprintPanel(props: {
166 </div>166 </div>
167 167
168 <Show when={error()}>168 <Show when={error()}>
169- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>169+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
170 </Show>170 </Show>
171 171
172 <div class="flex justify-end">172 <div class="flex justify-end">
src/components/courses/course-subjects-panel.tsxmodified+2 -2
@@ -122,7 +122,7 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
122 <Label for="subject-description">{t("form.description")}</Label>122 <Label for="subject-description">{t("form.description")}</Label>
123 <Textarea id="subject-description" maxlength={2000} rows={3} value={description()} onInput={(event) => setDescription(event.currentTarget.value)} />123 <Textarea id="subject-description" maxlength={2000} rows={3} value={description()} onInput={(event) => setDescription(event.currentTarget.value)} />
124 </div>124 </div>
125- {error() && <p class="text-sm text-destructive">{error()}</p>}125+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
126 <div class="flex flex-wrap gap-2">126 <div class="flex flex-wrap gap-2">
127 <Button type="submit" class="rounded-lg" disabled={pending()}>127 <Button type="submit" class="rounded-lg" disabled={pending()}>
128 {editing() ? t("common.update") : t("common.create")}128 {editing() ? t("common.update") : t("common.create")}
@@ -158,7 +158,7 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
158 }}158 }}
159 />159 />
160 160
161- {error() && <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}161+ {error() && <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
162 162
163 <Suspense fallback={<DataTableSkeleton />}>163 <Suspense fallback={<DataTableSkeleton />}>
164 <Show when={(subjects() ?? []).length > 0} fallback={<EmptyState kind="courses" title={t("subjects.empty")} />}>164 <Show when={(subjects() ?? []).length > 0} fallback={<EmptyState kind="courses" title={t("subjects.empty")} />}>
src/components/courses/course-teachers-panel.tsxmodified+1 -1
@@ -51,7 +51,7 @@ export function CourseTeachersPanel(props: {
51 <Button51 <Button
52 variant="ghost"52 variant="ghost"
53 size="sm"53 size="sm"
54- class="h-8 w-8 rounded-lg p-0 text-destructive hover:bg-destructive/10"54+ class="h-8 w-8 rounded-lg p-0 text-destructive-text hover:bg-destructive/10"
55 onClick={() => setRemoveTarget(cell.row.original)}55 onClick={() => setRemoveTarget(cell.row.original)}
56 >56 >
57 <IconTrash class="h-4 w-4" />57 <IconTrash class="h-4 w-4" />
src/components/dashboard/command-search-field.tsxmodified+1 -1
@@ -22,7 +22,7 @@ export function CommandSearchField(props: { class?: string }) {
22 )}22 )}
23 aria-label={t("dashboard.commandCenter")}23 aria-label={t("dashboard.commandCenter")}
24 >24 >
25- <IconSearch class="h-4 w-4 shrink-0 text-text-subtle group-hover:text-primary" />25+ <IconSearch class="h-4 w-4 shrink-0 text-text-subtle group-hover:text-primary-text" />
26 <span class="min-w-0 flex-1 truncate text-text-placeholder">{placeholder()}</span>26 <span class="min-w-0 flex-1 truncate text-text-placeholder">{placeholder()}</span>
27 <kbd class="hidden shrink-0 rounded-md border border-border/80 bg-background/80 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-muted-foreground sm:inline-block">27 <kbd class="hidden shrink-0 rounded-md border border-border/80 bg-background/80 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-muted-foreground sm:inline-block">
28 Ctrl/Cmd K28 Ctrl/Cmd K
src/components/events/event-form.tsxmodified+1 -1
@@ -297,7 +297,7 @@ export function EventForm(props: {
297 </Show>297 </Show>
298 </div>298 </div>
299 </div>299 </div>
300- {error() && <p class="text-sm text-destructive">{error()}</p>}300+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
301 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">301 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">
302 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>302 <Button type="submit" class="h-10 flex-1 sm:flex-none" disabled={pending()}>
303 {props.submitLabel ?? t("common.save")}303 {props.submitLabel ?? t("common.save")}
src/components/exams/answer-sheet-view.tsxmodified+4 -4
@@ -173,10 +173,10 @@ export function AnswerSheetView(props: { examId: string; userId: string; mode?:
173 <p class="text-sm font-medium">{personLabelWithId(d().sheet.user)}</p>173 <p class="text-sm font-medium">{personLabelWithId(d().sheet.user)}</p>
174 <Show when={d().sheet.answers.length > 0} fallback={<Badge variant="outline">{t("exams.notStarted")}</Badge>}>174 <Show when={d().sheet.answers.length > 0} fallback={<Badge variant="outline">{t("exams.notStarted")}</Badge>}>
175 <div class="flex flex-wrap items-center gap-1.5">175 <div class="flex flex-wrap items-center gap-1.5">
176- <Badge variant="outline" class="border-success/50 bg-success/10 text-success">176+ <Badge variant="outline" class="border-success/50 bg-success/10 text-success-text">
177 {t("exams.answersRight")}: {sheetStats().right}177 {t("exams.answersRight")}: {sheetStats().right}
178 </Badge>178 </Badge>
179- <Badge variant="outline" class="border-destructive/50 bg-destructive/10 text-destructive">179+ <Badge variant="outline" class="border-destructive/50 bg-destructive/10 text-destructive-text">
180 {t("exams.answersWrong")}: {sheetStats().wrong}180 {t("exams.answersWrong")}: {sheetStats().wrong}
181 </Badge>181 </Badge>
182 <Badge variant="outline" class="text-muted-foreground">182 <Badge variant="outline" class="text-muted-foreground">
@@ -203,7 +203,7 @@ export function AnswerSheetView(props: { examId: string; userId: string; mode?:
203 <Show when={row.answer?.is_correct != null}>203 <Show when={row.answer?.is_correct != null}>
204 <Badge variant="outline" class={cn(204 <Badge variant="outline" class={cn(
205 "size-[22px] p-0 flex items-center justify-center",205 "size-[22px] p-0 flex items-center justify-center",
206- row.answer?.is_correct ? "border-success/50 bg-success/10 text-success" : "border-destructive/50 bg-destructive/10 text-destructive",206+ row.answer?.is_correct ? "border-success/50 bg-success/10 text-success-text" : "border-destructive/50 bg-destructive/10 text-destructive-text",
207 )}>207 )}>
208 <Show when={row.answer?.is_correct} fallback={<IconX class="h-3 w-3" />}>208 <Show when={row.answer?.is_correct} fallback={<IconX class="h-3 w-3" />}>
209 <IconCheck class="h-3 w-3" />209 <IconCheck class="h-3 w-3" />
@@ -266,7 +266,7 @@ export function AnswerSheetView(props: { examId: string; userId: string; mode?:
266 <Badge variant="destructive" class="ml-auto text-[10px]">✗</Badge>266 <Badge variant="destructive" class="ml-auto text-[10px]">✗</Badge>
267 </Show>267 </Show>
268 {choice.id === row.question.correct && (268 {choice.id === row.question.correct && (
269- <Badge variant="outline" class="ml-auto border-success/50 bg-success/10 text-success text-[10px]">269+ <Badge variant="outline" class="ml-auto border-success/50 bg-success/10 text-success-text text-[10px]">
270 <IconCheck class="h-3 w-3" />270 <IconCheck class="h-3 w-3" />
271 </Badge>271 </Badge>
272 )}272 )}
src/components/exams/bank-question-picker.tsxmodified+3 -3
@@ -151,11 +151,11 @@ export function BankQuestionPicker(props: {
151 151
152 <div class="space-y-1.5">152 <div class="space-y-1.5">
153 <Label for="bank-target-subject" class="text-xs font-semibold text-muted-foreground">153 <Label for="bank-target-subject" class="text-xs font-semibold text-muted-foreground">
154- {t("bank.targetSubject")} <span class="text-destructive">*</span>154+ {t("bank.targetSubject")} <span class="text-destructive-text">*</span>
155 </Label>155 </Label>
156 <Show156 <Show
157 when={props.subjects.length > 0}157 when={props.subjects.length > 0}
158- fallback={<p class="text-xs text-destructive">{t("bank.noSubjects")}</p>}158+ fallback={<p class="text-xs text-destructive-text">{t("bank.noSubjects")}</p>}
159 >159 >
160 <Select160 <Select
161 id="bank-target-subject"161 id="bank-target-subject"
@@ -173,7 +173,7 @@ export function BankQuestionPicker(props: {
173 </Show>173 </Show>
174 </div>174 </div>
175 175
176- {error() && <p class="rounded-sm bg-destructive/10 px-3 py-1.5 text-sm text-destructive">{error()}</p>}176+ {error() && <p class="rounded-sm bg-destructive/10 px-3 py-1.5 text-sm text-destructive-text">{error()}</p>}
177 177
178 <div class="flex flex-wrap items-center gap-2 pt-1">178 <div class="flex flex-wrap items-center gap-2 pt-1">
179 <Button179 <Button
src/components/exams/exam-form.tsxmodified+1 -1
@@ -451,7 +451,7 @@ export function ExamForm(props: {
451 </label>451 </label>
452 </div>452 </div>
453 453
454- {error() && <p class="text-sm text-destructive">{error()}</p>}454+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
455 455
456 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border-hairline bg-surface-base px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">456 <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border-hairline bg-surface-base px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6">
457 <Button type="submit" class="flex-1 rounded-lg sm:flex-none" disabled={pending()}>457 <Button type="submit" class="flex-1 rounded-lg sm:flex-none" disabled={pending()}>
src/components/exams/exam-questions-panel.tsxmodified+5 -5
@@ -307,7 +307,7 @@ export function ExamQuestionsPanel(props: {
307 />307 />
308 </FormDialog>308 </FormDialog>
309 309
310- {error() && <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}310+ {error() && <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
311 311
312 <Suspense fallback={<PageSpinner />}>312 <Suspense fallback={<PageSpinner />}>
313 <Show313 <Show
@@ -360,7 +360,7 @@ export function ExamQuestionsPanel(props: {
360 </Badge>360 </Badge>
361 </Show>361 </Show>
362 <Show when={isSavedToBank(q)}>362 <Show when={isSavedToBank(q)}>
363- <Badge variant="outline" class="gap-1 border-warning/50 bg-warning/10 text-warning">363+ <Badge variant="outline" class="gap-1 border-warning/50 bg-warning/10 text-warning-text">
364 <IconArchive class="h-3 w-3" />364 <IconArchive class="h-3 w-3" />
365 {t("bank.savedToBankBadge")}365 {t("bank.savedToBankBadge")}
366 </Badge>366 </Badge>
@@ -378,7 +378,7 @@ export function ExamQuestionsPanel(props: {
378 type="button"378 type="button"
379 variant="ghost"379 variant="ghost"
380 size="sm"380 size="sm"
381- class="h-7 w-fit text-xs text-destructive"381+ class="h-7 w-fit text-xs text-destructive-text"
382 disabled={imagePending() === `${q.id}:question`}382 disabled={imagePending() === `${q.id}:question`}
383 onClick={() => void removeQuestionImage(q)}383 onClick={() => void removeQuestionImage(q)}
384 >384 >
@@ -414,7 +414,7 @@ export function ExamQuestionsPanel(props: {
414 type="button"414 type="button"
415 variant="ghost"415 variant="ghost"
416 size="sm"416 size="sm"
417- class="h-7 px-2 text-xs text-destructive"417+ class="h-7 px-2 text-xs text-destructive-text"
418 disabled={imagePending() === `${q.id}:choice:${choice.id}`}418 disabled={imagePending() === `${q.id}:choice:${choice.id}`}
419 onClick={() => void removeChoiceImage(q, choice.id)}419 onClick={() => void removeChoiceImage(q, choice.id)}
420 >420 >
@@ -476,7 +476,7 @@ export function ExamQuestionsPanel(props: {
476 type="button"476 type="button"
477 variant="ghost"477 variant="ghost"
478 size="sm"478 size="sm"
479- class="h-8 w-8 p-0 text-destructive"479+ class="h-8 w-8 p-0 text-destructive-text"
480 onClick={() => setRemoveQuestion(q)}480 onClick={() => setRemoveQuestion(q)}
481 aria-label={t("common.delete")}481 aria-label={t("common.delete")}
482 >482 >
src/components/exams/exam-room-ws.tsxmodified+6 -6
@@ -448,7 +448,7 @@ export function ExamRoomWS(props: { exam: Exam }) {
448 <Match when={att().status === "submitted"}>448 <Match when={att().status === "submitted"}>
449 <div class="rounded-lg border border-info/30 bg-info/10 px-4 py-3">449 <div class="rounded-lg border border-info/30 bg-info/10 px-4 py-3">
450 <div class="flex items-start gap-3">450 <div class="flex items-start gap-3">
451- <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-info" />451+ <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-info-text" />
452 <div class="min-w-0 space-y-1">452 <div class="min-w-0 space-y-1">
453 <p class="text-sm font-semibold text-foreground">{t("attempt.submitted")}</p>453 <p class="text-sm font-semibold text-foreground">{t("attempt.submitted")}</p>
454 <p class="text-sm text-muted-foreground">{t("attempt.closed")}</p>454 <p class="text-sm text-muted-foreground">{t("attempt.closed")}</p>
@@ -487,8 +487,8 @@ export function ExamRoomWS(props: { exam: Exam }) {
487 {(msg) => (487 {(msg) => (
488 <div class="overflow-hidden rounded-lg border border-destructive/30 bg-destructive/10">488 <div class="overflow-hidden rounded-lg border border-destructive/30 bg-destructive/10">
489 <div class="flex items-start gap-3 px-4 py-3">489 <div class="flex items-start gap-3 px-4 py-3">
490- <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-destructive" />490+ <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-destructive-text" />
491- <p class="min-w-0 text-sm text-destructive">{msg()}</p>491+ <p class="min-w-0 text-sm text-destructive-text">{msg()}</p>
492 </div>492 </div>
493 </div>493 </div>
494 )}494 )}
@@ -563,7 +563,7 @@ export function ExamRoomWS(props: { exam: Exam }) {
563 type="button"563 type="button"
564 class={cn(564 class={cn(
565 "inline-flex h-8 items-center justify-center rounded-md border text-xs font-medium transition-colors hover:bg-accent",565 "inline-flex h-8 items-center justify-center rounded-md border text-xs font-medium transition-colors hover:bg-accent",
566- question.answer ? "border-primary/35 bg-primary/10 text-primary hover:bg-primary/15" : "bg-background",566+ question.answer ? "border-primary/35 bg-primary/10 text-primary-text hover:bg-primary/15" : "bg-background",
567 activeQuestionIndex() === index() && "ring-2 ring-primary/60",567 activeQuestionIndex() === index() && "ring-2 ring-primary/60",
568 )}568 )}
569 onClick={() => setActiveQuestionIndex(index())}569 onClick={() => setActiveQuestionIndex(index())}
@@ -876,7 +876,7 @@ function QuestionAnswerCardWS(props: {
876 <IconUploadCloud class="h-4 w-4" />876 <IconUploadCloud class="h-4 w-4" />
877 {t("exams.uploadAnswerImage")}877 {t("exams.uploadAnswerImage")}
878 </Button>878 </Button>
879- <Button type="button" variant="outline" size="sm" class="rounded-lg text-destructive hover:text-destructive" onClick={() => void props.onRemoveImage()}>879+ <Button type="button" variant="outline" size="sm" class="rounded-lg text-destructive-text hover:text-destructive-text" onClick={() => void props.onRemoveImage()}>
880 <IconTrash class="h-4 w-4" />880 <IconTrash class="h-4 w-4" />
881 {t("exams.removeDrawing")}881 {t("exams.removeDrawing")}
882 </Button>882 </Button>
@@ -917,7 +917,7 @@ function QuestionAnswerCardWS(props: {
917 </div>917 </div>
918 </Show>918 </Show>
919 <Show when={saveState() === "failed"}>919 <Show when={saveState() === "failed"}>
920- <p class="mt-4 rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive">920+ <p class="mt-4 rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive-text">
921 {t("attempt.notSavedHint")}921 {t("attempt.notSavedHint")}
922 </p>922 </p>
923 </Show>923 </Show>
src/components/exams/grade-form.tsxmodified+1 -1
@@ -96,7 +96,7 @@ export function GradeForm(props: {
96 {t("exams.gradeStudent")}96 {t("exams.gradeStudent")}
97 </Button>97 </Button>
98 </div>98 </div>
99- {error() && <p class="text-sm text-destructive">{error()}</p>}99+ {error() && <p class="text-sm text-destructive-text">{error()}</p>}
100 </form>100 </form>
101 101
102 <ConfirmDialog102 <ConfirmDialog
src/components/exams/question-form.tsxmodified+3 -3
@@ -338,7 +338,7 @@ export function QuestionForm(props: {
338 <For each={props.subjects}>{(subject) => <option value={subject.id}>{subject.name}</option>}</For>338 <For each={props.subjects}>{(subject) => <option value={subject.id}>{subject.name}</option>}</For>
339 </Select>339 </Select>
340 <Show when={subjectUnavailable()}>340 <Show when={subjectUnavailable()}>
341- <p class="mt-1 text-[11px] text-destructive">{t("questions.subjectUnavailableHelp")}</p>341+ <p class="mt-1 text-[11px] text-destructive-text">{t("questions.subjectUnavailableHelp")}</p>
342 </Show>342 </Show>
343 </div>343 </div>
344 <div>344 <div>
@@ -448,7 +448,7 @@ export function QuestionForm(props: {
448 variant="ghost"448 variant="ghost"
449 size="sm"449 size="sm"
450 disabled={rows().length <= BANK_QUESTION_LIMITS.minChoices}450 disabled={rows().length <= BANK_QUESTION_LIMITS.minChoices}
451- class="mt-0.5 h-6 w-6 p-0 text-muted-foreground hover:text-destructive"451+ class="mt-0.5 h-6 w-6 p-0 text-muted-foreground hover:text-destructive-text"
452 onClick={() => removeChoice(row().id)}452 onClick={() => removeChoice(row().id)}
453 aria-label={t("common.delete")}453 aria-label={t("common.delete")}
454 >454 >
@@ -462,7 +462,7 @@ export function QuestionForm(props: {
462 </div>462 </div>
463 </Show>463 </Show>
464 464
465- {error() && <p class="rounded-sm bg-destructive/10 px-3 py-1.5 text-sm text-destructive">{error()}</p>}465+ {error() && <p class="rounded-sm bg-destructive/10 px-3 py-1.5 text-sm text-destructive-text">{error()}</p>}
466 466
467 <div class="flex flex-wrap items-center gap-2 pt-1">467 <div class="flex flex-wrap items-center gap-2 pt-1">
468 <Button type="submit" class="h-8 text-xs font-semibold" disabled={pending()}>468 <Button type="submit" class="h-8 text-xs font-semibold" disabled={pending()}>
src/components/homework/homework-report-view.tsxmodified+1 -1
@@ -60,7 +60,7 @@ export function HomeworkReportView(props: { userId: string }) {
60 <div class="space-y-1">60 <div class="space-y-1">
61 <Badge variant="outline" class="rounded-full">{statusLabel(cell.row.original)}</Badge>61 <Badge variant="outline" class="rounded-full">{statusLabel(cell.row.original)}</Badge>
62 <Show when={cell.row.original.late}>62 <Show when={cell.row.original.late}>
63- <p class="text-[11px] text-destructive">{t("homework.late")}</p>63+ <p class="text-[11px] text-destructive-text">{t("homework.late")}</p>
64 </Show>64 </Show>
65 </div>65 </div>
66 ),66 ),
src/components/homework/homework-submission-panel.tsxmodified+2 -2
@@ -171,7 +171,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) {
171 <Button171 <Button
172 type="button"172 type="button"
173 variant="ghost"173 variant="ghost"
174- class="rounded-lg text-destructive hover:bg-destructive/10"174+ class="rounded-lg text-destructive-text hover:bg-destructive/10"
175 disabled={pending()}175 disabled={pending()}
176 onClick={() => setWithdrawOpen(true)}176 onClick={() => setWithdrawOpen(true)}
177 >177 >
@@ -213,7 +213,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) {
213 <IconDownload class="h-3.5 w-3.5" />213 <IconDownload class="h-3.5 w-3.5" />
214 </Button>214 </Button>
215 </a>215 </a>
216- <Button type="button" size="icon" variant="ghost" class="h-7 w-7 rounded-lg text-destructive hover:text-destructive" disabled={pending()} title={t("common.delete")} onClick={() => void removeFile(file.id)}>216+ <Button type="button" size="icon" variant="ghost" class="h-7 w-7 rounded-lg text-destructive-text hover:text-destructive-text" disabled={pending()} title={t("common.delete")} onClick={() => void removeFile(file.id)}>
217 <IconTrash class="h-3.5 w-3.5" />217 <IconTrash class="h-3.5 w-3.5" />
218 </Button>218 </Button>
219 </li>219 </li>
src/components/insights/insight-detail.tsxmodified+5 -5
@@ -99,7 +99,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
99 <section class="space-y-3">99 <section class="space-y-3">
100 <div class="flex items-center justify-between gap-3">100 <div class="flex items-center justify-between gap-3">
101 <div class="flex items-center gap-2">101 <div class="flex items-center gap-2">
102- <IconSparkles class="h-4 w-4 text-primary" />102+ <IconSparkles class="h-4 w-4 text-primary-text" />
103 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.summary")}</h3>103 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.summary")}</h3>
104 </div>104 </div>
105 <Show when={props.insight.summary}>105 <Show when={props.insight.summary}>
@@ -158,7 +158,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
158 <Show when={props.mode !== "cards"}>158 <Show when={props.mode !== "cards"}>
159 <section class="space-y-3 border-t border-border-hairline pt-5">159 <section class="space-y-3 border-t border-border-hairline pt-5">
160 <div class="flex items-center gap-2">160 <div class="flex items-center gap-2">
161- <IconAlert class="h-4 w-4 text-warning" />161+ <IconAlert class="h-4 w-4 text-warning-text" />
162 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.attention")}</h3>162 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.attention")}</h3>
163 <Badge variant="warning" class="rounded-full">{props.insight.attention.length}</Badge>163 <Badge variant="warning" class="rounded-full">{props.insight.attention.length}</Badge>
164 </div>164 </div>
@@ -192,7 +192,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
192 192
193 <section class={cn("space-y-3", props.mode !== "cards" && "border-t border-border-hairline pt-5")}>193 <section class={cn("space-y-3", props.mode !== "cards" && "border-t border-border-hairline pt-5")}>
194 <div class="flex items-center gap-2">194 <div class="flex items-center gap-2">
195- <IconSparkles class="h-4 w-4 text-primary" />195+ <IconSparkles class="h-4 w-4 text-primary-text" />
196 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.recommendations")}</h3>196 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.recommendations")}</h3>
197 <Badge variant="secondary" class="rounded-full">{props.insight.cards.length}</Badge>197 <Badge variant="secondary" class="rounded-full">{props.insight.cards.length}</Badge>
198 </div>198 </div>
@@ -232,7 +232,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
232 <Show when={props.mode !== "cards"}>232 <Show when={props.mode !== "cards"}>
233 <section class="space-y-3 border-t border-border-hairline pt-5">233 <section class="space-y-3 border-t border-border-hairline pt-5">
234 <div class="flex items-center gap-2">234 <div class="flex items-center gap-2">
235- <IconChart class="h-4 w-4 text-info" />235+ <IconChart class="h-4 w-4 text-info-text" />
236 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.segments")}</h3>236 <h3 class="text-sm font-semibold text-text-strong">{tx("insights.segments")}</h3>
237 <Badge variant="info" class="rounded-full">{props.insight.segments.length}</Badge>237 <Badge variant="info" class="rounded-full">{props.insight.segments.length}</Badge>
238 </div>238 </div>
@@ -274,7 +274,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
274 <p class="text-[10px] text-muted-foreground">{tx("insights.overall")}</p>274 <p class="text-[10px] text-muted-foreground">{tx("insights.overall")}</p>
275 </div>275 </div>
276 <div class="rounded-lg bg-surface-overlay px-2 py-2">276 <div class="rounded-lg bg-surface-overlay px-2 py-2">
277- <p class={cn("font-mono text-sm font-semibold", segment.contrast < 0 ? "text-destructive" : "text-success")}>277+ <p class={cn("font-mono text-sm font-semibold", segment.contrast < 0 ? "text-destructive-text" : "text-success-text")}>
278 {segment.contrast > 0 ? "+" : ""}{percent(segment.contrast)}278 {segment.contrast > 0 ? "+" : ""}{percent(segment.contrast)}
279 </p>279 </p>
280 <p class="text-[10px] text-muted-foreground">{tx("insights.contrast")}</p>280 <p class="text-[10px] text-muted-foreground">{tx("insights.contrast")}</p>
src/components/insights/insight-run-report.tsxmodified+3 -3
@@ -125,7 +125,7 @@ function ReportDocument(props: {
125 </For>125 </For>
126 </dl>126 </dl>
127 <Show when={props.model.run.pending_students.length + props.model.run.failed_modules.length > 0}>127 <Show when={props.model.run.pending_students.length + props.model.run.failed_modules.length > 0}>
128- <ul class="space-y-1 text-xs text-warning">128+ <ul class="space-y-1 text-xs text-warning-text">
129 <Show when={pendingStudentsLine(prefs.locale(), props.model)}>129 <Show when={pendingStudentsLine(prefs.locale(), props.model)}>
130 {(line) => <li>{line()}</li>}130 {(line) => <li>{line()}</li>}
131 </Show>131 </Show>
@@ -159,7 +159,7 @@ function ReportDocument(props: {
159 <For each={props.model.modules}>159 <For each={props.model.modules}>
160 {(module) => (160 {(module) => (
161 <li>161 <li>
162- <span class={module.with_data === 0 ? "text-warning" : undefined}>162+ <span class={module.with_data === 0 ? "text-warning-text" : undefined}>
163 {tx("moduleCovered", {163 {tx("moduleCovered", {
164 label: moduleLabel(prefs.locale(), module.id),164 label: moduleLabel(prefs.locale(), module.id),
165 withData: module.with_data,165 withData: module.with_data,
@@ -183,7 +183,7 @@ function ReportDocument(props: {
183 <span class="mono tabular-nums">{props.model.totals.segments}</span>183 <span class="mono tabular-nums">{props.model.totals.segments}</span>
184 </p>184 </p>
185 <Show when={props.model.roster_error}>185 <Show when={props.model.roster_error}>
186- {(message) => <p class="text-xs text-destructive">{tx("rosterFailed", { message: message() })}</p>}186+ {(message) => <p class="text-xs text-destructive-text">{tx("rosterFailed", { message: message() })}</p>}
187 </Show>187 </Show>
188 <Show when={props.model.coverage.loaded === 0 && !props.model.roster_error}>188 <Show when={props.model.coverage.loaded === 0 && !props.model.roster_error}>
189 <p class="text-xs text-muted-foreground">{tx("rosterEmpty")}</p>189 <p class="text-xs text-muted-foreground">{tx("rosterEmpty")}</p>
src/components/insights/insight-runs-table.tsxmodified+2 -2
@@ -82,10 +82,10 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
82 const issueCount = run.pending_students.length + run.failed_modules.length;82 const issueCount = run.pending_students.length + run.failed_modules.length;
83 return (83 return (
84 <div class="space-y-1">84 <div class="space-y-1">
85- <p class={cn("text-xs", issueCount > 0 || run.budget_exceeded ? "text-warning" : "text-muted-foreground")}>85+ <p class={cn("text-xs", issueCount > 0 || run.budget_exceeded ? "text-warning-text" : "text-muted-foreground")}>
86 {issueCount > 0 ? tx("insights.issueCount", { count: issueCount }) : tx("insights.noIssues")}86 {issueCount > 0 ? tx("insights.issueCount", { count: issueCount }) : tx("insights.noIssues")}
87 </p>87 </p>
88- {run.budget_exceeded && <p class="text-[11px] text-warning">{tx("insights.budgetExceeded")}</p>}88+ {run.budget_exceeded && <p class="text-[11px] text-warning-text">{tx("insights.budgetExceeded")}</p>}
89 {run.pending_students.length > 0 && (89 {run.pending_students.length > 0 && (
90 <p class="max-w-56 truncate text-[11px] text-muted-foreground" title={run.pending_students.join(", ")}>90 <p class="max-w-56 truncate text-[11px] text-muted-foreground" title={run.pending_students.join(", ")}>
91 {tx("insights.pendingStudents", { count: run.pending_students.length })}91 {tx("insights.pendingStudents", { count: run.pending_students.length })}
src/components/layout/celebi-markdown.tsxmodified+1 -1
@@ -116,7 +116,7 @@ function InlineSegments(props: { segments: Segment[] }) {
116 href={(segment as { href: string }).href}116 href={(segment as { href: string }).href}
117 target="_blank"117 target="_blank"
118 rel="noreferrer"118 rel="noreferrer"
119- class="underline underline-offset-2 hover:text-primary"119+ class="underline underline-offset-2 hover:text-primary-text"
120 >120 >
121 {(segment as { label: string }).label}121 {(segment as { label: string }).label}
122 </a>122 </a>
src/components/layout/celebi-panel.tsxmodified+3 -3
@@ -342,7 +342,7 @@ export function CelebiPanel(props: { open: boolean; onOpenChange: (open: boolean
342 <div class="flex flex-col gap-3">342 <div class="flex flex-col gap-3">
343 <For each={filteredMessages()}>343 <For each={filteredMessages()}>
344 {(message) => (344 {(message) => (
345- <div class={message.role === "user" ? "ml-8 rounded-lg rounded-br-sm bg-primary px-3.5 py-2.5 text-sm text-primary-foreground selection:bg-primary-foreground selection:text-primary" : "mr-6 rounded-lg rounded-bl-sm border border-border bg-card px-3.5 py-2.5 text-sm text-foreground shadow-sm"}>345+ <div class={message.role === "user" ? "ml-8 rounded-lg rounded-br-sm bg-primary px-3.5 py-2.5 text-sm text-primary-foreground selection:bg-primary-foreground selection:text-primary-text" : "mr-6 rounded-lg rounded-bl-sm border border-border bg-card px-3.5 py-2.5 text-sm text-foreground shadow-sm"}>
346 <Switch>346 <Switch>
347 <Match when={message.role === "user"}>347 <Match when={message.role === "user"}>
348 <p class="whitespace-pre-wrap leading-6">{message.content}</p>348 <p class="whitespace-pre-wrap leading-6">{message.content}</p>
@@ -353,7 +353,7 @@ export function CelebiPanel(props: { open: boolean; onOpenChange: (open: boolean
353 {/* The label stands in only until the first characters land;353 {/* The label stands in only until the first characters land;
354 an answer that is still being written keeps typing. */}354 an answer that is still being written keeps typing. */}
355 <Match when={message.status === "pending" && !visibleContent(message)}>355 <Match when={message.status === "pending" && !visibleContent(message)}>
356- <span class="flex items-center gap-2 text-muted-foreground"><IconBotSquare class="h-4 w-4 text-primary" /><span class="animate-pulse"><CelebiThinkingLabel /></span></span>356+ <span class="flex items-center gap-2 text-muted-foreground"><IconBotSquare class="h-4 w-4 text-primary-text" /><span class="animate-pulse"><CelebiThinkingLabel /></span></span>
357 </Match>357 </Match>
358 <Match when={true}>358 <Match when={true}>
359 <CelebiMarkdown text={visibleContent(message)} />359 <CelebiMarkdown text={visibleContent(message)} />
@@ -370,7 +370,7 @@ export function CelebiPanel(props: { open: boolean; onOpenChange: (open: boolean
370 </Match>370 </Match>
371 </Switch>371 </Switch>
372 <Show when={message.role === "assistant" && message.status === "failed"}>372 <Show when={message.role === "assistant" && message.status === "failed"}>
373- <span class="mt-2 flex items-center gap-1.5 text-xs text-destructive"><IconAlert class="h-3.5 w-3.5" />{failureMessage(message.error_code)}</span>373+ <span class="mt-2 flex items-center gap-1.5 text-xs text-destructive-text"><IconAlert class="h-3.5 w-3.5" />{failureMessage(message.error_code)}</span>
374 </Show>374 </Show>
375 <Show when={message.role === "assistant" && message.truncated}>375 <Show when={message.role === "assistant" && message.truncated}>
376 <p class="mt-2 text-xs text-muted-foreground">{locale() === "tr" ? "Yanıt uzunluk sınırında kısaltıldı." : "Response was shortened at the configured limit."}</p>376 <p class="mt-2 text-xs text-muted-foreground">{locale() === "tr" ? "Yanıt uzunluk sınırında kısaltıldı." : "Response was shortened at the configured limit."}</p>
src/components/layout/celebi-thread-list.tsxmodified+1 -1
@@ -58,7 +58,7 @@ export function CelebiThreadList(props: {
58 <button type="button" class="flex h-full min-h-12 w-9 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground" aria-label={t("ai.renameChat")} onClick={() => props.onRename(thread)}>58 <button type="button" class="flex h-full min-h-12 w-9 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground" aria-label={t("ai.renameChat")} onClick={() => props.onRename(thread)}>
59 <IconEdit class="h-3.5 w-3.5" />59 <IconEdit class="h-3.5 w-3.5" />
60 </button>60 </button>
61- <button type="button" class="flex h-full min-h-12 w-9 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive" aria-label={t("ai.deleteChat")} onClick={() => props.onRemove(thread)}>61+ <button type="button" class="flex h-full min-h-12 w-9 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive-text" aria-label={t("ai.deleteChat")} onClick={() => props.onRemove(thread)}>
62 <IconTrash class="h-3.5 w-3.5" />62 <IconTrash class="h-3.5 w-3.5" />
63 </button>63 </button>
64 </li>64 </li>
src/components/layout/mobile-nav-sheet.tsxmodified+2 -2
@@ -182,14 +182,14 @@ export function MobileNavSheet(props: {
182 const active = () => current()?.id === item.id;182 const active = () => current()?.id === item.id;
183 const rowClass = () => cn(183 const rowClass = () => cn(
184 "flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-left transition-colors active:bg-muted",184 "flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-left transition-colors active:bg-muted",
185- active() ? "text-primary" : "text-foreground",185+ active() ? "text-primary-text" : "text-foreground",
186 );186 );
187 const content = (187 const content = (
188 <>188 <>
189 <span189 <span
190 class={cn(190 class={cn(
191 "inline-flex size-7 shrink-0 items-center justify-center rounded-md",191 "inline-flex size-7 shrink-0 items-center justify-center rounded-md",
192- active() ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground",192+ active() ? "bg-primary/10 text-primary-text" : "bg-muted text-muted-foreground",
193 )}193 )}
194 >194 >
195 <item.Icon class="h-4 w-4" />195 <item.Icon class="h-4 w-4" />
src/components/layout/network-status-banner.tsxmodified+1 -1
@@ -29,7 +29,7 @@ export function NetworkStatusBanner() {
29 <Show when={!online()}>29 <Show when={!online()}>
30 <div class="flex flex-wrap items-center justify-between gap-3 border-b border-warning/30 bg-warning/10 px-4 py-2.5 text-sm sm:px-6 lg:px-4">30 <div class="flex flex-wrap items-center justify-between gap-3 border-b border-warning/30 bg-warning/10 px-4 py-2.5 text-sm sm:px-6 lg:px-4">
31 <span class="flex min-w-0 items-center gap-2 text-text-strong">31 <span class="flex min-w-0 items-center gap-2 text-text-strong">
32- <IconWifiOff class="h-4 w-4 shrink-0 text-warning" />32+ <IconWifiOff class="h-4 w-4 shrink-0 text-warning-text" />
33 <span class="min-w-0">33 <span class="min-w-0">
34 <span class="font-semibold">{t("network.offlineTitle")}</span>34 <span class="font-semibold">{t("network.offlineTitle")}</span>
35 <span class="hidden text-text-subtle sm:inline"> — {t("network.offlineDescription")}</span>35 <span class="hidden text-text-subtle sm:inline"> — {t("network.offlineDescription")}</span>
src/components/layout/notification-center.tsxmodified+3 -3
@@ -222,7 +222,7 @@ export function NotificationCenter() {
222 <div class="flex items-center gap-2">222 <div class="flex items-center gap-2">
223 <h3 class="text-sm font-semibold text-text-strong">{t("notifications.title")}</h3>223 <h3 class="text-sm font-semibold text-text-strong">{t("notifications.title")}</h3>
224 <Show when={unreadCount() > 0}>224 <Show when={unreadCount() > 0}>
225- <span class="rounded-full bg-primary/15 px-2 py-0.5 font-mono text-[10px] font-bold text-primary">225+ <span class="rounded-full bg-primary/15 px-2 py-0.5 font-mono text-[10px] font-bold text-primary-text">
226 {unreadCount()}226 {unreadCount()}
227 </span>227 </span>
228 </Show>228 </Show>
@@ -233,7 +233,7 @@ export function NotificationCenter() {
233 type="button"233 type="button"
234 variant="ghost"234 variant="ghost"
235 size="sm"235 size="sm"
236- class="h-7 rounded-lg px-2 text-[11px] font-semibold text-text-subtle hover:bg-destructive/10 hover:text-destructive"236+ class="h-7 rounded-lg px-2 text-[11px] font-semibold text-text-subtle hover:bg-destructive/10 hover:text-destructive-text"
237 onClick={handleDismissAll}237 onClick={handleDismissAll}
238 title={t("notifications.clearAll")}238 title={t("notifications.clearAll")}
239 >239 >
@@ -302,7 +302,7 @@ export function NotificationCenter() {
302 302
303 <button303 <button
304 type="button"304 type="button"
305- class="absolute right-2 top-2.5 flex h-6 w-6 items-center justify-center rounded-md text-text-subtle/70 opacity-80 transition-all hover:bg-destructive/10 hover:text-destructive sm:opacity-0 sm:group-hover:opacity-100"305+ class="absolute right-2 top-2.5 flex h-6 w-6 items-center justify-center rounded-md text-text-subtle/70 opacity-80 transition-all hover:bg-destructive/10 hover:text-destructive-text sm:opacity-0 sm:group-hover:opacity-100"
306 title={t("notifications.dismiss")}306 title={t("notifications.dismiss")}
307 onClick={(e) => handleDismissSingle(e, item.id)}307 onClick={(e) => handleDismissSingle(e, item.id)}
308 >308 >
src/components/layout/route-error.tsxmodified+1 -1
@@ -18,7 +18,7 @@ export function RouteErrorFallback(props: ErrorComponentProps) {
18 console.error("Route render error:", props.error);18 console.error("Route render error:", props.error);
19 return (19 return (
20 <div role="alert" class="mx-auto flex w-full max-w-[520px] flex-col items-center gap-4 rounded-xl border border-border-line bg-surface-base px-6 py-10 text-center">20 <div role="alert" class="mx-auto flex w-full max-w-[520px] flex-col items-center gap-4 rounded-xl border border-border-line bg-surface-base px-6 py-10 text-center">
21- <span class="flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10 text-destructive">21+ <span class="flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10 text-destructive-text">
22 <IconAlert class="h-5 w-5" />22 <IconAlert class="h-5 w-5" />
23 </span>23 </span>
24 <div class="space-y-1.5">24 <div class="space-y-1.5">
src/components/layout/route-guard.tsxmodified+1 -1
@@ -15,7 +15,7 @@ function AccessDeniedCard() {
15 return (15 return (
16 <div class="flex min-h-[50vh] items-center justify-center px-4 py-16">16 <div class="flex min-h-[50vh] items-center justify-center px-4 py-16">
17 <div class="w-full max-w-[420px] space-y-5 rounded-xl border border-border-line bg-surface-base p-8 text-center shadow-[0_10px_24px_-4px_rgba(0,0,0,0.10)]">17 <div class="w-full max-w-[420px] space-y-5 rounded-xl border border-border-line bg-surface-base p-8 text-center shadow-[0_10px_24px_-4px_rgba(0,0,0,0.10)]">
18- <div class="mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-warning/10 text-warning">18+ <div class="mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-warning/10 text-warning-text">
19 <IconLock class="h-6 w-6" />19 <IconLock class="h-6 w-6" />
20 </div>20 </div>
21 <div class="space-y-2">21 <div class="space-y-2">
src/components/layout/side-nav.tsxmodified+3 -3
@@ -89,7 +89,7 @@ export function SideNav(props: {
89 "relative flex h-[34px] items-center rounded-lg text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",89 "relative flex h-[34px] items-center rounded-lg text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",
90 props.collapsed ? "mx-auto h-10 w-12 justify-center px-0" : "gap-3 px-3",90 props.collapsed ? "mx-auto h-10 w-12 justify-center px-0" : "gap-3 px-3",
91 active()91 active()
92- ? "bg-primary/10 text-primary"92+ ? "bg-primary/10 text-primary-text"
93 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",93 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
94 )}94 )}
95 >95 >
@@ -115,7 +115,7 @@ export function SideNav(props: {
115 const linkClass = () => cn(115 const linkClass = () => cn(
116 "relative flex h-[30px] items-center gap-3 rounded-lg px-3 text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",116 "relative flex h-[30px] items-center gap-3 rounded-lg px-3 text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",
117 itemActive()117 itemActive()
118- ? "bg-primary/10 text-primary"118+ ? "bg-primary/10 text-primary-text"
119 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",119 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
120 );120 );
121 const content = (121 const content = (
@@ -180,7 +180,7 @@ export function SideNav(props: {
180 class={cn(180 class={cn(
181 "relative mx-auto flex h-10 w-12 items-center justify-center rounded-md outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",181 "relative mx-auto flex h-10 w-12 items-center justify-center rounded-md outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",
182 active()182 active()
183- ? "bg-primary/10 text-primary"183+ ? "bg-primary/10 text-primary-text"
184 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",184 : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
185 )}185 )}
186 aria-label={t(group.labelKey)}186 aria-label={t(group.labelKey)}
src/components/marks/marks-report-view.tsxmodified+4 -4
@@ -130,12 +130,12 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
130 {(block) => (130 {(block) => (
131 <tr class="border-b border-border/60 last:border-0">131 <tr class="border-b border-border/60 last:border-0">
132 <td class="min-w-0 p-3">132 <td class="min-w-0 p-3">
133- <Link to="/courses/$id" params={{ id: block.course.id }} class="block truncate font-medium hover:text-primary hover:underline">133+ <Link to="/courses/$id" params={{ id: block.course.id }} class="block truncate font-medium hover:text-primary-text hover:underline">
134 {block.course.title}134 {block.course.title}
135 </Link>135 </Link>
136 </td>136 </td>
137 <td class="min-w-0 p-3 text-muted-foreground">137 <td class="min-w-0 p-3 text-muted-foreground">
138- <Link to="/instances/$id" params={{ id: block.instance }} class="block truncate hover:text-primary hover:underline">138+ <Link to="/instances/$id" params={{ id: block.instance }} class="block truncate hover:text-primary-text hover:underline">
139 {t("instances.open")}139 {t("instances.open")}
140 </Link>140 </Link>
141 </td>141 </td>
@@ -181,10 +181,10 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
181 <div class="rounded-lg border border-border bg-card p-4 shadow-xs">181 <div class="rounded-lg border border-border bg-card p-4 shadow-xs">
182 <div class="flex flex-wrap items-center justify-between gap-3">182 <div class="flex flex-wrap items-center justify-between gap-3">
183 <div class="min-w-0">183 <div class="min-w-0">
184- <Link to="/courses/$id" params={{ id: block.course.id }} class="inline-flex truncate text-sm font-semibold text-primary hover:underline">184+ <Link to="/courses/$id" params={{ id: block.course.id }} class="inline-flex truncate text-sm font-semibold text-primary-text hover:underline">
185 {block.course.title}185 {block.course.title}
186 </Link>186 </Link>
187- <Link to="/instances/$id" params={{ id: block.instance }} class="mt-0.5 block truncate text-xs text-muted-foreground hover:text-primary hover:underline">187+ <Link to="/instances/$id" params={{ id: block.instance }} class="mt-0.5 block truncate text-xs text-muted-foreground hover:text-primary-text hover:underline">
188 {t("instances.open")}188 {t("instances.open")}
189 </Link>189 </Link>
190 </div>190 </div>
src/components/meals/meal-menu-card.tsxmodified+1 -1
@@ -38,7 +38,7 @@ export function MealMenuCard(props: {
38 <div class="mt-2 flex justify-end"><ComingSoonBadge /></div>38 <div class="mt-2 flex justify-end"><ComingSoonBadge /></div>
39 <div class="mt-4 flex flex-wrap gap-1.5"><For each={props.menu.dishes}>{(dish) => <Badge variant="outline">{dish.name}</Badge>}</For></div>39 <div class="mt-4 flex flex-wrap gap-1.5"><For each={props.menu.dishes}>{(dish) => <Badge variant="outline">{dish.name}</Badge>}</For></div>
40 <Show when={conflicts().length > 0}>40 <Show when={conflicts().length > 0}>
41- <div class="mt-3 flex items-start gap-2 rounded-xl border border-warning/50 bg-warning/10 p-2 text-xs text-warning">41+ <div class="mt-3 flex items-start gap-2 rounded-xl border border-warning/50 bg-warning/10 p-2 text-xs text-warning-text">
42 <IconAlert class="mt-0.5 h-4 w-4" /><span>{props.labels.conflict}: {conflicts().join(", ")}</span>42 <IconAlert class="mt-0.5 h-4 w-4" /><span>{props.labels.conflict}: {conflicts().join(", ")}</span>
43 </div>43 </div>
44 </Show>44 </Show>
src/components/messages/gmail-compose-box.tsxmodified+3 -3
@@ -103,7 +103,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) {
103 </button>103 </button>
104 <button104 <button
105 type="button"105 type="button"
106- class="flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive"106+ class="flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text"
107 onClick={handleClose}107 onClick={handleClose}
108 title={t("common.cancel")}108 title={t("common.cancel")}
109 >109 >
@@ -171,7 +171,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) {
171 </div>171 </div>
172 172
173 <Show when={error()}>173 <Show when={error()}>
174- <p class="px-3 text-xs font-medium text-destructive">{error()}</p>174+ <p class="px-3 text-xs font-medium text-destructive-text">{error()}</p>
175 </Show>175 </Show>
176 176
177 {/* Gmail Bottom Action Toolbar */}177 {/* Gmail Bottom Action Toolbar */}
@@ -188,7 +188,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) {
188 188
189 <button189 <button
190 type="button"190 type="button"
191- class="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors"191+ class="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text transition-colors"
192 onClick={handleClose}192 onClick={handleClose}
193 title={t("messages.deleteDraft")}193 title={t("messages.deleteDraft")}
194 >194 >
src/components/messages/gmail-mail-detail.tsxmodified+4 -4
@@ -193,7 +193,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) {
193 <Button193 <Button
194 variant="ghost"194 variant="ghost"
195 size="sm"195 size="sm"
196- class="h-8 rounded-lg text-xs text-destructive hover:bg-destructive/10"196+ class="h-8 rounded-lg text-xs text-destructive-text hover:bg-destructive/10"
197 onClick={() => props.onAction({ folder: "trash" })}197 onClick={() => props.onAction({ folder: "trash" })}
198 title={t("messages.moveToTrash")}198 title={t("messages.moveToTrash")}
199 >199 >
@@ -207,7 +207,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) {
207 <Button207 <Button
208 variant="ghost"208 variant="ghost"
209 size="sm"209 size="sm"
210- class="h-8 rounded-lg text-xs text-destructive hover:bg-destructive/10"210+ class="h-8 rounded-lg text-xs text-destructive-text hover:bg-destructive/10"
211 onClick={() => props.onAction({ delete: true })}211 onClick={() => props.onAction({ delete: true })}
212 title={t("messages.deleteForever")}212 title={t("messages.deleteForever")}
213 >213 >
@@ -328,7 +328,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) {
328 />328 />
329 329
330 <Show when={error()}>330 <Show when={error()}>
331- <p class="text-xs font-medium text-destructive">{error()}</p>331+ <p class="text-xs font-medium text-destructive-text">{error()}</p>
332 </Show>332 </Show>
333 333
334 <div class="flex items-center justify-between pt-1">334 <div class="flex items-center justify-between pt-1">
@@ -344,7 +344,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) {
344 344
345 <button345 <button
346 type="button"346 type="button"
347- class="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive"347+ class="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text"
348 onClick={() => setIsReplying(false)}348 onClick={() => setIsReplying(false)}
349 title={t("common.cancel")}349 title={t("common.cancel")}
350 >350 >
src/components/messages/gmail-mail-row.tsxmodified+3 -3
@@ -127,7 +127,7 @@ export function GmailMailRow(props: GmailMailRowProps) {
127 <Show when={props.onTrash}>127 <Show when={props.onTrash}>
128 <button128 <button
129 type="button"129 type="button"
130- class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors"130+ class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text transition-colors"
131 title={props.folder === "trash" ? t("messages.restoreFromTrash") : t("messages.moveToTrash")}131 title={props.folder === "trash" ? t("messages.restoreFromTrash") : t("messages.moveToTrash")}
132 onClick={(e) => {132 onClick={(e) => {
133 e.stopPropagation();133 e.stopPropagation();
@@ -141,14 +141,14 @@ export function GmailMailRow(props: GmailMailRowProps) {
141 <Show when={props.onDeleteForever}>141 <Show when={props.onDeleteForever}>
142 <button142 <button
143 type="button"143 type="button"
144- class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors"144+ class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text transition-colors"
145 title={t("messages.deleteForever")}145 title={t("messages.deleteForever")}
146 onClick={(e) => {146 onClick={(e) => {
147 e.stopPropagation();147 e.stopPropagation();
148 props.onDeleteForever?.();148 props.onDeleteForever?.();
149 }}149 }}
150 >150 >
151- <IconTrash class="h-3.5 w-3.5 text-destructive" />151+ <IconTrash class="h-3.5 w-3.5 text-destructive-text" />
152 </button>152 </button>
153 </Show>153 </Show>
154 154
src/components/modules/module-catalog-grid.tsxmodified+1 -1
@@ -39,7 +39,7 @@ export function ModuleCatalogGrid(props: {
39 <div class="flex shrink-0 gap-2">39 <div class="flex shrink-0 gap-2">
40 <button40 <button
41 type="button"41 type="button"
42- class="rounded-md px-2 py-1 text-xs font-medium text-primary hover:bg-muted/60 disabled:opacity-50"42+ class="rounded-md px-2 py-1 text-xs font-medium text-primary-text hover:bg-muted/60 disabled:opacity-50"
43 disabled={props.disabled || onCount() === pkg.modules.length}43 disabled={props.disabled || onCount() === pkg.modules.length}
44 onClick={() => toggle()(pkg.package, true)}44 onClick={() => toggle()(pkg.package, true)}
45 >45 >
src/components/notes/note-card.tsxmodified+2 -2
@@ -68,11 +68,11 @@ export function NoteCard(props: {
68 <p class={cn("mt-2 line-clamp-5 flex-1 text-[13px] leading-6", excerpt() ? "text-muted-foreground" : "italic text-muted-foreground/70")}>68 <p class={cn("mt-2 line-clamp-5 flex-1 text-[13px] leading-6", excerpt() ? "text-muted-foreground" : "italic text-muted-foreground/70")}>
69 {excerpt() || t("notes.noContent")}69 {excerpt() || t("notes.noContent")}
70 </p>70 </p>
71- <span class="mt-3 inline-flex items-center gap-1 text-xs font-medium text-primary opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100">71+ <span class="mt-3 inline-flex items-center gap-1 text-xs font-medium text-primary-text opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100">
72 {t("notes.open")}72 {t("notes.open")}
73 <IconChevronRight class="h-3.5 w-3.5" />73 <IconChevronRight class="h-3.5 w-3.5" />
74 </span>74 </span>
75- {error() && <p class="mt-2 text-sm text-destructive">{error()}</p>}75+ {error() && <p class="mt-2 text-sm text-destructive-text">{error()}</p>}
76 </article>76 </article>
77 77
78 <SidePanel open={editing()} onOpenChange={setEditing} title={t("common.edit")} description={props.note.title}>78 <SidePanel open={editing()} onOpenChange={setEditing} title={t("common.edit")} description={props.note.title}>
src/components/notes/note-document.tsxmodified+1 -1
@@ -87,7 +87,7 @@ export function NoteDocument(props: { note?: Note }) {
87 {status()}87 {status()}
88 </span>88 </span>
89 <Show when={props.note}>89 <Show when={props.note}>
90- <Button type="button" variant="outline" size="sm" class="rounded-lg text-destructive hover:text-destructive" onClick={() => setDeleteOpen(true)}>90+ <Button type="button" variant="outline" size="sm" class="rounded-lg text-destructive-text hover:text-destructive-text" onClick={() => setDeleteOpen(true)}>
91 <IconTrash class="h-4 w-4" />91 <IconTrash class="h-4 w-4" />
92 {t("common.delete")}92 {t("common.delete")}
93 </Button>93 </Button>
src/components/notes/note-files-panel.tsxmodified+3 -3
@@ -177,13 +177,13 @@ export function NoteFilesPanel(props: {
177 </Show>177 </Show>
178 </div>178 </div>
179 179
180- {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}180+ {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
181 <Show when={canManage() && atLimit()}>181 <Show when={canManage() && atLimit()}>
182 <p class="text-xs text-muted-foreground">{t("notes.fileLimit")}</p>182 <p class="text-xs text-muted-foreground">{t("notes.fileLimit")}</p>
183 </Show>183 </Show>
184 184
185 <Show when={files.error}>185 <Show when={files.error}>
186- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{formatApiError(files.error)}</p>186+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{formatApiError(files.error)}</p>
187 </Show>187 </Show>
188 188
189 <Suspense fallback={<PageSpinner />}>189 <Suspense fallback={<PageSpinner />}>
@@ -272,7 +272,7 @@ export function NoteFilesPanel(props: {
272 class="sm:max-w-3xl"272 class="sm:max-w-3xl"
273 >273 >
274 <Show when={error()}>274 <Show when={error()}>
275- <p class="mb-3 rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>275+ <p class="mb-3 rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
276 </Show>276 </Show>
277 <Suspense fallback={<PageSpinner />}>277 <Suspense fallback={<PageSpinner />}>
278 <DrawCanvas278 <DrawCanvas
src/components/notes/note-form.tsxmodified+2 -2
@@ -194,7 +194,7 @@ export function NoteForm(props: {
194 type="button"194 type="button"
195 variant="ghost"195 variant="ghost"
196 size="icon"196 size="icon"
197- class="h-8 w-8 rounded-md text-destructive hover:text-destructive"197+ class="h-8 w-8 rounded-md text-destructive-text hover:text-destructive-text"
198 onClick={() => setFiles((prev) => prev.filter((_, i) => i !== index()))}198 onClick={() => setFiles((prev) => prev.filter((_, i) => i !== index()))}
199 aria-label={t("common.delete")}199 aria-label={t("common.delete")}
200 >200 >
@@ -209,7 +209,7 @@ export function NoteForm(props: {
209 </Show>209 </Show>
210 210
211 {error() && (211 {error() && (
212- <p class="rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-sm text-destructive">212+ <p class="rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-sm text-destructive-text">
213 {error()}213 {error()}
214 </p>214 </p>
215 )}215 )}
src/components/notes/note-import-panel.tsxmodified+1 -1
@@ -184,7 +184,7 @@ export function NoteImportPanel(props: {
184 </Show>184 </Show>
185 185
186 <Show when={error()}>186 <Show when={error()}>
187- <p class="rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-sm text-destructive">187+ <p class="rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-sm text-destructive-text">
188 {error()}188 {error()}
189 </p>189 </p>
190 </Show>190 </Show>
src/components/notes/note-rich-editor.tsxmodified+1 -1
@@ -195,7 +195,7 @@ export function NoteRichEditor(props: {
195 type="button"195 type="button"
196 class={cn(196 class={cn(
197 "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",197 "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
198- tool.active?.() && "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary",198+ tool.active?.() && "bg-primary/10 text-primary-text hover:bg-primary/15 hover:text-primary-text",
199 )}199 )}
200 title={tool.label()}200 title={tool.label()}
201 aria-label={tool.label()}201 aria-label={tool.label()}
src/components/notes/podcast-panel.tsxmodified+1 -1
@@ -152,7 +152,7 @@ export function PodcastPanel(props: { noteId: string; active?: boolean; noteTitl
152 return (152 return (
153 <section class="space-y-4 rounded-xl border border-border-line bg-surface-base p-4 shadow-xs">153 <section class="space-y-4 rounded-xl border border-border-line bg-surface-base p-4 shadow-xs">
154 <div class="flex items-start gap-3">154 <div class="flex items-start gap-3">
155- <div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary">155+ <div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-text">
156 <IconWaveform class="h-5 w-5" />156 <IconWaveform class="h-5 w-5" />
157 </div>157 </div>
158 <div>158 <div>
src/components/rag/rag-citations.tsxmodified+1 -1
@@ -17,7 +17,7 @@ export function RagCitations(props: {
17 {(citation) => (17 {(citation) => (
18 <li class="rounded-lg border border-border/70 bg-muted/30 px-3 py-2 text-xs">18 <li class="rounded-lg border border-border/70 bg-muted/30 px-3 py-2 text-xs">
19 <div class="flex items-start gap-2">19 <div class="flex items-start gap-2">
20- <span class="mt-0.5 flex h-5 min-w-5 items-center justify-center rounded-md bg-primary/10 px-1 font-mono font-semibold text-primary">20+ <span class="mt-0.5 flex h-5 min-w-5 items-center justify-center rounded-md bg-primary/10 px-1 font-mono font-semibold text-primary-text">
21 {citation.n}21 {citation.n}
22 </span>22 </span>
23 <div class="min-w-0 space-y-1">23 <div class="min-w-0 space-y-1">
src/components/rag/rag-message-row.tsxmodified+2 -2
@@ -28,7 +28,7 @@ export function RagMessageRow(props: {
28 return (28 return (
29 <article class={cn("flex gap-3", assistant() ? "justify-start" : "justify-end")}>29 <article class={cn("flex gap-3", assistant() ? "justify-start" : "justify-end")}>
30 <Show when={assistant()}>30 <Show when={assistant()}>
31- <span class="mt-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-primary/20 bg-primary/10 text-primary">31+ <span class="mt-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-primary/20 bg-primary/10 text-primary-text">
32 <IconBotSquare class="h-4 w-4" />32 <IconBotSquare class="h-4 w-4" />
33 </span>33 </span>
34 </Show>34 </Show>
@@ -43,7 +43,7 @@ export function RagMessageRow(props: {
43 <p class="animate-pulse text-muted-foreground" role="status">{props.labels.thinking}</p>43 <p class="animate-pulse text-muted-foreground" role="status">{props.labels.thinking}</p>
44 </Match>44 </Match>
45 <Match when={props.message.status === "failed"}>45 <Match when={props.message.status === "failed"}>
46- <div class="flex items-start gap-2 text-destructive">46+ <div class="flex items-start gap-2 text-destructive-text">
47 <IconAlert class="mt-0.5 h-4 w-4 shrink-0" />47 <IconAlert class="mt-0.5 h-4 w-4 shrink-0" />
48 <p>{failure()}</p>48 <p>{failure()}</p>
49 </div>49 </div>
src/components/rag/rag-thread-list.tsxmodified+1 -1
@@ -63,7 +63,7 @@ export function RagThreadList(props: {
63 </button>63 </button>
64 <button64 <button
65 type="button"65 type="button"
66- class="flex w-9 shrink-0 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive"66+ class="flex w-9 shrink-0 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive-text"
67 aria-label={props.labels.delete}67 aria-label={props.labels.delete}
68 onClick={() => props.onRemove(thread)}68 onClick={() => props.onRemove(thread)}
69 >69 >
src/components/sessions/session-roll-call.tsxmodified+1 -1
@@ -144,7 +144,7 @@ export function SessionRollCall(props: {
144 type="button"144 type="button"
145 variant="ghost"145 variant="ghost"
146 size="icon"146 size="icon"
147- class="h-10 w-10 shrink-0 text-destructive hover:bg-destructive/10"147+ class="h-10 w-10 shrink-0 text-destructive-text hover:bg-destructive/10"
148 aria-label={t("common.remove")}148 aria-label={t("common.remove")}
149 disabled={pendingUserId() != null}149 disabled={pendingUserId() != null}
150 onClick={() => void clear(target.user.id)}150 onClick={() => void clear(target.user.id)}
src/components/ui/alert.tsxmodified+4 -4
@@ -11,10 +11,10 @@ export function Alert(
11 role="alert"11 role="alert"
12 class={cn(12 class={cn(
13 "relative flex min-h-[70px] w-full items-center rounded-lg border px-5 py-4 text-sm",13 "relative flex min-h-[70px] w-full items-center rounded-lg border px-5 py-4 text-sm",
14- local.variant === "destructive" && "border-destructive/30 bg-destructive/10 text-destructive",14+ local.variant === "destructive" && "border-destructive/30 bg-destructive/10 text-destructive-text",
15- local.variant === "success" && "border-success/30 bg-success/10 font-medium text-success",15+ local.variant === "success" && "border-success/30 bg-success/10 font-medium text-success-text",
16- local.variant === "warning" && "border-warning/30 bg-warning/10 font-medium text-warning",16+ local.variant === "warning" && "border-warning/30 bg-warning/10 font-medium text-warning-text",
17- local.variant === "info" && "border-info/30 bg-info/10 font-medium text-info",17+ local.variant === "info" && "border-info/30 bg-info/10 font-medium text-info-text",
18 (!local.variant || local.variant === "default") && "border-border-line bg-surface-base text-foreground",18 (!local.variant || local.variant === "default") && "border-border-line bg-surface-base text-foreground",
19 local.class,19 local.class,
20 )}20 )}
src/components/ui/badge.tsxmodified+3 -3
@@ -12,9 +12,9 @@ const badgeVariants = cva(
12 secondary: "border-transparent bg-secondary text-secondary-foreground",12 secondary: "border-transparent bg-secondary text-secondary-foreground",
13 outline: "border-border text-foreground",13 outline: "border-border text-foreground",
14 destructive: "border-transparent bg-destructive/90 text-destructive-foreground",14 destructive: "border-transparent bg-destructive/90 text-destructive-foreground",
15- success: "border-transparent bg-success/15 text-success",15+ success: "border-transparent bg-success/15 text-success-text",
16- warning: "border-transparent bg-warning/15 text-warning",16+ warning: "border-transparent bg-warning/15 text-warning-text",
17- info: "border-transparent bg-info/15 text-info",17+ info: "border-transparent bg-info/15 text-info-text",
18 },18 },
19 },19 },
20 defaultVariants: {20 defaultVariants: {
src/components/ui/button.tsxmodified+1 -1
@@ -15,7 +15,7 @@ export const buttonVariants = cva(
15 "border border-border/70 bg-transparent hover:border-border hover:bg-muted/60 hover:text-foreground",15 "border border-border/70 bg-transparent hover:border-border hover:bg-muted/60 hover:text-foreground",
16 secondary: "border border-border/60 bg-secondary text-secondary-foreground hover:bg-secondary/80",16 secondary: "border border-border/60 bg-secondary text-secondary-foreground hover:bg-secondary/80",
17 ghost: "text-foreground/75 hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",17 ghost: "text-foreground/75 hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",
18- link: "text-primary underline-offset-4 hover:underline active:scale-100",18+ link: "text-primary-text underline-offset-4 hover:underline active:scale-100",
19 },19 },
20 size: {20 size: {
21 default: "h-9 rounded-lg px-3 py-2",21 default: "h-9 rounded-lg px-3 py-2",
src/components/ui/combobox.tsxmodified+1 -1
@@ -94,7 +94,7 @@ export function ComboboxItem<T extends ValidComponent = "li">(
94 >94 >
95 {local.children}95 {local.children}
96 <ComboboxPrimitive.ItemIndicator>96 <ComboboxPrimitive.ItemIndicator>
97- <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary" />97+ <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary-text" />
98 </ComboboxPrimitive.ItemIndicator>98 </ComboboxPrimitive.ItemIndicator>
99 </ComboboxPrimitive.Item>99 </ComboboxPrimitive.Item>
100 );100 );
src/components/ui/confirm-dialog.tsxmodified+1 -1
@@ -64,7 +64,7 @@ export function ConfirmDialog(props: ConfirmDialogProps) {
64 <span64 <span
65 class={cn(65 class={cn(
66 "mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-md border",66 "mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-md border",
67- props.iconClass ?? (destructive() ? "border-destructive/20 bg-destructive/10 text-destructive" : "border-primary/20 bg-primary/10 text-primary"),67+ props.iconClass ?? (destructive() ? "border-destructive/20 bg-destructive/10 text-destructive-text" : "border-primary/20 bg-primary/10 text-primary-text"),
68 )}68 )}
69 >69 >
70 <Show when={props.icon} fallback={70 <Show when={props.icon} fallback={
src/components/ui/date-picker.tsxmodified+1 -1
@@ -166,7 +166,7 @@ export function DatePicker(props: {
166 type="button"166 type="button"
167 class={cn(167 class={cn(
168 "inline-flex h-9 items-center justify-center rounded-md border border-transparent p-0 text-xs font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",168 "inline-flex h-9 items-center justify-center rounded-md border border-transparent p-0 text-xs font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
169- isSameDay(today, day()) && "border-primary/50 text-primary",169+ isSameDay(today, day()) && "border-primary/50 text-primary-text",
170 sameDay(selected(), day()) && "border-primary bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 hover:text-primary-foreground",170 sameDay(selected(), day()) && "border-primary bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 hover:text-primary-foreground",
171 )}171 )}
172 onClick={(event) => {172 onClick={(event) => {
src/components/ui/dropdown-menu.tsxmodified+1 -1
@@ -47,7 +47,7 @@ export function DropdownMenuItem<T extends ValidComponent = "div">(
47 "data-disabled:pointer-events-none data-disabled:opacity-40",47 "data-disabled:pointer-events-none data-disabled:opacity-40",
48 local.inset && "pl-9",48 local.inset && "pl-9",
49 local.destructive &&49 local.destructive &&
50- "text-destructive focus:bg-destructive/10 focus:text-destructive data-highlighted:bg-destructive/10 data-highlighted:text-destructive",50+ "text-destructive-text focus:bg-destructive/10 focus:text-destructive-text data-highlighted:bg-destructive/10 data-highlighted:text-destructive-text",
51 local.class,51 local.class,
52 )}52 )}
53 {...rest}53 {...rest}
src/components/ui/input.tsxmodified+1 -1
@@ -25,7 +25,7 @@ export function Input(props: InputProps) {
25 {...rest}25 {...rest}
26 />26 />
27 <Show when={local.error}>27 <Show when={local.error}>
28- <p id={errorId()} class="text-xs font-medium text-destructive">{local.error}</p>28+ <p id={errorId()} class="text-xs font-medium text-destructive-text">{local.error}</p>
29 </Show>29 </Show>
30 </>30 </>
31 );31 );
src/components/ui/select.tsxmodified+4 -4
@@ -63,7 +63,7 @@ export function DropdownSelect<T extends string | number = string>(props: Dropdo
63 <DropdownMenuItem63 <DropdownMenuItem
64 class={cn(64 class={cn(
65 "flex items-center justify-between gap-2.5 text-sm",65 "flex items-center justify-between gap-2.5 text-sm",
66- isSelected() && "bg-primary/10 text-primary font-semibold",66+ isSelected() && "bg-primary/10 text-primary-text font-semibold",
67 )}67 )}
68 onSelect={() => props.onChange(option.value)}68 onSelect={() => props.onChange(option.value)}
69 >69 >
@@ -74,7 +74,7 @@ export function DropdownSelect<T extends string | number = string>(props: Dropdo
74 <span class="truncate">{option.label}</span>74 <span class="truncate">{option.label}</span>
75 </div>75 </div>
76 <Show when={isSelected()}>76 <Show when={isSelected()}>
77- <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary" />77+ <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary-text" />
78 </Show>78 </Show>
79 </DropdownMenuItem>79 </DropdownMenuItem>
80 );80 );
@@ -168,13 +168,13 @@ export function Select(props: SelectProps) {
168 disabled={option.disabled}168 disabled={option.disabled}
169 class={cn(169 class={cn(
170 "flex items-center justify-between gap-2.5 text-sm",170 "flex items-center justify-between gap-2.5 text-sm",
171- option.value === current() && "bg-primary/10 font-semibold text-primary",171+ option.value === current() && "bg-primary/10 font-semibold text-primary-text",
172 )}172 )}
173 onSelect={() => pick(option.value)}173 onSelect={() => pick(option.value)}
174 >174 >
175 <span class="truncate">{option.label}</span>175 <span class="truncate">{option.label}</span>
176 <Show when={option.value === current()}>176 <Show when={option.value === current()}>
177- <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary" />177+ <IconCheck class="h-3.5 w-3.5 shrink-0 text-primary-text" />
178 </Show>178 </Show>
179 </DropdownMenuItem>179 </DropdownMenuItem>
180 )}180 )}
src/components/ui/table-row-actions.tsxmodified+2 -2
@@ -25,8 +25,8 @@ export function TableRowActions(props: { label: string; actions: TableRowAction[
25 <DropdownMenu placement="bottom-end" gutter={6}>25 <DropdownMenu placement="bottom-end" gutter={6}>
26 <DropdownMenuTrigger26 <DropdownMenuTrigger
27 class={props.compact27 class={props.compact
28- ? "inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border/80 bg-muted/45 text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary"28+ ? "inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border/80 bg-muted/45 text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"
29- : "inline-flex h-8 min-w-[78px] items-center justify-center gap-1.5 rounded-lg border border-border/80 bg-muted/45 px-2 text-xs font-semibold text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary"}29+ : "inline-flex h-8 min-w-[78px] items-center justify-center gap-1.5 rounded-lg border border-border/80 bg-muted/45 px-2 text-xs font-semibold text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"}
30 aria-label={props.label}30 aria-label={props.label}
31 title={props.label}31 title={props.label}
32 >32 >
src/components/ui/textarea.tsxmodified+1 -1
@@ -25,7 +25,7 @@ export function Textarea(props: TextareaProps) {
25 {...rest}25 {...rest}
26 />26 />
27 <Show when={local.error}>27 <Show when={local.error}>
28- <p id={errorId()} class="text-xs font-medium text-destructive">{local.error}</p>28+ <p id={errorId()} class="text-xs font-medium text-destructive-text">{local.error}</p>
29 </Show>29 </Show>
30 </>30 </>
31 );31 );
src/components/users/account-profile-dialog.tsxmodified+1 -1
@@ -28,7 +28,7 @@ export function AccountProfileDialog(props: { open: boolean; onOpenChange: (open
28 aria-current={section() === id ? "page" : undefined}28 aria-current={section() === id ? "page" : undefined}
29 class={cn(29 class={cn(
30 "flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors outline-hidden focus-visible:ring-2 focus-visible:ring-ring",30 "flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
31- section() === id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",31+ section() === id ? "bg-primary/10 text-primary-text" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
32 )}32 )}
33 >33 >
34 {icon}34 {icon}
src/components/users/avatar-upload.tsxmodified+1 -1
@@ -101,7 +101,7 @@ export function AvatarUpload(props: {
101 </div>101 </div>
102 102
103 <Show when={error()}>103 <Show when={error()}>
104- <p class="max-w-40 text-xs text-destructive">{error()}</p>104+ <p class="max-w-40 text-xs text-destructive-text">{error()}</p>
105 </Show>105 </Show>
106 106
107 <input107 <input
src/components/users/badge-grid.tsxmodified+4 -4
@@ -117,7 +117,7 @@ export function BadgeGrid(props: {
117 <div class="flex flex-wrap items-start justify-between gap-3">117 <div class="flex flex-wrap items-start justify-between gap-3">
118 <div class="min-w-0">118 <div class="min-w-0">
119 <h2 class="flex items-center gap-2 text-lg font-semibold tracking-tight text-foreground">119 <h2 class="flex items-center gap-2 text-lg font-semibold tracking-tight text-foreground">
120- <PixelIcon name="trophy" class="h-5 w-5 text-primary" />120+ <PixelIcon name="trophy" class="h-5 w-5 text-primary-text" />
121 {t("badges.title")}121 {t("badges.title")}
122 </h2>122 </h2>
123 <p class="mt-1 text-sm text-muted-foreground">{t("badges.subtitle")}</p>123 <p class="mt-1 text-sm text-muted-foreground">{t("badges.subtitle")}</p>
@@ -156,11 +156,11 @@ export function BadgeGrid(props: {
156 >156 >
157 {(n) => (157 {(n) => (
158 <div class="flex flex-wrap items-center gap-3 rounded-lg border border-primary/25 bg-primary/5 px-4 py-3">158 <div class="flex flex-wrap items-center gap-3 rounded-lg border border-primary/25 bg-primary/5 px-4 py-3">
159- <span class="flex h-9 w-9 items-center justify-center rounded-md bg-primary/15 text-primary">159+ <span class="flex h-9 w-9 items-center justify-center rounded-md bg-primary/15 text-primary-text">
160 <PixelIcon name={statIcon(n().entry.stat)} class="h-5 w-5" />160 <PixelIcon name={statIcon(n().entry.stat)} class="h-5 w-5" />
161 </span>161 </span>
162 <div class="min-w-0 flex-1">162 <div class="min-w-0 flex-1">
163- <p class="text-[11px] font-medium uppercase tracking-wide text-primary">{t("badges.next")}</p>163+ <p class="text-[11px] font-medium uppercase tracking-wide text-primary-text">{t("badges.next")}</p>
164 <p class="truncate text-sm text-muted-foreground">{description(n().entry.id) || label(n().entry.id)}</p>164 <p class="truncate text-sm text-muted-foreground">{description(n().entry.id) || label(n().entry.id)}</p>
165 </div>165 </div>
166 <div class="w-40">166 <div class="w-40">
@@ -188,7 +188,7 @@ export function BadgeGrid(props: {
188 <span188 <span
189 class={cn(189 class={cn(
190 "flex h-8 w-8 items-center justify-center rounded-md",190 "flex h-8 w-8 items-center justify-center rounded-md",
191- earnedInLadder() > 0 ? "bg-primary/12 text-primary" : "bg-muted text-muted-foreground",191+ earnedInLadder() > 0 ? "bg-primary/12 text-primary-text" : "bg-muted text-muted-foreground",
192 )}192 )}
193 >193 >
194 <PixelIcon name={statIcon(ladder.stat)} class="h-[18px] w-[18px]" />194 <PixelIcon name={statIcon(ladder.stat)} class="h-[18px] w-[18px]" />
src/components/users/parent-students-panel.tsxmodified+2 -2
@@ -84,7 +84,7 @@ export function ParentStudentsPanel(props: {
84 <Show when={flash()}>84 <Show when={flash()}>
85 <Alert variant="success">{flash()}</Alert>85 <Alert variant="success">{flash()}</Alert>
86 </Show>86 </Show>
87- {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}87+ {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
88 88
89 <div class="flex items-end gap-2">89 <div class="flex items-end gap-2">
90 <div class="flex-1">90 <div class="flex-1">
@@ -137,7 +137,7 @@ export function ParentStudentsPanel(props: {
137 <Button137 <Button
138 variant="ghost"138 variant="ghost"
139 size="icon"139 size="icon"
140- class="shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive"140+ class="shrink-0 text-destructive-text hover:bg-destructive/10 hover:text-destructive-text"
141 aria-label={t("parentLink.remove")}141 aria-label={t("parentLink.remove")}
142 onClick={() => setRemoving(student)}142 onClick={() => setRemoving(student)}
143 >143 >
src/components/users/profile-form.tsxmodified+1 -1
@@ -195,7 +195,7 @@ export function ProfileForm(props: {
195 <Label for="pf-birth">{t("profile.birthDate")}</Label>195 <Label for="pf-birth">{t("profile.birthDate")}</Label>
196 <DatePicker id="pf-birth" class="h-10" placeholder={t("form.datePlaceholder")} value={birthDate()} onChange={setBirthDate} />196 <DatePicker id="pf-birth" class="h-10" placeholder={t("form.datePlaceholder")} value={birthDate()} onChange={setBirthDate} />
197 </div>197 </div>
198- {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}198+ {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
199 <div class="flex justify-end">199 <div class="flex justify-end">
200 <Button type="submit" class="w-full sm:w-auto" disabled={pending()}>{t("common.save")}</Button>200 <Button type="submit" class="w-full sm:w-auto" disabled={pending()}>{t("common.save")}</Button>
201 </div>201 </div>
src/components/users/profile-memberships.tsxmodified+2 -2
@@ -67,7 +67,7 @@ export function ProfileMemberships(props: {
67 <For each={classRows()}>67 <For each={classRows()}>
68 {(c) => (68 {(c) => (
69 <li class="flex items-center gap-3 rounded-lg border border-border/60 px-3 py-2.5">69 <li class="flex items-center gap-3 rounded-lg border border-border/60 px-3 py-2.5">
70- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary">70+ <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-text">
71 <IconSchool class="h-4 w-4" />71 <IconSchool class="h-4 w-4" />
72 </span>72 </span>
73 <span class="min-w-0 flex-1">73 <span class="min-w-0 flex-1">
@@ -118,7 +118,7 @@ export function ProfileMemberships(props: {
118 <span118 <span
119 class={cn(119 class={cn(
120 "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",120 "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
121- c.kind === "club" ? "bg-violet-500/10 text-violet-600 dark:text-violet-300" : "bg-primary/10 text-primary",121+ c.kind === "club" ? "bg-violet-500/10 text-violet-600 dark:text-violet-300" : "bg-primary/10 text-primary-text",
122 )}122 )}
123 >123 >
124 <IconBook class="h-4 w-4" />124 <IconBook class="h-4 w-4" />
src/components/users/user-avatar.tsxmodified+1 -1
@@ -43,7 +43,7 @@ export function UserAvatar(props: {
43 return (43 return (
44 <span44 <span
45 class={cn(45 class={cn(
46- "relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/15 font-bold text-primary shadow-xs ring-1 ring-border/70 dark:bg-emerald-100 dark:text-emerald-950 dark:ring-white/20",46+ "relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/15 font-bold text-primary-text shadow-xs ring-1 ring-border/70 dark:bg-emerald-100 dark:text-emerald-950 dark:ring-white/20",
47 SIZES[props.size ?? "sm"],47 SIZES[props.size ?? "sm"],
48 props.class,48 props.class,
49 )}49 )}
src/components/users/user-search-select.tsxmodified+1 -1
@@ -177,7 +177,7 @@ export function UserSearchSelect(props: {
177 <p class="px-2 py-2 text-xs text-muted-foreground">{t("common.loading")}</p>177 <p class="px-2 py-2 text-xs text-muted-foreground">{t("common.loading")}</p>
178 </Show>178 </Show>
179 <Show when={emptyText()}>179 <Show when={emptyText()}>
180- <p class="px-2 py-2 text-xs font-medium text-destructive">{emptyText()}</p>180+ <p class="px-2 py-2 text-xs font-medium text-destructive-text">{emptyText()}</p>
181 </Show>181 </Show>
182 </ComboboxContent>182 </ComboboxContent>
183 </Combobox>183 </Combobox>
src/components/whiteboard/board-bulk-invite.tsxmodified+2 -2
@@ -103,7 +103,7 @@ export function BoardBulkInvite(props: {
103 class={cn(103 class={cn(
104 "rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",104 "rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",
105 kind() === k105 kind() === k
106- ? "border-primary bg-primary/10 text-primary"106+ ? "border-primary bg-primary/10 text-primary-text"
107 : "border-border/70 text-muted-foreground hover:bg-muted/60",107 : "border-border/70 text-muted-foreground hover:bg-muted/60",
108 )}108 )}
109 aria-pressed={kind() === k}109 aria-pressed={kind() === k}
@@ -151,7 +151,7 @@ export function BoardBulkInvite(props: {
151 <p class="text-xs text-muted-foreground">{notice()}</p>151 <p class="text-xs text-muted-foreground">{notice()}</p>
152 </Show>152 </Show>
153 <Show when={error()}>153 <Show when={error()}>
154- <p class="text-xs text-destructive">{error()}</p>154+ <p class="text-xs text-destructive-text">{error()}</p>
155 </Show>155 </Show>
156 </section>156 </section>
157 );157 );
src/components/whiteboard/whiteboard-room-ws.tsxmodified+2 -2
@@ -239,8 +239,8 @@ export function WhiteboardRoom(props: {
239 <Show when={notice()}>239 <Show when={notice()}>
240 {(msg) => (240 {(msg) => (
241 <div class="flex items-start gap-3 rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3">241 <div class="flex items-start gap-3 rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3">
242- <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-destructive" />242+ <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-destructive-text" />
243- <p class="min-w-0 text-sm text-destructive">{msg()}</p>243+ <p class="min-w-0 text-sm text-destructive-text">{msg()}</p>
244 </div>244 </div>
245 )}245 )}
246 </Show>246 </Show>
src/index.cssmodified+19 -1
@@ -50,6 +50,14 @@
50 --color-success: hsl(var(--success));50 --color-success: hsl(var(--success));
51 --color-warning: hsl(var(--warning));51 --color-warning: hsl(var(--warning));
52 --color-info: hsl(var(--info));52 --color-info: hsl(var(--info));
53+ /* Text-on-surface variants: the fills above are for buttons, dots and
54+ tints; small colored text uses these, which reach WCAG AA (4.5:1) on the
55+ page and card backgrounds in both themes. */
56+ --color-primary-text: hsl(var(--primary-text));
57+ --color-success-text: hsl(var(--success-text));
58+ --color-warning-text: hsl(var(--warning-text));
59+ --color-info-text: hsl(var(--info-text));
60+ --color-destructive-text: hsl(var(--destructive-text));
53 61
54 --color-sidebar: hsl(var(--sidebar));62 --color-sidebar: hsl(var(--sidebar));
55 --color-sidebar-foreground: hsl(var(--sidebar-foreground));63 --color-sidebar-foreground: hsl(var(--sidebar-foreground));
@@ -395,6 +403,11 @@
395 --success: 137 63% 39%;403 --success: 137 63% 39%;
396 --warning: 38 92% 50%;404 --warning: 38 92% 50%;
397 --info: 219 98% 53%;405 --info: 219 98% 53%;
406+ --primary-text: var(--accent-light-text, var(--brand-ink));
407+ --success-text: 137 63% 30%;
408+ --warning-text: 38 92% 31%;
409+ --info-text: 219 98% 50%;
410+ --destructive-text: 356 82% 46%;
398 --surface-elevated: 0 0% 100%;411 --surface-elevated: 0 0% 100%;
399 --sidebar: 0 0% 98%;412 --sidebar: 0 0% 98%;
400 --sidebar-foreground: 0 0% 8%;413 --sidebar-foreground: 0 0% 8%;
@@ -446,6 +459,11 @@
446 --success: 137 58% 58%;459 --success: 137 58% 58%;
447 --warning: 38 92% 54%;460 --warning: 38 92% 54%;
448 --info: 219 98% 60%;461 --info: 219 98% 60%;
462+ --primary-text: var(--primary);
463+ --success-text: var(--success);
464+ --warning-text: var(--warning);
465+ --info-text: var(--info);
466+ --destructive-text: var(--destructive);
449 --illu-ink: hsl(240 6% 72%);467 --illu-ink: hsl(240 6% 72%);
450 --illu-line: hsl(0 0% 30%);468 --illu-line: hsl(0 0% 30%);
451 --illu-soft: hsl(0 0% 19%);469 --illu-soft: hsl(0 0% 19%);
@@ -474,7 +492,7 @@
474 }492 }
475 493
476 body {494 body {
477- @apply min-h-screen bg-background font-sans text-foreground antialiased selection:bg-primary/20 selection:text-primary;495+ @apply min-h-screen bg-background font-sans text-foreground antialiased selection:bg-primary/20 selection:text-primary-text;
478 /* The mobile shells (Tauri on Android/iOS) draw the page edge to edge, so496 /* The mobile shells (Tauri on Android/iOS) draw the page edge to edge, so
479 the status bar and the camera cutout sit on top of it. This padding is497 the status bar and the camera cutout sit on top of it. This padding is
480 what starts the page below them; border-box keeps the min-height from498 what starts the page below them; border-box keeps the min-height from
src/lib/appointment-status.tsmodified+3 -3
@@ -3,9 +3,9 @@ import type { AppointmentStatus } from "@/api/client";
3 import type { MessageKey } from "@/i18n/messages";3 import type { MessageKey } from "@/i18n/messages";
4 4
5 export function appointmentStatusClass(status: AppointmentStatus | string): string {5 export function appointmentStatusClass(status: AppointmentStatus | string): string {
6- if (status === "pending") return "border-warning/30 bg-warning/10 text-warning";6+ if (status === "pending") return "border-warning/30 bg-warning/10 text-warning-text";
7- if (status === "approved") return "border-success/30 bg-success/10 text-success";7+ if (status === "approved") return "border-success/30 bg-success/10 text-success-text";
8- if (status === "rejected") return "border-destructive/30 bg-destructive/10 text-destructive";8+ if (status === "rejected") return "border-destructive/30 bg-destructive/10 text-destructive-text";
9 return "border-muted bg-muted/50 text-muted-foreground";9 return "border-muted bg-muted/50 text-muted-foreground";
10 }10 }
11 11
src/lib/attendance-status.tsmodified+4 -4
@@ -6,25 +6,25 @@ export const ATTENDANCE_STATUSES: { value: CoreAttendanceStatus; key: MessageKey
6 value: "present",6 value: "present",
7 key: "status.present",7 key: "status.present",
8 detailKey: "status.presentDetail",8 detailKey: "status.presentDetail",
9- class: "border-success/30 bg-success/10 text-success",9+ class: "border-success/30 bg-success/10 text-success-text",
10 },10 },
11 {11 {
12 value: "absent",12 value: "absent",
13 key: "status.absent",13 key: "status.absent",
14 detailKey: "status.absentDetail",14 detailKey: "status.absentDetail",
15- class: "border-destructive/30 bg-destructive/10 text-destructive",15+ class: "border-destructive/30 bg-destructive/10 text-destructive-text",
16 },16 },
17 {17 {
18 value: "late",18 value: "late",
19 key: "status.late",19 key: "status.late",
20 detailKey: "status.lateDetail",20 detailKey: "status.lateDetail",
21- class: "border-warning/30 bg-warning/10 text-warning",21+ class: "border-warning/30 bg-warning/10 text-warning-text",
22 },22 },
23 {23 {
24 value: "excused",24 value: "excused",
25 key: "status.excused",25 key: "status.excused",
26 detailKey: "status.excusedDetail",26 detailKey: "status.excusedDetail",
27- class: "border-info/30 bg-info/10 text-info",27+ class: "border-info/30 bg-info/10 text-info-text",
28 },28 },
29 ];29 ];
30 30
src/lib/payments.tsmodified+3 -3
@@ -13,9 +13,9 @@ export type StatementStatus = {
13 // receivables-aging colors: green current/paid, amber partial, red overdue.13 // receivables-aging colors: green current/paid, amber partial, red overdue.
14 export function statementStatus(entry: StatementEntry): StatementStatus {14 export function statementStatus(entry: StatementEntry): StatementStatus {
15 if (entry.reversed) return { key: "payments.statusCancelled", class: "border-border bg-muted/40 text-muted-foreground", dot: "bg-muted-foreground/50" };15 if (entry.reversed) return { key: "payments.statusCancelled", class: "border-border bg-muted/40 text-muted-foreground", dot: "bg-muted-foreground/50" };
16- if (entry.outstanding_minor <= 0) return { key: "payments.paid", class: "border-success/50 bg-success/10 text-success", dot: "bg-success" };16+ if (entry.outstanding_minor <= 0) return { key: "payments.paid", class: "border-success/50 bg-success/10 text-success-text", dot: "bg-success" };
17- if (entry.overdue) return { key: "payments.overdue", class: "border-destructive/50 bg-destructive/10 text-destructive", dot: "bg-destructive" };17+ if (entry.overdue) return { key: "payments.overdue", class: "border-destructive/50 bg-destructive/10 text-destructive-text", dot: "bg-destructive" };
18- if (entry.credited_minor > 0) return { key: "payments.statusPartial", class: "border-warning/50 bg-warning/10 text-warning", dot: "bg-warning" };18+ if (entry.credited_minor > 0) return { key: "payments.statusPartial", class: "border-warning/50 bg-warning/10 text-warning-text", dot: "bg-warning" };
19 return { key: "payments.statusPending", class: "border-border bg-background/50 text-muted-foreground", dot: "bg-muted-foreground/40" };19 return { key: "payments.statusPending", class: "border-border bg-background/50 text-muted-foreground", dot: "bg-muted-foreground/40" };
20 }20 }
21 21
src/lib/schedule-status.tsmodified+4 -4
@@ -11,16 +11,16 @@ export type ScheduleStatus =
11 11
12 export function scheduleStatusClass(status: ScheduleStatus | string): string {12 export function scheduleStatusClass(status: ScheduleStatus | string): string {
13 if (status === "active") {13 if (status === "active") {
14- return "border-info/30 bg-info/10 text-info";14+ return "border-info/30 bg-info/10 text-info-text";
15 }15 }
16 if (status === "submitted") {16 if (status === "submitted") {
17- return "border-success/30 bg-success/10 text-success";17+ return "border-success/30 bg-success/10 text-success-text";
18 }18 }
19 if (status === "today" || status === "upcoming" || status === "soon") {19 if (status === "today" || status === "upcoming" || status === "soon") {
20- return "border-warning/30 bg-warning/10 text-warning";20+ return "border-warning/30 bg-warning/10 text-warning-text";
21 }21 }
22 if (status === "finished" || status === "past") {22 if (status === "finished" || status === "past") {
23- return "border-destructive/30 bg-destructive/10 text-destructive";23+ return "border-destructive/30 bg-destructive/10 text-destructive-text";
24 }24 }
25 return "border-muted bg-muted/50 text-muted-foreground";25 return "border-muted bg-muted/50 text-muted-foreground";
26 }26 }
src/pages/academic-years-page.tsxmodified+1 -1
@@ -325,7 +325,7 @@ function AcademicYearsContent() {
325 type="button"325 type="button"
326 variant="ghost"326 variant="ghost"
327 size="icon"327 size="icon"
328- class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive"328+ class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text"
329 aria-label={t("common.delete")}329 aria-label={t("common.delete")}
330 onClick={() => setPromotions((rows) => rows.filter((_, i) => i !== index()))}330 onClick={() => setPromotions((rows) => rows.filter((_, i) => i !== index()))}
331 >331 >
src/pages/appointments-page.tsxmodified+3 -3
@@ -245,7 +245,7 @@ function AppointmentsContent() {
245 <div class="flex flex-col gap-0.5">245 <div class="flex flex-col gap-0.5">
246 {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)}246 {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)}
247 <Show when={hasStandingProposal(cell.row.original)}>247 <Show when={hasStandingProposal(cell.row.original)}>
248- <div class="text-info text-xs">{t("appointments.rescheduleProposed")}</div>248+ <div class="text-info-text text-xs">{t("appointments.rescheduleProposed")}</div>
249 </Show>249 </Show>
250 </div>250 </div>
251 ),251 ),
@@ -337,7 +337,7 @@ function AppointmentsContent() {
337 `Appointment::window`), so the row's own time already shows the337 `Appointment::window`), so the row's own time already shows the
338 proposed one — label it instead of printing it twice. */}338 proposed one — label it instead of printing it twice. */}
339 <Show when={hasStandingProposal(cell.row.original)}>339 <Show when={hasStandingProposal(cell.row.original)}>
340- <div class="text-info text-xs">{t("appointments.proposedTime")}:</div>340+ <div class="text-info-text text-xs">{t("appointments.proposedTime")}:</div>
341 </Show>341 </Show>
342 {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)}342 {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)}
343 </div>343 </div>
@@ -472,7 +472,7 @@ function AppointmentsContent() {
472 <Show when={nextBooking()}>472 <Show when={nextBooking()}>
473 {(booking) => (473 {(booking) => (
474 <div class="mb-4 flex flex-wrap items-center gap-3 rounded-xl border border-border-line bg-surface-tint p-4">474 <div class="mb-4 flex flex-wrap items-center gap-3 rounded-xl border border-border-line bg-surface-tint p-4">
475- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-surface-base text-primary">475+ <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-surface-base text-primary-text">
476 <IconCalendarDays class="h-4 w-4" />476 <IconCalendarDays class="h-4 w-4" />
477 </span>477 </span>
478 <div class="min-w-0 flex-1">478 <div class="min-w-0 flex-1">
src/pages/bank-question-detail-page.tsxmodified+2 -2
@@ -151,7 +151,7 @@ function BankQuestionDetailContent() {
151 <Button151 <Button
152 variant="outline"152 variant="outline"
153 size="sm"153 size="sm"
154- class="text-destructive hover:text-destructive"154+ class="text-destructive-text hover:text-destructive-text"
155 disabled={imagePending() === "question"}155 disabled={imagePending() === "question"}
156 onClick={() => void removeImage("question", () => deleteBankQuestionImage(current().id))}156 onClick={() => void removeImage("question", () => deleteBankQuestionImage(current().id))}
157 >157 >
@@ -180,7 +180,7 @@ function BankQuestionDetailContent() {
180 <Button180 <Button
181 variant="ghost"181 variant="ghost"
182 size="icon"182 size="icon"
183- class="h-8 w-8 text-destructive hover:bg-destructive/10"183+ class="h-8 w-8 text-destructive-text hover:bg-destructive/10"
184 aria-label={t("common.remove")}184 aria-label={t("common.remove")}
185 disabled={imagePending() === choice.id}185 disabled={imagePending() === choice.id}
186 onClick={() => void removeImage(choice.id, () => deleteBankChoiceImage(current().id, choice.id))}186 onClick={() => void removeImage(choice.id, () => deleteBankChoiceImage(current().id, choice.id))}
src/pages/builder-login-page.tsxmodified+2 -2
@@ -115,14 +115,14 @@ function BuilderLoginForm() {
115 </div>115 </div>
116 </div>116 </div>
117 <Show when={error()}>117 <Show when={error()}>
118- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>118+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
119 </Show>119 </Show>
120 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>120 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>
121 {t("auth.login")}121 {t("auth.login")}
122 </Button>122 </Button>
123 </form>123 </form>
124 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">124 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">
125- <Link to="/login" class="font-semibold text-primary underline-offset-4 hover:underline">125+ <Link to="/login" class="font-semibold text-primary-text underline-offset-4 hover:underline">
126 {t("builder.backToSchoolLogin")}126 {t("builder.backToSchoolLogin")}
127 </Link>127 </Link>
128 </p>128 </p>
src/pages/calendar-page.tsxmodified+1 -1
@@ -392,7 +392,7 @@ function CalendarContent() {
392 </div>392 </div>
393 393
394 <Show when={failedFeeds().length > 0}>394 <Show when={failedFeeds().length > 0}>
395- <div role="alert" class="flex flex-wrap items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive">395+ <div role="alert" class="flex flex-wrap items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive-text">
396 <span class="min-w-0 flex-1">{t("calendar.feedsFailed", { feeds: failedFeeds().join(", ") })}</span>396 <span class="min-w-0 flex-1">{t("calendar.feedsFailed", { feeds: failedFeeds().join(", ") })}</span>
397 <Button type="button" size="sm" variant="outline" class="shrink-0 border-destructive/40" onClick={() => board.retryFailed()}>397 <Button type="button" size="sm" variant="outline" class="shrink-0 border-destructive/40" onClick={() => board.retryFailed()}>
398 {t("common.tryAgain")}398 {t("common.tryAgain")}
src/pages/class-detail-page.tsxmodified+1 -1
@@ -260,7 +260,7 @@ function ClassDetailContent() {
260 {t("classBlueprints.apply")}260 {t("classBlueprints.apply")}
261 </Button>261 </Button>
262 <Button size="sm" variant="outline" class="rounded-lg" onClick={() => { setName(c().name); setGrade(c().grade ?? ""); setYearId(c().year ?? ""); setTeacherId(c().teacher?.id ?? ""); setEditing(true); }}>{t("common.edit")}</Button>262 <Button size="sm" variant="outline" class="rounded-lg" onClick={() => { setName(c().name); setGrade(c().grade ?? ""); setYearId(c().year ?? ""); setTeacherId(c().teacher?.id ?? ""); setEditing(true); }}>{t("common.edit")}</Button>
263- <Button size="sm" variant="outline" class="rounded-lg text-destructive" onClick={() => setDeleteOpen(true)}>{t("classGroups.deleteClass")}</Button>263+ <Button size="sm" variant="outline" class="rounded-lg text-destructive-text" onClick={() => setDeleteOpen(true)}>{t("classGroups.deleteClass")}</Button>
264 </div>264 </div>
265 </Show>265 </Show>
266 </header>266 </header>
src/pages/classes-page.tsxmodified+2 -2
@@ -184,7 +184,7 @@ function ClassesContent() {
184 <SidePanel open={canManage() && showForm()} onOpenChange={setShowForm} guardUnsaved title={t("classGroups.newClass")} description={t("classGroups.subtitle")}>184 <SidePanel open={canManage() && showForm()} onOpenChange={setShowForm} guardUnsaved title={t("classGroups.newClass")} description={t("classGroups.subtitle")}>
185 <form class="space-y-4" noValidate onSubmit={createClass}>185 <form class="space-y-4" noValidate onSubmit={createClass}>
186 <div class="space-y-3">186 <div class="space-y-3">
187- <div class="space-y-1.5"><Label for="class-name">{t("classGroups.className")}<span class="ml-0.5 text-destructive">*</span></Label><Input id="class-name" required aria-required="true" maxlength={limits.latest?.course.max_class_name_len} value={name()} error={nameError()} onInput={(e) => { setName(e.currentTarget.value); setNameError(""); }} /></div>187+ <div class="space-y-1.5"><Label for="class-name">{t("classGroups.className")}<span class="ml-0.5 text-destructive-text">*</span></Label><Input id="class-name" required aria-required="true" maxlength={limits.latest?.course.max_class_name_len} value={name()} error={nameError()} onInput={(e) => { setName(e.currentTarget.value); setNameError(""); }} /></div>
188 <div class="space-y-1.5"><Label for="class-grade">{t("classGroups.grade")}</Label><Input id="class-grade" maxlength={limits.latest?.course.max_class_grade_len} value={grade()} onInput={(e) => setGrade(e.currentTarget.value)} /></div>188 <div class="space-y-1.5"><Label for="class-grade">{t("classGroups.grade")}</Label><Input id="class-grade" maxlength={limits.latest?.course.max_class_grade_len} value={grade()} onInput={(e) => setGrade(e.currentTarget.value)} /></div>
189 <div class="space-y-1.5"><Label for="class-year">{t("academicYears.year")}</Label><Select id="class-year" value={yearId()} onChange={(e) => setYearId(e.currentTarget.value)}><option value="">{t("academicYears.unassigned")}</option><For each={years.latest ?? []}>{(year) => <option value={year.id}>{year.name}</option>}</For></Select></div>189 <div class="space-y-1.5"><Label for="class-year">{t("academicYears.year")}</Label><Select id="class-year" value={yearId()} onChange={(e) => setYearId(e.currentTarget.value)}><option value="">{t("academicYears.unassigned")}</option><For each={years.latest ?? []}>{(year) => <option value={year.id}>{year.name}</option>}</For></Select></div>
190 <UserSearchSelect id="class-teacher" label={t("classGroups.homeroomTeacher")} value={teacherId()} onChange={setTeacherId} placeholder={t("classGroups.selectTeacher")} role="teacher" />190 <UserSearchSelect id="class-teacher" label={t("classGroups.homeroomTeacher")} value={teacherId()} onChange={setTeacherId} placeholder={t("classGroups.selectTeacher")} role="teacher" />
@@ -287,7 +287,7 @@ function ClassCard(props: { cls: ClassGroup; yearName: string; memberCount: numb
287 class="flex flex-col gap-3 rounded-lg border border-border-line bg-surface-base p-4 text-left shadow-xs transition hover:-translate-y-0.5 hover:border-primary/40 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"287 class="flex flex-col gap-3 rounded-lg border border-border-line bg-surface-base p-4 text-left shadow-xs transition hover:-translate-y-0.5 hover:border-primary/40 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
288 >288 >
289 <div class="flex items-center gap-2.5">289 <div class="flex items-center gap-2.5">
290- <span class="flex h-9 w-10 shrink-0 items-center justify-center rounded-md bg-info/10 text-[13px] font-semibold text-info">290+ <span class="flex h-9 w-10 shrink-0 items-center justify-center rounded-md bg-info/10 text-[13px] font-semibold text-info-text">
291 {props.cls.grade || "—"}291 {props.cls.grade || "—"}
292 </span>292 </span>
293 <div class="min-w-0 flex-1">293 <div class="min-w-0 flex-1">
src/pages/course-detail-page.tsxmodified+2 -2
@@ -159,7 +159,7 @@ function CourseDetailContent() {
159 header: t("classGroups.className"),159 header: t("classGroups.className"),
160 meta: { cellClass: "font-medium" },160 meta: { cellClass: "font-medium" },
161 cell: (cell) => (161 cell: (cell) => (
162- <Link to="/instances/$id" params={{ id: cell.row.original.instance.id }} class="hover:text-primary hover:underline">162+ <Link to="/instances/$id" params={{ id: cell.row.original.instance.id }} class="hover:text-primary-text hover:underline">
163 {cell.row.original.className}163 {cell.row.original.className}
164 </Link>164 </Link>
165 ),165 ),
@@ -449,7 +449,7 @@ function CourseDetailContent() {
449 <Alert variant="success">{flash()}</Alert>449 <Alert variant="success">{flash()}</Alert>
450 </Show>450 </Show>
451 <Show when={error()}>451 <Show when={error()}>
452- <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>452+ <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
453 </Show>453 </Show>
454 454
455 <Tabs value={courseTab()} onChange={setCourseTab} class="space-y-4">455 <Tabs value={courseTab()} onChange={setCourseTab} class="space-y-4">
src/pages/courses-page.tsxmodified+1 -1
@@ -122,7 +122,7 @@ function CoursesContent() {
122 <span class="font-medium text-text-default">{kindLabelSingular()}</span>122 <span class="font-medium text-text-default">{kindLabelSingular()}</span>
123 </div>123 </div>
124 <div class="space-y-3">124 <div class="space-y-3">
125- <div class="space-y-1.5"><Label for="course-title">{t("form.title")}<span class="ml-0.5 text-destructive">*</span></Label><Input id="course-title" required maxlength={limits.latest?.course.max_title_len} value={title()} onInput={(e) => setTitle(e.currentTarget.value)} /></div>125+ <div class="space-y-1.5"><Label for="course-title">{t("form.title")}<span class="ml-0.5 text-destructive-text">*</span></Label><Input id="course-title" required maxlength={limits.latest?.course.max_title_len} value={title()} onInput={(e) => setTitle(e.currentTarget.value)} /></div>
126 <div class="space-y-1.5"><Label for="course-description">{t("form.description")}</Label><Textarea id="course-description" maxlength={limits.latest?.course.max_description_len} rows={3} value={description()} onInput={(e) => setDescription(e.currentTarget.value)} /></div>126 <div class="space-y-1.5"><Label for="course-description">{t("form.description")}</Label><Textarea id="course-description" maxlength={limits.latest?.course.max_description_len} rows={3} value={description()} onInput={(e) => setDescription(e.currentTarget.value)} /></div>
127 <p class="rounded-xl border border-border-line bg-surface-tint px-3 py-2 text-xs text-text-subtle">{t("instances.emptyHelp")}</p>127 <p class="rounded-xl border border-border-line bg-surface-tint px-3 py-2 text-xs text-text-subtle">{t("instances.emptyHelp")}</p>
128 </div>128 </div>
src/pages/dashboard-page.tsxmodified+1 -1
@@ -724,7 +724,7 @@ function DashboardContent() {
724 724
725 <Suspense fallback={<PageSpinner />}>725 <Suspense fallback={<PageSpinner />}>
726 <Show when={error()}>726 <Show when={error()}>
727- <div role="alert" class="flex flex-wrap items-center justify-between gap-3 rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive">727+ <div role="alert" class="flex flex-wrap items-center justify-between gap-3 rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive-text">
728 <span class="min-w-0 flex-1">{t("dashboard.partialError")} {error()}</span>728 <span class="min-w-0 flex-1">{t("dashboard.partialError")} {error()}</span>
729 <Button type="button" size="sm" variant="outline" class="shrink-0 border-destructive/40" onClick={() => board.retryFailed()}>729 <Button type="button" size="sm" variant="outline" class="shrink-0 border-destructive/40" onClick={() => board.retryFailed()}>
730 {t("common.tryAgain")}730 {t("common.tryAgain")}
src/pages/event-detail-page.tsxmodified+1 -1
@@ -363,7 +363,7 @@ function EventDetailContent() {
363 <Alert variant="success">{flash()}</Alert>363 <Alert variant="success">{flash()}</Alert>
364 </Show>364 </Show>
365 {error() && (365 {error() && (
366- <p class="rounded-sm bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>366+ <p class="rounded-sm bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
367 )}367 )}
368 </div>368 </div>
369 )}369 )}
src/pages/events-page.tsxmodified+1 -1
@@ -100,7 +100,7 @@ function EventsContent() {
100 header: t("events.title"),100 header: t("events.title"),
101 cell: (cell) => (101 cell: (cell) => (
102 <div class="min-w-0">102 <div class="min-w-0">
103- <Link to="/events/$id" params={{ id: cell.row.original.id }} class="truncate font-medium hover:text-primary hover:underline">103+ <Link to="/events/$id" params={{ id: cell.row.original.id }} class="truncate font-medium hover:text-primary-text hover:underline">
104 {cell.row.original.title}104 {cell.row.original.title}
105 </Link>105 </Link>
106 <p class="truncate text-xs text-muted-foreground">{cell.row.original.description || "—"}</p>106 <p class="truncate text-xs text-muted-foreground">{cell.row.original.description || "—"}</p>
src/pages/exam-detail-page.tsxmodified+3 -3
@@ -566,7 +566,7 @@ function ExamDetailContent() {
566 </Button>566 </Button>
567 </div>567 </div>
568 <Show when={answerError()}>568 <Show when={answerError()}>
569- {(msg) => <p class="text-sm text-destructive">{msg()}</p>}569+ {(msg) => <p class="text-sm text-destructive-text">{msg()}</p>}
570 </Show>570 </Show>
571 </form>571 </form>
572 </Show>572 </Show>
@@ -704,7 +704,7 @@ function ExamDetailContent() {
704 <label704 <label
705 class={cn(705 class={cn(
706 "inline-flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-xs transition-colors hover:bg-muted/50",706 "inline-flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-xs transition-colors hover:bg-muted/50",
707- reviewOn() && "text-primary",707+ reviewOn() && "text-primary-text",
708 )}708 )}
709 title={t("exams.allowReviewHelp")}709 title={t("exams.allowReviewHelp")}
710 >710 >
@@ -767,7 +767,7 @@ function ExamDetailContent() {
767 <Alert variant="success">{flash()}</Alert>767 <Alert variant="success">{flash()}</Alert>
768 </Show>768 </Show>
769 {error() && (769 {error() && (
770- <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>770+ <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
771 )}771 )}
772 772
773 <ConfirmDialog773 <ConfirmDialog
src/pages/instance-detail-page.tsxmodified+2 -2
@@ -212,7 +212,7 @@ function InstanceDetailContent() {
212 header: t("form.title"),212 header: t("form.title"),
213 meta: { cellClass: "font-medium" },213 meta: { cellClass: "font-medium" },
214 cell: (cell) => (214 cell: (cell) => (
215- <ExamLink examId={cell.row.original.id} class="hover:text-primary hover:underline">215+ <ExamLink examId={cell.row.original.id} class="hover:text-primary-text hover:underline">
216 {cell.row.original.title}216 {cell.row.original.title}
217 </ExamLink>217 </ExamLink>
218 ),218 ),
@@ -501,7 +501,7 @@ function InstanceDetailContent() {
501 <Alert variant="success">{flash()}</Alert>501 <Alert variant="success">{flash()}</Alert>
502 </Show>502 </Show>
503 <Show when={error()}>503 <Show when={error()}>
504- <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>504+ <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
505 </Show>505 </Show>
506 506
507 <Tabs value={tab()} onChange={setTab} class="space-y-4">507 <Tabs value={tab()} onChange={setTab} class="space-y-4">
src/pages/live-monitor-page.tsxmodified+4 -4
@@ -291,16 +291,16 @@ function LiveMonitorContent() {
291 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5" />{t("exams.notStarted")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().not_started}</p>291 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5" />{t("exams.notStarted")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().not_started}</p>
292 </div>292 </div>
293 <div class="data-shell bg-card/80 p-3">293 <div class="data-shell bg-card/80 p-3">
294- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconExam class="h-3.5 w-3.5 text-info" />{t("attempt.inProgress")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().in_progress}</p>294+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconExam class="h-3.5 w-3.5 text-info-text" />{t("attempt.inProgress")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().in_progress}</p>
295 </div>295 </div>
296 <div class="data-shell bg-card/80 p-3">296 <div class="data-shell bg-card/80 p-3">
297- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconCheck class="h-3.5 w-3.5 text-success" />{t("attempt.submitted")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().submitted}</p>297+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconCheck class="h-3.5 w-3.5 text-success-text" />{t("attempt.submitted")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().submitted}</p>
298 </div>298 </div>
299 <div class="data-shell bg-card/80 p-3">299 <div class="data-shell bg-card/80 p-3">
300- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5 text-destructive" />{t("attempt.expired")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().expired}</p>300+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5 text-destructive-text" />{t("attempt.expired")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().expired}</p>
301 </div>301 </div>
302 <div class="data-shell bg-card/80 p-3">302 <div class="data-shell bg-card/80 p-3">
303- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconAlert class="h-3.5 w-3.5 text-destructive" />{t("attempt.noAttemptsLeft")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().no_attempts_left}</p>303+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconAlert class="h-3.5 w-3.5 text-destructive-text" />{t("attempt.noAttemptsLeft")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().no_attempts_left}</p>
304 </div>304 </div>
305 <div class="data-shell bg-card/80 p-3">305 <div class="data-shell bg-card/80 p-3">
306 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconUsers class="h-3.5 w-3.5" />{t("attempt.absent")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().absent}</p>306 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconUsers class="h-3.5 w-3.5" />{t("attempt.absent")}</p><p class="mt-1 text-2xl font-semibold tabular-nums">{counts().absent}</p>
src/pages/login-page.tsxmodified+4 -4
@@ -155,7 +155,7 @@ function LoginForm() {
155 </div>155 </div>
156 156
157 {error() && (157 {error() && (
158- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>158+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
159 )}159 )}
160 160
161 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>161 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>
@@ -165,7 +165,7 @@ function LoginForm() {
165 165
166 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">166 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">
167 {t("auth.noAccount")}{" "}167 {t("auth.noAccount")}{" "}
168- <Link to="/register" class="font-semibold text-primary underline-offset-4 hover:underline">168+ <Link to="/register" class="font-semibold text-primary-text underline-offset-4 hover:underline">
169 {t("auth.register")}169 {t("auth.register")}
170 </Link>170 </Link>
171 </p>171 </p>
@@ -189,7 +189,7 @@ function LoginForm() {
189 disabled={pending()}189 disabled={pending()}
190 onClick={() => void handleSchoolSelect(school.slug)}190 onClick={() => void handleSchoolSelect(school.slug)}
191 >191 >
192- <IconSchool class="h-5 w-5 shrink-0 text-primary" />192+ <IconSchool class="h-5 w-5 shrink-0 text-primary-text" />
193 <span class="min-w-0 flex-1">193 <span class="min-w-0 flex-1">
194 <span class="block truncate font-semibold text-text-strong">{school.name}</span>194 <span class="block truncate font-semibold text-text-strong">{school.name}</span>
195 <span class="block truncate text-xs font-normal text-text-subtle">{school.slug}</span>195 <span class="block truncate text-xs font-normal text-text-subtle">{school.slug}</span>
@@ -202,7 +202,7 @@ function LoginForm() {
202 </For>202 </For>
203 203
204 {error() && (204 {error() && (
205- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>205+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
206 )}206 )}
207 207
208 <Button208 <Button
src/pages/meal-detail-page.tsxmodified+5 -5
@@ -205,7 +205,7 @@ function MealDetailContent() {
205 </div>205 </div>
206 206
207 <Show when={conflicts().length > 0}>207 <Show when={conflicts().length > 0}>
208- <Alert class="border-warning/50 bg-warning/10 text-warning"><span class="flex gap-2"><IconAlert class="mt-0.5 h-4 w-4 shrink-0" /><span>{t("meals.conflict")}: {conflicts().join(", ")}</span></span></Alert>208+ <Alert class="border-warning/50 bg-warning/10 text-warning-text"><span class="flex gap-2"><IconAlert class="mt-0.5 h-4 w-4 shrink-0" /><span>{t("meals.conflict")}: {conflicts().join(", ")}</span></span></Alert>
209 </Show>209 </Show>
210 210
211 <Show when={isParent()}>211 <Show when={isParent()}>
@@ -226,8 +226,8 @@ function MealDetailContent() {
226 <article class="rounded-xl border border-border-line bg-surface-base p-4">226 <article class="rounded-xl border border-border-line bg-surface-base p-4">
227 <div class="flex justify-between gap-3"><h2 class="font-semibold text-text-strong">{dish.name}</h2><span class="font-semibold">{formatTry(dish.price_minor, moneyLocale())}</span></div>227 <div class="flex justify-between gap-3"><h2 class="font-semibold text-text-strong">{dish.name}</h2><span class="font-semibold">{formatTry(dish.price_minor, moneyLocale())}</span></div>
228 <p class="mt-2 text-sm text-text-subtle">{dish.description || "—"}</p>228 <p class="mt-2 text-sm text-text-subtle">{dish.description || "—"}</p>
229- <div class="mt-3 flex flex-wrap gap-1"><For each={dish.tags}>{(tag) => <Badge variant="outline" class={dish.conflicts.includes(tag) ? "border-warning/50 bg-warning/10 text-warning" : ""}>{dish.conflicts.includes(tag) ? `⚠ ${tag}` : tag}</Badge>}</For></div>229+ <div class="mt-3 flex flex-wrap gap-1"><For each={dish.tags}>{(tag) => <Badge variant="outline" class={dish.conflicts.includes(tag) ? "border-warning/50 bg-warning/10 text-warning-text" : ""}>{dish.conflicts.includes(tag) ? `⚠ ${tag}` : tag}</Badge>}</For></div>
230- <Show when={canManage()}><div class="mt-3 flex gap-2 border-t border-border-hairline pt-3"><Button variant="outline" size="sm" onClick={() => openDish(dish)}>{t("common.edit")}</Button><Button variant="ghost" size="sm" class="text-destructive" onClick={() => setDeleteDish(dish)}>{t("common.delete")}</Button></div></Show>230+ <Show when={canManage()}><div class="mt-3 flex gap-2 border-t border-border-hairline pt-3"><Button variant="outline" size="sm" onClick={() => openDish(dish)}>{t("common.edit")}</Button><Button variant="ghost" size="sm" class="text-destructive-text" onClick={() => setDeleteDish(dish)}>{t("common.delete")}</Button></div></Show>
231 </article>231 </article>
232 )}</For>232 )}</For>
233 </div>233 </div>
@@ -242,7 +242,7 @@ function MealDetailContent() {
242 242
243 <TabsContent value="account" class="space-y-4">243 <TabsContent value="account" class="space-y-4">
244 <div class="grid gap-4 lg:grid-cols-2">244 <div class="grid gap-4 lg:grid-cols-2">
245- <section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.dietaryProfile")}</h2><div class="mt-3 flex flex-wrap gap-1.5"><For each={profile()?.tags ?? []}>{(tag) => <Badge variant="outline" class="border-warning/50 bg-warning/10 text-warning">⚠ {tag}</Badge>}</For></div><p class="mt-3 text-sm text-text-subtle">{profile()?.note || t("meals.noDietaryNotes")}</p></section>245+ <section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.dietaryProfile")}</h2><div class="mt-3 flex flex-wrap gap-1.5"><For each={profile()?.tags ?? []}>{(tag) => <Badge variant="outline" class="border-warning/50 bg-warning/10 text-warning-text">⚠ {tag}</Badge>}</For></div><p class="mt-3 text-sm text-text-subtle">{profile()?.note || t("meals.noDietaryNotes")}</p></section>
246 <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.balance")}</h2><p class="mt-3 text-2xl font-semibold tabular-nums">{formatTry(balance()?.balance_minor ?? 0, moneyLocale())}</p></section></Show>246 <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.balance")}</h2><p class="mt-3 text-2xl font-semibold tabular-nums">{formatTry(balance()?.balance_minor ?? 0, moneyLocale())}</p></section></Show>
247 </div>247 </div>
248 <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.ledger")}</h2><div class="mt-3 divide-y divide-border-hairline"><For each={ledger()?.items ?? []}>{(line) => <div class="flex justify-between gap-3 py-3 text-sm"><div><p class="font-medium">{t(`meals.ledger.${line.kind}` as never)}</p><p class="text-xs text-text-subtle">{line.note || line.method || "—"} · {formatDateTime(line.created_at, locale())}</p></div><span class="font-semibold tabular-nums">{line.kind === "charge" ? "−" : "+"}{formatTry(line.amount_minor, moneyLocale())}</span></div>}</For></div><Show when={(ledger()?.items.length ?? 0) === 0}><p class="mt-3 text-sm text-text-subtle">{t("meals.noLedger")}</p></Show></section></Show>248 <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.ledger")}</h2><div class="mt-3 divide-y divide-border-hairline"><For each={ledger()?.items ?? []}>{(line) => <div class="flex justify-between gap-3 py-3 text-sm"><div><p class="font-medium">{t(`meals.ledger.${line.kind}` as never)}</p><p class="text-xs text-text-subtle">{line.note || line.method || "—"} · {formatDateTime(line.created_at, locale())}</p></div><span class="font-semibold tabular-nums">{line.kind === "charge" ? "−" : "+"}{formatTry(line.amount_minor, moneyLocale())}</span></div>}</For></div><Show when={(ledger()?.items.length ?? 0) === 0}><p class="mt-3 text-sm text-text-subtle">{t("meals.noLedger")}</p></Show></section></Show>
@@ -256,7 +256,7 @@ function MealDetailContent() {
256 </div>256 </div>
257 <Show when={serviceAttendance.error || serviceBookings.error}><ErrorAlert message={formatApiError(serviceAttendance.error || serviceBookings.error)} onRetry={() => void refetchService()} /></Show>257 <Show when={serviceAttendance.error || serviceBookings.error}><ErrorAlert message={formatApiError(serviceAttendance.error || serviceBookings.error)} onRetry={() => void refetchService()} /></Show>
258 <div class="space-y-2">258 <div class="space-y-2">
259- <For each={serviceEntries()}>{(entry) => <div class="data-shell flex flex-wrap items-center justify-between gap-3 p-3"><div><p class="font-medium">{personLabel(entry.student)}</p><p class="text-xs text-text-subtle">{entry.booking ? t("meals.booked") : t("meals.walkIn")} · {entry.attendance?.status ?? t("meals.notMarked")}</p></div><div class="flex gap-2"><Button size="sm" variant={entry.attendance?.status === "served" ? "default" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "served"); await refetchService(); })}>{t("meals.served")}</Button><Button size="sm" variant={entry.attendance?.status === "missed" ? "destructive" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "missed"); await refetchService(); })}>{t("meals.missed")}</Button><Show when={canManage() && entry.booking?.status === "booked"}><Button size="sm" variant="ghost" class="text-destructive" onClick={() => setCancelBooking(entry.booking)}>{t("meals.cancelBooking")}</Button></Show></div></div>}</For>259+ <For each={serviceEntries()}>{(entry) => <div class="data-shell flex flex-wrap items-center justify-between gap-3 p-3"><div><p class="font-medium">{personLabel(entry.student)}</p><p class="text-xs text-text-subtle">{entry.booking ? t("meals.booked") : t("meals.walkIn")} · {entry.attendance?.status ?? t("meals.notMarked")}</p></div><div class="flex gap-2"><Button size="sm" variant={entry.attendance?.status === "served" ? "default" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "served"); await refetchService(); })}>{t("meals.served")}</Button><Button size="sm" variant={entry.attendance?.status === "missed" ? "destructive" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "missed"); await refetchService(); })}>{t("meals.missed")}</Button><Show when={canManage() && entry.booking?.status === "booked"}><Button size="sm" variant="ghost" class="text-destructive-text" onClick={() => setCancelBooking(entry.booking)}>{t("meals.cancelBooking")}</Button></Show></div></div>}</For>
260 </div>260 </div>
261 </TabsContent>261 </TabsContent>
262 262
src/pages/messages-page.tsxmodified+6 -6
@@ -223,7 +223,7 @@ export default function MessagesPage() {
223 class={cn(223 class={cn(
224 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",224 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
225 folder() === "inbox"225 folder() === "inbox"
226- ? "bg-primary/10 text-primary"226+ ? "bg-primary/10 text-primary-text"
227 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"227 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
228 )}228 )}
229 onClick={() =>229 onClick={() =>
@@ -250,7 +250,7 @@ export default function MessagesPage() {
250 class={cn(250 class={cn(
251 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",251 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
252 folder() === "sent"252 folder() === "sent"
253- ? "bg-primary/10 text-primary"253+ ? "bg-primary/10 text-primary-text"
254 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"254 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
255 )}255 )}
256 onClick={() =>256 onClick={() =>
@@ -272,7 +272,7 @@ export default function MessagesPage() {
272 class={cn(272 class={cn(
273 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",273 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
274 folder() === "archive"274 folder() === "archive"
275- ? "bg-primary/10 text-primary"275+ ? "bg-primary/10 text-primary-text"
276 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"276 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
277 )}277 )}
278 onClick={() =>278 onClick={() =>
@@ -294,7 +294,7 @@ export default function MessagesPage() {
294 class={cn(294 class={cn(
295 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",295 "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
296 folder() === "trash"296 folder() === "trash"
297- ? "bg-destructive/10 text-destructive"297+ ? "bg-destructive/10 text-destructive-text"
298 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"298 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
299 )}299 )}
300 onClick={() =>300 onClick={() =>
@@ -331,7 +331,7 @@ export default function MessagesPage() {
331 <IconRefresh331 <IconRefresh
332 class={cn(332 class={cn(
333 "h-3.5 w-3.5 mr-1.5 transition-transform duration-500",333 "h-3.5 w-3.5 mr-1.5 transition-transform duration-500",
334- isRefreshing() && "animate-spin text-primary"334+ isRefreshing() && "animate-spin text-primary-text"
335 )}335 )}
336 />336 />
337 {t("common.refresh")}337 {t("common.refresh")}
@@ -353,7 +353,7 @@ export default function MessagesPage() {
353 <Button353 <Button
354 variant="outline"354 variant="outline"
355 size="sm"355 size="sm"
356- class="h-8 rounded-lg text-[13px] text-destructive hover:bg-destructive/10"356+ class="h-8 rounded-lg text-[13px] text-destructive-text hover:bg-destructive/10"
357 onClick={() => setConfirmEmptyTrash(true)}357 onClick={() => setConfirmEmptyTrash(true)}
358 >358 >
359 <IconTrash class="mr-1.5 h-3.5 w-3.5" />359 <IconTrash class="mr-1.5 h-3.5 w-3.5" />
src/pages/my-students-page.tsxmodified+1 -1
@@ -85,7 +85,7 @@ function MyStudentsContent() {
85 <div class="truncate font-medium text-text-strong">{personLabel(student)}</div>85 <div class="truncate font-medium text-text-strong">{personLabel(student)}</div>
86 <div class="truncate text-sm text-text-subtle">@{student.username}</div>86 <div class="truncate text-sm text-text-subtle">@{student.username}</div>
87 </div>87 </div>
88- <IconChevronRight class="h-5 w-5 shrink-0 text-text-subtle/70 transition-colors group-hover:text-primary" />88+ <IconChevronRight class="h-5 w-5 shrink-0 text-text-subtle/70 transition-colors group-hover:text-primary-text" />
89 </button>89 </button>
90 )}90 )}
91 </For>91 </For>
src/pages/payment-statement-page.tsxmodified+2 -2
@@ -80,7 +80,7 @@ function StatementContent() {
80 {80 {
81 accessorKey: "due_at",81 accessorKey: "due_at",
82 header: t("payments.due"),82 header: t("payments.due"),
83- cell: (cell) => <span class="mono block whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,83+ cell: (cell) => <span class="mono block whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,
84 },84 },
85 {85 {
86 accessorKey: "outstanding_minor",86 accessorKey: "outstanding_minor",
@@ -145,7 +145,7 @@ function StatementContent() {
145 </div>145 </div>
146 <div>146 <div>
147 <p class="text-xs font-medium text-text-subtle">{t("payments.balance")}</p>147 <p class="text-xs font-medium text-text-subtle">{t("payments.balance")}</p>
148- <p class="mt-1 text-2xl font-semibold tabular-nums" classList={{ "text-destructive": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p>148+ <p class="mt-1 text-2xl font-semibold tabular-nums" classList={{ "text-destructive-text": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p>
149 </div>149 </div>
150 </div>150 </div>
151 </section>151 </section>
src/pages/payments-page.tsxmodified+7 -7
@@ -208,7 +208,7 @@ function PaymentsContent() {
208 if (bal == null) return <span class="text-sm text-muted-foreground">—</span>;208 if (bal == null) return <span class="text-sm text-muted-foreground">—</span>;
209 const inDebt = bal < 0;209 const inDebt = bal < 0;
210 return (210 return (
211- <Badge variant="outline" class={inDebt ? "border-destructive/50 bg-destructive/10 text-destructive" : "border-success/50 bg-success/10 text-success"}>211+ <Badge variant="outline" class={inDebt ? "border-destructive/50 bg-destructive/10 text-destructive-text" : "border-success/50 bg-success/10 text-success-text"}>
212 <span class={`mr-1.5 inline-block h-1.5 w-1.5 rounded-full ${inDebt ? "bg-destructive" : "bg-success"}`} />212 <span class={`mr-1.5 inline-block h-1.5 w-1.5 rounded-full ${inDebt ? "bg-destructive" : "bg-success"}`} />
213 {inDebt ? t("payments.inDebt") : t("payments.settled")}213 {inDebt ? t("payments.inDebt") : t("payments.settled")}
214 </Badge>214 </Badge>
@@ -221,7 +221,7 @@ function PaymentsContent() {
221 accessorFn: (user) => user.balance_minor ?? 0,221 accessorFn: (user) => user.balance_minor ?? 0,
222 cell: (cell) => {222 cell: (cell) => {
223 const bal = cell.row.original.balance_minor;223 const bal = cell.row.original.balance_minor;
224- return <span class="font-medium tabular-nums" classList={{ "text-destructive": (bal ?? 0) < 0 }}>{bal == null ? "—" : formatTry(bal, moneyLocale())}</span>;224+ return <span class="font-medium tabular-nums" classList={{ "text-destructive-text": (bal ?? 0) < 0 }}>{bal == null ? "—" : formatTry(bal, moneyLocale())}</span>;
225 },225 },
226 },226 },
227 {227 {
@@ -352,7 +352,7 @@ function PaymentsContent() {
352 accessorKey: "due_at",352 accessorKey: "due_at",
353 header: t("payments.due"),353 header: t("payments.due"),
354 size: 120,354 size: 120,
355- cell: (cell) => <span class="mono whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,355+ cell: (cell) => <span class="mono whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,
356 },356 },
357 {357 {
358 accessorKey: "outstanding_minor",358 accessorKey: "outstanding_minor",
@@ -665,8 +665,8 @@ function PaymentsContent() {
665 <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">665 <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
666 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.totalDebt")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().billed, moneyLocale())}</p></div>666 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.totalDebt")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().billed, moneyLocale())}</p></div>
667 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.collected")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().collected, moneyLocale())}</p></div>667 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.collected")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().collected, moneyLocale())}</p></div>
668- <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.balance")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p></div>668+ <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.balance")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive-text": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p></div>
669- <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().overdue > 0 }}>{summary().overdue}</p></div>669+ <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive-text": summary().overdue > 0 }}>{summary().overdue}</p></div>
670 </div>670 </div>
671 671
672 <section class="data-shell space-y-4 p-4">672 <section class="data-shell space-y-4 p-4">
@@ -731,7 +731,7 @@ function PaymentsContent() {
731 <Button size="sm" variant="outline" onClick={() => openLineAction(line, "refund")}>{t("payments.recordRefund")}</Button>731 <Button size="sm" variant="outline" onClick={() => openLineAction(line, "refund")}>{t("payments.recordRefund")}</Button>
732 </Show>732 </Show>
733 <Show when={line.kind === "charge" || line.kind === "refund"}>733 <Show when={line.kind === "charge" || line.kind === "refund"}>
734- <Button size="sm" variant="ghost" class="text-destructive" onClick={() => openLineAction(line, "reverse")}>{t("payments.reverse")}</Button>734+ <Button size="sm" variant="ghost" class="text-destructive-text" onClick={() => openLineAction(line, "reverse")}>{t("payments.reverse")}</Button>
735 </Show>735 </Show>
736 </div>736 </div>
737 </div>737 </div>
@@ -946,7 +946,7 @@ function PaymentsContent() {
946 <DatePicker id={`inst-due-${idx}`} placeholder={t("form.datePlaceholder")} required value={row().due} onChange={(value) => setRowDue(idx, value)} />946 <DatePicker id={`inst-due-${idx}`} placeholder={t("form.datePlaceholder")} required value={row().due} onChange={(value) => setRowDue(idx, value)} />
947 </div>947 </div>
948 <Show when={rows().length > 1}>948 <Show when={rows().length > 1}>
949- <Button type="button" variant="ghost" size="sm" class="text-destructive" onClick={() => removeRow(idx)} aria-label={t("common.delete")}>949+ <Button type="button" variant="ghost" size="sm" class="text-destructive-text" onClick={() => removeRow(idx)} aria-label={t("common.delete")}>
950 <IconTrash class="h-4 w-4" />950 <IconTrash class="h-4 w-4" />
951 </Button>951 </Button>
952 </Show>952 </Show>
src/pages/pomodoro-page.tsxmodified+3 -3
@@ -228,15 +228,15 @@ function PomodoroContent() {
228 />228 />
229 </svg>229 </svg>
230 <span class="absolute text-center">230 <span class="absolute text-center">
231- <IconClock class={cn("h-7 w-7 mx-auto text-primary", running() && "animate-pulse")} />231+ <IconClock class={cn("h-7 w-7 mx-auto text-primary-text", running() && "animate-pulse")} />
232 </span>232 </span>
233 </div>233 </div>
234 234
235 <div>235 <div>
236- <p class={cn("text-xs font-medium uppercase tracking-[0.08em]", running() && isOvertime() ? "text-destructive" : "text-muted-foreground")}>236+ <p class={cn("text-xs font-medium uppercase tracking-[0.08em]", running() && isOvertime() ? "text-destructive-text" : "text-muted-foreground")}>
237 {running() ? (isOvertime() ? t("pomodoro.overtime") : t("pomodoro.remaining")) : t("pomodoro.total")}237 {running() ? (isOvertime() ? t("pomodoro.overtime") : t("pomodoro.remaining")) : t("pomodoro.total")}
238 </p>238 </p>
239- <p class={cn("mono mt-2 text-5xl font-semibold leading-none tracking-tight tabular-nums sm:text-6xl", running() && isOvertime() && "text-destructive")}>239+ <p class={cn("mono mt-2 text-5xl font-semibold leading-none tracking-tight tabular-nums sm:text-6xl", running() && isOvertime() && "text-destructive-text")}>
240 {running() && isOvertime() && "+"}240 {running() && isOvertime() && "+"}
241 {formatDurationClock(running() ? (isOvertime() ? overtimeMs() : remainingMs()) : log()?.total_focus_ms)}241 {formatDurationClock(running() ? (isOvertime() ? overtimeMs() : remainingMs()) : log()?.total_focus_ms)}
242 </p>242 </p>
src/pages/profile-page.tsxmodified+1 -1
@@ -249,7 +249,7 @@ function ProfileContent() {
249 function StatCard(props: { icon: PixelIconName; label: string; value: number }) {249 function StatCard(props: { icon: PixelIconName; label: string; value: number }) {
250 return (250 return (
251 <div class="group flex items-center gap-3 rounded-lg border bg-card p-3 shadow-xs transition-colors hover:border-primary/30">251 <div class="group flex items-center gap-3 rounded-lg border bg-card p-3 shadow-xs transition-colors hover:border-primary/30">
252- <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary transition-transform duration-200 group-hover:-rotate-6">252+ <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary-text transition-transform duration-200 group-hover:-rotate-6">
253 <PixelIcon name={props.icon} class="h-5 w-5" />253 <PixelIcon name={props.icon} class="h-5 w-5" />
254 </span>254 </span>
255 <div class="min-w-0">255 <div class="min-w-0">
src/pages/question-bank-page.tsxmodified+1 -1
@@ -150,7 +150,7 @@ function QuestionBankContent() {
150 </Badge>150 </Badge>
151 }151 }
152 >152 >
153- <Badge variant="outline" class="gap-1 whitespace-nowrap border-success/50 bg-success/10 text-success">153+ <Badge variant="outline" class="gap-1 whitespace-nowrap border-success/50 bg-success/10 text-success-text">
154 <IconUsers class="h-3 w-3" />154 <IconUsers class="h-3 w-3" />
155 {t("bank.sharedWithSchool")}155 {t("bank.sharedWithSchool")}
156 </Badge>156 </Badge>
src/pages/question-detail-page.tsxmodified+7 -7
@@ -146,7 +146,7 @@ function QuestionDetailContent() {
146 </div>146 </div>
147 </div>147 </div>
148 148
149- {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>}149+ {error() && <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
150 150
151 <div class="rounded-xl border bg-card p-6 shadow-xs">151 <div class="rounded-xl border bg-card p-6 shadow-xs">
152 <p class="whitespace-pre-wrap text-foreground">{q().body}</p>152 <p class="whitespace-pre-wrap text-foreground">{q().body}</p>
@@ -188,7 +188,7 @@ function QuestionDetailContent() {
188 <Button188 <Button
189 variant="ghost"189 variant="ghost"
190 size="sm"190 size="sm"
191- class="text-destructive hover:bg-destructive/10"191+ class="text-destructive-text hover:bg-destructive/10"
192 disabled={imageBusy()}192 disabled={imageBusy()}
193 onClick={() => void swapQuestionImage(null)}193 onClick={() => void swapQuestionImage(null)}
194 >194 >
@@ -218,7 +218,7 @@ function QuestionDetailContent() {
218 <div class="rounded-xl border bg-card/50 p-5">218 <div class="rounded-xl border bg-card/50 p-5">
219 <div class="flex items-center justify-between">219 <div class="flex items-center justify-between">
220 <div class="flex items-center gap-2 text-sm font-medium">220 <div class="flex items-center gap-2 text-sm font-medium">
221- <div class="flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-[10px] text-primary">221+ <div class="flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-[10px] text-primary-text">
222 {sol.author.display_name?.[0] || sol.author.username[0].toUpperCase()}222 {sol.author.display_name?.[0] || sol.author.username[0].toUpperCase()}
223 </div>223 </div>
224 {personLabel(sol.author)}224 {personLabel(sol.author)}
@@ -231,7 +231,7 @@ function QuestionDetailContent() {
231 <IconEdit class="h-4 w-4" />231 <IconEdit class="h-4 w-4" />
232 </Button>232 </Button>
233 </Show>233 </Show>
234- <Button variant="ghost" size="icon" class="h-8 w-8 text-destructive hover:bg-destructive/10" onClick={() => setDeleteConfirmS(sol)} aria-label={t("common.delete")}>234+ <Button variant="ghost" size="icon" class="h-8 w-8 text-destructive-text hover:bg-destructive/10" onClick={() => setDeleteConfirmS(sol)} aria-label={t("common.delete")}>
235 <IconTrash class="h-4 w-4" />235 <IconTrash class="h-4 w-4" />
236 </Button>236 </Button>
237 </div>237 </div>
@@ -390,7 +390,7 @@ function SolutionFormDialog(props: { questionId: string; initialData?: SolutionR
390 type="button"390 type="button"
391 variant="ghost"391 variant="ghost"
392 size="sm"392 size="sm"
393- class="ml-auto text-destructive hover:bg-destructive/10"393+ class="ml-auto text-destructive-text hover:bg-destructive/10"
394 onClick={() => setRemoveImage(true)}394 onClick={() => setRemoveImage(true)}
395 >395 >
396 <IconX class="mr-1 h-4 w-4" />396 <IconX class="mr-1 h-4 w-4" />
@@ -404,7 +404,7 @@ function SolutionFormDialog(props: { questionId: string; initialData?: SolutionR
404 fallback={404 fallback={
405 <div class="flex flex-col items-center gap-2">405 <div class="flex flex-col items-center gap-2">
406 <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">406 <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">
407- <IconPhoto class="h-6 w-6 text-primary" />407+ <IconPhoto class="h-6 w-6 text-primary-text" />
408 </div>408 </div>
409 <div class="flex items-center gap-2">409 <div class="flex items-center gap-2">
410 <span class="text-sm font-medium text-foreground">{file()?.name}</span>410 <span class="text-sm font-medium text-foreground">{file()?.name}</span>
@@ -412,7 +412,7 @@ function SolutionFormDialog(props: { questionId: string; initialData?: SolutionR
412 type="button"412 type="button"
413 variant="ghost"413 variant="ghost"
414 size="icon"414 size="icon"
415- class="h-6 w-6 rounded-full hover:bg-destructive/10 hover:text-destructive z-10"415+ class="h-6 w-6 rounded-full hover:bg-destructive/10 hover:text-destructive-text z-10"
416 onClick={(e) => {416 onClick={(e) => {
417 e.stopPropagation();417 e.stopPropagation();
418 e.preventDefault();418 e.preventDefault();
src/pages/questions-page.tsxmodified+5 -5
@@ -117,7 +117,7 @@ function QuestionsContent() {
117 <div class="group flex flex-col gap-2 p-4 transition-colors hover:bg-muted/40 sm:flex-row sm:items-center sm:justify-between">117 <div class="group flex flex-col gap-2 p-4 transition-colors hover:bg-muted/40 sm:flex-row sm:items-center sm:justify-between">
118 <Link to="/questions/$id" params={{ id: question.id }} class="min-w-0 flex-1">118 <Link to="/questions/$id" params={{ id: question.id }} class="min-w-0 flex-1">
119 <div class="flex items-center gap-2">119 <div class="flex items-center gap-2">
120- <h3 class="truncate text-base font-semibold text-foreground group-hover:text-primary transition-colors">{question.title}</h3>120+ <h3 class="truncate text-base font-semibold text-foreground group-hover:text-primary-text transition-colors">{question.title}</h3>
121 <Show when={question.image}>121 <Show when={question.image}>
122 <IconPhoto class="h-4 w-4 text-muted-foreground" />122 <IconPhoto class="h-4 w-4 text-muted-foreground" />
123 </Show>123 </Show>
@@ -125,7 +125,7 @@ function QuestionsContent() {
125 <p class="mt-1 line-clamp-2 text-sm text-muted-foreground">{question.body}</p>125 <p class="mt-1 line-clamp-2 text-sm text-muted-foreground">{question.body}</p>
126 <div class="mt-2 flex items-center gap-3 text-xs text-muted-foreground">126 <div class="mt-2 flex items-center gap-3 text-xs text-muted-foreground">
127 <span class="flex items-center gap-1">127 <span class="flex items-center gap-1">
128- <div class="flex h-4 w-4 items-center justify-center rounded-full bg-primary/10 text-[8px] font-bold text-primary">128+ <div class="flex h-4 w-4 items-center justify-center rounded-full bg-primary/10 text-[8px] font-bold text-primary-text">
129 {question.asker.display_name?.[0] || question.asker.username[0].toUpperCase()}129 {question.asker.display_name?.[0] || question.asker.username[0].toUpperCase()}
130 </div>130 </div>
131 {personLabel(question.asker)}131 {personLabel(question.asker)}
@@ -148,7 +148,7 @@ function QuestionsContent() {
148 type="button"148 type="button"
149 variant="ghost"149 variant="ghost"
150 size="sm"150 size="sm"
151- class="h-8 w-8 p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive rounded-lg"151+ class="h-8 w-8 p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text rounded-lg"
152 title={t("common.delete")}152 title={t("common.delete")}
153 onClick={(e) => {153 onClick={(e) => {
154 e.preventDefault();154 e.preventDefault();
@@ -254,7 +254,7 @@ function AskQuestionDialog(props: { onClose: () => void; onSuccess: () => void }
254 fallback={254 fallback={
255 <div class="flex flex-col items-center gap-2">255 <div class="flex flex-col items-center gap-2">
256 <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">256 <div class="flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">
257- <IconPhoto class="h-6 w-6 text-primary" />257+ <IconPhoto class="h-6 w-6 text-primary-text" />
258 </div>258 </div>
259 <div class="flex items-center gap-2">259 <div class="flex items-center gap-2">
260 <span class="text-sm font-medium text-foreground">{file()?.name}</span>260 <span class="text-sm font-medium text-foreground">{file()?.name}</span>
@@ -262,7 +262,7 @@ function AskQuestionDialog(props: { onClose: () => void; onSuccess: () => void }
262 type="button"262 type="button"
263 variant="ghost"263 variant="ghost"
264 size="icon"264 size="icon"
265- class="h-6 w-6 rounded-full hover:bg-destructive/10 hover:text-destructive z-10"265+ class="h-6 w-6 rounded-full hover:bg-destructive/10 hover:text-destructive-text z-10"
266 onClick={(e) => {266 onClick={(e) => {
267 e.stopPropagation();267 e.stopPropagation();
268 e.preventDefault();268 e.preventDefault();
src/pages/register-page.tsxmodified+2 -2
@@ -142,7 +142,7 @@ function RegisterForm() {
142 </div>142 </div>
143 143
144 {error() && (144 {error() && (
145- <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>145+ <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>
146 )}146 )}
147 147
148 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>148 <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}>
@@ -152,7 +152,7 @@ function RegisterForm() {
152 152
153 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">153 <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle">
154 {t("auth.hasAccount")}{" "}154 {t("auth.hasAccount")}{" "}
155- <Link to="/login" class="font-semibold text-primary underline-offset-4 hover:underline">155+ <Link to="/login" class="font-semibold text-primary-text underline-offset-4 hover:underline">
156 {t("auth.login")}156 {t("auth.login")}
157 </Link>157 </Link>
158 </p>158 </p>
src/pages/settings-page.tsxmodified+6 -6
@@ -187,7 +187,7 @@ function SettingsContent() {
187 <span class="text-xs text-muted-foreground">{t("settings.unsaved")}</span>187 <span class="text-xs text-muted-foreground">{t("settings.unsaved")}</span>
188 </Show>188 </Show>
189 <Show when={saved() && !dirty()}>189 <Show when={saved() && !dirty()}>
190- <span class="text-xs text-success">{t("settings.saved")}</span>190+ <span class="text-xs text-success-text">{t("settings.saved")}</span>
191 </Show>191 </Show>
192 <Button192 <Button
193 type="button"193 type="button"
@@ -291,7 +291,7 @@ function SettingsContent() {
291 type="button"291 type="button"
292 variant="ghost"292 variant="ghost"
293 size="icon"293 size="icon"
294- class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive"294+ class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text"
295 aria-label={t("common.delete")}295 aria-label={t("common.delete")}
296 onClick={() => setExamKinds((rows) => rows.filter((_, i) => i !== index))}296 onClick={() => setExamKinds((rows) => rows.filter((_, i) => i !== index))}
297 >297 >
@@ -378,7 +378,7 @@ function SettingsContent() {
378 type="button"378 type="button"
379 variant="ghost"379 variant="ghost"
380 size="icon"380 size="icon"
381- class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive disabled:opacity-30"381+ class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text disabled:opacity-30"
382 aria-label={t("common.delete")}382 aria-label={t("common.delete")}
383 disabled={CORE_ATTENDANCE.has(status())}383 disabled={CORE_ATTENDANCE.has(status())}
384 onClick={() => setAttendanceStatuses((rows) => rows.filter((_, i) => i !== index))}384 onClick={() => setAttendanceStatuses((rows) => rows.filter((_, i) => i !== index))}
@@ -461,7 +461,7 @@ function SettingsContent() {
461 type="button"461 type="button"
462 variant="ghost"462 variant="ghost"
463 size="icon"463 size="icon"
464- class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive"464+ class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text"
465 aria-label={t("common.delete")}465 aria-label={t("common.delete")}
466 onClick={() => setGradeBands((rows) => rows.filter((_, i) => i !== index))}466 onClick={() => setGradeBands((rows) => rows.filter((_, i) => i !== index))}
467 >467 >
@@ -538,7 +538,7 @@ function SettingsContent() {
538 value={minuteToUtcTime(slot().serving_minute)}538 value={minuteToUtcTime(slot().serving_minute)}
539 onInput={(e) => setMealSlots((rows) => rows.map((row, i) => i === index ? { ...row, serving_minute: utcTimeToMinute(e.currentTarget.value) } : row))}539 onInput={(e) => setMealSlots((rows) => rows.map((row, i) => i === index ? { ...row, serving_minute: utcTimeToMinute(e.currentTarget.value) } : row))}
540 />540 />
541- <Button type="button" variant="ghost" size="icon" class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive" aria-label={t("common.delete")} onClick={() => setMealSlots((rows) => rows.filter((_, i) => i !== index))}><IconTrash class="h-4 w-4" /></Button>541+ <Button type="button" variant="ghost" size="icon" class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text" aria-label={t("common.delete")} onClick={() => setMealSlots((rows) => rows.filter((_, i) => i !== index))}><IconTrash class="h-4 w-4" /></Button>
542 </div>542 </div>
543 )}543 )}
544 </Index>544 </Index>
@@ -569,7 +569,7 @@ function SettingsContent() {
569 placeholder={t("settings.dietaryTags")}569 placeholder={t("settings.dietaryTags")}
570 onInput={(e) => setDietaryTags((rows) => rows.map((row, i) => i === index ? e.currentTarget.value : row))}570 onInput={(e) => setDietaryTags((rows) => rows.map((row, i) => i === index ? e.currentTarget.value : row))}
571 />571 />
572- <Button type="button" variant="ghost" size="icon" class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive" aria-label={t("common.delete")} onClick={() => setDietaryTags((rows) => rows.filter((_, i) => i !== index))}><IconTrash class="h-4 w-4" /></Button>572+ <Button type="button" variant="ghost" size="icon" class="h-9 w-9 rounded-md text-muted-foreground hover:text-destructive-text" aria-label={t("common.delete")} onClick={() => setDietaryTags((rows) => rows.filter((_, i) => i !== index))}><IconTrash class="h-4 w-4" /></Button>
573 </div>573 </div>
574 )}574 )}
575 </Index>575 </Index>
src/pages/student-marks-page.tsxmodified+1 -1
@@ -21,7 +21,7 @@ import { useT } from "@/stores/preferences-context";
21 const PAGE_SIZE = 10;21 const PAGE_SIZE = 10;
22 const round = (n: number) => (Math.round(n * 100) / 100).toString();22 const round = (n: number) => (Math.round(n * 100) / 100).toString();
23 // ponytail: display-only color tiers (70/40 on a 0-100 scale), not a pass/fail rule23 // ponytail: display-only color tiers (70/40 on a 0-100 scale), not a pass/fail rule
24-const avgTone = (v: number) => (v >= 70 ? "text-success" : v >= 40 ? "text-warning" : "text-destructive");24+const avgTone = (v: number) => (v >= 70 ? "text-success-text" : v >= 40 ? "text-warning-text" : "text-destructive-text");
25 25
26 export default function StudentMarksPage() {26 export default function StudentMarksPage() {
27 return (27 return (
src/pages/whiteboard-page.tsxmodified+5 -5
@@ -234,7 +234,7 @@ function WhiteboardContent() {
234 <Show when={isCreator()}>234 <Show when={isCreator()}>
235 <DropdownMenu placement="bottom-end" gutter={8}>235 <DropdownMenu placement="bottom-end" gutter={8}>
236 <DropdownMenuTrigger236 <DropdownMenuTrigger
237- class="inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border-line bg-surface-tint text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary"237+ class="inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border-line bg-surface-tint text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"
238 aria-label={t("common.actions")}238 aria-label={t("common.actions")}
239 title={t("common.actions")}239 title={t("common.actions")}
240 >240 >
@@ -251,7 +251,7 @@ function WhiteboardContent() {
251 {t("whiteboard.clear")}251 {t("whiteboard.clear")}
252 </DropdownMenuItem>252 </DropdownMenuItem>
253 <DropdownMenuSeparator />253 <DropdownMenuSeparator />
254- <DropdownMenuItem class="text-warning focus:bg-warning/10 focus:text-warning data-highlighted:bg-warning/10 data-highlighted:text-warning" disabled={busy()} onSelect={() => setTimeout(() => setCloseOpen(true), 0)}>254+ <DropdownMenuItem class="text-warning-text focus:bg-warning/10 focus:text-warning-text data-highlighted:bg-warning/10 data-highlighted:text-warning-text" disabled={busy()} onSelect={() => setTimeout(() => setCloseOpen(true), 0)}>
255 <IconLock class="h-4 w-4" />255 <IconLock class="h-4 w-4" />
256 {t("whiteboard.close")}256 {t("whiteboard.close")}
257 </DropdownMenuItem>257 </DropdownMenuItem>
@@ -300,7 +300,7 @@ function WhiteboardContent() {
300 <For each={roster()}>300 <For each={roster()}>
301 {(userId) => (301 {(userId) => (
302 <li class="group flex items-center gap-2 rounded-xl px-2 py-2 transition-colors hover:bg-muted/60">302 <li class="group flex items-center gap-2 rounded-xl px-2 py-2 transition-colors hover:bg-muted/60">
303- <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary">303+ <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary-text">
304 {nameOf(userId).slice(0, 1).toLocaleUpperCase(locale())}304 {nameOf(userId).slice(0, 1).toLocaleUpperCase(locale())}
305 </span>305 </span>
306 <span class="min-w-0 flex-1">306 <span class="min-w-0 flex-1">
@@ -317,7 +317,7 @@ function WhiteboardContent() {
317 type="button"317 type="button"
318 variant="ghost"318 variant="ghost"
319 size="icon"319 size="icon"
320- class="h-8 w-8 shrink-0 rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive"320+ class="h-8 w-8 shrink-0 rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive-text"
321 disabled={busy()}321 disabled={busy()}
322 title={t("whiteboard.removeParticipant")}322 title={t("whiteboard.removeParticipant")}
323 aria-label={t("whiteboard.removeParticipant")}323 aria-label={t("whiteboard.removeParticipant")}
@@ -372,7 +372,7 @@ function WhiteboardContent() {
372 summary={b().title}372 summary={b().title}
373 confirmLabel={t("whiteboard.close")}373 confirmLabel={t("whiteboard.close")}
374 icon={<IconLock class="h-4 w-4" />}374 icon={<IconLock class="h-4 w-4" />}
375- iconClass="border-warning/40 bg-warning/10 text-warning"375+ iconClass="border-warning/40 bg-warning/10 text-warning-text"
376 onConfirm={doClose}376 onConfirm={doClose}
377 />377 />
378 <ConfirmDialog378 <ConfirmDialog
src/stores/accent-text.test.tsxadded+25 -0
@@ -0,0 +1,25 @@
1+import { expect, test } from "vitest";
2+import { accentTextLightness } from "@/stores/preferences-context";
3+
4+// Same formula as WCAG, kept local so the test does not share the code under test.
5+const luminance = (h: number, s: number, l: number) => {
6+ const a = (s / 100) * Math.min(l / 100, 1 - l / 100);
7+ const f = (n: number) => {
8+ const k = (n + h / 30) % 12;
9+ const c = l / 100 - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));
10+ return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
11+ };
12+ return 0.2126 * f(0) + 0.7152 * f(8) + 0.0722 * f(4);
13+};
14+const contrastOnPage = (h: number, s: number, l: number) => (luminance(0, 0, 97) + 0.05) / (luminance(h, s, l) + 0.05);
15+
16+test("every hue gets a text shade that reads at AA on the page background", () => {
17+ for (let hue = 0; hue < 360; hue += 15) {
18+ const l = accentTextLightness(hue, 88, 40);
19+ expect(contrastOnPage(hue, 88, l)).toBeGreaterThanOrEqual(4.5);
20+ }
21+});
22+
23+test("a hue that already passes keeps the button lightness", () => {
24+ expect(accentTextLightness(240, 88, 40)).toBe(40);
25+});
src/stores/preferences-context.tsxmodified+26 -0
@@ -150,6 +150,26 @@ function foregroundFor(h: number, s: number, l: number): string {
150 * `#fefae0`) would be nearly invisible as a light-mode button, and a near-black150 * `#fefae0`) would be nearly invisible as a light-mode button, and a near-black
151 * pick (e.g. `#023047`) would vanish against the near-black dark background.151 * pick (e.g. `#023047`) would vanish against the near-black dark background.
152 */152 */
153+/** WCAG contrast ratio between two relative luminances. */
154+function contrastRatio(a: number, b: number): number {
155+ const [hi, lo] = a > b ? [a, b] : [b, a];
156+ return (hi + 0.05) / (lo + 0.05);
157+}
158+
159+/**
160+ * The darkest-needed step of the light-mode accent that still reads as the
161+ * accent but reaches 4.5:1 as small text on white and on the 97% page
162+ * background. A yellow or cyan pick at the button lightness does not.
163+ */
164+export function accentTextLightness(h: number, s: number, from: number): number {
165+ const page = relativeLuminance(...hslToRgb(0, 0, 97));
166+ for (let l = from; l > 10; l -= 1) {
167+ const text = relativeLuminance(...hslToRgb(h, s, l));
168+ if (contrastRatio(text, page) >= 4.5) return l;
169+ }
170+ return 10;
171+}
172+
153 function themedAccent(hex: string, mode: ThemeMode): { hsl: string; fg: string } {173 function themedAccent(hex: string, mode: ThemeMode): { hsl: string; fg: string } {
154 const { h, s } = hexToHslParts(hex);174 const { h, s } = hexToHslParts(hex);
155 const sat = Math.min(88, Math.max(30, s));175 const sat = Math.min(88, Math.max(30, s));
@@ -209,6 +229,7 @@ export function PreferencesProvider(props: ParentProps) {
209 removeStorage(PALETTE_COLOR_KEY);229 removeStorage(PALETTE_COLOR_KEY);
210 root.removeProperty("--accent-light");230 root.removeProperty("--accent-light");
211 root.removeProperty("--accent-light-fg");231 root.removeProperty("--accent-light-fg");
232+ root.removeProperty("--accent-light-text");
212 root.removeProperty("--accent-dark");233 root.removeProperty("--accent-dark");
213 root.removeProperty("--accent-dark-fg");234 root.removeProperty("--accent-dark-fg");
214 return;235 return;
@@ -221,6 +242,11 @@ export function PreferencesProvider(props: ParentProps) {
221 const dark = themedAccent(color, "dark");242 const dark = themedAccent(color, "dark");
222 root.setProperty("--accent-light", light.hsl);243 root.setProperty("--accent-light", light.hsl);
223 root.setProperty("--accent-light-fg", light.fg);244 root.setProperty("--accent-light-fg", light.fg);
245+ {
246+ const { h, s } = hexToHslParts(color);
247+ const sat = Math.min(88, Math.max(30, s));
248+ root.setProperty("--accent-light-text", `${Math.round(h)} ${Math.round(sat)}% ${accentTextLightness(h, sat, 40)}%`);
249+ }
224 root.setProperty("--accent-dark", dark.hsl);250 root.setProperty("--accent-dark", dark.hsl);
225 root.setProperty("--accent-dark-fg", dark.fg);251 root.setProperty("--accent-dark-fg", dark.fg);
226 });252 });