278 lines
13 KiB
CSS
278 lines
13 KiB
CSS
/* The Kurgan - control UI. Dark by default; a selected light theme follows the OS setting. */
|
|
|
|
:root {
|
|
color-scheme: dark;
|
|
--page: #0b0b0b;
|
|
--surface: #191919;
|
|
--surface-2: #222222;
|
|
--raised: #2a2a2a;
|
|
--text: #efefef;
|
|
--text-2: #9c9c9c;
|
|
--grid: #303030;
|
|
--axis: #474747;
|
|
--border: rgba(255, 255, 255, 0.10);
|
|
--brand: #e81c2c;
|
|
--select-bg: #efefef;
|
|
--select-text: #0b0b0b;
|
|
/* series: validated together (dataviz validator, dark surface #191919) */
|
|
--cpu: #338ced;
|
|
--gpu: #00a888;
|
|
--other: #e76624;
|
|
--top: #e76624;
|
|
/* status: reserved for state, always with an icon and a word */
|
|
--good: #0aac23;
|
|
--warning: #fbb315;
|
|
--serious: #f18a59;
|
|
--critical: #dc3c3d;
|
|
--meter-track: #2c2c2c;
|
|
--meter-fill: #9c9c9c;
|
|
--font: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
:root {
|
|
color-scheme: light;
|
|
--page: #f9f9f9;
|
|
--surface: #ffffff;
|
|
--surface-2: #f3f3f3;
|
|
--raised: #e9e9e9;
|
|
--text: #191919;
|
|
--text-2: #666666;
|
|
--grid: #e7e7e7;
|
|
--axis: #c2c2c2;
|
|
--border: rgba(11, 11, 11, 0.10);
|
|
--brand: #c4121f;
|
|
--select-bg: #191919;
|
|
--select-text: #ffffff;
|
|
--cpu: #257de0;
|
|
--gpu: #00b894;
|
|
--other: #f47230;
|
|
--top: #f47230;
|
|
--meter-track: #e7e7e7;
|
|
--meter-fill: #666666;
|
|
}
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
|
|
body {
|
|
margin: 0;
|
|
background: var(--page);
|
|
color: var(--text);
|
|
font: 14px/1.45 var(--font);
|
|
}
|
|
a { color: inherit; }
|
|
button, select, input { font: inherit; color: inherit; }
|
|
[hidden] { display: none !important; }
|
|
|
|
/* ---------------------------------------------------------------- header */
|
|
.masthead {
|
|
position: sticky; top: 0; z-index: 10;
|
|
display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
|
|
padding: 10px 24px;
|
|
background: color-mix(in srgb, var(--page) 92%, transparent);
|
|
backdrop-filter: blur(6px);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.brand { display: flex; align-items: center; gap: 10px; }
|
|
.brand svg { width: 22px; height: 22px; }
|
|
.brand h1 {
|
|
margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.22em; color: var(--brand);
|
|
}
|
|
.masthead nav { display: flex; gap: 4px; }
|
|
.masthead nav a {
|
|
text-decoration: none; color: var(--text-2); padding: 4px 10px; border-radius: 6px;
|
|
}
|
|
.masthead nav a:hover, .masthead nav a:focus-visible { background: var(--surface-2); color: var(--text); }
|
|
.hero { margin-left: auto; display: flex; align-items: baseline; gap: 6px; }
|
|
.hero-value { font-size: 48px; font-weight: 600; line-height: 1; }
|
|
.hero-unit { font-size: 18px; font-weight: 600; }
|
|
.hero-label { color: var(--text-2); margin-left: 4px; }
|
|
.meta { color: var(--text-2); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
|
|
|
|
.banner {
|
|
margin: 12px 24px 0; padding: 10px 14px; border-radius: 8px;
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
display: flex; gap: 10px; align-items: flex-start;
|
|
}
|
|
.banner .note { margin: 0; font-size: 14px; }
|
|
|
|
/* ---------------------------------------------------------------- layout */
|
|
main { padding: 8px 24px 40px; max-width: 1480px; margin: 0 auto; }
|
|
section { margin-top: 28px; }
|
|
section > h2 {
|
|
font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
|
|
color: var(--text-2); margin: 0 0 12px;
|
|
}
|
|
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-top: 16px; }
|
|
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
|
|
.card {
|
|
background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
|
|
padding: 16px 18px; margin: 0; min-width: 0;
|
|
}
|
|
.card h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
|
|
.card .sub { color: var(--text-2); font-size: 13px; margin: 0 0 12px; }
|
|
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
.spacer { flex: 1; }
|
|
.muted { color: var(--text-2); }
|
|
.num { font-variant-numeric: tabular-nums; }
|
|
|
|
/* ---------------------------------------------------------------- stat tiles */
|
|
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
|
|
.tile .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
|
|
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
|
|
.tile .value small { font-size: 15px; font-weight: 600; margin-left: 2px; }
|
|
.tile .detail { color: var(--text-2); font-size: 13px; margin-top: 4px; }
|
|
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
|
|
.key.line { width: 14px; height: 2px; border-radius: 1px; }
|
|
|
|
/* ---------------------------------------------------------------- meters */
|
|
.meter { height: 8px; border-radius: 4px; background: var(--meter-track); overflow: hidden; margin-top: 8px; }
|
|
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--meter-fill); width: 0; transition: width .4s; }
|
|
.meter.cpu > span { background: var(--cpu); }
|
|
.meter.gpu > span { background: var(--gpu); }
|
|
.meter.top > span { background: var(--top); }
|
|
.meter.warning > span { background: var(--warning); }
|
|
.meter.critical > span { background: var(--critical); }
|
|
|
|
/* ---------------------------------------------------------------- controls */
|
|
.seg {
|
|
display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px;
|
|
border: 1px solid var(--border); flex-wrap: wrap;
|
|
}
|
|
.seg label { position: relative; }
|
|
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
|
|
.seg span {
|
|
display: block; padding: 6px 14px; border-radius: 6px; color: var(--text-2); cursor: pointer;
|
|
white-space: nowrap; user-select: none;
|
|
}
|
|
.seg label:hover span { color: var(--text); background: var(--raised); }
|
|
.seg input:checked + span { background: var(--select-bg); color: var(--select-text); font-weight: 600; }
|
|
.seg input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 1px; }
|
|
.seg.busy { opacity: 0.6; pointer-events: none; }
|
|
|
|
.btn {
|
|
border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px;
|
|
padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
|
|
}
|
|
.btn:hover:not(:disabled) { background: var(--raised); }
|
|
.btn:disabled { opacity: 0.5; cursor: default; }
|
|
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
|
|
select {
|
|
background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------- status */
|
|
.pill {
|
|
display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
|
|
background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; white-space: nowrap;
|
|
}
|
|
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); flex: none; }
|
|
.dot.good { background: var(--good); }
|
|
.dot.busy { background: var(--cpu); }
|
|
.dot.warning { background: var(--warning); }
|
|
.dot.critical { background: var(--critical); }
|
|
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-top: 10px; }
|
|
.note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
|
|
.note.warning svg { color: var(--warning); }
|
|
.note.critical svg { color: var(--critical); }
|
|
.note.info svg { color: var(--text-2); }
|
|
|
|
/* ---------------------------------------------------------------- fan groups */
|
|
.fan-head { display: flex; align-items: baseline; gap: 8px; }
|
|
.fan-duty { font-size: 30px; font-weight: 600; line-height: 1.1; }
|
|
.fan-ports { display: flex; gap: 14px; margin-top: 10px; color: var(--text-2); font-size: 13px; flex-wrap: wrap; }
|
|
.fan-ports b { color: var(--text); font-weight: 600; }
|
|
.profile-desc { color: var(--text-2); margin: 10px 0 0; font-size: 13px; }
|
|
|
|
/* ---------------------------------------------------------------- lighting */
|
|
.zone .status { color: var(--text-2); font-size: 13px; margin-top: 10px; min-height: 19px; }
|
|
|
|
/* ---------------------------------------------------------------- AI */
|
|
.backends { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
|
|
.choice {
|
|
position: relative; display: block; border: 1px solid var(--border); border-radius: 10px;
|
|
padding: 12px 14px; background: var(--surface-2); cursor: pointer;
|
|
}
|
|
.choice:hover { background: var(--raised); }
|
|
.choice input[type=radio] { position: absolute; opacity: 0; }
|
|
.choice:has(input[type=radio]:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
|
|
.choice:has(input[type=radio]:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
|
|
.choice .name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
|
|
.choice .what { color: var(--text-2); font-size: 13px; margin-top: 2px; }
|
|
.choice .state { margin-top: 8px; }
|
|
.choice select { margin-top: 8px; max-width: 100%; }
|
|
.check {
|
|
margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--axis);
|
|
display: inline-grid; place-items: center;
|
|
}
|
|
.choice:has(input[type=radio]:checked) .check { border-color: var(--text); background: var(--text); }
|
|
.choice:has(input[type=radio]:checked) .check::after {
|
|
content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--surface);
|
|
}
|
|
.backends.busy { opacity: 0.6; pointer-events: none; }
|
|
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: 13px; }
|
|
.kv dt { color: var(--text-2); }
|
|
.kv dd { margin: 0; overflow-wrap: anywhere; }
|
|
.live { margin-top: 14px; padding: 12px; border-radius: 8px; background: var(--surface-2); }
|
|
.live .meter > span { background: var(--cpu); }
|
|
.speeds { display: flex; gap: 28px; margin-top: 14px; flex-wrap: wrap; }
|
|
.speeds .value { font-size: 24px; font-weight: 600; }
|
|
.speeds .label { color: var(--text-2); font-size: 13px; }
|
|
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
|
|
|
|
/* ---------------------------------------------------------------- tables */
|
|
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
th { text-align: left; font-weight: 600; color: var(--text-2); padding: 6px 8px; border-bottom: 1px solid var(--axis); }
|
|
td { padding: 6px 8px; border-bottom: 1px solid var(--grid); }
|
|
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
|
|
.table-wrap { overflow-x: auto; }
|
|
|
|
/* ---------------------------------------------------------------- charts */
|
|
.chart-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
|
|
.chart-head h3 { margin: 0; }
|
|
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; margin-top: 4px; }
|
|
.legend span { display: inline-flex; align-items: center; gap: 6px; }
|
|
.table-toggle { margin-left: auto; font-size: 12.5px; padding: 4px 10px; }
|
|
.plot { position: relative; margin-top: 10px; }
|
|
.plot svg { display: block; width: 100%; height: 210px; overflow: visible; touch-action: none; }
|
|
.plot .grid line { stroke: var(--grid); stroke-width: 1; }
|
|
.plot .baseline { stroke: var(--axis); stroke-width: 1; }
|
|
.plot .tick { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
.plot .ref { stroke: var(--axis); stroke-width: 1; }
|
|
.plot .ref-label { fill: var(--text-2); font-size: 11px; }
|
|
.plot .series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
|
.plot .series-area { opacity: 0.12; }
|
|
.plot .cross { stroke: var(--text-2); stroke-width: 1; }
|
|
.plot .marker { stroke: var(--surface); stroke-width: 2; }
|
|
.plot .end-label { fill: var(--text); font-size: 12px; font-weight: 600; }
|
|
.plot.stale { opacity: 0.45; }
|
|
.chart-table { margin-top: 10px; max-height: 260px; overflow: auto; }
|
|
|
|
.tooltip {
|
|
position: fixed; z-index: 20; pointer-events: none; min-width: 150px;
|
|
background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
|
|
padding: 8px 10px; font-size: 13px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
|
|
}
|
|
.tooltip .when { color: var(--text-2); margin-bottom: 4px; }
|
|
.tooltip .tip-row { display: flex; align-items: center; gap: 8px; }
|
|
.tooltip .tip-row b { font-weight: 600; min-width: 56px; font-variant-numeric: tabular-nums; }
|
|
.tooltip .tip-row span:last-child { color: var(--text-2); }
|
|
|
|
footer { color: var(--text-2); font-size: 12.5px; padding: 0 24px 28px; max-width: 1480px; margin: 0 auto; }
|
|
|
|
@media (max-width: 720px) {
|
|
.masthead { padding: 10px 14px; gap: 12px; }
|
|
main { padding: 8px 14px 32px; }
|
|
.hero-value { font-size: 36px; }
|
|
.grid2 { grid-template-columns: 1fr; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
html { scroll-behavior: auto; }
|
|
.meter > span { transition: none; }
|
|
}
|
|
|
|
/* the server card sits at the top of its row instead of stretching beside the chart */
|
|
#ai-active { align-self: start; }
|
|
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
|