/* =========================================================
   Ravisign - telas de entrada (login, verificação, recuperação)
   Carregado depois de d2.css e painel.css.
   ========================================================= */

.entrada-corpo { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: var(--d2-bg); }
.entrada-layout {
  display: grid; grid-template-columns: 1.05fr 1fr; width: 100%; max-width: 1280px;
  min-height: min(790px, calc(100svh - 56px));
  background: var(--d2-bg-elevated); border: 1px solid var(--d2-border); border-radius: 24px;
  overflow: hidden; box-shadow: var(--rs-sombra-2);
}

/* ---------------- Apresentação ---------------- */
.entrada-apresentacao { position: relative; display: flex; flex-direction: column; padding: 38px 48px 28px; color: #fff; background: #0e2b2d; overflow: hidden; }
.entrada-apresentacao > * { position: relative; z-index: 1; }
.entrada-cenario { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cenario-aurora { position: absolute; border-radius: 50%; filter: blur(72px); }
.cenario-aurora.um { width: 520px; height: 520px; left: -160px; top: -180px; background: radial-gradient(circle, #15735b, transparent 66%); opacity: .8; animation: cenario-deriva-a 17s ease-in-out infinite alternate; }
.cenario-aurora.dois { width: 620px; height: 620px; right: -220px; bottom: -260px; background: radial-gradient(circle, #0f9d6f, transparent 62%); opacity: .5; animation: cenario-deriva-b 22s ease-in-out infinite alternate; }
.cenario-pontos { position: absolute; inset: 0; background-image: radial-gradient(rgba(214, 245, 232, .16) 1px, transparent 1.4px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse 90% 70% at 78% 12%, #000 0, transparent 70%); mask-image: radial-gradient(ellipse 90% 70% at 78% 12%, #000 0, transparent 70%); }
@keyframes cenario-deriva-a { to { transform: translate(80px, 50px) scale(1.12); } }
@keyframes cenario-deriva-b { to { transform: translate(-70px, -60px) scale(1.08); } }
.entrada-assinatura { display: flex; align-items: center; gap: 12px; font-size: 25px; letter-spacing: -1px; }
.entrada-assinatura b { color: #6ee7b7; }
.entrada-assinatura small { display: block; font-size: 12px; letter-spacing: .03em; color: #b3d2cd; margin-top: 4px; }
.entrada-editorial { padding: 24px 0 4px; }
.entrada-editorial h1 { font-size: clamp(30px, 2.9vw, 41px); font-weight: 600; line-height: 1.14; letter-spacing: -.045em; margin: 0 0 14px; max-width: 470px; }
.entrada-editorial p { color: #c0d6d1; line-height: 1.65; max-width: 400px; font-size: 14.5px; margin: 0; }

/* vitrine: um documento sendo assinado, no lugar de uma ilustração abstrata */
.entrada-vitrine-area { flex: 1; display: flex; align-items: center; padding: 12px 0 20px; }
.entrada-vitrine { position: relative; width: min(100%, 396px); }
.vitrine-documento {
  position: relative; border: 1px solid rgba(163, 217, 197, .17); border-radius: 18px;
  background: linear-gradient(158deg, rgba(23, 57, 56, .9), rgba(11, 34, 35, .96));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 16px 18px 18px;
}
.vitrine-topo { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.vitrine-icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(140deg, #34d399, #0d7a5b); color: #06251f; flex: none; }
.vitrine-icone svg { width: 18px; height: 18px; }
.vitrine-titulo { min-width: 0; }
.vitrine-titulo b { display: block; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.vitrine-titulo span { display: block; margin-top: 2px; font-size: 11px; color: #9fc6bc; }
.vitrine-linhas { display: flex; flex-direction: column; gap: 7px; padding: 14px 0 6px; }
.vitrine-linhas i { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.vitrine-linhas i:nth-child(2) { width: 92%; }
.vitrine-linhas i:nth-child(3) { width: 78%; }
.vitrine-linhas i:nth-child(4) { width: 64%; }
.vitrine-signatarios { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.vitrine-signatario {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px;
  font-size: 12.5px; color: #eafff5; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07);
  opacity: 0; transform: translateY(12px); animation: vitrine-entra .55s cubic-bezier(.2, .7, .3, 1) forwards;
}
.vitrine-signatario:nth-child(1) { animation-delay: .4s; }
.vitrine-signatario:nth-child(2) { animation-delay: 1.2s; }
.vitrine-signatario:nth-child(3) { animation-delay: 2s; }
.vitrine-signatario em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: #baf1d9; background: rgba(16, 185, 129, .16); border: 1px solid rgba(110, 231, 183, .26); }
.vitrine-signatario.pendente em { color: #fde68a; background: rgba(245, 158, 11, .12); border-color: rgba(253, 230, 138, .25); }
.vitrine-rubrica { width: 46px; height: 18px; color: #6ee7b7; flex: none; }
.vitrine-selo {
  position: absolute; bottom: -16px; right: -10px; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 12px; font-size: 11.5px; font-weight: 600; color: #eafff5;
  background: rgba(8, 30, 29, .9); border: 1px solid rgba(110, 231, 183, .3); box-shadow: 0 18px 42px -18px rgba(0, 0, 0, .65);
  opacity: 0; animation: vitrine-entra .6s ease 2.9s forwards, vitrine-flutua 5.5s ease-in-out 4.4s infinite alternate;
}
.vitrine-selo b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #10b981; color: #04211a; font-size: 11px; font-weight: 700; flex: none; }
@keyframes vitrine-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes vitrine-flutua { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .cenario-aurora { animation: none; }
  .vitrine-signatario, .vitrine-selo { animation: none; opacity: 1; transform: none; }
}
.entrada-beneficios { display: flex; flex-wrap: wrap; list-style: none; gap: 8px; padding: 16px 0 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 11px; color: #cfe8e0; }
.entrada-beneficios li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(110, 231, 183, .2); background: rgba(255, 255, 255, .05); }
.entrada-beneficios li::before { content: '\2713'; color: #6ee7b7; }

/* Tema claro: o painel vira menta suave com o mesmo cenário */
html[data-theme="light"] .entrada-apresentacao { color: #0d3129; background: linear-gradient(165deg, #f3faf6, #ddf0e6); border-right: 1px solid rgba(13, 60, 48, .08); }
html[data-theme="light"] .cenario-aurora.um { background: radial-gradient(circle, #96e6c8, transparent 66%); opacity: .55; }
html[data-theme="light"] .cenario-aurora.dois { background: radial-gradient(circle, #63d8ab, transparent 62%); opacity: .35; }
html[data-theme="light"] .cenario-pontos { background-image: radial-gradient(rgba(6, 95, 70, .2) 1px, transparent 1.4px); }
html[data-theme="light"] .entrada-assinatura b { color: #047857; }
html[data-theme="light"] .entrada-assinatura small { color: #517067; }
html[data-theme="light"] .entrada-editorial p { color: #486459; }
html[data-theme="light"] .vitrine-documento { border-color: rgba(6, 95, 70, .13); background: linear-gradient(158deg, #ffffff, #f6fcf9); box-shadow: 0 24px 55px -30px rgba(6, 78, 59, .38), inset 0 1px 0 #fff; }
html[data-theme="light"] .vitrine-topo { border-bottom-color: rgba(13, 60, 48, .09); }
html[data-theme="light"] .vitrine-titulo span { color: #5d7d72; }
html[data-theme="light"] .vitrine-linhas i { background: rgba(13, 60, 48, .09); }
html[data-theme="light"] .vitrine-signatario { color: #16413a; background: rgba(13, 60, 48, .045); border-color: rgba(13, 60, 48, .07); }
html[data-theme="light"] .vitrine-signatario em { color: #067352; background: rgba(16, 185, 129, .1); border-color: rgba(4, 120, 87, .24); }
html[data-theme="light"] .vitrine-signatario.pendente em { color: #92400e; background: rgba(245, 158, 11, .1); border-color: rgba(180, 83, 9, .22); }
html[data-theme="light"] .vitrine-rubrica { color: #059669; }
html[data-theme="light"] .vitrine-selo { color: #0d3d31; background: rgba(255, 255, 255, .95); border-color: rgba(5, 150, 105, .3); box-shadow: 0 16px 38px -18px rgba(6, 78, 59, .42); }
html[data-theme="light"] .entrada-beneficios { border-top-color: rgba(13, 60, 48, .12); color: #3a5c51; }
html[data-theme="light"] .entrada-beneficios li { border-color: rgba(5, 150, 105, .22); background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .entrada-beneficios li::before { color: #059669; }

/* ---------------- Acesso ---------------- */
.entrada-acesso { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; }
.entrada-canto { position: absolute; top: 22px; right: 26px; display: flex; align-items: center; gap: 8px; }
.entrada-caixa { width: 100%; max-width: 400px; }
.entrada-boas-vindas { font-size: 30px; letter-spacing: -.035em; margin: 0 0 8px; }
.entrada-boas-vindas::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; margin-bottom: 20px; background: linear-gradient(90deg, #059669, #6ee7b7); }
.entrada-instrucao { font-size: 14px; color: var(--d2-text-muted); line-height: 1.6; margin: 0 0 28px; }
.entrada-erro { margin-bottom: 16px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; color: var(--d2-st-4); background: rgba(210, 57, 57, .08); border: 1px solid rgba(210, 57, 57, .25); }
.entrada-aviso { margin-bottom: 16px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; color: var(--d2-brand); background: var(--rs-brand-tinta); border: 1px solid var(--rs-brand-borda); }
.entrada-form { display: flex; flex-direction: column; gap: 10px; }
.entrada-form .d2-control { min-height: 48px; font-size: 16px; padding: 10px 12px; border-radius: 9px; background: var(--d2-bg-subtle); }
.entrada-senha-olho { position: relative; }
.entrada-senha-olho .d2-control { padding-right: 38px; }
.entrada-revelar-olho { position: absolute; right: 6px; top: 9px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--d2-text-faint); cursor: pointer; }
.entrada-revelar-olho:hover { color: var(--d2-brand); }
.entrada-revelar-olho svg { width: 18px; height: 18px; }
.entrada-revelar-olho .ico-olho-riscado { display: none; }
.entrada-revelar-olho[aria-pressed="true"] .ico-olho { display: none; }
.entrada-revelar-olho[aria-pressed="true"] .ico-olho-riscado { display: block; }
.entrada-lembrar { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; cursor: pointer; }
.entrada-lembrar input { width: 18px; height: 18px; margin: 0; accent-color: #047857; flex-shrink: 0; }
.entrada-preferencias p { margin: 8px 0 0 27px; font-size: 12px; line-height: 1.5; color: var(--d2-text-muted); }
.entrada-botao { width: 100%; justify-content: center; min-height: 48px; margin-top: 12px; font-size: 14px; font-weight: 600; border-radius: 9px; }
.entrada-esqueci { display: flex; justify-content: flex-end; margin-top: -4px; }
.entrada-esqueci a, .entrada-link, .entrada-voltar { font-size: 12.5px; font-weight: 550; color: var(--d2-brand); text-decoration: none; }
.entrada-esqueci a:hover, .entrada-link:hover, .entrada-voltar:hover { text-decoration: underline; }
.entrada-voltar { display: block; text-align: center; margin-top: 18px; color: var(--d2-text-muted); }
.entrada-reenvio { margin: 0; }
button.entrada-link { width: 100%; padding: 0; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--d2-brand); cursor: pointer; }
.entrada-reenvio + .entrada-voltar { margin-top: 10px; }
.entrada-idiomas { display: flex; justify-content: center; gap: 16px; }
.entrada-idiomas a { font-size: 12px; color: var(--d2-text-faint); text-decoration: none; transition: color .12s; }
.entrada-idiomas a:hover { color: var(--d2-text); }
.entrada-idiomas a.ativo { color: var(--d2-brand); font-weight: 650; }
.entrada-creditos { margin: 18px 0 0; text-align: center; font-size: 11px; letter-spacing: .03em; color: var(--d2-text-muted); opacity: .65; }
.entrada-form .codigo-2fa { font-size: 22px; }

/* botão de tema das telas de entrada (sem usuário logado; escolha no navegador) */
.tema-botao {
  width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--d2-border); border-radius: 10px; cursor: pointer;
  background: var(--d2-bg-elevated); color: var(--d2-text-muted);
  transition: color .18s, border-color .18s, transform .18s;
}
.tema-botao:hover { color: var(--d2-text); border-color: var(--d2-border-strong); transform: translateY(-1px); }
.tema-botao svg { width: 17px; height: 17px; }
.tema-botao .ico-lua { display: none; }
html[data-theme="dark"] .tema-botao .ico-lua { display: block; }
html[data-theme="dark"] .tema-botao .ico-sol { display: none; }

@media (max-width: 1000px) {
  .entrada-apresentacao { padding: 32px; }
  .entrada-acesso { padding: 36px; }
}
@media (max-width: 760px) {
  .entrada-corpo { padding: 16px; }
  .entrada-layout { grid-template-columns: 1fr; border-radius: 18px; min-height: auto; }
  .entrada-apresentacao { padding: 26px; }
  .entrada-editorial { padding: 22px 0 0; }
  .entrada-editorial h1 { font-size: 30px; margin: 16px 0 0; }
  .entrada-editorial p, .entrada-vitrine-area, .entrada-beneficios { display: none; }
  .entrada-acesso { padding: 72px 24px 32px; }
  .entrada-boas-vindas { font-size: 25px; }
  .entrada-boas-vindas::before { margin-bottom: 14px; }
}
@media (max-width: 400px) {
  .entrada-apresentacao { padding: 20px 24px; }
  .entrada-editorial h1 { font-size: 23px; margin-top: 0; }
  .entrada-assinatura small { display: none; }
}
