/* The pages the AS renders itself (NeutralPage, MfaPages): the built-in sign-in for clients
   without a frontend login page (the platform console), two-step sign-in, "sign-in expired"
   and errors. Same colours as the platform console. No JavaScript, no inline styles (CSP). */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1d2330; --muted: #5d6676; --line: #dde1e8;
  --accent: #2f5bd3; --accent-text: #ffffff; --danger: #b42318; --err-bg: #fdecea;
  --ok: #1e6b3a; --ok-bg: #e7f6ec; --code-bg: #eef1f6; --focus: rgba(47, 91, 211, .25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --surface: #1b1f27; --text: #e6e9ef; --muted: #9aa3b2; --line: #2c3240;
    --accent: #6d8ff0; --accent-text: #0b0e14; --danger: #f2766b; --err-bg: #3a1c1a;
    --ok: #8fd6a8; --ok-bg: #173323; --code-bg: #232937; --focus: rgba(109, 143, 240, .35);
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  color: var(--text); background: var(--bg);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

main { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 32px; box-shadow: 0 8px 24px rgba(16, 24, 40, .06); }
main.wide { max-width: 560px; }
.brand { margin: 0 0 20px; font-weight: 700; letter-spacing: .02em; color: var(--accent); }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.lead { color: var(--muted); }
a { color: var(--accent); }

/* Forms */
form { margin: 0; }
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field label { font-weight: 600; font-size: .92rem; }
input[type="text"], input[type="password"] { width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.25rem;
  letter-spacing: .2em; text-align: center; }
button { width: 100%; font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 11px 16px;
  cursor: pointer; background: var(--accent); color: var(--accent-text); margin-top: 4px; }
button:hover { filter: brightness(1.08); }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* A link that looks like the main button ("Sign in with Google", "Continue to sign in"). */
a.button { display: block; text-align: center; font-weight: 600; text-decoration: none; border-radius: 8px;
  padding: 11px 16px; background: var(--accent); color: var(--accent-text); }
a.button:hover { filter: brightness(1.08); }
a.button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.divider { color: var(--muted); font-size: .9rem; text-align: center; margin: 20px 0 12px; }

/* Messages */
[role="alert"] { background: var(--err-bg); color: var(--danger); border-radius: 8px; padding: 10px 14px; }
[role="alert"] strong { font-weight: 600; }
[role="status"] { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 14px; }

/* Two-step sign-in setup: numbered steps, QR code, key */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 8px 0 0; display: grid; gap: 24px; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 40px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: .85rem;
  display: grid; place-items: center; }
ol.steps .step-title { font-weight: 600; margin: 0 0 10px; }
figure.qr { margin: 0 0 12px; padding: 12px; width: max-content; max-width: 100%;
  background: #ffffff; border: 1px solid var(--line); border-radius: 10px; }
figure.qr svg { display: block; width: 200px; height: 200px; }
.key-label { color: var(--muted); font-size: .9rem; margin: 0 0 6px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--code-bg);
  border-radius: 6px; padding: 2px 6px; }
code.key { display: block; padding: 10px 12px; font-size: .95rem; letter-spacing: .05em;
  user-select: all; word-break: normal; overflow-wrap: break-word; }

/* Recovery codes */
ul.codes { list-style: none; padding: 0; margin: 0 0 16px; display: grid;
  grid-template-columns: repeat(2, 1fr); gap: 8px; }
ul.codes code { display: block; text-align: center; padding: 8px; font-size: 1rem; letter-spacing: .05em; }
.actions { display: grid; gap: 12px; margin-top: 8px; }
.actions a { text-align: center; }

@media (max-width: 480px) {
  body { padding: 16px 12px; place-items: start center; }
  main { padding: 24px 20px; }
}
