@font-face {
  font-family: "DM Sans"; src: url("/static/dmsans.woff2") format("woff2");
  font-weight: 100 1000; font-style: normal; font-display: swap;
}
:root {
  --fundo: #16305a; --text: #13204a; --muted: #6f7790; --line: #c9cfdc;
  --navy: #14306a; --navy-2: #1c4386; --erro: #c0262d; --ok: #17803d;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 32px;
  background: var(--fundo); color: var(--text);
  font: 14px/1.5 "DM Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* cartão dividido: formulário | ilustração */
.moldura {
  width: 100%; max-width: 1180px; min-height: min(720px, calc(100dvh - 64px));
  display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
}
.lado-form { display: grid; place-items: center; padding: 48px 32px; }
.caixa { width: 100%; max-width: 300px; }
.lado-arte { position: relative; background: #f7a25e; }
.lado-arte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

.logo { display: block; width: 100%; max-width: 168px; height: auto; margin: 0 auto 40px; }

p { margin: 0 0 20px; color: var(--muted); text-align: center; }
p strong { color: var(--text); font-weight: 600; }
form { display: grid; gap: 20px; margin: 0; }

/* campo com rótulo sobre a borda */
.campo { position: relative; display: block; }
.campo span {
  position: absolute; top: -8px; left: 10px; padding: 0 5px;
  background: #fff; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text); pointer-events: none;
}
input {
  width: 100%; height: 42px; padding: 0 14px; font: inherit; font-size: 14px; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: #aab2c4; }
input:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28, 67, 134, .14); }
.campo:focus-within span { color: var(--navy-2); }
input.codigo { height: 52px; font-size: 24px; font-weight: 600; letter-spacing: .45em; text-align: center; padding-left: calc(14px + .45em); }

.esqueci { justify-self: end; margin-top: -12px; font-size: 12px; color: var(--muted); text-decoration: none; }
.esqueci:hover { color: var(--navy-2); text-decoration: underline; }

button, .botao {
  display: block; width: 100%; height: 42px; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 600;
  line-height: 42px; letter-spacing: .01em; color: #fff; background: var(--navy); border: 0; border-radius: 8px; cursor: pointer;
  text-align: center; text-decoration: none; transition: background .15s, transform .05s;
}
button:hover, .botao:hover { background: var(--navy-2); }
button:active { transform: translateY(1px); }
button.secundario { color: var(--navy); background: #fff; border: 1px solid var(--line); }
button.secundario:hover { background: #f4f6fa; }
.acoes { display: grid; gap: 12px; }
.acoes button { margin: 0; }
.alerta { margin: -8px 0 18px; font-size: 13px; }
.alerta.erro { color: var(--erro); }
.alerta.ok { color: var(--ok); }
.link { margin: 22px 0 0; font-size: 12.5px; }
.link a { color: var(--muted); text-decoration: none; }
.link a:hover { color: var(--navy-2); }

/* tablet: imagem mais estreita */
@media (max-width: 1000px) {
  .moldura { grid-template-columns: 1.1fr .9fr; }
}
/* celular: imagem vira faixa no topo, formulário embaixo */
@media (max-width: 760px) {
  body { padding: 0; place-items: stretch; background: #fff; }
  .moldura { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .lado-arte { order: -1; height: 30vh; min-height: 170px; }
  .lado-arte img { object-position: center 42%; }
  .lado-form { place-items: start center; padding: 32px 20px 40px; }
  .logo { max-width: 150px; margin-bottom: 30px; }
  input { font-size: 16px; } /* evita zoom automático no iPhone */
}
