/* ---------- Login ---------- */
.login-grid {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr);
}

/* Painel da marca: nome da empresa como peça gráfica principal */
.marca {
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklab, var(--brand) 55%, transparent), transparent 60%),
    var(--brand-2);
  color: var(--on-brand-2);
}
.marca .logo { max-height: 48px; }
.marca .logo-text { font-size: var(--fs-xl); }
.marca-centro { align-self: end; padding-bottom: 2rem; min-width: 0; }
.marca-portal { margin: 0 0 .75rem; font-weight: 600; opacity: .8; font-size: var(--fs-lg); }
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  /* --len = maior palavra do nome (definido no JS): o tamanho se ajusta para a palavra caber inteira */
  font-size: min(7.5rem, calc((56vw - 7rem) / (var(--len, 8) * .5)));
  line-height: .88;
  letter-spacing: -0.035em;
  font-stretch: 75%;
  overflow-wrap: break-word;
  hyphens: manual;
  animation: alarga 1.1s var(--ease) both .1s;
}
@keyframes alarga { from { font-stretch: 100%; opacity: 0; transform: translateY(18px); } to { font-stretch: 75%; opacity: 1; transform: none; } }
.slogan { margin: 1.25rem 0 0; max-width: 32ch; font-size: var(--fs-lg); line-height: 1.4; opacity: .85; }

/* Canhotos de carnê decorativos (ecoam o módulo de parcelas) */
.canhotos { display: flex; gap: .75rem; transform: rotate(-6deg) translate(4%, 30%); margin-right: -10%; pointer-events: none; }
.canhotos span {
  flex: 1; height: 110px; border-radius: 12px;
  background: color-mix(in oklab, var(--on-brand-2) 9%, transparent);
  border: 1px dashed color-mix(in oklab, var(--on-brand-2) 30%, transparent);
  -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.canhotos span:nth-child(2) { background: var(--accent); border-color: transparent; }

/* Painel do formulário */
.painel {
  display: flex; flex-direction: column;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: var(--surface);
}
.painel-topo { display: flex; justify-content: space-between; align-items: center; min-height: 42px; }
.painel-topo #menuTema { margin-left: auto; }
.passo { width: 100%; max-width: 400px; margin: auto; display: grid; gap: 1.1rem; padding: 2rem 0; animation: entra .35s var(--ease); }
@keyframes entra { from { opacity: 0; transform: translateX(12px); } }
.passo h1 { font-size: var(--fs-3xl); font-stretch: 90%; }
.passo .sub { margin: -.4rem 0 .4rem; color: var(--muted); }
#cpf { font-size: var(--fs-xl); letter-spacing: .04em; min-height: 60px; font-variant-numeric: tabular-nums; }

.canais { display: grid; gap: .75rem; }
.canal {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .9rem;
  padding: 1rem; border-radius: var(--r-card);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .15s, background-color .15s, transform .12s;
}
.canal:hover { border-color: var(--brand); background: var(--brand-soft); }
.canal:active { transform: scale(.99); }
.canal .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.canal .ic svg { width: 24px; height: 24px; }
.canal strong { display: block; font-size: var(--fs-md); }
.canal small { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.canal .seta { color: var(--muted); }

.otp { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: .5rem; }
.otp input {
  width: 100%; aspect-ratio: 4 / 5; max-height: 72px; text-align: center;
  font: 700 var(--fs-2xl) var(--font-display); font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--line); border-radius: var(--r-field); background: var(--raised); color: var(--ink);
  transition: border-color .15s, background-color .15s, transform .15s;
}
.otp input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent); }
.otp input.cheio { border-color: var(--brand-line); background: var(--surface); }
.otp.erro input { border-color: var(--danger); animation: treme .35s; }
@keyframes treme { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.reenvio { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; }
.rodape { margin: 0; text-align: center; color: var(--muted); font-size: var(--fs-xs); }

@media (max-width: 860px) {
  .login-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .marca { min-height: 34dvh; padding-bottom: 3.5rem; }
  .marca-centro { max-width: none; padding-bottom: 0; }
  .wordmark { font-size: min(4.5rem, calc((100vw - 3rem) / (var(--len, 8) * .5))); }
  .slogan { font-size: var(--fs-md); margin-top: .75rem; }
  .canhotos { display: none; }
  .painel { border-radius: var(--r-sheet) var(--r-sheet) 0 0; margin-top: -1.5rem; position: relative; padding-top: 1rem; }
  .passo { padding: 1rem 0 2rem; margin-top: 0; }
  .passo h1 { font-size: var(--fs-2xl); }
}

.aviso-lgpd { margin: .75rem 0 0; color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.aviso-lgpd a, .rodape a { color: inherit; }
