# Design reference extracted from the HTML

This document records source values, not a claim of browser or accessibility validation. Source locations below refer to CSS selectors and JavaScript symbols in the original HTML.

## Character

Arabic-first, RTL administrative workspace with deep green navigation, pale neutral page backgrounds, rounded white cards, thin borders, and soft shadows. Color distinguishes actions and review states. Outline icons and compact tables support a calm, information-focused interface. The login adds subtle notebook-style horizontal rules and a muted red vertical margin line.

## Color tokens

Extracted from `:root`, `@media (prefers-color-scheme:dark)`, and `:root[data-theme="dark"]`. The two dark declarations share the following values.

| Original variable | Purpose                           | Light     | Dark                  |
| ----------------- | --------------------------------- | --------- | --------------------- |
| `--ink`           | Primary text                      | `#14263A` | `#E7EDF2`             |
| `--ink2`          | Secondary text                    | `#3D5063` | `#BCC9D4`             |
| `--muted`         | Supporting text                   | `#66788A` | `#8FA1B1`             |
| `--bg`            | Page background                   | `#EEF2F4` | `#0F1A22`             |
| `--card`          | Card/control surface              | `#FFFFFF` | `#16252F`             |
| `--line`          | Border/divider                    | `#D9E0E6` | `#2A3B47`             |
| `--brand`         | Primary action/accent             | `#0D6B5E` | `#1E9E8B`             |
| `--brandd`        | Primary hover/table-header text   | `#094E44` | `#5FD0BE`             |
| `--brands`        | Soft brand surface                | `#E2F0ED` | `#17332F`             |
| `--side`          | Sidebar background                | `#0B3F38` | `#0A1F1C`             |
| `--onbrand`       | Primary button text               | `#FFFFFF` | `#FFFFFF` (inherited) |
| `--amber`         | Warning/pending accent            | `#B87A0B` | `#E5B04A`             |
| `--ambers`        | Warning surface                   | `#FBF1D9` | `#33280F`             |
| `--danger`        | Error/returned/destructive accent | `#B3402E` | `#EE8B78`             |
| `--dangers`       | Error surface                     | `#FBE6E1` | `#3A1D18`             |
| `--ok`            | Success/approved accent           | `#1B7A4D` | `#5FCB92`             |
| `--oks`           | Success surface                   | `#DDF1E6` | `#143325`             |
| `--gray`          | Neutral status text               | `#5B6B79` | `#A5B3BF`             |
| `--grays`         | Neutral/disabled surface          | `#E8ECEF` | `#22313C`             |

Source hard-coded colors must also become named configuration values during implementation:

| Context                          | Source values                                                                                   |
| -------------------------------- | ----------------------------------------------------------------------------------------------- |
| Sidebar text                     | Main `#E6F1EF`; identity `#FFFFFF`; secondary `#B7D3CE`; navigation `#CFE3DF`; footer `#8FB5AE` |
| Sidebar logo/switch              | White background, `#0B3F38` text; switch hover `#E3F1EE`                                        |
| Sidebar overlays                 | White alpha `.07` identity, `.08` hover, `.15` active, `.22` footer borders/tab count           |
| Navigation badge exception       | `#C98A12` when the root has no `data-theme` attribute                                           |
| Explicit dark primary hover text | `#06201C`                                                                                       |
| Dialog backdrop                  | `rgba(10,20,28,.55)`                                                                            |
| Drawer backdrop                  | `rgba(10,20,28,.5)`                                                                             |
| Print                            | White page, black text/borders, table headers `#DDE8D0`                                         |

## Typography

The source loads Google Fonts: IBM Plex Sans Arabic weights 400, 500, 600 and Noto Kufi Arabic weights 600, 700, using `display=swap`.

```css
/* body */
font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
font-size: 15px;
line-height: 1.7;

/* h1, h2, h3 */
font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
line-height: 1.4;
```

| Use                                   | Source size                                 |
| ------------------------------------- | ------------------------------------------- |
| Login headline                        | `clamp(24px, 4.4vw, 38px)`                  |
| Page heading                          | `25px`                                      |
| Role heading                          | `19px`                                      |
| Card heading / dialog heading         | `17px` / `18px`                             |
| Card-grid heading                     | `16px`                                      |
| KPI number                            | `30px`, Noto Kufi Arabic, line-height `1.2` |
| Login / sidebar brand                 | `22px` / `20px`, Noto Kufi Arabic           |
| Inputs, selects, textareas            | `16px` baseline                             |
| Tables / tabs / role descriptions     | `14px`                                      |
| Standard buttons / sidebar navigation | `14.5px`                                    |
| Labels / small buttons                | `13.5px`                                    |
| Supporting text                       | Usually `13px` or `13.5px`                  |
| Chips / small counters                | `12.5px` / `12px`                           |

Buttons and form fields inherit the body font. Some compact controls override the baseline input size through more specific rules. Heading and bold-element weight can come from browser defaults; the source does not set every weight explicitly.

## Geometry and layout

