secubox-openwrt/luci-app-system-hub/htdocs/luci-static/resources/system-hub/overview.css
CyberMind-FR 4e2763190d feat: system-hub overview - Modern dashboard with widgets
Complete redesign of Overview page with modern dashboard layout:

Features:
• Health Score circle with visual status (excellent/good/warning/critical)
• Metric cards with progress bars (CPU, Memory, Disk, Temperature)
• Color-coded status indicators
• System Information card with icons
• Network Status card with connection state
• Services card with quick actions link
• Auto-refresh every 30 seconds
• Responsive grid layout
• Full dark mode support

Design:
• Gradient score circle (120px)
• Modern metric cards with hover effects
• Info cards with organized data rows
• Status badges (ok/warning/error)
• Smooth transitions and animations
• Cohesive with SecuBox design language

Replaces old cbi-based layout with modern component-based design.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 17:49:28 +01:00

367 lines
6.9 KiB
CSS

/**
* System Hub - Overview Page Styles
* Modern dashboard with widgets and metrics
* Version: 0.2.0
*/
/* === Header === */
.sh-overview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
padding: 24px;
background: var(--sh-bg-card, #ffffff);
border-radius: 16px;
border: 1px solid var(--sh-border, #e2e8f0);
}
.sh-overview-title h2 {
font-size: 32px;
font-weight: 700;
margin: 0 0 8px 0;
color: var(--sh-text-primary, #1e293b);
display: flex;
align-items: center;
gap: 12px;
}
.sh-title-icon {
font-size: 36px;
}
.sh-overview-subtitle {
margin: 0;
font-size: 16px;
color: var(--sh-text-secondary, #64748b);
font-weight: 500;
}
/* === Health Score Circle === */
.sh-score-circle {
width: 120px;
height: 120px;
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 6px 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: 42px;
font-weight: 700;
line-height: 1;
color: var(--sh-text-primary, #1e293b);
}
.sh-score-label {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--sh-text-secondary, #64748b);
margin-top: 4px;
}
/* === Metrics Grid === */
.sh-metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 20px;
margin-bottom: 32px;
}
.sh-metric-card {
background: var(--sh-bg-card, #ffffff);
border-radius: 16px;
padding: 24px;
border: 1px solid var(--sh-border, #e2e8f0);
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: 4px;
background: linear-gradient(90deg, #6366f1, #8b5cf6);
opacity: 0;
transition: opacity 0.3s ease;
}
.sh-metric-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 28px var(--sh-hover-shadow, rgba(0, 0, 0, 0.12));
}
.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: 32px;
line-height: 1;
}
.sh-metric-title {
font-size: 16px;
font-weight: 600;
color: var(--sh-text-primary, #1e293b);
}
.sh-metric-value {
font-size: 48px;
font-weight: 700;
line-height: 1;
margin-bottom: 16px;
color: var(--sh-text-primary, #1e293b);
}
.sh-metric-progress {
height: 8px;
background: var(--sh-bg-tertiary, #f1f5f9);
border-radius: 4px;
overflow: hidden;
margin-bottom: 12px;
}
.sh-metric-progress-bar {
height: 100%;
border-radius: 4px;
transition: width 0.5s ease;
}
.sh-metric-details {
font-size: 14px;
color: var(--sh-text-secondary, #64748b);
font-weight: 500;
}
/* === Info Grid === */
.sh-info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 20px;
}
.sh-info-card {
background: var(--sh-bg-card, #ffffff);
border-radius: 16px;
border: 1px solid var(--sh-border, #e2e8f0);
overflow: hidden;
transition: all 0.3s ease;
}
.sh-info-card:hover {
box-shadow: 0 4px 12px var(--sh-hover-shadow, rgba(0, 0, 0, 0.08));
}
.sh-info-card-header {
padding: 20px 24px;
background: var(--sh-bg-secondary, #f8fafc);
border-bottom: 1px solid var(--sh-border, #e2e8f0);
}
.sh-info-card-header h3 {
margin: 0;
font-size: 18px;
font-weight: 700;
color: var(--sh-text-primary, #1e293b);
}
.sh-info-card-body {
padding: 8px;
}
.sh-info-list {
display: flex;
flex-direction: column;
gap: 0;
}
.sh-info-row {
display: grid;
grid-template-columns: 40px 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, #f8fafc);
}
.sh-info-icon {
font-size: 20px;
text-align: center;
}
.sh-info-label {
font-size: 14px;
font-weight: 600;
color: var(--sh-text-secondary, #64748b);
}
.sh-info-value {
font-size: 14px;
font-weight: 600;
color: var(--sh-text-primary, #1e293b);
text-align: right;
}
/* === Status Badges === */
.sh-status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 12px;
font-size: 13px;
font-weight: 600;
line-height: 1.4;
}
.sh-status-ok {
background: rgba(34, 197, 94, 0.15);
color: #16a34a;
}
.sh-status-error {
background: rgba(239, 68, 68, 0.15);
color: #dc2626;
}
.sh-status-warning {
background: rgba(245, 158, 11, 0.15);
color: #d97706;
}
/* === Link Button === */
.sh-link-button {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: var(--sh-primary, #6366f1);
color: #ffffff;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
transition: all 0.2s ease;
}
.sh-link-button:hover {
background: #4f46e5;
transform: translateX(4px);
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: 36px;
}
}
/* === Dark Mode === */
[data-theme="dark"] {
--sh-text-primary: #f1f5f9;
--sh-text-secondary: #cbd5e1;
--sh-bg-primary: #0f172a;
--sh-bg-secondary: #1e293b;
--sh-bg-tertiary: #334155;
--sh-bg-card: #1e293b;
--sh-border: #334155;
--sh-hover-bg: #334155;
--sh-hover-shadow: rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .sh-metric-card,
[data-theme="dark"] .sh-info-card,
[data-theme="dark"] .sh-overview-header {
background: var(--sh-bg-card);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-info-card-header {
background: var(--sh-bg-tertiary);
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.2), rgba(34, 197, 94, 0.1));
}
[data-theme="dark"] .sh-score-good {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
}
[data-theme="dark"] .sh-score-warning {
background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
}
[data-theme="dark"] .sh-score-critical {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
}