439 lines
21 KiB
CSS
439 lines
21 KiB
CSS
/* ═══════════════════════════════════════════════════════════════
|
|
Navitrends Ops Platform
|
|
Fonts: Syne (display) + Geist Mono (data/code)
|
|
Theme: Dark (default) / Light — toggled via [data-theme="light"]
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
/* ── DARK THEME (default) ──────────────────────────────────── */
|
|
:root {
|
|
--bg: #0a0b0e;
|
|
--surface: #111318;
|
|
--surface2: #181c24;
|
|
--border: #1e2330;
|
|
--border2: #262d3d;
|
|
|
|
--text: #e8ecf4;
|
|
--text2: #8892a4;
|
|
--text3: #4a5568;
|
|
|
|
--accent: #3b82f6;
|
|
--accent2: #60a5fa;
|
|
--green: #22c55e;
|
|
--red: #ef4444;
|
|
--yellow: #f59e0b;
|
|
--purple: #a78bfa;
|
|
--cyan: #22d3ee;
|
|
|
|
--shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
|
|
|
|
--radius: 10px;
|
|
--radius-lg: 16px;
|
|
--font: 'Syne', sans-serif;
|
|
--mono: 'Geist Mono', monospace;
|
|
--trans: 0.18s ease;
|
|
}
|
|
|
|
/* ── LIGHT THEME ───────────────────────────────────────────── */
|
|
[data-theme="light"] {
|
|
--bg: #f0f2f7;
|
|
--surface: #ffffff;
|
|
--surface2: #f5f7fb;
|
|
--border: #dde1ed;
|
|
--border2: #c8cfe0;
|
|
|
|
--text: #0f1117;
|
|
--text2: #4a5578;
|
|
--text3: #9aa3b8;
|
|
|
|
--accent: #2563eb;
|
|
--accent2: #3b82f6;
|
|
--green: #16a34a;
|
|
--red: #dc2626;
|
|
--yellow: #d97706;
|
|
--purple: #7c3aed;
|
|
--cyan: #0891b2;
|
|
|
|
--shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
|
|
}
|
|
|
|
/* ── RESET ─────────────────────────────────────────────────── */
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: var(--font);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
-webkit-font-smoothing: antialiased;
|
|
transition: background 0.3s, color 0.3s;
|
|
}
|
|
|
|
::-webkit-scrollbar { width: 4px; height: 4px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
|
|
|
|
/* ── LAYOUT ────────────────────────────────────────────────── */
|
|
.layout { display: flex; height: 100vh; overflow: hidden; }
|
|
|
|
/* ── SIDEBAR ───────────────────────────────────────────────── */
|
|
.sidebar {
|
|
width: 220px; min-width: 220px;
|
|
background: var(--surface);
|
|
border-right: 1px solid var(--border);
|
|
display: flex; flex-direction: column;
|
|
padding: 20px 12px;
|
|
transition: background 0.3s, border-color 0.3s;
|
|
}
|
|
|
|
.sidebar-brand {
|
|
display: flex; align-items: center; gap: 12px;
|
|
padding: 0 8px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
margin-bottom: 20px;
|
|
}
|
|
.brand-mark {
|
|
width: 36px; height: 36px; background: var(--accent);
|
|
border-radius: 8px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-family: var(--mono); font-weight: 500; font-size: 12px; color: #fff;
|
|
flex-shrink: 0;
|
|
}
|
|
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
|
|
.brand-sub { font-size: 10px; color: var(--text3); font-family: var(--mono); letter-spacing: 0.08em; }
|
|
|
|
.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
|
|
.nav-section-label {
|
|
font-size: 9px; letter-spacing: 0.12em; color: var(--text3);
|
|
font-family: var(--mono); padding: 0 8px;
|
|
margin-bottom: 6px; margin-top: 4px;
|
|
}
|
|
.nav-item {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 9px 12px; border-radius: var(--radius);
|
|
color: var(--text2); text-decoration: none;
|
|
font-size: 13px; font-weight: 500; cursor: pointer;
|
|
transition: background var(--trans), color var(--trans);
|
|
}
|
|
.nav-item:hover { background: var(--surface2); color: var(--text); }
|
|
.nav-item.active { background: var(--accent); color: #fff; }
|
|
.nav-item i { width: 16px; text-align: center; font-size: 13px; }
|
|
.nav-badge {
|
|
margin-left: auto; font-family: var(--mono); font-size: 10px;
|
|
background: var(--border2); color: var(--text2);
|
|
padding: 2px 6px; border-radius: 20px;
|
|
}
|
|
.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); color: #fff; }
|
|
|
|
.sidebar-footer {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto;
|
|
}
|
|
.server-pill {
|
|
flex: 1; display: flex; align-items: center; gap: 7px;
|
|
background: var(--surface2); border-radius: 20px;
|
|
padding: 6px 10px; font-family: var(--mono);
|
|
font-size: 11px; color: var(--text2); overflow: hidden;
|
|
}
|
|
.pulse-dot {
|
|
width: 7px; height: 7px; border-radius: 50%;
|
|
background: var(--text3); flex-shrink: 0; transition: background 0.3s;
|
|
}
|
|
.pulse-dot.online { background: var(--green); animation: pulse 2s infinite; }
|
|
.pulse-dot.offline { background: var(--red); }
|
|
@keyframes pulse {
|
|
0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
|
|
50% { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
|
|
}
|
|
|
|
.logout-btn {
|
|
width: 32px; height: 32px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
border-radius: 8px; color: var(--text3); text-decoration: none;
|
|
transition: background var(--trans), color var(--trans);
|
|
}
|
|
.logout-btn:hover { background: var(--red); color: #fff; }
|
|
|
|
/* ── THEME TOGGLE BUTTON ───────────────────────────────────── */
|
|
.theme-toggle {
|
|
width: 32px; height: 32px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
border-radius: 8px; background: var(--surface2);
|
|
border: 1px solid var(--border); color: var(--text2);
|
|
cursor: pointer; font-size: 14px;
|
|
transition: background var(--trans), color var(--trans), border-color var(--trans);
|
|
}
|
|
.theme-toggle:hover { background: var(--border2); color: var(--text); }
|
|
|
|
/* ── MAIN ──────────────────────────────────────────────────── */
|
|
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
|
|
|
|
.topbar {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 18px 28px; border-bottom: 1px solid var(--border);
|
|
background: var(--surface); flex-shrink: 0;
|
|
transition: background 0.3s, border-color 0.3s;
|
|
}
|
|
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
|
|
.page-title { font-size: 20px; font-weight: 700; }
|
|
.page-subtitle { font-family: var(--mono); font-size: 11px; color: var(--text3); }
|
|
.topbar-right { display: flex; align-items: center; gap: 10px; }
|
|
|
|
.icon-btn {
|
|
width: 34px; height: 34px; background: var(--surface2);
|
|
border: 1px solid var(--border); border-radius: 8px;
|
|
color: var(--text2); cursor: pointer;
|
|
display: flex; align-items: center; justify-content: center;
|
|
transition: background var(--trans), color var(--trans); font-size: 13px;
|
|
}
|
|
.icon-btn:hover { background: var(--border2); color: var(--text); }
|
|
.icon-btn.spinning i { animation: spin 0.8s linear infinite; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
.uptime-chip {
|
|
font-family: var(--mono); font-size: 11px; color: var(--text3);
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
padding: 5px 12px; border-radius: 20px;
|
|
}
|
|
|
|
.content {
|
|
flex: 1; overflow-y: auto; padding: 24px 28px;
|
|
display: flex; flex-direction: column; gap: 20px;
|
|
}
|
|
|
|
/* ── PAGES ─────────────────────────────────────────────────── */
|
|
.page { display: none; flex-direction: column; gap: 20px; }
|
|
.page.active { display: flex; animation: fadeIn 0.2s ease; }
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(5px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ── CARDS ─────────────────────────────────────────────────── */
|
|
.card {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg); padding: 20px;
|
|
box-shadow: var(--shadow);
|
|
transition: background 0.3s, border-color 0.3s;
|
|
}
|
|
.card-header {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
margin-bottom: 16px;
|
|
}
|
|
.card-title {
|
|
font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
|
|
display: flex; align-items: center; gap: 8px; color: var(--text);
|
|
}
|
|
.card-title i { color: var(--accent2); font-size: 12px; }
|
|
.card-meta { font-family: var(--mono); font-size: 11px; color: var(--text3); }
|
|
|
|
/* ── SYSTEM METRICS ────────────────────────────────────────── */
|
|
.metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
|
|
.metric-card {
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 16px; position: relative; overflow: hidden;
|
|
transition: background 0.3s, border-color 0.3s;
|
|
}
|
|
.metric-card::before {
|
|
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent);
|
|
}
|
|
.metric-card.mem::before { background: var(--purple); }
|
|
.metric-card.disk::before { background: var(--cyan); }
|
|
.metric-card.load::before { background: var(--yellow); }
|
|
|
|
.metric-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text3); margin-bottom: 8px; }
|
|
.metric-value { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--text); line-height: 1; margin-bottom: 10px; }
|
|
.metric-value span { font-size: 12px; color: var(--text3); }
|
|
|
|
.gauge-bar { height: 3px; background: var(--border2); border-radius: 4px; overflow: hidden; }
|
|
.gauge-fill {
|
|
height: 100%; border-radius: 4px; background: var(--accent);
|
|
transition: width 0.6s ease;
|
|
}
|
|
.metric-card.mem .gauge-fill { background: var(--purple); }
|
|
.metric-card.disk .gauge-fill { background: var(--cyan); }
|
|
.metric-card.load .gauge-fill { background: var(--yellow); }
|
|
|
|
/* ── STAT ROW ──────────────────────────────────────────────── */
|
|
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
|
|
.stat-card {
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 14px 16px; text-align: center;
|
|
transition: background 0.3s;
|
|
}
|
|
.stat-number { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--accent2); line-height: 1; }
|
|
.stat-label { font-size: 11px; color: var(--text3); margin-top: 5px; letter-spacing: 0.04em; }
|
|
|
|
/* ── CONTAINERS TABLE ──────────────────────────────────────── */
|
|
.ct-table { width: 100%; border-collapse: collapse; }
|
|
.ct-table th {
|
|
font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
|
|
color: var(--text3); padding: 6px 10px; text-align: left;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.ct-table td {
|
|
padding: 10px; border-bottom: 1px solid var(--border);
|
|
font-size: 13px; vertical-align: middle;
|
|
}
|
|
.ct-table tr:last-child td { border-bottom: none; }
|
|
.ct-table tr:hover td { background: var(--surface2); }
|
|
|
|
.ct-name { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
|
|
.ct-image { font-family: var(--mono); font-size: 11px; color: var(--text3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.ct-ports { font-family: var(--mono); font-size: 11px; color: var(--cyan); }
|
|
.ct-owner { font-family: var(--mono); font-size: 11px; color: var(--purple); }
|
|
|
|
/* ── BADGES ────────────────────────────────────────────────── */
|
|
.badge {
|
|
display: inline-flex; align-items: center; gap: 5px;
|
|
padding: 3px 9px; border-radius: 20px;
|
|
font-family: var(--mono); font-size: 11px; font-weight: 500;
|
|
}
|
|
.badge-run { background: rgba(34,197,94,0.12); color: var(--green); }
|
|
.badge-stop { background: rgba(239,68,68,0.12); color: var(--red); }
|
|
.badge-run::before { content:''; width:5px; height:5px; background:var(--green); border-radius:50%; }
|
|
.badge-stop::before { content:''; width:5px; height:5px; background:var(--red); border-radius:50%; }
|
|
[data-theme="light"] .badge-run { background: rgba(22,163,74,0.1); }
|
|
[data-theme="light"] .badge-stop { background: rgba(220,38,38,0.1); }
|
|
|
|
/* ── INLINE STAT BARS ──────────────────────────────────────── */
|
|
.stat-bar-wrap { display: flex; align-items: center; gap: 6px; min-width: 90px; }
|
|
.stat-bar-bg { flex: 1; height: 4px; background: var(--border2); border-radius: 4px; overflow: hidden; }
|
|
.stat-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.5s ease; }
|
|
.stat-bar-fill.warn { background: var(--yellow); }
|
|
.stat-bar-fill.crit { background: var(--red); }
|
|
.stat-pct { font-family: var(--mono); font-size: 10px; color: var(--text3); min-width: 36px; }
|
|
|
|
/* ── USERS GRID ────────────────────────────────────────────── */
|
|
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
|
|
.user-card {
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 16px; cursor: pointer;
|
|
transition: border-color var(--trans), background var(--trans), box-shadow var(--trans);
|
|
}
|
|
.user-card:hover { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
|
|
.user-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
|
|
.user-avatar {
|
|
width: 38px; height: 38px; border-radius: 50%; display: flex;
|
|
align-items: center; justify-content: center;
|
|
font-weight: 700; font-size: 14px; flex-shrink: 0; color: #fff;
|
|
}
|
|
.user-name { font-weight: 600; font-size: 14px; }
|
|
.user-uid { font-family: var(--mono); font-size: 11px; color: var(--text3); }
|
|
.user-tags { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
.user-tag {
|
|
font-family: var(--mono); font-size: 10px;
|
|
padding: 2px 8px; border-radius: 20px;
|
|
background: var(--border2); color: var(--text2);
|
|
}
|
|
.user-tag.docker { background: rgba(59,130,246,0.15); color: var(--accent2); }
|
|
.user-tag.linger { background: rgba(34,197,94,0.12); color: var(--green); }
|
|
[data-theme="light"] .user-tag.docker { background: rgba(37,99,235,0.1); }
|
|
[data-theme="light"] .user-tag.linger { background: rgba(22,163,74,0.1); }
|
|
|
|
.user-stats { display: flex; gap: 16px; margin-top: 10px; }
|
|
.user-stat { font-family: var(--mono); font-size: 11px; color: var(--text3); }
|
|
.user-stat strong { color: var(--text); }
|
|
|
|
/* ── RESTORE FORM ──────────────────────────────────────────── */
|
|
.restore-form { display: flex; flex-direction: column; gap: 0; }
|
|
.form-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
|
|
.form-section:last-child { border-bottom: none; }
|
|
.form-section-title { font-size: 10px; font-family: var(--mono); letter-spacing: 0.12em; color: var(--text3); margin-bottom: 14px; }
|
|
|
|
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
|
|
.radio-card { cursor: pointer; flex: 1; min-width: 180px; }
|
|
.radio-card input { display: none; }
|
|
.radio-body {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 12px 14px; border: 1px solid var(--border2);
|
|
border-radius: var(--radius); background: var(--surface2);
|
|
transition: border-color var(--trans), background var(--trans);
|
|
}
|
|
.radio-card input:checked + .radio-body { border-color: var(--accent); background: rgba(59,130,246,0.08); }
|
|
[data-theme="light"] .radio-card input:checked + .radio-body { background: rgba(37,99,235,0.06); }
|
|
.radio-label { font-size: 13px; font-weight: 600; }
|
|
.radio-desc { font-size: 11px; color: var(--text3); }
|
|
.radio-desc code { background: var(--border2); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); }
|
|
.radio-icon { font-size: 18px; }
|
|
.radio-card.small .radio-body { padding: 9px 12px; gap: 8px; }
|
|
.radio-card.small .radio-label { font-size: 12px; }
|
|
|
|
.form-row { display: flex; gap: 12px; }
|
|
.form-row .form-group { flex: 1; }
|
|
.form-group { display: flex; flex-direction: column; gap: 6px; }
|
|
.form-label { font-size: 11px; font-weight: 600; color: var(--text2); letter-spacing: 0.06em; }
|
|
.form-input {
|
|
background: var(--surface2); border: 1px solid var(--border2);
|
|
border-radius: 8px; padding: 9px 12px; font-size: 13px;
|
|
font-family: var(--mono); color: var(--text); width: 100%;
|
|
transition: border-color var(--trans), background 0.3s;
|
|
}
|
|
.form-input:focus { outline: none; border-color: var(--accent); }
|
|
.form-input[readonly] { opacity: 0.6; cursor: default; }
|
|
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
|
|
.form-check input { accent-color: var(--accent); width: 14px; height: 14px; }
|
|
|
|
/* ── BUTTONS ───────────────────────────────────────────────── */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 7px;
|
|
padding: 9px 16px; border-radius: 8px;
|
|
font-size: 13px; font-weight: 600; font-family: var(--font);
|
|
cursor: pointer; border: none;
|
|
transition: opacity var(--trans), background var(--trans), filter var(--trans);
|
|
}
|
|
.btn:hover { filter: brightness(1.1); }
|
|
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
|
|
.btn-primary { background: var(--accent); color: #fff; }
|
|
.btn-danger { background: var(--red); color: #fff; }
|
|
.btn-success { background: var(--green); color: #fff; }
|
|
.btn-ghost { background: var(--surface2); border: 1px solid var(--border2); color: var(--text2); }
|
|
.btn-ghost:hover { background: var(--border2); color: var(--text); filter: none; }
|
|
.btn-sm { padding: 5px 11px; font-size: 12px; }
|
|
.btn-lg { padding: 12px 24px; font-size: 14px; }
|
|
|
|
/* ── LOG CONSOLE ───────────────────────────────────────────── */
|
|
.log-console {
|
|
background: #05060a; border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 14px 16px;
|
|
font-family: var(--mono); font-size: 12px; line-height: 1.7;
|
|
max-height: 400px; overflow-y: auto; color: #8892a4;
|
|
}
|
|
[data-theme="light"] .log-console { background: #1a1f2e; border-color: #2d3555; }
|
|
.log-line { white-space: pre-wrap; word-break: break-all; }
|
|
|
|
/* ── BACKUP LIST ───────────────────────────────────────────── */
|
|
.backup-list { display: flex; flex-direction: column; gap: 8px; }
|
|
.backup-item {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 9px 12px; border-radius: 8px;
|
|
background: var(--surface2); gap: 10px; flex-wrap: wrap;
|
|
border: 1px solid var(--border);
|
|
}
|
|
.backup-name { font-family: var(--mono); font-size: 12px; color: var(--text2); }
|
|
|
|
/* ── TWO COLUMN ────────────────────────────────────────────── */
|
|
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }
|
|
|
|
/* ── FORM GRID ─────────────────────────────────────────────── */
|
|
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
|
|
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
|
|
|
|
/* ── SECTION HEADER ────────────────────────────────────────── */
|
|
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
|
|
.section-title { font-size: 13px; font-weight: 600; color: var(--text2); font-family: var(--mono); letter-spacing: 0.06em; }
|
|
|
|
/* ── ALERTS ────────────────────────────────────────────────── */
|
|
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; display: none; }
|
|
.alert.show { display: block; }
|
|
.alert-success { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
|
|
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
|
|
[data-theme="light"] .alert-success { background: rgba(22,163,74,0.08); }
|
|
[data-theme="light"] .alert-error { background: rgba(220,38,38,0.08); }
|
|
|
|
/* ── EMPTY STATE ───────────────────────────────────────────── */
|
|
.empty-state { text-align: center; padding: 36px; color: var(--text3); font-size: 13px; }
|
|
.empty-state i { font-size: 26px; display: block; margin-bottom: 10px; opacity: 0.35; }
|