feat(ui): implement premium gamified Concepts Map dashboard, unify design tokens, and enforce scoped CSS (#54)

Resolves #55

# gamified Concepts Map Dashboard, Architecture Cleanup, & CSS Unification

This Pull Request completes the gamified **Concepts Map** interactive experience and executes a strict visual and architectural clean-up of the **NexusReader SaaS** platform by consolidating styling around the centralized **Nexus Neon** design system, enforcing Native AOT-compliant scoped-CSS, and resolving style drift.

---

### 🚀 Key Implementations

#### 1. Gamified Interactive Concepts Map Dashboard
* **Dynamic Skill-Tree Visualizer:** Implemented a gamified node-based interactive tree that reads concept connections dynamically, rendering progress nodes, unlocked/locked states, and active visual connection lines.
* **Premium UX Details:** Integrated high-fidelity hover effects, detailed sidebar popovers showing unlocked stats/summaries, and smooth parallax backdrops.
* **Secure Multi-Tenant Gating:** Hardened data queries using explicit `TenantId` gating to ensure complete layout isolation between system tenants.

#### 2. Architecture & Service Optimization
* **Service Abstraction (`IConceptsMapService`):** Introduced a clean service interface decoupled from the UI layers.
* **Polyglot Fallback Implementations:**
  - **WasmConceptsMapService:** Implements efficient client-side fetching with error recovery/loading states.
  - **ServerConceptsMapService:** Handles deep database graph mapping, relationship resolution, and multi-tenant checks.
* **CQRS Integrity:** Enforced the CQRS Result Pattern by using `MediatR` handlers to fetch data structures instead of placing database queries in UI modules.

#### 3. Nexus Neon CSS Unification & Zero-Style-Tag Standards
* **Central Design Tokens:** Solidified typography (`Inter` / `Merriweather`), primary brand green hues (`var(--nexus-neon)` at `#00ff99`), and glow variables inside the global `app.css`.
* **Zero Inline Style Tags:** Standardized all dashboard modules by completely eliminating inline `<style>` blocks in favor of scoped `.razor.css` companion files.
* **Consolidated Buttons & Glass Panels:**
  - Standardized `.btn-nexus`, `.btn-nexus-primary`, and `.btn-nexus-secondary` throughout header/footer/card operations.
  - Removed duplicate `.glass-panel` background, blur, and support-declaration overrides, making components cleanly inherit standard global styles.
* **Eliminated Brand Splitting:** Resolved legacy purple-indigo user avatar and conversation bubble gradients inside the AI Intelligence Hub (`Intelligence.razor.css`), migrating them to premium glassmorphic surfaces (`rgba(255, 255, 255, 0.05)`) contrasting beautifully against the emerald green AI theme.

---

### 🧪 Verification & Build Gate Status

* **Successful Compilation Check:** Run `dotnet build NexusReader.slnx --no-restore` from the workspace root. Flawlessly succeeded with **zero compilation errors** (`Liczba błędów: 0`) under target `.NET 10`.
* **Verified Skills Synchrony:** The companion design guidelines skill (`nexus-ui-engine/SKILL.md`) has been fully updated to secure these layout and styling conventions for future dashboard features.

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #54
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #54.
This commit is contained in:
2026-05-26 17:46:56 +00:00
committed by Marek Jaisński
parent a0bf6c15f4
commit 72905aa119
34 changed files with 2560 additions and 1173 deletions
@@ -0,0 +1,405 @@
.concepts-dashboard-container {
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 2rem 1.5rem;
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 1.5rem;
min-height: calc(100vh - 80px);
}
/* Header Section */
.dashboard-header {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 2rem;
padding: 1.25rem 2rem;
background: rgba(20, 20, 20, 0.35);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 16px;
backdrop-filter: blur(12px);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.header-back .btn-back {
padding: 0.5rem 1.25rem;
font-size: 0.85rem;
}
.header-back .btn-back:hover {
border-color: var(--nexus-neon);
color: var(--nexus-neon);
background: var(--nexus-primary-glow);
box-shadow: 0 0 10px var(--nexus-primary-glow);
}
.header-title h1 {
margin: 0;
font-size: 1.5rem;
font-weight: 700;
color: #fff;
}
.header-title .subtitle {
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.4);
}
.header-actions .btn-action {
padding: 0.6rem 1.4rem;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.header-actions .btn-action:hover {
box-shadow: 0 0 20px var(--nexus-primary-glow);
}
/* Grid Layout */
.concepts-dashboard {
display: grid;
grid-template-columns: 1.1fr 1fr;
gap: 1.5rem;
height: 72vh;
}
/* Glass Panels */
.glass-panel {
display: flex;
flex-direction: column;
overflow: hidden;
padding: 0;
}
.pane-header {
padding: 1.25rem 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pane-header h3 {
margin: 0;
font-size: 1rem;
font-weight: 600;
color: #fff;
display: flex;
align-items: center;
gap: 0.5rem;
}
.pane-content {
flex-grow: 1;
overflow: hidden;
}
/* Loading, Error and Empty States */
.loading-state, .error-state, .empty-dashboard-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
text-align: center;
margin: auto;
width: 100%;
max-width: 480px;
box-sizing: border-box;
}
.preloader-robot {
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
}
.neon-pulse {
color: var(--nexus-neon);
filter: drop-shadow(0 0 10px var(--nexus-neon));
animation: robot-pulse 2s infinite ease-in-out;
}
@keyframes robot-pulse {
0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--nexus-neon)); }
50% { transform: scale(1.08); filter: drop-shadow(0 0 25px var(--nexus-neon)); }
100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--nexus-neon)); }
}
.scan-line {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 2px;
background: var(--nexus-neon);
box-shadow: 0 0 15px var(--nexus-neon);
animation: scan 2s infinite linear;
opacity: 0.8;
}
@keyframes scan {
0% { top: 0; }
50% { top: 100%; }
100% { top: 0; }
}
.loading-text {
font-size: 0.95rem;
color: rgba(255, 255, 255, 0.7);
margin-top: 1rem;
letter-spacing: 0.05em;
}
.error-icon, .dim-icon {
margin-bottom: 1.5rem;
}
.error-icon {
color: #ff4a4a;
filter: drop-shadow(0 0 8px rgba(255, 74, 74, 0.4));
}
.dim-icon {
color: rgba(255, 255, 255, 0.15);
}
.empty-dashboard-state h2, .error-state h3 {
color: #fff;
margin: 0 0 0.75rem 0;
font-weight: 600;
}
.empty-dashboard-state p, .error-state p {
color: rgba(255, 255, 255, 0.45);
font-size: 0.88rem;
line-height: 1.5;
margin: 0 0 2rem 0;
}
/* Workspace Panels */
.workspace-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-grow: 1;
padding: 3rem;
text-align: center;
color: rgba(255, 255, 255, 0.4);
}
.empty-glowing-brain {
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 255, 153, 0.04);
border: 1px solid rgba(0, 255, 153, 0.15);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
box-shadow: 0 0 20px var(--nexus-primary-glow);
}
.workspace-empty h4 {
margin: 0 0 0.75rem 0;
color: #fff;
font-size: 1.1rem;
font-weight: 600;
}
.workspace-empty p {
font-size: 0.85rem;
line-height: 1.5;
max-width: 320px;
margin: 0;
}
.workspace-content {
display: flex;
flex-direction: column;
height: 100%;
}
.workspace-header {
padding: 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.node-meta {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
.node-id {
font-family: var(--nexus-font-sans);
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.08em;
color: var(--nexus-neon);
}
.badge {
font-size: 0.7rem;
padding: 0.2rem 0.55rem;
border-radius: 12px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 0.25rem;
}
.badge-unlocked {
background: rgba(0, 255, 153, 0.08);
color: var(--nexus-neon);
border: 1px solid rgba(0, 255, 153, 0.2);
}
.badge-locked {
background: rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.4);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.workspace-title {
margin: 0;
font-size: 1.4rem;
font-weight: 700;
color: #fff;
}
.workspace-body {
flex-grow: 1;
overflow-y: auto;
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Scrollbar customization for workspace body */
.workspace-body::-webkit-scrollbar {
width: 6px;
}
.workspace-body::-webkit-scrollbar-track {
background: transparent;
}
.workspace-body::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.08);
border-radius: 3px;
}
.workspace-body::-webkit-scrollbar-thumb:hover {
background: var(--nexus-neon);
}
.locked-warning {
display: flex;
flex-direction: row;
gap: 1rem;
background: rgba(255, 171, 0, 0.04);
border: 1px solid rgba(255, 171, 0, 0.15);
border-radius: 8px;
padding: 1rem;
color: rgba(255, 255, 255, 0.85);
}
.lock-warning-icon {
color: #ffab00;
flex-shrink: 0;
margin-top: 0.1rem;
}
.locked-warning strong {
font-size: 0.85rem;
color: #ffab00;
display: block;
margin-bottom: 0.25rem;
}
.locked-warning p {
margin: 0;
font-size: 0.8rem;
line-height: 1.4;
color: rgba(255, 255, 255, 0.55);
}
.metadata-section h4 {
margin: 0 0 0.5rem 0;
font-size: 0.85rem;
font-weight: 600;
color: #aaa;
display: flex;
align-items: center;
gap: 0.35rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.section-text {
margin: 0;
font-size: 0.88rem;
line-height: 1.6;
color: rgba(255, 255, 255, 0.7);
}
.summary-box {
background: rgba(255, 255, 255, 0.02);
border-left: 3px solid var(--nexus-neon);
border-radius: 0 8px 8px 0;
padding: 1rem;
margin-top: 0.25rem;
}
.key-terms-grid {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
.term-pill {
font-size: 0.75rem;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.6);
padding: 0.3rem 0.75rem;
border-radius: 20px;
font-weight: 500;
transition: all 0.2s ease;
}
.term-pill:hover {
border-color: rgba(0, 255, 153, 0.2);
color: var(--nexus-neon);
background: rgba(0, 255, 153, 0.03);
}
.workspace-footer {
padding: 1.25rem 1.5rem;
border-top: 1px solid rgba(255, 255, 255, 0.05);
}
@media (max-width: 1024px) {
.concepts-dashboard {
grid-template-columns: 1fr;
height: auto;
}
.concepts-dashboard-container {
padding: 1rem;
}
.dashboard-header {
grid-template-columns: 1fr;
text-align: center;
gap: 1rem;
}
.header-back, .header-actions {
display: flex;
justify-content: center;
}
}