/* =========================================================
   QualCondo — Identidade Visual
   Tom: premium, limpo, confiável, data-driven, sofisticado.
   ========================================================= */

:root {
  /* Cores principais */
  --navy-900: #0A1F3D;   /* azul-marinho profundo (texto/headers) */
  --navy-800: #102A4C;   /* navy principal */
  --navy-700: #1B3A66;   /* navy hover/links */
  --navy-50:  #EEF2F8;   /* navy lavado (fundos sutis) */

  --teal-500: #14B8A6;   /* teal destaque */
  --teal-600: #0E9488;   /* teal hover */
  --teal-50:  #E6FAF7;   /* teal lavado (badges) */

  --white:    #FFFFFF;
  --gray-50:  #F7F9FC;   /* fundo suave da página */
  --gray-100: #EEF2F7;
  --gray-200: #E2E8F0;   /* bordas finas */
  --gray-300: #CBD5E1;
  --gray-500: #64748B;   /* texto secundário */
  --gray-700: #334155;
  --gray-900: #0F172A;

  /* Sintáticos */
  --bg:           var(--gray-50);
  --bg-elev:      var(--white);
  --bg-soft:      var(--navy-50);
  --fg:           var(--navy-900);
  --muted:        var(--gray-500);
  --accent:       var(--teal-500);
  --accent-strong:var(--teal-600);
  --primary:      var(--navy-800);
  --primary-hover:var(--navy-700);
  --border:       var(--gray-200);
  --card:         var(--white);

  /* Tipografia */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;

  /* Sombra premium */
  --shadow-sm: 0 1px 2px rgba(10, 31, 61, 0.05);
  --shadow-md: 0 4px 16px rgba(10, 31, 61, 0.06);
  --shadow-lg: 0 18px 50px rgba(10, 31, 61, 0.10);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--navy-800); }

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.brand__symbol {
  height: 44px;
  width: 44px;
  object-fit: contain;
  display: block;
}
.brand__name {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand__name em {
  font-style: normal;
  color: var(--teal-600);
}
@media (max-width: 600px) {
  .brand__symbol { height: 36px; width: 36px; }
  .brand__name { font-size: 18px; }
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar nav a,
.topbar nav .link {
  color: var(--navy-800);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.topbar nav a:hover,
.topbar nav .link:hover { background: var(--navy-50); color: var(--navy-900); }

.topbar nav a.cta {
  background: var(--navy-800);
  color: var(--white);
  padding: 9px 18px;
  margin-left: 8px;
}
.topbar nav a.cta:hover { background: var(--navy-700); }

/* =========================================================
   Container / utilitários
   ========================================================= */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
}

h1, h2, h3 { color: var(--navy-900); letter-spacing: -0.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }

.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-600);
  margin-bottom: 12px;
}

/* =========================================================
   Botões
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn--primary {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--navy-700); transform: translateY(-1px); }

.btn--accent {
  background: var(--teal-500);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(20, 184, 166, .25);
}
.btn--accent:hover { background: var(--teal-600); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  border: 1px solid var(--gray-200);
}
.btn--ghost:hover { border-color: var(--navy-800); background: var(--white); }

/* =========================================================
   Hero (homepage)
   ========================================================= */
.hero {
  position: relative;
  padding: 84px 0 64px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(20,184,166,.08), transparent 70%),
    radial-gradient(50% 60% at 80% 30%, rgba(16,42,76,.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  margin: 0 auto 20px;
  max-width: 880px;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal-600);
}
.hero p.lead {
  font-size: 18px;
  color: var(--gray-700);
  max-width: 720px;
  margin: 0 auto 32px;
}
.hero__ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__trust {
  margin-top: 38px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.hero__trust span::before { content: '— '; color: var(--gray-300); }

/* =========================================================
   Seção: proposta
   ========================================================= */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
.section--soft { background: var(--white); }
.section--dark {
  background: var(--navy-900);
  color: var(--white);
  border-top: 0;
}
.section--dark h2,
.section--dark h3 { color: var(--white); }
.section--dark .muted { color: rgba(255,255,255,.65); }

.section__head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}
.section__head h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  margin: 0 0 14px;
}
.section__head p {
  color: var(--gray-700);
  font-size: 17px;
  margin: 0;
}
.section--dark .section__head p { color: rgba(255,255,255,.75); }

/* =========================================================
   "Como funciona" — duas colunas
   ========================================================= */
.howto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.howto__col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.howto__col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin: 0 0 6px;
}
.howto__col h3::before {
  content: '';
  width: 8px; height: 28px;
  border-radius: 4px;
  background: var(--teal-500);
}
.howto__col--vendedor h3::before { background: var(--navy-800); }

.howto__sub {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 14px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 14px 0 14px 48px;
  border-bottom: 1px dashed var(--border);
  counter-increment: step;
  color: var(--gray-700);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.howto__col--comprador .steps li::before {
  background: var(--teal-50);
  color: var(--teal-600);
}

/* =========================================================
   Cards genéricos (mantidos p/ outras páginas)
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h2 { margin: 0 0 8px; font-size: 20px; }

/* =========================================================
   Stats (homepage rodapé)
   ========================================================= */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 64px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
}
.stats > div { min-width: 180px; }
.stats > div { text-align: center; }
.stats strong {
  display: block;
  font-size: 36px;
  color: var(--navy-800);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stats span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* =========================================================
   Auth / forms
   ========================================================= */
.auth {
  max-width: 380px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.auth label { display: block; margin: 14px 0 6px; font-weight: 500; font-size: 14px; }
.auth input {
  width: 100%;
  padding: 11px 13px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
}
.auth input:focus { outline: 2px solid var(--teal-500); border-color: transparent; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: 80px;
  background: var(--navy-900);
  color: rgba(255,255,255,.7);
  padding: 40px 32px;
  text-align: center;
  font-size: 14px;
}
.footer strong { color: var(--white); }

/* =========================================================
   Mensagens
   ========================================================= */
.messages { list-style: none; padding: 0; margin-bottom: 16px; }
.messages li {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--teal-50);
  border: 1px solid rgba(20,184,166,.25);
  color: var(--navy-900);
  margin-bottom: 8px;
  font-size: 14px;
}

/* =========================================================
   Page head / breadcrumb (páginas internas)
   ========================================================= */
.page-head h1 { margin: 0 0 4px; }
.breadcrumb { color: var(--muted); margin-bottom: 16px; font-size: 14px; }
.breadcrumb a { color: var(--teal-600); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* =========================================================
   Filtros
   ========================================================= */
.filtros {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.filtros input[type="search"],
.filtros select {
  padding: 11px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
}
.filtros input[type="search"] { flex: 1; min-width: 220px; }
.filtros input[type="search"]:focus,
.filtros select:focus { outline: 2px solid var(--teal-500); border-color: transparent; }

/* =========================================================
   Cards de condomínio (lista)
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.card-cond {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.card-cond:hover {
  transform: translateY(-3px);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
}
.card-cond__img {
  aspect-ratio: 3 / 2;
  background: var(--navy-50);
  overflow: hidden;
}
.card-cond__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cond__placeholder {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.card-cond__body { padding: 14px 18px 18px; }
.card-cond__body h3 { margin: 0 0 8px; font-size: 16px; }

/* =========================================================
   Tags
   ========================================================= */
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--gray-700);
}
.tag--accent {
  background: var(--teal-50);
  border-color: rgba(20,184,166,.3);
  color: var(--teal-600);
  font-weight: 600;
}

/* =========================================================
   Detalhe do condomínio
   ========================================================= */
.cond-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  margin: 16px 0 32px;
}
@media (max-width: 720px) { .cond-head { grid-template-columns: 1fr; } }
.cond-head__capa {
  background: var(--navy-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
}
.cond-head__capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cond-head__capa--vazia {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.cond-head__info h1 { margin: 0 0 8px; font-size: 30px; }

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin-top: 18px;
}
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; }

