@charset "UTF-8";
/* Caravel Imo — folha única. Regras: /root/caravel/trabalho/design-hallmark/REGRAS_DESIGN_CARAVEL.md
   Telemóvel primeiro (min-width), um só :root, cores só por tokens, nada abaixo de 0.75rem. */

:root {
  /* Superfícies */
  --bg: #fbfaf6;
  --bg-alt: #f3f0e8;
  --surface: #ffffff;
  --input-bg: #ffffff;
  /* Texto */
  --fg: #0f1d2b;
  --fg-secondary: #2c3e50;
  --muted: #4a5968;
  /* Marca (o painel e as páginas Caravel usam sempre estes; os temas da agência só trocam --brand*) */
  --brand: #0f1d2b;
  --brand-hover: #182d42;
  --brand-ink: #ffffff;
  --brand-soft: rgba(15, 29, 43, 0.06);
  --accent: #f2b544;
  --accent-hover: #e5a42d;
  --accent-ink: #0f1d2b;
  --accent-soft: rgba(242, 181, 68, 0.16);
  /* Linhas */
  --line: rgba(15, 29, 43, 0.12);
  --line-strong: rgba(15, 29, 43, 0.24);
  /* Estados */
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.08);
  /* Superfícies escuras (ampliação de fotografias) */
  --overlay: rgba(15, 29, 43, 0.88);
  --overlay-surface: #0f1d2b;
  --overlay-ink: #ffffff;
  /* Mapa aproximado */
  --map-land: #eef0ea;
  --map-water: #d5e3ea;
  --map-road: #ffffff;
  /* Geometria */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --max: 1280px;
  --gutter: 20px;
  --shadow: 0 12px 32px -16px rgba(15, 29, 43, 0.18);
  /* Tipografia */
  --font: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Temas do site público da agência (escolha da agência em «Agência > Tema do site»). */
.theme-terra {
  --brand: #244b40;
  --brand-hover: #1b3a31;
  --brand-soft: rgba(36, 75, 64, 0.08);
  --bg: #faf9f6;
  --bg-alt: #eee8de;
  --map-land: #e6ede7;
}
.theme-coast {
  --brand: #235d77;
  --brand-hover: #1a4a60;
  --brand-soft: rgba(35, 93, 119, 0.08);
  --bg: #f6f9fa;
  --bg-alt: #e5eff4;
  --map-land: #e1eff3;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  caret-color: var(--brand);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
@media (hover: hover) {
  a:hover {
    color: var(--brand);
    text-decoration-color: currentColor;
  }
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary,
label {
  touch-action: manipulation;
}
button,
summary,
[type="checkbox"],
[type="radio"] {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--fg);
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
p {
  color: var(--fg-secondary);
  text-wrap: pretty;
}
small {
  font-size: 0.875rem;
}
strong {
  font-weight: 700;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
code {
  font-family: var(--mono);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.num,
table,
.stat strong,
.card-bottom strong,
.detail-price strong,
.credit-results strong,
.deal-values strong {
  font-variant-numeric: tabular-nums;
}

/* Saltar para o conteúdo */
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus,
.skip:focus-visible {
  top: 12px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Aviso de demonstração: discreto, no fluxo da página */
.demo-fixed {
  min-height: 40px;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-size: 0.875rem;
}
.demo-banner {
  padding: 8px var(--gutter);
  text-align: center;
  background: var(--bg-alt);
  color: var(--fg-secondary);
  font-size: 0.875rem;
}

/* Marca */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
}
@media (hover: hover) {
  .brand:hover {
    color: var(--fg);
  }
}

/* Botões */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1.5px solid var(--brand);
  border-radius: var(--r);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}
.button.outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}
.button.small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}
.button.full {
  width: 100%;
}
.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--brand-ink);
}
@media (hover: hover) {
  .button:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: var(--brand-ink);
  }
  .button.outline:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--fg);
  }
  .button.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    filter: brightness(0.92);
  }
}
.button:active {
  transform: scale(0.98);
}
.button:disabled,
.text-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 4px;
  border: 0;
  background: none;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: left;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
