# Design-System (Mobile-First, Widmann-Branding) Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Apply a mobile-first, Widmann-branded visual design (Tailwind CSS v4) across every existing page of the Aushilfsfahrer app, replacing the current unstyled semantic HTML — a pure presentation-layer change with no new business logic.
**Architecture:** Tailwind CSS v4 (PostCSS-only setup, no `tailwind.config.js`) with a `@theme` block defining the 5 extracted Widmann brand tokens plus 4 status-semantic colors. A small `web/components/ui/` primitives layer (`Button`, `Card`, `Alert`, `FormField`, `StatusBadge`) is built once and then wired into every existing page. Mobile navigation uses a client-side drawer (`MobileNav`), replaced by a plain horizontal header row at the `lg:` breakpoint.
**Tech Stack:** Next.js 16 (App Router, already in place), Tailwind CSS v4, `next/font/google` (Inter), existing Vitest suite (no new test dependencies).
## Global Constraints
- Brand color tokens (exact hex, from `docs/superpowers/specs/2026-07-06-design-system-design.md`): `performance-blue` `#0071ed`, `night-blue` `#0a185c`, `asphalt-grey` `#1a1a1a`, `aluminium-grey` `#eef2f6`, `white` `#fff`.
- Status-semantic colors (not brand tokens, additive per spec section 3): `status-neutral` `#6b7280` (offen), `status-warning` `#f59e0b` (unterwegs), `status-success` `#16a34a` (abgeschlossen), `status-danger` `#dc2626` (storniert; also used for error `Alert`).
- Font: Inter, loaded via `next/font/google` (no runtime request to Google Fonts — Next.js self-hosts it at build time).
- Mobile-first breakpoints: Tailwind v4 defaults — unprefixed = base/mobile, `md:` ≈768px, `lg:` ≈1024px.
- Touch targets: minimum 44×44px (Tailwind spacing `11` = 2.75rem = 44px) on every interactive element.
- Logo asset already committed at `web/public/brand/widmann-logo.svg` (SVG wordmark, viewBox `0 0 233.65 35.31`, monochrome black fill).
- No changes to Server Actions, RLS policies, the data model, or any redirect/validation logic in `actions.ts` files — visual/structural changes only.
- No dark mode (spec explicitly excludes it).
- No new automated test dependencies (no `@testing-library/react`, no new test runner config). Verification per task is `npm run build` + `npm test` (existing Vitest suite must stay green) plus a manual/curl-based structural check. Full cross-browser/cross-breakpoint visual verification is done by the project owner in the running Docker container after all tasks land (per spec section 6) — do not attempt to spin up a headless browser for this.
---
### Task 1: Tailwind CSS v4 setup, brand tokens, Inter font
**Files:**
- Modify: `web/package.json`
- Create: `web/postcss.config.mjs`
- Modify: `web/app/globals.css` (full rewrite)
- Modify: `web/app/layout.tsx:1-8` (font wiring only — header/nav restructuring happens in Task 3)
- Delete: `web/app/page.module.css` (dead code — confirmed unused by `grep -r "page.module.css" web/`, `web/app/page.tsx` only calls `redirect("/dashboard")` and never renders JSX)
**Interfaces:**
- Produces: Tailwind utility classes for all brand/status tokens (`bg-performance-blue`, `text-performance-blue`, `border-performance-blue`, `bg-night-blue`, `text-asphalt-grey`, `bg-aluminium-grey`, `bg-status-neutral`, `bg-status-warning`, `bg-status-success`, `bg-status-danger`, `text-status-*` equivalents, etc. — Tailwind v4 auto-generates `bg-*`/`text-*`/`border-*` utilities for every `--color-*` variable in `@theme`). Produces the `font-sans` utility resolving to Inter. All later tasks consume these classes; none of them touch `globals.css` or `postcss.config.mjs` again.
- [ ] **Step 1: Install Tailwind CSS v4 and its PostCSS plugin**
```bash
cd web
npm install -D tailwindcss@^4 @tailwindcss/postcss@^4 postcss@^8
```
- [ ] **Step 2: Create the PostCSS config**
Create `web/postcss.config.mjs`:
```js
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;
```
- [ ] **Step 3: Replace `globals.css` with Tailwind import + brand theme**
Replace the entire contents of `web/app/globals.css` with:
```css
@import "tailwindcss";
@theme {
--color-performance-blue: #0071ed;
--color-night-blue: #0a185c;
--color-asphalt-grey: #1a1a1a;
--color-aluminium-grey: #eef2f6;
--color-status-neutral: #6b7280;
--color-status-warning: #f59e0b;
--color-status-success: #16a34a;
--color-status-danger: #dc2626;
--font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
}
html,
body {
height: 100%;
}
body {
color: var(--color-asphalt-grey);
background: #fff;
}
```
This drops the old dark-mode `@media (prefers-color-scheme: dark)` block and the Arial font fallback (Global Constraints: no dark mode; Inter replaces Arial). Tailwind's Preflight (bundled with `@import "tailwindcss"`) already resets margins/padding/box-sizing, so the old manual `* { box-sizing: border-box; padding: 0; margin: 0; }` reset is redundant and removed.
- [ ] **Step 4: Delete the unused `page.module.css`**
```bash
rm web/app/page.module.css
```
- [ ] **Step 5: Wire Inter into the root layout**
In `web/app/layout.tsx`, add the font import and apply it to the `` tag. Change only these parts (leave the rest of the file, including the header/`
` structure, untouched — Task 3 restructures those):
```tsx
import { Inter } from "next/font/google";
import "./globals.css";
import { loadProfile } from "@/lib/auth/profile";
import { NavLinks } from "@/components/NavLinks";
import { LogoutButton } from "@/components/LogoutButton";
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
export const metadata = {
title: "Aushilfsfahrer",
};
```
And add `className={inter.variable}` to both `` tags in the file (the `missing-profile` branch and the main return):
```tsx
```
Also add `font-sans` to the `` tag's existing (currently absent) className in both branches:
```tsx
```
- [ ] **Step 6: Verify the build**
```bash
cd web
npm run build
```
Expected: exit code 0, all routes compile (same route list as before: `/`, `/_not-found`, `/auftraege`, `/auftraege/[id]`, `/auftraege/neu`, `/dashboard`, `/login`).
- [ ] **Step 7: Verify the brand tokens actually compiled into CSS**
```bash
cd web
grep -r "0071ed" .next/static/css/*.css
```
Expected: at least one match (confirms the `@theme` block produced real utility classes containing the brand hex value — if this greps empty, the `@theme` block was not picked up and something in Steps 1-3 is wrong).
- [ ] **Step 8: Run the existing test suite**
```bash
cd web
npm test
```
Expected: `Test Files 4 passed (4)`, `Tests 17 passed (17)` — unchanged from before this task (this task touches no logic files, only CSS/font/build config).
- [ ] **Step 9: Commit**
```bash
git add web/package.json web/package-lock.json web/postcss.config.mjs web/app/globals.css web/app/layout.tsx
git rm web/app/page.module.css
git commit -m "feat: add Tailwind CSS v4 with Widmann brand tokens and Inter font"
```
---
### Task 2: UI primitives (Button, Card, Alert, FormField) + Login page
**Files:**
- Create: `web/components/ui/Button.tsx`
- Create: `web/components/ui/Card.tsx`
- Create: `web/components/ui/Alert.tsx`
- Create: `web/components/ui/FormField.tsx`
- Modify: `web/app/login/page.tsx` (full rewrite)
**Interfaces:**
- Consumes: Tailwind utilities from Task 1 (`bg-performance-blue`, `bg-night-blue`, `text-asphalt-grey`, `border-aluminium-grey`, `bg-status-danger`, `font-sans`).
- Produces:
- `Button` (default export: none; named export `Button`) — props: `variant?: "primary" | "secondary" | "destructive"` (default `"primary"`), `fullWidth?: boolean` (default `true`), plus all standard `