

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.nav-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--glass-bg); border: none;
  color: var(--text); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); text-decoration: none; transition: background .2s;
}
.nav-back:hover { background: var(--glass-hover); }

.login-topbar {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.login-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .15s, background .15s;
}

.login-back:hover {
  color: var(--text);
  background: var(--s2);
}

.login-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px 32px;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
}

.logo {
  display: block;
  width: auto;
  max-width: 220px;
  height: auto;
  margin: 0 auto 4px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px;
  display: none;
}

.card.active {
  display: block;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .5px;
  font-weight: 600;
}

.field input {
  width: 100%;
  box-sizing: border-box;
  background: var(--s2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}

.field input:focus-visible {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--accent-10);
}

.field input.error {
  border-color: var(--danger);
}

.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 4px;
  font-family: inherit;
}

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.codigo-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.codigo-grid input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  background: var(--s2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}

.codigo-grid input:focus-visible {
  border-color: var(--red);
}

.codigo-grid input.error {
  border-color: var(--danger);
}

.link-btn {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: none;
  font-weight: 400;
  font-family: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-row {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.msg-erro {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
  min-height: 20px;
  font-weight: 500;
  text-align: center;
}

.msg-ok {
  color: var(--green);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

.voltar {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 20px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.voltar:hover {
  color: var(--text);
}

.step {
  display: none;
}

.step.active {
  display: block;
}
