/* =====================================================================
   Financeiro Fácil — página de entrada
   Painel escuro com a cena do recibo sendo lido e lançado + formulário limpo sobre o fundo creme.
   Sem Bootstrap: só o que a página usa. Medidas da cena em "em" para ela escalar com a altura da tela.
   ===================================================================== */

:root {
  --creme: #ece8de;
  --papel: #fbfaf6;
  --linha: #e2dccd;
  --tinta: #17181c;
  --suave: #6a6559;
  --painel: #14161b;
  --laranja: #ea580c;
  --marca: #f46a13;
  --verde: #16a34a;
  --vermelho: #dc2626;
  --fonte: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--creme); color: var(--tinta); font-family: var(--fonte); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 2px; border-radius: 6px; }

.tela { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 3.5rem); min-height: 100vh; min-height: 100dvh; padding: 14px; }

/* ------------------------------------------------------------ painel escuro */
.palco { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: clamp(1.5rem, 3.4vw, 3.25rem); border-radius: 2.2rem; background: var(--painel); color: #fff; box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.55); }
.palco > * { position: relative; z-index: 1; }
.palco-marca { position: absolute !important; z-index: 0 !important; right: -9%; bottom: -14%; width: 74%; height: auto; opacity: 0.055; pointer-events: none; }
.palco-logo { align-self: flex-start; height: 34px; width: auto; }
.palco-texto { max-width: 33rem; }
.palco-texto h2 { font-size: clamp(2rem, 3.3vw, 3.1rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance; }
/* a pontuação da fonte tem folga lateral grande: encosta no fim da frase */
.p-interr { margin-left: -0.02em; }
.p-ponto { margin-left: -0.085em; }
.palco-texto p { margin-top: 1rem; max-width: 30rem; color: #b9bcc6; font-size: 1.0625rem; line-height: 1.55; }

.fatos { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0; padding: 0; list-style: none; color: #9a9ca6; font-size: 0.875rem; font-weight: 600; }
.fatos li { display: inline-flex; align-items: center; gap: 0.5rem; }
.fatos svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: #c9ccd6; }

/* ------------------------------------------------------------ cena: recibo lido e lançado */
.cena { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; max-width: 38em; margin-inline: auto; font-size: clamp(9px, min(1.55vh, 1.1vw), 17px); }
.cena-quadro { position: relative; width: 27em; height: 27.5em; margin-left: auto; }

.recibo { position: absolute; top: 0; right: 0.5em; width: 17.5em; padding: 1.35em 1.5em 4.9em; border-radius: 0.5em 0.5em 0 0; background: #fffdf8; color: #2a2b30; box-shadow: 0 1.4em 2.6em -1em rgba(0, 0, 0, 0.6); transform: rotate(2deg); transform-origin: 60% 0; font-variant-numeric: tabular-nums; animation: entra 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both; }
.recibo::after { content: ''; position: absolute; left: 0; right: 0; bottom: -0.62em; height: 0.64em; background: linear-gradient(135deg, #fffdf8 50%, transparent 50%) 0 0 / 0.9em 0.64em, linear-gradient(225deg, #fffdf8 50%, transparent 50%) 0 0 / 0.9em 0.64em; background-repeat: repeat-x; }
.recibo-loja { font-size: 1.15em; font-weight: 800; letter-spacing: -0.01em; }
.recibo-data { margin-top: 0.15em; font-size: 0.8em; color: #8a867b; }
.recibo hr { margin: 0.9em 0; border: 0; border-top: 0.12em dashed #cfc9ba; }
.recibo-linha { display: flex; justify-content: space-between; gap: 1em; padding: 0.2em 0.35em; margin: 0 -0.35em; border-radius: 0.25em; font-size: 0.9em; animation: lida 0.7s ease calc(0.95s + var(--i) * 0.13s) both; }
.recibo-linha b { font-weight: 600; }
.recibo-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; font-size: 1.05em; font-weight: 800; }
.recibo-total b { font-size: 1.35em; letter-spacing: -0.02em; }
.recibo-leitor { position: absolute; left: 0; right: 0; top: -2.4em; height: 2.4em; background: linear-gradient(to bottom, transparent, rgba(244, 106, 19, 0.3)); border-bottom: 0.14em solid var(--marca); pointer-events: none; animation: varre 1.15s ease-in-out 0.95s both; }
.carimbo { position: absolute; left: 1.3em; bottom: 1.35em; padding: 0.1em 0.65em; border: 0.2em solid var(--verde); border-radius: 0.4em; color: var(--verde); font-size: 1.25em; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; background: rgba(255, 253, 248, 0.82); transform: rotate(-8deg); animation: carimbar 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) 2.15s both; }

.lancamento { position: absolute; left: 0; bottom: 0; width: 22em; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.85em; padding: 0.95em 1.1em; border-radius: 1.1em; background: var(--papel); border: 1px solid var(--linha); color: var(--tinta); box-shadow: 0 1.6em 2.6em -1.1em rgba(0, 0, 0, 0.65); transform: rotate(-1.5deg); animation: sobe 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 2.8s both; }
.lancamento-ico { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 0.65em; background: #dcf5ea; color: #0f8f63; }
.lancamento-ico svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lancamento-nome { font-size: 0.98em; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.lancamento-meta { margin-top: 0.15em; font-size: 0.78em; color: var(--suave); white-space: nowrap; }
.lancamento-valor { font-size: 1.02em; font-weight: 800; color: var(--vermelho); white-space: nowrap; font-variant-numeric: tabular-nums; }

@keyframes entra { from { opacity: 0; transform: translateY(3em) rotate(0.5deg); } }
@keyframes lida { 0% { background: rgba(244, 106, 19, 0.28); } 100% { background: transparent; } }
@keyframes varre { 0% { top: -2.4em; opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes carimbar { from { opacity: 0; transform: rotate(-8deg) scale(2.6); } }
@keyframes sobe { from { opacity: 0; transform: translateY(1.6em) rotate(-3deg); } }

/* ------------------------------------------------------------ entrada */
.entrada { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem clamp(0rem, 2vw, 2rem); }
.entrada-miolo { width: min(23.5rem, 100%); }
.entrada h1 { font-size: 2.1rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; }
.entrada-sub { margin-top: 0.5rem; color: var(--suave); font-size: 0.9375rem; }

.aviso { display: flex; align-items: flex-start; gap: 0.65rem; margin-top: 1.5rem; padding: 0.8rem 1rem; border-left: 4px solid; border-radius: 0.25rem; font-size: 0.875rem; font-weight: 500; line-height: 1.4; }
.aviso svg { flex: none; width: 1.2rem; height: 1.2rem; margin-top: 0.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aviso.erro { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }
.aviso.ok { background: #e3ddcf; border-color: var(--suave); color: var(--tinta); }

form { margin-top: 1.75rem; }
.campo + .campo { margin-top: 1.1rem; }
.campo label { display: block; margin-bottom: 0.4rem; font-size: 0.8125rem; font-weight: 700; color: #4b4a45; }
.campo-entrada { position: relative; }
.campo input { width: 100%; height: 3rem; padding: 0 1rem; border: 1px solid var(--linha); border-radius: 0.8rem; background: #fff; font-size: 1rem; font-weight: 500; transition: border-color 0.15s, box-shadow 0.15s; }
.campo input::placeholder { color: #8a867b; }
.campo input:focus { outline: none; border-color: #c2410c; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.28); }
.campo input.tem-botao { padding-right: 3.1rem; }
.ver-senha { position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 0.6rem; background: transparent; color: #8a867b; cursor: pointer; }
.ver-senha:hover { background: #f1eee6; color: var(--tinta); }
.ver-senha svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dica { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; color: #a16207; font-size: 0.8125rem; font-weight: 600; }
.dica svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.entrar { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; height: 3.1rem; margin-top: 1.6rem; border: 0; border-radius: 999px; background: var(--tinta); color: #fff; font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.005em; cursor: pointer; box-shadow: 0 10px 28px -18px rgba(70, 55, 20, 0.6); transition: background-color 0.15s, transform 0.1s; }
.entrar:hover { background: #000; }
.entrar:active { transform: scale(0.985); }
.entrar[disabled] { cursor: progress; opacity: 0.9; }
.entrar .giro { width: 1.05rem; height: 1.05rem; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: gira 0.7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.rodape { margin-top: 2.25rem; color: var(--suave); font-size: 0.78rem; }

/* notebooks com pouca altura: painel mais compacto para não rolar a página */
@media (min-width: 901px) and (max-height: 720px) {
  .palco { gap: 0.9rem; padding: 1.5rem 2.25rem; }
  .palco-texto h2 { font-size: 2.1rem; }
  .palco-texto p { margin-top: 0.6rem; font-size: 0.975rem; }
  .palco-logo { height: 30px; }
}

/* ------------------------------------------------------------ celular e telas estreitas */
@media (max-width: 900px) {
  .tela { grid-template-columns: 1fr; gap: 0; padding: 10px; }
  .palco { gap: 1.25rem; padding: 1.35rem 1.35rem 1.6rem; border-radius: 1.7rem; }
  .palco-logo { height: 30px; }
  .palco-texto h2 { font-size: clamp(1.55rem, 6.4vw, 2.1rem); }
  .palco-texto p { margin-top: 0.7rem; font-size: 0.95rem; }
  .palco-marca { width: 90%; right: -22%; bottom: -30%; }
  .cena, .fatos { display: none; }
  .entrada { align-items: stretch; padding: 1.6rem 0.9rem 1.5rem; }
  .entrada-miolo { width: 100%; max-width: 28rem; margin-inline: auto; }
  .entrada h1 { font-size: 1.8rem; }
}

/* quem prefere menos movimento vê a cena já pronta */
@media (prefers-reduced-motion: reduce) {
  .cena *, .cena { animation: none !important; }
  .recibo-leitor { display: none; }
  .entrar .giro { animation-duration: 1.6s; }
}

/* ------------------------------------------------------------ outra via (cadastro) */
.outra-via { margin-top: 1.4rem; color: var(--suave); font-size: 0.875rem; font-weight: 500; text-align: center; }
.outra-via a { color: var(--tinta); font-weight: 700; text-underline-offset: 3px; }
