# DM Dashboard Redesign — Work Notes ## Theme Tokens (Target) - Primary: `#534AB7` - Secondary: `#c8a84b` - Background base: `#16120e` - Surface: `#1e1912` - Card: `#221e18` - Green (crit): `#6ab04c` - Red (fail): `#e06060` - Accent hover: `#6b5fc7` - Gold hover: `#d4b76a` ## Current State (2026-05-15) - dm-theme.css: 11 properties, orange theme - DmHeader: simple header with quill icon - DmButton: 3 variants (primary/secondary/ghost) - DmCard: padding variants, shadow - DmInput: label + input with focus ring - dm-translations.ts: 14 strings only - Playwright: installed (@playwright/test v1.60.0), script is `test:ui` ## Decisions - Keep CSS property names, only change values - Russian-only, no EN translations needed - Preserve all sessionStorage/localStorage keys ## Learnings (2026-05-15) - DmTabs.astro created: pill-style tab navigation with 4 tabs (Кубики, Инициатива, Справочник, Заметки) - Uses CSS custom properties exclusively (no hardcoded colors) - Server-side renders initial `aria-selected` based on `Astro.url.hash` - Client script enhances with: click → pushState hash, `dm-tab-change` custom event, keyboard nav (ArrowLeft/Right, Home, End), localStorage persistence (`dm-last-tab`) - Uses `` for graceful degradation (JS prevents default) - Touch-friendly sizing: `min-h-[44px] min-w-[80px]` - Build passes cleanly - DmSidebar.astro created: desktop-only sidebar navigation component with user info placeholder, tools section, reference section, and campaigns placeholder - Sidebar uses emoji icons for tools, gold dot for reference items - All translations validated against dm-translations.ts keys - No mobile visibility toggle needed — DmLayout handles `hidden lg:block` for sidebar column - Component takes optional `user` prop with `name` and `avatar` fields ## InitiativeTracker Redesign (2026-05-15) - Wrapped form, list, and empty state in DmCard for consistent card styling - Changed sessionStorage key from `it-combatants` to `dm-initiative` per spec - Added inline HP editing: click HP span → input, blur/Enter to save, Escape to cancel - Added `aria-live="polite"` announcer for turn change announcements - Used `dmTranslations` (T) for all static template strings; hardcoded Russian in client script - Active row: `bg-[var(--accent)]/10` + purple dot + "Ход" pill badge - Initiative score rendered in `text-[var(--gold)]` for emphasis - Delete button: plain `