.cond-text { margin: 0 0 36px; }
.cond-text h3 { margin-top: 22px; }

/* Indicadores de mercado do condomínio (KPIs) — embutidos no header */
.cond-indicadores {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cond-indicadores h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-700);
}
.cond-indicadores h3 small {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.kpi-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 2px;
}
.kpi--positive .kpi-num { color: var(--accent-strong); }
.kpi--neutral .kpi-num { color: var(--gray-600); }

/* Mapa do condomínio (Leaflet — zoom controlado) */
.cond-localizacao { margin: 0 0 36px; }
.cond-localizacao h2 { margin-bottom: 12px; }
.cond-mapa,
#cond-mini-map {
  width: 50% !important;
  max-width: 640px !important;
  height: 360px !important;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .cond-mapa,
  #cond-mini-map { width: 100% !important; max-width: 100% !important; }
}

/* =========================================================
   Galeria
   ========================================================= */
.galeria h2 { margin-top: 36px; }
.galeria h3 {
  margin: 22px 0 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.thumb {
  background: var(--navy-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.thumb:hover img { transform: scale(1.04); }

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 61, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  outline: none;
  animation: lb-fade .12s ease-out;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__figure {
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.lightbox__figure figcaption { text-align: center; color: var(--white); font-size: 14px; }
.lightbox__cat { color: var(--teal-500); font-weight: 600; margin-bottom: 2px; }
.lightbox__legenda { color: var(--white); }
.lightbox__creditos { color: rgba(255,255,255,.6); font-size: 12px; }
.lightbox__pos { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 4px; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  width: 44px; height: 44px;
  font-size: 28px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close { top: 18px; right: 18px; }
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--teal-500); border-color: var(--teal-500); }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 32px; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

/* =========================================================
   Dashboard de scrapers
   ========================================================= */
.alerts {
  border: 1px solid rgba(248, 113, 113, .35);
  background: rgba(248, 113, 113, .08);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0 24px;
}
.alerts ul { margin: 8px 0 0; padding-left: 20px; }
.alert-row { margin: 4px 0; }

table.dash {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
table.dash th,
table.dash td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.dash th {
  background: var(--navy-50);
  font-weight: 700;
  color: var(--navy-800);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
}
table.dash tr:last-child td { border-bottom: 0; }
table.dash tr:hover td { background: var(--gray-50); }

.status-ok       { color: #059669; font-weight: 600; }
.status-falhou   { color: #DC2626; font-weight: 600; }
.status-parcial  { color: #D97706; font-weight: 600; }
.status-em_andamento { color: var(--muted); }

/* =========================================================
   Form do vendedor (analise_vendedor)
   ========================================================= */
.form-hero {
  padding: 64px 0 32px;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
  border-bottom: 1px solid var(--border);
}
.form-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 8px 0 14px;
  max-width: 760px;
}
.form-hero .lead {
  color: var(--gray-700);
  font-size: 16px;
  max-width: 720px;
}

.form-vendedor {
  margin: 32px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fieldset {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px 32px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--teal-500);
}
.fieldset legend {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--teal-600);
  padding: 0 10px;
  margin-left: -10px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 18px;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .grid-form { grid-template-columns: repeat(2, 1fr); }
  .fieldset { padding: 22px 20px 26px; }
}
.field { display: flex; flex-direction: column; grid-column: span 2; }
.field--full { grid-column: 1 / -1; }
.field--xs { grid-column: span 1; }

.field label,
.form-vendedor label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.field .req { color: var(--teal-600); }

.field input,
.field select,
.field textarea,
.form-vendedor input[type="text"],
.form-vendedor input[type="email"],
.form-vendedor input[type="url"],
.form-vendedor input[type="number"],
.form-vendedor select,
.form-vendedor textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus,
.form-vendedor input:focus,
.form-vendedor select:focus,
.form-vendedor textarea:focus {
  outline: 0;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
}

.field .hint, .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.field ul.errorlist,
.form-vendedor ul.errorlist,
.errorlist {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 12px;
  color: #DC2626;
}

.form-errors {
  background: rgba(220, 38, 38, .06);
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 10px;
  padding: 12px 16px;
  color: #B91C1C;
  font-size: 14px;
}

/* Lista de checkboxes */
.checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 14px;
  margin-top: 4px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  transition: background .15s ease, border-color .15s ease;
}
.check:hover { background: var(--navy-50); border-color: var(--gray-300); }
.check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--teal-500);
  cursor: pointer;
}
.check span { font-weight: 500; }

/* Upload de fotos */
.file-input {
  display: block;
  width: 100%;
  padding: 16px;
  margin-top: 12px;
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: 10px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
}
.file-input:hover { border-color: var(--teal-500); background: var(--teal-50); }

/* Disclaimer + CTA */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 24px;
  background: var(--navy-50);
  border-radius: var(--radius-lg);
}
.disclaimer {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.btn--lg { padding: 16px 28px; font-size: 16px; }

/* =========================================================
   Veredicto da análise de imóvel específico
   ========================================================= */
.veredicto-section {
  text-align: center;
  border-top: 6px solid var(--gray-200);
}
.veredicto-section__pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 12px;
}
.veredicto-section__title {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.veredicto-section__numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.veredicto-section__numbers > div {
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 10px;
}
.veredicto-section__numbers span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 4px;
}
.veredicto-section__numbers strong {
  font-size: 18px;
  color: var(--navy-900);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.veredicto-section__text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

/* Cores por veredicto */
.veredicto-section--otima_compra {
  border-top-color: #10B981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), var(--white));
}
.veredicto-section--otima_compra .veredicto-section__title { color: #047857; }
.veredicto-section--otima_compra .veredicto-section__pill {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
}

.veredicto-section--bom_negocio {
  border-top-color: var(--teal-500);
  background: linear-gradient(180deg, var(--teal-50), var(--white));
}
.veredicto-section--bom_negocio .veredicto-section__title { color: var(--teal-600); }
.veredicto-section--bom_negocio .veredicto-section__pill {
  background: var(--teal-50);
  color: var(--teal-600);
  border-color: rgba(20, 184, 166, 0.3);
}

.veredicto-section--justo {
  border-top-color: var(--navy-800);
  background: linear-gradient(180deg, var(--navy-50), var(--white));
}
.veredicto-section--justo .veredicto-section__title { color: var(--navy-800); }

.veredicto-section--levemente_caro {
  border-top-color: #D97706;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.05), var(--white));
}
.veredicto-section--levemente_caro .veredicto-section__title { color: #B45309; }
.veredicto-section--levemente_caro .veredicto-section__pill {
  background: rgba(217, 119, 6, 0.08);
  color: #B45309;
  border-color: rgba(217, 119, 6, 0.3);
}

.veredicto-section--muito_caro {
  border-top-color: #DC2626;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.04), var(--white));
}
.veredicto-section--muito_caro .veredicto-section__title { color: #B91C1C; }
.veredicto-section--muito_caro .veredicto-section__pill {
  background: rgba(220, 38, 38, 0.08);
  color: #B91C1C;
  border-color: rgba(220, 38, 38, 0.3);
}

.veredicto-section--sem_dados {
  border-top-color: var(--gray-300);
}
.veredicto-section--sem_dados .veredicto-section__title { color: var(--muted); }

/* =========================================================
   Bloco "Como entendemos seu perfil" + funil de eliminação
   ========================================================= */
.rel-perfil-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  margin: 0;
  padding: 18px 22px;
  background: var(--navy-50);
  border-left: 4px solid var(--teal-500);
  border-radius: 8px;
}

.rel-section--zero {
  border-top: 4px solid #DC2626;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.04), var(--white));
}
.rel-section--zero .rel-section__title { color: #B91C1C; }

.funil-filtros {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: etapa;
}
.funil-filtros__etapa {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 4px solid var(--teal-500);
  counter-increment: etapa;
}
.funil-filtros__etapa--zero {
  background: rgba(220, 38, 38, 0.06);
  border-left-color: #DC2626;
}
.funil-filtros__count {
  flex-shrink: 0;
  min-width: 64px;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  text-align: right;
}
.funil-filtros__etapa--zero .funil-filtros__count {
  color: #B91C1C;
}
.funil-filtros__detalhe {
  flex: 1;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.45;
}
.funil-filtros__detalhe strong { color: var(--navy-900); }

/* =========================================================
   Página de detalhe do imóvel — /imoveis/<pk>/
   ========================================================= */
.imovel-hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 24px;
}
/* Colapsa o gap excessivo entre hero e primeira seção (galeria) */
.imovel-hero + section.container { padding-top: 12px; }
.imovel-hero + section.container > .rel-section:first-of-type { margin-top: 0; }
.imovel-hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}
.imovel-hero .lead {
  color: var(--gray-700);
  font-size: 16px;
  margin: 0 0 20px;
}
.imovel-hero__price {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.imovel-hero__price small {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
}

.imovel-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.imovel-galeria__item {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--navy-50);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
}
.imovel-galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}
.imovel-galeria__item:hover img {
  transform: scale(1.05);
}

/* Tile "ver mais no anúncio original" — visualmente igual aos outros */
.imovel-galeria__more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--teal-50) 100%);
  border: 1px dashed var(--accent);
  text-decoration: none;
  color: var(--accent-strong);
  transition: background 160ms ease;
}
.imovel-galeria__more:hover {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--navy-50) 100%);
}
.imovel-galeria__more-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}
.imovel-galeria__more-count {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.imovel-galeria__more-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

/* Lightbox de fotos do imóvel — overlay client-side com Alpine */
.imovel-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 24, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 64px;
}
.imovel-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.imovel-lightbox__figure img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.imovel-lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.imovel-lightbox__close,
.imovel-lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
  transition: background 140ms ease;
}
.imovel-lightbox__close:hover,
.imovel-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.imovel-lightbox__close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 28px;
}
.imovel-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 38px;
}
.imovel-lightbox__nav--prev { left: 18px; }
.imovel-lightbox__nav--next { right: 18px; }

