/* =========================================================
   TELA DE LOGIN — entrar.html · JS: js/entrar.js (painel) e js/login-conta.js (formulário)
   Padrão CL Quercus: layout dividido. Marca verde à esquerda, formulário creme à direita.
   Movimento: entrada em cascata ao abrir (rara), prévia em loop lento, folha 3D, relevo derivando.
   Botões: aperto (scale .97), spinner enquanto confere, erro aparece de cima.
   Com "reduzir movimento", fica só a troca de cor e opacidade.
   ========================================================= */
.ent-body { margin: 0; background: #f6f4ec; }
.ent {
  --q-fundo: #0f1f17; --q-verde: #1e3a2b; --q-verde-2: #2a4d3a; --q-ouro: #d4a75a; --q-ouro-esc: #8a6420; --q-creme: #eaf2ec;
  --q-papel: #f6f4ec; --q-papel-2: #ece8db; --q-tinta: #13241b; --q-cinza: #5a6b61; --q-linha: rgba(19, 36, 27, .14); --q-erro: #b42318;
  --e-out: cubic-bezier(0.23, 1, 0.32, 1); --e-io: cubic-bezier(0.77, 0, 0.175, 1);
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, 1fr);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.011em; -webkit-font-smoothing: antialiased; color: var(--q-tinta);
}

/* ---------- lado da marca ---------- */
.ent-lado { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-width: 0;
  padding: clamp(28px, 4vw, 52px); color: var(--q-creme);
  background: radial-gradient(70% 60% at 85% 10%, rgba(212, 167, 90, .16), transparent 60%),
              radial-gradient(80% 70% at 0% 100%, rgba(70, 150, 100, .2), transparent 60%), var(--q-fundo); }
