:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #14171f;
  --muted: #5d6573;
  --line: #e3e6eb;
  --accent: #0b5cd5;
  --accent-ink: #ffffff;
  --ok: #12804a;
  --ok-bg: #e8f6ee;
  --no: #c2331f;
  --no-bg: #fdecea;
  --warn: #9a6200;
  --warn-bg: #fff4e0;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #181b22; --ink: #eef0f4; --muted: #9aa2b1; --line: #2a2f3a;
    --accent: #4d8cf0; --ok: #43c47f; --ok-bg: #12291d; --no: #ff7a66; --no-bg: #2e1612;
    --warn: #f0b552; --warn-bg: #2d2412;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.small { font-size: .82rem; font-weight: 400 !important; word-break: break-all; }
.nowrap { white-space: nowrap; }

/* клиент */
.wrap { max-width: 460px; margin: 0 auto; padding: 20px 16px 32px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 1.6rem; }
.badge { display: inline-grid; place-items: center; min-width: 2.3rem; height: 2.3rem; padding: 0 .4rem; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: .95rem; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: 0 0 1.4rem; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.4rem; }
.steps li { counter-increment: s; position: relative; padding: 0 0 .9rem 2.6rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700; border: 1.5px solid var(--accent); color: var(--accent); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: .92rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.form label { display: block; font-weight: 600; margin: .9rem 0 .35rem; }
.form label:first-child, .form h1 + label { margin-top: 0; }
.form input[type=text], .form input:not([type]), .form input[type=tel], .form input[type=password] {
  width: 100%; font: inherit; font-size: 1.15rem; padding: .75rem .85rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); letter-spacing: .02em;
}
.form input:focus { outline: none; border-color: var(--accent); }
.hint { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; }
.check { display: flex !important; gap: .7rem; align-items: flex-start; font-weight: 400 !important; font-size: .88rem; color: var(--muted); margin-top: 1.2rem !important; }
.check input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; flex: none; accent-color: var(--accent); }
.btn { display: block; width: 100%; margin-top: 1.2rem; padding: .9rem 1rem; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650; font-size: 1.05rem;
  text-align: center; text-decoration: none; cursor: pointer; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.small { display: inline-block; width: auto; margin: 0; padding: .55rem .9rem; font-size: .95rem; }
.alert { background: var(--no-bg); color: var(--no); border-radius: 10px; padding: .75rem .9rem; margin: 0 0 1rem; font-size: .95rem; }
.alert code { color: inherit; }

.verdict { text-align: center; padding: 1.4rem 0 1.2rem; }
.verdict .icon { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.2rem; font-weight: 800; }
.verdict.ok .icon { background: var(--ok-bg); color: var(--ok); }
.verdict.no .icon { background: var(--no-bg); color: var(--no); }
.verdict.wait .icon { background: var(--card); border: 1px solid var(--line); }
.verdict p { color: var(--muted); margin: .3rem auto 0; max-width: 34ch; }
.verdict .reason { color: var(--ink); font-weight: 500; }
.spinner { width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.facts { display: grid; gap: .55rem; margin-top: .4rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.facts span { color: var(--muted); }
.facts b { font-weight: 600; text-align: right; }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .45rem; }
.checklist li { position: relative; padding: .55rem .8rem .55rem 2.3rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: .92rem; }
.checklist li::before { position: absolute; left: .8rem; top: .55rem; font-weight: 800; }
.checklist li.ok::before { content: "✓"; color: var(--ok); }
.checklist li.no { border-color: var(--no); }
.checklist li.no::before { content: "✕"; color: var(--no); }
.checklist li.skip { color: var(--muted); }
.checklist li.skip::before { content: "–"; }
.checklist b { font-weight: 600; }
.checklist span { display: block; color: var(--muted); font-size: .85rem; }
.foot { color: var(--muted); font-size: .78rem; text-align: center; margin-top: 2.2rem; }

/* оператор */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.topbar .brand { margin: 0; }
.logout { display: flex; gap: .8rem; align-items: center; margin: 0; }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.wide { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.narrow { max-width: 380px; margin: 3rem auto; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chips a { text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; }
.chips a.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chips b { color: var(--muted); font-weight: 600; margin-left: .2rem; }
.search { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search input { flex: 1 1 220px; font: inherit; padding: .55rem .8rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.log { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: .9rem; }
.log th, .log td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.log th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.log tr:last-child td { border-bottom: 0; }
.log td.reason { color: var(--muted); min-width: 280px; max-width: 420px; }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; }
.pill { display: inline-block; white-space: nowrap; padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; text-decoration: none; vertical-align: middle; background: var(--line); color: var(--ink); }
.st-VERIFIED.pill, .st-AGE_ONLY.pill { background: var(--ok-bg); color: var(--ok); }
.st-REJECTED.pill { background: var(--no-bg); color: var(--no); }
.st-STARTED.pill, .st-EXPIRED.pill, .st-ERROR.pill { background: var(--warn-bg); color: var(--warn); }
.pager { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.reason.big { font-size: 1.05rem; color: var(--no); margin: .2rem 0 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.photos { display: flex; flex-wrap: wrap; gap: 1rem; }
.photos figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; max-width: 260px; }
.photos img { display: block; max-width: 100%; max-height: 300px; border-radius: 8px; }
.photos figcaption { font-size: .75rem; color: var(--muted); word-break: break-all; margin-top: .3rem; }
.raw { margin-top: 1.6rem; }
.raw summary { cursor: pointer; color: var(--accent); }
.raw pre { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow: auto; max-height: 70vh; font-size: .8rem; }
