:root {
  --fundo-1: #f4f6fe;
  --fundo-2: #fbfcff;
  --cartao: #ffffff;
  --tinta: #0f172a;
  --tinta-2: #334155;
  --apagado: #64748b;
  --linha: #dfe4ee;
  --azul: #3b82f6;
  --azul-forte: #2563eb;
  --indigo: #4f46e5;
  --indigo-claro: #eef0ff;
  --escuro: #1e293b;
  --verde: #16a34a;
  --verde-claro: #e8f7ee;
  --vermelho: #dc2626;
  --ambar-fundo: #fffbeb;
  --ambar-linha: #f5d66b;
  --ambar-texto: #8a4b0b;
  --pan: #0b4a94;
  --raio: 20px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(30, 41, 90, .08);
  --topo-h: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: #f3f6ff; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tinta);
  background: linear-gradient(170deg, var(--fundo-1) 0%, var(--fundo-2) 55%, #f3f6ff 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }

[hidden] { display: none !important; }

main { outline: none; }

/* ---------- topo ---------- */
.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--topo-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(247, 249, 255, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(223, 228, 238, .7);
}

.icone-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--tinta);
  cursor: pointer;
}
.icone-btn:active { background: rgba(15, 23, 42, .06); }

.marca {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--tinta);
}
.marca-icone {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #3b82f6 0%, #4f46e5 100%);
  box-shadow: 0 6px 14px rgba(79, 70, 229, .28);
}
.marca-icone-grande {
  width: 60px;
  height: 60px;
  border-radius: 18px;
}
.marca-texto { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }

.selo-teste {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ambar-texto);
  background: var(--ambar-fundo);
  border: 1px solid var(--ambar-linha);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- menu lateral ---------- */
.menu-fundo {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, .38);
  opacity: 0;
  transition: opacity .2s ease;
}
.menu-fundo.aberto { opacity: 1; }

.menu {
  position: fixed;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(300px, 84vw);
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 12px 0 40px rgba(15, 23, 42, .16);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s;
}
.menu.aberto {
  transform: translateX(0);
  visibility: visible;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.menu-cabeca {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 18px 6px;
}

.menu-itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  color: var(--tinta-2);
  text-decoration: none;
}
.menu-item:active { background: #f3f5fa; }
.menu-item.ativo {
  color: var(--indigo);
  background: var(--indigo-claro);
}
.menu-item.ativo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--indigo);
}
.menu-item-off { color: #9aa4b5; }
.pilula {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--apagado);
  background: #f1f4f9;
  padding: 3px 8px;
  border-radius: 999px;
}

.menu-pe {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 6px 0;
  border-top: 1px solid var(--linha);
}
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, #8b5cf6, #6d28d9);
}
.menu-usuario { display: grid; min-width: 0; }
.menu-usuario strong { font-size: 14px; }
.menu-usuario small { font-size: 12px; color: var(--apagado); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-sair {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--apagado);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 6px;
  cursor: pointer;
}

/* ---------- telas ---------- */
.tela {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 16px calc(40px + env(safe-area-inset-bottom));
  animation: entra .28s ease both;
}
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.titulo {
  margin: 4px 0 6px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
}
.subtitulo {
  margin: 0 0 20px;
  color: var(--apagado);
  font-size: 15px;
  line-height: 1.5;
}

.cartao {
  background: var(--cartao);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 22px 18px 20px;
}
.cartao-titulo { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.cartao-sub { margin: 0 0 18px; color: var(--apagado); font-size: 14px; }

/* ---------- campos ---------- */
.campo { margin-bottom: 16px; }
.campo label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--tinta-2);
}
.obrig { color: var(--vermelho); margin-left: 2px; }

.entrada { position: relative; display: flex; align-items: center; }
.entrada-icone {
  position: absolute;
  left: 14px;
  color: #8a94a6;
  pointer-events: none;
}
.entrada input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 46px;
  font-size: 16px;
  border: 1.5px solid var(--linha);
  border-radius: 14px;
  background: #fbfcfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.entrada-simples input { padding-left: 14px; }
