style(frontend): Chakra Petch instrument-panel restyle + real mobile layout
Build Art IoT image / build-and-publish (push) Successful in 43s

- Chakra Petch replaces Archivo for all UI type (Plex Mono demoted to data:
  ids, timestamps, tabular numbers); brand set in 700 italic caps
- every corner squared; signature chamfer cut (echoing the typeface) on gun
  bays, login plate and solid buttons; lamps stay round (physical lamps)
- phones: nav becomes a fixed bottom tab bar with safe-area padding, tables
  collapse into labeled stacked rows (data-label), bigger touch targets
- desktop nav as underline tabs; inline styles in Account moved to classes
This commit is contained in:
2026-07-18 09:05:12 +02:00
parent 9eaacf5eeb
commit 96ea568e53
10 changed files with 189 additions and 112 deletions
+5 -5
View File
@@ -8,7 +8,7 @@
"name": "charging-station-panel",
"version": "1.0.0",
"dependencies": {
"@fontsource/archivo": "^5.1.0",
"@fontsource/chakra-petch": "^5.1.0",
"@fontsource/ibm-plex-mono": "^5.1.0",
"@tanstack/react-query": "^5.62.0",
"react": "^19.0.0",
@@ -748,10 +748,10 @@
"node": ">=18"
}
},
"node_modules/@fontsource/archivo": {
"version": "5.2.8",
"resolved": "https://registry.npmjs.org/@fontsource/archivo/-/archivo-5.2.8.tgz",
"integrity": "sha512-Fc4yuMt85MmcYooUVpYHAJRJTymPv2+J9HsMP2f5mxR/0pIWgE2V5XfgNTavPpklX2rJFprdT36iE6Rr8ds9MA==",
"node_modules/@fontsource/chakra-petch": {
"version": "5.2.7",
"resolved": "https://registry.npmjs.org/@fontsource/chakra-petch/-/chakra-petch-5.2.7.tgz",
"integrity": "sha512-GLbun5WZJNAEc8FtWxwcgo+4Kurqdwejvf671l+YfIjyQgPvTjyxXYP7Ffg2HAY89NGnp3oOvKQjRzfm/fBECw==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
+1 -1
View File
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@fontsource/archivo": "^5.1.0",
"@fontsource/chakra-petch": "^5.1.0",
"@fontsource/ibm-plex-mono": "^5.1.0",
"@tanstack/react-query": "^5.62.0",
"react": "^19.0.0",
+1 -1
View File
@@ -33,7 +33,7 @@ export default function Battery({ soc }: { soc: number | null | undefined }) {
<span className="battery__fill" style={{ width: `${pct}%`, background: color }} />
</span>
<span className="battery__cap" />
<span className="battery__pct mono" style={known ? { color: socColor(pct) } : undefined}>
<span className="battery__pct" style={known ? { color: socColor(pct) } : undefined}>
{known ? `${Math.round(pct)}%` : "—"}
</span>
</div>
+5 -4
View File
@@ -3,10 +3,11 @@ import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import App from "./App";
import "@fontsource/archivo/400.css";
import "@fontsource/archivo/500.css";
import "@fontsource/archivo/600.css";
import "@fontsource/archivo/700.css";
import "@fontsource/chakra-petch/400.css";
import "@fontsource/chakra-petch/500.css";
import "@fontsource/chakra-petch/600.css";
import "@fontsource/chakra-petch/700.css";
import "@fontsource/chakra-petch/700-italic.css";
import "@fontsource/ibm-plex-mono/400.css";
import "@fontsource/ibm-plex-mono/500.css";
import "@fontsource/ibm-plex-mono/600.css";
+6 -6
View File
@@ -12,12 +12,12 @@ function MyPermissions() {
if (isAdmin(me.scopes)) {
return (
<section className="panel" style={{ maxWidth: 440 }}>
<section className="panel panel--narrow">
<header className="panel__head">
<h2>Your permissions</h2>
</header>
<span className="chip chip--card">Administrator</span>
<p className="dim" style={{ marginTop: 8, fontSize: 14 }}>
<p className="panel__note">
Full access: both guns, all relays, cards, users and history of everyone.
</p>
</section>
@@ -32,12 +32,12 @@ function MyPermissions() {
const relays = Object.values(status?.relays ?? {}).map((r) => r.label);
return (
<section className="panel" style={{ maxWidth: 440 }}>
<section className="panel panel--narrow">
<header className="panel__head">
<h2>Your permissions</h2>
</header>
{guns.length + relays.length === 0 ? (
<p className="dim" style={{ fontSize: 14 }}>
<p className="panel__note">
No device permissions yet — ask an admin to grant you a gun or a relay.
</p>
) : (
@@ -54,7 +54,7 @@ function MyPermissions() {
))}
</ul>
)}
<p className="dim" style={{ marginTop: 8, fontSize: 13 }}>
<p className="panel__note">
History shows only your own charging sessions.
</p>
</section>
@@ -92,7 +92,7 @@ export default function Account() {
return (
<>
<MyPermissions />
<section className="panel" style={{ maxWidth: 440 }}>
<section className="panel panel--narrow">
<header className="panel__head">
<h2>Account</h2>
<span className="panel__meta mono">{me.name}</span>
+6 -6
View File
@@ -225,16 +225,16 @@ function AuthorizedSection() {
<tbody>
{entries.map(([tag, entry]) => (
<tr key={tag}>
<td className="mono">{tag}</td>
<td className="strong">{entry.name}</td>
<td>
<td className="mono" data-label="Tag">{tag}</td>
<td className="strong" data-label="Name">{entry.name}</td>
<td data-label="Type">
<span className={`chip chip--${entry.kind === "app" ? "app" : "card"}`}>
{entry.kind}
</span>
</td>
<td>{entry.user ?? <span className="dim">unassigned</span>}</td>
<td className="dim">{entry.guns?.join(", ") ?? "all guns"}</td>
<td className="num">
<td data-label="Belongs to">{entry.user ?? <span className="dim">unassigned</span>}</td>
<td className="dim" data-label="Guns">{entry.guns?.join(", ") ?? "all guns"}</td>
<td className="num table__actions">
<button className="btn btn--ghost btn--sm" onClick={() => setEditing(tag)}>
Edit
</button>
+1 -1
View File
@@ -132,7 +132,7 @@ function GunBay({ gun, scopes }: { gun: Gun; scopes: string[] }) {
<div className="bay__charge">
<Battery soc={gun.tx.telemetry?.soc} />
<div className="bay__kw">
<span className="bay__kw-num mono">
<span className="bay__kw-num">
{gun.tx.telemetry?.power_w != null
? (gun.tx.telemetry.power_w / 1000).toFixed(1)
: "—"}
+6 -6
View File
@@ -66,20 +66,20 @@ export default function History() {
<tbody>
{sessions.map((s) => (
<tr key={s.tx}>
<td className="strong">{s.who || s.id_tag}</td>
<td>
<td className="strong" data-label="Who">{s.who || s.id_tag}</td>
<td data-label="Via">
<MethodChip method={s.method} />
</td>
<td>{gunLabel(s, status?.chargers ?? {})}</td>
<td className="mono">{fmtTime(s.started)}</td>
<td>
<td data-label="Gun">{gunLabel(s, status?.chargers ?? {})}</td>
<td className="mono" data-label="Started">{fmtTime(s.started)}</td>
<td data-label="Duration">
{s.ended ? (
fmtDuration(s.started, s.ended)
) : (
<span className="chip chip--live">charging</span>
)}
</td>
<td className="num mono strong">{fmtKwh(s.wh)}</td>
<td className="num mono strong" data-label="kWh">{fmtKwh(s.wh)}</td>
</tr>
))}
</tbody>
+1 -1
View File
@@ -243,7 +243,7 @@ export default function Users() {
<tr key={u.name}>
<td className="strong">{u.name}</td>
<td className="dim">{describeScopes(u.scopes, catalog)}</td>
<td className="num">
<td className="num table__actions">
<button className="btn btn--ghost btn--sm" onClick={() => setEditing(u)}>
Edit
</button>
+157 -81
View File
@@ -1,8 +1,12 @@
/* ============================================================
Art IoT — instrument-panel design system
Art IoT — instrument-panel design system, mk II
Surfaces like enameled switchgear, copper-busbar accent,
indicator lamps as the signature element.
Type: Archivo (UI) + IBM Plex Mono (telemetry & identifiers).
Type: Chakra Petch (all UI — its chamfered glyphs set the
geometry of the whole panel) + IBM Plex Mono (data only:
identifiers, timestamps, tabular numbers).
Corners: square. The only diagonal is the chamfer cut on
bays, the login plate and solid buttons — echoing the face.
============================================================ */
:root {
@@ -20,9 +24,12 @@
--red: #bf3527;
--lamp-off: #c4ccc8;
--shadow: 0 1px 2px rgb(29 37 35 / 0.06), 0 4px 16px rgb(29 37 35 / 0.05);
--radius: 10px;
--font-ui: "Archivo", "Segoe UI", system-ui, sans-serif;
--dropshadow: drop-shadow(0 1px 2px rgb(29 37 35 / 0.07)) drop-shadow(0 4px 10px rgb(29 37 35 / 0.06));
--font-ui: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
--font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
/* label: the recurring small-caps utility voice */
--label: 600 11px/1.4 var(--font-ui);
--label-track: 0.11em;
}
@media (prefers-color-scheme: dark) {
@@ -41,6 +48,7 @@
--red: #d8503f;
--lamp-off: #39433f;
--shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 18px rgb(0 0 0 / 0.35);
--dropshadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.45)) drop-shadow(0 4px 10px rgb(0 0 0 / 0.35));
}
}
@@ -52,25 +60,26 @@ body {
background: var(--paper);
color: var(--ink);
font-family: var(--font-ui);
font-size: 15.5px;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button, input, select { font: inherit; color: inherit; border-radius: 0; }
:focus-visible {
outline: 2px solid var(--copper);
outline-offset: 2px;
border-radius: 4px;
}
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.mono { font-family: var(--font-mono); font-size: 0.93em; }
.strong { font-weight: 600; }
.dim { color: var(--ink-dim); }
.num { text-align: right; }
/* ---------- indicator lamp (signature element) ---------- */
/* ---------- indicator lamp (signature element) ----------
Deliberately round in a square world: it is a physical lamp
on the cabinet face, not UI chrome. */
.lamp {
display: inline-block;
width: 11px; height: 11px;
@@ -116,45 +125,53 @@ button, input, select { font: inherit; color: inherit; }
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
display: flex; align-items: center; gap: 20px;
padding: 10px clamp(14px, 4vw, 32px);
display: flex; align-items: stretch; gap: 18px;
min-height: 54px;
padding: 0 clamp(14px, 4vw, 32px);
background: var(--panel);
border-bottom: 1px solid var(--line);
position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; }
.brand { display: flex; align-items: center; gap: 10px; align-self: center; }
.brand__mark { width: 28px; height: 28px; }
.brand__mark path { fill: var(--copper); }
.brand__name { display: block; font-weight: 700; letter-spacing: 0.01em; line-height: 1.15; }
.brand__name {
display: block;
font-weight: 700; font-style: italic;
text-transform: uppercase; letter-spacing: 0.05em;
line-height: 1.15;
}
.brand__sub {
display: block; font-family: var(--font-mono); font-size: 10.5px;
text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-dim);
display: block; font: var(--label); font-size: 10px;
text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-dim);
}
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
/* Desktop nav: underline tabs riding the topbar rule. */
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav__link {
display: inline-flex; align-items: center; gap: 7px;
padding: 7px 13px;
border-radius: 8px;
padding: 0 14px;
color: var(--ink-dim);
text-decoration: none;
font-weight: 500;
font-size: 13px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.07em;
white-space: nowrap;
box-shadow: inset 0 -2px 0 transparent;
}
.nav__link:hover { color: var(--ink); background: var(--panel-inset); }
.nav__link.active { color: var(--copper-deep); background: color-mix(in srgb, var(--copper) 12%, transparent); font-weight: 600; }
.nav__link.active { color: var(--copper-deep); box-shadow: inset 0 -2px 0 var(--copper); }
.badge {
background: var(--amber); color: #fff;
font-family: var(--font-mono); font-size: 11px; font-weight: 600;
border-radius: 999px; padding: 1px 7px;
padding: 1px 6px;
}
.topbar__user { display: flex; align-items: center; gap: 10px; }
.topbar__user { display: flex; align-items: center; gap: 10px; align-self: center; margin-left: auto; }
.topbar__who {
font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim);
text-decoration: none; padding: 4px 8px; border-radius: 6px;
text-decoration: none; padding: 4px 8px;
}
.topbar__who:hover { color: var(--ink); background: var(--panel-inset); }
.topbar__who.active { color: var(--copper-deep); }
@@ -164,8 +181,8 @@ button, input, select { font: inherit; color: inherit; }
margin: 14px clamp(14px, 4vw, 32px) 0;
padding: 11px 16px;
border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
border-left: 3px solid var(--amber);
background: color-mix(in srgb, var(--amber) 9%, var(--panel));
border-radius: var(--radius);
color: var(--ink);
text-decoration: none;
font-weight: 500;
@@ -196,119 +213,133 @@ button, input, select { font: inherit; color: inherit; }
width: min(380px, 100%);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 14px;
box-shadow: var(--shadow);
border-top: 3px solid var(--copper);
clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
filter: var(--dropshadow);
padding: 30px 28px;
display: flex; flex-direction: column; gap: 14px;
}
.login__head { text-align: center; margin-bottom: 6px; }
.login__mark { width: 44px; height: 44px; margin-bottom: 10px; }
.login__mark path { fill: var(--copper); }
.login__head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.login__head h1 {
font-size: 24px; font-weight: 700; font-style: italic;
text-transform: uppercase; letter-spacing: 0.05em;
}
.login__head p { color: var(--ink-dim); font-size: 13.5px; margin-top: 4px; }
/* ---------- panels & bays ---------- */
.panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 18px 20px;
}
.panel--attention { border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); }
.panel--offline { display: flex; gap: 14px; align-items: center; }
.panel--narrow { max-width: 460px; }
.panel--attention { border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); border-left: 3px solid var(--amber); }
.panel--offline { display: flex; gap: 14px; align-items: center; border-left: 3px solid var(--red); }
.panel--offline p { color: var(--ink-dim); font-size: 14px; }
.panel--offline h2 { font-size: 15px; }
.panel__head {
display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
margin-bottom: 12px; flex-wrap: wrap;
}
.panel__head h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.panel__head h2 {
font-size: 14px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.09em;
display: flex; align-items: center; gap: 9px;
}
.panel__meta { color: var(--ink-dim); font-size: 13px; }
.panel__note { color: var(--ink-dim); font-size: 13.5px; margin-top: 8px; }
.panel__inset {
margin-top: 14px; padding: 16px;
background: var(--panel-inset);
border: 1px solid var(--line);
border-radius: 8px;
}
.panel__inset h3 { font-size: 14px; margin-bottom: 10px; }
.bays {
display: grid; gap: 18px;
grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
/* Gun bay: the primary instrument. Chamfered top-right corner —
the same cut Chakra Petch makes on its letterforms. */
.bay {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow);
border-top: 3px solid var(--copper);
clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
filter: var(--dropshadow);
padding: 18px 20px;
display: flex; flex-direction: column; gap: 10px;
border-top: 3px solid var(--copper);
}
.bay__head { display: flex; justify-content: space-between; align-items: center; }
.bay__head .lamp { margin-right: 14px; } /* clear of the chamfer */
.bay__eyebrow {
font-family: var(--font-mono); font-size: 11px;
text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-dim);
font: var(--label);
text-transform: uppercase; letter-spacing: var(--label-track); color: var(--ink-dim);
}
.bay__title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.bay__status { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.bay__title { font-size: 21px; font-weight: 700; letter-spacing: 0.01em; }
.bay__status { display: flex; align-items: center; gap: 10px; min-height: 26px; flex-wrap: wrap; }
.bay__hint { color: var(--ink-dim); font-size: 13px; }
.bay__charge {
display: flex; align-items: center; justify-content: space-between; gap: 14px;
padding: 12px 14px;
background: var(--panel-inset);
border-radius: 8px;
border: 1px solid var(--line);
}
.bay__kw { display: flex; align-items: baseline; gap: 5px; }
.bay__kw-num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.bay__kw-num { font-size: 28px; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.bay__kw-unit {
font-family: var(--font-mono); font-size: 11px;
text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim);
font: var(--label);
text-transform: uppercase; letter-spacing: var(--label-track); color: var(--ink-dim);
}
/* ---------- battery gauge (SoC, red -> blue -> green) ---------- */
.battery { display: flex; align-items: center; gap: 2px; }
.battery__shell {
display: inline-block; width: 52px; height: 22px;
border: 2px solid var(--ink-dim); border-radius: 6px;
border: 2px solid var(--ink-dim);
padding: 2px; background: var(--panel);
}
.battery__fill {
display: block; height: 100%; border-radius: 3px;
display: block; height: 100%;
min-width: 2px;
transition: width 0.6s ease, background 0.6s ease;
}
.battery__cap {
width: 3px; height: 10px; border-radius: 0 2px 2px 0;
width: 3px; height: 10px;
background: var(--ink-dim);
}
.battery__pct { font-size: 15px; font-weight: 600; margin-left: 8px; }
.battery__pct { font-size: 16px; font-weight: 600; margin-left: 8px; font-variant-numeric: tabular-nums; }
.bay__telemetry {
display: flex; flex-wrap: wrap; gap: 10px 22px;
padding: 10px 12px;
display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
gap: 10px 18px;
padding: 12px 14px;
background: var(--panel-inset);
border-radius: 8px;
border: 1px solid var(--line);
}
.bay__telemetry dt {
font-family: var(--font-mono); font-size: 10.5px;
text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim);
font: var(--label); font-size: 10px;
text-transform: uppercase; letter-spacing: var(--label-track); color: var(--ink-dim);
}
.bay__telemetry dd { font-weight: 600; font-size: 14px; }
.bay__telemetry dd { font-weight: 600; font-size: 14px; white-space: nowrap; }
.bay__actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.bay__actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; flex-wrap: wrap; }
/* ---------- chips ---------- */
.chip {
display: inline-block;
font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.07em;
padding: 3px 9px; border-radius: 999px;
font-size: 11.5px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.08em;
padding: 3px 9px;
background: var(--panel-inset); color: var(--ink-dim);
border: 1px solid var(--line);
white-space: nowrap;
}
.chip--live, .chip--charging { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.chip--plugged { background: color-mix(in srgb, var(--blue) 13%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
@@ -320,49 +351,52 @@ button, input, select { font: inherit; color: inherit; }
/* ---------- buttons ---------- */
.btn {
border: 1px solid transparent;
border-radius: 8px;
padding: 9px 18px;
font-weight: 600;
padding: 10px 18px;
font-size: 13px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.06em;
cursor: pointer;
background: var(--panel-inset);
transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; }
/* Solid (load-bearing) buttons carry the chamfer cut. */
.btn--primary, .btn--danger {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}
.btn--primary { background: var(--copper); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--copper-deep); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 85%, black); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { background: var(--panel-inset); }
.btn--sm { padding: 5px 12px; font-size: 13.5px; }
.btn--ghost:hover:not(:disabled) { background: var(--panel-inset); border-color: var(--ink-dim); }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--block { width: 100%; }
.btn--dangertext { color: var(--red); }
/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span, .field__label {
font-family: var(--font-mono); font-size: 11px;
text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim);
font: var(--label);
text-transform: uppercase; letter-spacing: var(--label-track); color: var(--ink-dim);
}
.field input, .field select {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 8px;
padding: 9px 12px;
padding: 10px 12px;
width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--copper); outline: none; }
.field-error { color: var(--red); font-size: 13.5px; }
.formrow { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.formrow { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--copper); width: 16px; height: 16px; }
.check input { accent-color: var(--copper); width: 16px; height: 16px; flex: none; }
.check--strong { font-weight: 600; }
.cardform { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.cardform__actions { display: flex; gap: 10px; }
.cardform__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gunpicker, .matrix { display: flex; flex-direction: column; gap: 6px; }
@@ -375,18 +409,19 @@ button, input, select { font: inherit; color: inherit; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
text-align: left; padding: 8px 10px;
font-family: var(--font-mono); font-size: 10.5px;
text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim);
font: var(--label); font-size: 10.5px;
text-transform: uppercase; letter-spacing: var(--label-track); color: var(--ink-dim);
border-bottom: 1px solid var(--line);
}
.table th.num { text-align: right; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .btn + .btn { margin-left: 8px; }
.relay-list, .pending-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.relay {
display: flex; align-items: center; gap: 12px;
padding: 10px 2px; border-bottom: 1px solid var(--line);
padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.relay:last-child { border-bottom: none; }
.relay__label { font-weight: 600; flex: 1; min-width: 0; }
@@ -406,15 +441,56 @@ button, input, select { font: inherit; color: inherit; }
}
.toast {
background: var(--ink); color: var(--paper);
border-radius: 9px; padding: 11px 16px;
border-left: 3px solid var(--copper);
padding: 11px 16px;
font-size: 14px; box-shadow: var(--shadow);
}
.toast--error { background: var(--red); color: #fff; }
.toast--error { background: var(--red); border-left-color: color-mix(in srgb, var(--red) 55%, black); color: #fff; }
/* ---------- responsive ---------- */
/* ---------- responsive: the phone is the primary panel ---------- */
@media (max-width: 640px) {
.topbar { flex-wrap: wrap; row-gap: 6px; }
.nav { order: 3; width: 100%; }
.bay__telemetry { flex-wrap: wrap; gap: 12px 20px; }
.content { padding-top: 14px; }
.topbar { min-height: 50px; }
.brand__mark { width: 24px; height: 24px; }
/* Nav becomes a fixed bottom tab bar — thumb reach beats a crammed topbar. */
.nav {
position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
background: var(--panel);
border-top: 1px solid var(--line);
padding: 0 max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-right));
overflow-x: visible;
}
.nav__link {
flex: 1; justify-content: center;
padding: 14px 4px;
font-size: 12px;
box-shadow: inset 0 2px 0 transparent; /* accent flips to the top edge */
}
.nav__link.active { box-shadow: inset 0 2px 0 var(--copper); background: var(--panel-inset); }
.content { padding-top: 14px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.toasts { bottom: calc(64px + env(safe-area-inset-bottom)); }
/* Bigger touch targets */
.btn { padding: 12px 18px; }
.btn--sm { padding: 9px 14px; }
/* Tables collapse into labeled stacked rows — no sideways scrolling. */
.table thead { display: none; }
.table, .table tbody { display: block; }
.table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
.table tr:last-child { border-bottom: none; }
.table td {
display: flex; justify-content: space-between; align-items: center; gap: 12px;
border: none; padding: 3px 0;
}
.table td.num { text-align: left; }
.table td[data-label]::before {
content: attr(data-label);
font: var(--label); font-size: 10.5px;
text-transform: uppercase; letter-spacing: var(--label-track);
color: var(--ink-dim);
flex: none;
}
.table td.table__actions { justify-content: flex-end; padding-top: 8px; }
}