Public Access
Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA
This commit is contained in:
@@ -0,0 +1,402 @@
|
||||
:root {
|
||||
--paper: #eef1f4;
|
||||
--card: #ffffff;
|
||||
--ink: #16202b;
|
||||
--muted: #5d6b7a;
|
||||
--rule: #d4dce3;
|
||||
--deep: #0b4f4a;
|
||||
--exit: #2c4a6b;
|
||||
--alert: #96162f;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
/* Author display rules beat the browser's [hidden] { display: none }, and several
|
||||
elements here are toggled with that attribute. */
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family: "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
h1, h2, h3 { letter-spacing: -0.015em; font-weight: 620; }
|
||||
h2 { font-size: 20px; margin: 0; }
|
||||
h3 { font-size: 18px; margin: 0 0 14px; }
|
||||
|
||||
button, input, textarea, select { font: inherit; }
|
||||
button { cursor: pointer; }
|
||||
|
||||
.primary {
|
||||
padding: 9px 16px;
|
||||
border: 1px solid var(--deep);
|
||||
border-radius: 3px;
|
||||
background: var(--deep);
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
.ghost {
|
||||
display: inline-block;
|
||||
padding: 9px 16px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
}
|
||||
.danger { color: var(--alert); border-color: #e3bcc4; }
|
||||
.link {
|
||||
border: none;
|
||||
background: none;
|
||||
color: #d7e4e1;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; }
|
||||
|
||||
/* -------------------------------------------------------------- chrome */
|
||||
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 22px;
|
||||
flex-wrap: wrap;
|
||||
padding: 12px 22px;
|
||||
background: var(--deep);
|
||||
color: #eef5f3;
|
||||
}
|
||||
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
|
||||
.tab {
|
||||
padding: 8px 14px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: #cfe0dd;
|
||||
}
|
||||
.tab.on { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }
|
||||
|
||||
main { max-width: 1100px; margin: 0 auto; padding: 26px 22px 60px; }
|
||||
|
||||
.panel { display: none; }
|
||||
.panel.on { display: block; }
|
||||
|
||||
.panel-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.stat {
|
||||
font-size: 40px;
|
||||
font-weight: 650;
|
||||
font-variant-numeric: tabular-nums;
|
||||
margin: 0 0 6px;
|
||||
color: var(--deep);
|
||||
}
|
||||
|
||||
.hint { color: var(--muted); font-size: 14px; max-width: 70ch; }
|
||||
|
||||
/* -------------------------------------------------------------- tables */
|
||||
|
||||
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14.5px; }
|
||||
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
|
||||
th { font-weight: 600; color: var(--muted); font-size: 13.5px; }
|
||||
tbody tr:last-child td { border-bottom: none; }
|
||||
td.actions { text-align: right; white-space: nowrap; }
|
||||
td.actions button { margin-left: 6px; padding: 6px 11px; font-size: 13.5px; }
|
||||
.mono { font-variant-numeric: tabular-nums; }
|
||||
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 3px; display: block; }
|
||||
.empty { padding: 26px; background: var(--card); color: var(--muted); }
|
||||
|
||||
.pill {
|
||||
display: inline-block;
|
||||
padding: 2px 9px;
|
||||
border-radius: 2px;
|
||||
font-size: 12.5px;
|
||||
background: #e6efed;
|
||||
color: var(--deep);
|
||||
}
|
||||
.pill.off { background: #eceff2; color: var(--muted); }
|
||||
.pill.out { background: #e7edf4; color: var(--exit); }
|
||||
|
||||
/* ------------------------------------------------------------- filters */
|
||||
|
||||
.filters {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.filters label { display: block; }
|
||||
.filters .grow { flex: 1 1 240px; }
|
||||
.filters span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
|
||||
.filters input { width: 100%; padding: 9px 11px; border: 1px solid var(--rule); border-radius: 3px; }
|
||||
|
||||
/* -------------------------------------------------------------- import */
|
||||
|
||||
.import {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
padding: 14px 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.import summary { cursor: pointer; font-weight: 600; }
|
||||
.import textarea {
|
||||
width: 100%;
|
||||
margin: 12px 0;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
}
|
||||
.import input[type="file"] { margin-top: 12px; }
|
||||
.inline { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
|
||||
|
||||
/* --------------------------------------------------------------- modal */
|
||||
|
||||
dialog {
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
padding: 24px;
|
||||
width: min(520px, calc(100vw - 32px));
|
||||
border-top: 5px solid var(--deep);
|
||||
}
|
||||
dialog::backdrop { background: rgba(22, 32, 43, 0.45); }
|
||||
.modal-field { margin-bottom: 14px; }
|
||||
.modal-field span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 5px; }
|
||||
.modal-field input, .modal-field select, .modal-field textarea {
|
||||
width: 100%;
|
||||
padding: 10px 11px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
|
||||
.pin-reveal {
|
||||
font-size: 34px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.22em;
|
||||
color: var(--deep);
|
||||
font-variant-numeric: tabular-nums;
|
||||
margin: 6px 0 16px;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------- system */
|
||||
|
||||
#system-body { background: var(--card); padding: 20px; border-radius: 3px; }
|
||||
#system-body dl { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 8px 16px; margin: 0 0 22px; }
|
||||
#system-body dt { color: var(--muted); }
|
||||
#system-body dd { margin: 0; }
|
||||
.sys-actions { display: flex; gap: 10px; flex-wrap: wrap; }
|
||||
|
||||
/* --------------------------------------------------------------- toast */
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 22px;
|
||||
transform: translateX(-50%);
|
||||
margin: 0;
|
||||
padding: 13px 18px;
|
||||
border-left: 5px solid var(--deep);
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
box-shadow: 0 10px 28px rgba(22, 32, 43, 0.18);
|
||||
max-width: min(560px, calc(100% - 32px));
|
||||
}
|
||||
.toast.bad { border-left-color: var(--alert); }
|
||||
|
||||
.foot { padding: 0 22px 26px; color: var(--muted); font-size: 12.5px; text-align: center; }
|
||||
|
||||
/* ----------------------------------------------------- site switching */
|
||||
|
||||
.site-switch { display: flex; align-items: center; gap: 8px; color: #cfe0dd; font-size: 14px; }
|
||||
.site-switch select {
|
||||
padding: 7px 10px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 3px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
color: #fff;
|
||||
}
|
||||
.site-switch select option { color: var(--ink); }
|
||||
|
||||
.badge-count {
|
||||
display: inline-block;
|
||||
min-width: 20px;
|
||||
margin-left: 6px;
|
||||
padding: 0 6px;
|
||||
border-radius: 10px;
|
||||
background: var(--alert);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------ banner, cards */
|
||||
|
||||
.banner {
|
||||
margin: 0;
|
||||
padding: 12px 22px;
|
||||
background: #fdf3d8;
|
||||
border-bottom: 1px solid #e6d5a4;
|
||||
font-size: 14.5px;
|
||||
}
|
||||
.banner.bad { background: #fbeaed; border-bottom-color: #e8c3cb; }
|
||||
|
||||
.notice {
|
||||
padding: 12px 14px;
|
||||
margin: 0 0 16px;
|
||||
background: #fdf3d8;
|
||||
border-left: 4px solid #d9a441;
|
||||
font-size: 14.5px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card);
|
||||
border-radius: 3px;
|
||||
padding: 18px 20px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.site-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
|
||||
.site-head h3 { margin: 0 0 4px; }
|
||||
.site-head .hint { margin: 0; }
|
||||
.site-meta { display: grid; grid-template-columns: minmax(130px, 24%) 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 14.5px; }
|
||||
.site-meta dt { color: var(--muted); }
|
||||
.site-meta dd { margin: 0; }
|
||||
|
||||
.section-gap { margin-top: 34px; }
|
||||
#account-body { background: var(--card); padding: 20px; border-radius: 3px; }
|
||||
#account-body dl { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 8px 16px; margin: 0 0 22px; }
|
||||
#account-body dt { color: var(--muted); }
|
||||
#account-body dd { margin: 0; }
|
||||
|
||||
td small { display: block; color: var(--muted); font-size: 13px; }
|
||||
tr.row-warn td { background: #fdf8ec; }
|
||||
tr.row-bad td { background: #fdf0f2; }
|
||||
|
||||
.pill.warn { background: #f7e7c4; color: #7a5308; }
|
||||
.pill.bad { background: #f6d5db; color: var(--alert); }
|
||||
|
||||
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
||||
.modal-section { margin: 20px 0 12px; font-size: 15px; }
|
||||
.pin-reveal.small { font-size: 24px; letter-spacing: 0.06em; word-break: break-all; }
|
||||
#modal img { display: block; margin: 0 auto 12px; border: 1px solid var(--rule); }
|
||||
|
||||
.fingerprint {
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
}
|
||||
#system-body h3 { margin-bottom: 14px; }
|
||||
|
||||
/* ------------------------------------------------- visitor photo editor */
|
||||
|
||||
.photo-editor { margin-bottom: 6px; }
|
||||
|
||||
.photo-frame {
|
||||
position: relative;
|
||||
width: 152px;
|
||||
/* Square, to match the kiosk camera and the frame printed on the badge. */
|
||||
aspect-ratio: 1 / 1;
|
||||
margin-bottom: 12px;
|
||||
background: #eef1f4;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
.photo-frame img,
|
||||
.photo-frame video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
.photo-frame video { transform: scaleX(-1); }
|
||||
.photo-empty { margin: 0; padding: 0 10px; color: var(--muted); font-size: 13px; text-align: center; }
|
||||
|
||||
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
|
||||
.photo-actions button, .photo-upload { padding: 8px 13px; font-size: 14px; }
|
||||
.photo-upload { cursor: pointer; }
|
||||
|
||||
.thumb-empty {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 3px;
|
||||
background: repeating-linear-gradient(45deg, #eef1f4, #eef1f4 5px, #e3e8ed 5px, #e3e8ed 10px);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hint.warn {
|
||||
padding: 9px 11px;
|
||||
border-left: 4px solid #d9a441;
|
||||
background: #fdf3d8;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.plain-list { margin: 0 0 14px; padding-left: 20px; font-size: 14.5px; }
|
||||
.plain-list li { margin-bottom: 5px; }
|
||||
|
||||
/* The confirmation for a destructive action should not look like a Save. */
|
||||
#modal.destructive { border-top-color: var(--alert); }
|
||||
#modal.destructive .primary { border-color: var(--alert); background: var(--alert); }
|
||||
|
||||
/* ----------------------------------------------------- branding editor */
|
||||
|
||||
.banner-frame {
|
||||
/* A checkerboard, so a transparent PNG reads as transparent rather than white. */
|
||||
background-color: #fff;
|
||||
background-image:
|
||||
linear-gradient(45deg, #e3e8ed 25%, transparent 25%, transparent 75%, #e3e8ed 75%),
|
||||
linear-gradient(45deg, #e3e8ed 25%, transparent 25%, transparent 75%, #e3e8ed 75%);
|
||||
background-size: 14px 14px;
|
||||
background-position: 0 0, 7px 7px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
margin-bottom: 12px;
|
||||
min-height: 76px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
.banner-frame img { max-width: 100%; max-height: 90px; display: block; }
|
||||
.banner-empty { margin: 0; color: var(--muted); font-size: 13px; }
|
||||
|
||||
.colour-row { display: flex; gap: 8px; align-items: center; }
|
||||
.colour-row input[type="color"] {
|
||||
width: 42px;
|
||||
height: 40px;
|
||||
padding: 2px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.colour-row input[type="text"] {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
}
|
||||
.modal-row-3 { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
|
||||
|
||||
.swatch {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid var(--rule);
|
||||
vertical-align: -2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
@@ -0,0 +1,402 @@
|
||||
:root {
|
||||
--paper: #e7ecf0;
|
||||
--card: #ffffff;
|
||||
--ink: #16202b;
|
||||
--muted: #5d6b7a;
|
||||
--rule: #c9d3dc;
|
||||
--deep: #0b4f4a;
|
||||
--deep-dark: #083a36;
|
||||
--on-brand: #ffffff;
|
||||
--exit: #2c4a6b;
|
||||
--exit-dark: #1f3650;
|
||||
--on-exit: #ffffff;
|
||||
--alert: #96162f;
|
||||
--focus: #0b4f4a;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
/* The rules below set display on elements that are toggled with the hidden
|
||||
attribute, and an author rule beats the browser's [hidden] { display: none }.
|
||||
Without this the captured still renders underneath the live camera feed. */
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
min-height: 100%;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family: "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
line-height: 1.45;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- chrome */
|
||||
|
||||
.bar {
|
||||
/* Three tracks, so the banner can sit centred on the page rather than centred
|
||||
in the space the clock happens to leave over. */
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 14px 22px;
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
}
|
||||
.bar .clock { grid-column: 3; justify-self: end; }
|
||||
.bar.align-left .banner,
|
||||
.bar.align-left .site { grid-column: 1; justify-self: start; }
|
||||
.bar.align-center .banner,
|
||||
.bar.align-center .site { grid-column: 2; justify-self: center; }
|
||||
|
||||
/* An uploaded banner sits in the bar in place of the site name. Transparent PNGs
|
||||
are the point, so nothing is painted behind it. */
|
||||
.banner {
|
||||
max-height: 64px;
|
||||
max-width: min(60vw, 460px);
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
|
||||
.clock { margin: 0; font-variant-numeric: tabular-nums; font-size: 16px; opacity: 0.85; }
|
||||
|
||||
.foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 16px;
|
||||
min-height: 20px;
|
||||
padding: 14px 22px 20px;
|
||||
font-size: 12.5px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
|
||||
|
||||
#app {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
margin: 0 auto;
|
||||
padding: 28px 22px 8px;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ screens */
|
||||
|
||||
.screen { display: none; }
|
||||
.screen.on { display: block; animation: rise 180ms ease-out; }
|
||||
|
||||
@keyframes rise {
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.screen.on { animation: none; }
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
font-weight: 620;
|
||||
letter-spacing: -0.015em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
h1 { font-size: 30px; margin: 8px 0 26px; }
|
||||
h2 { font-size: 25px; margin: 4px 0 20px; }
|
||||
|
||||
.hint { margin: -12px 0 22px; color: var(--muted); font-size: 15px; max-width: 46ch; }
|
||||
|
||||
/* --------------------------------------------------------- home doors */
|
||||
|
||||
.welcome { max-width: 18ch; }
|
||||
|
||||
.doors { display: grid; gap: 14px; }
|
||||
|
||||
.door {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 26px 24px;
|
||||
border: none;
|
||||
border-left: 7px solid var(--deep-dark);
|
||||
border-radius: 3px;
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.door-out { background: var(--exit); border-left-color: var(--exit-dark); color: var(--on-exit); }
|
||||
.door:active { transform: translateY(1px); }
|
||||
|
||||
.door-title { display: block; font-size: 27px; font-weight: 650; letter-spacing: -0.01em; }
|
||||
.door-sub { display: block; margin-top: 4px; font-size: 15px; opacity: 0.82; }
|
||||
|
||||
.text-action {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 22px;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.text-action:hover { background: var(--card); }
|
||||
.text-action, .field input, .picker, .choice, .host-option { color: var(--ink); }
|
||||
|
||||
/* ------------------------------------------------------- step rail */
|
||||
|
||||
.rail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin-bottom: 18px;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.rail i {
|
||||
display: block;
|
||||
width: 26px;
|
||||
height: 3px;
|
||||
background: var(--rule);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.rail i.done { background: var(--deep); }
|
||||
.rail span { margin-left: 6px; }
|
||||
|
||||
/* ---------------------------------------------------------- fields */
|
||||
|
||||
.field { display: block; margin-bottom: 18px; }
|
||||
.field > span {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-size: 14.5px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.field input {
|
||||
width: 100%;
|
||||
padding: 15px 14px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 20px;
|
||||
}
|
||||
.field input:focus-visible,
|
||||
button:focus-visible,
|
||||
a:focus-visible {
|
||||
outline: 3px solid var(--focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.field-pin input {
|
||||
font-size: 30px;
|
||||
letter-spacing: 0.5em;
|
||||
text-align: center;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- choices */
|
||||
|
||||
.choices { display: grid; gap: 10px; margin-bottom: 20px; }
|
||||
.choice, .host-option {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 18px 16px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.choice[aria-pressed="true"] {
|
||||
border-color: var(--deep);
|
||||
box-shadow: inset 0 0 0 1px var(--deep);
|
||||
background: #f2f8f6;
|
||||
}
|
||||
.host-list {
|
||||
max-height: 46vh;
|
||||
overflow-y: auto;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin-bottom: 20px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.host-option small { display: block; color: var(--muted); font-size: 14px; }
|
||||
.host-empty {
|
||||
color: var(--muted);
|
||||
font-size: 15px;
|
||||
margin: -6px 0 18px;
|
||||
padding: 12px 14px;
|
||||
background: var(--card);
|
||||
border-left: 4px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------- camera */
|
||||
|
||||
.camera {
|
||||
position: relative;
|
||||
/* Square, matching the crop that is saved and the frame printed on the badge,
|
||||
so the visitor sees exactly what ends up on their pass. */
|
||||
aspect-ratio: 1 / 1;
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
margin: 0 auto 18px;
|
||||
background: #0f1720;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.camera video, .camera img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
/* The live feed is mirrored because that is how people expect to see themselves.
|
||||
The captured still is not: it shows what will actually print. */
|
||||
.camera video { transform: scaleX(-1); }
|
||||
.camera-error {
|
||||
margin: -8px 0 18px;
|
||||
padding: 14px;
|
||||
border-left: 4px solid var(--alert);
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------- review */
|
||||
|
||||
.review {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(120px, 34%) 1fr;
|
||||
gap: 10px 16px;
|
||||
margin: 0 0 24px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--rule);
|
||||
font-size: 16.5px;
|
||||
}
|
||||
.review dt { color: var(--muted); }
|
||||
.review dd { margin: 0; }
|
||||
.review img { width: 78px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; display: block; }
|
||||
|
||||
/* ------------------------------------------------------------- done */
|
||||
|
||||
.screen-done .mark {
|
||||
display: inline-block;
|
||||
margin: 8px 0 14px;
|
||||
padding: 7px 14px;
|
||||
border-radius: 2px;
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
#screen-done-out .mark { background: var(--exit); color: var(--on-exit); }
|
||||
|
||||
/* ------------------------------------------------------------ buttons */
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 26px;
|
||||
}
|
||||
.nav button {
|
||||
flex: 1 1 auto;
|
||||
min-height: 62px;
|
||||
padding: 16px 22px;
|
||||
border-radius: 3px;
|
||||
font: inherit;
|
||||
font-size: 19px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.nav .primary {
|
||||
border: 1px solid var(--deep);
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav .ghost {
|
||||
flex: 0 1 auto;
|
||||
border: 1px solid var(--rule);
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
}
|
||||
.nav button[disabled] { opacity: 0.55; cursor: progress; }
|
||||
|
||||
/* ------------------------------------------------------------- alert */
|
||||
|
||||
.alert {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 22px;
|
||||
transform: translateX(-50%);
|
||||
width: min(560px, calc(100% - 32px));
|
||||
margin: 0;
|
||||
padding: 16px 18px;
|
||||
border-left: 5px solid var(--alert);
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
box-shadow: 0 10px 28px rgba(22, 32, 43, 0.18);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
h1 { font-size: 26px; }
|
||||
h2 { font-size: 22px; }
|
||||
.door-title { font-size: 23px; }
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- site + badge bits */
|
||||
|
||||
.foot-link {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
color: var(--muted);
|
||||
font: inherit;
|
||||
font-size: 12.5px;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#badge-frame {
|
||||
position: fixed;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------- host dropdown */
|
||||
|
||||
.picker {
|
||||
width: 100%;
|
||||
padding: 15px 14px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 20px;
|
||||
/* Tall enough to be a comfortable touch target on a tablet. */
|
||||
min-height: 58px;
|
||||
}
|
||||
.picker:disabled { color: var(--muted); }
|
||||
|
||||
/* An optional field says so quietly, without shouting for attention. */
|
||||
.field > span em { font-style: normal; opacity: 0.75; }
|
||||
@@ -0,0 +1,203 @@
|
||||
:root {
|
||||
--paper: #e7ecf0;
|
||||
--card: #ffffff;
|
||||
--ink: #16202b;
|
||||
--muted: #5d6b7a;
|
||||
--rule: #d4dce3;
|
||||
--deep: #0b4f4a;
|
||||
--alert: #96162f;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
/* Author display rules beat the browser's [hidden] { display: none }, and the
|
||||
sign in screens are toggled with that attribute. */
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family: "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
padding: 24px 20px 40px;
|
||||
}
|
||||
|
||||
button, input { font: inherit; }
|
||||
button { cursor: pointer; }
|
||||
:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; }
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- card */
|
||||
|
||||
.auth-card {
|
||||
width: min(400px, 100%);
|
||||
padding: 26px 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: 20px; }
|
||||
.auth-site {
|
||||
margin: 0 0 14px;
|
||||
font-size: 12.5px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
.auth-head h1 { font-size: 22px; font-weight: 620; letter-spacing: -0.015em; margin: 0 0 6px; }
|
||||
.auth-sub { margin: 0; color: var(--muted); font-size: 14px; }
|
||||
|
||||
.auth-back {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
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); }
|
||||
|
||||
.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; }
|
||||
|
||||
/* A floor under the body means most steps occupy the same box, so moving between
|
||||
them swaps content rather than visibly growing the card. */
|
||||
.auth-body { min-height: 232px; }
|
||||
|
||||
.auth-screen { display: block; }
|
||||
.auth-screen.entering { animation: screen-in 200ms cubic-bezier(0.2, 0, 0.2, 1); }
|
||||
|
||||
@keyframes screen-in {
|
||||
from { opacity: 0; transform: translateX(12px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.auth-screen.entering { animation: none; }
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------- fields */
|
||||
|
||||
.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; color: var(--muted); }
|
||||
|
||||
.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; }
|
||||
code {
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
background: var(--paper);
|
||||
padding: 2px 6px;
|
||||
border-radius: 2px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.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;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.auth-foot {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
margin: 20px 0 0;
|
||||
color: var(--muted);
|
||||
font-size: 12.5px;
|
||||
text-align: center;
|
||||
}
|
||||
.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
|
||||
Reference in New Issue
Block a user