/* Стиль Вьюги (viewscape.ru): белое пространство, Inter, тёмная шапка, один малиновый акцент. */
@font-face {
  font-family: "Inter";
  src: url("/static/vendor/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #0a0725;
  --muted: #6b6880;
  --line: #ece9f1;
  --soft: #f7f6fa;
  --accent: #c40065;
  --accent-dark: #9e0052;
  --accent-soft: #fbe7f0;
  --green: #5f8a1f;
  --green-soft: #eef4e3;
  --warn: #8a5a00;
  --warn-soft: #fff6e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #fff;
  color: var(--ink);
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
a { color: inherit; }

/* шапка */
.bar {
  background: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
}
.logo img { height: 26px; display: block; }
.who { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #c9c6d8; }
.who b { color: #fff; font-weight: 500; }
.who a, .who button {
  color: #c9c6d8; background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  text-decoration: none; border-bottom: 1px solid #4a4766;
}
.who a:hover, .who button:hover { color: #fff; }

/* колонка */
main { max-width: 520px; margin: 0 auto; padding: 32px 22px 56px; }
.over {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin: 0 0 12px; display: flex; align-items: center;
}
.num {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 10px; margin-right: 8px; letter-spacing: 0;
}
h1 { font-size: 30px; line-height: 1.15; font-weight: 500; margin: 0 0 14px; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 26px; }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.center { text-align: center; }
.note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.count { margin-left: 8px; letter-spacing: 0; text-transform: none; font-weight: 500; }

/* кнопки */
.btn {
  display: block; width: 100%; text-align: center; cursor: pointer;
  background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 6px;
  font: inherit; font-weight: 600; font-size: 15px; padding: 15px; text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #221e46; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }

/* шаг 1 */
.appbox { background: var(--soft); border-radius: 10px; padding: 18px 16px 12px; margin: 0 0 30px; }
.appbox .small { margin: 10px 0 0; }

/* шаг 2 */
label, .label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.hint { font-weight: 400; color: var(--muted); }
input#label {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 13px 14px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--soft); margin: 0 0 20px;
}
input#label:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: #fff; }
.seg {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 0 0 22px;
}
.seg label { margin: 0; font-weight: 400; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; font-size: 13.5px; padding: 11px 0; cursor: pointer;
  border-left: 1px solid var(--line);
}
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--ink); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
#limit-line { margin: 10px 0 0; }

.test {
  font-size: 13px; background: var(--warn-soft); color: var(--warn);
  border: 1px dashed #e2c38a; border-radius: 6px; padding: 9px 12px; margin: 0 0 22px;
}

/* готово */
.warn { font-size: 13px; background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 10px 12px; margin: 0 0 20px; }
.qr { width: 240px; max-width: 100%; margin: 0 auto 22px; background: #fff; line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; font-size: 15px; }
.steps li { counter-increment: s; padding-left: 32px; position: relative; margin: 0 0 12px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.namebox { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.namebox code {
  font: 600 16px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--soft);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
.namebox button {
  font: inherit; font-size: 13px; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.alt { border-top: 1px solid var(--line); padding-top: 16px; margin: 0 0 18px; }
.alt .btn { margin-top: 10px; }

/* список */
.sep { height: 1px; background: var(--line); margin: 34px 0 22px; }
.row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .t { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; word-break: break-word; }
.row .m { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.row .a { margin-top: 8px; font-size: 13px; display: flex; gap: 16px; }
.row .a button {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.row .a button.red { color: var(--accent); border-color: #f2c7db; }
.row.off { opacity: .5; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.dot.off { background: #c9c6d8; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: var(--ink);
  background: var(--soft); padding: 1px 6px; border-radius: 4px;
}
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* администратор */
.emp { padding: 14px 0; border-bottom: 1px solid var(--line); }
.emp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.emp .n { font-weight: 600; font-size: 15px; }
.emp .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.emp .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
  background: #fff; border: 1px solid #f2c7db; color: var(--accent); font-weight: 600;
}
.pill.grey { border-color: var(--line); color: var(--ink); font-weight: 500; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--green-soft); color: var(--green); font-weight: 600; }
.tag.off { background: var(--accent-soft); color: var(--accent-dark); }
.emp details { margin-top: 8px; }
.emp summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.back { display: inline-block; margin-top: 24px; font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line); }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  max-width: calc(100% - 32px); box-shadow: 0 8px 28px rgba(10, 7, 37, .25); z-index: 10;
}
.toast.err { background: var(--accent); }
