secubox-openwrt/luci-app-system-hub/htdocs/luci-static/resources/system-hub/overview.css
CyberMind-FR 8e53825ad5 release: v0.2.2 - Design System v0.3.0 & Comprehensive Documentation
🎨 Design System v0.3.0 (Demo-inspired)
- New dark palette: #0a0a0f, #6366f1→#8b5cf6 gradients
- Typography: Inter + JetBrains Mono
- Compact stats grid (130px min)
- Gradient text effects with background-clip
- Sticky navigation tabs
- Enhanced card borders and hover effects

📚 Comprehensive Documentation Suite
- DEVELOPMENT-GUIDELINES.md (33KB, 900+ lines)
  - 9 major sections: Design, Architecture, RPCD, ACL, JS, CSS, Errors, Validation, Deployment
  - Complete code templates and best practices
  - Common error diagnostics and solutions
- QUICK-START.md (6.4KB)
  - 8 critical rules for immediate reference
  - Quick code templates
  - Error quick fixes table
- deploy-module-template.sh (8.1KB)
  - Standardized deployment with automatic backup
  - Permission fixes, cache clearing, verification
- Updated CLAUDE.md, README.md with documentation index
- Updated .claude/README.md to v2.0

🔄 Version Updates
- luci-app-secubox: 0.1.2 → 0.2.2
- luci-app-system-hub: 0.1.1 → 0.2.2
- Updated all version strings (api.js, overview.js, CSS files)

🎯 CSS Enhancements
- common.css: Complete rewrite with demo palette
- overview.css: Dashboard header with gradient
- services.css: Updated version to 0.2.2
- components.css: Updated version to 0.2.2

🔧 Critical Rules Documented
1. RPCD naming: file = ubus object (luci. prefix)
2. Menu path = view file location
3. Permissions: 755 (RPCD), 644 (CSS/JS)
4. ALWAYS run validate-modules.sh
5. CSS variables only (no hardcode)
6. Dark mode mandatory
7. Typography: Inter + JetBrains Mono
8. Gradients: --sh-primary → --sh-primary-end

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 18:55:19 +01:00

525 lines
10 KiB
CSS

/**
* System Hub - Overview Page Styles (Demo-inspired)
* Modern dashboard with widgets and metrics
* Version: 0.3.0 - Matching https://cybermind.fr/apps/system-hub/demo.html
*/
/* === Dashboard Header (Demo Style - more subtle) === */
.sh-dashboard-header {
background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
border-radius: 16px;
padding: 28px;
margin-bottom: 24px;
border: 1px solid var(--sh-border);
color: var(--sh-text-primary);
}
.sh-dashboard-header-content {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.sh-dashboard-header h2 {
margin: 0 0 6px 0;
font-size: 28px;
font-weight: 700;
letter-spacing: -0.5px;
background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.sh-dashboard-subtitle {
margin: 0;
opacity: 0.9;
font-size: 14px;
font-weight: 500;
color: var(--sh-text-secondary);
}
.sh-dashboard-header-info {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.sh-dashboard-badge {
background: var(--sh-bg-card);
padding: 8px 16px;
border-radius: 20px;
font-size: 13px;
font-weight: 600;
border: 1px solid var(--sh-border);
white-space: nowrap;
color: var(--sh-text-primary);
}
.sh-dashboard-badge-version {
background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end));
color: #ffffff;
border-color: transparent;
font-weight: 700;
}
/* === Stats Overview Grid (Demo Style - Compact) === */
.sh-stats-overview-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 16px;
margin-bottom: 32px;
}
.sh-stat-overview-card {
background: var(--sh-bg-card);
border-radius: 12px;
padding: 20px 16px;
text-align: center;
border: 1px solid var(--sh-border);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.sh-stat-overview-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
transition: opacity 0.3s ease;
}
.sh-stat-overview-card:hover {
transform: translateY(-3px);
box-shadow: 0 12px 28px var(--sh-shadow);
border-color: var(--sh-primary);
}
.sh-stat-excellent::before { background: #22c55e; opacity: 1; }
.sh-stat-good::before { background: #3b82f6; opacity: 1; }
.sh-stat-warning::before { background: #f59e0b; opacity: 1; }
.sh-stat-critical::before { background: #ef4444; opacity: 1; }
.sh-stat-cpu::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); opacity: 1; }
.sh-stat-memory::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); opacity: 1; }
.sh-stat-disk::before { background: linear-gradient(90deg, #ec4899, #f43f5e); opacity: 1; }
.sh-stat-overview-icon {
font-size: 36px;
margin-bottom: 10px;
line-height: 1;
}
.sh-stat-overview-value {
font-size: 32px;
font-weight: 700;
line-height: 1;
margin-bottom: 10px;
color: var(--sh-text-primary);
font-family: 'JetBrains Mono', monospace;
}
.sh-stat-overview-label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--sh-text-secondary);
margin-bottom: 4px;
}
.sh-stat-overview-status {
font-size: 12px;
font-weight: 600;
color: var(--sh-text-secondary);
}
/* === Old Header (deprecated, keep for compatibility) === */
.sh-overview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
padding: 24px;
background: var(--sh-bg-card);
border-radius: 16px;
border: 1px solid var(--sh-border);
}
.sh-overview-title h2 {
font-size: 28px;
font-weight: 700;
margin: 0 0 8px 0;
color: var(--sh-text-primary);
display: flex;
align-items: center;
gap: 12px;
}
.sh-title-icon {
font-size: 32px;
}
.sh-overview-subtitle {
margin: 0;
font-size: 14px;
color: var(--sh-text-secondary);
font-weight: 500;
}
/* === Health Score Circle === */
.sh-score-circle {
width: 100px;
height: 100px;
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 5px solid;
transition: all 0.3s ease;
}
.sh-score-excellent {
border-color: #22c55e;
background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
}
.sh-score-good {
border-color: #3b82f6;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}
.sh-score-warning {
border-color: #f59e0b;
background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}
.sh-score-critical {
border-color: #ef4444;
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}
.sh-score-value {
font-size: 36px;
font-weight: 700;
line-height: 1;
color: var(--sh-text-primary);
font-family: 'JetBrains Mono', monospace;
}
.sh-score-label {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--sh-text-secondary);
margin-top: 4px;
}
/* === Metrics Grid === */
.sh-metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
margin-bottom: 32px;
}
.sh-metric-card {
background: var(--sh-bg-card);
border-radius: 16px;
padding: 24px;
border: 1px solid var(--sh-border);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.sh-metric-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--sh-primary), var(--sh-primary-end));
opacity: 0;
transition: opacity 0.3s ease;
}
.sh-metric-card:hover {
transform: translateY(-3px);
box-shadow: 0 12px 28px var(--sh-hover-shadow);
}
.sh-metric-card:hover::before {
opacity: 1;
}
.sh-metric-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 16px;
}
.sh-metric-icon {
font-size: 28px;
line-height: 1;
}
.sh-metric-title {
font-size: 15px;
font-weight: 600;
color: var(--sh-text-primary);
}
.sh-metric-value {
font-size: 40px;
font-weight: 700;
line-height: 1;
margin-bottom: 16px;
color: var(--sh-text-primary);
font-family: 'JetBrains Mono', monospace;
}
.sh-metric-progress {
height: 6px;
background: var(--sh-bg-tertiary);
border-radius: 3px;
overflow: hidden;
margin-bottom: 12px;
}
.sh-metric-progress-bar {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease;
background: linear-gradient(90deg, var(--sh-primary), var(--sh-primary-end));
}
.sh-metric-details {
font-size: 13px;
color: var(--sh-text-secondary);
font-weight: 500;
}
/* === Info Grid === */
.sh-info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
.sh-info-card {
background: var(--sh-bg-card);
border-radius: 16px;
border: 1px solid var(--sh-border);
overflow: hidden;
transition: all 0.3s ease;
position: relative;
}
.sh-info-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--sh-primary), var(--sh-primary-end));
opacity: 0;
transition: opacity 0.3s ease;
}
.sh-info-card:hover {
box-shadow: 0 8px 20px var(--sh-hover-shadow);
}
.sh-info-card:hover::before {
opacity: 1;
}
.sh-info-card-header {
padding: 18px 24px;
background: var(--sh-bg-secondary);
border-bottom: 1px solid var(--sh-border);
}
.sh-info-card-header h3 {
margin: 0;
font-size: 16px;
font-weight: 700;
color: var(--sh-text-primary);
}
.sh-info-card-body {
padding: 8px;
}
.sh-info-list {
display: flex;
flex-direction: column;
gap: 0;
}
.sh-info-row {
display: grid;
grid-template-columns: 36px 1fr auto;
align-items: center;
gap: 12px;
padding: 12px 16px;
transition: background 0.2s ease;
border-radius: 8px;
}
.sh-info-row:hover {
background: var(--sh-hover-bg);
}
.sh-info-icon {
font-size: 18px;
text-align: center;
}
.sh-info-label {
font-size: 13px;
font-weight: 600;
color: var(--sh-text-secondary);
}
.sh-info-value {
font-size: 13px;
font-weight: 600;
color: var(--sh-text-primary);
text-align: right;
}
/* === Status Badges === */
.sh-status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
line-height: 1.4;
}
.sh-status-ok {
background: rgba(34, 197, 94, 0.15);
color: #22c55e;
}
.sh-status-error {
background: rgba(239, 68, 68, 0.15);
color: #ef4444;
}
.sh-status-warning {
background: rgba(245, 158, 11, 0.15);
color: #f59e0b;
}
/* === Link Button === */
.sh-link-button {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end));
color: #ffffff;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.sh-link-button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
text-decoration: none;
}
/* === Responsive === */
@media (max-width: 768px) {
.sh-overview-header {
flex-direction: column;
gap: 20px;
text-align: center;
}
.sh-overview-title h2 {
justify-content: center;
}
.sh-metrics-grid {
grid-template-columns: 1fr;
}
.sh-info-grid {
grid-template-columns: 1fr;
}
.sh-metric-value {
font-size: 32px;
}
.sh-stats-overview-grid {
grid-template-columns: repeat(2, 1fr);
}
.sh-dashboard-header h2 {
font-size: 22px;
}
}
/* === Dark Mode === */
[data-theme="dark"] .sh-dashboard-header {
background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-metric-card,
[data-theme="dark"] .sh-info-card,
[data-theme="dark"] .sh-overview-header,
[data-theme="dark"] .sh-stat-overview-card,
[data-theme="dark"] .sh-dashboard-badge {
background: var(--sh-bg-card);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-info-card-header {
background: var(--sh-bg-secondary);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-metric-progress {
background: var(--sh-bg-tertiary);
}
[data-theme="dark"] .sh-info-row:hover {
background: var(--sh-hover-bg);
}
[data-theme="dark"] .sh-score-excellent {
background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
}
[data-theme="dark"] .sh-score-good {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
}
[data-theme="dark"] .sh-score-warning {
background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
}
[data-theme="dark"] .sh-score-critical {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
}