evo-admin-api serves the portal at srs.aeternalisgames.com and read-only JSON for world 100 behind Keycloak (realm role aevolution-admin, audience aevolution-admin, client aevolution-admin-portal): accounts with session, status, lives, deaths, resets and mutation choices; one account's lives; the world's regions; and a live 2D region view of cells, wildlife, pools and bubbles. The portal is plain HTML/CSS/JS with PKCE sign-in, a strict CSP and no third-party code. - Schema 61: three bounded SECURITY DEFINER read functions, fenced in the privilege audit; no table or existing function changes. - Cellular regions answer GET /admin/view on the ops port (NetworkPolicy: Prometheus and the admin portal only); CellularLives::extent_of reads the existing phenotype budget. No simulation, checkpoint or wire change. - TokenVerifier takes an optional realm role and returns the email; the ops server's response bound is configurable (16 KiB default unchanged). - DEV component admin-portal-dev (Deployment, Service, NetworkPolicies); the Ingress and the aevolution-admin-pg Secret are created out of band. - CI scripts pinned to schema 60 now expect 61. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
185 lines
6.4 KiB
CSS
185 lines
6.4 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"] {
|
|
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; }
|