.entrada input::placeholder { color: #a3acbb; }
.entrada input:focus {
  border-color: var(--azul);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .14);
}
.entrada input:disabled { background: #f3f5f9; color: #8a94a6; cursor: not-allowed; }
.campo.com-erro input { border-color: var(--vermelho); box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.campo.com-erro .entrada-icone { color: var(--vermelho); }

.ver-senha {
  position: absolute;
  right: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #8a94a6;
  cursor: pointer;
}
.ver-senha[aria-pressed="true"] { color: var(--azul); }
#login-senha { padding-right: 50px; }

.erro { margin: 6px 2px 0; min-height: 0; font-size: 13px; color: var(--vermelho); font-weight: 500; }
.erro:empty { display: none; }
.ajuda { margin: 6px 2px 0; font-size: 13px; color: var(--apagado); }
.ajuda:empty { display: none; }

/* ---------- botões ---------- */
.botao {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, background .15s, box-shadow .15s;
}
.botao:active { transform: scale(.985); }
.botao-azul {
  margin-top: 6px;
  color: #fff;
  background: var(--azul);
  box-shadow: 0 8px 18px rgba(59, 130, 246, .28);
}
.botao-azul:hover { background: var(--azul-forte); }
.botao-escuro { color: #fff; background: var(--escuro); }
.botao-curto { width: auto; padding: 0 22px; height: 46px; border-radius: 10px; }
.botao:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.link {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--azul-forte);
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- login ---------- */
.tela-login { padding-top: calc(44px + env(safe-area-inset-top)); }
.login-marca { text-align: center; margin-bottom: 22px; }
.login-marca .marca-icone-grande { margin: 0 auto 14px; }
.login-marca h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-marca p { margin: 4px 0 0; color: var(--apagado); font-size: 15px; }

.nota-teste, .nota-lgpd {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 16px 2px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--apagado);
}
.nota-teste svg, .nota-lgpd svg { flex: none; margin-top: 1px; }
.nota-lgpd { justify-content: center; align-items: center; }

/* ---------- resultado ---------- */
.voltar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  color: var(--tinta-2);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  margin-left: -4px;
}

.aviso {
  display: flex;
  gap: 10px;
  margin: 12px 0 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--ambar-fundo);
  border: 1.5px solid var(--ambar-linha);
  color: var(--ambar-texto);
}
.aviso svg { flex: none; margin-top: 1px; }
.aviso p { margin: 0; font-size: 14px; line-height: 1.5; }

.atualizado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--tinta-2);
  font-size: 15px;
}
#hora { font-variant-numeric: tabular-nums; }

.resumo {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  gap: 1px;
  margin: 12px 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--linha);
  border: 1px solid var(--linha);
}
.resumo div { background: #fff; padding: 10px 10px 11px; min-width: 0; }
.resumo dt, .resumo span.r-rot { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: var(--apagado); text-transform: uppercase; }
.resumo strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.banco-cartao {
  background: #fff;
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  overflow: hidden;
  margin-bottom: 16px;
}
.banco-topo {
  height: 112px;
  display: grid;
  place-items: center;
}
.banco-pan { background: var(--pan); }
.logo-pan {
  display: grid;
  justify-items: start;
  color: #fff;
  font-weight: 800;
  font-size: 46px;
  line-height: .9;
  letter-spacing: -.01em;
}
.logo-pan small { font-size: 21px; font-weight: 600; letter-spacing: 0; margin-bottom: 3px; }

.banco-corpo { padding: 18px 20px 20px; }

.status-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.status-ok {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}
.status-ok svg { color: var(--verde); }
.etiqueta-demo {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ambar-texto);
  background: var(--ambar-fundo);
  border: 1px solid var(--ambar-linha);
  padding: 3px 8px;
  border-radius: 999px;
}

.valores { margin: 0; display: grid; }
.valores div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #eef1f6;
}
.valores dt { color: var(--tinta-2); font-size: 16px; }
.valores dd { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.valores .valor-destaque { border-bottom: 0; padding-top: 14px; }
.valores .valor-destaque dt { font-weight: 600; color: var(--tinta); }
.valores .valor-destaque dd { font-size: 24px; font-weight: 800; color: var(--tinta); letter-spacing: -.01em; }

.prazos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.prazo {
  height: 42px;
  border: 1.5px solid var(--linha);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  color: var(--tinta-2);
  cursor: pointer;
}
.prazo[aria-checked="true"] { border-color: var(--azul); background: #eff5ff; color: var(--azul-forte); }

.detalhe { margin: 0; font-size: 13.5px; color: var(--apagado); line-height: 1.5; }
.proximos { margin: 4px 6px 0; font-size: 14px; color: var(--apagado); text-align: center; line-height: 1.5; }

/* ---------- bancos ---------- */
.status-aguardando {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ambar-texto);
  background: var(--ambar-fundo);
  border: 1px solid var(--ambar-linha);
  padding: 6px 11px;
  border-radius: 999px;
}
.ponto { width: 8px; height: 8px; border-radius: 50%; background: #e3a008; }
.ultima { margin: 12px 0 0; font-size: 14px; color: var(--apagado); }
.explica {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fc;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tinta-2);
}

.secao { margin: 26px 4px 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--apagado); }
.bancos-proximos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.banco-mini {
  display: grid;
  gap: 8px;
  padding: 8px 8px 10px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--sombra);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--apagado);
}
.mini-topo {
  height: 58px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  filter: saturate(.75);
  opacity: .85;
}
.banco-bv { background: #5f6dc8; display: flex; align-items: baseline; justify-content: center; gap: 3px; font-size: 22px; }
.banco-bv b { font-size: 11px; font-weight: 600; }
.banco-santander { background: #e30613; font-size: 15px; letter-spacing: -.01em; }
.banco-itau { background: #ec7000; }
.banco-itau i { font-style: normal; background: #1f3c88; color: #ffd400; padding: 6px 8px; border-radius: 7px; font-size: 15px; }

/* ---------- carregando ---------- */
.carregando {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(244, 246, 254, .78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.carregando-caixa {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 30px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--sombra);
  text-align: center;
}
.carregando-caixa strong { font-size: 16px; margin-top: 8px; }
.carregando-caixa small { color: var(--apagado); font-size: 13px; }
.girando {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid #e1e8f8;
  border-top-color: var(--azul);
  animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (min-width: 720px) {
  .tela { padding-top: 40px; }
}
