# Phase 14 — Design System, App Shell, and Login ## What exists From Phases 7–13 (workstation UI): - Teal primary palette + Public Sans in [`vigilcare-records-web/tailwind.config.js`](../../vigilcare-records-web/tailwind.config.js) - Global utilities in [`vigilcare-records-web/src/assets/main.css`](../../vigilcare-records-web/src/assets/main.css) - Top horizontal nav in [`AppHeader.vue`](../../vigilcare-records-web/src/components/AppHeader.vue) — each view embeds `` - Centered card login in [`LoginView.vue`](../../vigilcare-records-web/src/views/LoginView.vue) — username/password only (no role picker) - Role flags and default routes in [`stores/auth.ts`](../../vigilcare-records-web/src/stores/auth.ts) (`canIntake`, `canEntry`, `canVerify`, `canApprove`, `canLiveCapture`, `canSupervise`) - Routes in [`router/index.ts`](../../vigilcare-records-web/src/router/index.ts) Design reference: [design-doc.md](../designs/design-doc.md) §§1–10, §35 (sidebar labels for **existing** routes only), §36 (login corrections). ## What needs to be built Establish the visual foundation and application chrome so later phases only restyle content areas. **Keep Public Sans** (do not switch to Inter). Adopt the navy/blue token set from the design doc. Replace header-only navigation with a role-filtered left sidebar shell. Redesign login as a split brand + form layout without inventing auth features. Do not start Phase 15 until tokens, shell, and login meet the success criteria below. --- ## Step 1 — Design tokens in Tailwind + CSS **[`tailwind.config.js`](../../vigilcare-records-web/tailwind.config.js)** — replace/extend `primary` and `clinical` to match design-doc §3: | Token | Hex | Use | |---|---|---| | Navy / sidebar | `#08254A` | Sidebar, logo backdrop | | Primary blue | `#155EEF` | CTA, selected nav, links, focus | | Primary blue hover | `#0B4FD6` | Hover | | Soft blue | `#EEF4FF` | Selected rows, info panels | | Page background | `#F7F9FC` | App canvas | | Surface | `#FFFFFF` | Cards / panels | | Strong / body / secondary / disabled text | `#101828` / `#344054` / `#667085` / `#98A2B3` | Typography | | Border / strong border | `#E4E7EC` / `#D0D5DD` | Dividers | | Success / warning / error | per design-doc §3 Semantic | Status + clinical | Keep `fontFamily.sans` as Public Sans. **[`main.css`](../../vigilcare-records-web/src/assets/main.css)** — map existing utility classes (`.btn-primary`, `.form-input`, `.card`, `.status-badge`, `.app-header`, `.nav-link`, `.split-pane`) onto the new tokens so legacy class names still work during migration. Add CSS variables if helpful for non-Tailwind consumers: ```css :root { --vc-navy: #08254A; --vc-primary: #155EEF; --vc-primary-hover: #0B4FD6; --vc-bg: #F7F9FC; --vc-surface: #FFFFFF; /* … */ } ``` Radius: inputs/buttons ~6–8px; cards ~8–12px (design-doc §6). Shadows: minimal (design-doc §7). --- ## Step 2 — `AppShell.vue` + page chrome Create [`vigilcare-records-web/src/components/AppShell.vue`](../../vigilcare-records-web/src/components/AppShell.vue): - Left sidebar (~240px, collapsible to icon rail): navy background, VigilCare Records logo, nav sections - Main column: optional thin top bar (page title slot, user name, Sign Out) + `` for page content - Login route must **not** use the shell **Sidebar items — only existing routes**, filtered by auth flags: | Label | Route | Flag | |---|---|---| | Intake | `/intake` | `canIntake` | | Cover Sheets | `/cover-sheets` | `canIntake` | | Data Entry | `/entry` | `canEntry` | | Verification | `/verification` | `canVerify` | | Clinical Approval | `/approval` | `canApprove` | | Live Capture | `/live-capture` | `canLiveCapture` | | Patient History | `/patients` | authenticated | | Queue Dashboard | `/dashboard` | `canSupervise` | | FHIR Explorer | `/fhir-explorer` | `canSupervise` | Optional “Dashboard” label: for administrators, Queue Dashboard is the home; do **not** add empty Supervision/Admin destinations (Users lands in Phase 18). Selected item: soft blue / primary treatment per design-doc §8. Collapse control at sidebar bottom. **Migrate views:** either wrap each authenticated view in `` or introduce a layout route. Prefer a single authenticated layout so `AppHeader` can shrink to a title/actions bar or be removed. Update [`AppHeader.vue`](../../vigilcare-records-web/src/components/AppHeader.vue) to stop duplicating nav links (title + actions only), or delete nav from it once shell owns navigation. Update router/tests that assert on header nav links ([`__tests__/router/guards.test.ts`](../../vigilcare-records-web/src/__tests__/router/guards.test.ts) and view tests) as needed. --- ## Step 3 — Login redesign **[`LoginView.vue`](../../vigilcare-records-web/src/views/LoginView.vue)** — two-column desktop layout (design-doc §10): - **Left (~45%):** navy brand panel — logo, headline “Digitize. Verify. Trust.”, short subtext. Restrained illustration optional; avoid marketing feature clutter. - **Right:** centered auth card (≈420–460px) — username, password, Sign In. Keep existing `auth.login` flow. **Must not include:** role selector, SSO button, forgot-password (unless those APIs exist — they do not). Mobile: stack brand above form or show form-only. --- ## Step 4 — Naming consistency in chrome Use these labels everywhere in shell/header (design-doc §36): - **Data Entry** (not “Entry”) - **Clinical Approval** (not “Approvals”) - **Queue Dashboard** (supervisor overview) --- ## Success criteria - [ ] Tailwind/CSS tokens match design-doc primary/neutral/semantic hex values; Public Sans unchanged - [ ] Authenticated pages render navy left sidebar; nav filtered by role; no dead links - [ ] Login is split layout; no role selector; existing seeded users still sign in - [ ] Existing Vitest suites pass (`cd vigilcare-records-web && npm test`) after test updates for shell/nav - [ ] Visual: white/gray surfaces, blue primary CTA, no purple SaaS gradient aesthetic ## Out of scope - Supervision nav (Workload, Reports, Master Data, Configuration, Audit Logs) - Users admin page (Phase 18) - Workstation density / sticky actions (Phase 15–16) - Restyling Intake/Entry forms beyond inheriting new button/input tokens ## Verification 1. `cd vigilcare-records-web && npm test` 2. Manual: log in as `intake1`, `entry1`, `verifier1`, `approver1` (or seed equivalents), `clinician1`, admin — confirm sidebar items match role and default landing routes still work 3. Manual: login page at desktop width shows brand + form; no role dropdown ## Gate Do not start [Phase 15](./phase-15-plan.md) until success criteria above are met.