@media (max-width: 640px) {
  .imovel-lightbox { padding: 16px; }
  .imovel-lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
  .imovel-lightbox__nav--prev { left: 8px; }
  .imovel-lightbox__nav--next { right: 8px; }
}

/* Lista "Disponível em N imobiliárias" */
.anunciantes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.anunciantes__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.anunciantes__item--canonico {
  background: var(--teal-50);
  border-color: rgba(20, 184, 166, .25);
}
.anunciantes__info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.anunciantes__info strong {
  color: var(--navy-900);
  font-size: 15px;
}
.anunciantes__preco {
  font-weight: 700;
  color: var(--navy-800);
  font-size: 15px;
}
.anunciantes__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 9px;
  background: var(--teal-500);
  color: var(--white);
  border-radius: 999px;
}
.btn--sm { padding: 8px 14px !important; font-size: 13px !important; }

/* =========================================================
   Listagem de imóveis (estilo portal) — /comprar/<pk>/imoveis/
   ========================================================= */
.filtro-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 16px;
  box-shadow: var(--shadow-sm);
}
/* Card cola no texto do hero — sem gap exagerado. */
.page-hero + section.container { padding-top: 0; }
.page-hero { padding-bottom: 8px; }
.page-hero .lead { margin-bottom: 0; }

.filtro-bar__row {
  /* Grid com colunas EXPLICITAS — cada campo ocupa exatamente o que
     precisa. Campos numericos curtos (m², dorms, vagas) sao 72px;
     Tipo eh 1.1fr; precos sao 1fr cada; Condominio leva o resto (2fr);
     Ordenar por eh 1.2fr.
     Total: 4 fixos (~288px) + 5.3fr distribuidos no resto. */
  display: grid;
  grid-template-columns:
    1.1fr   /* Tipo */
    1fr     /* Preço mín */
    1fr     /* Preço máx */
    72px    /* m² mín */
    72px    /* Dorms */
    72px    /* Vagas mín */
    2fr     /* Condomínio */
    1.2fr;  /* Ordenar por */
  gap: 12px 14px;
  align-items: end;
}
/* Mobile / telas estreitas: quebra em 2 linhas (4 cols cada) */
@media (max-width: 980px) {
  .filtro-bar__row {
    grid-template-columns: repeat(4, 1fr);
  }
  .filtro-bar__field--wide { grid-column: span 2; }
}
/* Telas muito pequenas: 2 colunas */
@media (max-width: 560px) {
  .filtro-bar__row {
    grid-template-columns: repeat(2, 1fr);
  }
  .filtro-bar__field--wide { grid-column: span 2; }
}
.filtro-bar__field { display: flex; flex-direction: column; min-width: 0; }
.filtro-bar__field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
  text-align: center;
}
.filtro-bar__field input,
.filtro-bar__field select {
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg);
}
.filtro-bar__field input:focus,
.filtro-bar__field select:focus {
  outline: 0;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,.12);
}
.filtro-bar__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.filtro-bar__actions .btn { padding: 9px 16px; font-size: 14px; }