@media (hover: hover) {
  .text-button:hover {
    color: var(--brand);
    text-decoration-color: currentColor;
  }
}
.danger,
.text-button.danger {
  color: var(--danger);
}
.pill {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.meta {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Seletor de idioma: alvos de 36×36 no mínimo */
.languages {
  display: flex;
  gap: 4px;
  font-size: 0.875rem;
}
.languages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: var(--muted);
  text-decoration: none;
}
.languages [aria-current] {
  color: var(--fg);
  font-weight: 700;
  background: var(--brand-soft);
}

/* Cabeçalho público */
.public-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.public-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 0.9375rem;
}
.public-header nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.public-header nav > a.sign-in {
  font-weight: 700;
}

/* Página de produto Caravel Imo (/) */
.landing {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
}
.landing h1 {
  max-width: 20ch;
}
.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  max-width: 58ch;
  margin-bottom: 24px;
}
.landing-features {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--gutter);
  border-top: 1px solid var(--line);
}
.landing-features h2 {
  max-width: 28ch;
}
.feature-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
.feature-list li {
  padding-top: 16px;
  border-top: 2px solid var(--accent);
}
.feature-list p {
  margin: 0;
  max-width: 48ch;
}

/* Site público da agência: topo e pesquisa */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  display: grid;
  gap: 24px;
}
.hero h1 {
  max-width: 18ch;
}
.hero-copy p {
  max-width: 48ch;
  margin-bottom: 24px;
}
.hero-art img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.hero-art-caption {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.search-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.search-bar {
  display: grid;
  gap: 0 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.search-bar > .button {
  margin-top: 4px;
}
.more-filters {
  grid-column: 1 / -1;
  margin-top: 12px;
  font-size: 0.9375rem;
}
.more-filters summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
.more-filters .form-grid {
  max-width: 600px;
  padding-top: 8px;
}
.collection {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.section-heading h2 {
  margin-bottom: 8px;
}
.section-heading p {
  margin: 0;
}
.collection-count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 0.9375rem;
}
.collection-count > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.section-heading.compact {
  margin-bottom: 16px;
  align-items: center;
}
.section-heading.compact h2 {
  font-size: 1.375rem;
  margin: 0;
}
.section-heading.compact h3 {
  margin: 0;
}

/* Cartões de imóvel */
.property-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.property-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-image {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-badge,
.tour-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 700;
}
.tour-badge {
  left: auto;
  right: 12px;
  background: var(--brand);
  color: var(--brand-ink);
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 20px 20px;
}
.card-location {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.875rem;
}
.card-body h3 {
  margin: 0 0 12px;
}
.card-body h3 a {
  text-decoration: none;
}
.card-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--fg-secondary);
  font-size: 0.875rem;
}
.card-bottom {
  margin-top: auto;
  padding-top: 16px;
}
.card-bottom strong {
  display: block;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 1.125rem;
}
.card-bottom small {
  color: var(--muted);
  font-weight: 400;
}
.no-photo {
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9375rem;
  background: var(--bg-alt);
}

