:root {
  --bg: #000;
  --card: #0d0d0f;
  --line: #ffffff14;
  --text: #f5f5f7;
  --muted: #8e8e93;
  --accent: #ffffff;
  --ok: #30d158;
  --err: #ff453a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 600; letter-spacing: .02em; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; background: #fff; color: #000; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.brand small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
p { margin: 0 0 20px; color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
input {
  width: 100%; font: inherit; color: var(--text); background: #000; border: 1px solid #ffffff26;
  border-radius: 12px; padding: 14px 16px; outline: none; margin-bottom: 18px;
}
input:focus { border-color: #ffffff80; }
input.code { font: 600 24px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
button {
  width: 100%; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; color: #000; background: var(--accent); border: 0;
  border-radius: 12px; padding: 16px; cursor: pointer;
}
button:disabled { opacity: .5; cursor: progress; }
.msg { min-height: 22px; margin: 14px 0 0; font-size: 14px; text-align: center; }
.msg.err { color: var(--err); }
.done { text-align: center; }
.done .check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #000; display: grid; place-items: center; margin: 4px auto 18px; font-size: 28px; font-weight: 800; }
.hint { font-size: 13px; color: var(--muted); margin-top: 14px; }
pre {
  background: #000; border: 1px solid #ffffff26; border-radius: 12px; padding: 14px 16px; margin: 0 0 18px;
  font: 14px/1.4 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-all; color: var(--text);
}
footer { margin-top: 28px; color: var(--muted); font-size: 12px; text-align: center; letter-spacing: .02em; }
footer .lock { display: inline-block; margin-right: 6px; }
.hidden { display: none !important; }

/* Autorize: 6 quadrados */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 4px; }
.otp input {
  width: 100%; aspect-ratio: 1 / 1.15; margin: 0; padding: 0; text-align: center;
  font: 600 28px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
  background: #000; border: 1px solid #ffffff2e; border-radius: 12px; caret-color: #fff;
}
.otp input:focus { border-color: #fff; box-shadow: 0 0 0 3px #ffffff1f; }
.otp.error input { border-color: var(--err); }
.otp.ok input { border-color: var(--ok); }
#form .msg { margin: 10px 0 14px; min-height: 20px; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--muted); }
button.link { width: auto; background: none; color: var(--text); padding: 6px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button.link:disabled { color: var(--muted); text-decoration: none; opacity: 1; cursor: default; }
.terminal-row button { margin-bottom: 18px; }
.done-lead { color: var(--text); font-size: 18px; font-weight: 600; margin: 4px 0 10px; }
@media (max-width: 380px) { .otp { gap: 6px; } .otp input { font-size: 22px; border-radius: 10px; } .card { padding: 22px; } }
