/* Интерфейс стойки регистрации: крупные цели, максимальный контраст, читаемость на солнце. */

:root {
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #21252e;
  --line: #2e3440;
  --text: #f2f4f8;
  --muted: #9aa4b2;
  --accent: #2f6feb;
  --ok: #1f9d55;
  --ok-strong: #13703b;
  --warn: #c98a00;
  --warn-strong: #8f6200;
  --err: #d33c3c;
  --err-strong: #96262d;
  --radius: 14px;
  --gap: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.wrap { max-width: 720px; margin: 0 auto; padding: var(--gap); }
.wide { max-width: 1100px; }

header.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gap);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
header.bar h1 { font-size: 16px; margin: 0; font-weight: 600; }
header.bar .spacer { flex: 1; }

.pill {
  font-size: 13px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.online { color: #8fe3b0; border-color: #275a3f; }
.pill.offline { color: #ffd08a; border-color: #6b5220; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-bottom: var(--gap);
}

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input[type="password"], input[type="search"], select {
  width: 100%; padding: 14px; font-size: 17px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 12px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 14px 18px; min-height: 48px;
  border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
  width: 100%;
}
button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
button:active { transform: translateY(1px); }
button[disabled] { opacity: .55; cursor: default; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

#video-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; aspect-ratio: 4 / 3;
}
#video { width: 100%; height: 100%; object-fit: cover; }
#frame {
  position: absolute; inset: 12% 12%;
  border: 3px solid rgba(255,255,255,.85); border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.35);
}

/* Экран результата: оператор принимает решение за секунду, не читая мелкий текст. */
#result {
  display: none; position: fixed; inset: 0; z-index: 20;
  flex-direction: column; justify-content: center; align-items: center;
  padding: 24px; text-align: center; gap: 10px;
}
#result.show { display: flex; }
#result.ok { background: var(--ok-strong); }
#result.already { background: var(--warn-strong); }
#result.err { background: var(--err-strong); }
#result .icon { font-size: 84px; line-height: 1; }
#result .title { font-size: 30px; font-weight: 700; }
#result .name { font-size: 34px; font-weight: 700; word-break: break-word; }
#result .sub { font-size: 20px; opacity: .92; }
#result .hint { font-size: 15px; opacity: .8; margin-top: 8px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.item .grow { flex: 1; min-width: 0; }
.item .name { font-weight: 600; }
.item .meta { font-size: 13px; color: var(--muted); }
.item button { width: auto; padding: 10px 14px; min-height: 40px; }
.item.done { opacity: .6; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .v { font-size: 34px; font-weight: 700; }
.stat .k { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.error { color: #ff9c9c; font-size: 14px; margin-bottom: 10px; }
.badge-queue { color: #ffd08a; }