/* Rodapé */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--fg-secondary);
}
.footer p {
  margin: 4px 0 0;
  font-size: 0.875rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-links small {
  color: var(--muted);
}

/* Ficha pública do imóvel */
.property-detail {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}
.detail-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg-secondary);
  font-size: 0.9375rem;
}
.detail-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.detail-heading h1 {
  margin-bottom: 0;
}
.detail-heading .meta {
  margin: 0 0 8px;
}
.detail-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.detail-price strong {
  font-size: 1.75rem;
}
.detail-price small {
  color: var(--muted);
}
.detail-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--r-lg);
  background: var(--bg-alt);
}
.detail-gallery figure {
  position: relative;
  margin: 0;
  flex: 0 0 92%;
  scroll-snap-align: start;
}
.detail-gallery figure:only-child {
  flex-basis: 100%;
}
.detail-gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.zoom-trigger {
  display: block;
  cursor: zoom-in;
}
.detail-gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.8125rem;
}
.detail-columns {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}
.detail-columns > * {
  min-width: 0;
}
.spec-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.spec-strip div {
  margin: 0;
}
.spec-strip dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.spec-strip dd {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.detail-section {
  padding: 32px 0;
}
.detail-section p {
  max-width: 68ch;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.location-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.location-card > div:last-child {
  padding: 20px;
}
.location-card p {
  font-size: 0.9375rem;
}
.approx-map {
  height: 140px;
  background: var(--map-land);
  border-bottom: 1px solid var(--line);
}
.approx-map svg {
  display: block;
  width: 100%;
  height: 100%;
}
.approx-map .land {
  fill: var(--map-land);
}
.approx-map .water {
  fill: var(--map-water);
}
.approx-map .roads {
  stroke: var(--map-road);
}
.approx-map .zone {
  fill: var(--brand-soft);
  stroke: var(--brand);
}
.approx-map .pin {
  fill: var(--brand);
}
.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.tour-card {
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
}
.tour-card h2 {
  font-size: 1.375rem;
}
.credit-panel {
  margin-top: 24px;
}
.credit-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 16px 0 0;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--r);
}
.credit-results div {
  margin: 0;
}
.credit-results dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.credit-results dd {
  margin: 0;
}
.credit-results strong {
  font-size: 1.25rem;
}
.enquiry {
  height: fit-content;
}
.enquiry h2 {
  font-size: 1.5rem;
}

/* Ampliação de fotografias (CSS :target) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  flex-direction: column;
  background: var(--overlay);
}
.lightbox:target {
  display: flex;
}
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  cursor: zoom-out;
}
.lightbox-frame {
  position: relative;
  z-index: 1;
  margin: auto;
  width: min(1220px, 100%);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--overlay-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lightbox-bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px var(--gutter);
  background: var(--overlay-surface);
  color: var(--overlay-ink);
  font-size: 0.9375rem;
}
.lightbox-bar .button {
  background: var(--overlay-ink);
  border-color: var(--overlay-ink);
  color: var(--overlay-surface);
}
.lightbox-bar .button.outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--overlay-ink);
}
.lightbox-bar :focus-visible {
  outline-color: var(--accent);
}
.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lightbox-stage,
.zoom-toggle {
  position: relative;
  z-index: 1;
  display: block;
  flex: 1;
  margin: 0;
  overflow: auto;
  cursor: zoom-in;
}
.lightbox-stage img,
.zoom-toggle img {
  width: 100%;
  max-height: calc(100vh - 72px);
  object-fit: contain;
  margin: auto;
  transition: transform 250ms ease;
  transform-origin: center;
}
.zoom-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.zoom-checkbox:checked + img {
  transform: scale(1.75);
  cursor: zoom-out;
}

/* Painéis e formulários */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.panel > h2 {
  font-size: 1.375rem;
}
.panel form + h2,
.panel .form-grid + h2 {
  margin-top: 32px;
}
.panel > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 700;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--input-bg);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 400;
}
input[type="file"] {
  padding: 8px;
  font-size: 0.9375rem;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  resize: vertical;
}
.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--fg-secondary);
  line-height: 1.5;
}
.checkbox input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 20px;
}
.hint {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.notice {
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--bg-alt);
  color: var(--fg);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.notice.success {
  background: var(--brand-soft);
}
.notice.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
fieldset {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* Páginas de texto, erro, obrigado */
.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
}
.prose p {
  max-width: 68ch;
}
.prose .panel {
  margin-top: 32px;
}

/* Entrar */
.login-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  display: grid;
  gap: 32px;
}
.login-story h1 {
  max-width: 18ch;
}
.login-form h2 {
  font-size: 1.75rem;
}
.login-form > p {
  max-width: 44ch;
}
.dev-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.dev-box small {
  color: var(--muted);
}

