Skip to content

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

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):

  1. 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.
  2. 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.
  3. 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.

app/dashboard_static/index.html loads 13 modular CSS stylesheets in strict specificity order:

  1. dashboard.css — Base structural layout, grid shells, base typography, forms, dialogs
  2. dashboard-brand.css — P3MDI Sudirman color tokens, Manrope @font-face, branded login/sidebar/overview/chart styling
  3. management.css — Split-pane Percakapan & kasus inbox, CRM strip, media lightbox, internal notes, canned response bar
  4. tickets.css — Ticket filter toolbar, bulk action bar, Kanban 4-lane board, timeline list
  5. ai-config.css — AI quota progress cards, 7-day stacked usage bars, prompt section editor
  6. knowledge-search.css — Retrieval test form, diagnostic badges, saved checks accordion
  7. documents-admin.css — PDF cards, upload progress bar, collapsible page preview, section accordions
  8. analytics.css — Operational KPI grid, flow bar chart, 7-day forecast band, 7×24 WIB heatmap
  9. mobile-tickets.css — Unified ticket status vocabulary tokens, sticky mobile header, bottom shortcut bar, modal menu drawer, list-first mobile cards
  10. knowledge-base.css — Unified KB subpage collection cards, overlap comparison split view, wide 2-column knowledge editor
  11. broadcasts.css — Opt-in campaign cards, recipient consent list, preview block
  12. admin-duty.css — Duty toggle panel, admin roster rows, delivery history, topbar duty status pill
  13. interface.css — Final unified control surface overrides (.text-button, .primary, .secondary, .danger, .subpage-nav, mobile header/bottom nav states)

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, dashed 7 5), .insights-forecast-band (#dab36b at 20% opacity)
    • 7×24 WIB demand heatmap: level-0 (#f0eee8), level-1 (#f1dfb7), level-2 (#ddba77), level-3 (#b3873b), level-4 (#734f1c)
  • AI Usage Charts (ai-config.css):
    • --series sequence: #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

  • Font Family: Self-hosted Manrope (app/dashboard_static/fonts/Manrope-Variable.ttf, weights 200–800, font-display: swap), licensed under SIL Open Font License 1.1 (fonts/OFL.txt), with fallback 'Segoe UI', sans-serif. Preloaded in index.html.
  • Scale & Metrics:
    • Body text: 14px, line-height: 1.65, font-synthesis: none.
    • h1 headings: font-weight: 800, letter-spacing: -1.2px (27px–46px across viewports).
    • h2 headings: 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.
  • SVG Icon Sprite (icons.svg): 16 stroke-based 24×24 symbols (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): Original 1024×1280 organizational emblem cropped cleanly via CSS (clip-path: inset(3.8% 3.2% 1.5% 3.2%)) inside .crest-plate on 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): Custom 400×300 vector 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.

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:
    1. overview — Ringkasan (default HTML)
    2. analytics — Analitik & perencanaan (analytics.js)
    3. knowledge — Knowledge Base (default HTML; integrates Koleksi, Peta Pengetahuan, Perlu Ditinjau, Uji Jawaban, Kiriman WhatsApp, plus PDF management)
    4. tickets — Tiket bantuan (default HTML)
    5. cases — Percakapan & kasus (management.js)
    6. members — Anggota & akses (default HTML)
    7. admins — Akun administrator (documents-admin.js)
    8. duty — Petugas piket (admin-duty.js)
    9. broadcasts — Broadcasts (broadcasts.js)
    10. 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 > .sidebar and .workspace > .topbar are hidden.
  • Sticky Compact Header (.mobile-app-header): 68px min-height navy header showing the crest, "Dirman Assist", current view subtitle, and a Menu trigger button (aria-haspopup="dialog", aria-controls="mobile-menu").
  • Fixed Bottom Shortcut Bar (.mobile-bottom-nav): 4 equal columns with env(safe-area-inset-bottom) padding:
    • Beranda (overview)
    • Tiket (tickets)
    • Percakapan (cases)
    • Lainnya (opens #mobile-menu modal 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 with aria-current="page" on the current view, plus account controls (Status piket saya, Ganti kata sandi, Keluar dari dashboard).
  • Workspace Bottom Offset: .workspace reserves padding-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))).
  • 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-coverage category 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-selected to switch cleanly between the conversation list and full-height thread view with a Kembali ke daftar back button. Includes #media-lightbox <dialog> for zooming and downloading received WhatsApp screenshots.
  • Unified Knowledge Editor (.knowledge-editor): Expands #editor-dialog to min(1200px, calc(100vw - 48px)) using a 2-column split (.knowledge-editor-information sidebar metadata + .knowledge-editor-content primary 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/space keyboard 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”
  1. Keyboard Navigation & Focus Visibility:
    • Explicit outline: 3px solid var(--gold) (#af812c in interface.css) with outline-offset: 3px/4px on all interactive controls (button, a, input, textarea, select, summary).
    • keyboard-mode tracking in dashboard.js activates immediately on keydown and 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/Space on 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-close upon opening, closes on Escape (cancel event) or outside backdrop click, and restores focus to #mobile-menu-button (menuTrigger).
  2. Screen Reader Live Regions & Semantics:
    • Form/action errors use role="alert"; toast messages, search counts, draft status previews, session checks, and chart scrubbers use role="status" or aria-live="polite".
    • Subpage tabs (subpageNav), period selectors, and status chips use aria-pressed="true|false" or aria-current="page".
  3. Touch Targets & Viewport Fit:
    • Primary buttons, filters, nav items, and chips maintain min-height: 40px–48px (>= 44px enforced at max-width: 768px in interface.css).
    • Browser checks verify zero horizontal overflow (document.documentElement.scrollWidth <= innerWidth) across 360px, 390px, 768px, and 1440px viewports.
  4. Safe DOM Construction (XSS Prevention):
    • Frontend JavaScript creates elements strictly via el(tag, text, cls) (textContent) and svgNode(tag, attrs, text), never innerHTML.
  • Timing Tokens: --ease-out: cubic-bezier(.23,1,.32,1) and --ease-in-out: cubic-bezier(.77,0,.175,1) with short durations (140ms–260ms for fades, 240ms for mobile drawer entry, 600ms highlight 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 disables reveal() Web Animations, crest tilt (transform: none), emblem/dialog entrance animations, toast slide transforms, button active scales, and loading spinners, retaining only quick 100ms opacity/color transitions.