.lista-meta {
  margin: 16px 0 18px;
  color: var(--gray-700);
  font-size: 14px;
}
.lista-meta strong { color: var(--navy-900); font-size: 16px; }

.lista-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.im-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  text-decoration: none;
  color: inherit;
}
.im-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
}
.im-card--avoid { border-color: rgba(220,38,38,.4); }

.im-card__media {
  aspect-ratio: 4 / 3;
  background: var(--navy-50);
  overflow: hidden;
}
.im-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.im-card__media-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.im-card__score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 12px;
  background: var(--navy-800);
  color: var(--white);
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px rgba(10,31,61,.25);
}
.im-card__score-badge small {
  font-weight: 500;
  font-size: 11px;
  opacity: .7;
}
.im-card--avoid .im-card__score-badge { background: #DC2626; }

.im-card__body { padding: 14px 16px 16px; }
.im-card__type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal-600);
  font-weight: 700;
}
.im-card__title {
  margin: 4px 0 8px;
  font-size: 15px;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.im-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.im-card__meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--gray-700);
}
.im-card__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 32px 0 64px;
  font-size: 14px;
}
.pagination a {
  padding: 8px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--navy-800);
  text-decoration: none;
  background: var(--white);
}
.pagination a:hover { border-color: var(--teal-500); }
.pagination__current { color: var(--muted); }

/* =========================================================
   Relatório do comprador — cards de destaque (carrossel)
   ========================================================= */
.buyer-cards-wrap {
  position: relative;
  margin: 0 -8px;  /* compensa padding interno do carrossel */
}

.buyer-cards {
  display: flex;
  gap: 16px;
  padding: 4px 8px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 8px;
  scroll-behavior: smooth;
  /* Esconder scrollbar mas manter funcional (Chrome/Safari/Edge) */
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.buyer-cards::-webkit-scrollbar { height: 8px; }
.buyer-cards::-webkit-scrollbar-track { background: transparent; }
.buyer-cards::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 999px;
}

.buyer-cards .buyer-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
}

@media (max-width: 600px) {
  .buyer-cards .buyer-card { flex-basis: 280px; }
}

/* Setas de navegação */
.buyer-cards-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--navy-800);
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: opacity .15s ease, transform .1s ease;
}
.buyer-cards-nav:hover { transform: translateY(-50%) scale(1.05); }
.buyer-cards-nav--prev { left: -8px; }
.buyer-cards-nav--next { right: -8px; }
.buyer-cards-nav[disabled] {
  opacity: 0;
  pointer-events: none;
}
.buyer-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--teal-500);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.buyer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.buyer-card > .buyer-card__head,
.buyer-card > .buyer-card__title,
.buyer-card > .buyer-card__price,
.buyer-card > .buyer-card__meta,
.buyer-card > .buyer-card__explanation,
.buyer-card > .buyer-card__scores,
.buyer-card > .buyer-card__bullets {
  margin-left: 22px;
  margin-right: 22px;
}
.buyer-card > .buyer-card__bullets:last-child { margin-bottom: 18px; }

/* Foto no topo do card */
.buyer-card__media {
  aspect-ratio: 16 / 9;
  background: var(--navy-50);
  overflow: hidden;
  margin: 0;
}
.buyer-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.buyer-card__media-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 0 16px;
}
.buyer-card__head { margin-top: 16px; }
.buyer-card--overall { border-top-color: var(--navy-800); }
.buyer-card--family { border-top-color: #14B8A6; }
.buyer-card--value { border-top-color: #0EA5E9; }
.buyer-card--negotiation { border-top-color: #8B5CF6; }
.buyer-card--liquidity { border-top-color: #10B981; }
.buyer-card--avoid {
  border-top-color: #DC2626;
  background: rgba(220, 38, 38, 0.025);
}

.buyer-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.buyer-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}
.buyer-card__pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 999px;
  white-space: nowrap;
}
/* Cores específicas por categoria — mesmo card pode ter várias pills */
.buyer-card__pill--overall { background: var(--navy-50); color: var(--navy-800); }
.buyer-card__pill--family { background: var(--teal-50); color: var(--teal-600); }
.buyer-card__pill--value { background: rgba(14, 165, 233, .12); color: #0369A1; }
.buyer-card__pill--negotiation { background: rgba(139, 92, 246, .12); color: #6D28D9; }
.buyer-card__pill--liquidity { background: rgba(16, 185, 129, .12); color: #047857; }
.buyer-card__pill--avoid { background: rgba(220, 38, 38, .10); color: #B91C1C; }
.buyer-card--avoid .buyer-card__pill,
.buyer-card--avoid-flag .buyer-card__pill { background: rgba(220, 38, 38, 0.1); color: #B91C1C; }

.buyer-card__score {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.buyer-card__score small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.buyer-card__title {
  font-size: 17px;
  margin: 0;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.buyer-card__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-600);
  margin: 0;
  letter-spacing: -0.01em;
}
.buyer-card--avoid .buyer-card__price { color: #B91C1C; }
.buyer-card__meta {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.buyer-card__explanation {
  margin: 4px 0 0;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 10px;
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.55;
}

.buyer-card__scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
  margin: 6px 0;
  padding: 10px;
  background: var(--gray-50);
  border-radius: 8px;
}
.buyer-card__scores div {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
}
.buyer-card__scores span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
}
.buyer-card__scores strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
}

.buyer-card__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.buyer-card__bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--gray-700);
  line-height: 1.45;
}
.buyer-card__bullets--positive li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal-600);
  font-weight: 700;
}
.buyer-card__bullets--warn li::before {
  content: '!';
  position: absolute;
  left: 4px;
  color: #D97706;
  font-weight: 700;
}

/* Tabela comparativa do comprador (mais compacta) */
.rel-table-wrap {
  overflow-x: auto;
}
.buyer-table {
  font-size: 12px;
}
.buyer-table th, .buyer-table td {
  padding: 8px 10px;
  white-space: nowrap;
}
/* Centraliza todas as colunas exceto a primeira (#).
   !important pra bloquear o `.rel-table th { text-align: left }` definido
   mais abaixo no arquivo. */
.rel-table.buyer-table th:not(:first-child),
.rel-table.buyer-table td:not(:first-child) {
  text-align: center !important;
}
.buyer-table tbody tr:nth-child(odd) { background: rgba(238, 242, 248, 0.4); }
.buyer-table tbody tr:hover { background: var(--teal-50); cursor: pointer; }
.buyer-table strong { color: var(--navy-900); }
.buyer-table__link {
  color: var(--navy-800);
  font-weight: 600;
  text-decoration: none;
}
.buyer-table__link:hover { color: var(--teal-600); text-decoration: underline; }
.buyer-table__comment {
  white-space: normal !important;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gray-700);
}

/* Coluna do ícone de comentário — só largura do botão */
.buyer-table__icon-col {
  width: 40px;
  text-align: center !important;
  padding: 8px !important;
}
.buyer-table__info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 140ms ease;
}
.buyer-table__info-btn:hover {
  background: var(--teal-50);
  color: var(--accent-strong);
  border-color: var(--accent);
}

/* Modal do comentário */
.rel-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.rel-modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  padding: 28px 32px 24px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}
.rel-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 50%;
}
.rel-modal__close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}
.rel-modal__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
  padding-right: 32px;
}
.rel-modal__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-700);
  white-space: pre-line;
}

[x-cloak] { display: none !important; }

/* Grid de prioridades do form do comprador */
.prio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 18px;
  margin-top: 8px;
}
.prio-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.prio-row:hover { background: var(--navy-50); }
.prio-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--gray-700) !important;
  margin: 0 !important;
}
.prio-row select {
  padding: 6px 8px !important;
  width: 64px;
  font-weight: 600;
  text-align: center;
}

/* Página de confirmação */
.confirma-card {
  max-width: 640px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.confirma-card__badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--teal-500);
  color: var(--white);
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 184, 166, .3);
}
.confirma-card h1 { font-size: 28px; margin: 0 0 12px; }
.confirma-card .lead { color: var(--gray-700); font-size: 16px; }

.confirma-kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 28px 0;
  text-align: left;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.confirma-kv dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.confirma-kv dd { margin: 0; font-size: 14px; }

/* =========================================================
   Relatório do vendedor (analise_vendedor)
   ========================================================= */
.rel-hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 32px;
}
/* Colapsa a folga grande entre o hero e a primeira section logo abaixo.
   Sem isso somam-se: .rel-hero (32px bottom) + .container (32px top) +
   .rel-section (24px top margin) = ~88px de respiro. */
.rel-hero + section.container { padding-top: 8px; }
.rel-hero + section.container > .rel-section:first-of-type { margin-top: 0; }
.rel-hero h1 {
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}
.rel-hero p.lead {
  color: var(--gray-700);
  max-width: 720px;
  margin: 0 0 16px !important;
  text-align: justify !important;
  hyphens: auto;
  line-height: 1.6;
}
.rel-hero p.lead:last-child { margin-bottom: 0 !important; }

.rel-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.rel-section__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--teal-600);
  font-weight: 700;
  margin: 0 0 18px;
}
.rel-section--final {
  background: var(--navy-900);
  color: var(--white);
  border-color: transparent;
}
.rel-section--final .rel-section__title { color: var(--teal-500); }
p.rel-final-text {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 18px !important;
  text-align: justify !important;
  hyphens: auto;
}
p.rel-final-text:last-child { margin-bottom: 0 !important; }

.rel-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 32px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 24px;
}
.rel-headline__label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 8px;
}
.rel-headline__value {
  font-size: clamp(36px, 5vw, 56px);
  color: var(--navy-900);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rel-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.rel-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.rel-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.rel-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.rel-card strong {
  font-size: 24px;
  color: var(--navy-900);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 4px 0 2px;
}
.rel-card__sub { color: var(--muted); font-size: 13px; }
.rel-card--soft { background: var(--navy-50); border-color: transparent; }
.rel-card--accent {
  background: var(--teal-50);
  border-color: rgba(20,184,166,.3);
}
.rel-card--accent strong { color: var(--teal-600); }

.rel-meta {
  margin: 16px 0 0;
  font-size: 13px;
}

.rel-comparables {
  margin-top: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.rel-comparables summary {
  cursor: pointer;
  color: var(--navy-800);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}
.rel-comparables summary::before {
  content: '▸ ';
  color: var(--teal-500);
  margin-right: 4px;
}
.rel-comparables[open] summary::before { content: '▾ '; }

.rel-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 13px;
}
.rel-table th, .rel-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.rel-table th {
  background: var(--navy-50);
  color: var(--navy-800);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rel-table tr:last-child td { border-bottom: 0; }

.rel-strategies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.rel-strategy {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.rel-strategy--balanced {
  border-color: var(--teal-500);
  border-width: 2px;
  box-shadow: 0 8px 28px rgba(20,184,166,.12);
}
.rel-strategy__pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rel-strategy--balanced .rel-strategy__pill { background: var(--teal-50); color: var(--teal-600); }
.rel-strategy--quick .rel-strategy__pill { background: var(--navy-50); color: var(--navy-800); }
.rel-strategy__price {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}
.rel-strategy p { color: var(--gray-700); margin: 0; font-size: 14px; line-height: 1.55; }
.rel-strategy__badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--teal-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rel-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rel-bullets li {
  position: relative;
  padding: 12px 14px 12px 40px;
  background: var(--gray-50);
  border-radius: 10px;
  color: var(--gray-700);
  line-height: 1.55;
}
.rel-bullets li::before {
  content: '•';
  position: absolute;
  left: 16px;
  color: var(--teal-500);
  font-size: 22px;
  line-height: 1.3;
}
.rel-bullets--positive li { background: var(--teal-50); color: var(--navy-900); }
.rel-bullets--positive li::before { content: '✓'; color: var(--teal-600); font-size: 14px; line-height: 1.5; }
.rel-bullets--warn li { background: rgba(217, 119, 6, 0.07); color: #78350F; }
.rel-bullets--warn li::before { content: '!'; color: #D97706; font-weight: 700; font-size: 16px; line-height: 1.4; }

.rel-empty {
  padding: 24px;
  background: var(--gray-50);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.rel-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.rel-fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.rel-foto-thumb {
  display: block;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--gray-50, #f9fafb);
  aspect-ratio: 4/3;
  transition: transform .15s, box-shadow .15s;
}
.rel-foto-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.rel-foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rel-score {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.rel-score__label {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 600;
}
.rel-score__bar {
  position: relative;
  height: 10px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.rel-score__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-600));
  border-radius: 999px;
  transition: width .3s ease;
}
/* Para "necessidade de reforma": valores altos = ruim, gradiente vai de ok pra alerta */
.rel-score__bar--inverse .rel-score__fill {
  background: linear-gradient(90deg, var(--teal-500) 0%, #FBBF24 60%, #DC2626 100%);
}
.rel-score__value {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.rel-visual-text {
  margin: 12px 0 0;
  padding: 14px 18px;
  background: var(--navy-50);
  border-radius: 10px;
  color: var(--navy-900);
  line-height: 1.6;
  font-size: 15px;
}
.rel-visual-text strong { color: var(--teal-600); }

/* ===== Cabeçalho printável do relatório ===== */
.rel-doc-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.rel-doc-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.rel-doc-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rel-doc-header__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.rel-doc-header__name {
  display: block;
  font-size: 18px;
  color: var(--navy-900);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rel-doc-header__sub {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.rel-doc-header__meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--gray-700);
}
.rel-doc-header__meta div { text-align: right; }
.rel-doc-header__meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ===== Dados informados ===== */
.rel-data {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}
.rel-data dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.rel-data dd {
  margin: 0;
  font-size: 14px;
  color: var(--navy-900);
}

/* ===== Ações (imprimir + anunciar) ===== */
.rel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Pílula "imóvel já publicado" */
.rel-published-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--teal-50);
  color: var(--teal-600);
  border: 1px solid rgba(20,184,166,.3);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* ===== Print: layout limpo pra PDF ===== */
@media print {
  /* Esconde topbar, footer, action buttons e datalists */
  .topbar, .footer, .no-print, .rel-comparables summary { display: none !important; }
  details.rel-comparables[open] summary { display: none !important; }

  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }
  main { margin: 0; }
  .container { max-width: none; padding: 0 16mm; }

  /* Cabeçalho do documento sempre no topo da impressão */
  .rel-doc-header {
    border-bottom: 2px solid var(--navy-900);
    padding: 0 0 12px;
    margin-bottom: 16px;
  }
  .rel-doc-header__inner { padding: 0; }

  /* Hero compacto na impressão */
  .rel-hero { padding: 16px 0 8px; background: white; }
  .rel-hero h1 { font-size: 22pt; margin: 4px 0 6px; }
  .rel-hero .lead { font-size: 11pt; }
  .rel-hero::before { display: none; }

  /* Cada seção do relatório evita quebrar no meio */
  .rel-section {
    box-shadow: none !important;
    border: 1px solid #d0d0d0;
    page-break-inside: avoid;
    padding: 18px 22px;
    margin: 12px 0;
  }
  .rel-section--final {
    background: var(--navy-900) !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Score bars renderizam o gradient na impressão */
  .rel-score__fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rel-card--accent, .rel-card--soft, .rel-strategy--balanced,
  .rel-bullets--positive li, .rel-bullets--warn li,
  .rel-published-pill, .rel-visual-text {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Comparáveis sempre expandidos na impressão */
  .rel-comparables { display: block !important; }
  .rel-comparables[open] table.rel-table,
  .rel-table { display: table !important; }

  .rel-disclaimer {
    page-break-inside: avoid;
    border: 1px solid #d0d0d0;
    background: #f7f7f7 !important;
    color: #333 !important;
  }

  /* Links sem cor de destaque na impressão */
  a { color: black !important; text-decoration: none; }
}
.rel-disclaimer {
  margin: 32px 0 64px;
  padding: 18px 24px;
  background: var(--navy-50);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
}
.rel-disclaimer strong { color: var(--navy-900); }

/* =========================================================
   Cards de imóveis (detalhe condomínio)
   ========================================================= */
.imoveis { margin-top: 36px; }
.card-im {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card-im:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-im__img { aspect-ratio: 3 / 2; background: var(--navy-50); overflow: hidden; }
.card-im__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-im__placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.card-im__body { padding: 14px 16px; }
.card-im__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.01em;
}
.card-im__price small { font-weight: 400; color: var(--muted); }
.card-im__meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* =========================================================
   Wizard multi-step (vendedor + comprador)
   Página dedicada com progress bar, lista de etapas e
   navegação Voltar/Continuar. Alpine.js controla campos
   condicionais dentro de cada step.
   ========================================================= */

.wizard-hero {
  padding: 56px 0 32px;
  background: linear-gradient(180deg, var(--navy-50) 0%, transparent 100%);
}
.wizard-hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
  color: var(--navy-900);
}
.wizard-hero .lead {
  color: var(--gray-700);
  max-width: 720px;
  font-size: 16px;
}

.wizard-shell {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

/* ---------- Cabeçalho: barra + lista de etapas ---------- */
.wizard-header {
  margin-bottom: 28px;
}

.wizard-progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-radius: 999px;
  transition: width 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.wizard-step-counter {
  font-weight: 600;
  color: var(--navy-800);
}
.wizard-progress-pct {
  font-weight: 700;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.wizard-steps {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.wizard-step {
  flex: 1 1 0;
  min-width: 110px;
}
.wizard-step a,
.wizard-step > * {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 180ms ease;
}
.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.wizard-step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-step--done a {
  color: var(--accent-strong);
  background: var(--teal-50);
}
.wizard-step--done a:hover {
  background: #d4f5ef;
}
.wizard-step--done .wizard-step-num {
  background: var(--accent);
  color: var(--white);
}
.wizard-step--done .wizard-step-num::before {
  content: '✓';
  font-size: 14px;
}
.wizard-step--done .wizard-step-num {
  font-size: 0; /* esconde o número, mostra só o check */
}

.wizard-step--active > * {
  background: var(--navy-50);
  color: var(--navy-900);
  border-color: var(--navy-800);
  font-weight: 600;
}
.wizard-step--active .wizard-step-num {
  background: var(--navy-800);
  color: var(--white);
}

.wizard-step--upcoming > * {
  background: transparent;
  border-color: var(--border);
}

/* ---------- Card central com o conteúdo do step ---------- */
.wizard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 40px 32px;
  animation: wizardFadeIn 280ms ease;
}

@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-card-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.wizard-card-header h2 {
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.wizard-card-header .muted {
  font-size: 14px;
  margin: 0;
}

.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wizard-section-intro {
  margin: -8px 0 8px;
  font-size: 14px;
}
.wizard-section-help {
  margin: 0;
  font-size: 13px;
  font-style: italic;
}

.grid-subform {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.grid-subform .field { grid-column: span 2; }
.grid-subform .field--xs { grid-column: span 1; }
.grid-subform .field--full { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .grid-subform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-subform .field { grid-column: span 2; }
  .grid-subform .field--xs { grid-column: span 1; }
}

/* Step Características — grid próprio com slots dedicados pra área (largo)
   e contadores numéricos (estreitos), sem sobrepor labels longos.
   Especificidade reforçada com .caract-step pra sobrepor .field global. */
.caract-step { margin-top: 12px; }
.caract-step .caract-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 12px;
  width: 100%;
}
.caract-step .caract-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.caract-step .caract-grid .field label {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: 0;
}
.caract-step .caract-grid input,
.caract-step .caract-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.caract-step .caract-grid .caract-grid__area { grid-column: span 6; }   /* metade da largura */
.caract-step .caract-grid .caract-grid__num  { grid-column: span 2; }   /* 1/6 da largura */
.caract-step .caract-grid .caract-grid__full { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .caract-step .caract-grid .caract-grid__area { grid-column: span 12; }
  .caract-step .caract-grid .caract-grid__num  { grid-column: span 4; }
}
@media (max-width: 540px) {
  .caract-step .caract-grid .caract-grid__num  { grid-column: span 6; }
}

/* ---------- Pílulas de checkbox (step 4 — diferenciais) ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  transition: all 160ms ease;
  user-select: none;
}
.check-pill:hover {
  border-color: var(--navy-800);
  background: var(--navy-50);
}
.check-pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}
.check-pill:has(input:checked) {
  border-color: var(--accent);
  background: var(--teal-50);
  color: var(--accent-strong);
  font-weight: 600;
}

/* ---------- Step Preferências (vocabulário agrupado) ---------- */
.pref-grupo {
  margin-top: 24px;
}
.pref-grupo:first-child {
  margin-top: 8px;
}
.pref-grupo-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

/* ---------- Dropzone (step 6 — fotos) ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 32px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
}
.dropzone:hover {
  border-color: var(--accent);
  background: var(--teal-50);
}
.dropzone-icon { font-size: 40px; }
.dropzone strong {
  font-size: 16px;
  color: var(--navy-900);
}
.dropzone .muted { font-size: 13px; }
.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.fotos-uploaded {
  background: var(--teal-50);
  border: 1px solid var(--teal-500);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 8px;
}
.fotos-uploaded-title {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}
.fotos-uploaded-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--gray-700);
  max-height: 120px;
  overflow-y: auto;
}
.fotos-uploaded-list li {
  padding: 2px 0;
  font-family: monospace;
  font-size: 12px;
}

/* ---------- Footer com botões Voltar/Continuar ---------- */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.wizard-actions .btn--ghost {
  border-color: var(--border);
  color: var(--gray-700);
}

@media (max-width: 600px) {
  .wizard-card { padding: 24px 20px; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .btn { width: 100%; }
  .wizard-step-label { display: none; }
  .wizard-step { min-width: auto; }
  .wizard-step a,
  .wizard-step > * { padding: 10px; justify-content: center; }
}

/* =========================================================
   Wizard comprador — pílulas 0-5 das 17 prioridades.
   Layout em grid (label à esquerda, pílulas à direita) com
   foco em scan rápido. <select> hidden mantém o valor
   sincronizado pelo Alpine pra o POST funcionar normal.
   ========================================================= */

.prio-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prio-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border);
  transition: background 160ms ease;
}
.prio-row:hover {
  background: var(--gray-50);
}

.prio-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  margin: 0;
}
.prio-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prio-hint {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.35;
}

.prio-select-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.prio-pills {
  display: flex;
  gap: 4px;
}

.prio-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  padding: 0;
}
.prio-pill:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.prio-pill.is-zero { font-size: 16px; }
.prio-pill.is-selected {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}
.prio-pill.is-zero.is-selected {
  background: var(--gray-300);
  color: var(--gray-700);
  border-color: var(--gray-300);
  box-shadow: none;
}

@media (max-width: 600px) {
  .prio-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .prio-pills { justify-content: space-between; }
  .prio-pill { width: 42px; height: 42px; }
}
/* =========================================================
   Header redesenhado: nav principal + CTA "Segunda opinião"
   + dropdown user + menu mobile (Alpine.js x-data no <header>)
   ========================================================= */

.topbar {
  gap: 16px;
  padding: 12px 32px;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 32px;
}
.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 160ms ease, background 160ms ease;
}
.nav-link:hover {
  color: var(--navy-900);
  background: var(--navy-50);
}
.nav-link.is-active {
  color: var(--navy-900);
  font-weight: 600;
}
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-link--quiet {
  color: var(--muted);
  font-size: 13px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CTA destacado "Segunda opinião" — visualmente diferente do nav, sugere ação */
.cta-segunda {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--white) 100%);
  border: 1.5px solid var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 160ms ease;
  white-space: nowrap;
}
.cta-segunda:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(20,184,166,.25);
}
.cta-segunda__icon {
  font-size: 12px;
  line-height: 1;
}

/* User menu dropdown */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--navy-900);
  transition: border-color 160ms ease;
}
.user-trigger:hover { border-color: var(--navy-800); }
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
}
.user-name { font-weight: 500; }
.user-caret { font-size: 10px; color: var(--muted); }
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
}
.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--navy-900);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--navy-50); }

