:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5b6472;
  --line: #d8dde5;
  --paper: #ffffff;
  --wash: #f4f7f8;
  --accent: #0d1f3c;
  --accent-dark: #0a1830;
  --focus: #2b7fff;
  --danger: #9f1239;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(13, 31, 60, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(79, 98, 128, 0.1), transparent 38%),
    var(--wash);
}

main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.shell {
  width: min(100%, 520px);
  padding: clamp(26px, 5vw, 46px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(13, 31, 60, 0.12);
}

.brand { display: flex; align-items: center; margin-bottom: 28px; color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; color: #fff; background: var(--accent); font-weight: 900; }
.brand-name { margin-left: 12px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.05; letter-spacing: 0; }
p { margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); }
form { display: grid; gap: 12px; margin-top: 18px; }

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input:focus-visible,
button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button,
.button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.secondary { color: var(--ink); background: var(--paper); border-color: var(--line); }
.actions { display: grid; gap: 13px; margin-top: 26px; }
.fine { margin-top: 10px; font-size: 13px; line-height: 1.45; }
.note { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.error { color: var(--danger); }

.provider-button {
  justify-content: flex-start;
  gap: 14px;
  min-height: 56px;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}
.provider-logo { flex: 0 0 auto; width: 22px; height: 22px; display: block; }
.provider-label { flex: 1 1 auto; text-align: center; padding-right: 34px; }

.divider { margin-top: 28px; padding-top: 10px; }
.divider-label {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #7a8493;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.divider-label::before,
.divider-label::after { content: ""; height: 1px; background: var(--line); }
.divider-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.mfa-options { display: grid; gap: 12px; margin-top: 24px; }
.mfa-option {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  white-space: normal;
}
.mfa-icon,
.passkey-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.mfa-title,
.mfa-copy { display: block; }
.mfa-title { color: var(--ink); font-size: 16px; font-weight: 900; line-height: 1.25; }
.mfa-copy { margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.35; }

.qr-frame {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.qr-placeholder {
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  border: 1px dashed #9aa5b5;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.manual-code {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.manual-label { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
code { overflow-wrap: anywhere; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 13px; }
.passkey-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  text-align: center;
}
.passkey-copy { margin: 0; max-width: 330px; font-size: 14px; }

@media (max-width: 520px) {
  main { padding: 18px; }
  .shell { padding: 26px; }
  .mfa-option { grid-template-columns: 42px 1fr; padding: 14px; }
  .mfa-icon,
  .passkey-mark { width: 42px; height: 42px; font-size: 12px; }
}
