diff --git a/gui/DESIGN.md b/gui/DESIGN.md new file mode 100644 index 000000000..2f668aaf6 --- /dev/null +++ b/gui/DESIGN.md @@ -0,0 +1,158 @@ +# gui/DESIGN.md — de ontwerptaal van het dashboard + +> De levende ontwerp- en smaakgids voor het opencodex-dashboard (`gui/`). +> Dit is de ChefGroep-taal (v2 "Devin-richting"): een stil, warm, mat instrument. +> Bron van waarheid voor de *taal*: [`OnlineChefGroep/design-system`](https://github.com/OnlineChefGroep/design-system) +> (`tokens.css`, `DESIGN.md`, `motion-spec.md`). Dit bestand legt vast hoe die +> taal in dít dashboard leeft, en — belangrijker — **hoe je 'm uitbreidt zonder +> 'm te breken**. + +Alles hier is gebouwd op tokens in `src/styles.css`. Verzin nooit losse +px-waarden of kleuren in een component; gebruik een token. Zo blijft de hele +app in één keer te herstemmen. + +--- + +## 1. De drie pijlers + +1. **Stil oppervlak.** Warm off-white, haarlijnen, plat. Geen glow, geen + gradients, geen glasmorfisme, geen geneste schaduw. +2. **Levende activiteit.** Werk toon je als rust of een golfje, nooit als + ronddraaiende spinner. +3. **Begrijpelijk.** Eén accent, één type-ladder, één set radii, één easing. + Hiërarchie komt uit grootte/gewicht/kleur — niet uit decoratie. + +--- + +## 2. Kleur + +Eén accent: blauw (`--accent-blue`). Alles wat "klik mij / hier ben je / dit is +aan" zegt is blauw: links, focus-ring, actieve nav, geselecteerde tab, toggles, +selectie. De **primaire knop** blijft juist monochroom (tekst↔achtergrond +omgekeerd) — dat is de shadcn-conventie, geen tweede accent. + +| Rol | Token | +|---|---| +| Achtergrond / rail / kaart | `--bg` · `--rail` · `--surface` · `--raised` | +| Lijnen | `--border` (sterk) · `--border-soft` (hairline) | +| Tekst | `--text` · `--muted` · `--faint` | +| Primaire actie | `--accent` (+ `--accent-ink`) | +| Het accent | `--accent-blue` · `--accent-blue-ink` · `--accent-soft` (ring/tint) | +| Semantiek | `--green` (git/PR/toestemming) · `--amber` (wacht-op-jou) · `--red` (destructief) | + +Regels: groen/amber/rood zijn **gereserveerd**, nooit decoratie. Neutraal is +warm, nooit koudgrijs. Dark mode is basalt-warm, geen zuiver zwart. Elke token +is `light-dark(licht, donker)` — schrijf beide kanten, altijd. + +--- + +## 3. Typografie + +- **Archivo** (`--font-ui`) voor alles; **JetBrains Mono** (`--font-code`) + uitsluitend voor machinedata (timers, model-id's, paden, diffs, tellers). +- Eén type-ladder — gebruik de tokens, nooit losse px: + +| Token | px | Gebruik | +|---|---|---| +| `--text-micro` | 10.5 | meta, tellers, caps-labels | +| `--text-caption` | 11.5 | labels, captions | +| `--text-label` | 12.5 | secundair / beschrijvingen | +| `--text-control` | 13.5 | **UI-standaard** (body van de app) | +| `--text-body` | 14 | leestekst | +| `--text-subtitle` | 16 | kleine titels | +| `--text-section` | 18 | sectiekoppen | +| `--text-title` | 22 | paginatitels | +| `--text-display` | 28 | hero-getallen | + +- Koppen: gewicht 500, `letter-spacing: var(--tracking-tight)` (−0.02em), + `text-wrap: balance`. Leading via `--leading-*` (tight 1.2 / ui 1.45 / + body 1.55 / relaxed 1.65). +- **Getallen lijnen uit**: alles wat een getal is krijgt `.num` of + `font-variant-numeric: tabular-nums` (stat-waarden, quota, tellers, timers). +- Utilities: `.num` (tabulaire cijfers), `.caps` (uppercase microlabel), + `.prose` (68ch leesmaat). Componeer hiermee; verzin geen nieuwe. + +--- + +## 4. Motion + +Bewegen is transform + opacity, nooit `width/height/top/left`. Eén easing +(`--ease-out`), duren `--motion-fast/normal/slow` (140/280/420ms). Alles settle-t +vroeg, niets bounct, niets loopt oneindig. De vaste set: + +- **Intent-reveal:** één rustige rise per navigatie (`.main-inner > *`), niet + per kaart. +- **Press-physics:** `scale(0.97–0.98)` op knoppen, nav-rijen, tabs, chips, + segments. Nooit op inputs, tekst of panelen. +- **Modal:** scrim vervaagt in, kaart rijst en settle-t. +- **Ripple i.p.v. spinner:** `.spin` is een kalm blauw golfje. + +`prefers-reduced-motion` zet **alles** uit met nul informatieverlies (globale +guard in `styles.css`). Nieuwe animatie = tokenduur + één keyframe in het +Motion-blok. Meer niet. + +--- + +## 5. Skins (`data-style`) + +Dezelfde taal draagt meerdere complete skins: + +- `devin` (default) — warm, zacht, ronder (`:root`). +- `strak` — koeler grijs-blauw, scherpere radii. + +Zetten: `?style=strak` of een opgeslagen keuze (`localStorage` `ocx-style`), +toegepast vóór eerste paint in `main.tsx`. Een nieuwe skin = één blok +token-overrides in `styles.css` (light **én** dark). De taal (§1–§4) blijft +onder elke skin gelden. + +--- + +## 5b. Taste-regels (overgenomen uit `design-system/taste/`) + +Bindend voor nieuw werk. Twee observaties minimum per regel (zie de bron). + +- **Kleur:** neutraal warm tinten, **één accent max**; licht is eersteklas + standaard. Geen paarse gradients, AI-glow, acid-on-black. Het accent is voor + links/focus/toggles/status — **niet** voor nav-selectie (die is een kalme + `--raised`). +- **Type:** Archivo/General Sans-humanist voor interface; mono **strikt** voor + data. Nooit Inter/Geist/Space Grotesk of mono voor labels/prose. +- **Motion:** vroeg settelen, lage amplitude/frequentie; **één** signatuur- + systeem (de Stroom/ripple), geen verspreide micro-animaties. Geen bounce, + elastic of oneindige ambient motion. +- **Dichtheid:** compact, informatiedicht (dichtheid 5–7). `h28`/`r6` voor + secundaire controls, `r10` voor kaarten. Geen marketing-witruimte in product. +- **Stem:** warm, direct, menselijk Nederlands op Joep-vlakken. Geen em-dashes, + buzzwords, lifecycle-jargon of verzonnen metrics. +- **Structuur:** haarlijnen + ruimte voor scheiding. **Geen** kaart-in-kaart, + bento-velden of geneste elevation. Tweebaans sidebar met vaste glyph-baan. +- **Iconen:** echte SVG-lijniconen (Lucide/shadcn, ~1.75px stroke, 15–16px + grid). Nooit emoji als icoon — nergens. +- **Metafoor:** water/stroom voor systeemstatus; instrument-framing + ("gezandstraald instrument"). Geen keuken/bon/brigade of corporate-dashboard. + +## 6. Bans (hard) + +- Geen spinners/loaders (ripple vervangt ze). +- Geen emoji als icoon of in copy. Iconen zijn SVG-lijniconen (Lucide-stijl). +- Geen em-dashes, buzzwords of verzonnen metrics in copy. +- Geen gradients, glow, glasmorfisme, bento-kaartjes. +- Geen kaart-in-kaart, geen geneste elevation. +- Geen oneindige ambient motion. + +--- + +## 7. Zo breid je uit + +- **Nieuwe kleur/rol:** token toevoegen in `:root` mét `light-dark()`, en in + élke skin (`[data-style="strak"]`). Nooit een losse hex in een component. +- **Nieuwe component:** hergebruik `.btn`/`.badge`/`.input`/`.switch`/`.seg`, + radii- en type-tokens. Haarlijn-border, rustige hover, press-physics als het + klikbaar is. +- **Nieuwe tekst:** géén hardgecodeerde UI-strings in `src/pages`/ + `src/components` (zie `gui/AGENTS.md`). Zet de string in **alle** locale- + bestanden (`src/i18n/*.ts`) en render met `useT()`. Draai `bun run lint:i18n`. +- **Nieuwe motion:** tokenduur + keyframe in het Motion-blok; transform/opacity + only; check `prefers-reduced-motion`. +- **Controleren:** `bun run typecheck`, `bun --bun run lint:gui`, + `bun run lint:i18n`, `bun run privacy:scan`. Zie `AGENTS.md`. diff --git a/gui/bun.lock b/gui/bun.lock index 1ed75c2ac..56c90814e 100644 --- a/gui/bun.lock +++ b/gui/bun.lock @@ -5,6 +5,8 @@ "": { "name": "gui", "dependencies": { + "@fontsource-variable/archivo": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", "@tanstack/react-virtual": "^3.14.5", "react": "^19.2.7", "react-dom": "^19.2.7", @@ -81,6 +83,10 @@ "@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.2", "", { "dependencies": { "@eslint/core": "^1.2.1", "levn": "^0.4.1" } }, "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A=="], + "@fontsource-variable/archivo": ["@fontsource-variable/archivo@5.3.0", "", {}, "sha512-HogK8FJelrD1o7TlZlkIVtHgc20bO5PZRWE7mUeUTdMN055alznQV6/00J00IBeu8FQAH4s3zW9UJNvKExXf+g=="], + + "@fontsource-variable/jetbrains-mono": ["@fontsource-variable/jetbrains-mono@5.3.0", "", {}, "sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw=="], + "@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="], "@humanfs/node": ["@humanfs/node@0.16.8", "", { "dependencies": { "@humanfs/core": "^0.19.2", "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ=="], diff --git a/gui/package.json b/gui/package.json index ce7f602b0..61d4523e8 100644 --- a/gui/package.json +++ b/gui/package.json @@ -14,6 +14,8 @@ "preview": "vite preview" }, "dependencies": { + "@fontsource-variable/archivo": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", "@tanstack/react-virtual": "^3.14.5", "react": "^19.2.7", "react-dom": "^19.2.7" diff --git a/gui/src/App.tsx b/gui/src/App.tsx index 65a18fa4b..d34cfa0fa 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -288,8 +288,8 @@ export default function App() { + } {page === "grok" && } + diff --git a/gui/src/main.tsx b/gui/src/main.tsx index 024e29626..b16c063fb 100644 --- a/gui/src/main.tsx +++ b/gui/src/main.tsx @@ -1,9 +1,25 @@ import React from "react"; import ReactDOM from "react-dom/client"; +// ChefGroep design language: Archivo (UI, the free General Sans equivalent) + +// JetBrains Mono (data only). Bundled locally so nothing depends on a CDN. +import "@fontsource-variable/archivo/wght.css"; +import "@fontsource-variable/jetbrains-mono"; import App from "./App"; import { LanguageProvider } from "./i18n/provider"; import "./styles.css"; +// ChefGroep design language ships two complete skins (design-system §14). +// devin (warm, default) is the :root skin; strak (cool, sharp) is opt-in via +// ?style=strak or a saved choice. Applied before first paint to avoid a flash. +try { + const params = new URLSearchParams(window.location.search); + const style = params.get("style") ?? localStorage.getItem("ocx-style"); + if (style === "strak" || style === "devin") { + document.documentElement.setAttribute("data-style", style); + localStorage.setItem("ocx-style", style); + } +} catch { /* ignore */ } + ReactDOM.createRoot(document.getElementById("root")!).render( diff --git a/gui/src/styles.css b/gui/src/styles.css index df6f124a1..df9b551b5 100644 --- a/gui/src/styles.css +++ b/gui/src/styles.css @@ -1,10 +1,12 @@ /* ============================================================================ - opencodex dashboard — design system - Infra console in the OpenAI product grammar: white/near-black monochrome - base, black (light) / white (dark) primary actions, pill buttons, hairline - borders, flat surfaces, monospace for model ids / urls. Light + dark via - the native light-dark() function — every token is authored once; - `data-theme` (or the OS) picks the side. + opencodex dashboard — ChefGroep design language (v2 "Devin-richting") + A still, warm, matte instrument: warm off-white surfaces, one blue accent, + hairline borders, flat surfaces (no glow/glass/gradients), monospace for + machine data only. shadcn component conventions, Lucide icons, ripples + instead of spinners. Light + dark are both first-class via the native + light-dark() function — every token is authored once; `data-theme` (or the + OS) picks the side, `data-style` swaps the whole skin (devin | strak). + Ref: OnlineChefGroep/design-system (tokens.css, DESIGN.md, motion-spec.md). ============================================================================ */ @import "./styles/provider-catalog.css"; @@ -25,32 +27,39 @@ /* default: follow the OS; [data-theme] below pins color-scheme so light-dark() obeys it */ color-scheme: light dark; - --bg: light-dark(#ffffff, #212121); - --rail: light-dark(#f9f9f9, #171717); - --surface: light-dark(#ffffff, #262626); - --raised: light-dark(#f4f4f4, #303030); - --raised-hover: light-dark(#ececec, #3a3a3a); - --border: light-dark(#e6e6e6, #3d3d3d); - --border-soft: light-dark(#f0f0f0, #333333); - --hover: light-dark(rgba(13, 13, 13, 0.03), rgba(255, 255, 255, 0.03)); - - --text: light-dark(#0d0d0d, #ececec); - --muted: light-dark(#6e6e6e, #a6a6a6); - --faint: light-dark(#707070, #9a9a9a); - - /* monochrome primary: black actions on light, white actions on dark */ - --accent: light-dark(#0d0d0d, #ececec); - --accent-hover: light-dark(#3d3d3d, #ffffff); - --accent-ink: light-dark(#ffffff, #0d0d0d); - --accent-soft: light-dark(rgba(13, 13, 13, 0.06), rgba(255, 255, 255, 0.09)); - --accent-ring: light-dark(rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.38)); - - --green: light-dark(#0a7d5c, #4ecb9d); - --green-soft: light-dark(rgba(16, 163, 127, 0.10), rgba(78, 203, 157, 0.13)); - --red: light-dark(#b91c1c, #f87171); - --red-soft: light-dark(rgba(185, 28, 28, 0.09), rgba(248, 113, 113, 0.13)); - --amber: light-dark(#9a4a08, #fbbf24); - --amber-soft: light-dark(rgba(180, 83, 9, 0.10), rgba(251, 191, 36, 0.13)); + /* ChefGroep design-system (v2 "Devin-richting") — warm off-white, one blue + accent. Values from OnlineChefGroep/design-system tokens.css (2026-07). The + opencodex light-dark() authoring convention is preserved. */ + --bg: light-dark(#f7f6f5, #121111); + --rail: light-dark(#f2f1f0, #171615); + --surface: light-dark(#ffffff, #1b1a19); + --raised: light-dark(#efefef, #242322); + --raised-hover: light-dark(#e7e6e5, #2c2b2a); + --border: light-dark(rgba(0, 0, 0, 0.14), rgba(255, 255, 255, 0.16)); + --border-soft: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.09)); + --hover: light-dark(rgba(0, 0, 0, 0.045), rgba(255, 255, 255, 0.05)); + + --text: light-dark(#191919, #f0eeeb); + --muted: light-dark(rgba(0, 0, 0, 0.55), rgba(240, 238, 235, 0.55)); + --faint: light-dark(rgba(0, 0, 0, 0.38), rgba(240, 238, 235, 0.35)); + + /* primary action stays a text↔bg inversion (shadcn .primary contract) */ + --accent: light-dark(#191919, #f0eeeb); + --accent-hover: light-dark(#333333, #ffffff); + --accent-ink: light-dark(#f7f6f5, #191919); + /* the single blue accent — links, focus, switch-on, selection */ + --accent-blue: light-dark(#317cff, #5c97ff); + --accent-blue-ink: light-dark(#1d5fd6, #8ab4ff); + --accent-soft: light-dark(rgba(49, 124, 255, 0.09), rgba(92, 151, 255, 0.14)); + --accent-ring: light-dark(rgba(49, 124, 255, 0.55), rgba(92, 151, 255, 0.55)); + + /* green reserved for git/PR/approval, amber for hold, red for destructive */ + --green: light-dark(#1f883d, #3fb950); + --green-soft: light-dark(rgba(31, 136, 61, 0.10), rgba(63, 185, 80, 0.13)); + --red: light-dark(#cf222e, #f85149); + --red-soft: light-dark(rgba(207, 34, 46, 0.09), rgba(248, 81, 73, 0.13)); + --amber: light-dark(#bf5b00, #d9a038); + --amber-soft: light-dark(rgba(191, 91, 0, 0.10), rgba(217, 160, 56, 0.13)); /* geometry: 4px base grid, three surface radii, and one pill radius */ --space-0-5: 2px; @@ -70,38 +79,44 @@ --prose-measure: 70ch; --radius-2xs: 4px; - --radius: 12px; + --radius: 10px; --radius-sm: 8px; --radius-xs: 6px; - --radius-lg: 16px; + --radius-lg: 14px; --radius-round: 50%; --radius-pill: 999px; /* typography: product UI first, Korean-safe fallbacks, mono only for machine data */ - --font-ui: "OpenAI Sans", "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; - --font-code: ui-monospace, "SFMono-Regular", "Cascadia Code", "JetBrains Mono", "Noto Sans Mono CJK KR", Menlo, Consolas, monospace; + --font-ui: "Archivo Variable", "Archivo", "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; + --font-code: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Code", "Noto Sans Mono CJK KR", Menlo, Consolas, monospace; --font: var(--font-ui); --mono: var(--font-code); - --text-micro: 10px; - --text-caption: 11px; - --text-label: 12px; - --text-control: 13px; - --text-body: 14px; - --text-subtitle: 16px; - --text-title: 20px; - --text-display: 24px; + /* type scale (design-system §11): one modular ladder, used everywhere via + tokens — never ad-hoc px. Data uses tabular-nums so columns line up. */ + --text-micro: 10.5px; /* meta, counts, badge */ + --text-caption: 11.5px; /* labels, kbd, captions */ + --text-label: 12.5px; /* secondary / descriptions */ + --text-control: 13.5px; /* UI standard */ + --text-body: 14px; /* body copy */ + --text-subtitle: 16px; /* small titles */ + --text-section: 18px; /* section headers */ + --text-title: 22px; /* page titles */ + --text-display: 28px; /* hero numbers */ --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; + /* leading: tight for headings, roomy for prose, calm for UI */ --leading-tight: 1.2; - --leading-ui: 1.35; - --leading-body: 1.5; - --leading-relaxed: 1.6; + --leading-ui: 1.45; + --leading-body: 1.55; + --leading-relaxed: 1.65; --tracking-normal: 0; + --tracking-tight: -0.02em; /* headings + big numbers */ + --tracking-caps: 0.06em; /* uppercase micro-labels */ --tracking-wide: 0.04em; --control-sm: 28px; @@ -113,8 +128,12 @@ --icon-md: 16px; --icon-lg: 20px; - --motion-fast: 120ms; - --motion-normal: 180ms; + --motion-fast: 140ms; + --motion-normal: 280ms; + --motion-slow: 420ms; + /* design-system signature easing — everything settles early, nothing bounces */ + --ease-out: cubic-bezier(0.22, 1, 0.36, 1); + --ease-in: cubic-bezier(0.4, 0, 1, 1); /* stacking: sticky chrome < overlay hosts < popovers/drawers < modals */ --z-sticky: 20; @@ -122,34 +141,71 @@ --z-popover: 40; --z-modal: 50; - --shadow: 0 1px 2px light-dark(rgba(16, 24, 40, 0.06), rgba(0, 0, 0, 0.5)), 0 10px 28px light-dark(rgba(16, 24, 40, 0.07), rgba(0, 0, 0, 0.30)); - --shadow-sm: 0 1px 2px light-dark(rgba(16, 24, 40, 0.06), rgba(0, 0, 0, 0.4)); + /* design language bans product-card shadow/glow; keep only a soft overlay lift */ + --shadow: 0 8px 28px light-dark(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.44)); + --shadow-sm: 0 1px 2px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.34)); /* toggle switch */ --toggle-w: 36px; --toggle-h: 20px; --toggle-dot: 14px; - --toggle-off-bg: light-dark(#d4d4d4, #4a4a4a); - --toggle-on-bg: light-dark(#0d0d0d, #4ecb9d); - --toggle-dot-color: light-dark(#ffffff, #0d0d0d); + --toggle-off-bg: light-dark(#e0dedc, #3a3937); + --toggle-on-bg: var(--accent-blue); + --toggle-dot-color: #ffffff; } /* explicit user choice pins the scheme; "system" removes the attribute and falls back to the OS */ :root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; } +/* second complete skin over the same language (design-system §14): cooler, + sharper, tighter radii, a colder blue. The default skin is the :root above + ("devin"). Set data-style="strak" on to opt in; works in light+dark. */ +:root[data-style="strak"] { + --bg: light-dark(#f4f6f9, #0f1013); + --rail: light-dark(#eef1f6, #141519); + --surface: light-dark(#ffffff, #16181c); + --raised: light-dark(#ebeef3, #1e2126); + --raised-hover: light-dark(#e2e6ec, #262a30); + --border: light-dark(#c6cdd8, #363a43); + --border-soft: light-dark(#e2e6ec, #25282e); + --hover: light-dark(rgba(19, 20, 23, 0.05), rgba(236, 237, 240, 0.06)); + --text: light-dark(#131417, #ecedf0); + --muted: light-dark(#525860, #9ba1ab); + --faint: light-dark(#8f96a1, #676d78); + --accent: light-dark(#131417, #ecedf0); + --accent-hover: light-dark(#2b2f36, #ffffff); + --accent-ink: light-dark(#f4f6f9, #131417); + --accent-blue: light-dark(#2563eb, #4f8dff); + --accent-blue-ink: light-dark(#1d4fd7, #7fa9ff); + --accent-soft: light-dark(rgba(37, 99, 235, 0.09), rgba(79, 141, 255, 0.12)); + --accent-ring: light-dark(rgba(37, 99, 235, 0.55), rgba(79, 141, 255, 0.55)); + --radius-2xs: 3px; + --radius: 6px; + --radius-sm: 5px; + --radius-xs: 4px; + --radius-lg: 8px; + --glass-rail: light-dark(#eef1f6, #141519); + --glass-panel: light-dark(#ffffff, #16181c); +} + /* glass material tokens: rail/nav layer only — content cards stay opaque */ :root { - --glass-rail: light-dark(rgba(249, 249, 249, 0.66), rgba(23, 23, 23, 0.62)); - --glass-panel: light-dark(rgba(255, 255, 255, 0.78), rgba(38, 38, 38, 0.82)); - --glass-blur: saturate(1.6) blur(22px); + /* matte, opaque warm surfaces — no glassmorphism (design language ban) */ + --glass-rail: light-dark(#f2f1f0, #171615); + --glass-panel: light-dark(#ffffff, #1b1a19); + --glass-blur: none; } * { box-sizing: border-box; } html, body, #root { height: 100%; } -html { overflow-x: hidden; background: var(--bg); } +html { + overflow-x: hidden; background: var(--bg); + -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} body { margin: 0; @@ -157,29 +213,16 @@ body { background: transparent; color: var(--text); font-family: var(--font-ui); - font-size: var(--text-body); - line-height: var(--leading-body); - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; + font-size: var(--text-control); + line-height: var(--leading-ui); + font-feature-settings: "kern", "liga", "calt"; } -/* single ambient soft-focus wash behind the app (OpenAI organic-blur grammar). - One wash per viewport; the glass rail and modals refract it via backdrop-filter. */ -body::before { - content: ""; - position: fixed; - inset: -20%; - z-index: -1; - pointer-events: none; - background: - radial-gradient(42% 38% at 12% 6%, light-dark(rgba(164, 196, 255, 0.42), rgba(96, 130, 200, 0.16)), transparent 70%), - radial-gradient(46% 42% at 88% 18%, light-dark(rgba(168, 226, 197, 0.38), rgba(88, 160, 130, 0.13)), transparent 70%), - radial-gradient(40% 36% at 70% 92%, light-dark(rgba(255, 224, 194, 0.30), rgba(180, 140, 100, 0.08)), transparent 72%); - filter: blur(70px); -} +/* design language: still, warm, matte surface — no gradients, no glow behind + the app. The flat --bg is the whole backdrop. */ -a { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; } -a:hover { text-decoration-color: var(--text); } +a { color: var(--accent-blue-ink); text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 2px; } +a:hover { text-decoration-color: var(--accent-blue-ink); } code { font-family: var(--font-code); font-size: var(--text-label); } .mono { font-family: var(--font-code); font-variant-numeric: tabular-nums; } @@ -189,7 +232,16 @@ code { font-family: var(--font-code); font-size: var(--text-label); } gap: var(--space-2); } -h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-semibold); letter-spacing: 0; line-height: var(--leading-tight); } +h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); text-wrap: balance; } +p { text-wrap: pretty; } + +/* ---- typography utilities (design-system §11) — compose, don't re-invent ---- + .num tabular figures so numeric columns and timers line up + .caps small uppercase section label + .prose readable measure for long-form copy */ +.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; } +.caps { font-size: var(--text-micro); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--faint); } +.prose { font-size: var(--text-body); line-height: var(--leading-relaxed); max-width: 68ch; text-wrap: pretty; } /* [Decision Log] - 목적: 화면마다 임의로 지정된 폰트 크기와 굵기를 역할 기반 타이포그래피로 통일한다. @@ -221,8 +273,17 @@ p.muted.text-control { ::selection { background: var(--accent-soft); } -/* native controls (checkbox/radio) follow the accent instead of browser blue */ -input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); } +/* native controls (checkbox/radio) follow the blue accent */ +input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-blue); } + +/* range slider — design-system settings surface: 2px hairline track, ring thumb */ +input[type="range"] { -webkit-appearance: none; appearance: none; height: 2px; background: var(--border); border-radius: 1px; outline: none; } +input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent-blue); cursor: pointer; transition: transform 120ms var(--ease-out); } +input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); } +input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent-blue); cursor: pointer; } + +/* keyboard hint — mono, hairline key cap (design-system) */ +kbd { font-family: var(--font-code); font-size: var(--text-caption); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--muted); background: var(--surface); } /* scrollbars */ *::-webkit-scrollbar { width: 10px; height: 10px; } @@ -274,9 +335,10 @@ input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); } color: var(--muted); font: inherit; font-size: var(--text-control); font-weight: var(--weight-medium); transition: background var(--motion-fast), color var(--motion-fast); } -.nav-item:hover { background: var(--accent-soft); color: var(--text); } -.nav-item.active { background: var(--accent-soft); color: var(--text); } -.nav-item.active { font-weight: var(--weight-semibold); } +.nav-item:hover { background: var(--hover); color: var(--text); } +/* design-system nav: active is a calm raised surface, not the accent — one + accent max, reserved for links/focus/toggles/status (taste-rules: color). */ +.nav-item.active { background: var(--raised); color: var(--text); font-weight: var(--weight-medium); } .nav-item svg { width: 17px; height: 17px; color: var(--faint); flex-shrink: 0; } .nav-item.active svg { color: var(--text); } @@ -363,14 +425,14 @@ input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); } /* ---- page header ---- */ .page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; } .page-head h2 { font-size: var(--text-title); } -.page-sub { color: var(--muted); font-size: var(--text-body); margin: 4px 0 22px; max-width: var(--prose-measure); } +.page-sub { color: var(--muted); font-size: var(--text-body); line-height: var(--leading-body); margin: 6px 0 24px; max-width: 68ch; text-wrap: pretty; } /* Page-level underline tabs (Logs & Debug / Dashboard). Distinct from pill .segmented filters. */ /* Let the row take the height it needs — no horizontal scrollbar on a short tab strip. */ .page-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: 2px 0 14px; overflow: visible; } .page-tab { flex: 0 0 auto; white-space: nowrap; appearance: none; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; color: var(--muted); cursor: pointer; font: inherit; font-size: var(--text-control); } .page-tab:hover { color: var(--text); } -.page-tab--active { color: var(--text); border-bottom-color: var(--accent); font-weight: var(--weight-semibold); } +.page-tab--active { color: var(--accent-blue-ink); border-bottom-color: var(--accent-blue); font-weight: var(--weight-semibold); } .page-tab:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: -2px; } .page-sub b { color: var(--text); font-weight: var(--weight-semibold); } .api-page h2 svg { width: 1em; height: 1em; vertical-align: -0.16em; } @@ -499,20 +561,24 @@ input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); } /* ---- buttons ---- */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; - padding: 8px 16px; border-radius: var(--radius-pill); + padding: 8px 14px; border-radius: var(--radius-sm); font: inherit; font-size: var(--text-control); font-weight: var(--weight-medium); line-height: var(--leading-ui); cursor: pointer; - border: 1px solid transparent; transition: background var(--motion-fast), border-color var(--motion-fast), opacity var(--motion-fast); white-space: nowrap; + border: 1px solid transparent; + transition: background var(--motion-fast), border-color var(--motion-fast), opacity var(--motion-fast), transform 100ms var(--ease-out); + white-space: nowrap; } a.btn, a.btn:hover { text-decoration: none; } .btn svg { width: 15px; height: 15px; } .btn:disabled { opacity: 0.55; cursor: default; } +/* design language press-physics: settle, never bounce */ +.btn:active:not(:disabled) { transform: scale(0.97); } .btn-primary { background: var(--accent); color: var(--accent-ink); } .btn-primary:hover:not(:disabled) { background: var(--accent-hover); } .btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border); } .btn-ghost:hover:not(:disabled) { background: var(--raised); } .btn-danger { background: transparent; color: var(--red); border-color: rgba(248, 113, 113, 0.3); } .btn-danger:hover:not(:disabled) { background: var(--red-soft); } -.btn-sm { padding: 4px 12px; font-size: var(--text-label); border-radius: var(--radius-pill); } +.btn-sm { padding: 4px 12px; font-size: var(--text-label); border-radius: var(--radius-xs); } .btn-icon { appearance: none; border: none; @@ -616,10 +682,10 @@ a.btn, a.btn:hover { text-decoration: none; } @media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, 1fr); } } .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: border-color var(--motion-fast); } .stat:hover { border-color: var(--faint); } -.stat .label { font-size: var(--text-label); color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; font-weight: var(--weight-medium); } -.stat .label svg { width: 14px; height: 14px; } -.stat .value { font-size: var(--text-title); font-weight: var(--weight-semibold); letter-spacing: 0; line-height: var(--leading-tight); } -.stat .value.mono { font-family: var(--font-code); font-size: var(--text-subtitle); } +.stat .label { font-size: var(--text-micro); color: var(--faint); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-caps); } +.stat .label svg { width: 13px; height: 13px; } +.stat .value { font-size: var(--text-title); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); font-variant-numeric: tabular-nums; } +.stat .value.mono { font-family: var(--font-code); font-size: var(--text-subtitle); letter-spacing: 0; } .startup-health-bar { min-height: var(--control-lg); @@ -693,8 +759,8 @@ a.btn, a.btn:hover { text-decoration: none; } .model-card .id { font-family: var(--font-code); font-weight: var(--weight-semibold); font-size: var(--text-control); letter-spacing: 0; color: var(--text); } /* ---- badges / status dot ---- */ -.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-caption); font-weight: var(--weight-semibold); line-height: var(--leading-ui); padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid transparent; font-family: var(--font-code); letter-spacing: 0; } -.badge-accent { background: var(--accent-soft); color: var(--text); } +.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-caption); font-weight: var(--weight-medium); line-height: var(--leading-ui); padding: 2.5px 9px; border-radius: var(--radius-pill); border: 1px solid transparent; font-family: var(--font-ui); letter-spacing: 0; } +.badge-accent { background: var(--accent-soft); color: var(--accent-blue-ink); } .badge-green { background: var(--green-soft); color: var(--green); } .badge-amber { background: var(--amber-soft); color: var(--amber); } .badge-muted { background: var(--raised); color: var(--muted); border: 1px solid var(--border); } @@ -762,7 +828,7 @@ a.btn, a.btn:hover { text-decoration: none; } font: inherit; font-size: var(--text-control); line-height: var(--leading-ui); transition: border-color var(--motion-fast); } .input::placeholder { color: var(--faint); } -.input:focus { border-color: var(--faint); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); } +.input:focus { border-color: var(--accent-blue); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); } textarea.input { resize: vertical; font-family: var(--font-code); line-height: var(--leading-relaxed); } .field-label { font-size: var(--text-label); color: var(--muted); font-weight: var(--weight-medium); margin-bottom: 5px; display: block; } select.input { appearance: none; } @@ -830,7 +896,7 @@ select.input { appearance: none; } /* Pointer hover alone — softer than keyboard focus so the two cues stay distinct. */ .select-option:hover:not(.select-option-active) { background: var(--hover); } /* Selected value (committed). */ -.select-option.active { background: var(--accent-soft); color: var(--accent); font-weight: var(--weight-semibold); } +.select-option.active { background: var(--accent-soft); color: var(--accent-blue-ink); font-weight: var(--weight-semibold); } /* Keyboard / aria-activedescendant focus — visible without relying on :hover. */ .select-option-active { background: var(--hover); @@ -910,14 +976,48 @@ select.input { appearance: none; } } .notice-err svg { color: var(--red); } -.h-section { font-size: var(--text-control); font-weight: var(--weight-semibold); line-height: var(--leading-ui); color: var(--text); margin: 30px 0 12px; display: flex; align-items: center; gap: 8px; } -.h-section .count { color: var(--muted); font-weight: var(--weight-medium); font-family: var(--font-code); font-size: var(--text-label); } +.h-section { font-size: var(--text-caption); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-caps); line-height: var(--leading-ui); color: var(--faint); margin: 30px 0 12px; display: flex; align-items: center; gap: 8px; } +.h-section .count { color: var(--muted); font-weight: var(--weight-medium); font-family: var(--font-code); font-size: var(--text-label); font-variant-numeric: tabular-nums; } -.spin { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: var(--radius-round); display: inline-block; animation: spin 0.7s linear infinite; } -@keyframes spin { to { transform: rotate(360deg); } } +/* design language bans spinners — the signature "ripple": a 2px bar that flows + left→right and back (the Stroom, from design-system worked-row). Under + reduced-motion the static bar remains, so activity is never lost. */ +.spin { position: relative; width: 18px; height: 10px; display: inline-block; flex-shrink: 0; vertical-align: middle; color: var(--accent-blue); } +.spin::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; border-radius: 1px; background: currentColor; animation: ocx-rippleflow 1.1s linear infinite; } +@keyframes ocx-rippleflow { + 0% { transform: scaleX(0.15); transform-origin: left; } + 45% { transform: scaleX(1); transform-origin: left; } + 46% { transform-origin: right; } + 100% { transform: scaleX(0.15); transform-origin: right; } +} @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } } +/* ============================================================================ + Motion system (design-system motion-spec.md). Bounded set, transform/opacity + only, one shared easing, everything settles early. The reduced-motion guard + above disables all of it with zero information loss. To extend: add a token + duration + a keyframe here; never animate width/height/top/left. + ============================================================================ */ + +/* Intent reveal — one calm rise per navigation (ErrorBoundary is keyed by page, + so its subtree remounts and replays this). Not per-card: a wall of staggered + items is theater. */ +/* keyed on the current page (App.tsx), so it re-creates and replays per nav */ +.page-reveal { animation: ocx-page-in var(--motion-slow) var(--ease-out) both; } +@keyframes ocx-page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } } + +/* Modal enter — scrim fades, card rises and settles. */ +@keyframes ocx-overlay-in { from { opacity: 0; } to { opacity: 1; } } +@keyframes ocx-modal-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } } + +/* Press-physics (Motion 4) — the same tactile scale on every pressable row, + tab, chip and option, matching .btn. Never on inputs, text or panels. */ +.nav-item, .page-tab, .select-option, .chip, .seg button, .usage-segmented-btn, .claude-tabs button { + transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), transform 100ms var(--ease-out); +} +.nav-item:active, .page-tab:active, .select-option:active, .chip:active, .seg button:active, .usage-segmented-btn:active, .claude-tabs button:active { transform: scale(0.98); } + /* glass fallbacks: solid surfaces when blur is unsupported or unwanted */ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .sidebar { background: var(--rail); } @@ -934,7 +1034,7 @@ select.input { appearance: none; } /* ---- modal ---- */ /* Liquid-glass modal: heavy tint + blur so background content is unreadable */ -.modal-overlay { position: fixed; inset: 0; background: light-dark(rgba(17, 19, 28, 0.78), rgba(0, 0, 0, 0.82)); backdrop-filter: blur(40px) saturate(1.2); -webkit-backdrop-filter: blur(40px) saturate(1.2); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: var(--z-modal); } +.modal-overlay { position: fixed; inset: 0; background: light-dark(rgba(20, 18, 16, 0.52), rgba(0, 0, 0, 0.62)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: var(--z-modal); animation: ocx-overlay-in var(--motion-fast) var(--ease-out); } /* Native .showModal() UA styles (solid border + ::backdrop) stack on top of .modal-overlay and produce a white frame + double dim. Reset when the dialog IS the overlay. */ dialog.modal-overlay { @@ -949,22 +1049,7 @@ dialog.modal-overlay { dialog.modal-overlay::backdrop { background: transparent; } -.modal-card { - position: relative; - z-index: 1; - background: color-mix(in oklab, canvas 92%, transparent); - backdrop-filter: blur(20px) saturate(1.4); - -webkit-backdrop-filter: blur(20px) saturate(1.4); - border: 1px solid var(--border); - border-radius: var(--radius-lg); - padding: 20px; - width: 100%; - max-width: 520px; - /* Tight elevation with border — avoid hairline + wide soft blur (AI tell). */ - box-shadow: var(--shadow-sm); - max-height: 84vh; - overflow-y: auto; -} +.modal-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: 84vh; overflow-y: auto; animation: ocx-modal-in var(--motion-normal) var(--ease-out); } .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .modal-head h3 { font-size: var(--text-subtitle); } @@ -1721,7 +1806,7 @@ button.prov-account-row.active { cursor: default; } } .usage-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; } -.usage-cards .stat-value { font-size: var(--text-title); font-weight: var(--weight-semibold); margin-top: 4px; } +.usage-cards .stat-value { font-size: var(--text-title); font-weight: var(--weight-semibold); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tight); } .usage-head { flex-wrap: wrap; } .usage-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; } .usage-segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; gap: 2px; background: var(--surface); } diff --git a/gui/src/styles/provider-overview-dashboard.css b/gui/src/styles/provider-overview-dashboard.css index ba11de9d0..9479c1dd6 100644 --- a/gui/src/styles/provider-overview-dashboard.css +++ b/gui/src/styles/provider-overview-dashboard.css @@ -53,19 +53,23 @@ } .pws-dashboard-card-count { - font-size: 1.25rem; - font-weight: 700; + font-size: var(--text-title); + font-weight: var(--weight-semibold); line-height: 1; + font-variant-numeric: tabular-nums; + letter-spacing: var(--tracking-tight); } -.pws-dashboard-card--ok .pws-dashboard-card-count { color: var(--green, #22c55e); } -.pws-dashboard-card--warn .pws-dashboard-card-count { color: var(--yellow, #eab308); } -.pws-dashboard-card--muted .pws-dashboard-card-count { color: var(--fg-muted, #888); } +.pws-dashboard-card--ok .pws-dashboard-card-count { color: var(--green); } +.pws-dashboard-card--warn .pws-dashboard-card-count { color: var(--amber); } +.pws-dashboard-card--muted .pws-dashboard-card-count { color: var(--faint); } .pws-dashboard-card-label { - font-size: 0.7rem; - color: var(--fg-muted, #888); - letter-spacing: 0.02em; + font-size: var(--text-micro); + color: var(--faint); + font-weight: var(--weight-semibold); + text-transform: uppercase; + letter-spacing: var(--tracking-caps); } /* Rate Limits | Recently Used side-by-side (no vertical stack / scroll) */