/* Portal de assinatura (abre no celular do locatário) */
body.portal { background: var(--asfalto); min-height: 100vh; display: flex; flex-direction: column; }
#portal { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 16px 8px; }
.portal-topo { display: flex; justify-content: center; padding: 12px 0 18px; }
.portal-logo { max-height: 52px; max-width: 220px; object-fit: contain; background: #fff; padding: 6px 10px; border-radius: 10px; }
.portal-empresa { color: #fff; font-size: 20px; font-weight: 800; }
.portal-cartao {
  background: var(--superficie); border-radius: 18px; padding: 22px 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 12px;
}
.portal-cartao h1 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.portal-cartao h2 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.portal-ola { margin: 0; color: var(--texto-2); }
.portal-sub { margin: -6px 0 0; color: var(--texto-2); }
.portal-rodape { text-align: center; color: #6c7891; font-size: 12px; padding: 16px; }

.passos { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: p; }
.passos li {
  counter-increment: p; font-size: 12px; font-weight: 700; color: var(--texto-3); text-align: center;
  padding-top: 8px; border-top: 4px solid var(--borda); border-radius: 2px;
}
.passos li.ativo { color: var(--texto); border-top-color: var(--faixa); }
.passos li.feito { color: var(--verde); border-top-color: var(--verde); }

.passo { display: flex; flex-direction: column; gap: 12px; }
.passo[hidden] { display: none; }
.contrato-texto {
  white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-height: 52vh; overflow-y: auto;
  border: 1px solid var(--borda); border-radius: 12px; padding: 14px; background: #fbfbfc;
  -webkit-overflow-scrolling: touch;
}
.contrato-texto:focus { outline: 2px solid var(--faixa); }
.dica { margin: 0; font-size: 13px; color: var(--texto-3); }
.dica[hidden] { display: none; }
.linha-btns { display: flex; gap: 10px; }
.linha-btns .btn { flex: 1; height: 46px; }
.passo .check { font-size: 15px; color: var(--texto); }

.camera {
  position: relative; aspect-ratio: 3 / 4; max-height: 56vh; margin: 0 auto; width: 100%;
  border-radius: 16px; overflow: hidden; background: #0d1420; display: grid; place-items: center;
}
.camera::before { content: '🙂'; font-size: 64px; opacity: .25; position: absolute; }
.camera.ligada::before, .camera.com-foto::before { display: none; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.camera video { transform: scaleX(-1); }
.camera video[hidden], .camera img[hidden] { display: none; }
.camera-moldura {
  position: absolute; inset: 14% 20% 22%; border: 3px dashed rgba(255, 255, 255, .55);
  border-radius: 50%; pointer-events: none; display: none;
}
.camera.ligada .camera-moldura { display: block; }
.alt-arquivo { height: 42px; }

.resumo-ass { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--fundo); }
.resumo-ass img { width: 72px; height: 96px; object-fit: cover; border-radius: 10px; }
.resumo-ass div { display: flex; flex-direction: column; gap: 2px; }
.resumo-ass span { color: var(--texto-2); font-variant-numeric: tabular-nums; }
.termo { font-size: 13px; color: var(--texto-2); line-height: 1.55; margin: 0; }

.portal-msg { text-align: center; align-items: center; padding: 36px 22px; margin-top: 24px; }
.portal-topo + .portal-msg { margin-top: 0; }
.portal-msg p { color: var(--texto-2); line-height: 1.55; margin: 0; }
.portal-msg-icone {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-size: 32px; font-weight: 800; color: #fff; background: var(--vermelho);
}
.portal-msg-ok .portal-msg-icone { background: var(--verde); }
.comprovante {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; width: 100%;
  background: var(--fundo); border-radius: 12px; padding: 14px; margin: 8px 0 0; font-size: 13px;
}
.comprovante dt { color: var(--texto-3); font-weight: 700; }
.comprovante dd { margin: 0; min-width: 0; overflow-wrap: anywhere; word-break: break-all; }

/* Página do locatário */
.portal-cartao + .portal-cartao { margin-top: 14px; }
.cli-resumo { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px; background: var(--fundo); }
.cli-resumo span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); }
.cli-resumo strong { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cli-resumo small { color: var(--texto-2); }
.cli-alerta { background: var(--vermelho-bg); }
.cli-alerta strong { color: var(--vermelho); }
.cli-ok { background: var(--verde-bg); }
.cli-ok strong { color: var(--verde); }
.cli-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cli-lista > li { border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cli-lista small { color: var(--texto-2); }
.cli-cob-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cli-cob-topo b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cli-vencida { border-color: var(--vermelho-borda); }
.cli-vencida small { color: var(--vermelho); font-weight: 600; }
.cli-hoje small { color: var(--laranja); font-weight: 600; }
.cli-paga { opacity: .85; }
.cli-contrato details { margin-top: 4px; }
.cli-contrato summary, .portal-cartao summary { cursor: pointer; color: var(--acento-forte); font-weight: 600; }
.cli-contrato .contrato-texto { margin-top: 8px; max-height: 40vh; }
.cli-hash { display: block; margin-top: 6px; overflow-wrap: anywhere; font-size: 11px; }
.cli-sum { display: inline; font-size: 17px; color: var(--texto); }
.cli-contato { margin-top: 16px; height: 48px; }

/* Área do investidor */
.inv-conta { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 14px; }
.inv-conta dt { color: var(--texto-2); }
.inv-conta dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.inv-conta .inv-total { font-weight: 800; color: var(--texto); border-top: 1px solid var(--borda); padding-top: 6px; }
.inv-mapa { height: 260px; border-radius: 12px; overflow: hidden; }
.inv-mapa[hidden] { display: none; }
.inv-tip { font-weight: 700; font-size: 11px; }

/* Página de reservas (vitrine) */
body.vitrine #portal { max-width: 1040px; }
.vt-topo { padding-bottom: 8px; }
.vt-hero { color: #fff; text-align: center; padding: 8px 4px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.vt-hero h1 { font-size: clamp(24px, 5vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; max-width: 720px; margin: 0; }
.vt-hero > p { color: #c4cdda; max-width: 620px; margin: 0; line-height: 1.55; }
.vt-local { font-size: 14px; color: #9aa6b8 !important; }
.vt-passos { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vt-passos li { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  padding: 7px 12px 7px 7px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #e6ebf2; }
.vt-passos b { width: 22px; height: 22px; border-radius: 50%; background: var(--faixa); color: #fff; display: grid; place-items: center; font-size: 12px; }
.vt-filtros { justify-content: center; margin-bottom: 14px; }
.vt-filtros .pilula { background: rgba(255,255,255,.08); color: #dfe5ee; border-color: rgba(255,255,255,.14); }
.vt-filtros .pilula.ativa { background: #fff; color: var(--asfalto); }
.vt-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.vt-card { background: var(--superficie); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.vt-foto { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: linear-gradient(135deg, #e9eef4, #d8e1ea); color: #8796aa; }
.vt-foto.vt-moto { background: linear-gradient(135deg, #e6f3f2, #cfe6e4); color: #4a8f8b; }
.vt-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vt-foto svg { width: 46%; }
.vt-selo { position: absolute; top: 10px; left: 10px; background: rgba(17,28,45,.82); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.vt-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.vt-info h3 { font-size: 17px; font-weight: 800; margin: 0; }
.vt-meta { margin: 0; font-size: 13px; color: var(--texto-2); }
.vt-desc { margin: 4px 0 0; font-size: 13px; color: var(--texto-2); line-height: 1.45; }
.vt-preco { margin-top: 8px; display: flex; align-items: baseline; gap: 2px; }
.vt-preco strong { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vt-preco span { color: var(--texto-2); font-weight: 600; }
.vt-quero { margin-top: auto; height: 46px; }
.vt-espaco { flex: 1; min-height: 12px; }
.vt-vazio, .vt-espera, .vt-req { margin-top: 14px; }
.vt-vazio p, .vt-espera p, .vt-req p { margin: 0; color: var(--texto-2); line-height: 1.55; }
.vt-espera { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vt-espera .btn { height: 44px; }
body.vitrine .portal-cartao:has(#vt-form) { max-width: 640px; margin: 0 auto; width: 100%; }
body.vitrine .portal-msg { max-width: 640px; margin-left: auto; margin-right: auto; }
.vt-voltar { align-self: flex-start; background: none; border: 0; color: var(--acento-forte); font-weight: 700; font-size: 14px; padding: 4px 0; cursor: pointer; }
.vt-escolhido { display: flex; gap: 12px; align-items: center; background: var(--fundo); border-radius: 12px; padding: 10px 12px; }
.vt-escolhido div { display: flex; flex-direction: column; }
.vt-escolhido small { color: var(--texto-2); }
.vt-mini { width: 54px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: #dfe6ee; color: #66768c; }
.vt-mini.vt-moto { background: #d5ebe9; color: #3f8581; }
.vt-mini svg { width: 40px; }
.vt-seguir { height: 48px; margin-top: 4px; }
.vt-apps { border: 0; padding: 0; margin: 0; }
.vt-apps legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.vt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.vt-chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--borda); font-size: 14px; font-weight: 600; cursor: pointer; }
.vt-chip input:checked + span { background: var(--asfalto); border-color: var(--asfalto); color: #fff; }
.vt-chip input:focus-visible + span { outline: 2px solid var(--faixa); outline-offset: 2px; }
.vt-foto-campo { display: flex; gap: 14px; align-items: center; border: 1px dashed var(--borda); border-radius: 14px; padding: 12px; }
.vt-foto-campo.tem { border-style: solid; border-color: var(--verde); }
.vt-foto-campo.enviando { opacity: .55; pointer-events: none; }
.vt-foto-campo > div:last-child { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.vt-foto-campo small { color: var(--texto-2); font-size: 13px; line-height: 1.4; }
.vt-foto-campo .btn { margin-top: 4px; height: 38px; }
.vt-foto-prev { width: 84px; height: 84px; flex: none; border-radius: 12px; overflow: hidden; background: var(--fundo); display: grid; place-items: center; font-size: 28px; }
.vt-foto-prev img { width: 100%; height: 100%; object-fit: cover; }
.vt-fotos-conf { display: flex; gap: 8px; }
.vt-fotos-conf img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.vt-aceite span { font-size: 13px; line-height: 1.5; color: var(--texto-2); }
.vt-wa { display: inline-flex; height: 48px; padding: 0 20px; align-items: center; }
@media (max-width: 520px) {
  .vt-grade { grid-template-columns: 1fr; }
  .vt-espera .btn { width: 100%; }
}
.vt-datas [hidden] { display: none; }
.vt-total { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; background: var(--fundo); border-radius: 12px; padding: 12px 14px; }
.vt-total[hidden] { display: none; }
.vt-total span { color: var(--texto-2); }
.vt-total b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vt-total small { grid-column: 1 / -1; color: var(--texto-3); }
