457 lines
13 KiB
CSS
457 lines
13 KiB
CSS
/* ========================================================================
|
|
Design Tokens — dark theme (slate/indigo)
|
|
======================================================================== */
|
|
:root {
|
|
/* Surfaces */
|
|
--bg: #0b1220;
|
|
--surface: #131c2e;
|
|
--surface-2: #1a2540;
|
|
--surface-3: #223052;
|
|
--border: #263654;
|
|
--border-hi: #36507d;
|
|
|
|
/* Text */
|
|
--text: #e6edf7;
|
|
--text-muted: #9fb0cb;
|
|
--text-dim: #6c7fa2;
|
|
|
|
/* Brand / accent */
|
|
--accent: #60a5fa;
|
|
--accent-hover: #3b82f6;
|
|
--accent-dim: #1e3a8a;
|
|
|
|
/* Semantic */
|
|
--success: #10b981;
|
|
--success-bg: #053b2d;
|
|
--warning: #f59e0b;
|
|
--warning-bg: #3a2608;
|
|
--danger: #ef4444;
|
|
--danger-bg: #3b0f0f;
|
|
--info: #38bdf8;
|
|
--info-bg: #052b3a;
|
|
|
|
/* Elevation */
|
|
--shadow-sm: 0 1px 2px rgba(0,0,0,.3);
|
|
--shadow-md: 0 2px 8px rgba(0,0,0,.35);
|
|
--shadow-lg: 0 8px 24px rgba(0,0,0,.45);
|
|
|
|
/* Radii & spacing */
|
|
--radius-sm: 4px;
|
|
--radius-md: 6px;
|
|
--radius-lg: 10px;
|
|
|
|
/* Typography */
|
|
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
--font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
|
|
}
|
|
|
|
/* ========================================================================
|
|
Reset & base
|
|
======================================================================== */
|
|
* { box-sizing: border-box; }
|
|
html, body { height: 100%; }
|
|
body {
|
|
margin: 0;
|
|
font-family: var(--font);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { color: var(--accent-hover); text-decoration: underline; }
|
|
|
|
h1, h2, h3, h4 { margin: 0 0 0.5rem 0; font-weight: 600; color: var(--text); }
|
|
h1 { font-size: 1.4rem; }
|
|
h2 { font-size: 1.15rem; }
|
|
h3 { font-size: 1rem; }
|
|
|
|
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
|
|
|
|
code, pre { font-family: var(--font-mono); }
|
|
|
|
/* ========================================================================
|
|
Header & nav
|
|
======================================================================== */
|
|
.site-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
padding: 10px 24px;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
box-shadow: var(--shadow-sm);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
.site-header .brand a {
|
|
color: var(--text);
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
}
|
|
.site-header .brand a:hover { text-decoration: none; color: var(--accent); }
|
|
|
|
.main-nav {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex: 1;
|
|
flex-wrap: wrap;
|
|
}
|
|
.main-nav a {
|
|
color: var(--text-muted);
|
|
padding: 7px 14px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
transition: background .15s, color .15s;
|
|
}
|
|
.main-nav a:hover {
|
|
background: var(--surface-2);
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
}
|
|
.main-nav a.active {
|
|
background: var(--accent-dim);
|
|
color: var(--text);
|
|
}
|
|
|
|
.user-menu { display: flex; align-items: center; gap: 10px; }
|
|
.user-menu .username {
|
|
font-size: 13px;
|
|
color: var(--text-muted);
|
|
padding: 4px 8px;
|
|
background: var(--surface-2);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
.btn-logout {
|
|
background: transparent;
|
|
color: var(--text-muted);
|
|
border: 1px solid var(--border);
|
|
padding: 6px 12px;
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: background .15s, color .15s, border-color .15s;
|
|
}
|
|
.btn-logout:hover {
|
|
background: var(--danger-bg);
|
|
color: var(--danger);
|
|
border-color: var(--danger);
|
|
}
|
|
|
|
.site-main { padding: 20px 24px; max-width: 1600px; margin: 0 auto; }
|
|
|
|
/* ========================================================================
|
|
Page scaffolding
|
|
======================================================================== */
|
|
.page-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.page-header h1 { margin: 0; font-size: 22px; }
|
|
|
|
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
.filters select, .filters input {
|
|
padding: 7px 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-2);
|
|
color: var(--text);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
}
|
|
.filters select:focus, .filters input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
|
|
}
|
|
|
|
.muted { color: var(--text-dim); font-size: 13px; }
|
|
|
|
/* ========================================================================
|
|
Tables
|
|
======================================================================== */
|
|
.data-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
.data-table th, .data-table td {
|
|
text-align: left;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
}
|
|
.data-table th {
|
|
background: var(--surface-2);
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
font-size: 11px;
|
|
letter-spacing: .5px;
|
|
}
|
|
.data-table tr:last-child td { border-bottom: none; }
|
|
.data-table tr:hover td { background: var(--surface-2); }
|
|
|
|
/* Severity pills */
|
|
.sev {
|
|
display: inline-block;
|
|
padding: 2px 10px;
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: .5px;
|
|
}
|
|
.sev.CRITICAL { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
|
|
.sev.WARNING { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
|
|
.sev.INFO { background: var(--info-bg); color: var(--info); border: 1px solid var(--info); }
|
|
|
|
/* ========================================================================
|
|
Settings
|
|
======================================================================== */
|
|
.settings-section {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
padding: 20px 24px;
|
|
margin-bottom: 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
max-width: 860px;
|
|
}
|
|
.settings-section h2 {
|
|
margin-top: 0;
|
|
font-size: 16px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.settings-form { display: flex; flex-direction: column; gap: 18px; }
|
|
|
|
/* ---- Toggle grid (tabular on/off switches) ---- */
|
|
.toggle-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
background: var(--surface-2);
|
|
}
|
|
.toggle-grid.compact .toggle-row { padding: 10px 14px; }
|
|
.toggle-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
transition: background .15s;
|
|
}
|
|
.toggle-row:last-child { border-bottom: none; }
|
|
.toggle-row:hover { background: var(--surface-3); }
|
|
.toggle-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
.toggle-title { font-size: 14px; color: var(--text); font-weight: 500; }
|
|
.toggle-help { font-size: 12px; color: var(--text-dim); }
|
|
|
|
/* iOS-style switch */
|
|
.switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 40px;
|
|
height: 22px;
|
|
flex-shrink: 0;
|
|
}
|
|
.switch input { opacity: 0; width: 0; height: 0; }
|
|
.switch .slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
inset: 0;
|
|
background: var(--surface-3);
|
|
border: 1px solid var(--border-hi);
|
|
border-radius: 22px;
|
|
transition: background .2s, border-color .2s;
|
|
}
|
|
.switch .slider::before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 16px;
|
|
width: 16px;
|
|
left: 2px;
|
|
top: 2px;
|
|
background: var(--text-muted);
|
|
border-radius: 50%;
|
|
transition: transform .2s, background .2s;
|
|
}
|
|
.switch input:checked + .slider {
|
|
background: var(--accent-hover);
|
|
border-color: var(--accent-hover);
|
|
}
|
|
.switch input:checked + .slider::before {
|
|
transform: translateX(18px);
|
|
background: #fff;
|
|
}
|
|
.switch input:focus-visible + .slider {
|
|
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
|
|
}
|
|
|
|
/* ---- Labeled input rows ---- */
|
|
.field-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 14px 20px;
|
|
}
|
|
.field-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
.field-row.wide { grid-column: 1 / -1; }
|
|
.field-label {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: .5px;
|
|
font-weight: 600;
|
|
}
|
|
.field-input {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-2);
|
|
color: var(--text);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
transition: border-color .15s, box-shadow .15s;
|
|
}
|
|
.field-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
|
|
}
|
|
.field-input::placeholder { color: var(--text-dim); }
|
|
|
|
/* Inline (non-grid) single field row */
|
|
.settings-form > .field-row { max-width: 280px; }
|
|
|
|
.form-bar {
|
|
display: flex;
|
|
gap: 10px;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--border);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.field-grid { grid-template-columns: 1fr; }
|
|
.toggle-row { padding: 12px 14px; }
|
|
}
|
|
|
|
/* ========================================================================
|
|
Buttons (global)
|
|
======================================================================== */
|
|
.btn-primary {
|
|
background: var(--accent-hover);
|
|
color: #fff;
|
|
border: 0;
|
|
padding: 9px 16px;
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
transition: background .15s;
|
|
}
|
|
.btn-primary:hover { background: var(--accent); }
|
|
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
|
|
.btn-block { width: 100%; }
|
|
|
|
/* ========================================================================
|
|
Fleet overview
|
|
======================================================================== */
|
|
.fleet-overview { margin-bottom: 20px; }
|
|
.fleet-card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
padding: 18px 22px;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
.fleet-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
.fleet-stat-label {
|
|
color: var(--text-dim);
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: .5px;
|
|
font-weight: 600;
|
|
}
|
|
.fleet-stat-value {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
line-height: 1.2;
|
|
}
|
|
.fleet-stat-value.online { color: var(--success); }
|
|
.fleet-stat-value.onbatt { color: var(--warning); }
|
|
.fleet-stat-value.offline { color: var(--danger); }
|
|
|
|
/* ========================================================================
|
|
State indicators (shared)
|
|
======================================================================== */
|
|
.state-dot {
|
|
display: inline-block;
|
|
width: 10px; height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--text-dim);
|
|
margin-right: 8px;
|
|
vertical-align: middle;
|
|
box-shadow: 0 0 0 2px rgba(255,255,255,.05);
|
|
}
|
|
.state-dot.online { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,.5); }
|
|
.state-dot.onbatt { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,.5); }
|
|
.state-dot.offline { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,.5); }
|
|
|
|
/* ========================================================================
|
|
Empty state
|
|
======================================================================== */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 3rem 1.5rem;
|
|
color: var(--text-muted);
|
|
background: var(--surface);
|
|
border: 1px dashed var(--border);
|
|
border-radius: var(--radius-md);
|
|
width: 100%;
|
|
}
|
|
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }
|
|
.empty-state a { color: var(--accent); }
|
|
|
|
/* ========================================================================
|
|
Scrollbars
|
|
======================================================================== */
|
|
* { scrollbar-width: thin; scrollbar-color: var(--border-hi) var(--bg); }
|
|
*::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
*::-webkit-scrollbar-track { background: var(--bg); }
|
|
*::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 5px; border: 2px solid var(--bg); }
|
|
*::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
|
|
|
|
/* ========================================================================
|
|
Responsive
|
|
======================================================================== */
|
|
@media (max-width: 768px) {
|
|
.site-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 16px; }
|
|
.main-nav { width: 100%; }
|
|
.site-main { padding: 16px; }
|
|
.fleet-card { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; padding: 14px 16px; }
|
|
.fleet-stat-value { font-size: 20px; }
|
|
}
|