Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
6.3 KiB
admin-visual-design Specification
Purpose
Keep the admin portal's look consistent and accessible: colours from theme tokens only, slate neutrals with one blue accent, one type family, a light default with a dark theme, the Co-Lite wordmark, and styled dropdown menus.
Requirements
Requirement: Admin Colours Come From Theme Tokens
The admin portal SHALL take every colour from the theme tokens. A component MUST NOT use a fixed palette colour, except a modal scrim, a print-only sheet, a QR code's quiet zone, or a frame showing email HTML.
Scenario: A component uses a palette colour
- WHEN a component's classes include a fixed palette colour that is not on the exception list
- THEN the portal's checks fail
Requirement: One Accent Colour
The admin portal SHALL use slate neutrals for text, surfaces and borders, and one blue accent for primary actions, links, focus rings and the active navigation item. Status colours (success, warning, danger) SHALL appear only where they carry meaning.
Scenario: Primary action
- WHEN a page shows a primary button
- THEN the button uses the accent colour and the other buttons on the page do not
Scenario: Active navigation item
- WHEN an admin is on the Events page
- THEN the Events item in the sidebar is marked in the accent colour and no other item is
Requirement: One Type Family
The admin portal SHALL set all text, headings included, in one sans-serif family, with tabular figures for numbers in tables and counts.
Scenario: Fonts loaded
- WHEN any admin page loads
- THEN only the one family's font file is loaded
Requirement: Light Default With A Dark Theme
The admin portal SHALL show the light theme by default and SHALL offer a dark theme derived from the same neutrals and accent.
Scenario: First visit
- WHEN an admin opens the portal with no theme preference saved
- THEN the light theme is shown
Scenario: Dark theme chosen
- WHEN an admin switches to the dark theme
- THEN every page uses the dark tokens and text keeps at least 4.5:1 contrast
Requirement: Product Wordmark
The admin portal SHALL show the product name "Co-Lite" as solid text beside a small mark, and SHALL keep "Powered by Containerverse Sdn. Bhd." in the footer.
Scenario: Sidebar header
- WHEN an admin page loads
- THEN the sidebar shows the mark and the text "Co-Lite" in a solid colour, not gradient-filled text
Requirement: Styled Dropdown Menus
Every dropdown in the admin portal SHALL open a styled option menu that matches the portal's theme, and SHALL stay usable by keyboard and screen reader.
Scenario: Company picker
- WHEN a super admin opens the company picker in the header
- THEN a styled menu lists "All companies" and each company code, and choosing one scopes the pages to that company
Scenario: Form dropdown
- WHEN an admin opens the salesperson, temperature or status dropdown on an event lead
- THEN a styled menu opens, and the chosen value is saved with the form as before
Scenario: Keyboard use
- WHEN an admin focuses a dropdown and presses Enter or Space, then the arrow keys and Enter
- THEN the menu opens, moves between options, and chooses one
Requirement: Visitor Page Look
The public visitor pages (registration, invitation and check-in) SHALL show their content in one card on the page ground. The card SHALL be headed by the company name as a small label, the event name as the main heading, and the event dates and location. The pages SHALL use only the portal's theme tokens and SHALL NOT show a per-company logo or colour. The privacy notice SHALL be shown in full in English and Bahasa Malaysia as smaller, muted text that keeps at least 4.5:1 contrast.
Scenario: Visitor opens a registration code
- WHEN a visitor opens the registration page of an INS event
- THEN the card shows "INS" as a label above the event name, then the event dates and location
- AND the full privacy notice appears in both languages above the consent box
Scenario: Visitor needs a contact
- WHEN a visitor sees the mobile field on the registration form
- THEN a hint under it says that a mobile number or an email is required
Scenario: Visitor reaches an end state
- WHEN a visitor's registration is accepted, or the code is inactive, or check-in has not opened yet
- THEN the same card shows an icon and a heading for that state
Requirement: Header Trail Without Repeats
The admin header SHALL NOT repeat the page title. On a page reached directly from the sidebar it SHALL show no trail. On a page below one, it SHALL show the parent page as a link back.
Scenario: Top-level page
- WHEN an admin opens the Events list
- THEN the header shows no trail text
Scenario: Sub-page
- WHEN an admin opens the new event page
- THEN the header shows "Events" as a link to the Events list
Requirement: Table Scroll Cue
A table wider than its container SHALL show a fade on each edge where more columns can be scrolled into view. The fade SHALL disappear at that end of the scroll. Where a data table pins its first column, the pinned column covers the left fade and SHALL instead show a divider on its right edge.
Scenario: Users list on a phone
- WHEN an admin opens the Users list at 360 px wide
- THEN a fade shows on the right edge of the table
- AND after scrolling to the last column the right fade is gone
- AND the pinned username column shows a divider on its right edge
Requirement: Sidebar Sections
The sidebar SHALL list the work pages first, then an "Administration" section for Users, Roles, Emails, Login security, Audit log and Companies. The section SHALL be marked by a divider and a small muted label, and only the divider SHALL show in the collapsed rail. A section with no item the admin may open SHALL NOT show.
Scenario: Super admin sidebar
- WHEN a super admin opens the portal
- THEN Dashboard, Events, Event leads, Interests and Leads are listed above the "Administration" label
- AND Users, Roles, Emails, Login security, Audit log and Companies are listed below it
Scenario: Staff without admin pages
- WHEN a staff user who can open only Events and Event leads opens the portal
- THEN the sidebar shows no "Administration" label