/* A entrada da área do aluno. Duas colunas no computador: o formulário à esquerda, sobre o papel
   da área, e a vitrine dos módulos à direita, como um painel escuro pousado na página (o desenho da
   AbacatePay e da porta do Campanha365). A tela não rola: o que não couber encolhe pelo `vh`.
   No celular fica só o formulário. */

:root {
  --campo: var(--superficie-alta);
}

/* Depois do :root, que tem o mesmo peso: o papel e o branco da área do aluno (area/css/shell.css) */
[data-theme='light'] {
  --noite: #ebebee;
  --ferro: #fbfbfc;
  --campo: #ffffff;
}

body {
  min-height: 100svh;
}

.tela {
  display: grid;
  min-height: 100svh;
}

@media (min-width: 1024px) {
  .tela {
    grid-template-columns: 1fr 1.08fr;
    height: 100svh;
    min-height: 0;
    padding: clamp(10px, 1.2vw, 16px);
    padding-left: 0;
    overflow: hidden;
  }
}

.coluna {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
}

@media (min-width: 1024px) {
  .coluna {
    padding: clamp(20px, 4vh, 48px) clamp(32px, 4vw, 72px);
  }
}

.miolo {
  display: grid;
  gap: clamp(16px, 2.6vh, 24px);
  width: min(100%, 25rem);
  margin-inline: auto;
}

/* ── A marca, o título e o apoio ficam no eixo; os campos, alinhados à esquerda ── */
.marca {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
  color: var(--giz);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.marca__cauda {
  color: var(--nevoa);
  font-weight: 600;
}

/* O "R" com o ponto em brasa, o mesmo da área */
.marca__r {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--giz);
  color: var(--noite);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.marca__r::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  background: var(--brasa);
}

.estado {
  display: grid;
  gap: clamp(14px, 2.2vh, 20px);
}

.estado[hidden] {
  display: none;
}

.abertura {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: clamp(2px, 1vh, 10px);
  text-align: center;
}

.abertura h1 {
  font-size: clamp(1.6rem, 3.4vh, 2.1rem);
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.abertura p {
  max-width: 34ch;
  color: var(--nevoa);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.abertura b {
  color: var(--giz);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ── O Google é quieto: contorno sobre o papel; o relevo é só do Entrar ── */
.google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: clamp(46px, 6vh, 52px);
  border: 1px solid var(--aco-claro);
  border-radius: 999px;
  background: var(--campo);
  color: var(--giz);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, transform 160ms var(--ease-out);
}

.google:hover {
  border-color: var(--nevoa);
}

.google:active {
  transform: scale(0.98);
}

.ou {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--nevoa);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.ou::before,
.ou::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--aco-claro);
}

.forma {
  display: grid;
  gap: clamp(12px, 2vh, 16px);
}

.campo {
  display: grid;
  gap: 6px;
}

.rotulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

/* O símbolo mora dentro da caixa, e acende em brasa enquanto se escreve */
.caixa {
  position: relative;
  display: block;
}

.simbolo {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--nevoa);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 140ms ease;
}

.caixa:focus-within .simbolo {
  stroke: var(--brasa);
}

/* O campo é mais claro que o papel: é onde se escreve, e a pessoa procura isso primeiro */
.entrada {
  width: 100%;
  min-height: clamp(46px, 6vh, 50px);
  padding: 0 14px 0 44px;
  border: 1px solid var(--aco-claro);
  border-radius: var(--r-control);
  background: var(--campo);
  color: var(--giz);
  font: inherit;
  font-size: 1rem;
  transition: border-color 140ms ease;
}

.entrada::placeholder {
  color: var(--nevoa);
  opacity: 0.7;
}

.entrada:hover {
  border-color: var(--nevoa);
}

.entrada:focus-visible {
  outline: 2px solid var(--brasa);
  outline-offset: 1px;
  border-color: transparent;
  border-radius: var(--r-control);
}

.entrada[aria-invalid='true'] {
  border-color: #d93a1a;
}

.entrada--olho {
  padding-right: 52px;
}

.olho {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--nevoa);
  cursor: pointer;
}

.olho:hover {
  color: var(--giz);
}

.olho svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A regra da senha nova: cinza enquanto falta, verde quando cumpre */
.regra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--nevoa);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.regra::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aco-claro);
  transition: background 160ms ease;
}

.regra.is-ok {
  color: var(--giz);
}

.regra.is-ok::before {
  background: #1f9d55;
}

/* ── A ação: brasa cheia com a sombra da própria cor ── */
.enviar {
  min-height: clamp(48px, 6.2vh, 54px);
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--brasa);
  color: var(--on-brasa);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 108%;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 10px 26px -12px rgb(255 91 31 / 0.75);
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease, opacity 160ms ease;
}

.enviar:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 14px 30px -12px rgb(255 91 31 / 0.9);
}

