/* Sign-in and admin pages, on top of site.css. */
.narrow { max-width: 460px; margin: 0 auto; padding: 48px 16px 64px; }
.admin { padding-top: 24px; padding-bottom: 48px; }
.admin h1 { font-size: 1.7rem; margin: .2em 0 .5em; }
.admin h2 { font-size: 1.2rem; margin: 32px 0 10px; }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.foot-admin { padding: 16px; }

.stack { display: grid; gap: 14px; margin-top: 20px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
                background: var(--bg); color: var(--ink); min-width: 0; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
.btn { cursor: pointer; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; }
.link-btn.danger { color: #b3261e; }
.alert { padding: 10px 14px; border-radius: 8px; background: #fff4e5; color: #6b4200; border: 1px solid #f0d3a8; }
@media (prefers-color-scheme: dark) { .alert { background: #3a2a12; color: #f3d9ae; border-color: #5c4520; } }

.logout { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0 10px; }
.tabs a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.tabs a:hover, .tabs a[aria-current="page"] { background: var(--accent-soft); }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.tile span { color: var(--muted); font-size: .88rem; }
.tile strong { font-size: 1.35rem; }
.tile small { color: var(--muted); }
.tile.ok { border-color: #1e6b35; }
.tile.bad { border-color: #b3261e; background: rgba(179, 38, 30, .06); }

.res, .st { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); white-space: nowrap; }
.res-stolen, .st-failed, .st-suspended { background: rgba(179, 38, 30, .14); color: #b3261e; }
.res-registered, .st-sent, .st-active { background: rgba(30, 107, 53, .14); color: #1e6b35; }
@media (prefers-color-scheme: dark) {
  .res-stolen, .st-failed, .st-suspended { color: #ff9a92; }
  .res-registered, .st-sent, .st-active { color: #8fd6a4; }
}
tr.off td { opacity: .55; }
.key { font-size: 1.1rem; padding: 14px 16px; border: 1px dashed var(--accent); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }

/* partner account: check form and result */
.check-form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 20px 0 8px;
              padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.check-form .wide { grid-column: 1 / -1; }
.check-form input[name="serial"] { font: 600 1.15rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }
.result-block { margin-top: 24px; }
.verdict { font-size: 1.3rem; font-weight: 700; padding: 14px 18px; border-radius: var(--radius); border: 2px solid var(--line); margin: 0 0 12px; }
.verdict-stolen { border-color: #b3261e; color: #b3261e; background: rgba(179, 38, 30, .06); }
.verdict-registered, .verdict-not_found { border-color: #1e6b35; color: #1e6b35; }
.verdict-restricted_match, .verdict-possible_match { border-color: #8a5a00; color: #8a5a00; }
.res-not_found { background: rgba(30, 107, 53, .14); color: #1e6b35; }
.res-restricted_match, .res-possible_match { background: rgba(138, 90, 0, .14); color: #8a5a00; }
td.agree-yes { color: #1e6b35; font-weight: 600; }
td.agree-yes::after { content: " ✓"; }
td.agree-no { color: #b3261e; }
td.agree-no::after { content: " ✗"; }
@media (prefers-color-scheme: dark) {
  .verdict-stolen, td.agree-no { color: #ff9a92; }
  .verdict-registered, .verdict-not_found, td.agree-yes, .res-not_found { color: #8fd6a4; }
  .verdict-restricted_match, .verdict-possible_match, .res-restricted_match, .res-possible_match { color: #f3c674; }
}

/* partner account: website widget */
pre.key { white-space: pre-wrap; margin: 0 0 8px; }
textarea { width: 100%; max-width: 640px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 400; }
.widget-preview { padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-alt); }

/* partner account: watching, reports of finds */
.watch-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.watch-line select { padding: 4px 8px; }
details.find { margin: 10px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
details.find summary { cursor: pointer; font-weight: 600; }
details.find form { margin-top: 10px; max-width: 640px; }

/* "Request access": the questions of the chosen kind of organisation */
.narrow-wide { max-width: 640px; }
.join-form fieldset { display: grid; gap: 14px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.join-form legend { font-weight: 700; padding: 0 6px; }
.join-form .kinds { gap: 8px; }
label.kind { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
label.kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
label.kind span { display: grid; gap: 2px; }
label.kind small { color: var(--muted); }
.join-form label.check { align-items: flex-start; }
.join-form label.check input, label.kind input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@supports selector(:has(*)) {
  .join-form .kind-fields { display: none; }
  .join-form:has(input[name="kind"][value="commercial"]:checked) .kf-commercial,
  .join-form:has(input[name="kind"][value="police"]:checked) .kf-police,
  .join-form:has(input[name="kind"][value="registry"]:checked) .kf-registry { display: grid; }
}

/* partner account and admin: trial access, sign-ups */
.trial-note { padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); margin: 0 0 16px; }
.application { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 12px; margin: 0 0 14px; }
.application.decided { opacity: .75; }
.application h2 { margin-top: 12px; }
.application .facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
.application .facts dt { color: var(--muted); }
.application .facts dd { margin: 0; overflow-wrap: anywhere; }