| Element / selector   | Source styling                                                                               |
| -------------------- | -------------------------------------------------------------------------------------------- |
| Shell `.shell`       | Grid `276px 1fr`; RTL places sidebar on the right                                            |
| Sidebar `.side`      | Sticky; viewport-height adjusted for zoom; padding `20px 14px`                               |
| Main `.content`      | Maximum width `1240px`; padding `28px 32px 56px`                                             |
| Login `.login-in`    | Maximum width `880px`; padding `40px`; radius `20px`                                         |
| Login roles `.roles` | Two equal columns; gap `16px`                                                                |
| Role card `.role`    | Padding `22px`; radius `16px`; border `1.5px`                                                |
| Card `.card`         | Padding `20px`; radius `14px`; border `1px`                                                  |
| KPIs `.kpis`         | Four equal columns; gap `14px`; item padding `16px 18px`                                     |
| Split content `.two` | Columns `1.2fr 1fr`; gap `18px`                                                              |
| Case editor `.cw`    | Columns `250px 1fr`; gap `18px`                                                              |
| Form `.grid2`        | Two equal columns; row/column gaps `14px 16px`; `.w2` spans both                             |
| Card grid `.cg`      | Auto-fill columns with minimum `270px`; gap `14px`                                           |
| Dialog `.dlg`        | Maximum width `700px`; small variant `480px`; radius `16px`; max-height `calc(100vh - 32px)` |

The source uses several nearby spacing values rather than a declared spacing scale. Centralize these as named settings; preserve recognizable desktop proportions when introducing responsive variants.

## Components and states

- **Buttons:** `.btn` uses brand fill, on-brand text, `1px` border, `10px` radius, `9px 16px` padding, and weight `600`. Hover uses `--brandd`. Ghost buttons use a transparent surface and brand text; destructive buttons use danger fill. Small buttons use `5px 11px` padding and `8px` radius.
- **Icon buttons:** `.ib` is `34px` square with `8px` radius; neutral or danger-tinted hover. Increase the interactive target to meet responsive requirements while retaining the icon's visual size.
- **Forms:** standard fields use card fill, `1.5px` line border, `10px` radius, and `8px 12px` padding. Focus uses a brand border and `0 0 0 3px var(--brands)` ring. Disabled fields use the neutral surface. Textareas resize vertically, normally from `80px` minimum height.
- **Chips:** pill radius `999px`, padding `1px 10px`, weight `500`, line-height `1.8`. Pair each status foreground with its corresponding soft surface and a readable label.
- **Tables:** `.tw` is a horizontally scrollable wrapper with `12px` radius and `1px` border. Cells use `10px 12px` padding; headers and row hover use soft brand fill. Action cells remain unwrapped; long summaries are clamped to two lines.
- **Navigation:** rounded `10px` rows, `10px 12px` padding, `12px` icon gap. Selected rows use a stronger translucent white fill, white text, and weight `600`.
- **Tabs:** horizontally scrollable pill buttons; active tabs use brand fill with on-brand text.
- **Progress:** `8px`-high rounded bars; neutral track, brand fill, amber variant.
- **Empty states:** `1.5px` dashed border, `12px` radius, `34px 20px` padding, centered message.
- **Dialogs:** separate header/body/footer; body scrolls. Header padding `16px 20px`, body `18px 20px`, footer `14px 20px`.
- **Toast:** centered near viewport bottom; ink fill, page-background text, pill radius, `10px 18px` padding; source timeout is `2200ms`.
- **Login motif:** horizontal rule every `44px` at opacity `.55`; `2px` danger-colored vertical rule at opacity `.35`.

## Shadows, motion, icons, and focus

```css
/* light --shadow */
0 1px 2px rgba(20,38,58,.06), 0 6px 20px rgba(20,38,58,.06)
/* dark --shadow */
0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3)
/* dialog */
0 20px 60px rgba(0,0,0,.35)
```

- Role hover transitions: `.15s`; drawer/toast transitions: `.2s`.
- Reduced-motion media query disables transitions.
- SVG helper `ic()` uses a `24 × 24` viewBox, no fill, `currentColor` stroke, stroke width `1.8`, and rounded line caps/joins. Default display size is `20px`; calls use other sizes such as 18, 19, 22, and 24px.
- Global visible focus: `3px` amber outline, `2px` offset, `6px` radius.
- Source layer values: topbar `20`, scrim `25`, sidebar `30`, zoom control `90`, modal `100`, toast `120`.

## Existing responsive and print behavior

The source viewport declares `width=1100`. JavaScript `fit()` scales `#app` with CSS `zoom`, maintains a minimum layout width of `1100px`, and exposes zoom controls below that width. Three responsive layout blocks use `max-width:0px`, so their intended collapse behavior is effectively disabled at ordinary viewport widths. A separate `max-width:640px` block targets dialog fields/details.

These are observed prototype behaviors. The application's required replacement behavior is defined in [responsive requirements](RESPONSIVE_REQUIREMENTS.md).

Print CSS hides navigation, filters, tabs, and transient UI; removes card shadows; prints full summaries and black table borders; and changes table headers to `#DDE8D0`. Preserve usable Arabic report output when implementing print styles.
