diff --git a/src/psyc/cockpit/static/cockpit.css b/src/psyc/cockpit/static/cockpit.css index ab7bf35..0d75f10 100644 --- a/src/psyc/cockpit/static/cockpit.css +++ b/src/psyc/cockpit/static/cockpit.css @@ -471,3 +471,61 @@ tr.sev-low .sev-badge { color: var(--muted); } .enroll-card .gate-qr { width: 130px; height: 130px; } .enroll-body h3 { margin: 0 0 6px; font-size: 15px; } .enroll-body p { margin: 0; font-size: 13px; color: var(--muted); } + +/* ── admin in the topbar (announced, not hidden) ────────────── */ +.nav-admin { + display: inline-flex; align-items: center; gap: 6px; + margin-left: 18px; padding: 4px 10px; + color: var(--accent) !important; + background: rgba(30, 200, 255, 0.08); + border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border)); + border-radius: 6px; + text-shadow: 0 0 8px var(--accent-glow); +} +.nav-admin:hover { background: rgba(30, 200, 255, 0.16); border-color: var(--accent); text-decoration: none; } + +.admin-chip { + display: inline-flex; align-items: stretch; margin-left: 14px; + font-family: var(--font-display); font-size: 11px; letter-spacing: 0.12em; + border: 1px solid var(--accent); + border-radius: 6px; overflow: hidden; + background: linear-gradient(180deg, rgba(30,200,255,0.12), rgba(30,200,255,0.02)); + box-shadow: 0 0 0 0 var(--accent-glow); + animation: admin-chip-in 0.55s cubic-bezier(.2,1.4,.4,1), admin-chip-glow 3.2s ease-in-out 0.6s infinite; +} +.admin-chip-body, .admin-chip-lock { + display: inline-flex; align-items: center; gap: 7px; + padding: 4px 10px; color: var(--accent) !important; + text-decoration: none; +} +.admin-chip-body { padding-right: 8px; } +.admin-chip-body:hover { background: rgba(30,200,255,0.15); text-decoration: none; } +.admin-chip-dot { + width: 8px; height: 8px; border-radius: 50%; + background: var(--green); box-shadow: 0 0 10px var(--green); + animation: admin-dot-blink 1.6s ease-in-out infinite; +} +.admin-chip-label { text-transform: uppercase; font-weight: 600; } +.admin-chip-lock { + border-left: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border)); + font-size: 13px; padding: 4px 10px; + background: rgba(0,0,0,0.18); +} +.admin-chip-lock:hover { background: rgba(248,113,113,0.18); color: var(--red) !important; } + +@keyframes admin-chip-in { + 0% { opacity: 0; transform: translateY(-8px) scale(0.92); box-shadow: 0 0 0 0 var(--accent); } + 60% { opacity: 1; transform: translateY(0) scale(1.05); box-shadow: 0 0 24px var(--accent); } + 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px var(--accent-glow); } +} +@keyframes admin-chip-glow { + 0%,100% { box-shadow: 0 0 8px rgba(30,200,255,0.25); } + 50% { box-shadow: 0 0 18px rgba(30,200,255,0.55); } +} +@keyframes admin-dot-blink { + 0%,80%,100% { opacity: 1; } + 90% { opacity: 0.35; } +} +@media (prefers-reduced-motion: reduce) { + .admin-chip, .admin-chip-dot { animation: none; } +} diff --git a/src/psyc/cockpit/templates/admin.html b/src/psyc/cockpit/templates/admin.html index 63ab66a..0c2872d 100644 --- a/src/psyc/cockpit/templates/admin.html +++ b/src/psyc/cockpit/templates/admin.html @@ -4,7 +4,7 @@

Admin Control Center

- {% if who %}signed in as {{ who }} · {% endif %}lock ⏻ + {{ members|length }} member{{ '' if members|length == 1 else 's' }} enrolled

The secured zone — TOTP-gated, hidden from the nav. Manage who can get in here, and (next) watch the live infrastructure.

✓ Admin session active — expires after 60 min idle.
diff --git a/src/psyc/cockpit/templates/base.html b/src/psyc/cockpit/templates/base.html index 2a23032..77d50e9 100644 --- a/src/psyc/cockpit/templates/base.html +++ b/src/psyc/cockpit/templates/base.html @@ -23,7 +23,27 @@ Queue Ledger Trainline + {% if request.session.get('admin_who') %} + + + Admin + + {% endif %} + {% if request.session.get('admin_who') %} + + + + ADMIN · {{ request.session.get('admin_who') }} + + + + {% endif %} model