/* Painel da agência (área de trabalho) */
.sidebar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 0;
  display: flex;
  flex-direction: column;
}
.agency-switch,
.sidebar-bottom {
  display: none;
}
.sidebar nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 4px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter) 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--r);
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link.selected {
  background: var(--brand-soft);
  color: var(--fg);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (hover: hover) {
  .nav-link:hover {
    background: var(--brand-soft);
    color: var(--fg);
  }
}
.agency-switch {
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.agency-switch strong {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.agency-switch small {
  color: var(--muted);
  font-size: 0.8125rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--accent-soft);
  font-weight: 700;
}
.avatar.small {
  width: 32px;
  min-width: 32px;
  height: 32px;
  font-size: 0.875rem;
}
.sidebar-bottom {
  margin-top: auto;
  flex-direction: column;
  gap: 16px;
  font-size: 0.9375rem;
}
.plan-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--fg-secondary);
  font-size: 0.875rem;
}
.plan-label span {
  color: var(--muted);
}
.workspace-main {
  min-width: 0;
}
.workspace-header {
  min-height: 56px;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.workspace-header > span {
  display: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.header-actions form {
  margin: 0;
}
.content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}
.page-heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  margin-bottom: 8px;
}
.page-heading p {
  margin: 0;
}
.page-heading .back-link {
  margin-bottom: 4px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 32px;
}
.stat {
  margin: 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.stat dt {
  color: var(--fg-secondary);
  font-size: 0.875rem;
}
.stat dd {
  margin: 4px 0 0;
}
.stat strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.2;
}
.dashboard-grid,
.crm-columns,
.settings-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.crm-columns > *,
.settings-columns > * {
  min-width: 0;
}
.activity-list {
  padding: 0 20px;
}
.activity-row {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.activity-row:last-child {
  border-bottom: 0;
}
.activity-row small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.activity-row strong {
  display: block;
}
.activity-row span {
  display: block;
  color: var(--fg-secondary);
  font-size: 0.9375rem;
}
.empty-state {
  grid-column: 1 / -1;
  width: 100%;
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
}
.translation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 8px 0 24px;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  margin-bottom: 24px;
}
.inline-form label {
  flex: 1 1 240px;
  max-width: 480px;
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
  padding: 4px 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
.strong-link {
  font-weight: 700;
}
.timeline {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.timeline article {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.timeline article:last-child {
  border-bottom: 0;
}
.timeline-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.timeline-heading small {
  color: var(--muted);
}
.timeline p {
  margin: 12px 0;
}
.activity-edit summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-weight: 700;
  font-size: 0.9375rem;
}
.proposal {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.proposal:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.match-group {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.match-group p {
  margin-bottom: 8px;
}
.match-group > small {
  color: var(--muted);
}
.match {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.match strong {
  white-space: nowrap;
}
.consent-list {
  margin-top: 24px;
}
.consent-list article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.consent-list small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.consent-list p {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.history {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history li {
  padding: 4px 0 12px 16px;
  border-left: 1px solid var(--line-strong);
  font-size: 0.9375rem;
}
.history small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.danger-zone summary {
  color: var(--danger);
  font-weight: 700;
}
.danger-zone p {
  margin-top: 16px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.theme-option {
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-weight: 400;
}
.theme-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.theme-preview {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-alt);
}
.theme-preview span {
  width: 20%;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--brand);
}
.theme-preview span:nth-child(2) {
  background: var(--accent-soft);
}
.theme-preview span:nth-child(3) {
  background: var(--surface);
}
.theme-option > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
}
.theme-option input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}
.feed-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feed-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.member {
  margin-bottom: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.member strong {
  display: block;
}
.member small {
  display: block;
  color: var(--muted);
}
.permissions-form {
  margin-top: 8px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--r);
}
.permissions-form .checkbox {
  margin-bottom: 8px;
}

/* Fotografias no painel */
.photo-manager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.photo-item {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.photo-manager img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: max(4px, calc(var(--r-lg) - 8px));
}
.photo-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin: 8px 0;
  font-size: 0.875rem;
}
.photo-item .text-button {
  min-width: 36px;
  justify-content: center;
}
.photo-item form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.875rem;
}
.order-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Pipeline */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 32px;
}
.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.kanban-col-header h2 {
  font-size: 1.0625rem;
  margin: 0;
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deal-card {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.deal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.deal-card-top form {
  margin: 0;
}
.deal-card-top .text-button {
  font-size: 0.875rem;
  font-weight: 400;
}
.deal-card-top strong {
  line-height: 1.35;
}
.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 8px 0;
  font-size: 0.875rem;
  color: var(--fg-secondary);
}
.deal-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 0;
  border-block: 1px solid var(--line);
}
.deal-values div {
  margin: 0;
}
.deal-values dt {
  color: var(--muted);
  font-size: 0.8125rem;
}
.deal-values dd {
  margin: 0;
}
.deal-meta a,
.compare-table th a.strong-link,
.location-card a,
.prose .panel > a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.deal-notes {
  margin: 8px 0;
  font-size: 0.9375rem;
}
.deal-stage-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.deal-stage-form label {
  margin: 0;
  font-size: 0.875rem;
}
.kanban-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Comparar */
.compare-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 16px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.compare-option {
  margin-bottom: 4px;
}
.compare-table th,
.compare-table td {
  min-width: 180px;
  vertical-align: top;
  white-space: normal;
}
.compare-thumb {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 8px;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

/* Relatórios: barras nativas (sem estilos inline, a CSP bloqueia-os) */
.bar {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 6px;
  margin-top: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--bg-alt);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.bar::-webkit-meter-bar {
  background: var(--bg-alt);
  border: 0;
  border-radius: 3px;
  height: 6px;
}
.bar::-webkit-meter-optimum-value,
.bar::-webkit-meter-suboptimum-value,
.bar::-webkit-meter-even-less-good-value {
  background: var(--brand);
  border-radius: 3px;
}
.bar::-moz-meter-bar {
  background: var(--brand);
  border-radius: 3px;
}

/* ≥ 680 px */
@media (min-width: 680px) {
  :root {
    --gutter: 32px;
  }
  .property-grid,
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-bar > .button {
    grid-column: 1 / -1;
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .spec-strip,
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .credit-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .photo-manager {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .detail-gallery img {
    height: 440px;
  }
  .detail-gallery figure {
    flex-basis: 80%;
  }
  .detail-heading {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
  }
  .detail-price {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
    white-space: nowrap;
  }
  .location-card {
    flex-direction: row;
  }
  .approx-map {
    width: 220px;
    height: auto;
    flex-shrink: 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .match {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }
  .page-heading {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
  }
  .footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
  .panel {
    padding: 24px;
  }
  .hero-art img {
    height: 360px;
  }
}

/* ≥ 960 px */
@media (min-width: 960px) {
  .landing {
    padding-top: 72px;
    padding-bottom: 64px;
  }
  .landing-features {
    padding-block: 64px 80px;
  }
  .feature-list,
  .property-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 48px;
    padding-block: 48px;
  }
  .hero-art img {
    height: 440px;
  }
  .search-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
  }
  .search-bar > label {
    margin-bottom: 0;
  }
  .search-bar > .button {
    grid-column: auto;
    margin-top: 0;
  }
  .form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .detail-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 48px;
  }
  .detail-gallery img {
    height: 540px;
  }
  .login-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 64px;
    padding-top: 64px;
  }
  .crm-columns,
  .settings-columns {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 32px;
  }
  .translation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .photo-manager {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .workspace .property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Painel: barra lateral fixa ao lado do conteúdo */
  body.workspace {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
  }
  body.workspace > .demo-fixed,
  body.workspace > .demo-banner {
    grid-column: 1 / -1;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .demo-mode .sidebar {
    height: calc(100vh - 40px);
  }
  .agency-switch,
  .sidebar-bottom {
    display: flex;
  }
  .sidebar nav {
    flex-direction: column;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .workspace-header > span {
    display: inline;
  }
  .content {
    padding: 32px 40px 64px;
  }
  .workspace-header {
    padding: 8px 40px;
  }
}

@media (min-width: 1280px) {
  .workspace .property-grid:not(.two) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button,
  .lightbox-stage img,
  .zoom-toggle img {
    transition: none;
  }
  .button:active {
    transform: none;
  }
}

@media print {
  .public-header,
  .footer,
  .enquiry,
  .demo-fixed,
  .back-link,
  .detail-topbar .button-row,
  .lightbox,
  .skip {
    display: none !important;
  }
  .property-detail {
    margin: 0;
    max-width: 100%;
    padding: 0;
  }
  .detail-columns {
    grid-template-columns: 1fr;
  }
}

/* Registo, plano e conta (self-service) */
.steps {
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: var(--fg-secondary);
}
.steps li + li {
  margin-top: 0.5rem;
}
.panel dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}
.panel dt {
  color: var(--muted);
}
.panel dd {
  margin: 0;
}

/* Tema escuro: segue prefers-color-scheme, salvo escolha explícita no botão (html[data-theme]).
   Aplicado no body para vencer os temas da agência (.theme-terra / .theme-coast). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) body {
    --bg: #0d1620;
    --bg-alt: #13202c;
    --surface: #172634;
    --input-bg: #101c27;
    --fg: #e9eef3;
    --fg-secondary: #c9d4de;
    --muted: #a3b1bf;
    --brand: #e9eef3;
    --brand-hover: #ffffff;
    --brand-ink: #0d1620;
    --brand-soft: rgba(233, 238, 243, 0.08);
    --accent-soft: rgba(242, 181, 68, 0.2);
    --line: rgba(233, 238, 243, 0.14);
    --line-strong: rgba(233, 238, 243, 0.3);
    --ok: #4ade80;
    --warn: #fbbf24;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --overlay: rgba(5, 10, 16, 0.92);
    --overlay-surface: #060c12;
    --map-land: #1c2c3a;
    --map-water: #173246;
    --map-road: #2c4052;
    --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
  :root:not([data-theme="light"]) body.theme-terra {
    --brand: #9fd3bf;
    --brand-hover: #bfe5d6;
    --brand-soft: rgba(159, 211, 191, 0.1);
  }
  :root:not([data-theme="light"]) body.theme-coast {
    --brand: #9cd0e6;
    --brand-hover: #c1e3f1;
    --brand-soft: rgba(156, 208, 230, 0.1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="dark"] body {
  --bg: #0d1620;
  --bg-alt: #13202c;
  --surface: #172634;
  --input-bg: #101c27;
  --fg: #e9eef3;
  --fg-secondary: #c9d4de;
  --muted: #a3b1bf;
  --brand: #e9eef3;
  --brand-hover: #ffffff;
  --brand-ink: #0d1620;
  --brand-soft: rgba(233, 238, 243, 0.08);
  --accent-soft: rgba(242, 181, 68, 0.2);
  --line: rgba(233, 238, 243, 0.14);
  --line-strong: rgba(233, 238, 243, 0.3);
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --overlay: rgba(5, 10, 16, 0.92);
  --overlay-surface: #060c12;
  --map-land: #1c2c3a;
  --map-water: #173246;
  --map-road: #2c4052;
  --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] body.theme-terra {
  --brand: #9fd3bf;
  --brand-hover: #bfe5d6;
  --brand-soft: rgba(159, 211, 191, 0.1);
}
:root[data-theme="dark"] body.theme-coast {
  --brand: #9cd0e6;
  --brand-hover: #c1e3f1;
  --brand-soft: rgba(156, 208, 230, 0.1);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.theme-toggle[hidden] {
  display: none;
}
.theme-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Créditos das fotografias (demo com fotografias reais licenciadas) */
.photo-credit {
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0.92;
}
.photo-credit a {
  color: inherit;
}
.detail-gallery figcaption {
  right: 12px;
  max-width: max-content;
}
.lightbox-bar .photo-credit {
  margin-top: 2px;
}
.credits-page {
  max-width: 960px;
}
.credits-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.credits-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}
.credits-list img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.credits-list small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Agente fictício: monograma, nunca fotografia */
.agent-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 12px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.agent-card .monogram {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.agent-card div {
  display: grid;
}
.agent-card small,
.agent-card span {
  color: var(--muted);
  font-size: 0.8125rem;
}
.agent-card .hint {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 0.75rem;
}

/* Mapa 3D das zonas (three.js leve, carregado só quando visível) */
.zone-map {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  gap: 20px;
}
.zone-stage {
  position: relative;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-alt), var(--surface));
  overflow: hidden;
}
.zone-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.zone-list a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-size: 0.875rem;
}
.zone-list b {
  font-weight: 700;
  color: var(--muted);
}
.zone-stage.is-3d .zone-fallback {
  display: none;
}
.zone-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 16px;
  text-align: center;
}
@media (min-width: 820px) {
  .zone-map {
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
  }
  .zone-stage {
    aspect-ratio: 16 / 10;
  }
}

