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
feat(ui): restyle the Security suite (shell + 13 tabs) to the new look
Juan Denisff2192cb45ef
diff --git a/frontend/src/components/security/AuditTab.jsx b/frontend/src/components/security/AuditTab.jsxindex 1659bd0f..b4822968 100644--- a/frontend/src/components/security/AuditTab.jsx+++ b/frontend/src/components/security/AuditTab.jsx@@ -1,7 +1,21 @@import React, { useState } from 'react';import api from '../../services/api';import { Button } from '@/components/ui/button';-import { Badge } from '@/components/ui/badge';+import { ScoreGauge } from '@/components/ds';++const SEVERITY_TONES = {+ pass: 'green',+ critical: 'red',+ warning: 'amber',+ info: 'cyan',+};++const scoreColor = (score) => {+ if (score >= 80) return 'var(--green)';+ if (score >= 60) return 'var(--accent-bright)';+ if (score >= 40) return 'var(--amber)';+ return 'var(--red)';+};const AuditTab = () => {const [audit, setAudit] = useState(null);@@ -21,23 +35,6 @@ const AuditTab = () => {}};- const getSeverityVariant = (severity) => {- switch (severity) {- case 'pass': return 'success';- case 'critical': return 'destructive';- case 'warning': return 'warning';- case 'info': return 'info';- default: return 'secondary';- }- };-- const getScoreClass = (score) => {- if (score >= 80) return 'score-excellent';- if (score >= 60) return 'score-good';- if (score >= 40) return 'score-fair';- return 'score-poor';- };-return (<div className="audit-tab"><div className="card">@@ -68,25 +65,27 @@ const AuditTab = () => {{audit && !loading && (<div className="audit-results">- <div className={`audit-score ${getScoreClass(audit.score)}`}>- <span className="score-value">{audit.score}</span>- <span className="score-label">Security Score</span>- </div>-- <div className="audit-timestamp">- Generated: {new Date(audit.generated_at).toLocaleString()}+ <div className="sec-audit-score">+ <ScoreGauge+ value={audit.score}+ size={120}+ stroke={10}+ color={scoreColor(audit.score)}+ label="security score"+ />+ <div className="sec-audit-meta">Generated {new Date(audit.generated_at).toLocaleString()}</div></div>{Object.entries(audit.services || {}).map(([service, data]) => (<div key={service} className="audit-section"><h4>{service.toUpperCase()}</h4>- <div className="findings-list">+ <div className="sec-finding-list">{data.findings?.map((finding, idx) => (- <div key={idx} className="finding-item">- <Badge variant={getSeverityVariant(finding.severity)}>+ <div key={idx} className="sec-finding">+ <span className={`sec-state sec-state--${SEVERITY_TONES[finding.severity] || 'gray'}`}>{finding.severity}- </Badge>- <span className="finding-message">{finding.message}</span>+ </span>+ <span className="sec-finding__msg">{finding.message}</span></div>))}</div>diff --git a/frontend/src/components/security/AutoUpdatesTab.jsx b/frontend/src/components/security/AutoUpdatesTab.jsxindex ff916542..d2aa8b6d 100644--- a/frontend/src/components/security/AutoUpdatesTab.jsx+++ b/frontend/src/components/security/AutoUpdatesTab.jsx@@ -1,9 +1,8 @@import React, { useState, useEffect } from 'react';import api from '../../services/api';import { useToast } from '../../contexts/ToastContext';-import { InfoList, InfoItem } from '../InfoList';import { Button } from '@/components/ui/button';-import { Badge } from '@/components/ui/badge';+import { Pill } from '@/components/ds';const AutoUpdatesTab = () => {const [status, setStatus] = useState(null);@@ -92,21 +91,26 @@ const AutoUpdatesTab = () => {<Button variant="outline" size="sm" onClick={loadStatus}>Refresh</Button></div><div className="card-body">- <InfoList>- <InfoItem label="Package" value={status.package} />- <InfoItem label="Installed">- <Badge variant={status.installed ? 'success' : 'warning'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Package</span>+ <span className="v">{status.package}</span>+ </div>+ <div className="sk-info-row">+ <span className="k">Installed</span>+ <Pill kind={status.installed ? 'green' : 'amber'}>{status.installed ? 'Yes' : 'No'}- </Badge>- </InfoItem>- <InfoItem label="Status">- <Badge variant={status.enabled ? 'success' : 'secondary'}>+ </Pill>+ </div>+ <div className="sk-info-row">+ <span className="k">Status</span>+ <Pill kind={status.enabled ? 'green' : 'gray'}>{status.enabled ? 'Enabled' : 'Disabled'}- </Badge>- </InfoItem>- </InfoList>+ </Pill>+ </div>+ </div>- <div className="auto-updates-actions" style={{ marginTop: '1.5rem' }}>+ <div className="auto-updates-actions">{!status.installed ? (<Button variant="default" onClick={handleInstall} disabled={actionLoading}>{actionLoading ? 'Installing...' : 'Install Auto-Updates'}@@ -122,7 +126,7 @@ const AutoUpdatesTab = () => {)}</div>- <div className="help-text" style={{ marginTop: '1.5rem' }}>+ <div className="sec-note"><p><strong>What are automatic security updates?</strong><br/>When enabled, your server will automatically download and install security updates,diff --git a/frontend/src/components/security/EventsTab.jsx b/frontend/src/components/security/EventsTab.jsxindex 33613d39..784db936 100644--- a/frontend/src/components/security/EventsTab.jsx+++ b/frontend/src/components/security/EventsTab.jsx@@ -1,6 +1,7 @@import React, { useState, useEffect } from 'react';import api from '../../services/api';import { Button } from '@/components/ui/button';+import { Feed, FeedItem } from '@/components/ds';const EventsTab = () => {const [events, setEvents] = useState([]);@@ -32,14 +33,20 @@ const EventsTab = () => {}}+ function getEventTone(type) {+ if (type.includes('malware')) return 'red';+ if (type.includes('integrity')) return 'amber';+ return 'cyan';+ }+function getEventIcon(type) {if (type.includes('malware')) {- return <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2"><path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>;+ return <svg viewBox="0 0 24 24" width="15" height="15" stroke="currentColor" fill="none" strokeWidth="2"><path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>;}if (type.includes('integrity')) {- return <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>;+ return <svg viewBox="0 0 24 24" width="15" height="15" stroke="currentColor" fill="none" strokeWidth="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>;}- return <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>;+ return <svg viewBox="0 0 24 24" width="15" height="15" stroke="currentColor" fill="none" strokeWidth="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>;}return (@@ -55,7 +62,7 @@ const EventsTab = () => {<span className={`count ${failedLogins.alert_triggered ? 'danger' : ''}`}>{failedLogins.failed_attempts}</span>- <span className="label">failed attempts (threshold: {failedLogins.threshold})</span>+ <span className="label">failed attempts · threshold {failedLogins.threshold}</span></div>{failedLogins.recent_failures?.length > 0 && (<details className="recent-failures">@@ -78,17 +85,18 @@ const EventsTab = () => {) : events.length === 0 ? (<p className="text-muted">No security events recorded.</p>) : (- <div className="events-list">+ <Feed className="sec-feed">{events.map((event, index) => (- <div key={index} className={`event-item ${event.type}`}>- <div className="event-icon">{getEventIcon(event.type)}</div>- <div className="event-content">- <span className="event-message">{event.message}</span>- <span className="event-time">{new Date(event.timestamp).toLocaleString()}</span>- </div>- </div>+ <FeedItem+ key={index}+ icon={getEventIcon(event.type)}+ tone={getEventTone(event.type)}+ time={new Date(event.timestamp).toLocaleString()}+ >+ {event.message}+ </FeedItem>))}- </div>+ </Feed>)}</div></div>diff --git a/frontend/src/components/security/Fail2banTab.jsx b/frontend/src/components/security/Fail2banTab.jsxindex 965a32b1..c9464ae0 100644--- a/frontend/src/components/security/Fail2banTab.jsx+++ b/frontend/src/components/security/Fail2banTab.jsx@@ -3,11 +3,10 @@ import api from '../../services/api';import ConfirmDialog from '../ConfirmDialog';import { useToast } from '../../contexts/ToastContext';import Modal from '../Modal';-import { InfoList, InfoItem } from '../InfoList';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';-import { Badge } from '@/components/ui/badge';+import { Pill } from '@/components/ds';import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';const Fail2banTab = () => {@@ -122,51 +121,69 @@ const Fail2banTab = () => {</div></div><div className="card-body">- <InfoList>- <InfoItem label="Service">- <Badge variant={status.service_running ? 'success' : 'destructive'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Service</span>+ <Pill kind={status.service_running ? 'green' : 'red'}>{status.service_running ? 'Running' : 'Stopped'}- </Badge>- </InfoItem>- <InfoItem label="Version" value={status.version || 'Unknown'} />- <InfoItem label="Active Jails" value={status.jails?.join(', ') || 'None'} />- <InfoItem label="Total Banned IPs" value={bans.length} />- </InfoList>+ </Pill>+ </div>+ <div className="sk-info-row">+ <span className="k">Version</span>+ <span className="v">{status.version || 'Unknown'}</span>+ </div>+ <div className="sk-info-row">+ <span className="k">Active jails</span>+ {status.jails?.length > 0 ? (+ <span className="sec-chiprow">+ {status.jails.map((jail) => (+ <span key={jail} className="sk-tag">{jail}</span>+ ))}+ </span>+ ) : (+ <span className="v">None</span>+ )}+ </div>+ <div className="sk-info-row">+ <span className="k">Total banned IPs</span>+ <span className={`v ${bans.length > 0 ? 'sec-v-amber' : ''}`}>{bans.length}</span>+ </div>+ </div></div></div>- <div className="card">+ <div className="card sec-flush"><div className="card-header">- <h3>Banned IPs</h3>+ <h3>Banned IPs {bans.length > 0 && <span className="sec-count">· {bans.length}</span>}</h3></div>- <div className="card-body">- {bans.length === 0 ? (+ {bans.length === 0 ? (+ <div className="card-body"><p className="text-muted">No IPs are currently banned.</p>- ) : (- <table className="table">- <thead>- <tr>- <th>IP Address</th>- <th>Jail</th>- <th>Actions</th>+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>IP Address</th>+ <th>Jail</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ {bans.map((ban, index) => (+ <tr key={index}>+ <td className="sk-cell-mono sec-ip--red">{ban.ip}</td>+ <td><span className="sk-tag">{ban.jail}</span></td>+ <td>+ <Button variant="secondary" size="sm" onClick={() => handleUnban(ban.ip, ban.jail)}>+ Unban+ </Button>+ </td></tr>- </thead>- <tbody>- {bans.map((ban, index) => (- <tr key={index}>- <td><code>{ban.ip}</code></td>- <td><Badge variant="info">{ban.jail}</Badge></td>- <td>- <Button variant="secondary" size="sm" onClick={() => handleUnban(ban.ip, ban.jail)}>- Unban- </Button>- </td>- </tr>- ))}- </tbody>- </table>- )}- </div>+ ))}+ </tbody>+ </table>+ )}</div></>)}diff --git a/frontend/src/components/security/FirewallTab.jsx b/frontend/src/components/security/FirewallTab.jsxindex 63ddb352..704bf24e 100644--- a/frontend/src/components/security/FirewallTab.jsx+++ b/frontend/src/components/security/FirewallTab.jsx@@ -3,13 +3,19 @@ import api from '../../services/api';import ConfirmDialog from '../ConfirmDialog';import { useToast } from '../../contexts/ToastContext';import Modal from '../Modal';-import { InfoList, InfoItem } from '../InfoList';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';-import { Badge } from '@/components/ui/badge';+import { Pill, SegControl } from '@/components/ds';+import { Shield } from 'lucide-react';import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';+const RULE_TYPE_TONES = {+ port: 'accent',+ service: 'cyan',+ rich: 'violet',+};+const FirewallTab = () => {const [status, setStatus] = useState(null);const [rules, setRules] = useState([]);@@ -242,11 +248,11 @@ const FirewallTab = () => {<div className="firewall-header"><div className="firewall-status-row"><div className={`status-indicator ${isActive ? 'active' : 'inactive'}`}>- <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" fill="none" strokeWidth="2">- <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>- </svg>- <span>{isActive ? 'Firewall Active' : 'Firewall Inactive'}</span>- <span className="firewall-type">({activeFirewall?.toUpperCase()})</span>+ <span className="sec-shield">+ <Shield size={17} />+ </span>+ <span className="status-indicator__label">{isActive ? 'Firewall Active' : 'Firewall Inactive'}</span>+ <span className="firewall-type">{activeFirewall?.toUpperCase()}</span></div><div className="firewall-actions"><Button variant="outline" size="sm" onClick={() => setShowBlockIPModal(true)}>@@ -283,20 +289,17 @@ const FirewallTab = () => {</div></div>- <div className="subtabs">- <button className={`subtab ${activeSubTab === 'status' ? 'active' : ''}`} onClick={() => setActiveSubTab('status')}>- Status- </button>- <button className={`subtab ${activeSubTab === 'rules' ? 'active' : ''}`} onClick={() => setActiveSubTab('rules')}>- Rules- </button>- <button className={`subtab ${activeSubTab === 'blocked' ? 'active' : ''}`} onClick={() => setActiveSubTab('blocked')}>- Blocked IPs- </button>- <button className={`subtab ${activeSubTab === 'quick' ? 'active' : ''}`} onClick={() => setActiveSubTab('quick')}>- Quick Ports- </button>- </div>+ <SegControl+ className="sec-subseg"+ value={activeSubTab}+ onChange={setActiveSubTab}+ options={[+ { value: 'status', label: 'Status' },+ { value: 'rules', label: 'Rules', count: rules.length },+ { value: 'blocked', label: 'Blocked IPs', count: blockedIPs.length },+ { value: 'quick', label: 'Quick Ports' },+ ]}+ />{activeSubTab === 'status' && (<div className="card">@@ -305,92 +308,103 @@ const FirewallTab = () => {<Button variant="outline" size="sm" onClick={loadData}>Refresh</Button></div><div className="card-body">- <InfoList>- <InfoItem label="Type" value={activeFirewall?.toUpperCase()} />- <InfoItem label="Status">- <Badge variant={isActive ? 'success' : 'destructive'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Type</span>+ <span className="v">{activeFirewall?.toUpperCase()}</span>+ </div>+ <div className="sk-info-row">+ <span className="k">Status</span>+ <Pill kind={isActive ? 'green' : 'red'}>{isActive ? 'Active' : 'Inactive'}- </Badge>- </InfoItem>+ </Pill>+ </div>{activeFirewall === 'firewalld' && status?.firewalld?.default_zone && (- <InfoItem label="Default Zone" value={status.firewalld.default_zone} />+ <div className="sk-info-row">+ <span className="k">Default zone</span>+ <span className="v">{status.firewalld.default_zone}</span>+ </div>)}- </InfoList>+ </div></div></div>)}{activeSubTab === 'rules' && (- <div className="card">+ <div className="card sec-flush"><div className="card-header"><h3>Firewall Rules</h3><Button variant="default" size="sm" onClick={() => setShowPortModal(true)}>Add Rule</Button></div>- <div className="card-body">- {rules.length === 0 ? (+ {rules.length === 0 ? (+ <div className="card-body"><p className="text-muted">No rules configured</p>- ) : (- <table className="table">- <thead>- <tr>- <th>Type</th>- <th>Target</th>- <th>Protocol</th>- <th>Actions</th>+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>Type</th>+ <th>Target</th>+ <th>Protocol</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ {rules.map((rule, index) => (+ <tr key={index}>+ <td>+ <span className={`sec-state sec-state--${RULE_TYPE_TONES[rule.type] || 'gray'}`}>+ {rule.type}+ </span>+ </td>+ <td className="sk-cell-mono">+ {rule.type === 'service' && rule.service}+ {rule.type === 'port' && rule.port}+ {rule.type === 'rich' && <span className="sec-rich-rule">{rule.rule}</span>}+ </td>+ <td className="sk-cell-mono sec-proto">{rule.protocol || '-'}</td>+ <td>+ {rule.type === 'port' && (+ <Button variant="destructive" size="sm" onClick={() => handleRemovePort(rule.port, rule.protocol)}>+ Remove+ </Button>+ )}+ </td></tr>- </thead>- <tbody>- {rules.map((rule, index) => (- <tr key={index}>- <td><Badge variant="info">{rule.type}</Badge></td>- <td>- {rule.type === 'service' && rule.service}- {rule.type === 'port' && rule.port}- {rule.type === 'rich' && <code>{rule.rule}</code>}- </td>- <td>{rule.protocol || '-'}</td>- <td>- {rule.type === 'port' && (- <Button variant="destructive" size="sm" onClick={() => handleRemovePort(rule.port, rule.protocol)}>- Remove- </Button>- )}- </td>- </tr>- ))}- </tbody>- </table>- )}- </div>+ ))}+ </tbody>+ </table>+ )}</div>)}{activeSubTab === 'blocked' && (- <div className="card">+ <div className="card sec-flush"><div className="card-header"><h3>Blocked IP Addresses</h3><Button variant="default" size="sm" onClick={() => setShowBlockIPModal(true)}>Block IP</Button></div>- <div className="card-body">- {blockedIPs.length === 0 ? (+ {blockedIPs.length === 0 ? (+ <div className="card-body"><div className="empty-state-sm"><p>No blocked IPs</p></div>- ) : (- <div className="blocked-list">- {blockedIPs.map((item, index) => (- <div key={index} className="blocked-item">- <div className="blocked-info">- <span className="blocked-ip">{item.ip}</span>- </div>- <Button variant="secondary" size="sm" onClick={() => handleUnblockIP(item.ip)}>- Unblock- </Button>+ </div>+ ) : (+ <div className="blocked-list">+ {blockedIPs.map((item, index) => (+ <div key={index} className="blocked-item">+ <div className="blocked-info">+ <span className="blocked-ip">{item.ip}</span></div>- ))}- </div>- )}- </div>+ <Button variant="secondary" size="sm" onClick={() => handleUnblockIP(item.ip)}>+ Unblock+ </Button>+ </div>+ ))}+ </div>+ )}</div>)}@@ -400,14 +414,14 @@ const FirewallTab = () => {<h3>Quick Port Access</h3></div><div className="card-body">- <p className="text-muted" style={{ marginBottom: '1rem' }}>One-click enable/disable common service ports</p>+ <p className="sec-hint sec-hint--lead">One-click enable/disable common service ports</p><div className="quick-ports-grid">{commonPorts.map(({ port, name, protocol }) => {const isAllowed = rules.some(r =>(r.port === String(port) || r.port === port) && r.protocol === protocol);return (- <div key={port} className="quick-port-card">+ <div key={port} className={`quick-port-card ${isAllowed ? 'is-allowed' : ''}`}><div className="port-info"><span className="port-name">{name}</span><span className="port-number">{port}/{protocol}</span>diff --git a/frontend/src/components/security/IPListsTab.jsx b/frontend/src/components/security/IPListsTab.jsxindex fc8fe779..93457e03 100644--- a/frontend/src/components/security/IPListsTab.jsx+++ b/frontend/src/components/security/IPListsTab.jsx@@ -73,34 +73,46 @@ const IPListsTab = () => {});};- const renderList = (title, listType, items, badgeClass) => (- <div className="card">+ const renderList = (title, listType, items, tone) => (+ <div className="card sec-flush"><div className="card-header">- <h3>{title}</h3>+ <h3 className={`sec-listtitle sec-listtitle--${tone}`}>+ {title} <span className="sec-count">· {items.length}</span>+ </h3><Button variant="default" size="sm" onClick={() => setShowAddModal(listType)}>Add IP</Button></div>- <div className="card-body">- {items.length === 0 ? (+ {items.length === 0 ? (+ <div className="card-body"><p className="text-muted">No IPs in {listType}.</p>- ) : (- <div className="ip-list">+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>IP / CIDR</th>+ <th>Comment</th>+ <th>Added</th>+ <th></th>+ </tr>+ </thead>+ <tbody>{items.map((item, index) => (- <div key={index} className="ip-list-item">- <div className="ip-info">- <code className={badgeClass}>{item.ip}</code>- {item.comment && <span className="ip-comment">{item.comment}</span>}- <span className="ip-date">{new Date(item.added_at).toLocaleDateString()}</span>- </div>- <Button variant="destructive" size="sm" onClick={() => handleRemove(item.ip, listType)}>- Remove- </Button>- </div>+ <tr key={index}>+ <td className={`sk-cell-mono sec-ip--${tone}`}>{item.ip}</td>+ <td>{item.comment || <span className="sec-dash">—</span>}</td>+ <td className="sk-cell-mono sec-faint">{new Date(item.added_at).toLocaleDateString()}</td>+ <td className="sec-rowend">+ <Button variant="destructive" size="sm" onClick={() => handleRemove(item.ip, listType)}>+ Remove+ </Button>+ </td>+ </tr>))}- </div>- )}- </div>+ </tbody>+ </table>+ )}</div>);@@ -111,8 +123,8 @@ const IPListsTab = () => {return (<div className="ip-lists-tab"><div className="ip-lists-grid">- {renderList('Allowlist', 'allowlist', lists.allowlist, 'ip-allowed')}- {renderList('Blocklist', 'blocklist', lists.blocklist, 'ip-blocked')}+ {renderList('Allowlist', 'allowlist', lists.allowlist, 'green')}+ {renderList('Blocklist', 'blocklist', lists.blocklist, 'red')}</div><Modal open={!!showAddModal} onClose={() => setShowAddModal(null)} title={`Add to ${showAddModal || ''}`}>diff --git a/frontend/src/components/security/IntegrityTab.jsx b/frontend/src/components/security/IntegrityTab.jsxindex 6f63d7f9..eff156cd 100644--- a/frontend/src/components/security/IntegrityTab.jsx+++ b/frontend/src/components/security/IntegrityTab.jsx@@ -1,7 +1,6 @@import React, { useState } from 'react';import api from '../../services/api';import { Button } from '@/components/ui/button';-import { Badge } from '@/components/ui/badge';const IntegrityTab = () => {const [checking, setChecking] = useState(false);@@ -81,12 +80,15 @@ const IntegrityTab = () => {<div className="card"><div className="card-header"><h3>Changes Detected</h3>- <Badge variant="warning">{results.total_changes} changes</Badge>+ <span className="sec-state sec-state--amber">{results.total_changes} changes</span></div><div className="card-body">{results.changes.modified?.length > 0 && (<div className="change-section">- <h4>Modified Files ({results.changes.modified.length})</h4>+ <div className="sec-change-head">+ <span className="sec-state sec-state--amber">modified</span>+ <span className="sec-change-count">{results.changes.modified.length} files</span>+ </div><ul className="file-list">{results.changes.modified.map((file, i) => (<li key={i}>{file.path}</li>@@ -97,7 +99,10 @@ const IntegrityTab = () => {{results.changes.deleted?.length > 0 && (<div className="change-section">- <h4>Deleted Files ({results.changes.deleted.length})</h4>+ <div className="sec-change-head">+ <span className="sec-state sec-state--red">deleted</span>+ <span className="sec-change-count">{results.changes.deleted.length} files</span>+ </div><ul className="file-list">{results.changes.deleted.map((file, i) => (<li key={i}>{file}</li>@@ -108,7 +113,10 @@ const IntegrityTab = () => {{results.changes.new?.length > 0 && (<div className="change-section">- <h4>New Files ({results.changes.new.length})</h4>+ <div className="sec-change-head">+ <span className="sec-state sec-state--cyan">added</span>+ <span className="sec-change-count">{results.changes.new.length} files</span>+ </div><ul className="file-list">{results.changes.new.slice(0, 50).map((file, i) => (<li key={i}>{file}</li>@@ -122,7 +130,10 @@ const IntegrityTab = () => {{results.changes.permission_changed?.length > 0 && (<div className="change-section">- <h4>Permission Changes ({results.changes.permission_changed.length})</h4>+ <div className="sec-change-head">+ <span className="sec-state sec-state--violet">permissions</span>+ <span className="sec-change-count">{results.changes.permission_changed.length} files</span>+ </div><ul className="file-list">{results.changes.permission_changed.map((file, i) => (<li key={i}>{file.path} ({file.old_mode} → {file.new_mode})</li>diff --git a/frontend/src/components/security/OverviewTab.jsx b/frontend/src/components/security/OverviewTab.jsxindex 4a72b6e8..469413b2 100644--- a/frontend/src/components/security/OverviewTab.jsx+++ b/frontend/src/components/security/OverviewTab.jsx@@ -1,8 +1,7 @@import React, { useState } from 'react';import api from '../../services/api';-import { InfoList, InfoItem } from '../InfoList';import { Button } from '@/components/ui/button';-import { Badge } from '@/components/ui/badge';+import { Pill } from '@/components/ds';const InstallClamAVButton = ({ onInstalled }) => {const [installing, setInstalling] = useState(false);@@ -34,6 +33,7 @@ const InstallClamAVButton = ({ onInstalled }) => {const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefreshClamav }) => {const alerts = status?.recent_alerts || {};const loading = clamavLoading;+ const integrityChanges = alerts.integrity_changes || 0;return (<div className="security-overview">@@ -47,18 +47,22 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefreshClamav }) ={loading ? (<div className="loading-sm">Loading...</div>) : clamavStatus?.installed ? (- <InfoList>- <InfoItem label="Version" value={clamavStatus.version || 'Unknown'} />- <InfoItem label="Service">- <Badge variant={clamavStatus.service_running ? 'success' : 'warning'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Version</span>+ <span className="v">{clamavStatus.version || 'Unknown'}</span>+ </div>+ <div className="sk-info-row">+ <span className="k">Service</span>+ <Pill kind={clamavStatus.service_running ? 'green' : 'amber'}>{clamavStatus.service_running ? 'Running' : 'Stopped'}- </Badge>- </InfoItem>- <InfoItem- label="Last Definition Update"- value={clamavStatus.last_update ? new Date(clamavStatus.last_update).toLocaleString() : 'Unknown'}- />- </InfoList>+ </Pill>+ </div>+ <div className="sk-info-row">+ <span className="k">Last definition update</span>+ <span className="v">{clamavStatus.last_update ? new Date(clamavStatus.last_update).toLocaleString() : 'Unknown'}</span>+ </div>+ </div>) : (<div className="not-installed"><p>ClamAV is not installed on this server.</p>@@ -73,19 +77,24 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefreshClamav }) =<h3>File Integrity Monitoring</h3></div><div className="card-body">- <InfoList>- <InfoItem label="Status">- <Badge variant={status?.file_integrity?.enabled ? 'success' : 'secondary'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Status</span>+ <Pill kind={status?.file_integrity?.enabled ? 'green' : 'gray'}>{status?.file_integrity?.enabled ? 'Enabled' : 'Disabled'}- </Badge>- </InfoItem>- <InfoItem label="Database">- <Badge variant={status?.file_integrity?.database_exists ? 'success' : 'warning'}>+ </Pill>+ </div>+ <div className="sk-info-row">+ <span className="k">Database</span>+ <Pill kind={status?.file_integrity?.database_exists ? 'green' : 'amber'}>{status?.file_integrity?.database_exists ? 'Initialized' : 'Not Initialized'}- </Badge>- </InfoItem>- <InfoItem label="Changes Detected (24h)" value={alerts.integrity_changes || 0} />- </InfoList>+ </Pill>+ </div>+ <div className="sk-info-row">+ <span className="k">Changes detected (24h)</span>+ <span className={`v ${integrityChanges > 0 ? 'sec-v-amber' : ''}`}>{integrityChanges}</span>+ </div>+ </div></div></div>@@ -94,14 +103,15 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefreshClamav }) =<h3>Notifications</h3></div><div className="card-body">- <InfoList>- <InfoItem label="Security Alerts">- <Badge variant={status?.notifications_enabled ? 'success' : 'secondary'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Security alerts</span>+ <Pill kind={status?.notifications_enabled ? 'green' : 'gray'}>{status?.notifications_enabled ? 'Enabled' : 'Disabled'}- </Badge>- </InfoItem>- </InfoList>- <p className="help-text" style={{ marginTop: '1rem' }}>+ </Pill>+ </div>+ </div>+ <p className="sec-hint">Configure notification channels in Settings → Notifications to receive security alerts via Discord, Slack, or Telegram.</p></div>diff --git a/frontend/src/components/security/QuarantineTab.jsx b/frontend/src/components/security/QuarantineTab.jsxindex 165e6bb3..76fc7731 100644--- a/frontend/src/components/security/QuarantineTab.jsx+++ b/frontend/src/components/security/QuarantineTab.jsx@@ -50,15 +50,17 @@ const QuarantineTab = () => {</div>)}- <div className="card">+ <div className="card sec-flush"><div className="card-header">- <h3>Quarantined Files</h3>+ <h3>Quarantined Files {!loading && files.length > 0 && <span className="sec-count">· {files.length}</span>}</h3><Button variant="outline" size="sm" onClick={loadFiles}>Refresh</Button></div>- <div className="card-body">- {loading ? (+ {loading ? (+ <div className="card-body"><div className="loading-sm">Loading...</div>- ) : files.length === 0 ? (+ </div>+ ) : files.length === 0 ? (+ <div className="card-body"><div className="empty-state"><svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none" strokeWidth="1"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>@@ -67,37 +69,37 @@ const QuarantineTab = () => {<p>No files in quarantine</p><span className="text-muted">Infected files will appear here when detected</span></div>- ) : (- <table className="table">- <thead>- <tr>- <th>Filename</th>- <th>Size</th>- <th>Quarantined</th>- <th>Actions</th>+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>Filename</th>+ <th>Size</th>+ <th>Quarantined</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ {files.map((file, index) => (+ <tr key={index}>+ <td className="sk-cell-mono sec-path sec-path--red">{file.name}</td>+ <td className="sk-cell-mono">{formatBytes(file.size)}</td>+ <td className="sk-cell-mono sec-faint">{new Date(file.quarantined_at).toLocaleString()}</td>+ <td>+ <Button+ variant="destructive"+ size="sm"+ onClick={() => handleDelete(file.name)}+ >+ Delete+ </Button>+ </td></tr>- </thead>- <tbody>- {files.map((file, index) => (- <tr key={index}>- <td className="path-cell">{file.name}</td>- <td>{formatBytes(file.size)}</td>- <td>{new Date(file.quarantined_at).toLocaleString()}</td>- <td>- <Button- variant="destructive"- size="sm"- onClick={() => handleDelete(file.name)}- >- Delete- </Button>- </td>- </tr>- ))}- </tbody>- </table>- )}- </div>+ ))}+ </tbody>+ </table>+ )}</div></div>);diff --git a/frontend/src/components/security/SSHKeysTab.jsx b/frontend/src/components/security/SSHKeysTab.jsxindex 0ba5cef0..f4bf590a 100644--- a/frontend/src/components/security/SSHKeysTab.jsx+++ b/frontend/src/components/security/SSHKeysTab.jsx@@ -70,9 +70,9 @@ const SSHKeysTab = () => {return (<div className="ssh-keys-tab">- <div className="card">+ <div className="card sec-flush"><div className="card-header">- <h3>SSH Authorized Keys</h3>+ <h3>SSH Authorized Keys {!loading && keys.length > 0 && <span className="sec-count">· {keys.length}</span>}</h3><div className="card-actions"><Button variant="default" size="sm" onClick={() => setShowAddModal(true)}>Add Key@@ -82,43 +82,45 @@ const SSHKeysTab = () => {</Button></div></div>- <div className="card-body">- {loading ? (+ {loading ? (+ <div className="card-body"><div className="loading-sm">Loading...</div>- ) : keys.length === 0 ? (+ </div>+ ) : keys.length === 0 ? (+ <div className="card-body"><div className="empty-state-sm"><p>No SSH keys configured for root user.</p><Button variant="default" onClick={() => setShowAddModal(true)}>Add SSH Key</Button></div>- ) : (- <table className="table">- <thead>- <tr>- <th>Type</th>- <th>Fingerprint</th>- <th>Comment</th>- <th>Actions</th>+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>Type</th>+ <th>Fingerprint</th>+ <th>Comment</th>+ <th>Actions</th>+ </tr>+ </thead>+ <tbody>+ {keys.map((key) => (+ <tr key={key.id}>+ <td><span className="sk-tag">{key.type}</span></td>+ <td className="sk-cell-mono sec-fp">{key.fingerprint}</td>+ <td>{key.comment || <span className="sec-dash">—</span>}</td>+ <td>+ <Button variant="destructive" size="sm" onClick={() => handleRemoveKey(key.id, key.comment)}>+ Remove+ </Button>+ </td></tr>- </thead>- <tbody>- {keys.map((key) => (- <tr key={key.id}>- <td><code>{key.type}</code></td>- <td><code className="fingerprint">{key.fingerprint}</code></td>- <td>{key.comment || '-'}</td>- <td>- <Button variant="destructive" size="sm" onClick={() => handleRemoveKey(key.id, key.comment)}>- Remove- </Button>- </td>- </tr>- ))}- </tbody>- </table>- )}- </div>+ ))}+ </tbody>+ </table>+ )}</div><Modal open={showAddModal} onClose={() => setShowAddModal(false)} title="Add SSH Public Key" size="lg">diff --git a/frontend/src/components/security/ScannerTab.jsx b/frontend/src/components/security/ScannerTab.jsxindex 9b5bce6c..6f0faa40 100644--- a/frontend/src/components/security/ScannerTab.jsx+++ b/frontend/src/components/security/ScannerTab.jsx@@ -2,7 +2,8 @@ import React, { useState, useEffect } from 'react';import api from '../../services/api';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';-import { Badge } from '@/components/ui/badge';+import { Pill } from '@/components/ds';+import { Zap, Radar, FolderSearch, Download } from 'lucide-react';const ScannerTab = () => {const [scanStatus, setScanStatus] = useState({ status: 'idle' });@@ -91,11 +92,9 @@ const ScannerTab = () => {)}<div className="scan-options">- <div className="scan-card" onClick={() => !isScanning && !scanning && handleStartScan('quick')}>+ <div className="scan-card scan-card--quick" onClick={() => !isScanning && !scanning && handleStartScan('quick')}><div className="scan-card-icon">- <svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" strokeWidth="2">- <polygon points="5 3 19 12 5 21 5 3"/>- </svg>+ <Zap size={20} /></div><h4>Quick Scan</h4><span className="scan-desc">Scan common web directories</span>@@ -109,13 +108,9 @@ const ScannerTab = () => {</Button></div>- <div className="scan-card" onClick={() => !isScanning && !scanning && handleStartScan('full')}>+ <div className="scan-card scan-card--full" onClick={() => !isScanning && !scanning && handleStartScan('full')}><div className="scan-card-icon">- <svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" strokeWidth="2">- <circle cx="12" cy="12" r="10"/>- <circle cx="12" cy="12" r="6"/>- <circle cx="12" cy="12" r="2"/>- </svg>+ <Radar size={20} /></div><h4>Full Scan</h4><span className="scan-desc">Scan entire system (slow)</span>@@ -131,9 +126,7 @@ const ScannerTab = () => {<div className="scan-card scan-card--custom"><div className="scan-card-icon">- <svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" strokeWidth="2">- <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>- </svg>+ <FolderSearch size={20} /></div><h4>Custom Path</h4><span className="scan-desc">Scan a specific directory</span>@@ -160,11 +153,7 @@ const ScannerTab = () => {<div className="scan-toolbar"><Button variant="outline" size="sm" onClick={handleUpdateDefinitions} disabled={updating}>- <svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2">- <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>- <polyline points="7 10 12 15 17 10"/>- <line x1="12" y1="15" x2="12" y2="3"/>- </svg>+ <Download size={14} />{updating ? 'Updating...' : 'Update Definitions'}</Button></div>@@ -181,10 +170,10 @@ const ScannerTab = () => {<div className="progress-info"><div className="spinner"></div><div>- <p><strong>Scanning:</strong> {scanStatus.directory}</p>- <p><strong>Started:</strong> {new Date(scanStatus.started_at).toLocaleString()}</p>+ <p><strong>Scanning:</strong> <span className="sec-mono">{scanStatus.directory}</span></p>+ <p><strong>Started:</strong> <span className="sec-mono">{new Date(scanStatus.started_at).toLocaleString()}</span></p>{scanStatus.files_scanned > 0 && (- <p><strong>Files scanned:</strong> {scanStatus.files_scanned}</p>+ <p><strong>Files scanned:</strong> <span className="sec-mono">{scanStatus.files_scanned}</span></p>)}</div></div>@@ -192,13 +181,13 @@ const ScannerTab = () => {</div>)}- <div className="card">+ <div className="card sec-flush"><div className="card-header"><h3>Scan History</h3><Button variant="outline" size="sm" onClick={loadHistory}>Refresh</Button></div>- <div className="card-body">- {history.length === 0 ? (+ {history.length === 0 ? (+ <div className="card-body"><div className="empty-state-sm"><svg viewBox="0 0 24 24" width="40" height="40" stroke="currentColor" fill="none" strokeWidth="1.5"><circle cx="11" cy="11" r="8"/>@@ -206,39 +195,39 @@ const ScannerTab = () => {</svg><p>No scans have been run yet. Start a scan above to check for threats.</p></div>- ) : (- <table className="table">- <thead>- <tr>- <th>Date</th>- <th>Directory</th>- <th>Status</th>- <th>Threats</th>+ </div>+ ) : (+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>Date</th>+ <th>Directory</th>+ <th>Status</th>+ <th>Threats</th>+ </tr>+ </thead>+ <tbody>+ {history.map((scan, index) => (+ <tr key={index}>+ <td className="sk-cell-mono sec-faint">{new Date(scan.started_at).toLocaleString()}</td>+ <td className="sk-cell-mono sec-path">{scan.directory}</td>+ <td>+ <Pill kind={scan.status === 'completed' ? 'green' : scan.status === 'error' ? 'red' : 'amber'}>+ {scan.status}+ </Pill>+ </td>+ <td>+ {scan.infected_files?.length > 0 ? (+ <span className="sec-state sec-state--red">{scan.infected_files.length} found</span>+ ) : (+ <span className="sec-state sec-state--green">clean</span>+ )}+ </td></tr>- </thead>- <tbody>- {history.map((scan, index) => (- <tr key={index}>- <td>{new Date(scan.started_at).toLocaleString()}</td>- <td className="path-cell">{scan.directory}</td>- <td>- <Badge variant={scan.status === 'completed' ? 'success' : scan.status === 'error' ? 'destructive' : 'warning'}>- {scan.status}- </Badge>- </td>- <td>- {scan.infected_files?.length > 0 ? (- <Badge variant="destructive">{scan.infected_files.length} found</Badge>- ) : (- <Badge variant="success">Clean</Badge>- )}- </td>- </tr>- ))}- </tbody>- </table>- )}- </div>+ ))}+ </tbody>+ </table>+ )}</div></div>);diff --git a/frontend/src/components/security/VulnerabilityTab.jsx b/frontend/src/components/security/VulnerabilityTab.jsxindex e344c0fb..06f44eef 100644--- a/frontend/src/components/security/VulnerabilityTab.jsx+++ b/frontend/src/components/security/VulnerabilityTab.jsx@@ -1,9 +1,14 @@import React, { useState, useEffect } from 'react';import api from '../../services/api';import { useToast } from '../../contexts/ToastContext';-import { InfoList, InfoItem } from '../InfoList';import { Button } from '@/components/ui/button';-import { Badge } from '@/components/ui/badge';+import { Pill, ScoreGauge } from '@/components/ds';++const hardeningColor = (score) => {+ if (score >= 70) return 'var(--green)';+ if (score >= 50) return 'var(--amber)';+ return 'var(--red)';+};const VulnerabilityTab = () => {const [lynisStatus, setLynisStatus] = useState(null);@@ -108,14 +113,18 @@ const VulnerabilityTab = () => {</Button></div><div className="card-body">- <InfoList>- <InfoItem label="Version" value={lynisStatus.version || 'Unknown'} />- <InfoItem label="Scan Status">- <Badge variant={scanStatus?.status === 'completed' ? 'success' : scanStatus?.status === 'running' ? 'info' : 'secondary'}>+ <div className="sec-rows">+ <div className="sk-info-row">+ <span className="k">Version</span>+ <span className="v">{lynisStatus.version || 'Unknown'}</span>+ </div>+ <div className="sk-info-row">+ <span className="k">Scan status</span>+ <Pill kind={scanStatus?.status === 'completed' ? 'green' : scanStatus?.status === 'running' ? 'cyan' : 'gray'}>{scanStatus?.status || 'Idle'}- </Badge>- </InfoItem>- </InfoList>+ </Pill>+ </div>+ </div></div></div>@@ -127,8 +136,10 @@ const VulnerabilityTab = () => {<div className="card-body"><div className="progress-info"><div className="spinner"></div>- <p>Scanning system for vulnerabilities...</p>- <p className="text-muted">Started: {new Date(scanStatus.started_at).toLocaleString()}</p>+ <div>+ <p>Scanning system for vulnerabilities...</p>+ <p className="sec-mono sec-faint">Started: {new Date(scanStatus.started_at).toLocaleString()}</p>+ </div></div></div></div>@@ -138,38 +149,57 @@ const VulnerabilityTab = () => {<div className="card"><div className="card-header"><h3>Scan Results</h3>- {scanStatus.hardening_index && (- <Badge variant={scanStatus.hardening_index >= 70 ? 'success' : scanStatus.hardening_index >= 50 ? 'warning' : 'destructive'}>- Hardening Index: {scanStatus.hardening_index}- </Badge>- )}</div><div className="card-body">+ {scanStatus.hardening_index && (+ <div className="sec-hardening">+ <ScoreGauge+ value={scanStatus.hardening_index}+ size={104}+ stroke={9}+ color={hardeningColor(scanStatus.hardening_index)}+ label="hardening"+ />+ <div className="sec-hardening__info">+ <div className="sec-hardening__title">Hardening index</div>+ <div className="sec-hardening__sub">+ {scanStatus.warnings?.length || 0} warnings · {scanStatus.suggestions?.length || 0} suggestions+ </div>+ </div>+ </div>+ )}+{scanStatus.warnings?.length > 0 && (<div className="scan-section"><h4>Warnings ({scanStatus.warnings.length})</h4>- <ul className="findings-list compact">+ <div className="sec-finding-list">{scanStatus.warnings.slice(0, 20).map((warning, idx) => (- <li key={idx} className="warning">{warning}</li>+ <div key={idx} className="sec-finding">+ <span className="sec-dot sec-dot--amber" />+ <span className="sec-finding__msg">{warning}</span>+ </div>))}{scanStatus.warnings.length > 20 && (- <li className="text-muted">...and {scanStatus.warnings.length - 20} more</li>+ <div className="sec-finding sec-finding--more">...and {scanStatus.warnings.length - 20} more</div>)}- </ul>+ </div></div>)}{scanStatus.suggestions?.length > 0 && (<div className="scan-section"><h4>Suggestions ({scanStatus.suggestions.length})</h4>- <ul className="findings-list compact">+ <div className="sec-finding-list">{scanStatus.suggestions.slice(0, 20).map((suggestion, idx) => (- <li key={idx} className="suggestion">{suggestion}</li>+ <div key={idx} className="sec-finding">+ <span className="sec-dot sec-dot--cyan" />+ <span className="sec-finding__msg">{suggestion}</span>+ </div>))}{scanStatus.suggestions.length > 20 && (- <li className="text-muted">...and {scanStatus.suggestions.length - 20} more</li>+ <div className="sec-finding sec-finding--more">...and {scanStatus.suggestions.length - 20} more</div>)}- </ul>+ </div></div>)}</div>diff --git a/frontend/src/pages/Security.jsx b/frontend/src/pages/Security.jsxindex 27e889a1..5d68a7c9 100644--- a/frontend/src/pages/Security.jsx+++ b/frontend/src/pages/Security.jsx@@ -19,7 +19,8 @@ import {} from '../components/security';import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';import EmptyState from '../components/EmptyState';-import { StatStrip, Stat } from '../components/StatCard';+import { MetricCard } from '@/components/ds';+import { Siren, Bug, ShieldCheck, Radar } from 'lucide-react';const VALID_TABS = ['overview', 'firewall', 'fail2ban', 'ssh-keys', 'ip-lists', 'scanner', 'quarantine', 'integrity', 'audit', 'vulnerability', 'updates', 'events', 'settings'];@@ -76,28 +77,34 @@ const Security = () => {</div></div>- <StatStrip ariaLabel="Security overview">- <Stat- label="Alerts (24h)"+ <div className="sec-kpis" role="group" aria-label="Security overview">+ <MetricCard+ tone={alerts.total > 0 ? 'amber' : 'green'}+ icon={<Siren size={16} />}value={alerts.total || 0}- state={alerts.total > 0 ? 'warning' : 'success'}+ label="Alerts (24h)"/>- <Stat- label="Malware Detected"+ <MetricCard+ tone={alerts.malware_detections > 0 ? 'red' : 'green'}+ icon={<Bug size={16} />}value={alerts.malware_detections || 0}- state={alerts.malware_detections > 0 ? 'danger' : 'success'}+ label="Malware detected"/>- <Stat- label="ClamAV"+ <MetricCard+ className="sec-kpi-text"+ tone={clamav?.installed ? 'green' : 'amber'}+ icon={<ShieldCheck size={16} />}value={clamav?.installed ? 'Active' : 'Not installed'}- state={clamav?.installed ? 'success' : 'warning'}+ label="ClamAV"/>- <Stat- label="Scan Status"+ <MetricCard+ className="sec-kpi-text"+ tone={scanRunning ? 'cyan' : 'accent'}+ icon={<Radar size={16} />}value={capitalize(status?.scan_status) || 'Idle'}- state={scanRunning ? 'info' : undefined}+ label="Scan status"/>- </StatStrip>+ </div><Tabs value={activeTab} onValueChange={setActiveTab}><TabsList>diff --git a/frontend/src/styles/pages/_security.scss b/frontend/src/styles/pages/_security.scssindex 2df90e9e..0cb38629 100644--- a/frontend/src/styles/pages/_security.scss+++ b/frontend/src/styles/pages/_security.scss@@ -1,40 +1,294 @@// ============================================-// SECURITY PAGE STYLES+// SECURITY PAGE (redesign — infra console look)// ============================================+// Page shell + all 13 tabs. Consumes the sk- design-system primitives+// (Pill, MetricCard, SegControl, ScoreGauge, Feed, .sk-dtable, .sk-info-row);+// page-specific atoms are prefixed `sec-`. Per-tab blocks stay scoped under+// their tab-root class so nothing leaks to other pages..security-page {- .tabs-nav {++ // ── KPI strip (page shell) ──────────────────────────────+ .sec-kpis {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ gap: $space-4;+ margin-bottom: $space-5;++ @media (max-width: $breakpoint-lg) { grid-template-columns: repeat(2, 1fr); }+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }+ }++ // Text-valued KPIs ("Active" / "Not installed") read smaller than numerals+ .sec-kpi-text .sk-kpi__val {+ display: flex;+ align-items: center;+ min-height: 27px;+ font-size: 18px;+ line-height: 1.25;+ }++ // ── tab strip — accent wash + underline on active ───────+ .tabs {+ gap: 2px;+ border-bottom: 1px solid var(--border-soft);+ }++ .tab {+ padding: 8px 13px;+ border-radius: 8px 8px 0 0;+ border-bottom: 2px solid transparent;+ margin-bottom: -1px;+ font-size: 13px;+ color: var(--text-dim);++ &:hover {+ color: var(--text);+ background: var(--surface-hover);+ }++ &.active,+ &[data-state="active"] {+ color: var(--accent-bright);+ background: var(--accent-bg);+ border-bottom-color: var(--accent-bright);+ }+ }++ // ── card chrome (all tabs) ──────────────────────────────+ .tab-content {+ .card {+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ padding: $space-5;+ box-shadow: none;+ }++ .card-header {+ margin-bottom: $space-4;++ // Mono-uppercase eyebrow section headers+ h3 {+ margin: 0;+ display: flex;+ align-items: center;+ gap: 6px;+ font-family: var(--mono);+ font-size: 10.5px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--text-faint);++ &.sec-listtitle--green { color: var(--green); }+ &.sec-listtitle--red { color: var(--red); }+ }+ }++ // Flush variant: header padded, table bleeds to the card edges+ // (16px horizontal padding aligns with .sk-dtable cell padding)+ .card.sec-flush {+ padding: 0;++ .card-header { padding: $space-5 $space-4 0; }+ > .card-body { padding: 0 $space-4 $space-5; }+ }++ // Stateful card borders+ .card.scan-progress { border-color: var(--accent-dim); }+ .card.card-warning { border-color: rgba(245, 185, 69, 0.35); }+ }++ .card-actions {display: flex;gap: $space-2;- margin-bottom: $space-6;- border-bottom: 1px solid $border-subtle;- padding-bottom: $space-2;- overflow-x: auto;-- .tab-btn {- padding: $space-2 $space-4;- border: none;- background: none;- color: $text-secondary;- cursor: pointer;- border-radius: $radius-md;+ }++ // ── shared page atoms ───────────────────────────────────+ // Count suffix inside an eyebrow heading ("Banned IPs · 4")+ .sec-count {+ font-weight: $font-weight-medium;+ color: var(--text-faint);+ letter-spacing: 0;+ }++ // Severity / state chip (mono uppercase on a semantic wash)+ .sec-state {+ display: inline-block;+ padding: 3px 9px;+ border-radius: 6px;+ font-family: var(--mono);+ font-size: 10px;+ font-weight: $font-weight-semibold;+ text-transform: uppercase;+ letter-spacing: 0.05em;+ white-space: nowrap;+ flex-shrink: 0;++ &--red { color: var(--red); background: var(--red-bg); }+ &--amber { color: var(--amber); background: var(--amber-bg); }+ &--cyan { color: var(--cyan); background: var(--cyan-bg); }+ &--green { color: var(--green); background: var(--green-bg); }+ &--violet { color: var(--violet); background: var(--violet-bg); }+ &--accent { color: var(--accent-bright); background: var(--accent-bg); }+ &--gray { color: var(--text-faint); background: var(--surface-3); }+ }++ // Severity dot (square, prototype .sev)+ .sec-dot {+ width: 8px;+ height: 8px;+ border-radius: 3px;+ flex-shrink: 0;+ margin-top: 5px;+ background: var(--text-ghost);++ &--red { background: var(--red); }+ &--amber { background: var(--amber); }+ &--cyan { background: var(--cyan); }+ &--green { background: var(--green); }+ }++ // Key/value rows (consumes .sk-info-row)+ .sec-rows {+ .sk-info-row .v.sec-v-amber { color: var(--amber); }+ }++ // Right-aligned chip cluster inside an info row (jail tags…)+ .sec-chiprow {+ display: flex;+ flex-wrap: wrap;+ justify-content: flex-end;+ gap: 6px;+ }++ // Findings / log rows (audit findings, lynis warnings + suggestions)+ .sec-finding-list {+ display: flex;+ flex-direction: column;+ }++ .sec-finding {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ padding: 9px 0;+ border-top: 1px solid var(--border-soft);+ font-size: 13px;+ line-height: 1.45;++ &:first-child { border-top: none; }++ .sec-state { margin-top: 1px; }++ &__msg {+ flex: 1;+ min-width: 0;+ overflow-wrap: anywhere;+ }++ &--more {+ font-family: var(--mono);+ font-size: 11.5px;+ color: var(--text-faint);+ }+ }++ // Inline helpers+ .sec-mono {+ font-family: var(--mono);+ font-size: 12px;+ color: var(--text-dim);+ }++ .sec-faint { color: var(--text-faint); }+ .sk-dtable .sec-faint { color: var(--text-faint); }++ .sec-dash {+ font-family: var(--mono);+ color: var(--text-ghost);+ }++ .sk-dtable {+ .sec-ip--green { color: var(--green); }+ .sec-ip--red { color: var(--red); }++ .sec-path {+ max-width: 360px;+ overflow: hidden;+ text-overflow: ellipsis;white-space: nowrap;- transition: all 0.2s;+ font-size: 11.5px;- &:hover {- background: $bg-hover;- color: $text-primary;- }+ &--red { color: var(--red); }+ }- &.active {- background: $accent-primary;- color: white;- }+ .sec-proto {+ font-size: 11px;+ text-transform: uppercase;+ letter-spacing: 0.04em;+ }++ .sec-rich-rule {+ font-size: 11px;+ word-break: break-all;}++ .sec-fp {+ font-size: 11px;+ word-break: break-all;+ }++ .sec-rowend { text-align: right; }+ }++ // Hint / note copy+ .sec-hint {+ margin: $space-4 0 0;+ font-size: 12px;+ line-height: 1.55;+ color: var(--text-faint);++ &--lead { margin: 0 0 $space-4; }+ }++ .sec-note {+ margin-top: $space-5;+ padding: $space-4;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius-sm);+ font-size: $font-size-sm;+ color: var(--text-dim);++ p { margin: 0; line-height: 1.55; }+ strong { color: var(--text); }+ }++ // ── tab-root stacks (replaces ad-hoc margins) ───────────+ .scanner-tab,+ .quarantine-tab,+ .integrity-tab,+ .events-tab,+ .fail2ban-tab,+ .ssh-keys-tab,+ .ip-lists-tab,+ .audit-tab,+ .vulnerability-tab,+ .auto-updates-tab,+ .firewall-tab,+ .settings-tab {+ display: flex;+ flex-direction: column;+ align-items: stretch;+ gap: $space-4;++ > .alert { margin: 0; }}}-// Overview Tab+// ── Overview tab ─────────────────────────────────────────────.security-overview {.security-grid {display: grid;@@ -43,13 +297,12 @@}}-// Scanner Tab+// ── Scanner tab ──────────────────────────────────────────────.scanner-tab {.scan-options {display: grid;grid-template-columns: repeat(3, 1fr);gap: $space-4;- margin-bottom: $space-4;@media (max-width: $breakpoint-md) {grid-template-columns: 1fr;@@ -62,52 +315,54 @@align-items: center;text-align: center;padding: $space-6 $space-4;- background: $bg-card;- border: 1px solid $border-subtle;- border-radius: $radius-lg;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);cursor: pointer;- @include transition(all);+ transition: border-color 0.15s, transform 0.15s;&:hover {- border-color: $accent-primary;- background: $bg-elevated;+ border-color: var(--border-strong);+ transform: translateY(-2px);}h4 {margin: 0 0 $space-1;- font-size: $font-size-md;+ font-size: 14px;font-weight: $font-weight-semibold;+ color: var(--text);}.scan-desc {- color: $text-secondary;- font-size: $font-size-sm;margin-bottom: $space-4;+ font-size: 12px;+ color: var(--text-faint);}- .btn {- margin-top: auto;- }+ > button { margin-top: auto; }}.scan-card-icon {- width: 48px;- height: 48px;- display: flex;- align-items: center;- justify-content: center;- border-radius: $radius-md;- background: fade($accent-primary-raw, 10%);- color: $accent-primary;+ display: grid;+ place-items: center;+ width: 38px;+ height: 38px;margin-bottom: $space-3;+ border-radius: 10px;+ background: var(--surface-2);+ color: var(--text-dim);}+ .scan-card--quick .scan-card-icon { background: var(--accent-bg); color: var(--accent-bright); }+ .scan-card--full .scan-card-icon { background: var(--violet-bg); color: var(--violet); }+ .scan-card--custom .scan-card-icon { background: var(--cyan-bg); color: var(--cyan); }+.scan-card--custom {cursor: default;&:hover {- border-color: $border-subtle;- background: $bg-card;+ border-color: var(--border-soft);+ transform: none;}}@@ -126,105 +381,86 @@.scan-toolbar {display: flex;justify-content: flex-end;- margin-bottom: $space-4;-- .btn {- display: flex;- align-items: center;- gap: $space-2;- }- }-- .scan-progress {- margin-bottom: $space-4;- border-color: $accent-primary;-- .progress-info {- display: flex;- align-items: center;- gap: $space-4;-- .spinner {- width: 32px;- height: 32px;- }-- p {- margin: 0;-- &:not(:last-child) {- margin-bottom: $space-1;- }- }- }- }-- .path-cell {- max-width: 300px;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- font-family: $font-mono;- font-size: $font-size-sm;}}-// Quarantine Tab-.quarantine-tab {- .empty-state {+// Active-scan card (scanner + vulnerability tabs)+.scan-progress {+ .progress-info {display: flex;- flex-direction: column;align-items: center;- padding: $space-8;- text-align: center;+ gap: $space-4;- svg {- color: $success;- margin-bottom: $space-4;+ .spinner {+ width: 32px;+ height: 32px;}p {- font-size: $font-size-lg;- margin-bottom: $space-1;+ margin: 0;+ font-size: 13px;++ &:not(:last-child) {+ margin-bottom: $space-1;+ }}}}-// Integrity Tab+// ── Quarantine tab ───────────────────────────────────────────+.quarantine-tab {+ .empty-state svg { color: var(--green); }+}++// ── Integrity tab ────────────────────────────────────────────.integrity-tab {.description {- color: $text-secondary;- margin-bottom: $space-6;+ margin-bottom: $space-5;+ font-size: 13px;+ line-height: 1.55;+ color: var(--text-dim);}.integrity-actions {display: flex;- gap: $space-4;+ gap: $space-3;}.change-section {- margin-bottom: $space-6;+ margin-bottom: $space-5;- h4 {- margin-bottom: $space-2;- color: $warning;- }+ &:last-child { margin-bottom: 0; }+ }++ .sec-change-head {+ display: flex;+ align-items: center;+ gap: 10px;+ margin-bottom: $space-2;+ }++ .sec-change-count {+ font-family: var(--mono);+ font-size: 11px;+ color: var(--text-faint);}.file-list {list-style: none;padding: 0;margin: 0;- background: $bg-hover;- border-radius: $radius-md;max-height: 300px;overflow-y: auto;+ background: var(--bg-code);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius-sm);li {- padding: $space-2 $space-4;- font-family: $font-mono;- font-size: $font-size-sm;- border-bottom: 1px solid $border-subtle;+ padding: 7px 12px;+ font-family: var(--mono);+ font-size: 11.5px;+ color: var(--text-dim);+ border-bottom: 1px solid var(--border-soft);&:last-child {border-bottom: none;@@ -233,28 +469,28 @@}}-// Events Tab+// ── Events tab ───────────────────────────────────────────────.events-tab {- .card-warning {- border-color: $warning;- }-.failed-login-summary {display: flex;align-items: baseline;- gap: $space-2;+ gap: $space-3;.count {- font-size: $font-size-2xl;- font-weight: 700;+ font-family: var(--mono);+ font-size: 26px;+ font-weight: $font-weight-semibold;+ letter-spacing: -0.02em;&.danger {- color: $danger;+ color: var(--red);}}.label {- color: $text-secondary;+ font-family: var(--mono);+ font-size: 11.5px;+ color: var(--text-faint);}}@@ -263,7 +499,8 @@summary {cursor: pointer;- color: $accent-primary;+ font-size: 12.5px;+ color: var(--accent-bright);&:hover {text-decoration: underline;@@ -273,216 +510,159 @@pre {margin-top: $space-2;padding: $space-4;- background: $bg-hover;- border-radius: $radius-md;- font-size: $font-size-xs;max-height: 200px;overflow: auto;+ background: var(--bg-code);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius-sm);+ font-family: var(--mono);+ font-size: 11px;+ line-height: 1.6;+ color: var(--text-code);}}+}- .events-list {- display: flex;- flex-direction: column;- gap: $space-2;- }+// ── Settings tab ─────────────────────────────────────────────+.settings-tab {+ .card { max-width: 860px; }- .event-item {- display: flex;- align-items: flex-start;- gap: $space-4;- padding: $space-4;- background: $bg-hover;- border-radius: $radius-md;- border: 1px solid $border-subtle;+ .form-group {+ margin: 0;+ padding: 2px 0;- &.malware {- border-color: fade($danger, 45%);- .event-icon { color: $danger; }+ & + .form-group {+ border-top: 1px solid var(--border-soft);}- &.integrity {- border-color: fade($warning, 45%);- .event-icon { color: $warning; }+ // Eyebrow-style field labels (text inputs)+ > label {+ display: block;+ margin: 10px 0 6px;+ font-family: var(--mono);+ font-size: 10px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--text-faint);}}- .event-icon {- flex-shrink: 0;- color: $text-secondary;- }-- .event-content {- flex: 1;- min-width: 0;-- .event-message {- display: block;- margin-bottom: $space-1;- }+ .toggle-switch-label {+ display: flex;+ justify-content: space-between;+ align-items: center;+ gap: $space-4;+ padding: 9px 0;- .event-time {- font-size: $font-size-sm;- color: $text-tertiary;+ label {+ margin: 0;+ font-size: 13.5px;+ font-weight: $font-weight-medium;+ color: var(--text);+ cursor: pointer;}}-}--// Settings Tab-.settings-tab {- .card {- margin-bottom: $space-6;- }.form-actions {- margin-top: $space-6;- }-}--// Shared Components-.not-installed {- text-align: center;- padding: $space-6;-- p {- margin-bottom: $space-4;- color: $text-secondary;- }-}--.info-list {- display: flex;- flex-direction: column;- gap: $space-2;-}--.info-item {- display: flex;- justify-content: space-between;- align-items: center;- padding: $space-2 0;- border-bottom: 1px solid $border-subtle;-- &:last-child {- border-bottom: none;- }-- .info-label {- color: $text-secondary;- }-- .info-value {- font-weight: 500;+ display: flex;+ justify-content: flex-start;}}-.help-text {- color: $text-secondary;- font-size: $font-size-sm;-}--.loading-sm {- color: $text-tertiary;- font-size: $font-size-sm;- padding: $space-4;-}--// Firewall Tab+// ── Firewall tab ─────────────────────────────────────────────.firewall-tab {- .firewall-header {- margin-bottom: $space-6;- }-.firewall-status-row {display: flex;justify-content: space-between;align-items: center;- padding: $space-4;- background: $bg-card;- border-radius: $radius-lg;- border: 1px solid $border-subtle;+ flex-wrap: wrap;+ gap: $space-3;+ padding: $space-4 $space-5;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);}.status-indicator {display: flex;align-items: center;- gap: $space-2;- font-weight: 600;+ gap: 11px;- &.active {- color: $success;+ .sec-shield {+ display: grid;+ place-items: center;+ width: 32px;+ height: 32px;+ border-radius: 9px;+ flex-shrink: 0;}- &.inactive {- color: $danger;+ &.active .sec-shield {+ background: var(--green-bg);+ color: var(--green);+ }++ &.inactive .sec-shield {+ background: var(--red-bg);+ color: var(--red);+ }++ &__label {+ font-size: 13.5px;+ font-weight: $font-weight-semibold;+ color: var(--text);}.firewall-type {- color: $text-tertiary;- font-weight: 400;+ font-family: var(--mono);+ font-size: 11px;+ letter-spacing: 0.05em;+ color: var(--text-faint);}}.firewall-actions {display: flex;+ flex-wrap: wrap;gap: $space-2;}.firewall-stats {display: flex;- gap: $space-4;- margin-bottom: $space-6;+ flex-wrap: wrap;+ gap: $space-3;}.stat-mini {display: flex;flex-direction: column;- align-items: center;- padding: $space-4 $space-6;- background: $bg-card;- border-radius: $radius-md;- border: 1px solid $border-subtle;- min-width: 100px;+ min-width: 120px;+ padding: 12px 16px;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);.stat-value {- font-size: $font-size-xl;- font-weight: 700;+ font-family: var(--mono);+ font-size: 22px;+ font-weight: $font-weight-semibold;+ letter-spacing: -0.02em;+ line-height: 1.1;}.stat-label {- color: $text-tertiary;- font-size: $font-size-sm;+ margin-top: 5px;+ font-family: var(--mono);+ font-size: 10px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.06em;+ text-transform: uppercase;+ color: var(--text-faint);}}- .subtabs {- display: flex;- gap: $space-1;- margin-bottom: $space-4;- border-bottom: 1px solid $border-subtle;- padding-bottom: $space-2;-- .subtab {- padding: $space-2 $space-3;- border: none;- background: none;- color: $text-secondary;- cursor: pointer;- border-radius: $radius-sm;- font-size: $font-size-sm;- transition: all 0.2s;-- &:hover {- background: $bg-hover;- color: $text-primary;- }-- &.active {- background: $bg-hover;- color: $accent-primary;- }- }- }+ .sec-subseg { align-self: flex-start; }.quick-ports-grid {display: grid;@@ -494,22 +674,31 @@display: flex;justify-content: space-between;align-items: center;+ gap: $space-2;padding: $space-3 $space-4;- background: $bg-hover;- border-radius: $radius-md;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius-sm);++ &.is-allowed {+ border-color: rgba(61, 220, 151, 0.3);+ }.port-info {display: flex;flex-direction: column;+ min-width: 0;.port-name {- font-weight: 500;+ font-size: 13px;+ font-weight: $font-weight-medium;}.port-number {- color: $text-tertiary;- font-size: $font-size-sm;- font-family: $font-mono;+ margin-top: 2px;+ font-family: var(--mono);+ font-size: 11px;+ color: var(--text-faint);}}}@@ -517,28 +706,30 @@.blocked-list {display: flex;flex-direction: column;- gap: $space-2;}.blocked-item {display: flex;justify-content: space-between;align-items: center;- padding: $space-3 $space-4;- background: $bg-hover;- border-radius: $radius-md;+ gap: $space-3;+ padding: 11px $space-4;+ border-top: 1px solid var(--border-soft);.blocked-ip {- font-family: $font-mono;- font-weight: 500;+ font-family: var(--mono);+ font-size: 12.5px;+ font-weight: $font-weight-medium;+ color: var(--red);}}+ // (modal content portals to <body>; kept for parity with legacy markup).install-info {margin-top: $space-4;padding: $space-4;- background: $bg-hover;- border-radius: $radius-md;+ background: var(--surface-2);+ border-radius: var(--radius-sm);p {margin: 0;@@ -547,104 +738,21 @@}}-// Scrollable tabs for many tabs-.tabs-nav-scrollable {- flex-wrap: nowrap;- overflow-x: auto;- scrollbar-width: thin;-- &::-webkit-scrollbar {- height: 4px;- }-- &::-webkit-scrollbar-track {- background: transparent;- }-- &::-webkit-scrollbar-thumb {- background: $border-subtle;- border-radius: $radius-sm;- }-}--// Fail2ban Tab-.fail2ban-tab {- .card-actions {- display: flex;- gap: $space-2;- }-}--// SSH Keys Tab-.ssh-keys-tab {- .fingerprint {- font-size: $font-size-xs;- word-break: break-all;- }-- .modal-lg {- max-width: 600px;- }-- textarea {- font-family: $font-mono;- font-size: $font-size-sm;- }-}--// IP Lists Tab+// ── IP Lists tab ─────────────────────────────────────────────.ip-lists-tab {.ip-lists-grid {display: grid;- grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));- gap: $space-6;- }-- .ip-list {- display: flex;- flex-direction: column;- gap: $space-2;- }-- .ip-list-item {- display: flex;- justify-content: space-between;- align-items: center;- padding: $space-3 $space-4;- background: $bg-hover;- border-radius: $radius-md;- }-- .ip-info {- display: flex;- align-items: center;- gap: $space-3;-- code {- font-weight: 500;- }-- .ip-allowed {- color: $success;- }-- .ip-blocked {- color: $danger;- }-- .ip-comment {- color: $text-secondary;- font-size: $font-size-sm;- }+ grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));+ gap: $space-4;+ align-items: start;- .ip-date {- color: $text-tertiary;- font-size: $font-size-xs;+ @media (max-width: $breakpoint-sm) {+ grid-template-columns: 1fr;}}}-// Audit Tab+// ── Audit tab ────────────────────────────────────────────────.audit-tab {.loading-state {display: flex;@@ -662,72 +770,57 @@.audit-results {display: flex;flex-direction: column;- gap: $space-6;+ gap: $space-5;}- .audit-score {+ .sec-audit-score {display: flex;flex-direction: column;align-items: center;- padding: $space-6;- background: $bg-hover;- border-radius: $radius-lg;- text-align: center;-- .score-value {- font-size: 3rem;- font-weight: 700;- }-- .score-label {- color: $text-secondary;- }-- &.score-excellent {- border: 2px solid $success;- .score-value { color: $success; }- }-- &.score-good {- border: 2px solid $accent-primary;- .score-value { color: $accent-primary; }- }-- &.score-fair {- border: 2px solid $warning;- .score-value { color: $warning; }- }-- &.score-poor {- border: 2px solid $danger;- .score-value { color: $danger; }- }+ gap: $space-3;+ padding-top: $space-2;}- .audit-timestamp {- text-align: center;- color: $text-tertiary;- font-size: $font-size-sm;+ .sec-audit-meta {+ font-family: var(--mono);+ font-size: 11px;+ color: var(--text-faint);}.audit-section {h4 {- margin-bottom: $space-3;+ margin: 0 0 $space-2;padding-bottom: $space-2;- border-bottom: 1px solid $border-subtle;+ border-bottom: 1px solid var(--border-soft);+ font-family: var(--mono);+ font-size: 10.5px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--text-faint);}&.recommendations {- background: fade($accent-primary-raw, 10%);padding: $space-4;- border-radius: $radius-md;+ background: var(--accent-bg-soft);+ border: 1px solid var(--accent-bg);+ border-radius: var(--radius-sm);++ h4 {+ border-bottom: none;+ padding-bottom: 0;+ color: var(--accent-bright);+ }ul {margin: 0;- padding-left: $space-6;+ padding-left: $space-5;li {margin-bottom: $space-2;+ font-size: 13px;+ line-height: 1.5;+ color: var(--text-dim);&:last-child {margin-bottom: 0;@@ -736,83 +829,124 @@}}}+}- .findings-list {- display: flex;- flex-direction: column;- gap: $space-2;- }-- .finding-item {+// ── Vulnerability tab ────────────────────────────────────────+.vulnerability-tab {+ .sec-hardening {display: flex;align-items: center;- gap: $space-3;- padding: $space-2 $space-3;- background: $bg-hover;- border-radius: $radius-sm;+ gap: $space-6;+ padding-bottom: $space-5;+ margin-bottom: $space-5;+ border-bottom: 1px solid var(--border-soft);- .finding-message {- flex: 1;- font-size: $font-size-sm;+ &__title {+ font-size: 14px;+ font-weight: $font-weight-semibold;+ }++ &__sub {+ margin-top: 5px;+ font-family: var(--mono);+ font-size: 11.5px;+ color: var(--text-faint);}}-}-// Vulnerability Tab-.vulnerability-tab {.scan-section {- margin-bottom: $space-6;+ margin-bottom: $space-5;++ &:last-child { margin-bottom: 0; }h4 {- margin-bottom: $space-3;- color: $text-secondary;+ margin: 0 0 $space-2;+ font-family: var(--mono);+ font-size: 10.5px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--text-faint);}}+}- .findings-list.compact {- list-style: none;- padding: 0;- margin: 0;- background: $bg-hover;- border-radius: $radius-md;- max-height: 300px;- overflow-y: auto;+// ── Auto Updates tab ─────────────────────────────────────────+.auto-updates-tab {+ .auto-updates-actions {+ display: flex;+ gap: $space-3;+ margin-top: $space-5;+ }+}- li {- padding: $space-2 $space-4;- font-size: $font-size-sm;- border-bottom: 1px solid $border-subtle;+// ============================================+// Shared (global) helpers — consumed by other pages too. Keep stable.+// ============================================+.not-installed {+ text-align: center;+ padding: $space-6;- &:last-child {- border-bottom: none;- }+ p {+ margin-bottom: $space-4;+ color: $text-secondary;+ }+}- &.warning {- border: 1px solid fade($warning, 45%);- }+.info-list {+ display: flex;+ flex-direction: column;+ gap: $space-2;+}- &.suggestion {- border: 1px solid fade($accent-primary-raw, 45%);- }- }+.info-item {+ display: flex;+ justify-content: space-between;+ align-items: center;+ padding: $space-2 0;+ border-bottom: 1px solid $border-subtle;++ &:last-child {+ border-bottom: none;+ }++ .info-label {+ color: $text-secondary;+ }++ .info-value {+ font-weight: 500;}}-// Auto Updates Tab-.auto-updates-tab {- .auto-updates-actions {- display: flex;- gap: $space-4;+.help-text {+ color: $text-secondary;+ font-size: $font-size-sm;+}++.loading-sm {+ color: $text-tertiary;+ font-size: $font-size-sm;+ padding: $space-4;+}++// Scrollable tabs for many tabs+.tabs-nav-scrollable {+ flex-wrap: nowrap;+ overflow-x: auto;+ scrollbar-width: thin;++ &::-webkit-scrollbar {+ height: 4px;}- .help-text {- background: $bg-hover;- padding: $space-4;- border-radius: $radius-md;+ &::-webkit-scrollbar-track {+ background: transparent;+ }- p {- margin: 0;- }+ &::-webkit-scrollbar-thumb {+ background: $border-subtle;+ border-radius: $radius-sm;}}