Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA

This commit is contained in:
2026-08-31 14:54:17 +10:00
parent b23ad422d0
commit 14678e13e8
8 changed files with 463 additions and 160 deletions
+160 -86
View File
@@ -55,36 +55,6 @@ button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; }
/* --------------------------------------------------------------- login */
.login { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card {
width: min(380px, 100%);
padding: 30px;
background: var(--card);
border-radius: 3px;
border-top: 5px solid var(--deep);
}
.login-card h1 { font-size: 22px; margin: 0 0 20px; }
.login-card label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.login-card input {
width: 100%;
padding: 11px 12px;
border: 1px solid var(--rule);
border-radius: 3px;
margin-bottom: 18px;
}
.login-card button {
width: 100%;
padding: 12px;
border: 1px solid var(--deep);
border-radius: 3px;
background: var(--deep);
color: #fff;
font-weight: 600;
}
.err { color: var(--alert); margin: 14px 0 0; font-size: 14px; }
/* -------------------------------------------------------------- chrome */
.topbar {
@@ -244,62 +214,6 @@ dialog::backdrop { background: rgba(22, 32, 43, 0.45); }
.foot { padding: 0 22px 26px; color: var(--muted); font-size: 12.5px; text-align: center; }
/* -------------------------------------------- login steps, 2FA, extras */
.login-step { display: block; }
.login-step label { display: block; }
.login-step label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.login-step input {
width: 100%;
padding: 11px 12px;
border: 1px solid var(--rule);
border-radius: 3px;
margin-bottom: 16px;
}
.login-step button[type="submit"],
.login-step > button {
width: 100%;
padding: 12px;
border: 1px solid var(--deep);
border-radius: 3px;
background: var(--deep);
color: #fff;
font-weight: 600;
}
.login-step .hint { margin: 0 0 16px; }
.link-quiet {
width: 100%;
margin-top: 10px;
border: none;
background: none;
color: var(--muted);
text-decoration: underline;
text-underline-offset: 3px;
font-weight: 400;
}
#twofa-qr { display: block; margin: 0 auto 14px; border: 1px solid var(--rule); }
#twofa-secret, code {
font-family: ui-monospace, Menlo, Consolas, monospace;
font-size: 13px;
background: #eef1f4;
padding: 1px 5px;
border-radius: 2px;
}
#twofa-code { letter-spacing: 0.3em; text-align: center; font-size: 22px; }
.recovery {
list-style: none;
margin: 0 0 18px;
padding: 14px;
border: 1px solid var(--rule);
border-radius: 3px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px 14px;
font-family: ui-monospace, Menlo, Consolas, monospace;
font-size: 14px;
}
/* ----------------------------------------------------- site switching */
.site-switch { display: flex; align-items: center; gap: 8px; color: #cfe0dd; font-size: 14px; }
@@ -380,3 +294,163 @@ tr.row-bad td { background: #fdf0f2; }
word-break: break-all;
}
#system-body h3 { margin-bottom: 14px; }
/* ============================================================ sign in ==
The sign in flow is a series of small pages, not one long form. Each screen
gets the same fixed-width card, its own title, and an animated height change
so moving between them reads as turning a page.
===================================================================== */
.auth {
display: grid;
place-items: center;
align-content: center;
min-height: 100vh;
padding: 24px 20px 40px;
}
.auth-card {
width: min(400px, 100%);
padding: 28px 30px 30px;
background: var(--card);
border-radius: 3px;
border-top: 5px solid var(--deep);
box-shadow: 0 12px 34px rgba(22, 32, 43, 0.1);
}
.auth-head { position: relative; margin-bottom: 22px; }
.auth-head h1 { font-size: 22px; margin: 0 0 6px; }
.auth-sub { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-back {
position: absolute;
top: -4px;
right: 0;
width: 34px;
height: 34px;
border: 1px solid var(--rule);
border-radius: 3px;
background: transparent;
color: var(--muted);
font-size: 16px;
line-height: 1;
}
.auth-back:hover { background: var(--paper); color: var(--ink); }
/* Progress through the sequence, only shown when there is more than one page. */
.auth-rail {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 14px;
font-size: 12.5px;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.auth-rail i {
display: block;
width: 22px;
height: 3px;
border-radius: 2px;
background: var(--rule);
}
.auth-rail i.done { background: var(--deep); }
.auth-rail span { margin-left: 5px; }
.auth-body {
overflow: hidden;
transition: height 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-screen { display: block; }
.auth-screen.entering { animation: auth-in 240ms cubic-bezier(0.2, 0, 0.2, 1); }
@keyframes auth-in {
from { opacity: 0; transform: translateX(14px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.auth-body { transition: none; }
.auth-screen.entering { animation: none; }
}
.auth-screen label { display: block; }
.auth-screen label span {
display: block;
margin-bottom: 6px;
color: var(--muted);
font-size: 14px;
}
.auth-screen input {
width: 100%;
padding: 11px 12px;
border: 1px solid var(--rule);
border-radius: 3px;
margin-bottom: 16px;
background: #fff;
color: var(--ink);
}
.auth-screen button[type="submit"],
.auth-screen > button,
.auth-row button {
width: 100%;
padding: 12px;
border: 1px solid var(--deep);
border-radius: 3px;
background: var(--deep);
color: #fff;
font-weight: 600;
}
.auth-screen button[disabled] { opacity: 0.6; cursor: progress; }
.auth-screen .hint { margin: -4px 0 16px; font-size: 13.5px; }
.auth-row { display: flex; gap: 10px; }
.auth-row .secondary {
border-color: var(--rule);
background: transparent;
color: var(--ink);
font-weight: 400;
}
#twofa-qr {
display: block;
margin: 0 auto 14px;
border: 1px solid var(--rule);
border-radius: 3px;
}
#twofa-code {
letter-spacing: 0.32em;
text-align: center;
font-size: 22px;
font-variant-numeric: tabular-nums;
}
.auth-details { margin: 0 0 18px; font-size: 13.5px; }
.auth-details summary { cursor: pointer; color: var(--muted); }
.auth-details .hint { margin: 10px 0 6px; }
.auth-details code { word-break: break-all; display: inline-block; }
.recovery {
list-style: none;
margin: 0 0 16px;
padding: 14px;
border: 1px solid var(--rule);
border-radius: 3px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px 14px;
font-family: ui-monospace, Menlo, Consolas, monospace;
font-size: 14px;
}
.err {
margin: 18px 0 0;
padding: 11px 13px;
border-left: 4px solid var(--alert);
background: #fbeaed;
color: var(--ink);
font-size: 14px;
}
.auth-foot { margin: 20px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }