/* Portal público de imóveis — claro por padrão, escuro conforme o sistema. */
:root {
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #eef2f8; --border: #dde4ee;
  --text: #0c2454; --text-2: #4a5d7c; --muted: #73839c;
  --accent: #1f6fb8; --accent-forte: #0c3c78; --ok: #12814a; --ok-bg: #e3f5eb; --outro: #8a5a00; --outro-bg: #fff3d6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071326; --surface: #0d1d38; --surface-2: #12284a; --border: #1e3a63;
    --text: #eef4fc; --text-2: #b1c3dc; --muted: #7f95b5;
    --accent: #3c9bdb; --accent-forte: #1f6fb8; --ok: #6ee7a0; --ok-bg: rgba(34,197,94,.14); --outro: #fbc75a; --outro-bg: rgba(250,178,25,.14);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; }
a { color: var(--accent); }
h1, h2 { font-family: Montserrat, Inter, sans-serif; line-height: 1.2; }
img { max-width: 100%; display: block; }

.pt-previa { background: #fff3d6; color: #6b4600; text-align: center; font-size: 13px; padding: 8px 16px; border-bottom: 1px solid #f0d58f; }
.pt-previa a { color: #6b4600; font-weight: 600; }
.pt-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.pt-marca { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 16px Montserrat, sans-serif; }
.pt-logo { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font: 700 14px Montserrat, sans-serif;
  background: linear-gradient(135deg, #4890c0, #1f6fb8); flex: none; }
.pt-wrap { max-width: 1160px; margin: 0 auto; padding: 20px 16px 48px; }
.pt-rodape { max-width: 1160px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); }

.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 0;
  border-radius: 10px; padding: 10px 16px; font: 600 14px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.pt-btn:hover { background: var(--accent-forte); }
.pt-btn:disabled { opacity: .6; }
.pt-btn-sec { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.pt-btn-sec:hover { background: var(--border); }

.pt-hero { padding: 20px 0 8px; }
.pt-hero h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 6px; }
.pt-hero p { color: var(--text-2); margin: 0 0 16px; }
.pt-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-filtros input, .pt-filtros select, .pt-form input, .pt-form textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.pt-filtros input { flex: 1 1 260px; }
.pt-cont { color: var(--muted); font-size: 13px; margin: 14px 0 10px; }

.pt-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.pt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; color: var(--text);
  text-decoration: none; display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.pt-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(12,36,84,.12); }
.pt-capa { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.pt-capa img { width: 100%; height: 100%; object-fit: cover; }
.pt-sem-foto { display: grid; place-items: center; height: 100%; font-size: 44px; }
.pt-sem-foto.grande { aspect-ratio: 16 / 10; font-size: 64px; background: var(--surface-2); border-radius: 14px; }
.pt-selo { position: absolute; top: 10px; left: 10px; font: 600 12px Inter, sans-serif; padding: 3px 10px; border-radius: 99px; }
.pt-selo.solto { position: static; display: inline-block; margin: 4px 0 10px; }
.pt-selo.disp { background: var(--ok-bg); color: var(--ok); }
.pt-selo.outro { background: var(--outro-bg); color: var(--outro); }
.pt-card-corpo { padding: 12px 14px 14px; }
.pt-tipo { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pt-card h2 { font-size: 17px; margin: 4px 0; }
.pt-local { color: var(--text-2); margin: 0 0 8px; font-size: 14px; }
.pt-dados { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 13.5px; color: var(--text-2); }
.pt-vazio { color: var(--text-2); }

.pt-voltar { margin: 0 0 12px; }
.pt-voltar a { text-decoration: none; }
.pt-det { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pt-foto { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; background: var(--surface-2); }
.pt-miniaturas { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.pt-miniaturas button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; flex: none; background: none; }
.pt-miniaturas button:focus-visible, .pt-miniaturas button:hover { border-color: var(--accent); }
.pt-miniaturas img { width: 92px; height: 62px; object-fit: cover; }
.pt-info h1 { font-size: clamp(22px, 3.4vw, 30px); margin: 4px 0 6px; }
.pt-ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.pt-ficha div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.pt-ficha dt { color: var(--muted); font-size: 12px; }
.pt-ficha dd { margin: 2px 0 0; font: 700 17px Montserrat, sans-serif; }
.pt-acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.pt-colunas { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.pt-bloco { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.pt-bloco h2 { font-size: 17px; margin: 0 0 8px; }
.pt-texto { white-space: pre-line; margin: 0; color: var(--text-2); }
.pt-plantas { margin: 0; padding-left: 0; list-style: none; line-height: 2; }
.pt-form form { display: flex; flex-direction: column; gap: 10px; }
.pt-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.pt-form .pt-aceite { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 12.5px; }
.pt-perfil { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.pt-perfil legend { padding: 0; margin-bottom: 4px; }
.pt-perfil label { flex-direction: row; align-items: center; gap: 6px; }
.pt-mudo { color: var(--muted); margin: 0 0 10px; font-size: 13.5px; }
.pt-msg { margin: 0; font-size: 13.5px; min-height: 1.2em; }
.pt-oculto { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ajuda "?" e tour (portais) */
.aj { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; padding: 0; border-radius: 50%;
  border: 1px solid var(--accent); background: transparent; color: var(--accent); font: 700 11px/1 Inter, sans-serif; cursor: help; vertical-align: middle; }
.aj:hover, .aj:focus-visible { background: var(--accent); color: #fff; outline: none; }
.aj-pop { position: fixed; z-index: 10000; background: var(--surface); color: var(--text); border: 1px solid var(--accent); border-radius: 10px;
  padding: 9px 12px; font: 400 12.8px/1.45 Inter, sans-serif; box-shadow: 0 8px 24px rgba(12,36,84,.25); pointer-events: none; }
.tour-foco { position: fixed; z-index: 9991; border-radius: 10px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(3,10,24,.5); pointer-events: none; transition: all .2s; }
.tour-veu { position: fixed; inset: 0; z-index: 9990; background: rgba(3,10,24,.5); }
.tour-caixa { position: fixed; z-index: 9992; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--text);
  border: 1px solid var(--accent); border-radius: 14px; padding: 16px 18px; box-shadow: 0 12px 36px rgba(12,36,84,.3); }
.tour-caixa h3 { margin: 0 0 6px; font-size: 16px; }
.tour-caixa p { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.tour-rodape { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tour-rodape .tour-passo { color: var(--muted); font-size: 12px; margin-right: auto; }
.btn-tour { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 8px; padding: 5px 9px; cursor: pointer; font: inherit; font-size: 12.5px; }
.tour-caixa .btn, .tour-caixa .pt-btn { padding: 7px 12px; }
.pt-riscos { flex-wrap: wrap; gap: 6px 14px; }
.pt-riscos label { min-width: 0; flex: 1 1 140px; }
.pt-serv { border-top: 1px solid var(--border); padding: 10px 0; }
.pt-serv summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pt-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.pt-fotos img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.pt-entrar { max-width: 440px; margin: 40px auto; }
.pt-entrar h1 { font-size: 24px; margin: 0 0 6px; }
.pt-form-col { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.pt-form-col input { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.pt-fmenu { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 0 4px; border-bottom: 1px solid var(--border); }
.pt-fmenu a { text-decoration: none; font-weight: 600; }
.pt-fquem { margin-left: auto; color: var(--muted); font-size: 13px; }
.pt-tab form { margin: 0; }
.pt-tab .pt-btn { padding: 5px 10px; font-size: 12.5px; }
.small { font-size: 12.5px; }
.pt-ok { background: var(--ok-bg); color: var(--ok); padding: 10px 14px; border-radius: 10px; }
.pt-erro { background: #fde8e6; color: #9b1c12; padding: 12px 14px; border-radius: 10px; }
.pt-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pt-tab th, .pt-tab td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pt-tab th { color: var(--muted); font-weight: 500; }
.pt-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.pt-st.st-aprovada, .pt-st.st-enviada-ao-financeiro { background: #e3eefc; color: #1f6fb8; }
.pt-st.st-paga { background: var(--ok-bg); color: var(--ok); }
.pt-st.st-recusada { background: #fde8e6; color: #9b1c12; }
.pt-form select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
@media (max-width: 820px) {
  .pt-det, .pt-colunas { grid-template-columns: 1fr; }
}

/* ficha para imprimir / salvar em PDF */
body.ficha { background: #e9edf3; color: #0c2454; }
.ficha-barra { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; color: #4a5d7c; font-size: 13px; flex-wrap: wrap; }
.ficha-folha { background: #fff; width: min(210mm, 100%); margin: 0 auto 24px; padding: 14mm; box-shadow: 0 4px 24px rgba(0,0,0,.12); }
.ficha-cab { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid #1f6fb8; padding-bottom: 10px; margin-bottom: 12px; }
.ficha-cab h1 { margin: 2px 0; font-size: 24px; color: #0c2454; }
.ficha .pt-local, .ficha .pt-texto { color: #42587a; }
.ficha .pt-ficha div { background: #f3f6fb; border-color: #dbe3ef; }
.ficha .pt-ficha dd { color: #0c2454; }
.ficha h2 { font-size: 15px; margin: 14px 0 4px; color: #0c3c78; }
.ficha-fotos { display: grid; gap: 6px; margin-bottom: 10px; }
.ficha-fotos.n2 { grid-template-columns: 1fr 1fr; }
.ficha-fotos.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ficha-fotos.n3 img:first-child { grid-row: 1 / 3; }
.ficha-fotos img { width: 100%; height: 100%; max-height: 90mm; object-fit: cover; border-radius: 6px; }
.ficha-rodape { margin-top: 16px; padding-top: 8px; border-top: 1px solid #dbe3ef; font-size: 11.5px; color: #6d809d; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media print {
  @page { size: A4; margin: 0; }
  body.ficha { background: #fff; }
  .ficha-barra { display: none; }
  .ficha-folha { box-shadow: none; margin: 0; width: auto; }
}

/* portal do cliente: contrato, avisos e dúvidas */
.pt-contrato { border-top: 1px solid var(--border); padding: 12px 0; }
.pt-contrato:first-of-type { border-top: 0; }
.pt-contrato header { margin-bottom: 8px; }
.pt-aviso { border-left: 4px solid #1f6fb8; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.pt-aviso.nv-warn { border-left-color: #c98a00; background: #fff6e0; }
.pt-aviso.nv-crit { border-left-color: #b3261e; background: #fde8e6; }
.pt-aviso.nv-ok { border-left-color: #2e7d32; }
.pt-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pt-linha input[name=obs] { flex: 1 1 220px; }
.pt-btn.sec { background: var(--surface); color: inherit; border: 1px solid var(--border); }
.pt-docs a { margin-right: 6px; }
.pt-duvida { border-top: 1px solid var(--border); padding: 8px 0; }
.pt-duvida summary { cursor: pointer; }
.pt-pergunta { white-space: pre-wrap; }
.pt-resposta { background: var(--ok-bg); border-radius: 8px; padding: 8px 12px; }
.pt-resposta p { white-space: pre-wrap; margin: 4px 0 0; }
.pt-form-col input[type=password] { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.pt-codigo { font: 600 22px/1.2 ui-monospace, Consolas, monospace !important; letter-spacing: 4px; text-transform: uppercase; text-align: center; }
