Files
mxaccessgw/src/MxGateway.Server/wwwroot/css/dashboard.css
T
Joseph Doherty 271bf7edff Give Galaxy timestamp cards double-width boxes
The Last Deploy and Last Refresh metric cards hold full timestamps that
wrapped to three or four lines in a single-width card. Add a Wide option
to MetricCard (grid-column: span 2) and set it on both Galaxy timestamp
cards. Also switch .metric-value to overflow-wrap: break-word so a date
token is never split mid-value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 01:16:56 -04:00

309 lines
9.7 KiB
CSS

/* ============================================================================
MXAccess Gateway dashboard — view layer.
Layers over theme.css (the technical-light design system). Every colour,
font, and surface here resolves to a theme.css token — no hard-coded hex.
theme.css owns the tokens and the component library; this sheet only wires
the dashboard's own class names and Bootstrap widgets into that system.
========================================================================= */
body.dashboard-body { min-height: 100vh; }
/* ── App bar ─────────────────────────────────────────────────────────────────
theme.css styles .app-bar / .brand / .mark / .spacer. Here we centre the row
and add the inline nav and the signed-in-user cluster. */
.app-bar { align-items: center; gap: 1.25rem; }
.app-bar .brand { color: var(--ink); }
.app-bar .brand:hover { text-decoration: none; }
.app-nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.app-nav a {
font-size: 0.82rem;
color: var(--ink-soft);
padding: 0.25rem 0.6rem;
border-radius: 4px;
}
.app-nav a:hover { color: var(--ink); background: #f0f0ec; text-decoration: none; }
.app-nav a.active {
color: var(--accent-deep);
background: #e7ecfb;
font-weight: 600;
}
.app-user {
display: flex;
align-items: center;
gap: 0.6rem;
font-size: 0.8rem;
color: var(--ink-soft);
}
.app-user form { margin: 0; }
/* ── Page header ─────────────────────────────────────────────────────────────
h1 in sans, the sub-line in monospace as a quiet meta crumb. */
.dashboard-page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1rem;
animation: rise 0.4s ease both;
}
.dashboard-page-header h1 {
font-size: 1.15rem;
font-weight: 600;
letter-spacing: 0.01em;
margin: 0;
}
.dashboard-page-header .text-secondary {
margin-top: 0.15rem;
font-family: var(--mono);
font-size: 0.78rem;
color: var(--ink-faint);
}
/* ── KPI / metric cards ──────────────────────────────────────────────────────
The MetricCard component renders .metric-card with label/value/detail; this
is the technical-light aggregate card — uppercase eyebrow, big mono number. */
.metric-grid {
display: grid;
gap: 0.75rem;
grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
margin-bottom: 1rem;
animation: rise 0.4s ease both;
animation-delay: 0.04s;
}
.metric-grid.compact { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.metric-card {
background: var(--card);
border: 1px solid var(--rule);
border-radius: 8px;
box-shadow: none;
}
.metric-card .card-body { padding: 0.7rem 0.9rem; }
.metric-label {
font-size: 0.68rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--ink-faint);
}
.metric-card-wide { grid-column: span 2; }
.metric-value {
margin-top: 0.25rem;
font-family: var(--mono);
font-variant-numeric: tabular-nums;
font-size: 1.5rem;
font-weight: 600;
line-height: 1.1;
color: var(--ink);
/* break-word, not anywhere: keep date/number tokens whole, wrap at spaces. */
overflow-wrap: break-word;
}
.metric-detail {
margin-top: 0.15rem;
font-size: 0.78rem;
color: var(--ink-faint);
overflow-wrap: anywhere;
}
/* ── Section panels ──────────────────────────────────────────────────────────
Each .dashboard-section is a raised panel: white card, hairline border. */
.dashboard-section {
background: var(--card);
border: 1px solid var(--rule);
border-radius: 8px;
margin-top: 1rem;
padding: 0.9rem;
animation: rise 0.4s ease both;
animation-delay: 0.09s;
}
.section-heading { margin-bottom: 0.6rem; }
.section-heading h2 {
font-size: 0.74rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--ink-faint);
margin: 0;
}
/* ── Data tables ─────────────────────────────────────────────────────────────
Dense, hairline-ruled, uppercase head on a faint fill. */
.dashboard-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 0;
font-size: 0.85rem;
background: var(--card);
}
.dashboard-table th,
.dashboard-table td {
padding: 0.45rem 0.8rem;
text-align: left;
vertical-align: middle;
border-bottom: 1px solid var(--rule);
}
.dashboard-table th {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--ink-faint);
background: #fbfbf9;
white-space: nowrap;
}
.dashboard-table td {
max-width: 26rem;
/* break-word, not anywhere: only split a word when it genuinely cannot
fit, so the column keeps whole words like "unconstrained" intact. */
overflow-wrap: break-word;
}
.dashboard-table tbody tr:last-child td { border-bottom: none; }
.dashboard-table tbody tr:hover { background: #f3f6fd; }
/* Key/value detail tables: left label column, monospace values, zebra rows. */
.details-table th {
width: 16rem;
text-transform: none;
letter-spacing: 0;
font-size: 0.82rem;
font-weight: 500;
color: var(--ink-soft);
background: var(--card);
}
.details-table td {
font-family: var(--mono);
font-variant-numeric: tabular-nums;
font-size: 0.82rem;
color: var(--ink);
}
.details-table tbody tr:nth-child(even) { background: #fbfbf9; }
.details-table tbody tr:hover { background: #fbfbf9; }
/* Inline code: monospace, accent ink, no Bootstrap pink. */
code {
font-family: var(--mono);
font-size: 0.82rem;
color: var(--accent-deep);
}
/* Status chips never wrap, even in a narrow table column. */
.chip { white-space: nowrap; }
/* ── Empty / placeholder state ───────────────────────────────────────────────*/
.empty-state {
background: #fbfbf9;
border: 1px dashed var(--rule-strong);
border-radius: 6px;
color: var(--ink-faint);
padding: 1rem 1.1rem;
font-size: 0.85rem;
}
/* ── Buttons ─────────────────────────────────────────────────────────────────
Flatten Bootstrap buttons onto the single accent + hairline palette. */
.btn { border-radius: 5px; font-size: 0.82rem; font-weight: 500; white-space: nowrap; }
.btn-primary {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
background: var(--accent-deep);
border-color: var(--accent-deep);
color: #fff;
}
.btn-outline-secondary {
color: var(--ink-soft);
background: var(--card);
border-color: var(--rule-strong);
}
.btn-outline-secondary:hover {
color: var(--ink);
background: #f0f0ec;
border-color: var(--rule-strong);
}
.btn-outline-danger {
color: var(--bad);
background: var(--card);
border-color: #eec3c3;
}
.btn-outline-danger:hover {
color: #fff;
background: var(--bad);
border-color: var(--bad);
}
/* ── Forms ───────────────────────────────────────────────────────────────────*/
.form-label {
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--ink-faint);
}
.form-control,
.form-select {
font-size: 0.85rem;
border-color: var(--rule-strong);
border-radius: 5px;
}
.form-control:focus,
.form-select:focus {
border-color: var(--accent);
box-shadow: 0 0 0 0.15rem rgba(47, 95, 208, 0.15);
}
/* ── Alerts ──────────────────────────────────────────────────────────────────*/
.alert { border-radius: 6px; border-width: 1px; font-size: 0.85rem; }
.alert-success { color: var(--ok); background: var(--ok-bg); border-color: #c6e6cd; }
.alert-danger { color: var(--bad); background: var(--bad-bg); border-color: #eec3c3; }
/* ── Login ───────────────────────────────────────────────────────────────────*/
.dashboard-login { max-width: 24rem; margin: 0 auto; }
.login-card {
background: var(--card);
border: 1px solid var(--rule);
border-radius: 8px;
}
/* ── API key management ──────────────────────────────────────────────────────*/
.api-key-management-grid {
display: grid;
gap: 0.75rem;
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.scope-grid {
display: grid;
gap: 0.35rem 0.75rem;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.one-time-secret {
display: block;
overflow-wrap: anywhere;
white-space: normal;
font-family: var(--mono);
}
.api-key-create-modal { display: block; }
.api-key-create-modal .modal-body {
max-height: min(70vh, 44rem);
overflow-y: auto;
}
.modal-content {
border: 1px solid var(--rule-strong);
border-radius: 8px;
}
@media (max-width: 700px) {
.page { padding: 0.85rem; }
.dashboard-page-header {
flex-direction: column;
align-items: flex-start;
}
.details-table th { width: 9rem; }
}