[x-cloak] { display: none !important; }

/* Mobile toggle (hamburger) */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 12px 24px 20px;
  flex-direction: column;
  gap: 4px;
  z-index: 49;
}
.mobile-menu a,
.mobile-menu button {
  display: block;
  padding: 12px 14px;
  color: var(--navy-900);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  text-align: left;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}
.mobile-menu a:hover { background: var(--navy-50); }
.mobile-menu__cta {
  background: var(--teal-50) !important;
  color: var(--accent-strong) !important;
  font-weight: 600 !important;
  margin-top: 8px;
  border: 1px solid var(--accent);
}
.mobile-menu__logout { color: var(--muted) !important; }

@media (max-width: 960px) {
  .nav-primary { display: none; }
  .mobile-toggle { display: inline-flex; }
  .mobile-menu { display: flex; }
  .cta-segunda { display: none; }
  .user-menu { display: none; }
}
@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
}

/* =========================================================
   Footer redesenhado: 4 colunas + barra inferior
   ========================================================= */

.footer-rich {
  margin-top: 100px;
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  padding: 60px 0 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-col h4.footer-heading {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-heading--sub { margin-top: 24px !important; }

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-list a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-list a:hover { color: var(--white); }
.footer-list a span { opacity: 0.8; }

.brand--footer .brand__name { color: var(--white); }
.brand--footer .brand__name em { color: var(--teal-500); }

.footer-tagline {
  margin: 16px 0 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  transition: all 160ms ease;
}
.footer-social a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--teal-500);
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}
.footer-cnpj { font-variant-numeric: tabular-nums; }
.footer-bottom-tag {
  font-style: italic;
  color: rgba(255, 255, 255, 0.4) !important;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Esconde o .footer antigo */
.footer { display: none; }

/* =========================================================
   Páginas institucionais + listagem pública
   ========================================================= */

.page-hero {
  padding: 56px 0 40px;
  background: linear-gradient(180deg, var(--navy-50) 0%, transparent 100%);
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
  color: var(--navy-900);
}
.page-hero .lead {
  color: var(--gray-700);
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
}

.page-content { margin-bottom: 80px; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.page-grid article h2 {
  font-size: 22px;
  margin: 32px 0 12px;
  color: var(--navy-900);
}
.page-grid article h2:first-child { margin-top: 0; }
.page-grid article p { line-height: 1.7; color: var(--gray-700); }
.page-grid article ul { line-height: 1.8; color: var(--gray-700); padding-left: 24px; }
.page-grid article ul li { margin-bottom: 6px; }

.page-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h3 {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin: 0 0 14px;
}
.kpi-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--gray-700);
}
.kpi-list strong { color: var(--navy-900); }
.sidebar-card--cta {
  background: linear-gradient(180deg, var(--teal-50) 0%, var(--white) 100%);
  border-color: var(--accent);
}
.sidebar-card--cta .btn { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
}

/* Como funciona — fluxo cards numerados */
.fluxo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.fluxo-card header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.fluxo-card header h2 { margin: 0; font-size: 22px; color: var(--navy-900); }
.fluxo-card header .muted { margin: 4px 0 0; font-size: 14px; }
.fluxo-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--navy-50);
  color: var(--navy-800);
  font-weight: 800;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.fluxo-passos {
  padding-left: 24px;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--gray-700);
  line-height: 1.6;
}
.fluxo-passos li strong { color: var(--navy-900); }

.page-faq {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.page-faq h2 {
  font-size: 22px;
  margin: 0 0 20px;
  color: var(--navy-900);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--white);
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-900);
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--muted);
  font-weight: 400;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item[open] summary { color: var(--accent-strong); }
.faq-item p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--gray-700);
  line-height: 1.7;
}

