/* SHOW admin. Builds on tokens.css (copied from the demo). */
body { min-height: 100vh; }
.center { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.loading { display: grid; place-items: center; min-height: 100vh; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
code { padding: 1px 6px; border-radius: 6px; background: var(--card-2); font-size: 0.875em; }

/* Sign in */
.signin { width: 100%; max-width: 400px; display: grid; gap: 14px; }
.signin h1 { margin-top: 16px; font-size: 2.25rem; font-weight: 650; letter-spacing: -0.04em; }
.google { gap: 12px; background: var(--text); color: var(--bg); }
.google:hover { background: #e4e4e7; }
.google .g { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); color: var(--text); font-weight: 800; font-size: 0.875rem; }
.dev { display: grid; gap: 8px; margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 16px; }
input[type="email"], input[type="search"] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
input[type="email"]:focus, input[type="search"]:focus { outline: none; border-color: var(--muted); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(13, 13, 15, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; max-width: 1120px; margin: 0 auto; padding: 12px 16px; }
.top nav { display: flex; gap: 4px; }
.top nav a { display: flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; }
.top nav a[aria-current="page"] { background: var(--card-2); color: var(--text); }
.who { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 0.875rem; min-width: 0; }
.who .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { padding: 0; border: 0; background: none; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }

.main { max-width: 1120px; margin: 0 auto; padding: 32px 16px 80px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; }
.head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; }
.head .eyebrow { margin-bottom: 6px; }
.head .eyebrow a { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.h2 { margin: 28px 0 12px; font-size: 1.125rem; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.stat { padding: 18px; border-radius: 20px; background: var(--card); }
.stat dt { color: var(--muted); font-size: 0.8125rem; }
.stat dd { margin-top: 4px; font-size: 2rem; font-weight: 650; letter-spacing: -0.03em; }

.cols { display: grid; gap: 8px 24px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.cols > * { min-width: 0; }

.rows { display: grid; gap: 2px; border-radius: 18px; overflow: hidden; }
.rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 14px 16px; background: var(--card); }
.rows a { text-decoration: none; }
.rows a:hover { text-decoration: underline; }
.rows time { margin-left: auto; color: var(--muted); font-size: 0.875rem; }

.empty { padding: 24px; border-radius: 18px; background: var(--card); color: var(--muted); text-align: center; }
.empty h3 { color: var(--text); }
.empty .btn { margin-top: 14px; }

/* PIN list */
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tools input { flex: 1 1 240px; max-width: 360px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs button span { padding: 0 7px; border-radius: 999px; background: var(--card-2); font-size: 0.75rem; }
.tabs button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.tabs button[aria-pressed="true"] span { background: rgba(0, 0, 0, 0.12); }
.table-wrap { overflow-x: auto; border-radius: 18px; background: var(--card); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9375rem; }
.table th { padding: 12px 16px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .num { text-align: right; }
.cols .table { min-width: 0; }

.pill-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0; vertical-align: middle; }
.s-active { background: rgba(93, 211, 158, 0.14); color: var(--good); }
.s-expired { background: rgba(242, 179, 92, 0.14); color: #f2b35c; }
.s-revoked { background: var(--card-2); color: var(--muted); }

/* Forms */
.form { display: grid; gap: 16px; max-width: 560px; }
.card { padding: 22px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.form-error { padding: 10px 14px; border-radius: 12px; background: #2a1418; color: #ff98a6; font-size: 0.875rem; }
.btn-danger { background: transparent; color: #ff8a9a; box-shadow: inset 0 0 0 1px #4a2229; }
.btn-danger:hover { background: #2a1418; }

/* PIN shown once */
.made { display: grid; justify-items: start; gap: 16px; max-width: 560px; margin: 24px auto 0; padding: 28px; border-radius: var(--radius); background: linear-gradient(150deg, #2a1218, var(--card) 70%); }
.big-pin { font-size: clamp(3rem, 12vw, 4.5rem); font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; line-height: 1; }
.warn { padding: 10px 14px; border-radius: 12px; background: rgba(242, 179, 92, 0.12); color: #f2b35c; font-size: 0.9375rem; }
.message { width: 100%; margin: 0; padding: 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font: inherit; font-size: 0.875rem; white-space: pre-wrap; }
.notice { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--card); }

/* PIN details */
.facts dd { overflow-wrap: anywhere; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr) !important; } }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 18px; overflow: hidden; background: var(--line); }
.facts div { padding: 14px 16px; background: var(--card); }
.facts dt { color: var(--muted); font-size: 0.75rem; }
.facts dd { margin-top: 2px; font-weight: 600; }
