# DESIGN_SYSTEM.md — HATEM AUTO RENTAL

Status: **v1 (2026-11-30), implementation-level system for the approved Horizon H brand.**
**Brand authority: `BRAND_GUIDELINES.md`.** Designs: canvas (internal design workspace) (source in `design/horizon-h-canvas/`) and the partial Figma file (internal Figma file). See `DESIGN_DELIVERY_REPORT.md`. This file only turns that brand into UI tokens and component rules. If the two ever disagree, BRAND_GUIDELINES.md wins, and this file must be corrected.

Labels follow the brand file: ✅ confirmed · 🟡 proposed (use, but marked as a draft) · ⛔ missing (never invent).

## 1. Brand summary (see BRAND_GUIDELINES.md for full rules)

- **Logo:** Horizon H mark plus the two-line English-only lockup "HATEM / AUTO RENTAL" ✅. Use the standalone mark where space is limited ✅. Ivory pillars on every dark surface (dark mode, admin sidebar, footer) ✅. Minimum sizes 24 px mark / 72 px lockup box 🟡. Clear space 1.5 P 🟡.
- **Positioning:** premium, calm, automotive, clean; mobile first. Admin usability comes before decoration.
- **Favicon:** the H mark ✅ (never a car emoji).

## 2. Tokens

### 2.1 Brand colours ✅
| Token | Value | Use |
|---|---|---|
| `brand.teal` | `#0F5C63` | Primary: **all** buttons, links, selected states, focus ring (light) |
| `brand.copper` | `#B87333` | **Accent only**: logo arc, dividers, highlights, large headings (≥ 24 px, or ≥ 18.66 px bold), AUTO RENTAL on dark. **Never** small text on light, **never** white text on copper, **never** a button fill |
| `brand.sand` | `#E6D8C3` | Soft surfaces, chips, image placeholders |
| `brand.night` | `#0E1A1F` | Text; dark surfaces; admin sidebar |
| `brand.ivory` | `#F7F4EE` | Page background; reversed mark |
| `brand.white` | `#FFFFFF` | Cards; inputs |

### 2.2 Semantic tokens 🟡 (values from BRAND_GUIDELINES.md §3.2, WCAG 2.x checked)
| Token | Light | Dark |
|---|---|---|
| `bg.page` | Ivory `#F7F4EE` | Night `#0E1A1F` |
| `bg.card` | White | `#15262D` |
| `bg.soft` | Sand `#E6D8C3` | `#1D3138` 🟡 *(surface only, no text-contrast role)* |
| `text.primary` | Night | Ivory |
| `text.muted` | `#566165` | `#A9B6B9` |
| `text.onPrimary` | White (on teal 7.69:1) | White |
| `border.subtle` | `#E3DCCF` | `#26393F` |
| `border.control` | `#8A8276` | `#5F767C` |
| `focus.ring` | Teal, 2 px + 2 px offset | Ivory |
| `status.success` | `#2E7A4D` on `#E6F2EB` | `#6CC08F` |
| `status.warning` | `#7A4E0A` on `#FBF0DC` | `#E3B463` |
| `status.error` | `#B3382C` on `#FBEAE7` | `#F08C80` |
| `status.info` | Teal on `#E3EFEF` | `#8FC9CE` |

Every status is shown as **icon + word + colour**, never colour alone.

### 2.3 Rental Request status → token mapping (labels from DATABASE_AND_WORKFLOW_PROPOSAL.md §1.1)
| Status (DB) | Label EN / AR | Token |
|---|---|---|
| `submitted` | Submitted / تم الإرسال | info |
| `in_review` | In review / قيد المراجعة | info |
| `awaiting_customer` | Awaiting customer / بانتظار ردّ العميل | warning |
| `approved` | **Confirmed** / مؤكَّد | success |
| `completed` | Completed / مكتمل | neutral (muted) |
| `declined` | Declined / مرفوض | error |
| `cancelled` | Cancelled / ملغى | neutral (muted) |
| `expired` | Expired / منتهي الصلاحية | neutral (muted) |

### 2.4 Shape, space, layout
| Token | Value |
|---|---|
| `radius.sm / md / lg` | 8 (inputs, chips) / 10 (buttons) / 16 (cards, dialogs) |
| `space` | 4-px scale: 4, 8, 12, 16, 24, 32, 48, 64 |
| `container` | 1200 px max; gutters 16 (mobile) / 24 (tablet) / 32 (desktop) |
| `breakpoints` | mobile 375 · tablet 768 · desktop 1280 (design widths) |
| `touch target` | ≥ 44 × 44 px |
| `shadow.card` | `0 1px 2px rgba(14,26,31,.06), 0 4px 16px rgba(14,26,31,.06)` 🟡 |

## 3. Typography ✅ (scale 🟡)
- English headings and "HATEM": **Fraunces** 600. English body, UI and "AUTO RENTAL": **Manrope** 400/600/700.
- All Arabic: **Tajawal** 400/500/700, headings and body.
- Digits: Western **0–9** everywhere, EN and AR. Numbers, prices, dates, phones and references stay LTR inside RTL text (`<bdi>` / `dir="ltr"`).
- Scale 🟡 (EN / AR, Arabic one step larger): display 56/64 · h1 40/44 · h2 30/34 · h3 22/24 · body 16/17 · small 14/15 · caption 12/13 (caption is never smaller than 12 px; admin tables use 14 px). Line height: EN body 1.55; AR body 1.75. No letter-spacing or uppercase in Arabic.
- Self-host fonts (subset, `font-display: swap`).

## 4. RTL rules
- Logical properties only (`margin-inline-start`, `inset-inline-end`, `text-align: start`).
- Arabic layouts are **composed** for RTL, not just mirrored: check reading order, label lengths, number alignment and icon direction per screen.
- Directional icons (arrows, chevrons, back) flip. Non-directional icons (phone, car, check, WhatsApp) don't.
- Calendars: weekday order and the date grid follow the locale; times and dates use Western digits.
- Test every screen in both directions.

## 5. Components
Button (primary teal / secondary outline / ghost / destructive; loading, disabled) · Input · Textarea · Select · DateTimeRange · Checkbox · Radio · Chip / FilterChip · StatusBadge (§2.3) · VehicleCard · CompareTray (2–3 vehicles) · Stepper · Dialog · Drawer (mobile filters) · Toast (`aria-live`) · Tabs · DataTable (responsive: cards on mobile) · AvailabilityCalendar (month / week; blocks are approved requests only) · EmptyState · ErrorState · Skeleton · WhatsAppReplyCard (AR/EN template) · LanguageSwitch · Logo (lockup / mark; light / dark).

## 6. Still missing (⛔, never invent)
Logo source files (SVG export of the Brand tab) · vehicle photography and its direction · icon set choice · motion principles · diagonal pillar pattern · tone of voice · brand mockups. Real prices, policies, phone numbers and vehicles come from the owner only.

---

## Superseded (kept for history, do not use)

**Shield / blue-silver direction, 2026-11-30, retired the same day.** An earlier version of this file was "ON HOLD" pending an "original HATEM shield logo" and a "blue and silver" identity, and it called the teal/copper palette "reference only, NOT the brand". The owner then confirmed Horizon H (teal/copper) as the final brand. The blue/silver canvas and DESIGN_PHASE_PLAN.md are historical only. The full previous text is in `backup/docs-20261130-1056/DESIGN_SYSTEM.md`.

**Prototype contrast finding, still valid:** copper is 3.79:1 on white and 3.45:1 on ivory, so the prototype's copper "Book now" / "Search" buttons with white 15 px text fail WCAG AA. That is why copper is accent-only and all buttons are teal.