/* Contato — 4 cards de canais */
.contato-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 700px) {
  .contato-grid { grid-template-columns: 1fr; }
}
.contato-card {
  display: block;
  padding: 28px 28px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy-900);
  transition: all 200ms ease;
  box-shadow: var(--shadow-sm);
}
.contato-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contato-icon { font-size: 32px; margin-bottom: 12px; }
.contato-card h2 { font-size: 18px; margin: 0 0 6px; color: var(--navy-900); }
.contato-detail {
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 8px;
  font-size: 15px;
}
.contato-info {
  background: var(--navy-50);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.contato-info h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--navy-900);
}
.contato-info p {
  margin: 0 0 12px;
  color: var(--gray-700);
  line-height: 1.65;
}

/* Páginas legais */
.page-legal h2 {
  font-size: 18px;
  color: var(--navy-900);
  margin: 32px 0 10px;
  letter-spacing: -0.005em;
}
.page-legal h2:first-child { margin-top: 0; }
.page-legal p, .page-legal ul {
  color: var(--gray-700);
  line-height: 1.75;
  font-size: 15px;
}
.page-legal ul { padding-left: 24px; }
.page-legal ul li { margin-bottom: 6px; }
.page-legal {
  max-width: 760px;
  margin: 0 auto;
}

/* Listagem pública de imóveis — paginação + empty state */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
  font-size: 14px;
}
.pagination__link {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--navy-800);
  font-weight: 500;
  transition: all 160ms ease;
}
.pagination__link:hover {
  background: var(--navy-50);
  border-color: var(--navy-800);
}
.pagination__info { color: var(--muted); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state h2 {
  font-size: 18px;
  color: var(--navy-900);
  margin: 0 0 8px;
}
.empty-state .btn { margin-top: 16px; }

.im-card__cond {
  margin-top: 6px;
  font-size: 12.5px;
}

/* =========================================================
   Polish UX — toasts, loading, empty states, microinterações
   Adicionado no bloco 2 do roadmap pós-CRM.
   ========================================================= */

/* ---------- Toast (mensagens flash) ---------- */
.toast-stack {
  position: fixed;
  top: 80px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gray-300);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  color: var(--navy-900);
}
.toast--success { border-left-color: var(--accent); }
.toast--warning { border-left-color: #f59e0b; }
.toast--error   { border-left-color: #dc2626; }
.toast--info    { border-left-color: var(--navy-800); }

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
}
.toast--success .toast-icon { background: var(--accent); }
.toast--warning .toast-icon { background: #f59e0b; }
.toast--error   .toast-icon { background: #dc2626; }
.toast--info    .toast-icon { background: var(--navy-800); }

.toast-msg { flex: 1; line-height: 1.5; }

.toast-close {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  padding: 0 4px;
  align-self: flex-start;
  font-family: inherit;
}
.toast-close:hover { color: var(--navy-900); }

/* Alpine.js x-transition classes — fade + slide */
.toast-enter {
  animation: toastIn 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-leave {
  animation: toastOut 240ms ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 600px) {
  .toast-stack {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

/* ---------- Loading state em buttons ---------- */
.btn[data-loading] {
  pointer-events: none;
  opacity: 0.75;
  position: relative;
  color: transparent !important;
}
.btn[data-loading]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin 700ms linear infinite;
  color: var(--white);
}
.btn--ghost[data-loading]::after,
.btn--accent[data-loading]::after { color: var(--white); }
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* ---------- Empty state genérico melhorado ---------- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 24px 0;
}
.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state h2 {
  font-size: 20px;
  color: var(--navy-900);
  margin: 0 0 8px;
}
.empty-state p {
  color: var(--muted);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.empty-state .btn { margin: 0 4px; }

/* ---------- Microinterações ---------- */
.btn {
  transition: transform 140ms ease, box-shadow 200ms ease, background 160ms ease;
}
.btn--primary:hover, .btn--accent:hover {
  box-shadow: 0 6px 20px rgba(10, 31, 61, 0.12);
}
.btn--primary:active, .btn--accent:active {
  transform: translateY(1px);
}

/* Cards de imóvel — hover sutil */
.im-card {
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 240ms ease;
}
.im-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(10, 31, 61, 0.10);
}

/* Wizard — transição entre steps */
.wizard-card {
  animation: wizardSlideIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Progress bar do wizard — animação smooth */
.wizard-progress-bar {
  transition: width 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pills de prioridade — bounce ao selecionar */
.prio-pill.is-selected {
  animation: pillBounce 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pillBounce {
  0%   { transform: scale(0.9); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1.05); }
}

/* Check-pills — leve bounce ao marcar */
.check-pill:has(input:checked) {
  animation: pillCheck 240ms ease;
}
@keyframes pillCheck {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Timeline (CRM público) ---------- */
.timeline-wrap { max-width: 720px; margin: 0 auto; }
.timeline {
  list-style: none;
  padding: 0 0 0 24px;
  margin: 0;
  position: relative;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 20px;
  padding-bottom: 24px;
}
.timeline-dot {
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.timeline-card p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ---------- Page transitions (FOUC reduce) ---------- */
[x-cloak] { display: none !important; }

/* Skeleton loader (uso futuro — listagens com fetch async) */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-100) 0%,
    var(--gray-200) 50%,
    var(--gray-100) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* Smooth scroll pra âncoras (#como-funciona, etc.) */
html { scroll-behavior: smooth; }


/* ============================================================
   ANÁLISE VISUAL & VALUATION (templates/imoveis/detalhe.html)
   ============================================================ */
.visual-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .visual-scores { grid-template-columns: repeat(2, 1fr); }
}

.visual-score {
  background: var(--gray-50, #F8FAFC);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px 14px;
  text-align: center;
}
.visual-score--composto {
  background: linear-gradient(135deg, var(--teal-50, #f0fdfa), var(--gray-50, #F8FAFC));
  border-color: var(--teal-200, #99f6e4);
}
.visual-score__value {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.visual-score__value small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.visual-score__value--alto  { color: #059669; }   /* verde */
.visual-score__value--medio { color: var(--navy-900); }
.visual-score__value--baixo { color: #DC2626; }   /* vermelho */
.visual-score__label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-700);
}
.visual-score__hint {
  font-size: 11px;
  margin-top: 2px;
}

.valuation-card {
  margin-top: 22px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #fefce8, #fffbeb);
  border: 1px solid #fde68a;
  border-radius: 14px;
}
.valuation-card__title {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #92400e;
  font-weight: 700;
}
.valuation-card__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 720px) {
  .valuation-card__row { grid-template-columns: 1fr; }
}
.valuation-card__cell {
  min-width: 0;
}
.valuation-card__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.valuation-card__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
}
.valuation-card__hint {
  font-size: 12px;
  margin-top: 2px;
}
.valuation-card__cb {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}
.valuation-card__cb--barato { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.valuation-card__cb--justo  { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.valuation-card__cb--caro   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.valuation-card__caveat {
  border-top: 1px dashed #fde68a;
  padding-top: 10px;
  line-height: 1.5;
}

.visual-avisos {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.visual-aviso {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
}

