Files
archie/ui/src/dashboard/dashboard.css
T
sam 3bb68671b7 fix(webui): stretch HEALTH row cards to equal height
Gate pulse and Finish setting up sat in the same CSS grid row, but a
block-level .card doesn't fill its grid-stretched wrapper's height on
its own -- it shrinks to its own content. With Gate pulse's empty
state being much shorter than the setup checklist, its card ended up
noticeably shorter than its sibling, leaving dead space below it that
read as the content floating uncentered relative to the row.

Flexing the wrapper and growing .card to fill it (scoped to
.dash-top, not the shared .card rule used elsewhere) makes both
HEALTH cards match height while each card's own content keeps
flowing from the top. Verified via a static repro using the real
project CSS: card heights and bottom edges now match (290.5px/y=343
for both, versus 227px/279.5 vs 274.5px/327 before).

Closes archie-core-1786637500926-421-7c63bcd3.
2026-09-03 06:57:22 +10:00

414 lines
8.4 KiB
CSS

/* Dashboard-only styles. Feature folders own their CSS and import it from
their JS, so a section can be added or removed without editing _main.css. */
/* ── Stat tiles ─────────────────────────────────────────────────────────── */
.stat-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--sp-2);
}
.stat-label {
font-size: var(--text-sm);
color: var(--fg-muted);
}
.stat-trend {
display: inline-flex;
align-items: center;
gap: 3px;
font-size: var(--text-xs);
font-weight: 500;
}
.stat-trend.up {
color: var(--ok);
}
.stat-trend.down {
color: var(--danger);
}
.stat-value {
font-size: var(--text-3xl);
font-weight: 600;
letter-spacing: -0.03em;
margin: var(--sp-2) 0 0;
}
.stat-unit {
font-size: var(--text-lg);
color: var(--fg-muted);
margin-left: var(--sp-1);
}
.stat-compare {
font-size: var(--text-xs);
color: var(--fg-subtle);
margin-top: var(--sp-1);
}
.spark {
width: 100%;
height: 34px;
margin-top: var(--sp-3);
display: block;
}
/* ── Getting started checklist ──────────────────────────────────────────── */
.setup {
margin-bottom: var(--sp-4);
}
.setup-pct {
font-size: var(--text-lg);
font-weight: 600;
color: var(--accent);
}
.setup-complete-actions {
display: flex;
align-items: center;
gap: var(--sp-2);
}
.setup-dismiss {
width: 28px;
height: 28px;
font-size: var(--text-lg);
line-height: 1;
}
.setup-done .setup-pct {
color: var(--ok);
}
.setup-bar {
height: 5px;
border-radius: var(--radius-pill);
background: var(--border);
overflow: hidden;
margin-bottom: var(--sp-4);
}
.setup-bar-fill {
height: 100%;
background: var(--accent);
border-radius: var(--radius-pill);
transition: width var(--transition);
}
.setup-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--sp-3);
}
.setup-step {
display: flex;
gap: var(--sp-3);
align-items: flex-start;
}
.setup-check {
width: 18px;
height: 18px;
flex: none;
border-radius: 50%;
border: 1.5px solid var(--border-strong);
display: grid;
place-items: center;
font-size: var(--text-xs);
color: var(--fg-subtle);
margin-top: 1px;
}
.setup-step.done .setup-check {
background: var(--ok-soft);
border-color: transparent;
color: var(--ok);
}
.setup-step-title {
font-size: var(--text-sm);
}
.setup-step.done .setup-step-title {
color: var(--fg-muted);
text-decoration: line-through;
}
.setup-step-detail {
font-size: var(--text-xs);
color: var(--fg-subtle);
margin-top: 2px;
}
/* ── Hero: greeting and the actions that belong with it ─────────────────── */
.hero {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--sp-5);
flex-wrap: wrap;
margin-bottom: var(--sp-5);
}
.hero-title {
font-size: var(--text-3xl);
font-weight: 600;
letter-spacing: -0.03em;
margin: 0;
}
.hero-sub {
color: var(--fg-muted);
font-size: var(--text-sm);
margin: var(--sp-2) 0 0;
}
.hero-actions {
display: flex;
gap: var(--sp-2);
align-items: center;
flex-wrap: wrap;
}
/* ── Top row: checklist / pulse side by side ────────────────────────────── */
.dash-top {
display: grid;
grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
gap: var(--sp-4);
margin-bottom: var(--sp-4);
}
/* Either column must be allowed to shrink below its content width so the
other one does not get pushed off-screen on narrow viewports. */
.dash-top > *,
.dash-split > * {
min-width: 0;
}
/* The grid row stretches each column wrapper to the taller card's height by
default, but a block-level .card child doesn't fill that stretched height
on its own -- it shrinks to its own content, leaving the shorter card
(typically Gate pulse's empty state) sitting flush at the top with dead
space below it instead of matching its sibling. Flexing the wrapper and
growing the card to fill it makes both HEALTH cards the same height while
each card's own content still flows from the top. */
.dash-top > div {
display: flex;
}
.dash-top > div > .card {
flex: 1;
}
/* No setup panel to show: the gate pulse spans the whole row instead of
leaving an empty half. */
.dash-top-standalone {
grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 1080px) {
.dash-top {
grid-template-columns: minmax(0, 1fr);
}
}
/* ── Gauge ──────────────────────────────────────────────────────────────── */
.gauge-wrap {
position: relative;
display: grid;
place-items: center;
}
.gauge {
width: 100%;
max-width: 200px;
display: block;
}
.gauge-value {
transition: stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-center {
position: absolute;
top: 52%;
transform: translateY(-50%);
text-align: center;
}
.gauge-pct {
font-size: var(--text-2xl);
font-weight: 600;
letter-spacing: -0.03em;
}
.gauge-label {
font-size: var(--text-xs);
color: var(--fg-muted);
}
.pulse-list {
list-style: none;
margin: var(--sp-4) 0 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--sp-2);
}
.pulse-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--sp-3);
font-size: var(--text-sm);
padding: var(--sp-2) var(--sp-3);
border-radius: var(--radius-sm);
background: var(--bg-raised);
}
.pulse-name {
color: var(--fg-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ── Segmented bar ──────────────────────────────────────────────────────── */
.segbar {
display: flex;
height: 10px;
border-radius: var(--radius-pill);
overflow: hidden;
background: var(--border);
gap: 2px;
}
.segbar-part {
display: block;
height: 100%;
}
.segbar-ok { background: var(--ok); }
.segbar-warn { background: var(--warn); }
.segbar-danger { background: var(--danger); }
.segbar-info { background: var(--info); }
.segbar-idle { background: var(--idle); }
.segbar-legend {
display: flex;
gap: var(--sp-4);
margin-top: var(--sp-3);
flex-wrap: wrap;
}
.segbar-key {
display: inline-flex;
align-items: center;
gap: var(--sp-2);
font-size: var(--text-xs);
color: var(--fg-muted);
}
.segbar-dot {
width: 8px;
height: 8px;
border-radius: 50%;
}
.forecast-value {
font-size: var(--text-3xl);
font-weight: 600;
letter-spacing: -0.03em;
margin-bottom: var(--sp-1);
}
.forecast-note {
font-size: var(--text-xs);
color: var(--fg-subtle);
margin-bottom: var(--sp-4);
}
.dash-split {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
gap: var(--sp-4);
margin-top: var(--sp-4);
}
@media (max-width: 1080px) {
.dash-split {
grid-template-columns: minmax(0, 1fr);
}
}
.stat-card {
position: relative;
overflow: hidden;
}
/* ── Section grouping ───────────────────────────────────────────────────── */
/* Panels are grouped under a quiet section label so the dashboard reads as one
surface with regions, rather than a scatter of unrelated cards. */
.dash-section {
margin-bottom: var(--sp-5);
}
.dash-section-head {
display: flex;
align-items: baseline;
gap: var(--sp-3);
margin-bottom: var(--sp-3);
padding-left: var(--sp-1);
}
.dash-section-title {
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--fg-subtle);
font-weight: 600;
margin: 0;
}
.dash-section-note {
font-size: var(--text-xs);
color: var(--fg-subtle);
}
.hero-actions-inner {
display: flex;
gap: var(--sp-2);
flex-wrap: wrap;
align-items: center;
}
/* An action that exists because something needs attention should look unlike
one that is always present. */
.btn-attention {
border-color: var(--warn);
color: var(--warn);
background: var(--warn-soft);
font-weight: 500;
}
.btn-attention:hover {
background: var(--warn-soft);
filter: brightness(1.1);
}