.enviar:active:not(:disabled) {
  transform: scale(0.98);
}

.enviar:disabled {
  opacity: 0.6;
  cursor: default;
}

.enviar--quieto {
  border: 1px solid var(--aco-claro);
  background: var(--campo);
  color: var(--giz);
  box-shadow: none;
}

.enviar--quieto:hover:not(:disabled) {
  border-color: var(--nevoa);
  box-shadow: none;
}

/* Exceção é link, não botão */
.link-baixo,
.link-forte {
  margin: -10px -6px;
  padding: 10px 6px;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.link-baixo {
  color: var(--nevoa);
  font-size: var(--text-xs);
  font-weight: 500;
}

.link-forte {
  color: var(--giz);
  font-weight: 650;
}

.link-baixo:hover,
.link-forte:hover:not(:disabled) {
  color: var(--brasa-forte);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.link-forte:disabled {
  color: var(--nevoa);
  font-weight: 500;
  cursor: default;
}

.caminho,
.rodape {
  color: var(--nevoa);
  font-size: var(--text-xs);
  text-align: center;
  white-space: nowrap;
}

.rodape {
  margin-top: clamp(4px, 2vh, 20px);
}

.rodape a {
  color: var(--giz);
  font-weight: 650;
  text-decoration: none;
}

.rodape a:hover {
  color: var(--brasa-forte);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* O aviso: erro em vermelho, orientação em neutro */
.aviso {
  padding: 11px 14px;
  border: 1px solid rgb(217 58 26 / 0.35);
  border-radius: var(--r-control);
  background: rgb(217 58 26 / 0.08);
  color: #b42d12;
  font-size: var(--text-xs);
  line-height: 1.45;
}

:root:not([data-theme='light']) .aviso {
  color: #ff9a7a;
}

.aviso.is-info {
  border-color: var(--aco-claro);
  background: var(--campo);
  color: var(--giz);
}

.aviso[hidden] {
  display: none;
}

.selo-envio {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: var(--campo);
  box-shadow: var(--depth-card);
}

.selo-envio svg {
  fill: none;
  stroke: var(--brasa);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.local {
  padding: 11px 14px;
  border: 1px dashed var(--aco-claro);
  border-radius: var(--r-control);
  color: var(--giz);
  font-size: var(--text-xs);
  text-align: center;
  text-decoration: none;
}

.local:hover {
  border-color: var(--brasa);
}

.local[hidden] {
  display: none;
}

/* ── A vitrine: um painel escuro com a rede neural que vira a marca ──
   No celular, uma faixa em cima do formulário; no computador, a coluna da direita. */
.vitrine {
  position: relative;
  order: -1;
  height: clamp(190px, 30vh, 240px);
  margin: 12px 12px 0;
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
  box-shadow: var(--sombra-longa);
}

:root:not([data-theme='light']) .vitrine {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09);
}

@media (min-width: 1024px) {
  .vitrine {
    order: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    border-radius: var(--r-feature);
  }

  /* No escuro, o painel preto sobre a página preta precisa de um fio para existir */
  :root:not([data-theme='light']) .vitrine {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09);
  }
}

/* A rede neural: o canvas ocupa o painel; por trás, um brilho parado em brasa */
.vitrine {
  background:
    radial-gradient(48% 42% at 50% 44%, rgb(255 91 31 / 0.2), transparent 70%),
    radial-gradient(80% 60% at 50% 110%, rgb(255 140 60 / 0.1), transparent 70%),
    #050506;
}

.vitrine__esfera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* O estado do agente, digitado embaixo, com o cursor piscando */
.vitrine__estado {
  position: absolute;
  bottom: clamp(28px, 5vh, 48px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07), inset 0 0 0 1px rgb(255 255 255 / 0.09);
  color: #e8e9ec;
  font-family: var(--mono);
  font-size: 0.8125rem;
  white-space: nowrap;
  transform: translateX(-50%);
}

.vitrine__estado i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brasa);
  box-shadow: 0 0 0 4px rgb(255 91 31 / 0.18);
  animation: pulsar 1.6s ease-in-out infinite;
}

.vitrine__estado b {
  width: 7px;
  height: 15px;
  margin-left: -6px;
  background: #ffc56b;
  animation: piscar-cursor 1s steps(1) infinite;
}

@keyframes pulsar {
  50% {
    box-shadow: 0 0 0 8px rgb(255 91 31 / 0.04);
  }
}

@keyframes piscar-cursor {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vitrine__estado i,
  .vitrine__estado b {
    animation: none;
  }

  .google,
  .enviar {
    transition: none;
  }
}

/* No celular, a etiqueta do estado fica menor e mais perto do pé da faixa */
@media (max-width: 1023px) {
  .vitrine__estado {
    bottom: 14px;
    padding: 7px 14px 7px 11px;
    font-size: 0.75rem;
  }
}
