ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Add developer Style Guide page and styles
Juan Denis9c053c907dc2
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsxindex 45fba18e..f590ce54 100644--- a/frontend/src/App.jsx+++ b/frontend/src/App.jsx@@ -49,6 +49,7 @@ import DNSZones from './pages/DNSZones';import StatusPages from './pages/StatusPages';import CloudProvision from './pages/CloudProvision';import Marketplace from './pages/Marketplace';+import StyleGuide from './pages/StyleGuide';// Page title mappingconst PAGE_TITLES = {@@ -88,6 +89,7 @@ const PAGE_TITLES = {'/status-pages': 'Status Pages','/cloud': 'Cloud Provisioning','/marketplace': 'Marketplace',+ '/style-guide': 'Style Guide',};function PageTitleUpdater() {@@ -231,6 +233,7 @@ function AppRoutes() {<Route path="status-pages" element={<StatusPages />} /><Route path="cloud" element={<CloudProvision />} /><Route path="marketplace" element={<Marketplace />} />+ <Route path="style-guide" element={<StyleGuide />} /><Route path="downloads" element={<Downloads />} /><Route path="firewall" element={<Navigate to="/security/firewall" replace />} /><Route path="git" element={<Git />} />diff --git a/frontend/src/components/Sidebar.jsx b/frontend/src/components/Sidebar.jsxindex ab6825ad..04713744 100644--- a/frontend/src/components/Sidebar.jsx+++ b/frontend/src/components/Sidebar.jsx@@ -5,7 +5,7 @@ import { useTheme } from '../contexts/ThemeContext';import { Star, Settings, LogOut, Sun, Moon, Monitor, ChevronRight, ChevronDown, ChevronUp, Layers, Palette, PanelLeft, Check } from 'lucide-react';import { api } from '../services/api';import ServerKitLogo from './ServerKitLogo';-import { SIDEBAR_CATEGORIES, CATEGORY_LABELS, SIDEBAR_PRESETS, getVisibleItems } from './sidebarItems';+import { SIDEBAR_CATEGORIES, CATEGORY_LABELS, SIDEBAR_PRESETS, getVisibleItems, SIDEBAR_ITEMS } from './sidebarItems';const Sidebar = () => {const { user, logout, updateUser } = useAuth();@@ -240,6 +240,23 @@ const Sidebar = () => {})}</div>+ {import.meta.env.DEV && (+ <>+ <div className="nav-category">Dev Tools</div>+ <nav className="nav">+ <NavLink+ to="/style-guide"+ className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}+ >+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">+ <circle cx="13.5" cy="6.5" r="2.5"/><path d="M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5z"/><path d="M9.5 14.5l-3 3"/><path d="M14.5 9.5l3-3"/>+ </svg>+ Style Guide+ </NavLink>+ </nav>+ </>+ )}+<div className="sidebar-footer" ref={menuRef}>{menuOpen && (<div className="user-context-menu">diff --git a/frontend/src/pages/StyleGuide.jsx b/frontend/src/pages/StyleGuide.jsxnew file mode 100644index 00000000..cd7445b2--- /dev/null+++ b/frontend/src/pages/StyleGuide.jsx@@ -0,0 +1,1351 @@+import React, { useState } from 'react';+import {+ Palette, Type, Box, Layout, Square, ToggleLeft, AlertTriangle,+ Info, CheckCircle, XCircle, Bell, Search, Plus, Trash2, Edit3,+ Download, Upload, RefreshCw, Settings, Eye, EyeOff, Copy, Star,+ ChevronDown, ChevronRight, ExternalLink, Server, Database, Globe,+ Shield, Lock, Zap, Activity, BarChart3, Cloud, Terminal, Layers,+ Inbox, Table, AlertCircle, FileText, Monitor, Key, FolderOpen,+ GitBranch, Package, HardDrive, Wifi, WifiOff+} from 'lucide-react';+import Modal from '../components/Modal';+import { ConfirmDialog } from '../components/ConfirmDialog';+import StatusBadge from '../components/StatusBadge';+import EmptyState from '../components/EmptyState';+import { Spinner } from '../components/Spinner';++export default function StyleGuide() {+ const [activeSection, setActiveSection] = useState('colors');+ const [modalOpen, setModalOpen] = useState(false);+ const [confirmOpen, setConfirmOpen] = useState(false);+ const [confirmVariant, setConfirmVariant] = useState('danger');+ const [tabActive, setTabActive] = useState('tab1');+ const [inputValue, setInputValue] = useState('');+ const [selectValue, setSelectValue] = useState('');+ const [checkValue, setCheckValue] = useState(false);++ const sections = [+ { id: 'colors', label: 'Colors', icon: Palette },+ { id: 'typography', label: 'Typography', icon: Type },+ { id: 'spacing', label: 'Spacing & Radius', icon: Box },+ { id: 'buttons', label: 'Buttons', icon: Square },+ { id: 'forms', label: 'Forms', icon: ToggleLeft },+ { id: 'tables', label: 'Tables', icon: Table },+ { id: 'cards', label: 'Cards & Stats', icon: Layout },+ { id: 'badges', label: 'Badges & Status', icon: Shield },+ { id: 'alerts', label: 'Alerts & Errors', icon: AlertCircle },+ { id: 'modals', label: 'Modals & Dialogs', icon: Layers },+ { id: 'tabs', label: 'Tabs', icon: ChevronRight },+ { id: 'lists', label: 'Lists & Info', icon: Database },+ { id: 'feedback', label: 'Feedback & Loading', icon: Activity },+ { id: 'empty', label: 'Empty States', icon: Inbox },+ { id: 'pageheaders', label: 'Page Headers', icon: FileText },+ { id: 'patterns', label: 'Page Patterns', icon: Monitor },+ { id: 'utilities', label: 'Utilities', icon: Zap },+ ];++ return (+ <div className="styleguide">+ <div className="page-header">+ <div>+ <h1>Style Guide</h1>+ <p className="subtitle">Design system reference — dev only</p>+ </div>+ </div>++ <div className="styleguide__nav">+ {sections.map(s => (+ <button+ key={s.id}+ className={`styleguide__nav-btn ${activeSection === s.id ? 'active' : ''}`}+ onClick={() => setActiveSection(s.id)}+ >+ <s.icon size={14} />+ {s.label}+ </button>+ ))}+ </div>++ <div className="styleguide__content">++ {/* ── COLORS ── */}+ {activeSection === 'colors' && (+ <div className="space-y-6">+ <SectionTitle title="Background Colors" />+ <div className="styleguide__swatch-grid">+ <Swatch name="--bg-body" label="Body" />+ <Swatch name="--bg-sidebar" label="Sidebar" />+ <Swatch name="--bg-card" label="Card" />+ <Swatch name="--bg-hover" label="Hover" />+ <Swatch name="--bg-elevated" label="Elevated" />+ <Swatch name="--bg-secondary" label="Secondary" />+ <Swatch name="--bg-tertiary" label="Tertiary" />+ </div>++ <SectionTitle title="Border Colors" />+ <div className="styleguide__swatch-grid">+ <Swatch name="--border-default" label="Default" />+ <Swatch name="--border-subtle" label="Subtle" />+ <Swatch name="--border-active" label="Active" />+ <Swatch name="--border-hover" label="Hover" />+ </div>++ <SectionTitle title="Text Colors" />+ <div className="styleguide__swatch-grid">+ <Swatch name="--text-primary" label="Primary" text />+ <Swatch name="--text-secondary" label="Secondary" text />+ <Swatch name="--text-tertiary" label="Tertiary" text />+ </div>++ <SectionTitle title="Accent Colors" />+ <div className="styleguide__swatch-grid">+ <Swatch name="--accent-primary" label="Primary" />+ <Swatch name="--accent-hover" label="Hover" />+ <Swatch name="--accent-glow" label="Glow" />+ </div>++ <SectionTitle title="Semantic Colors" />+ <div className="styleguide__swatch-grid">+ <SwatchStatic color="#10b981" label="Success" token="$success" />+ <SwatchStatic color="rgba(16,185,129,0.1)" label="Success BG" token="$success-bg" />+ <SwatchStatic color="#f59e0b" label="Warning" token="$warning" />+ <SwatchStatic color="rgba(245,158,11,0.1)" label="Warning BG" token="$warning-bg" />+ <SwatchStatic color="#ef4444" label="Danger" token="$danger" />+ <SwatchStatic color="rgba(239,68,68,0.1)" label="Danger BG" token="$danger-bg" />+ <SwatchStatic color="#3b82f6" label="Info" token="$info" />+ <SwatchStatic color="rgba(59,130,246,0.1)" label="Info BG" token="$info-bg" />+ </div>++ <SectionTitle title="Brand Colors" />+ <div className="styleguide__swatch-grid">+ <SwatchStatic color="#f29111" label="MySQL" token="$color-mysql" />+ <SwatchStatic color="#336791" label="PostgreSQL" token="$color-postgresql" />+ <SwatchStatic color="#2496ed" label="Docker" token="$color-docker" />+ <SwatchStatic color="#777bb4" label="PHP" token="$color-php" />+ <SwatchStatic color="#3776ab" label="Python" token="$color-python" />+ <SwatchStatic color="#21759b" label="WordPress" token="$color-wordpress" />+ </div>+ </div>+ )}++ {/* ── TYPOGRAPHY ── */}+ {activeSection === 'typography' && (+ <div className="space-y-6">+ <SectionTitle title="Font Families" />+ <div className="card" style={{ padding: 24 }}>+ <p style={{ fontFamily: "'Inter', sans-serif", marginBottom: 16 }}>+ <span className="text-tertiary text-sm">$font-main:</span><br />+ The quick brown fox jumps over the lazy dog — Inter+ </p>+ <p className="mono" style={{ fontSize: 14 }}>+ <span className="text-tertiary text-sm">$font-mono:</span><br />+ {'const server = createApp(); // JetBrains Mono'}+ </p>+ </div>++ <SectionTitle title="Font Sizes" />+ <div className="card" style={{ padding: 24 }}>+ {[+ ['$font-size-xs', '10px'], ['$font-size-sm', '12px'],+ ['$font-size-base', '14px'], ['$font-size-md', '16px'],+ ['$font-size-lg', '18px'], ['$font-size-xl', '20px'],+ ['$font-size-2xl', '24px'], ['$font-size-3xl', '30px'],+ ].map(([token, size]) => (+ <div key={token} className="flex items-center gap-4 mb-2">+ <span className="mono text-tertiary" style={{ minWidth: 160 }}>{token}</span>+ <span style={{ fontSize: size }}>{size} — The quick brown fox</span>+ </div>+ ))}+ </div>++ <SectionTitle title="Font Weights" />+ <div className="card" style={{ padding: 24 }}>+ {[['Normal (400)', 400], ['Medium (500)', 500], ['Semibold (600)', 600], ['Bold (700)', 700]].map(([label, weight]) => (+ <p key={weight} style={{ fontWeight: weight, marginBottom: 8 }}>+ {label} — The quick brown fox jumps over the lazy dog+ </p>+ ))}+ </div>++ <SectionTitle title="Heading Tags" />+ <div className="card" style={{ padding: 24 }}>+ <h1>h1 — Page Title</h1>+ <h2>h2 — Section Title</h2>+ <h3>h3 — Card Title</h3>+ <h4>h4 — Subsection</h4>+ <h5>h5 — Minor heading</h5>+ <p>p — Body text paragraph with normal weight and base font size.</p>+ <p className="text-secondary">p.text-secondary — Secondary paragraph text.</p>+ <p className="text-tertiary">p.text-tertiary — Tertiary/muted paragraph text.</p>+ </div>++ <SectionTitle title="Text Utility Classes" />+ <div className="card" style={{ padding: 24 }}>+ <p className="text-primary">.text-primary</p>+ <p className="text-secondary">.text-secondary</p>+ <p className="text-tertiary">.text-tertiary</p>+ <p className="text-success">.text-success</p>+ <p className="text-warning">.text-warning</p>+ <p className="text-danger">.text-danger</p>+ <p className="text-accent">.text-accent</p>+ </div>+ </div>+ )}++ {/* ── SPACING & RADIUS ── */}+ {activeSection === 'spacing' && (+ <div className="space-y-6">+ <SectionTitle title="Spacing Scale" />+ <div className="card" style={{ padding: 24 }}>+ {[+ ['$space-1', 4], ['$space-2', 8], ['$space-3', 12], ['$space-4', 16],+ ['$space-5', 20], ['$space-6', 24], ['$space-8', 32], ['$space-10', 40],+ ['$space-12', 48], ['$space-16', 64],+ ].map(([token, px]) => (+ <div key={token} className="flex items-center gap-4 mb-3">+ <span className="mono text-tertiary" style={{ minWidth: 120 }}>{token}</span>+ <span className="mono text-secondary" style={{ minWidth: 50 }}>{px}px</span>+ <div className="styleguide__spacing-bar" style={{ width: px, height: 16 }} />+ </div>+ ))}+ </div>++ <SectionTitle title="Border Radius" />+ <div className="styleguide__swatch-grid">+ {[+ ['$radius-sm', '4px'], ['$radius-md', '6px'], ['$radius-lg', '8px'],+ ['$radius-xl', '12px'], ['$radius-2xl', '16px'], ['$radius-full', '9999px'],+ ].map(([token, val]) => (+ <div key={token} className="card flex flex-col items-center gap-3" style={{ padding: 20 }}>+ <div className="styleguide__radius-box" style={{ borderRadius: val }} />+ <span className="mono text-sm text-tertiary">{token}</span>+ <span className="text-sm text-secondary">{val}</span>+ </div>+ ))}+ </div>++ <SectionTitle title="Shadows" />+ <div className="styleguide__swatch-grid">+ {['sm', 'md', 'lg'].map(size => (+ <div key={size} className="card flex flex-col items-center gap-3" style={{ padding: 20 }}>+ <div className="styleguide__shadow-box" style={{ boxShadow: `var(--shadow-${size})` }} />+ <span className="mono text-sm text-tertiary">$shadow-{size}</span>+ </div>+ ))}+ </div>+ </div>+ )}++ {/* ── BUTTONS ── */}+ {activeSection === 'buttons' && (+ <div className="space-y-6">+ <SectionTitle title="Button Variants" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap gap-3 mb-6">+ <button className="btn btn-primary"><Plus size={16} /> Primary</button>+ <button className="btn btn-secondary"><Edit3 size={16} /> Secondary</button>+ <button className="btn btn-danger"><Trash2 size={16} /> Danger</button>+ <button className="btn btn-ghost"><Eye size={16} /> Ghost</button>+ </div>+ <div className="flex flex-wrap gap-3">+ <button className="btn btn-primary" disabled>Disabled Primary</button>+ <button className="btn btn-secondary" disabled>Disabled Secondary</button>+ <button className="btn btn-danger" disabled>Disabled Danger</button>+ </div>+ </div>++ <SectionTitle title="Button Sizes" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap items-center gap-3">+ <button className="btn btn-primary btn-sm">Small</button>+ <button className="btn btn-primary">Default</button>+ <button className="btn btn-primary btn-lg">Large</button>+ </div>+ </div>++ <SectionTitle title="Icon Buttons" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap gap-3">+ <button className="btn btn-icon btn-primary"><Plus size={16} /></button>+ <button className="btn btn-icon btn-secondary"><Edit3 size={16} /></button>+ <button className="btn btn-icon btn-danger"><Trash2 size={16} /></button>+ <button className="btn btn-icon btn-ghost"><Settings size={16} /></button>+ <button className="btn btn-icon btn-ghost"><Copy size={16} /></button>+ <button className="btn btn-icon btn-ghost"><RefreshCw size={16} /></button>+ </div>+ </div>++ <SectionTitle title="Full Width & Loading" />+ <div className="card" style={{ padding: 24 }}>+ <button className="btn btn-primary btn-full mb-4">Full Width Button</button>+ <div className="flex flex-wrap gap-3">+ <button className="btn btn-primary btn-loading">+ <span className="spinner spinner-sm"><span className="spinner-ring"></span></span>+ Saving...+ </button>+ <button className="btn btn-secondary btn-loading">+ <span className="spinner spinner-sm"><span className="spinner-ring"></span></span>+ Loading...+ </button>+ </div>+ </div>+ </div>+ )}++ {/* ── FORMS ── */}+ {activeSection === 'forms' && (+ <div className="space-y-6">+ <SectionTitle title="Text Inputs" />+ <div className="card" style={{ padding: 24 }}>+ <div className="form-group">+ <label>Default Input</label>+ <input type="text" placeholder="Enter text..." value={inputValue} onChange={e => setInputValue(e.target.value)} />+ <span className="hint">This is a hint text below the input</span>+ </div>+ <div className="form-group">+ <label>Disabled Input</label>+ <input type="text" placeholder="Disabled..." disabled />+ </div>+ </div>++ <SectionTitle title="Select & Textarea" />+ <div className="card" style={{ padding: 24 }}>+ <div className="form-group">+ <label>Select Dropdown</label>+ <select className="form-select" value={selectValue} onChange={e => setSelectValue(e.target.value)}>+ <option value="">Choose an option...</option>+ <option value="1">Option 1</option>+ <option value="2">Option 2</option>+ </select>+ </div>+ <div className="form-group">+ <label>Textarea</label>+ <textarea rows={3} placeholder="Enter multiline text..." />+ </div>+ <div className="form-group">+ <label>Code Editor</label>+ <textarea className="code-editor" rows={3} placeholder="server { listen 80; }" />+ </div>+ </div>++ <SectionTitle title="Form Row (2-column)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="form-row">+ <div className="form-group">+ <label>First Name</label>+ <input type="text" placeholder="John" />+ </div>+ <div className="form-group">+ <label>Last Name</label>+ <input type="text" placeholder="Doe" />+ </div>+ </div>+ </div>++ <SectionTitle title="Inline Form" />+ <div className="card" style={{ padding: 24 }}>+ <div className="install-form">+ <input type="text" placeholder="Search packages..." />+ <button className="btn btn-primary"><Search size={16} /> Search</button>+ </div>+ </div>++ <SectionTitle title="Checkbox Toggle" />+ <div className="card" style={{ padding: 24 }}>+ <label className="filter-toggle">+ <input type="checkbox" checked={checkValue} onChange={e => setCheckValue(e.target.checked)} />+ <span>Enable feature</span>+ </label>+ </div>+ </div>+ )}++ {/* ── TABLES ── */}+ {activeSection === 'tables' && (+ <div className="space-y-6">+ <SectionTitle title="Standard Table (.table)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>SSH Authorized Keys</h3>+ <div className="card-actions">+ <button className="btn btn-sm btn-primary">Add Key</button>+ <button className="btn btn-sm btn-secondary">Refresh</button>+ </div>+ </div>+ <div className="card-body">+ <table className="table">+ <thead>+ <tr>+ <th>Type</th>+ <th>Fingerprint</th>+ <th>Comment</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td><code>ssh-ed25519</code></td>+ <td><code>SHA256:abc123def456...</code></td>+ <td>deploy@server</td>+ <td><button className="btn btn-sm btn-danger">Remove</button></td>+ </tr>+ <tr>+ <td><code>ssh-rsa</code></td>+ <td><code>SHA256:xyz789ghi012...</code></td>+ <td>admin@laptop</td>+ <td><button className="btn btn-sm btn-danger">Remove</button></td>+ </tr>+ <tr>+ <td><code>ssh-ed25519</code></td>+ <td><code>SHA256:mno345pqr678...</code></td>+ <td>ci-pipeline</td>+ <td><button className="btn btn-sm btn-danger">Remove</button></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <SectionTitle title="Table with Badges" />+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Scan History</h3>+ <button className="btn btn-sm btn-secondary">Refresh</button>+ </div>+ <div className="card-body">+ <table className="table">+ <thead>+ <tr>+ <th>Date</th>+ <th>Directory</th>+ <th>Status</th>+ <th>Threats</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td>2026-03-29 14:30</td>+ <td>/var/www</td>+ <td><span className="badge badge-success">completed</span></td>+ <td><span className="badge badge-success">Clean</span></td>+ </tr>+ <tr>+ <td>2026-03-28 09:15</td>+ <td>/home/deploy</td>+ <td><span className="badge badge-success">completed</span></td>+ <td><span className="badge badge-error">2 found</span></td>+ </tr>+ <tr>+ <td>2026-03-27 22:00</td>+ <td>/var/www</td>+ <td><span className="badge badge-warning">cancelled</span></td>+ <td>—</td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <SectionTitle title="Table with Status Badges" />+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Firewall Rules</h3>+ </div>+ <div className="card-body">+ <table className="table">+ <thead>+ <tr>+ <th>Port</th>+ <th>Protocol</th>+ <th>Action</th>+ <th>Source</th>+ <th>Status</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td><code>22</code></td>+ <td>TCP</td>+ <td><span className="badge badge-success">Allow</span></td>+ <td>Anywhere</td>+ <td><StatusBadge status="active" /></td>+ </tr>+ <tr>+ <td><code>80</code></td>+ <td>TCP</td>+ <td><span className="badge badge-success">Allow</span></td>+ <td>Anywhere</td>+ <td><StatusBadge status="active" /></td>+ </tr>+ <tr>+ <td><code>3306</code></td>+ <td>TCP</td>+ <td><span className="badge badge-error">Deny</span></td>+ <td>External</td>+ <td><StatusBadge status="active" /></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ </div>+ )}++ {/* ── CARDS & STATS ── */}+ {activeSection === 'cards' && (+ <div className="space-y-6">+ <SectionTitle title="Basic Card" />+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Card Title</h3>+ <div className="card-actions">+ <button className="btn btn-sm btn-secondary">Refresh</button>+ <button className="btn btn-sm btn-primary">Action</button>+ </div>+ </div>+ <div className="card-body">+ <p className="text-secondary">Card body content with card-header and card-actions in the header.</p>+ </div>+ </div>++ <SectionTitle title="Stats Grid" />+ <div className="stats-grid">+ <div className="stat-card">+ <div className="stat-icon apps"><Server size={20} /></div>+ <div className="stat-content">+ <span className="stat-label">Applications</span>+ <span className="stat-value">12</span>+ </div>+ </div>+ <div className="stat-card">+ <div className="stat-icon databases"><Database size={20} /></div>+ <div className="stat-content">+ <span className="stat-label">Databases</span>+ <span className="stat-value">5</span>+ </div>+ </div>+ <div className="stat-card">+ <div className="stat-icon backups"><Cloud size={20} /></div>+ <div className="stat-content">+ <span className="stat-label">Backups</span>+ <span className="stat-value">24</span>+ </div>+ </div>+ <div className="stat-card">+ <div className="stat-icon size"><BarChart3 size={20} /></div>+ <div className="stat-content">+ <span className="stat-label">Disk Used</span>+ <span className="stat-value">48<span className="stat-suffix">GB</span></span>+ </div>+ </div>+ </div>++ <SectionTitle title="Metric Row" />+ <div className="card" style={{ padding: 24 }}>+ <div className="metric-row">+ <div className="metric-item">+ <span className="text-tertiary text-sm">CPU</span>+ <span className="metric-value">23%</span>+ </div>+ <div className="metric-item">+ <span className="text-tertiary text-sm">Memory</span>+ <span className="metric-value">1.2 GB</span>+ </div>+ <div className="metric-item">+ <span className="text-tertiary text-sm">Disk</span>+ <span className="metric-value">48 GB</span>+ </div>+ <div className="metric-item">+ <span className="text-tertiary text-sm">Network</span>+ <span className="metric-value">2.4 Mbps</span>+ </div>+ </div>+ </div>++ <SectionTitle title="Progress Bar" />+ <div className="card" style={{ padding: 24 }}>+ <div className="space-y-4">+ {[+ ['Storage', '48 / 100 GB', '48%', null],+ ['Memory', '6.2 / 8 GB', '78%', '#f59e0b'],+ ['CPU', '92%', '92%', '#ef4444'],+ ].map(([label, text, width, color]) => (+ <div key={label}>+ <div className="flex justify-between mb-1">+ <span className="text-sm text-secondary">{label}</span>+ <span className="text-sm mono">{text}</span>+ </div>+ <div className="progress-bar">+ <div className="progress-fill" style={{ width, ...(color && { background: color }) }} />+ </div>+ </div>+ ))}+ </div>+ </div>++ <SectionTitle title="Danger Zone" />+ <div className="danger-zone">+ <div>+ <h4>Delete Application</h4>+ <p className="text-secondary">Once deleted, this cannot be undone. All data will be permanently removed.</p>+ </div>+ <button className="btn btn-danger"><Trash2 size={16} /> Delete</button>+ </div>+ </div>+ )}++ {/* ── BADGES & STATUS ── */}+ {activeSection === 'badges' && (+ <div className="space-y-6">+ <SectionTitle title="Status Badges (Component)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap gap-3 mb-4">+ <StatusBadge status="online" />+ <StatusBadge status="running" />+ <StatusBadge status="healthy" />+ <StatusBadge status="active" />+ <StatusBadge status="connected" />+ </div>+ <div className="flex flex-wrap gap-3 mb-4">+ <StatusBadge status="offline" />+ <StatusBadge status="stopped" />+ <StatusBadge status="error" />+ <StatusBadge status="failed" />+ <StatusBadge status="disconnected" />+ </div>+ <div className="flex flex-wrap gap-3 mb-4">+ <StatusBadge status="warning" />+ <StatusBadge status="degraded" />+ <StatusBadge status="pending" />+ <StatusBadge status="building" />+ <StatusBadge status="deploying" />+ </div>+ <div className="flex flex-wrap gap-3">+ <StatusBadge status="paused" />+ <StatusBadge status="unknown" />+ </div>+ </div>++ <SectionTitle title="Generic Badges (.badge)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap gap-3">+ <span className="badge badge-default">Default</span>+ <span className="badge badge-info">Info</span>+ <span className="badge badge-success">Success</span>+ <span className="badge badge-warning">Warning</span>+ <span className="badge badge-error">Error</span>+ </div>+ </div>++ <SectionTitle title="App Type / Env / DB Badges" />+ <div className="card" style={{ padding: 24 }}>+ <p className="text-sm text-tertiary mb-2">App Types</p>+ <div className="flex flex-wrap gap-3 mb-4">+ <span className="app-type">PHP</span>+ <span className="app-type">Python</span>+ <span className="app-type">Node.js</span>+ <span className="app-type">WordPress</span>+ <span className="app-type">Static</span>+ </div>+ <p className="text-sm text-tertiary mb-2">Environments</p>+ <div className="flex flex-wrap gap-3 mb-4">+ <span className="env-badge env-production">Production</span>+ <span className="env-badge env-staging">Staging</span>+ <span className="env-badge env-development">Development</span>+ </div>+ <p className="text-sm text-tertiary mb-2">Database Types</p>+ <div className="flex flex-wrap gap-3 mb-4">+ <span className="db-type-badge mysql">MySQL</span>+ <span className="db-type-badge postgresql">PostgreSQL</span>+ </div>+ <p className="text-sm text-tertiary mb-2">SSL</p>+ <div className="flex flex-wrap gap-3">+ <span className="ssl-badge"><Lock size={12} /> SSL Active</span>+ </div>+ </div>+ </div>+ )}++ {/* ── ALERTS & ERRORS ── */}+ {activeSection === 'alerts' && (+ <div className="space-y-6">+ <SectionTitle title="Alert Banners (.alert)" />+ <div className="space-y-2">+ <div className="alert alert-success">+ <CheckCircle size={16} /> Operation completed successfully.+ </div>+ <div className="alert alert-danger">+ <AlertTriangle size={16} /> Failed to connect to the server.+ </div>+ <div className="alert alert-warning">+ <AlertCircle size={16} /> SSL certificate expires in 7 days.+ </div>+ <div className="alert alert-info">+ <Info size={16} /> A new version is available for update.+ </div>+ </div>++ <SectionTitle title="Alert with Close Button" />+ <div className="space-y-2">+ <div className="alert alert-danger" style={{ position: 'relative' }}>+ Something went wrong while saving.+ <button className="alert-close">×</button>+ </div>+ </div>++ <SectionTitle title="Error Message (.error-message)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="error-message">+ <AlertTriangle size={16} /> This is an inline error message.+ </div>+ </div>++ <SectionTitle title="Error Banner (.error-banner)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="error-banner">+ <AlertTriangle size={16} /> This is a full-width error banner.+ </div>+ </div>+ </div>+ )}++ {/* ── MODALS ── */}+ {activeSection === 'modals' && (+ <div className="space-y-6">+ <SectionTitle title="Modal Dialog" />+ <div className="card" style={{ padding: 24 }}>+ <button className="btn btn-primary" onClick={() => setModalOpen(true)}>+ Open Modal+ </button>+ <Modal+ open={modalOpen}+ onClose={() => setModalOpen(false)}+ title="Example Modal"+ footer={<>+ <button className="btn btn-secondary" onClick={() => setModalOpen(false)}>Cancel</button>+ <button className="btn btn-primary" onClick={() => setModalOpen(false)}>Save Changes</button>+ </>}+ >+ <p className="text-secondary">Modal body content with a form field.</p>+ <div className="form-group mt-4">+ <label>Example Field</label>+ <input type="text" placeholder="Type something..." />+ </div>+ </Modal>+ </div>++ <SectionTitle title="Confirm Dialogs" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex flex-wrap gap-3">+ <button className="btn btn-danger" onClick={() => { setConfirmVariant('danger'); setConfirmOpen(true); }}>Danger</button>+ <button className="btn btn-secondary" onClick={() => { setConfirmVariant('warning'); setConfirmOpen(true); }}>Warning</button>+ <button className="btn btn-secondary" onClick={() => { setConfirmVariant('info'); setConfirmOpen(true); }}>Info</button>+ </div>+ <ConfirmDialog+ isOpen={confirmOpen}+ title={`${confirmVariant.charAt(0).toUpperCase() + confirmVariant.slice(1)} Action`}+ message="Are you sure you want to proceed? This action may have consequences."+ variant={confirmVariant}+ confirmText="Proceed"+ onConfirm={() => setConfirmOpen(false)}+ onCancel={() => setConfirmOpen(false)}+ />+ </div>+ </div>+ )}++ {/* ── TABS ── */}+ {activeSection === 'tabs' && (+ <div className="space-y-6">+ <SectionTitle title="Tabs (Primary)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="tabs-container">+ <div className="tabs">+ {['tab1', 'tab2', 'tab3'].map(t => (+ <button key={t} className={`tab ${tabActive === t ? 'active' : ''}`} onClick={() => setTabActive(t)}>+ {t === 'tab1' && <><Server size={14} /> General</>}+ {t === 'tab2' && <><Shield size={14} /> Security</>}+ {t === 'tab3' && <><Activity size={14} /> Monitoring</>}+ </button>+ ))}+ </div>+ <div className="tab-content" style={{ padding: '16px 0' }}>+ {tabActive === 'tab1' && <p className="text-secondary">General tab content.</p>}+ {tabActive === 'tab2' && <p className="text-secondary">Security tab content.</p>}+ {tabActive === 'tab3' && <p className="text-secondary">Monitoring tab content.</p>}+ </div>+ </div>+ </div>+ </div>+ )}++ {/* ── LISTS & INFO ── */}+ {activeSection === 'lists' && (+ <div className="space-y-6">+ <SectionTitle title="Info List (Key-Value)" />+ <div className="card" style={{ padding: 24 }}>+ <div className="info-list">+ {[+ ['Hostname', 'srv-01.example.com', true],+ ['IP Address', '192.168.1.100', true],+ ['OS', 'Ubuntu 22.04 LTS', false],+ ['Uptime', '42 days, 7 hours', false],+ ].map(([label, value, mono]) => (+ <div key={label} className="info-item">+ <span className="info-label">{label}</span>+ <span className={`info-value ${mono ? 'mono' : ''}`}>{value}</span>+ </div>+ ))}+ <div className="info-item">+ <span className="info-label">Status</span>+ <StatusBadge status="online" />+ </div>+ </div>+ </div>++ <SectionTitle title="Environment Variables" />+ <div className="card" style={{ padding: 24 }}>+ <div className="env-list">+ {[+ ['DATABASE_URL', 'postgresql://localhost:5432/mydb'],+ ['SECRET_KEY', '\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022'],+ ['NODE_ENV', 'production'],+ ].map(([key, val]) => (+ <div key={key} className="env-item">+ <span className="env-key">{key}</span>+ <span className="env-value">{val}</span>+ </div>+ ))}+ </div>+ </div>++ <SectionTitle title="Package List" />+ <div className="card" style={{ padding: 24 }}>+ <div className="packages-list">+ {[['nginx', '1.24.0'], ['postgresql-15', '15.4'], ['redis-server', '7.2.1']].map(([name, ver]) => (+ <div key={name} className="package-item">+ <span className="package-name">{name}</span>+ <span className="package-version">{ver}</span>+ </div>+ ))}+ </div>+ </div>+ </div>+ )}++ {/* ── FEEDBACK & LOADING ── */}+ {activeSection === 'feedback' && (+ <div className="space-y-6">+ <SectionTitle title="Spinners" />+ <div className="card" style={{ padding: 24 }}>+ <div className="flex items-center gap-6">+ {['sm', 'md', 'lg'].map(size => (+ <div key={size} className="flex flex-col items-center gap-2">+ <Spinner size={size} />+ <span className="text-sm text-tertiary">{size}</span>+ </div>+ ))}+ </div>+ </div>++ <SectionTitle title="Loading States" />+ <div className="card" style={{ padding: 24 }}>+ <p className="text-sm text-tertiary mb-2">Standard: .loading class</p>+ <div className="loading" style={{ position: 'relative', minHeight: 60 }}>Loading services...</div>+ </div>+ </div>+ )}++ {/* ── EMPTY STATES ── */}+ {activeSection === 'empty' && (+ <div className="space-y-6">+ <SectionTitle title="EmptyState Component (Standard)" />+ <p className="text-secondary text-sm mb-2">Use this for all empty states. Import from components/EmptyState.</p>+ <EmptyState />++ <SectionTitle title="With Icon, Title, Description, Action" />+ <EmptyState+ icon={Server}+ title="No servers connected"+ description="Connect your first server to start managing it from the dashboard."+ action={<button className="btn btn-primary"><Plus size={16} /> Add Server</button>}+ />++ <SectionTitle title="Search Empty" />+ <EmptyState+ icon={Search}+ title="No results found"+ description="Try adjusting your search or filter criteria."+ />++ <SectionTitle title="Different Contexts" />+ <div className="grid grid-cols-2 gap-4">+ <EmptyState icon={Database} title="No databases" description="Create your first database." action={<button className="btn btn-primary btn-sm"><Plus size={14} /> Create</button>} />+ <EmptyState icon={Globe} title="No domains configured" description="Add a domain to get started." action={<button className="btn btn-primary btn-sm"><Plus size={14} /> Add Domain</button>} />+ <EmptyState icon={Key} title="No SSH keys" description="Add an SSH key for secure access." action={<button className="btn btn-primary btn-sm"><Plus size={14} /> Add Key</button>} />+ <EmptyState icon={GitBranch} title="No Git server installed" description="Install Gitea to host repositories." action={<button className="btn btn-primary btn-sm"><Download size={14} /> Install</button>} />+ <EmptyState icon={Package} title="No Docker containers" description="Docker is not installed on this system." action={<button className="btn btn-primary btn-sm"><RefreshCw size={14} /> Retry</button>} />+ <EmptyState icon={Shield} title="No scan history" description="Run a scan to check for threats." action={<button className="btn btn-primary btn-sm"><Activity size={14} /> Quick Scan</button>} />+ </div>+ </div>+ )}++ {/* ── PAGE HEADERS ── */}+ {activeSection === 'pageheaders' && (+ <div className="space-y-6">+ <SectionTitle title="Standard Page Header (.page-header)" />+ <p className="text-sm text-secondary mb-2">The canonical pattern. Use this for all pages.</p>+ <div className="card" style={{ padding: 24 }}>+ <div className="page-header" style={{ margin: 0, padding: 0 }}>+ <div>+ <h1>Page Title</h1>+ <p className="subtitle">Description of the page</p>+ </div>+ <div className="flex gap-2">+ <button className="btn btn-secondary"><RefreshCw size={16} /> Refresh</button>+ <button className="btn btn-primary"><Plus size={16} /> Create</button>+ </div>+ </div>+ </div>++ <SectionTitle title="Header with Stats Subtitle" />+ <div className="card" style={{ padding: 24 }}>+ <div className="page-header" style={{ margin: 0, padding: 0 }}>+ <div>+ <h1>Services</h1>+ <p className="subtitle">12 services · 9 live</p>+ </div>+ <button className="btn btn-primary"><Plus size={16} /> New Service</button>+ </div>+ </div>++ <SectionTitle title="Header with Conditional Actions" />+ <div className="card" style={{ padding: 24 }}>+ <div className="page-header" style={{ margin: 0, padding: 0 }}>+ <div>+ <h1>Git Server</h1>+ <p className="subtitle">Self-hosted Git repository management</p>+ </div>+ <div className="flex gap-2">+ <button className="btn btn-secondary"><ExternalLink size={16} /> Open Gitea</button>+ <button className="btn btn-danger">Stop Server</button>+ </div>+ </div>+ </div>++ <SectionTitle title="Card with Header + Actions" />+ <p className="text-sm text-secondary mb-2">For cards inside pages that need their own header row.</p>+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Card Section Title</h3>+ <div className="card-actions">+ <button className="btn btn-sm btn-primary">Add</button>+ <button className="btn btn-sm btn-secondary">Refresh</button>+ </div>+ </div>+ <div className="card-body">+ <p className="text-secondary">Content below the card header.</p>+ </div>+ </div>+ </div>+ )}++ {/* ── PAGE PATTERNS ── */}+ {activeSection === 'patterns' && (+ <div className="space-y-6">+ <SectionTitle title="Not-Installed Page Pattern" />+ <p className="text-sm text-secondary mb-2">When a service is not installed (Git, Docker, FTP, etc.), show a centered empty state with install action.</p>+ <EmptyState+ icon={GitBranch}+ title="No Git Server Installed"+ description="Install Gitea to host and manage your Git repositories locally."+ action={<button className="btn btn-primary btn-lg"><Download size={16} /> Install Git Server</button>}+ />++ <SectionTitle title="Service Unavailable Pattern" />+ <p className="text-sm text-secondary mb-2">When a service exists but can't connect.</p>+ <EmptyState+ icon={WifiOff}+ title="Docker Not Available"+ description="Docker is not installed or not running on this system."+ action={<button className="btn btn-primary"><RefreshCw size={16} /> Retry Connection</button>}+ />++ <SectionTitle title="Card + Table Pattern" />+ <p className="text-sm text-secondary mb-2">Standard layout for tabular data inside a card.</p>+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Authorized Keys</h3>+ <div className="card-actions">+ <button className="btn btn-sm btn-primary"><Plus size={14} /> Add Key</button>+ <button className="btn btn-sm btn-secondary"><RefreshCw size={14} /></button>+ </div>+ </div>+ <div className="card-body">+ <table className="table">+ <thead>+ <tr><th>Type</th><th>Fingerprint</th><th>Comment</th><th>Actions</th></tr>+ </thead>+ <tbody>+ <tr>+ <td><code>ssh-ed25519</code></td>+ <td><code>SHA256:abc123...</code></td>+ <td>deploy@server</td>+ <td><button className="btn btn-sm btn-danger">Remove</button></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <SectionTitle title="Card + Empty State Pattern" />+ <p className="text-sm text-secondary mb-2">When the card table has no data.</p>+ <div className="card" style={{ padding: 24 }}>+ <div className="card-header">+ <h3>Scan History</h3>+ <button className="btn btn-sm btn-secondary">Refresh</button>+ </div>+ <div className="card-body">+ <EmptyState+ icon={Search}+ title="No scans yet"+ description="Start a scan above to check for threats."+ />+ </div>+ </div>++ <SectionTitle title="Card Grid (Scan Options)" />+ <p className="text-sm text-secondary mb-2">Action cards in a grid for scan/setup type selections.</p>+ <div className="grid grid-cols-3 gap-4">+ {[+ { icon: Zap, title: 'Quick Scan', desc: 'Scan common web directories' },+ { icon: Globe, title: 'Full Scan', desc: 'Scan entire system (slow)' },+ { icon: FolderOpen, title: 'Custom Path', desc: 'Scan a specific directory' },+ ].map(item => (+ <div key={item.title} className="card" style={{ padding: 24, textAlign: 'center', cursor: 'pointer' }}>+ <div className="flex justify-center mb-3">+ <div className="stat-icon"><item.icon size={20} /></div>+ </div>+ <h4 style={{ marginBottom: 4 }}>{item.title}</h4>+ <p className="text-sm text-tertiary mb-4">{item.desc}</p>+ <button className="btn btn-primary btn-sm">Start Scan</button>+ </div>+ ))}+ </div>++ <SectionTitle title="Page Loading State" />+ <p className="text-sm text-secondary mb-2">Full-page loading with centered spinner.</p>+ <div className="card" style={{ padding: 48 }}>+ <div className="flex flex-col items-center gap-3">+ <Spinner size="lg" />+ <span className="text-tertiary">Loading services...</span>+ </div>+ </div>++ <SectionTitle title="Error Banner at Page Level" />+ <p className="text-sm text-secondary mb-2">Shown below page header when an API call fails.</p>+ <div className="alert alert-danger" style={{ position: 'relative' }}>+ Failed to load services. Please try again.+ <button className="alert-close">×</button>+ </div>++ <SectionTitle title="Log Viewer (Sidebar + Content)" />+ <p className="text-sm text-secondary mb-2">Split layout: file list sidebar + log content viewer with toolbar.</p>+ <div style={{ height: 360 }}>+ <div className="logs-layout" style={{ height: '100%' }}>+ <div className="logs-sidebar">+ <div className="sidebar-header">+ <h3>Log Files</h3>+ <button className="btn btn-secondary btn-sm"><RefreshCw size={14} /></button>+ </div>+ <div className="log-files-list">+ {[+ { name: 'error.log', path: '/var/log/nginx/error.log', size: '2.4 MB', type: 'error' },+ { name: 'access.log', path: '/var/log/nginx/access.log', size: '18.7 MB', type: 'access' },+ { name: 'syslog', path: '/var/log/syslog', size: '5.1 MB', type: 'default' },+ ].map((log, i) => (+ <div key={i} className={`log-file-item ${i === 0 ? 'active' : ''}`}>+ <div className={`log-icon ${log.type}`}>+ <FileText size={16} />+ </div>+ <div className="log-file-info">+ <span className="log-file-name">{log.name}</span>+ <span className="log-file-path">{log.path}</span>+ </div>+ <span className="log-file-size">{log.size}</span>+ </div>+ ))}+ </div>+ </div>+ <div className="logs-viewer">+ <div className="viewer-toolbar">+ <div className="toolbar-left">+ <div className="search-input">+ <Search size={16} />+ <input type="text" placeholder="Search pattern..." />+ </div>+ <select className="lines-select">+ <option>100 lines</option>+ <option>200 lines</option>+ <option>500 lines</option>+ </select>+ </div>+ <div className="toolbar-right">+ <label className="auto-refresh-toggle">+ <input type="checkbox" />+ <span>Auto-refresh</span>+ </label>+ <button className="btn btn-secondary btn-sm">Refresh</button>+ <button className="btn btn-secondary btn-sm">Download</button>+ <button className="btn btn-danger btn-sm">Clear</button>+ </div>+ </div>+ <div className="log-content">+ <pre>{`[2026-03-29 14:23:01] ERROR connect() failed (111: Connection refused)\n[2026-03-29 14:23:05] WARN upstream timed out (110: Connection timed out)\n[2026-03-29 14:23:12] INFO nginx/1.24.0 started\n[2026-03-29 14:23:12] INFO worker process 1234 started`}</pre>+ </div>+ </div>+ </div>+ </div>++ <SectionTitle title="Journal Controls (Filter Chips)" />+ <p className="text-sm text-secondary mb-2">Journal tab with service unit chips and priority filter.</p>+ <div className="card" style={{ padding: 24 }}>+ <div className="journal-controls">+ <div className="control-group">+ <label>Service/Unit</label>+ <div className="input-with-suggestions">+ <input type="text" placeholder="All services" />+ <div className="quick-units">+ {['nginx', 'mysql', 'postgresql', 'docker', 'sshd', 'cron'].map(u => (+ <button key={u} className={`unit-chip ${u === 'nginx' ? 'active' : ''}`}>{u}</button>+ ))}+ </div>+ </div>+ </div>+ <div className="control-group">+ <label>Lines</label>+ <select><option>100</option><option>200</option></select>+ </div>+ <div className="control-group">+ <label>Priority</label>+ <select><option>All</option><option>Error</option><option>Warning</option></select>+ </div>+ <button className="btn btn-primary">Load Logs</button>+ </div>+ </div>++ <SectionTitle title="Code/Log Viewer Block" />+ <p className="text-sm text-secondary mb-2">Monospace preformatted content with dark background.</p>+ <div className="journal-viewer" style={{ height: 160 }}>+ <pre>{`Mar 29 14:23:01 srv-01 nginx[1234]: worker process started\nMar 29 14:23:02 srv-01 systemd[1]: Started Nginx HTTP Server\nMar 29 14:23:05 srv-01 sshd[5678]: Accepted publickey for deploy\nMar 29 14:23:12 srv-01 cron[91011]: (root) CMD (/usr/local/bin/backup.sh)`}</pre>+ </div>++ <SectionTitle title="Process Table with Usage Bars" />+ <p className="text-sm text-secondary mb-2">Table with inline usage bars and action buttons.</p>+ <div className="processes-table-wrapper">+ <table className="table processes-table" style={{ minWidth: 'auto' }}>+ <thead>+ <tr>+ <th>PID</th>+ <th>Name</th>+ <th>User</th>+ <th>CPU %</th>+ <th>Memory %</th>+ <th>Status</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ {[+ { pid: 1234, name: 'nginx', user: 'www-data', cpu: 12.5, mem: 3.2, status: 'running' },+ { pid: 5678, name: 'postgres', user: 'postgres', cpu: 8.1, mem: 15.4, status: 'sleeping' },+ { pid: 9012, name: 'node', user: 'deploy', cpu: 45.2, mem: 22.1, status: 'running' },+ ].map(p => (+ <tr key={p.pid}>+ <td className="mono">{p.pid}</td>+ <td><div className="process-name"><span>{p.name}</span></div></td>+ <td>{p.user}</td>+ <td>+ <div className="usage-cell">+ <div className="usage-bar cpu" style={{ width: `${p.cpu}%` }} />+ <span>{p.cpu.toFixed(1)}%</span>+ </div>+ </td>+ <td>+ <div className="usage-cell">+ <div className="usage-bar memory" style={{ width: `${p.mem}%` }} />+ <span>{p.mem.toFixed(1)}%</span>+ </div>+ </td>+ <td><span className={`badge badge-${p.status === 'running' ? 'success' : 'warning'}`}>{p.status}</span></td>+ <td>+ <div className="action-buttons">+ <button className="btn btn-secondary btn-xs"><XCircle size={12} /></button>+ <button className="btn btn-danger btn-xs"><AlertTriangle size={12} /></button>+ </div>+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>++ <SectionTitle title="Detail Panel" />+ <p className="text-sm text-secondary mb-2">Expandable detail panel below a list/table selection.</p>+ <div className="process-details-panel">+ <div className="panel-header">+ <h3>Process Details</h3>+ <button className="btn btn-secondary btn-sm">Close</button>+ </div>+ <div className="panel-body">+ <div className="details-grid">+ {[+ ['PID', '1234', true], ['Name', 'nginx', false], ['User', 'www-data', false],+ ['Status', 'running', false], ['CPU', '12.50%', false], ['Memory', '128.4 MB', false],+ ['Threads', '4', false], ['Created', '2026-03-29 08:00:00', false],+ ].map(([label, value, mono]) => (+ <div key={label} className="detail-item">+ <span className="detail-label">{label}</span>+ <span className={`detail-value ${mono ? 'mono' : ''}`}>{value}</span>+ </div>+ ))}+ </div>+ <div className="command-line">+ <span className="detail-label">Command</span>+ <code>/usr/sbin/nginx -g 'daemon off;'</code>+ </div>+ </div>+ </div>++ <SectionTitle title="Service Cards Grid" />+ <p className="text-sm text-secondary mb-2">Grid of service cards with status dot, metadata, and action buttons.</p>+ <div className="services-grid">+ {[+ { name: 'nginx', status: 'running', desc: 'HTTP and reverse proxy server', pid: 1234, mem: '48.2 MB' },+ { name: 'postgresql', status: 'running', desc: 'PostgreSQL database server', pid: 5678, mem: '256 MB' },+ { name: 'redis-server', status: 'inactive', desc: 'In-memory data structure store', pid: null, mem: null },+ { name: 'php8.2-fpm', status: 'running', desc: 'PHP FastCGI Process Manager', pid: 3456, mem: '92 MB' },+ ].map(s => (+ <div key={s.name} className="service-card">+ <div className="service-header">+ <div className="service-info">+ <span className={`status-dot ${s.status === 'running' ? 'success' : 'secondary'}`} />+ <h4>{s.name}</h4>+ </div>+ <span className={`badge badge-${s.status === 'running' ? 'success' : 'default'}`}>{s.status}</span>+ </div>+ <p className="service-description">{s.desc}</p>+ <div className="service-meta">+ {s.pid && <span><span className="meta-label">PID:</span> {s.pid}</span>}+ {s.mem && <span><span className="meta-label">Memory:</span> {s.mem}</span>}+ </div>+ <div className="service-actions">+ {s.status === 'running' ? (+ <>+ <button className="btn btn-secondary btn-sm">Restart</button>+ <button className="btn btn-secondary btn-sm">Stop</button>+ </>+ ) : (+ <button className="btn btn-primary btn-sm">Start</button>+ )}+ <button className="btn btn-secondary btn-sm">Logs</button>+ </div>+ </div>+ ))}+ </div>+ </div>+ )}++ {/* ── UTILITIES ── */}+ {activeSection === 'utilities' && (+ <div className="space-y-6">+ <SectionTitle title="Flex Utilities" />+ <div className="card" style={{ padding: 24 }}>+ <p className="text-sm text-tertiary mb-2">.flex .items-center .gap-3</p>+ <div className="flex items-center gap-3 mb-4" style={{ padding: 8, border: '1px dashed var(--border-active)' }}>+ <div className="styleguide__util-box">A</div>+ <div className="styleguide__util-box">B</div>+ <div className="styleguide__util-box">C</div>+ </div>+ <p className="text-sm text-tertiary mb-2">.flex .justify-between</p>+ <div className="flex justify-between mb-4" style={{ padding: 8, border: '1px dashed var(--border-active)' }}>+ <div className="styleguide__util-box">Left</div>+ <div className="styleguide__util-box">Right</div>+ </div>+ <p className="text-sm text-tertiary mb-2">.flex .flex-col .gap-2</p>+ <div className="flex flex-col gap-2" style={{ padding: 8, border: '1px dashed var(--border-active)', maxWidth: 200 }}>+ <div className="styleguide__util-box">Row 1</div>+ <div className="styleguide__util-box">Row 2</div>+ </div>+ </div>++ <SectionTitle title="Grid Utilities" />+ <div className="card" style={{ padding: 24 }}>+ <p className="text-sm text-tertiary mb-2">.grid .grid-cols-4 .gap-3</p>+ <div className="grid grid-cols-4 gap-3">+ {[1,2,3,4,5,6,7,8].map(i => (+ <div key={i} className="styleguide__util-box">Cell {i}</div>+ ))}+ </div>+ </div>++ <SectionTitle title="Z-Index Scale" />+ <div className="card" style={{ padding: 24 }}>+ {[+ ['$z-dropdown', 10], ['$z-sticky', 20], ['$z-fixed', 30],+ ['$z-modal-backdrop', 40], ['$z-modal', 50], ['$z-tooltip', 60],+ ].map(([token, val]) => (+ <div key={token} className="flex items-center gap-4 mb-2">+ <span className="mono text-tertiary" style={{ minWidth: 180 }}>{token}</span>+ <span className="mono">{val}</span>+ </div>+ ))}+ </div>++ <SectionTitle title="Breakpoints" />+ <div className="card" style={{ padding: 24 }}>+ {[+ ['$breakpoint-sm', '640px'], ['$breakpoint-md', '768px'],+ ['$breakpoint-lg', '1024px'], ['$breakpoint-xl', '1280px'],+ ].map(([token, val]) => (+ <div key={token} className="flex items-center gap-4 mb-2">+ <span className="mono text-tertiary" style={{ minWidth: 180 }}>{token}</span>+ <span className="mono">{val}</span>+ </div>+ ))}+ </div>+ </div>+ )}+ </div>+ </div>+ );+}++function SectionTitle({ title }) {+ return <h2 className="styleguide__section-title">{title}</h2>;+}++function Swatch({ name, label, text }) {+ const style = text+ ? { color: `var(${name})`, background: 'var(--bg-card)' }+ : { background: `var(${name})` };+ return (+ <div className="styleguide__swatch">+ <div className="styleguide__swatch-preview" style={style}>+ {text && <span style={{ fontSize: 14, fontWeight: 600 }}>Aa</span>}+ </div>+ <span className="styleguide__swatch-label">{label}</span>+ <span className="styleguide__swatch-token">{name}</span>+ </div>+ );+}++function SwatchStatic({ color, label, token }) {+ return (+ <div className="styleguide__swatch">+ <div className="styleguide__swatch-preview" style={{ background: color }} />+ <span className="styleguide__swatch-label">{label}</span>+ <span className="styleguide__swatch-token">{token}</span>+ </div>+ );+}diff --git a/frontend/src/styles/components/_alerts.scss b/frontend/src/styles/components/_alerts.scssnew file mode 100644index 00000000..b02ef1fb--- /dev/null+++ b/frontend/src/styles/components/_alerts.scss@@ -0,0 +1,60 @@+// ============================================+// ALERT COMPONENT+// ============================================++.alert {+ position: relative;+ display: flex;+ align-items: center;+ gap: $space-2;+ padding: $space-3 $space-4;+ border-radius: $radius-md;+ font-size: $font-size-sm;+ margin-bottom: $space-4;++ &.alert-success,+ &.alert--success {+ background: $success-bg;+ border: 1px solid $success-border;+ color: $success;+ }++ &.alert-danger,+ &.alert--danger,+ &.alert--error {+ background: $danger-bg;+ border: 1px solid $danger-border;+ color: $danger;+ }++ &.alert-warning,+ &.alert--warning {+ background: $warning-bg;+ border: 1px solid $warning-border;+ color: $warning;+ }++ &.alert-info,+ &.alert--info {+ background: $info-bg;+ border: 1px solid $info-border;+ color: $info;+ }+}++.alert-close {+ position: absolute;+ top: $space-2;+ right: $space-3;+ background: none;+ border: none;+ font-size: $font-size-lg;+ color: inherit;+ opacity: 0.6;+ cursor: pointer;+ padding: 0;++ &:hover {+ opacity: 1;+ }+}diff --git a/frontend/src/styles/components/_build.scss b/frontend/src/styles/components/_build.scssindex 28d65b3b..ca90081d 100644--- a/frontend/src/styles/components/_build.scss+++ b/frontend/src/styles/components/_build.scss@@ -230,36 +230,6 @@width: 90%;}-// Alert with close button-.alert {- position: relative;- padding: $space-4;- border-radius: $radius-md;- margin-bottom: $space-4;-- &-danger {- background: $danger-bg;- border: 1px solid $danger-border;- color: $danger;- }-- &-close {- position: absolute;- top: $space-2;- right: $space-3;- background: none;- border: none;- font-size: $font-size-lg;- color: inherit;- opacity: 0.6;- cursor: pointer;-- &:hover {- opacity: 1;- }- }-}-// Button extra small.btn-xs {padding: $space-1 $space-2;diff --git a/frontend/src/styles/components/_cards.scss b/frontend/src/styles/components/_cards.scssindex c0f90cd6..6e4a39b9 100644--- a/frontend/src/styles/components/_cards.scss+++ b/frontend/src/styles/components/_cards.scss@@ -8,9 +8,6 @@position: relative;overflow: hidden;- &:hover {- transform: translateY(-2px);- }}.card-header {@@ -194,7 +191,8 @@border-radius: $radius-xl;border: 1px solid $border-subtle;- svg {+ > svg,+ &__icon svg {color: $text-tertiary;margin-bottom: $space-4;}@@ -211,6 +209,17 @@}}+// Card body (content area below card-header)+.card-body {+ padding: 0;+}++// Card actions (button row inside card-header)+.card-actions {+ display: flex;+ gap: $space-2;+}+// Section header.section-header {@include flex-between();@@ -224,16 +233,19 @@// Danger zone card.danger-zone {- border-color: fade($danger, 30%);+ @include flex-between();+ padding: $space-6;+ border: 1px solid fade($danger, 30%);background: fade($danger, 5%);+ border-radius: $radius-xl;- h4 {+ h3, h4 {color: $danger;margin-bottom: $space-2;}p {color: $text-secondary;- margin-bottom: $space-4;+ margin: 0;}}diff --git a/frontend/src/styles/components/_deploy.scss b/frontend/src/styles/components/_deploy.scssindex 76847c64..4561934c 100644--- a/frontend/src/styles/components/_deploy.scss+++ b/frontend/src/styles/components/_deploy.scss@@ -252,10 +252,8 @@word-break: break-all;}-// Card Actions-.card-actions {- display: flex;- gap: $space-2;+// Card Actions (deploy-specific footer variant)+.deploy-setup .card-actions {margin-top: $space-4;padding-top: $space-4;border-top: 1px solid $border-subtle;diff --git a/frontend/src/styles/components/_tables.scss b/frontend/src/styles/components/_tables.scssnew file mode 100644index 00000000..7fccd34b--- /dev/null+++ b/frontend/src/styles/components/_tables.scss@@ -0,0 +1,53 @@+// ============================================+// TABLE COMPONENT+// ============================================++.table {+ width: 100%;+ border-collapse: collapse;+ font-size: $font-size-sm;++ thead {+ th {+ padding: $space-3 $space-4;+ text-align: left;+ font-weight: $font-weight-semibold;+ font-size: $font-size-xs + 1;+ color: $text-tertiary;+ text-transform: uppercase;+ letter-spacing: 0.03em;+ border-bottom: 1px solid $border-default;+ white-space: nowrap;+ }+ }++ tbody {+ tr {+ border-bottom: 1px solid $border-subtle;+ @include transition(background);++ &:hover {+ background: $bg-hover;+ }++ &:last-child {+ border-bottom: none;+ }+ }++ td {+ padding: $space-3 $space-4;+ color: $text-primary;+ vertical-align: middle;++ code {+ font-family: $font-mono;+ font-size: $font-size-xs;+ background: $bg-elevated;+ padding: $space-1 $space-2;+ border-radius: $radius-sm;+ color: $text-secondary;+ }+ }+ }+}diff --git a/frontend/src/styles/main.scss b/frontend/src/styles/main.scssindex bce72483..16ad7573 100644--- a/frontend/src/styles/main.scss+++ b/frontend/src/styles/main.scss@@ -31,6 +31,8 @@// --------------------------------------------@import 'components/_buttons';@import 'components/_cards';+@import 'components/_tables';+@import 'components/_alerts';@import 'components/_modals';@import 'components/_forms';@import 'components/_badges';@@ -99,3 +101,4 @@@import 'pages/_status-pages';@import 'pages/_cloud-provision';@import 'pages/_marketplace';+@import 'pages/_style-guide';diff --git a/frontend/src/styles/pages/_security.scss b/frontend/src/styles/pages/_security.scssindex 289c6123..4ce53f0e 100644--- a/frontend/src/styles/pages/_security.scss+++ b/frontend/src/styles/pages/_security.scss@@ -893,7 +893,8 @@padding: $space-8;text-align: center;- svg {+ > svg,+ &__icon svg {color: $text-tertiary;margin-bottom: $space-4;}diff --git a/frontend/src/styles/pages/_settings.scss b/frontend/src/styles/pages/_settings.scssindex ad17aa1e..48d37c82 100644--- a/frontend/src/styles/pages/_settings.scss+++ b/frontend/src/styles/pages/_settings.scss@@ -300,38 +300,7 @@}}-// Alert Messages-.alert {- display: flex;- align-items: center;- gap: $space-2;- padding: $space-3 $space-4;- border-radius: $radius-md;- font-size: $font-size-sm;- margin-bottom: $space-4;-- &.alert-success,- &.alert--success {- background: $success-bg;- border: 1px solid $success-border;- color: $success;- }-- &.alert-danger,- &.alert--danger,- &.alert--error {- background: $danger-bg;- border: 1px solid $danger-border;- color: $danger;- }-- &.alert-warning,- &.alert--warning {- background: $warning-bg;- border: 1px solid $warning-border;- color: $warning;- }-}+// Alert Messages — see components/_alerts.scss// Session Items.session-item {diff --git a/frontend/src/styles/pages/_style-guide.scss b/frontend/src/styles/pages/_style-guide.scssnew file mode 100644index 00000000..97d5dfb2--- /dev/null+++ b/frontend/src/styles/pages/_style-guide.scss@@ -0,0 +1,124 @@+// ============================================+// STYLE GUIDE - Dev-only reference page+// ============================================++.styleguide {+ // Nav tabs for sections+ &__nav {+ display: flex;+ flex-wrap: wrap;+ gap: $space-2;+ margin-bottom: $space-6;+ padding-bottom: $space-4;+ border-bottom: 1px solid $border-default;+ }++ &__nav-btn {+ display: inline-flex;+ align-items: center;+ gap: $space-2;+ padding: $space-2 $space-3;+ font-size: $font-size-sm;+ font-weight: $font-weight-medium;+ color: $text-tertiary;+ background: transparent;+ border: 1px solid transparent;+ border-radius: $radius-md;+ cursor: pointer;+ transition: all $transition-fast;++ &:hover {+ color: $text-primary;+ background: $bg-hover;+ }++ &.active {+ color: $accent-primary;+ background: $accent-glow;+ border-color: $accent-primary;+ }+ }++ &__content {+ min-height: 400px;+ }++ &__section-title {+ font-size: $font-size-lg;+ font-weight: $font-weight-semibold;+ color: $text-primary;+ margin-bottom: $space-3;+ padding-bottom: $space-2;+ border-bottom: 1px solid $border-subtle;+ }++ // Color swatches+ &__swatch-grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));+ gap: $space-3;+ }++ &__swatch {+ display: flex;+ flex-direction: column;+ gap: $space-1;+ }++ &__swatch-preview {+ width: 100%;+ height: 64px;+ border-radius: $radius-lg;+ border: 1px solid $border-default;+ display: flex;+ align-items: center;+ justify-content: center;+ }++ &__swatch-label {+ font-size: $font-size-sm;+ font-weight: $font-weight-medium;+ color: $text-primary;+ }++ &__swatch-token {+ font-family: $font-mono;+ font-size: $font-size-xs;+ color: $text-tertiary;+ }++ // Spacing bars+ &__spacing-bar {+ background: $accent-primary;+ border-radius: $radius-sm;+ min-width: 4px;+ }++ // Radius preview boxes+ &__radius-box {+ width: 64px;+ height: 64px;+ background: $accent-glow;+ border: 2px solid $accent-primary;+ }++ // Shadow preview boxes+ &__shadow-box {+ width: 80px;+ height: 80px;+ background: $bg-card;+ border-radius: $radius-lg;+ border: 1px solid $border-default;+ }++ // Utility demo boxes+ &__util-box {+ padding: $space-2 $space-3;+ background: $bg-elevated;+ border: 1px solid $border-default;+ border-radius: $radius-md;+ font-size: $font-size-sm;+ color: $text-secondary;+ text-align: center;+ }+}