:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7c;
  --line: #d9dfe7;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --error-bg: #fdecec;
  --error-text: #9b1c1c;
  --ok-bg: #e9f6ee;
  --ok-text: #1d6b3a;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --card: #1a212b;
    --text: #e6ebf2;
    --muted: #9aa7b6;
    --line: #2c3644;
    --accent: #5b9aff;
    --accent-text: #0b1220;
    --error-bg: #3a1d1f;
    --error-text: #ffb4b4;
    --ok-bg: #173123;
    --ok-text: #9fe0b5;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.logo {
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-size: 22px;
}
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
.sub, .hint, .foot, .secret-label { color: var(--muted); font-size: 14px; margin: 0; }
.hint { margin: 12px 0; }
.foot { margin-top: 16px; text-align: center; }
label { display: block; margin: 12px 0; font-size: 14px; font-weight: 600; }
input[type="email"], input[type="password"], input:not([type]) {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button {
  width: 100%; margin-top: 8px; padding: 11px 14px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
a { color: var(--accent); }
.links { margin: 14px 0 0; font-size: 14px; text-align: center; }
.message { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 12px; }
.message.error { background: var(--error-bg); color: var(--error-text); }
.message.ok { background: var(--ok-bg); color: var(--ok-text); }
.steps { padding-left: 20px; font-size: 14px; color: var(--muted); }
.qr { display: grid; place-items: center; margin: 12px 0; }
.qr svg { width: 220px; height: 220px; background: #fff; border-radius: 8px; }
.secret { font-family: var(--mono); font-size: 15px; letter-spacing: 1px; word-break: break-all; margin: 4px 0 8px; }
.codes {
  list-style: none; padding: 12px; margin: 12px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-family: var(--mono); background: var(--bg); border-radius: 8px;
}
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 8px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 600; font-size: 15px; }