/* Documentos, assinatura e verificação */
.doc-body {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 24rem;
}
.doc-templates {
  margin: 20px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.9375rem;
}
.doc-templates li + li {
  margin-top: 8px;
}
.break-all {
  overflow-wrap: anywhere;
}
.form-grid .wide {
  grid-column: 1 / -1;
}
.pill.danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.sign-page {
  max-width: 44rem;
  margin-inline: auto;
  padding: 32px var(--gutter) 64px;
}
.sign-agency {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.sign-steps {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: sign;
}
.sign-steps > li {
  counter-increment: sign;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.sign-steps > li + li {
  margin-top: 12px;
}
.sign-steps h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
}
.sign-steps h2::before {
  content: counter(sign) ". ";
}
.sign-steps form > * + * {
  margin-top: 12px;
}
.sign-decline {
  margin: 16px 0 32px;
}
.sign-decline form {
  margin-top: 12px;
}
.sign-list {
  padding-left: 1.2em;
}
.verify-facts dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}
.verify-facts dd {
  margin: 0;
}

/* Portais */
.portal-steps {
  padding-left: 1.4em;
}
.portal-steps li + li {
  margin-top: 6px;
}
.portal-issues {
  margin: 0;
  padding-left: 1.1em;
}

/* Área do proprietário */
.owner-page {
  max-width: 60rem;
  margin-inline: auto;
  padding: 24px var(--gutter) 64px;
}
.owner-property-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.owner-property-head img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.owner-property-head h2,
.owner-property-head p {
  margin: 0 0 4px;
}
.owner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(7.5rem, 100%), 1fr));
  gap: 12px;
  margin: 20px 0;
}
.owner-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.owner-stats dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.owner-stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}
.owner-list {
  padding-left: 1.2em;
}

/* Marca da agência */
.brand.brand-logo img {
  width: auto;
  height: 44px;
  max-width: 220px;
  object-fit: contain;
  border-radius: 0;
}
.logo-preview {
  max-height: 64px;
  width: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
}

/* Primeiros passos no painel */
.onboarding { margin-bottom: 1.5rem; }
.onboarding h2 small { font-weight: 400; color: var(--muted, #666); }
.onb-steps { margin: .5rem 0; padding-left: 1.4rem; display: grid; gap: .35rem; }
.onb-steps .done { color: var(--muted, #666); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Widget de imóveis (iframe no site que a agência já tem) */
body.widget { background: transparent; }
.widget-main { padding: 12px; }
.widget-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.widget-foot { margin: 12px 0 0; font-size: .875rem; }
.code-snippet { overflow-x: auto; white-space: pre-wrap; word-break: break-all; padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2, #f3f1ec); font-size: .8rem; }
