425 lines
13 KiB
CSS
425 lines
13 KiB
CSS
/* ============================================================
|
|
Fester UI — Shared Design System
|
|
Used by: index.html, ui/live_dag.html, ui/replay.html,
|
|
cockpit/fester-module/ui.html
|
|
============================================================ */
|
|
|
|
/* ---------- Design Tokens ---------- */
|
|
:root {
|
|
/* surfaces */
|
|
--bg-0: #07090d;
|
|
--bg-1: #0b0f14;
|
|
--bg-2: #0e141d;
|
|
--bg-3: #131c28;
|
|
--bg-4: #1a2432;
|
|
|
|
/* lines */
|
|
--line: #1f2a38;
|
|
--line-2: #2c3b4d;
|
|
|
|
/* text */
|
|
--fg-0: #f4f6fa;
|
|
--fg-1: #d0d6df;
|
|
--fg-2: #8a95a5;
|
|
--fg-3: #5a6573;
|
|
|
|
/* status */
|
|
--ok: #66bb6a;
|
|
--ok-bg: rgba(102, 187, 106, 0.12);
|
|
--warn: #ffb300;
|
|
--warn-bg: rgba(255, 179, 0, 0.12);
|
|
--err: #ef5350;
|
|
--err-bg: rgba(239, 83, 80, 0.12);
|
|
--info: #42a5f5;
|
|
--info-bg: rgba(66, 165, 245, 0.12);
|
|
--accent: #ffd54f;
|
|
--accent-bg: rgba(255, 213, 79, 0.12);
|
|
|
|
/* heat ramp */
|
|
--heat-0: #2ecc71;
|
|
--heat-1: #f1c40f;
|
|
--heat-2: #e67e22;
|
|
--heat-3: #e74c3c;
|
|
|
|
/* layout */
|
|
--radius: 6px;
|
|
--radius-lg: 10px;
|
|
--gap: 12px;
|
|
--pad: 12px;
|
|
--topbar-h: 48px;
|
|
|
|
/* type */
|
|
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
--font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
|
|
}
|
|
|
|
/* ---------- Reset ---------- */
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
html, body { margin: 0; padding: 0; height: 100%; }
|
|
body {
|
|
font-family: var(--font-sans);
|
|
font-size: 13px;
|
|
color: var(--fg-1);
|
|
background: var(--bg-1);
|
|
line-height: 1.45;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
a { color: var(--info); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
pre, code, .mono { font-family: var(--font-mono); }
|
|
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
|
|
h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 600; color: var(--fg-0); }
|
|
h1 { font-size: 18px; }
|
|
h2 { font-size: 15px; }
|
|
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--fg-2); }
|
|
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
|
|
|
|
/* ---------- Topbar / Shell ---------- */
|
|
.topbar {
|
|
height: var(--topbar-h);
|
|
background: var(--bg-2);
|
|
border-bottom: 1px solid var(--line);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
gap: 16px;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
}
|
|
.topbar .brand {
|
|
font-weight: 700;
|
|
color: var(--fg-0);
|
|
letter-spacing: 0.5px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.topbar .brand .mark {
|
|
width: 22px; height: 22px;
|
|
border-radius: 4px;
|
|
background: linear-gradient(135deg, var(--info), var(--accent));
|
|
display: inline-block;
|
|
}
|
|
.topbar nav { display: flex; gap: 4px; flex: 1; }
|
|
.topbar nav a {
|
|
color: var(--fg-2);
|
|
padding: 6px 12px;
|
|
border-radius: var(--radius);
|
|
font-size: 12px;
|
|
text-decoration: none;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
.topbar nav a:hover { background: var(--bg-3); color: var(--fg-0); text-decoration: none; }
|
|
.topbar nav a.active { background: var(--bg-4); color: var(--fg-0); }
|
|
|
|
/* connection pill */
|
|
.conn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 10px;
|
|
border-radius: 999px;
|
|
background: var(--bg-3);
|
|
border: 1px solid var(--line-2);
|
|
font-size: 11px;
|
|
font-family: var(--font-mono);
|
|
color: var(--fg-2);
|
|
}
|
|
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); }
|
|
.conn.connecting .dot { background: var(--warn); animation: pulse 1.2s infinite; }
|
|
.conn.online .dot { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
|
|
.conn.offline .dot { background: var(--err); }
|
|
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
|
|
|
|
/* ---------- Buttons ---------- */
|
|
button, .btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 6px 12px;
|
|
background: var(--bg-4);
|
|
color: var(--fg-1);
|
|
border: 1px solid var(--line-2);
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
transition: background 0.12s, border-color 0.12s, transform 0.05s;
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
}
|
|
button:hover, .btn:hover { background: var(--bg-3); border-color: #3a4a5e; }
|
|
button:active, .btn:active { transform: translateY(1px); }
|
|
button:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
button.primary { background: var(--info); color: #061018; border-color: var(--info); }
|
|
button.primary:hover { filter: brightness(1.1); }
|
|
button.danger { background: var(--err); color: #1a0606; border-color: var(--err); }
|
|
button.ghost { background: transparent; }
|
|
button.full { width: 100%; }
|
|
|
|
/* ---------- Form inputs ---------- */
|
|
input[type="text"], input[type="number"], input[type="search"],
|
|
input[type="url"], input[type="password"], select, textarea {
|
|
width: 100%;
|
|
padding: 7px 10px;
|
|
background: var(--bg-0);
|
|
border: 1px solid var(--line-2);
|
|
border-radius: var(--radius);
|
|
color: var(--fg-0);
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
outline: none;
|
|
transition: border-color 0.12s;
|
|
}
|
|
input:focus, select:focus, textarea:focus { border-color: var(--info); }
|
|
label { display: block; font-size: 11px; color: var(--fg-2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
|
|
.field { margin-bottom: 10px; }
|
|
|
|
/* range slider */
|
|
input[type="range"] {
|
|
width: 100%;
|
|
-webkit-appearance: none;
|
|
background: transparent;
|
|
height: 24px;
|
|
}
|
|
input[type="range"]::-webkit-slider-runnable-track {
|
|
height: 4px;
|
|
background: var(--bg-4);
|
|
border-radius: 2px;
|
|
}
|
|
input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 14px; height: 14px;
|
|
border-radius: 50%;
|
|
background: var(--info);
|
|
margin-top: -5px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ---------- Panels / Cards ---------- */
|
|
.panel {
|
|
background: var(--bg-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius-lg);
|
|
overflow: hidden;
|
|
}
|
|
.panel > .head {
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--line);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: var(--bg-3);
|
|
}
|
|
.panel > .head h3 { margin: 0; }
|
|
.panel > .body { padding: var(--pad); }
|
|
|
|
/* ---------- Badges / Pills ---------- */
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
font-size: 10px;
|
|
font-family: var(--font-mono);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
border: 1px solid var(--line-2);
|
|
background: var(--bg-3);
|
|
color: var(--fg-2);
|
|
}
|
|
.badge.ok { color: var(--ok); background: var(--ok-bg); border-color: rgba(102,187,106,0.3); }
|
|
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(255,179,0,0.3); }
|
|
.badge.err { color: var(--err); background: var(--err-bg); border-color: rgba(239,83,80,0.3); }
|
|
.badge.info { color: var(--info); background: var(--info-bg); border-color: rgba(66,165,245,0.3); }
|
|
.badge.accent { color: var(--accent); background: var(--accent-bg); border-color: rgba(255,213,79,0.3); }
|
|
|
|
/* ---------- Tables ---------- */
|
|
table { width: 100%; border-collapse: collapse; font-size: 12px; }
|
|
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
|
|
th { color: var(--fg-2); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
|
|
tbody tr:hover { background: var(--bg-3); }
|
|
|
|
/* ---------- Lists ---------- */
|
|
.list { list-style: none; padding: 0; margin: 0; }
|
|
.list > li { padding: 8px 10px; border-bottom: 1px solid var(--line); }
|
|
.list > li:last-child { border-bottom: 0; }
|
|
|
|
/* ---------- Event Stream ---------- */
|
|
.stream {
|
|
font-family: var(--font-mono);
|
|
font-size: 11px;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
padding: 8px;
|
|
background: var(--bg-0);
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--line);
|
|
}
|
|
.stream .row {
|
|
padding: 3px 6px;
|
|
border-radius: 3px;
|
|
display: grid;
|
|
grid-template-columns: 70px 80px 1fr;
|
|
gap: 8px;
|
|
align-items: baseline;
|
|
border-bottom: 1px dashed rgba(255,255,255,0.04);
|
|
}
|
|
.stream .row:hover { background: var(--bg-2); }
|
|
.stream .ts { color: var(--fg-3); }
|
|
.stream .tag { font-weight: 600; }
|
|
.stream .tag.node { color: var(--info); }
|
|
.stream .tag.pipeline { color: var(--warn); }
|
|
.stream .tag.failure { color: var(--err); }
|
|
.stream .tag.cache { color: var(--accent); }
|
|
.stream .tag.debug { color: var(--fg-2); }
|
|
.stream .tag.policy { color: #ab47bd; }
|
|
.stream .tag.session { color: var(--ok); }
|
|
.stream .msg { color: var(--fg-1); word-break: break-word; }
|
|
|
|
/* ---------- DAG Node (shared) ---------- */
|
|
.dag-node {
|
|
position: absolute;
|
|
min-width: 120px;
|
|
padding: 6px 10px;
|
|
font-size: 11px;
|
|
text-align: center;
|
|
border-radius: var(--radius);
|
|
background: var(--bg-3);
|
|
border: 1px solid var(--line-2);
|
|
color: var(--fg-0);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
|
|
z-index: 2;
|
|
}
|
|
.dag-node:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
|
|
.dag-node .label { font-weight: 600; }
|
|
.dag-node .meta { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); margin-top: 2px; }
|
|
|
|
.dag-node.pending { border-color: var(--fg-3); }
|
|
.dag-node.running { border-color: var(--warn); box-shadow: 0 0 12px rgba(255,179,0,0.35); }
|
|
.dag-node.done { border-color: var(--ok); }
|
|
.dag-node.failed { border-color: var(--err); background: var(--err-bg); }
|
|
.dag-node.cache { border-color: var(--info); }
|
|
.dag-node.critical { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
.dag-node.heat { box-shadow: 0 0 0 2px var(--heat-2); }
|
|
.dag-node.active { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
|
|
/* SVG edges */
|
|
svg.edges {
|
|
position: absolute;
|
|
top: 0; left: 0;
|
|
width: 100%; height: 100%;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
svg.edges line, svg.edges path {
|
|
stroke: var(--line-2);
|
|
stroke-width: 1.5;
|
|
fill: none;
|
|
}
|
|
svg.edges line.critical, svg.edges path.critical {
|
|
stroke: var(--accent);
|
|
stroke-width: 2.5;
|
|
}
|
|
svg.edges marker path { fill: var(--line-2); stroke: none; }
|
|
|
|
/* ---------- Inspector / JSON viewer ---------- */
|
|
pre.json {
|
|
margin: 0;
|
|
padding: 10px;
|
|
background: var(--bg-0);
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--line);
|
|
font-family: var(--font-mono);
|
|
font-size: 11px;
|
|
color: var(--fg-1);
|
|
overflow: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* ---------- Scrollbars ---------- */
|
|
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
::-webkit-scrollbar-track { background: var(--bg-0); }
|
|
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
|
|
::-webkit-scrollbar-thumb:hover { background: #3a4a5e; }
|
|
|
|
/* ---------- Utility ---------- */
|
|
.row { display: flex; gap: var(--gap); }
|
|
.col { display: flex; flex-direction: column; gap: var(--gap); }
|
|
.flex-1 { flex: 1; }
|
|
.grow { flex-grow: 1; }
|
|
.muted { color: var(--fg-2); }
|
|
.dim { color: var(--fg-3); }
|
|
.right { text-align: right; }
|
|
.center { text-align: center; }
|
|
.mono { font-family: var(--font-mono); }
|
|
.nowrap { white-space: nowrap; }
|
|
.hidden { display: none !important; }
|
|
.spacer { flex: 1; }
|
|
|
|
/* heat meter */
|
|
.heat-meter {
|
|
height: 6px;
|
|
border-radius: 3px;
|
|
background: linear-gradient(90deg, var(--heat-0) 0%, var(--heat-1) 50%, var(--heat-2) 80%, var(--heat-3) 100%);
|
|
position: relative;
|
|
}
|
|
.heat-meter::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: -2px; bottom: -2px;
|
|
left: var(--heat, 0%);
|
|
width: 2px;
|
|
background: var(--fg-0);
|
|
}
|
|
|
|
/* progress bar */
|
|
.progress {
|
|
height: 8px;
|
|
background: var(--bg-0);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--line);
|
|
}
|
|
.progress > .bar {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, var(--info), var(--ok));
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
/* toasts */
|
|
#toasts {
|
|
position: fixed;
|
|
bottom: 16px;
|
|
right: 16px;
|
|
z-index: 1000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-width: 360px;
|
|
}
|
|
#toasts .toast {
|
|
background: var(--bg-3);
|
|
border: 1px solid var(--line-2);
|
|
border-left: 3px solid var(--info);
|
|
border-radius: var(--radius);
|
|
padding: 10px 14px;
|
|
font-size: 12px;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.5);
|
|
animation: slide-in 0.2s ease;
|
|
}
|
|
#toasts .toast.ok { border-left-color: var(--ok); }
|
|
#toasts .toast.err { border-left-color: var(--err); }
|
|
#toasts .toast.warn { border-left-color: var(--warn); }
|
|
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
|
|
|
|
/* responsive */
|
|
@media (max-width: 900px) {
|
|
.topbar nav a { padding: 6px 8px; font-size: 11px; }
|
|
.topbar .brand .label { display: none; }
|
|
}
|