:root {
  --bg: #f4f4f6;
  --card: #fff;
  --text: #1d1f21;
  --muted: #5b6064;
  --line: #d4d7da;
  --error: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191b;
    --card: #222528;
    --text: #e8eaec;
    --muted: #a2a8ad;
    --line: #3a3f43;
    --error: #f2b8b5;
  }
}
* {
  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",
    sans-serif;
}
main {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: 14px;
  border-top: 6px solid var(--brand);
  padding: 28px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}
.logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  margin-bottom: 12px;
  object-fit: contain;
}
h1 {
  margin: 0 0 20px;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  h1 {
    color: var(--text);
  }
}
label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}
input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  margin-bottom: 12px;
}
input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
#code {
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
  font-family: ui-monospace, Menlo, monospace;
}
button {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
}
button:disabled {
  opacity: 0.6;
  cursor: progress;
}
button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
button.link {
  background: none;
  color: var(--muted);
  font-weight: 400;
  text-decoration: underline;
  padding: 4px;
}
.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0;
}
#msg {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: var(--error);
  font-size: 0.92rem;
}
ul {
  padding-left: 1.2em;
}
h2 {
  font-size: 1.05rem;
  margin: 24px 0 4px;
}
.or {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0;
}
/* Com o código pedido, as outras formas de entrar saem da frente. */
#f-code:not([hidden]) ~ .alt {
  display: none;
}
ul.passkeys {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
}
ul.passkeys li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
ul.passkeys small {
  display: block;
  color: var(--muted);
}
ul.passkeys button.link {
  width: auto;
  margin: 0;
}
footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
footer p {
  margin: 4px 0;
}
footer a {
  color: inherit;
}
