# RAMA AG — Black Titanium Design System (Light Edition)

> **BLACK TITANIUM DOES NOT MEAN FULL DARK MODE.**
> The official default theme is **Light Workspace + Black Titanium Sidebar**. All future modules must follow this rule.

Status: **OFFICIAL (owner correction of 27.11.2026).** It replaces the earlier full-dark implementation of rc1–rc3. The approved direction is "Black Titanium Light Edition: Apple × Linear × Swiss Minimalism". The company is **RAMA AG — Gipser und Maler**.

## 1. Where dark is allowed

Black Titanium dark backgrounds are used **only** for:
- the main navigation sidebar, and its active item;
- primary action buttons;
- selected branded headers (for example the active segment of a segmented control);
- the sign-in page and the first-login password page (approved composition, `login-titanium.css`).

Everything else is a **light surface**:
- the dashboard workspace, KPI cards, data tables, charts, forms and inputs;
- the calendar, employee directory and profiles, report pages and all SMGV modules;
- settings, modals, drawers, dropdown menus and notifications.

## 2. Tokens

Single source: `resources/css/black-titanium.css` (`:root`) and the Tailwind `@theme` in `resources/css/app.css`.

| Role | Token | Value |
| --- | --- | --- |
| Sidebar | `--bt-sidebar`, `--color-sidebar` | **#111214** |
| Sidebar active item | `--bt-sidebar-active` | **#303338** |
| Main application background | `--bt-app`, `--color-workspace` | **#F0F1F3** |
| Cards, panels, tables, topbar, modals, drawers, inputs | `--bt-card`, `--color-card` | **#FFFFFF** |
| Primary text | `--bt-text`, `--color-foreground` | **#111214** |
| Secondary text | `--bt-text-2`, `--color-muted-foreground` | **#717680** (owner token). Rendered as **#686D76** so it reaches WCAG AA 4.5:1 on the #F0F1F3 workspace |
| Borders | `--bt-border`, `--color-border` | **#E2E4E8** |
| Titanium accent | `--bt-accent`, `--color-ring` | **#A8ADB5** |
| Primary buttons | `--bt-button` / `--bt-button-text`, `--color-primary` | **#111214** / **#FFFFFF** |
| Hover backgrounds | `--bt-hover`, `--color-accent` | **#E9EAED** |

Status colours, always paired with an icon or text and never shown alone:
- success #0F7552 on #ECF8F2;
- warning #9A5107 on #FDF4E6;
- error #C4321C on #FFF2F0.

## 3. Rules for every module

1. **Matte surfaces.** No metallic or decorative gradients on buttons, cards, segmented controls or inputs. Use flat fills, 1 px #E2E4E8 borders and very soft shadows.
2. **Use the tokens and components.** Use the Tailwind theme classes (`bg-card`, `text-foreground`, `text-muted-foreground`, `border-border`, `bg-primary`) or the `bt-*` components. Never hard-code a dark background in a view.
3. **Charts** use Titanium Silver (#A8ADB5), Graphite (#35383D) and Black (#111214).
4. **Maps** use the light OpenStreetMap tiles (same provider; a slight desaturation only, never inverted).
5. **Text contrast** must be at least WCAG AA: 4.5:1 for normal text and 3:1 for large text, on the surface where the text actually sits.
6. **Focus.** The focus ring is visible (2 px #111214). Touch targets are 40 px or more on mobile. Motion runs 150–250 ms and is disabled under `prefers-reduced-motion`.
7. **CSP.** No inline `<script>`: the pre-paint sidebar state lives in `public/js/sidebar-state.js`.

## 4. Components (`bt-*`)

- **Layout:** page scaffolding, sub-navigation.
- **Surfaces:** cards and KPI cards (white).
- **Buttons:** primary (black), ghost, danger, icon and small.
- **Form controls (white):** inputs, selects, textarea, checkbox and radio choices, chips.
- **Feedback:** badges, alerts (light tints), empty states, avatar, progress, spinner, skeleton.
- **Data:**
  - tables with a sticky light header;
  - description lists and timeline;
  - the SMGV spreadsheet (light grid, grey weekends, holiday tint);
  - holiday grid (black when selected), closing board, SVG line chart (black line), dropzone.

Blade components: `x-bt.status`, `x-bt.draft-banner`, `x-bt.period-picker`.

## 5. Implementation of the correction (27.11.2026)

- **Legacy stylesheets.** The legacy stylesheets differed from their light originals only in colour (verified mechanically), so the light originals were restored. Their blue palette was then remapped to titanium:
  - strong blues become black #111214;
  - blue tints become neutral tints of the same luminance;
  - status colours are kept;
  - 38 decorative gradients were flattened;
  - mid-grey text was raised to AA.
- **Tailwind tokens and `bt-*` tokens** were switched to the light palette above. The dark overrides of legacy utilities (`.bg-white` → dark, and so on) were removed, and the map tile inversion was removed.
- **Sidebar.** It keeps its dark styles in a scoped block: #111214, active #303338, texts #A8ADB5 / #FFFFFF.

## 6. Verified

The `:3401` browser audit passed **370/370** checks. It covered 21 administrator routes and 7 employee routes, each at desktop 1440×900, tablet (iPad) and mobile (iPhone 13), and checked that:
- the page returned 200 (or 403 where the role has no access);
- no large dark area exists outside the sidebar, buttons and modal scrims;
- all visible text meets WCAG AA;
- the sidebar is dark and the workspace light;
- there is no horizontal overflow and no console errors.

Screenshots are in `phase02b-evidence/light-theme/screens`.
