Design System & UI Architecture
| Field | Value |
|---|---|
| Document ID | DA-DES-001 |
| Pillar | Design |
| Standard Alignment | WCAG 2.1 AA |
| Status | Active / Synchronized with Codebase |
| Last Updated | 2026-11-21 |
| Source of Truth | app/dashboard_static/index.html, app/dashboard_static/dashboard-brand.css, app/dashboard_static/dashboard.css, app/dashboard_static/interface.css, app/dashboard_static/mobile-tickets.css, app/dashboard_static/tickets.css, app/dashboard_static/analytics.css, app/dashboard_static/ai-config.css, app/dashboard_static/knowledge-base.css, app/dashboard_static/knowledge-search.css, app/dashboard_static/management.css, app/dashboard_static/documents-admin.css, app/dashboard_static/admin-duty.css, app/dashboard_static/broadcasts.css, app/dashboard_static/dashboard.js, app/dashboard_static/mobile-navigation.js, app/dashboard_static/ticket-ux.js, app/dashboard_static/icons.svg, docs/brand-redesign.md, docs/mobile-ticket-ux.md |
1. Visual Identity & Design Philosophy
Section titled “1. Visual Identity & Design Philosophy”The Dirman Assist management dashboard uses a zero-build, vanilla HTML/CSS/JS interface styled around the P3MDI Sudirman crest (app/dashboard_static/p3md-crest.png) and the Indonesian motto “Berani membantu. Cepat menanggapi. — Semangat Sudirman, dalam setiap layanan.”
Key design principles enforced by code and Content Security Policy (CSP):
- Zero External Assets: All fonts (
Manrope-Variable.ttf), icons (icons.svg), crest imagery (p3md-crest.png), and illustrations (support-illustration.svg) are self-hosted under/assets/. No external CDNs, icon kits, or third-party charting packages are permitted. - Crest-Anchored Hierarchy: Deep navy (
#031e39) anchors navigation and authentication surfaces; warm paper (#f4f3ee) and ivory (#fbf8ef) form the administrative workspace; muted gold (#dab36b) denotes active navigation, focus rings, and accent lines; crimson (#a41213) signals urgency and destructive boundaries. - Zero Fabricated Metrics: Every KPI card, SVG trend chart, status ring, heatmap, and knowledge graph displays real PostgreSQL counts with explicit WIB timestamps, sample counts, and accessible
<details>data tables.
Stylesheet Cascade Order
Section titled “Stylesheet Cascade Order”app/dashboard_static/index.html loads 13 modular CSS stylesheets in strict specificity order:
dashboard.css— Base structural layout, grid shells, base typography, forms, dialogsdashboard-brand.css— P3MDI Sudirman color tokens,Manrope@font-face, branded login/sidebar/overview/chart stylingmanagement.css— Split-panePercakapan & kasusinbox, CRM strip, media lightbox, internal notes, canned response bartickets.css— Ticket filter toolbar, bulk action bar, Kanban 4-lane board, timeline listai-config.css— AI quota progress cards, 7-day stacked usage bars, prompt section editorknowledge-search.css— Retrieval test form, diagnostic badges, saved checks accordiondocuments-admin.css— PDF cards, upload progress bar, collapsible page preview, section accordionsanalytics.css— Operational KPI grid, flow bar chart, 7-day forecast band, 7×24 WIB heatmapmobile-tickets.css— Unified ticket status vocabulary tokens, sticky mobile header, bottom shortcut bar, modal menu drawer, list-first mobile cardsknowledge-base.css— Unified KB subpage collection cards, overlap comparison split view, wide 2-column knowledge editorbroadcasts.css— Opt-in campaign cards, recipient consent list, preview blockadmin-duty.css— Duty toggle panel, admin roster rows, delivery history, topbar duty status pillinterface.css— Final unified control surface overrides (.text-button,.primary,.secondary,.danger,.subpage-nav, mobile header/bottom nav states)
2. Color System & Design Tokens
Section titled “2. Color System & Design Tokens”2.1 Brand & Surface Tokens (dashboard-brand.css)
Section titled “2.1 Brand & Surface Tokens (dashboard-brand.css)”| Token | Value | Role | Usage |
|---|---|---|---|
--navy |
#031e39 |
Primary Brand | Sidebar background, login brand panel, primary buttons, active toast background |
--navy-raised |
#0d2e4a |
Elevated Navy | Primary text-button color, trend chart stroke |
--gold |
#dab36b |
Brand Accent | Active sidebar item fill, keyboard :focus-visible outline, crest border, chart fill gradient |
--gold-light |
#f3e4c2 |
Soft Gold | Account avatar background (#account-avatar) |
--gold-ink |
#79571e |
Accessible Gold Text | Dialog kickers, help notes, hover accents on light surfaces |
--red / --rust |
#a41213 |
Crimson Alert | Login left accent bar, crest plate backdrop, error borders, urgent metric icon |
--paper |
#f4f3ee |
Workspace Canvas | Main workspace background, period selector track, secondary containers |
--ivory |
#fbf8ef |
Warm Surface | Login panel, dialog headers, checkboxes, help notes |
--ink |
#132f47 |
Primary Text | Body copy, headings, form inputs, icon buttons |
--muted |
#64717b |
Secondary Text | Subheadings, table headers, timestamps, captions (AA contrast on light surfaces) |
--line |
#e2e5e7 |
Hairline Border | Card borders, table dividers, toolbar separators |
--pale |
#edf2f6 |
Soft Tint | Subtle background surface |
--teal |
#153e5a |
Deep Slate Blue | Focus ring tint (#153e5a0a) |
2.2 Unified Ticket Status Vocabulary (mobile-tickets.css)
Section titled “2.2 Unified Ticket Status Vocabulary (mobile-tickets.css)”Color is always paired with Indonesian status text and an icon from icons.svg across table badges, mobile list cards, Kanban lane headers, ticket detail drafts, and the overview status ring:
| Status | Foreground Token | Background Token | Border | Icon (icons.svg) |
Meaning |
|---|---|---|---|---|---|
open (Terbuka) |
--ticket-open: #97560b |
--ticket-open-bg: #fff1d6 |
#e8cc93 |
#ticket |
Newly received or awaiting handling |
in_progress (Ditangani) |
--ticket-progress: #1d58a1 |
--ticket-progress-bg: #e9f1ff |
#b8cdee |
#clock |
Under investigation or follow-up |
resolved (Selesai) |
--ticket-resolved: #176349 |
--ticket-resolved-bg: #e5f5ed |
#afd9c4 |
#check |
Handling complete; reviewable |
closed (Ditutup) |
--ticket-closed: #63517d |
--ticket-closed-bg: #eee9f6 |
#d1c5e1 |
#shield |
Case ended and inactive |
2.3 Semantic Badges, Charts & Knowledge Graph Tokens
Section titled “2.3 Semantic Badges, Charts & Knowledge Graph Tokens”- System / Status Badges (
dashboard-brand.css):.badge.good: background#e8f2ec, text#286048.badge.warn: background#fbf0d8, text#805c21.badge.bad: background#fbecea, text#962d26.badge.media(management.css): background#e4eef6, text#12456b
- Analytics Charts (
analytics.css):- Ticket flow bars:
.insights-bar-in(#123b59),.insights-bar-out(#c69a49) - 7-day forecast:
.insights-forecast-line(#a87f32, dashed7 5),.insights-forecast-band(#dab36bat20%opacity) - 7×24 WIB demand heatmap:
level-0(#f0eee8),level-1(#f1dfb7),level-2(#ddba77),level-3(#b3873b),level-4(#734f1c)
- Ticket flow bars:
- AI Usage Charts (
ai-config.css):--seriessequence:#163d67(series 0),#a97524(series 1),#246753(series 2)
- Knowledge Graph Radial Nodes (
knowledge-graph.js):verified:#267355,partial:#a57824,gap:#b33c3c,published:#244a68,review:#8b626d
3. Typography, Iconography & Brand Assets
Section titled “3. Typography, Iconography & Brand Assets”Typography
Section titled “Typography”- Font Family: Self-hosted
Manrope(app/dashboard_static/fonts/Manrope-Variable.ttf, weights200–800,font-display: swap), licensed under SIL Open Font License 1.1 (fonts/OFL.txt), with fallback'Segoe UI', sans-serif. Preloaded inindex.html. - Scale & Metrics:
- Body text:
14px,line-height: 1.65,font-synthesis: none. h1headings:font-weight: 800,letter-spacing: -1.2px(27px–46pxacross viewports).h2headings:font-weight: 800,letter-spacing: -0.4px.- Numeric displays (
.metric-value,.handoff-clock,.ai-usage-metric strong,.insights-metric strong):font-variant-numeric: tabular-nums. - Prompt previews & test output:
12px/1.8 ui-monospace, Consolas, monospace.
- Body text:
Iconography & Assets
Section titled “Iconography & Assets”- SVG Icon Sprite (
icons.svg): 16 stroke-based24×24symbols (stroke-width: 1.7,stroke-linecap: round,stroke-linejoin: round) rendered via<svg class="icon" aria-hidden="true" focusable="false"><use href="/assets/icons.svg#<id>"/></svg>:overview,book,ticket,users,spark,check,arrow,refresh,search,shield,app,calendar,assignment,announcement,clock,logout. - P3MDI Crest (
p3md-crest.png): Original1024×1280organizational emblem cropped cleanly via CSS (clip-path: inset(3.8% 3.2% 1.5% 3.2%)) inside.crest-plateon the login brand pane (rotate(-4deg)on desktop, straightening on hover) and shown cleanly in the sidebar and mobile header. - Support Illustration (
support-illustration.svg): Custom400×300vector emblem combining a nested shield, chat bubble with checkmark, seven-pointed/multi-pointed star, and wing motifs (#DAB36B,#0B2C46,#A41213) used subtly (opacity: 0.13) in the login backdrop and in the overview banner.
4. Layout Architecture & Responsive Shell
Section titled “4. Layout Architecture & Responsive Shell”4.1 Desktop Shell (> 768px)
Section titled “4.1 Desktop Shell (> 768px)”flowchart LR
Sidebar["Fixed/Sticky Left Sidebar (242px / 210px <=1200px)"] --> Workspace["Main Workspace Column (Paper #f4f3ee)"]
Workspace --> Topbar["Topbar (Duty Shortcut, Avatar, Account Name, Password, Logout)"]
Workspace --> Main["#workspace-main (max-width: 1540px)"]
Workspace --> Footer["Footer (Dirman Assist shield mark)"]
- 10 Sidebar Navigation Destinations:
overview— Ringkasan (default HTML)analytics— Analitik & perencanaan (analytics.js)knowledge— Knowledge Base (default HTML; integratesKoleksi,Peta Pengetahuan,Perlu Ditinjau,Uji Jawaban,Kiriman WhatsApp, plus PDF management)tickets— Tiket bantuan (default HTML)cases— Percakapan & kasus (management.js)members— Anggota & akses (default HTML)admins— Akun administrator (documents-admin.js)duty— Petugas piket (admin-duty.js)broadcasts— Broadcasts (broadcasts.js)ai— Konfigurasi AI (ai-config.js)
4.2 Mobile Navigation & Ticket UX (<= 768px)
Section titled “4.2 Mobile Navigation & Ticket UX (<= 768px)”At viewport widths <= 768px, mobile-navigation.js and mobile-tickets.css transform the shell without altering backend state (docs/mobile-ticket-ux.md):
- Desktop Chrome Hidden:
.app-shell > .sidebarand.workspace > .topbarare hidden. - Sticky Compact Header (
.mobile-app-header):68pxmin-height navy header showing the crest,"Dirman Assist", current view subtitle, and aMenutrigger button (aria-haspopup="dialog",aria-controls="mobile-menu"). - Fixed Bottom Shortcut Bar (
.mobile-bottom-nav): 4 equal columns withenv(safe-area-inset-bottom)padding:Beranda(overview)Tiket(tickets)Percakapan(cases)Lainnya(opens#mobile-menumodal drawer; highlights active state whenever the active view is outside the 3 primary shortcuts).
- Modal Navigation Drawer (
#mobile-menu): Native<dialog>(width: min(360px, calc(100% - 28px)),height: 100dvh, right-aligned slide-in) cloning all 10 sidebar destinations witharia-current="page"on the current view, plus account controls (Status piket saya,Ganti kata sandi,Keluar dari dashboard). - Workspace Bottom Offset:
.workspacereservespadding-bottom: calc(80px + env(safe-area-inset-bottom)); notification toasts and mobile bulk-ticket bars sit above the bottom navigation bar (bottom: calc(88px + env(safe-area-inset-bottom))/calc(78px + env(safe-area-inset-bottom))).
4.3 View-Specific Layout Patterns
Section titled “4.3 View-Specific Layout Patterns”- Overview (
#overview-view): 4 clickable KPI cards (.metric-row), responsive 2-column.analytics-grid(7/30-day SVG area+line trend chart with<input type="range">scrubber and<details>table + donut SVG status ring), 5-column.knowledge-coveragecategory grid, and 2-column service readiness + audit timeline. - Tickets (
ticket-ux.js,tickets.js): Defaults to Daftar (stacked cards with status badge, priority, requester, assignee, due status, and 1-click next-status transition button) on narrow/default sessions and supports Tabel and Kanban (4-column horizontal-snap lanes with drag-and-drop on desktop and accessible<select>fallback on touch). Collapsible Filter lanjutan, status tab strip (Semua,Terbuka,Ditangani,Selesai,Ditutup), and sticky bulk toolbar (max 50 tickets). - Split-Pane Conversations (
management.css/management.js): 2-column grid (minmax(235px, 1fr) minmax(0, 2.15fr)) on desktop (height: min(860px, calc(100dvh - 180px))). On<= 768px, toggles.chat-selectedto switch cleanly between the conversation list and full-height thread view with aKembali ke daftarback button. Includes#media-lightbox<dialog>for zooming and downloading received WhatsApp screenshots. - Unified Knowledge Editor (
.knowledge-editor): Expands#editor-dialogtomin(1200px, calc(100vw - 48px))using a 2-column split (.knowledge-editor-informationsidebar metadata +.knowledge-editor-contentprimary editor textarea or PDF sections/preview), collapsing to 1 column at<= 800px. - Interactive Knowledge Graph (
knowledge-graph.js): Topic dropdown selector, live search filter, radial SVG network (viewBox="0 0 560 440", max 24 leaf nodes per topic for legibility), paired with a complete accessible item list and node inspection panel (enter/spacekeyboard activatable). - Operational Analytics (
analytics.js): 4 subpages (Ringkasan,Operasional,Proyeksi,Kualitas AI), dual-bar SVG demand/completion chart, 7-day dashed forecast + error band polygon, interactive 7×24 WIB demand heatmap grid (<button>cells with focus/hover/click inspection), capacity simulator (input[type=number]), and formula-injection-safe UTF-8 BOM CSV export.
5. Accessibility (WCAG 2.1 AA) & Motion Governance
Section titled “5. Accessibility (WCAG 2.1 AA) & Motion Governance”Accessibility Controls Implemented
Section titled “Accessibility Controls Implemented”- Keyboard Navigation & Focus Visibility:
- Explicit
outline: 3px solid var(--gold)(#af812cininterface.css) withoutline-offset: 3px/4pxon all interactive controls (button,a,input,textarea,select,summary). keyboard-modetracking indashboard.jsactivates immediately onkeydownand suppresses distracting reveal animations for keyboard navigators.- All SVG charts and heatmap cells expose
role="img"/role="button",aria-label,tabindex="0", and keyboard triggers (Enter/Spaceon graph nodes; arrow-key range scrubber on the overview trend chart) alongside full HTML data tables inside<details>. - Mobile navigation drawer (
#mobile-menu) captures focus on#mobile-menu-closeupon opening, closes onEscape(cancelevent) or outside backdrop click, and restores focus to#mobile-menu-button(menuTrigger).
- Explicit
- Screen Reader Live Regions & Semantics:
- Form/action errors use
role="alert"; toast messages, search counts, draft status previews, session checks, and chart scrubbers userole="status"oraria-live="polite". - Subpage tabs (
subpageNav), period selectors, and status chips usearia-pressed="true|false"oraria-current="page".
- Form/action errors use
- Touch Targets & Viewport Fit:
- Primary buttons, filters, nav items, and chips maintain
min-height: 40px–48px(>= 44pxenforced atmax-width: 768pxininterface.css). - Browser checks verify zero horizontal overflow (
document.documentElement.scrollWidth <= innerWidth) across360px,390px,768px, and1440pxviewports.
- Primary buttons, filters, nav items, and chips maintain
- Safe DOM Construction (XSS Prevention):
- Frontend JavaScript creates elements strictly via
el(tag, text, cls)(textContent) andsvgNode(tag, attrs, text), neverinnerHTML.
- Frontend JavaScript creates elements strictly via
Motion & Reduced-Motion Policy
Section titled “Motion & Reduced-Motion Policy”- Timing Tokens:
--ease-out: cubic-bezier(.23,1,.32,1)and--ease-in-out: cubic-bezier(.77,0,.175,1)with short durations (140ms–260msfor fades,240msfor mobile drawer entry,600mshighlight pulse on.ticket-updated). - No Infinite Ambient Motion: Continuous animations exist only for active loading spinners (
.primary:disabled::after,.refresh-button.is-loading .icon,.empty-state.loading > .icon). prefers-reduced-motion: reduce: Explicitly disablesreveal()Web Animations, crest tilt (transform: none), emblem/dialog entrance animations, toast slide transforms, button active scales, and loading spinners, retaining only quick100msopacity/color transitions.
6. Related Documentation
Section titled “6. Related Documentation”- ARCHITECTURE.md — Backend services and container boundaries serving the dashboard.
- API_AND_INTERFACES.md — Exact
/manage/api/*endpoints consumed by the frontend. - brand-redesign.md — Visual refresh rollout and browser verification summary.
- mobile-ticket-ux.md — Mobile navigation drawer and ticket card UX details.
- knowledge-graph.md — Knowledge graph visual encoding and coverage rules.
- operational-analytics.md — Analytics charts, forecasting limits, and CSV rules.