الملفات
ghaymah-exam-ahmedmohamed-S…/q4-siem-system/dashboard/styles.css

499 أسطر
12 KiB
CSS

/* ═══════════════════════════════════════════════════════════════
SIEM Dashboard - Styles
نظام مراقبة وتحليل السجلات الأمنية
═══════════════════════════════════════════════════════════════ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0f172a;
--bg-secondary: #1e293b;
--bg-card: #334155;
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--accent-blue: #3b82f6;
--accent-green: #22c55e;
--accent-yellow: #eab308;
--accent-red: #ef4444;
--accent-orange: #f97316;
--border-color: #475569;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.6;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* ═══════════════════════════════════════════════════════════════
Header
═══════════════════════════════════════════════════════════════ */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 30px;
background: var(--bg-secondary);
border-radius: 12px;
margin-bottom: 24px;
box-shadow: var(--shadow);
}
.header h1 {
font-size: 1.8rem;
margin-bottom: 4px;
}
.header p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.header-actions {
display: flex;
align-items: center;
gap: 20px;
}
.status-badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.status-badge.online {
background: rgba(34, 197, 94, 0.2);
color: var(--accent-green);
}
.last-update {
color: var(--text-secondary);
font-size: 0.85rem;
}
/* ═══════════════════════════════════════════════════════════════
Stats Cards
═══════════════════════════════════════════════════════════════ */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
margin-bottom: 24px;
}
.stat-card {
display: flex;
align-items: center;
gap: 16px;
padding: 24px;
background: var(--bg-secondary);
border-radius: 12px;
border-right: 4px solid;
box-shadow: var(--shadow);
transition: transform 0.2s;
}
.stat-card:hover {
transform: translateY(-2px);
}
.stat-card.critical {
border-color: var(--accent-red);
}
.stat-card.high {
border-color: var(--accent-orange);
}
.stat-card.medium {
border-color: var(--accent-yellow);
}
.stat-card.info {
border-color: var(--accent-blue);
}
.stat-icon {
font-size: 2.5rem;
}
.stat-content h3 {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 4px;
}
.stat-number {
font-size: 2rem;
font-weight: 700;
}
.stat-card.critical .stat-number { color: var(--accent-red); }
.stat-card.high .stat-number { color: var(--accent-orange); }
.stat-card.medium .stat-number { color: var(--accent-yellow); }
.stat-card.info .stat-number { color: var(--accent-blue); }
/* ═══════════════════════════════════════════════════════════════
Main Content
═══════════════════════════════════════════════════════════════ */
.main-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 24px;
}
@media (max-width: 1024px) {
.main-content {
grid-template-columns: 1fr;
}
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.section-header h2 {
font-size: 1.2rem;
}
/* ═══════════════════════════════════════════════════════════════
Alerts Section
═══════════════════════════════════════════════════════════════ */
.alerts-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
box-shadow: var(--shadow);
}
.filter-buttons {
display: flex;
gap: 8px;
}
.filter-btn {
padding: 6px 14px;
border: 1px solid var(--border-color);
background: transparent;
color: var(--text-secondary);
border-radius: 6px;
cursor: pointer;
font-size: 0.85rem;
transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
background: var(--accent-blue);
border-color: var(--accent-blue);
color: white;
}
.alerts-list {
max-height: 400px;
overflow-y: auto;
}
.alert-item {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px;
background: var(--bg-card);
border-radius: 8px;
margin-bottom: 12px;
border-right: 3px solid;
}
.alert-item.critical { border-color: var(--accent-red); }
.alert-item.high { border-color: var(--accent-orange); }
.alert-item.medium { border-color: var(--accent-yellow); }
.alert-icon {
font-size: 1.5rem;
}
.alert-content {
flex: 1;
}
.alert-title {
font-weight: 600;
margin-bottom: 4px;
}
.alert-details {
font-size: 0.85rem;
color: var(--text-secondary);
}
.alert-time {
font-size: 0.75rem;
color: var(--text-secondary);
}
.severity-badge {
padding: 4px 10px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
}
.severity-badge.critical {
background: rgba(239, 68, 68, 0.2);
color: var(--accent-red);
}
.severity-badge.high {
background: rgba(249, 115, 22, 0.2);
color: var(--accent-orange);
}
.severity-badge.medium {
background: rgba(234, 179, 8, 0.2);
color: var(--accent-yellow);
}
/* ═══════════════════════════════════════════════════════════════
IPs Section
═══════════════════════════════════════════════════════════════ */
.ips-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
box-shadow: var(--shadow);
}
.ips-table-container {
overflow-x: auto;
}
.ips-table {
width: 100%;
border-collapse: collapse;
}
.ips-table th,
.ips-table td {
padding: 12px;
text-align: right;
border-bottom: 1px solid var(--border-color);
}
.ips-table th {
color: var(--text-secondary);
font-weight: 500;
font-size: 0.85rem;
}
.ips-table td {
font-size: 0.9rem;
}
.ips-table tr:hover {
background: var(--bg-card);
}
.ip-address {
font-family: monospace;
color: var(--accent-red);
}
.threat-count {
display: inline-block;
padding: 4px 10px;
background: rgba(239, 68, 68, 0.2);
color: var(--accent-red);
border-radius: 4px;
font-weight: 600;
}
.btn-block {
padding: 6px 12px;
background: var(--accent-red);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.8rem;
transition: opacity 0.2s;
}
.btn-block:hover {
opacity: 0.8;
}
/* ═══════════════════════════════════════════════════════════════
Chart Section
═══════════════════════════════════════════════════════════════ */
.chart-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
box-shadow: var(--shadow);
}
.chart-container {
padding: 20px 0;
}
.bar-chart {
display: flex;
flex-direction: column;
gap: 16px;
}
.chart-bar {
display: flex;
align-items: center;
gap: 12px;
}
.chart-label {
width: 150px;
font-size: 0.9rem;
text-align: left;
}
.chart-bar-container {
flex: 1;
height: 30px;
background: var(--bg-card);
border-radius: 4px;
overflow: hidden;
}
.chart-bar-fill {
height: 100%;
border-radius: 4px;
transition: width 0.5s ease;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 10px;
font-size: 0.85rem;
font-weight: 600;
}
.chart-bar-fill.sql { background: var(--accent-red); }
.chart-bar-fill.xss { background: var(--accent-orange); }
.chart-bar-fill.brute { background: var(--accent-yellow); }
.chart-bar-fill.traversal { background: var(--accent-blue); }
/* ═══════════════════════════════════════════════════════════════
Sources Section
═══════════════════════════════════════════════════════════════ */
.sources-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
box-shadow: var(--shadow);
}
.sources-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
}
.source-card {
background: var(--bg-card);
border-radius: 8px;
padding: 20px;
text-align: center;
}
.source-icon {
font-size: 2rem;
margin-bottom: 8px;
}
.source-card h4 {
margin-bottom: 8px;
}
.source-status {
font-size: 0.85rem;
color: var(--accent-green);
margin-bottom: 4px;
}
.source-lines {
font-size: 0.9rem;
color: var(--text-secondary);
}
/* ═══════════════════════════════════════════════════════════════
Footer
═══════════════════════════════════════════════════════════════ */
.footer {
text-align: center;
padding: 24px;
color: var(--text-secondary);
font-size: 0.85rem;
}
/* ═══════════════════════════════════════════════════════════════
Scrollbar
═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-card);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* ═══════════════════════════════════════════════════════════════
Animations
═══════════════════════════════════════════════════════════════ */
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.alert-item.new {
animation: pulse 1s ease-in-out 3;
}