.ent-relevo { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; }
.ent-relevo path { fill: none; stroke: rgba(212, 167, 90, .1); stroke-width: 1.2; }
.ent-relevo path:nth-child(3n) { stroke: rgba(234, 242, 236, .06); }
.ent-relevo g { animation: ent-deriva 38s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes ent-deriva { to { transform: translate(-3%, 2%) rotate(3deg); } }
.ent-topo, .ent-centro, .ent-rodape { position: relative; z-index: 1; }
.ent-logo { width: 190px; height: auto; display: block; }
.ent-centro { display: grid; gap: 28px; max-width: 560px; }
.ent-titulo { margin: 0; font-family: inherit; font-size: clamp(2.1rem, 3.6vw, 3.2rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.02; color: var(--q-creme); }
.ent-titulo .linha { display: block; overflow: hidden; padding-bottom: .06em; }
.ent-titulo .linha > span { display: inline-block; }
.ent-titulo em { font-style: normal; color: var(--q-ouro); }
.ent-texto { margin: -12px 0 0; max-width: 450px; font-size: 1.02rem; line-height: 1.55; color: rgba(234, 242, 236, .7); }
.ent-previa { position: relative; width: min(400px, 100%); }
.ent-janela { position: relative; z-index: 1; padding: 16px; border-radius: 20px; background: rgba(234, 242, 236, .06); border: 1px solid rgba(234, 242, 236, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 4px; }
.ent-jcab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ent-jcab b { display: block; font-size: .95rem; font-weight: 600; }
.ent-jcab small { color: rgba(234, 242, 236, .6); font-size: .76rem; }
.ent-selo { padding: 4px 10px; border-radius: 999px; background: rgba(212, 167, 90, .15); color: var(--q-ouro); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* teologia: estudo do dia + trilhas */
.ent-estudo { display: flex; flex-direction: column; gap: 3px; padding: 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(234, 242, 236, .06); }
.ent-estudo b { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.ent-estudo small { color: rgba(234, 242, 236, .6); font-size: .78rem; }
.ent-tag { align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--q-ouro); }
.ent-trilha { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 7px 4px; font-size: .84rem; }
.ent-barra-p { height: 6px; border-radius: 6px; background: rgba(234, 242, 236, .1); overflow: hidden; }
.ent-barra-p i { display: block; height: 100%; border-radius: 6px; background: var(--q-ouro); transform-origin: left; }
.ent-barra-p .t-a { --fim: .72; animation: ent-enche 12s var(--e-io) infinite; }
.ent-barra-p .t-b { --fim: .45; animation: ent-enche 12s var(--e-io) .5s infinite; background: #8fd1a8; }
.ent-barra-p .t-c { --fim: .3; animation: ent-enche 12s var(--e-io) 1s infinite; background: var(--q-creme); }
@keyframes ent-enche { 0%, 6% { transform: scaleX(.05); } 30%, 88% { transform: scaleX(var(--fim)); } 100% { transform: scaleX(.05); } }
.ent-quiz { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(212, 167, 90, .1); font-size: .82rem; color: rgba(234, 242, 236, .85); }
.ent-quiz svg { width: 18px; height: 18px; fill: none; stroke: var(--q-ouro); stroke-width: 1.8; stroke-linecap: round; }
/* demais áreas: lista que se completa */
.ent-anel { width: 40px; height: 40px; transform: rotate(-90deg); }
.ent-anel circle { fill: none; stroke-width: 4; }
.ent-anel .t { stroke: rgba(234, 242, 236, .12); }
.ent-anel .p { stroke: var(--q-ouro); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: ent-anel 12s var(--e-io) infinite; }
@keyframes ent-anel { 0%, 6% { stroke-dashoffset: 100; } 22% { stroke-dashoffset: 75; } 44% { stroke-dashoffset: 50; } 66%, 90% { stroke-dashoffset: 25; } 100% { stroke-dashoffset: 100; } }
.ent-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 8px; font-size: .86rem; }
.ent-item + .ent-item { border-top: 1px solid rgba(234, 242, 236, .07); }
.ent-item .c { width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid rgba(234, 242, 236, .35); display: grid; place-items: center; }
.ent-item .c svg { width: 11px; height: 11px; fill: none; stroke: var(--q-fundo); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ent-item .n { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-item .n::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1.5px; background: rgba(234, 242, 236, .55); transform: scaleX(0); transform-origin: left; }
.ent-item:nth-child(2) { --d: 0s; } .ent-item:nth-child(3) { --d: 3s; } .ent-item:nth-child(4) { --d: 6s; }
.ent-item:nth-child(-n+4) .c { animation: ent-check 12s var(--d) var(--e-out) infinite; }
.ent-item:nth-child(-n+4) .c svg { animation: ent-check-svg 12s var(--d) var(--e-out) infinite; }
.ent-item:nth-child(-n+4) .n::after { animation: ent-risca 12s var(--d) var(--e-out) infinite; }
@keyframes ent-check { 0%, 8% { background: transparent; border-color: rgba(234, 242, 236, .35); transform: scale(1); } 10% { transform: scale(.85); } 13%, 84% { background: #8fd1a8; border-color: #8fd1a8; transform: scale(1); } 90%, 100% { background: transparent; border-color: rgba(234, 242, 236, .35); } }
@keyframes ent-check-svg { 0%, 10% { opacity: 0; } 13%, 84% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes ent-risca { 0%, 11% { transform: scaleX(0); } 17%, 84% { transform: scaleX(1); } 90%, 100% { transform: scaleX(0); } }
/* folha 3D ao lado da prévia */
.ent-folha3d { position: absolute; z-index: 0; right: -96px; top: 18px; width: 120px; height: 150px; perspective: 800px; pointer-events: none; }
.ent-giro { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--e-out); }
.ent-folha { position: absolute; inset: 0; animation: ent-gira 10s ease-in-out infinite; }
.ent-folha img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .45)); }
@keyframes ent-gira { 0%, 100% { transform: translateY(0) rotateY(-28deg) rotateZ(8deg); } 50% { transform: translateY(-10px) rotateY(22deg) rotateZ(14deg); } }
.ent-rodape { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; color: rgba(234, 242, 236, .62); font-size: .84rem; }
.ent-recurso { display: inline-flex; align-items: center; gap: 8px; }
.ent-recurso svg { width: 17px; height: 17px; fill: none; stroke: var(--q-ouro); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- lado do formulário ---------- */
.ent-form-lado { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; background: var(--q-papel);
  padding: max(20px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) 24px; }
.ent-barra { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ent-voltar { color: var(--q-cinza); text-decoration: none; font-size: .86rem; font-weight: 500; padding: 6px 0; transition: color .15s ease; }
.ent-voltar:hover { color: var(--q-tinta); }
.ent-idioma { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--q-linha); background: transparent; color: var(--q-tinta); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; transition: background-color .15s ease; }
.ent-idioma:hover { background: #fff; }
.ent-meio { flex: 1; display: grid; place-items: center; padding: 28px 0; }
.ent-cartao { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.ent-sobre { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--q-ouro-esc); }
.ent-cartao h1 { margin: -6px 0 0; font-family: inherit; font-size: 2rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; color: var(--q-tinta); }
.ent-sub { margin: -8px 0 0; color: var(--q-cinza); font-size: .95rem; line-height: 1.5; }
.ent-sub:empty { display: none; }
#entrar-acao { min-height: 3.5rem; margin: 4px 0 0; }
.ent.carregando #entrar-acao { min-height: 220px; border-radius: 14px; background: linear-gradient(100deg, rgba(19, 36, 27, .04) 30%, rgba(19, 36, 27, .08) 50%, rgba(19, 36, 27, .04) 70%) 0 0 / 300% 100%; animation: ent-pisca 1.2s linear infinite; }
@keyframes ent-pisca { to { background-position: -150% 0; } }

/* formulário (classes .lg-* de js/login-conta.js) */
.lg-form { display: grid; gap: 14px; }
.lg-campo { display: grid; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--q-tinta); }
.lg-campo > span:first-child, .lg-campo > label { font-size: .84rem; font-weight: 600; color: var(--q-tinta); }
.lg-campo input, .lg-caixa input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--q-linha); background: #fff; color: var(--q-tinta);
  font: inherit; font-size: 1rem; font-weight: 500; box-shadow: 0 1px 2px rgba(19, 36, 27, .04); transition: border-color .15s ease, box-shadow .15s ease; }
.lg-campo input:hover { border-color: rgba(19, 36, 27, .26); }
.lg-campo input:focus-visible { outline: 0; border-color: var(--q-verde); box-shadow: 0 0 0 4px rgba(30, 58, 43, .12); }
.lg-caixa { position: relative; display: flex; align-items: center; }
.lg-caixa input { padding-right: 48px; }
.lg-olho { position: absolute; right: 5px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--q-cinza); cursor: pointer; display: grid; place-items: center; transition: background-color .15s ease, color .15s ease; }
.lg-olho:hover { background: var(--q-papel-2); color: var(--q-tinta); }
.lg-olho svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-caps { font-size: .78rem; font-weight: 600; color: var(--q-ouro-esc); }
.lg-caps[hidden] { display: none; }
.lg-enviar, .lg-google { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; padding: 0 20px; border-radius: 12px;
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform 160ms var(--e-out), background-color .2s ease, box-shadow .2s ease, opacity .2s ease; }
.lg-enviar { border: 0; background: var(--q-verde); color: var(--q-creme); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 8px 20px rgba(30, 58, 43, .22); }
.lg-google { border: 1px solid var(--q-linha); background: #fff; color: #1f1f1f; font-weight: 500; box-shadow: 0 1px 2px rgba(19, 36, 27, .06); }
@media (hover: hover) and (pointer: fine) {
  .lg-enviar:hover:not(:disabled) { background: var(--q-verde-2); }
  .lg-google:hover:not(:disabled) { background: #fbfaf6; border-color: rgba(19, 36, 27, .26); }
}
.lg-enviar:active:not(:disabled), .lg-google:active:not(:disabled), .entrar-sair:active:not(:disabled) { transform: scale(.97); }
.lg-enviar:disabled, .lg-google:disabled { cursor: progress; opacity: .75; }
.lg-enviar:focus-visible, .lg-google:focus-visible, .lg-link:focus-visible, .entrar-sair:focus-visible, .lg-olho:focus-visible, .ent-idioma:focus-visible, .ent-voltar:focus-visible { outline: 2px solid var(--q-verde); outline-offset: 2px; }
/* carregando: o texto some com desfoque e um spinner gira no lugar */
.lg-rot { transition: opacity .2s ease, filter .2s ease; }
.lg-enviar[aria-busy="true"] .lg-rot { opacity: 0; filter: blur(2px); }
.lg-enviar[aria-busy="true"]::after, .lg-google[aria-busy="true"]::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(234, 242, 236, .3); border-top-color: var(--q-creme); animation: ent-spin .6s linear infinite; }
.lg-google[aria-busy="true"]::after { position: static; border-color: rgba(19, 36, 27, .15); border-top-color: var(--q-verde); width: 16px; height: 16px; }
@keyframes ent-spin { to { transform: rotate(360deg); } }
.lg-ou { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--q-cinza); font-size: .78rem; }
.lg-ou::before, .lg-ou::after { content: ""; flex: 1; height: 1px; background: var(--q-linha); }
.lg-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.lg-link { border: 0; background: none; padding: 2px 0; font: inherit; font-size: .88rem; font-weight: 600; color: var(--q-verde); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(30, 58, 43, .25); text-underline-offset: 3px; transition: text-decoration-color .15s ease; }
.lg-link:hover { text-decoration-color: currentColor; }
.lg-texto { margin: 0 0 14px; line-height: 1.55; color: var(--q-cinza); }
.lg-texto b { font-weight: 600; color: var(--q-tinta); overflow-wrap: anywhere; }
.lg-aviso { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: .88rem; line-height: 1.45; background: rgba(30, 58, 43, .07); border: 1px solid rgba(30, 58, 43, .16); color: var(--q-tinta);
  transition: opacity .2s var(--e-out), transform .2s var(--e-out); @starting-style { opacity: 0; transform: translateY(-4px); } }
.lg-aviso.erro { background: rgba(180, 35, 24, .07); border-color: rgba(180, 35, 24, .2); color: var(--q-erro); }
/* já conectado */
.ent-conta { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--q-linha); }
.ent-conta .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: var(--q-verde); color: var(--q-creme); flex: none; }
.ent-conta b { display: block; font-weight: 600; }
.ent-conta small { color: var(--q-cinza); font-size: .84rem; overflow-wrap: anywhere; }
.entrar-botoes { display: grid; gap: 10px; margin-top: 16px; }
.entrar-sair { height: 46px; border-radius: 12px; border: 1px solid var(--q-linha); background: transparent; color: var(--q-tinta); font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer; transition: transform 160ms var(--e-out), background-color .15s ease; }
.entrar-sair:hover { background: #fff; }
.ent-nota { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 0; color: var(--q-cinza); font-size: .78rem; line-height: 1.5; }
.ent-nota svg { width: 16px; height: 16px; flex: none; margin-top: 1px; fill: none; stroke: var(--q-verde); stroke-width: 1.8; }
.ent-nota a { color: var(--q-verde); font-weight: 600; }
.ent-rodape-form { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: .76rem; color: var(--q-cinza); }
.ent-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ent-legal a, .ent-legal button { color: var(--q-cinza); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ent-legal a:hover, .ent-legal button:hover { color: var(--q-tinta); text-decoration: underline; }

/* ---------- entrada (só ao abrir) ---------- */
@keyframes ent-sobe { from { opacity: 0; transform: translateY(10px); } }
@keyframes ent-linha { from { transform: translateY(105%); } }
@keyframes ent-janela { from { opacity: 0; transform: translateY(22px) scale(.97); } }
.ent.entrando .ent-cartao > * { animation: ent-sobe .42s var(--e-out) both; }
.ent.entrando .ent-cartao > :nth-child(2) { animation-delay: 40ms; } .ent.entrando .ent-cartao > :nth-child(3) { animation-delay: 80ms; }
.ent.entrando .ent-cartao > :nth-child(4) { animation-delay: 120ms; } .ent.entrando .ent-cartao > :nth-child(n+5) { animation-delay: 160ms; }
.ent.entrando .ent-titulo .linha > span { animation: ent-linha .7s var(--e-out) both; }
.ent.entrando .ent-titulo .linha:nth-child(2) > span { animation-delay: 80ms; }
.ent.entrando .ent-texto, .ent.entrando .ent-rodape, .ent.entrando .ent-logo { animation: ent-sobe .5s var(--e-out) .18s both; }
.ent.entrando .ent-previa { animation: ent-janela .7s var(--e-out) .22s both; }
/* trocar de tela no formulário (entrar, criar, esqueci) */
#entrar-acao > * { animation: ent-troca .22s var(--e-out); }
@keyframes ent-troca { from { opacity: 0; filter: blur(2px); } }

/* ---------- celular: a marca vira uma faixa no topo ---------- */
@media (max-width: 900px) {
  .ent { grid-template-columns: minmax(0, 1fr); }
  .ent-lado { position: relative; height: auto; gap: 14px; padding: max(20px, env(safe-area-inset-top, 0px)) 20px 26px; }
  .ent-centro { gap: 12px; }
  .ent-titulo { font-size: 1.7rem; }
  .ent-texto { margin: 0; font-size: .92rem; }
  .ent-previa, .ent-rodape { display: none; }
  .ent-logo { width: 150px; }
  .ent-form-lado { min-height: 0; }
  .ent-meio { padding: 16px 0 24px; place-items: start center; }
  .ent-cartao h1 { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ent-relevo g, .ent-folha, .ent-anel .p, .ent-item .c, .ent-item .c svg, .ent-item .n::after, .ent-barra-p i, #entrar-acao > *, .ent.carregando #entrar-acao { animation: none !important; }
  .ent-barra-p i { transform: scaleX(var(--fim)); }
  .ent.entrando * { animation: none !important; }
  .ent-giro { transition: none; }
  .lg-enviar:active:not(:disabled), .lg-google:active:not(:disabled), .entrar-sair:active:not(:disabled) { transform: none; }
}

/* aviso de privacidade nesta tela: fundo sólido da marca (o padrão do site é vidro escuro, que some no creme) */
.ent-body .privacy-banner { background: #0f1f17 !important; border-color: rgba(234, 242, 236, .14) !important; color: #eaf2ec; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.ent-body .privacy-text, .ent-body .privacy-banner h2, .ent-body .privacy-banner strong { color: rgba(234, 242, 236, .82) !important; }
.ent-body .privacy-banner a { color: #d4a75a !important; }
.ent-body .privacy-btn { background: #d4a75a !important; color: #0f1f17 !important; }
.ent-body .privacy-btn.ghost { background: transparent !important; color: #eaf2ec !important; border-color: rgba(234, 242, 236, .25) !important; }
