Files
aevolution/apps/evo-admin-api/portal/style.css
T
dingoandClaude Opus 5.5 46c106409e
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m33s
Foundation / postgres-tools (push) Successful in 2m14s
Foundation / server-image (push) Successful in 5m21s
Foundation / image (push) Successful in 6m18s
feat(admin): session windows in SQL, opened from the admin portal (schema 62)
The dev session window moves from Git to SQL (ADR-0087 amendment): the admin
portal opens, extends (30 min to 4 h from now) and closes it, and the cellular
region re-reads it every 5 s with --session-window-source db. No push, sync or
restart per window; a closed window keeps the region running instead of
crash-looping.

- Schema 62: append-only session_windows (4 h cap, no rewrites),
  load_session_window_v1 for the runtime group, admin_set_session_window_v1
  and admin_session_windows_v1 for a dedicated admin group role, granted and
  audited each migration run when EVO_PG_ADMIN_ROLE is set (aevolution_admin in
  DEV). Schema 61's views are revoked from the runtime group.
- RegionSessions admission switch: while closed every Hello is refused before
  signature work and closing closes open sessions (new sessions were still
  admitted after expiry before).
- Admin API: GET/POST /api/regions/<n>/session-window, window state in the
  regions list; the portal's session-window card with history.
- Git: REGION_SESSION_WINDOW and the pre-push refresh rule are removed; the
  policy check requires the database source and refuses a committed window.

Needs the new image and the aevolution_admin role (with the portal's login in
aevolution-admin-pg) before a sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:13:02 -04:00

191 lines
6.8 KiB
CSS

/* ADR-0182 admin portal. Tokens first; dark is the default, light follows the system. */
:root {
--bg: #0f1419;
--panel: #161d24;
--panel-2: #1c252e;
--line: #2a3640;
--text: #dbe3ea;
--muted: #8a99a6;
--accent: #4fb3ff;
--good: #3ecf8e;
--warn: #f2b84b;
--bad: #ff6b6b;
--player: #4f8dff;
--online: #5ff2ff;
--wildlife: #3ecf8e;
--pool: rgba(120, 170, 255, 0.16);
--energy: #ffd84d;
--carbon: #b0b7bf;
--nitrogen: #9b7bff;
--phosphorus: #ff9a3c;
--other: #ff6fb5;
--radius: 8px;
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
color-scheme: dark;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f5f7f9;
--panel: #ffffff;
--panel-2: #eef2f5;
--line: #d6dde3;
--text: #18212a;
--muted: #5d6b77;
--accent: #0b6bcb;
--pool: rgba(30, 90, 200, 0.12);
--carbon: #59626b;
color-scheme: light;
}
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
background: var(--bg);
color: var(--text);
font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button {
font: inherit;
color: var(--text);
background: var(--panel-2);
border: 1px solid var(--line);
border-radius: 6px;
padding: 5px 12px;
cursor: pointer;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; }
input[type="search"], input[type="text"], select {
font: inherit;
color: var(--text);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 6px;
padding: 5px 10px;
min-width: 240px;
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.bar {
display: flex;
align-items: center;
gap: 24px;
padding: 10px 20px;
background: var(--panel);
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
z-index: 2;
}
.brand { font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.brand span { color: var(--accent); font-weight: 500; }
.sections { display: flex; gap: 20px; flex: 1; }
.section { display: flex; align-items: center; gap: 4px; }
.section-name {
text-transform: uppercase;
font-size: 11px;
letter-spacing: 0.08em;
color: var(--muted);
margin-right: 6px;
}
.section a { padding: 5px 10px; border-radius: 6px; color: var(--text); }
.section a.active { background: var(--panel-2); color: var(--accent); }
.who { display: flex; align-items: center; gap: 10px; }
main { padding: 20px; max-width: 1600px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 20px 0 8px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 14px 16px;
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat .value { font-size: 18px; font-weight: 600; margin-top: 2px; }
.stat .value small { font-size: 12px; font-weight: 400; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--panel-2); cursor: pointer; user-select: none; }
th.sorted::after { content: " ▾"; }
th.sorted.up::after { content: " ▴"; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.clickable { cursor: pointer; }
.badge {
display: inline-block;
font-size: 11.5px;
padding: 1px 8px;
border-radius: 999px;
border: 1px solid var(--line);
color: var(--muted);
}
.badge.alive { color: var(--good); border-color: var(--good); }
.badge.dead { color: var(--bad); border-color: var(--bad); }
.badge.online { color: var(--online); border-color: var(--online); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.region-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
@media (max-width: 1000px) { .region-layout { grid-template-columns: 1fr; } }
.canvas-wrap {
position: relative;
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
overflow: hidden;
aspect-ratio: 1 / 1;
max-height: calc(100vh - 230px);
width: 100%;
}
.canvas-wrap canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.overlay-note { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: var(--muted); pointer-events: none; }
.tooltip {
position: absolute;
pointer-events: none;
background: var(--panel-2);
border: 1px solid var(--line);
border-radius: 6px;
padding: 6px 8px;
font-size: 12px;
max-width: 280px;
z-index: 1;
}
.side { display: flex; flex-direction: column; gap: 12px; }
.legend { display: grid; grid-template-columns: 14px 1fr; gap: 6px 8px; align-items: center; font-size: 13px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; }
.swatch.player { background: var(--player); }
.swatch.online { background: var(--online); }
.swatch.wildlife { background: var(--wildlife); }
.swatch.pool { background: var(--pool); border: 1px solid var(--accent); }
.swatch.energy { background: var(--energy); }
.swatch.carbon { background: var(--carbon); }
.swatch.nitrogen { background: var(--nitrogen); }
.swatch.phosphorus { background: var(--phosphorus); }
.swatch.other { background: var(--other); }
.toggles { display: flex; flex-direction: column; gap: 6px; }
.toggles label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.error { color: var(--bad); }
.center { display: grid; place-items: center; min-height: 50vh; text-align: center; }
.window-controls { display: flex; gap: 8px; margin: 10px 0 8px; flex-wrap: wrap; }
.side input[type="text"] { width: 100%; min-width: 0; }
.small { font-size: 12px; margin-top: 6px; }
table.compact { margin-top: 10px; font-size: 12.5px; background: transparent; }
table.compact td { padding: 4px 6px; white-space: normal; }
button:disabled { opacity: 0.5; cursor: default; }