429 أسطر
8.5 KiB
CSS
429 أسطر
8.5 KiB
CSS
/* =========================================================================
|
|
Mithal.space Monitor — Dashboard Stylesheet
|
|
========================================================================= */
|
|
|
|
/* ---------- Reset & Base ---------- */
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
/* Light theme */
|
|
--bg-primary: #f0f2f5;
|
|
--bg-secondary: #ffffff;
|
|
--bg-card: #ffffff;
|
|
--text-primary: #1a1a2e;
|
|
--text-secondary: #555770;
|
|
--text-muted: #8e8ea0;
|
|
--border-color: #e0e0e6;
|
|
--accent: #4361ee;
|
|
--accent-light: #e8ecff;
|
|
--green: #22c55e;
|
|
--green-bg: #dcfce7;
|
|
--yellow: #eab308;
|
|
--yellow-bg: #fef9c3;
|
|
--red: #ef4444;
|
|
--red-bg: #fee2e2;
|
|
--chart-line: #4361ee;
|
|
--chart-fill: rgba(67, 97, 238, 0.12);
|
|
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
|
|
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
--radius: 12px;
|
|
--radius-sm: 8px;
|
|
--transition: 0.25s ease;
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--bg-primary: #0f1117;
|
|
--bg-secondary: #181b24;
|
|
--bg-card: #1e2130;
|
|
--text-primary: #e4e4ed;
|
|
--text-secondary: #a0a0b8;
|
|
--text-muted: #6b6b80;
|
|
--border-color: #2a2d3a;
|
|
--accent: #6c8cff;
|
|
--accent-light: #1e2740;
|
|
--green: #34d399;
|
|
--green-bg: #0d3329;
|
|
--yellow: #facc15;
|
|
--yellow-bg: #3b3508;
|
|
--red: #f87171;
|
|
--red-bg: #3b1212;
|
|
--chart-line: #6c8cff;
|
|
--chart-fill: rgba(108, 140, 255, 0.10);
|
|
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
html {
|
|
font-size: 15px;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
transition: background var(--transition), color var(--transition);
|
|
}
|
|
|
|
/* ---------- Dashboard Container ---------- */
|
|
.dashboard {
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* ---------- Header ---------- */
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
padding: 18px 24px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow-sm);
|
|
margin-bottom: 24px;
|
|
transition: background var(--transition), border var(--transition);
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 1.35rem;
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.header-subtitle {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* Theme Toggle */
|
|
.theme-toggle {
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-sm);
|
|
padding: 6px 10px;
|
|
cursor: pointer;
|
|
font-size: 1.15rem;
|
|
color: var(--text-primary);
|
|
transition: background var(--transition);
|
|
}
|
|
|
|
.theme-toggle:hover {
|
|
background: var(--accent-light);
|
|
}
|
|
|
|
.icon-moon { display: none; }
|
|
[data-theme="dark"] .icon-sun { display: none; }
|
|
[data-theme="dark"] .icon-moon { display: inline; }
|
|
|
|
/* Refresh Info */
|
|
.refresh-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.countdown {
|
|
font-size: 0.82rem;
|
|
color: var(--text-muted);
|
|
min-width: 28px;
|
|
text-align: right;
|
|
}
|
|
|
|
.refresh-btn {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: var(--radius-sm);
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
transition: opacity var(--transition);
|
|
}
|
|
|
|
.refresh-btn:hover {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
/* Export Button */
|
|
.export-btn {
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-sm);
|
|
padding: 6px 14px;
|
|
cursor: pointer;
|
|
font-size: 0.85rem;
|
|
color: var(--text-primary);
|
|
transition: background var(--transition);
|
|
}
|
|
|
|
.export-btn:hover {
|
|
background: var(--accent-light);
|
|
}
|
|
|
|
/* ---------- Loading Indicator ---------- */
|
|
.loading-indicator {
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
padding: 32px;
|
|
color: var(--text-muted);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.loading-indicator.active {
|
|
display: flex;
|
|
}
|
|
|
|
.spinner {
|
|
width: 24px;
|
|
height: 24px;
|
|
border: 3px solid var(--border-color);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ---------- Status Cards ---------- */
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
|
|
gap: 16px;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: background var(--transition), border var(--transition),
|
|
box-shadow var(--transition);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card:hover {
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.card-label {
|
|
font-size: 0.78rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--text-muted);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.card-value {
|
|
font-size: 1.65rem;
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.card-unit {
|
|
font-size: 0.78rem;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.card-indicator {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 4px;
|
|
}
|
|
|
|
/* Status animation */
|
|
.card-status-pulse {
|
|
animation: pulse 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.6; }
|
|
}
|
|
|
|
/* ---------- Charts ---------- */
|
|
.charts {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
|
|
gap: 16px;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.chart-container {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: background var(--transition), border var(--transition);
|
|
}
|
|
|
|
.chart-container h3 {
|
|
font-size: 0.92rem;
|
|
font-weight: 600;
|
|
margin-bottom: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ---------- Table ---------- */
|
|
.table-section {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: background var(--transition), border var(--transition);
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.table-section h3 {
|
|
font-size: 0.92rem;
|
|
font-weight: 600;
|
|
margin-bottom: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.table-wrapper {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.88rem;
|
|
}
|
|
|
|
thead th {
|
|
text-align: left;
|
|
padding: 10px 12px;
|
|
border-bottom: 2px solid var(--border-color);
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
font-size: 0.8rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
tbody td {
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
tbody tr:hover {
|
|
background: var(--accent-light);
|
|
}
|
|
|
|
.no-data {
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
padding: 24px 0 !important;
|
|
}
|
|
|
|
/* Status badge */
|
|
.status-badge {
|
|
display: inline-block;
|
|
padding: 3px 10px;
|
|
border-radius: 20px;
|
|
font-size: 0.78rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.status-up {
|
|
background: var(--green-bg);
|
|
color: var(--green);
|
|
}
|
|
|
|
.status-down {
|
|
background: var(--red-bg);
|
|
color: var(--red);
|
|
}
|
|
|
|
.status-warn {
|
|
background: var(--yellow-bg);
|
|
color: var(--yellow);
|
|
}
|
|
|
|
/* ---------- Responsive ---------- */
|
|
@media (max-width: 768px) {
|
|
.dashboard {
|
|
padding: 12px;
|
|
}
|
|
|
|
.header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
padding: 14px 16px;
|
|
}
|
|
|
|
.header-right {
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.cards {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 10px;
|
|
}
|
|
|
|
.card {
|
|
padding: 14px;
|
|
}
|
|
|
|
.card-value {
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.charts {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
table {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
thead th, tbody td {
|
|
padding: 8px 8px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.cards {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|