:root {
  color-scheme: dark;
  --bg: #0b0f1a;
  --card: #121826;
  --line: #22304a;
  --text: #e7ecf5;
  --muted: #8fa0bd;
  --accent: #4f8cff;
  --error: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #16223a 0%, var(--bg) 55%);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.page { width: 100%; max-width: 430px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.logo { font-weight: 800; letter-spacing: 0.5px; font-size: 20px; }
.sub { color: var(--muted); }
h1 { font-size: 20px; margin: 8px 0 4px; }
p { margin: 6px 0 14px; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1420;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); }
button { cursor: pointer; border-radius: 10px; border: 1px solid var(--line); padding: 12px 14px; font-size: 15px; }
button.primary {
  width: 100%;
  margin-top: 18px;
  background: var(--accent);
  color: #08101f;
  border-color: transparent;
  font-weight: 700;
}
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; color: var(--text); }
button.factor { width: 100%; margin: 6px 0; background: #0d1420; color: var(--text); text-align: left; }
button.factor:hover { border-color: var(--accent); }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row button { flex: 1; }
.error { color: var(--error); font-size: 14px; margin-top: 12px; }
.hidden { display: none; }
.qr { display: flex; justify-content: center; margin: 12px 0; background: #fff; border-radius: 12px; padding: 10px; }
.qr svg { width: 200px; height: 200px; }
.secret code {
  background: #0d1420;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  word-break: break-all;
}
pre {
  background: #0d1420;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  overflow: auto;
}
.foot { text-align: center; margin-top: 14px; font-size: 12px; }
