:root {
  --bg: var(--tg-theme-bg-color, #0f1115);
  --card: var(--tg-theme-secondary-bg-color, #171a21);
  --text: var(--tg-theme-text-color, #e8eaed);
  --muted: var(--tg-theme-hint-color, #8a90a0);
  --accent: var(--tg-theme-button-color, #3b82f6);
  --accent-text: var(--tg-theme-button-text-color, #fff);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, system-ui, "SF Pro", Roboto, sans-serif; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.head small { color: var(--muted); letter-spacing: .12em; font-size: 11px; }
.head h1 { margin: 2px 0 0; font-size: 22px; }
.card { background: var(--card); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); }
.ok-text { color: #34d399; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #222634; }
.badge.ok { background: #10391f; color: #34d399; }
.badge.warn { background: #3a2e12; color: #f5c451; }
.badge.bad { background: #3a1a1a; color: #f87171; }
.row { margin-top: 12px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 12px 14px; }
button.primary { background: var(--accent); color: var(--accent-text); width: 100%; font-weight: 600; }
button.primary:disabled { opacity: .5; }
button.ghost { background: transparent; color: var(--text); font-size: 20px; padding: 6px 10px; }
.list .item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #22262f; }
.list .item:first-child { border-top: 0; }
.item .grow { flex: 1; display: flex; flex-direction: column; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: #34d399; }
.dot.warn { background: #f5c451; }
.inp { width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #2a2f3a; background: #0f1218; color: var(--text); font: inherit; }
.inp:focus { outline: none; border-color: var(--accent); }
.qr { display: flex; justify-content: center; margin-top: 12px; }
.qr img { width: 240px; height: 240px; background: #fff; border-radius: 12px; padding: 8px; }
.err { color: #f87171; text-align: center; min-height: 18px; }
