/* iSAVU — tema claro/escuro */
:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-soft:#f7faf8;
  --surface-raised:#ffffff;
  --theme-text:#17211c;
  --theme-muted:#66756d;
  --theme-border:#dfeae4;
  color-scheme:light;
}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:10px;
  background:rgba(255,255,255,.10);
  color:#fff;
  font:700 12px/1 "DM Sans",Arial,sans-serif;
  letter-spacing:.1px;
  cursor:pointer;
  white-space:nowrap;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
.theme-toggle:hover{background:rgba(255,255,255,.20);border-color:rgba(255,255,255,.42);transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:3px solid rgba(149,213,178,.55);outline-offset:2px}
.theme-toggle svg{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.drawer-theme-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border:0;
  border-top:1px solid var(--border,#dfeae4);
  background:transparent;
  color:var(--text-dark,#1a1a2e);
  font:700 14px "DM Sans",Arial,sans-serif;
  cursor:pointer;
}
.drawer-theme-toggle span:first-child{display:flex;align-items:center;gap:10px}
.drawer-theme-toggle svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

html[data-theme="dark"]{
  --bg:#0b120e;
  --surface:#121c16;
  --surface-soft:#0f1913;
  --surface-raised:#17231b;
  --theme-text:#edf5f0;
  --theme-muted:#a2b3a8;
  --theme-border:#2b3a31;
  --text-dark:#edf5f0;
  --text-mid:#c0cec5;
  --text-light:#9aac9f;
  --text:#edf5f0;
  --muted:#a2b3a8;
  --white:#121c16;
  --off-white:#0f1913;
  --off:#0f1913;
  --border:#2b3a31;
  --green-pale:#193827;
  --green-light:#79d3a1;
  --green-mid:#62c08d;
  --green-dark:#3f9b6d;
  color-scheme:dark;
}
html[data-theme="dark"] body{background:var(--bg)!important;color:var(--theme-text)!important}
html[data-theme="dark"] ::selection{background:#3f9b6d;color:#fff}

/* Superfícies principais */
html[data-theme="dark"] .why-home,
html[data-theme="dark"] .sold-section,
html[data-theme="dark"] .reviews-section,
html[data-theme="dark"] .sobre-section,
html[data-theme="dark"] .property-map-section,
html[data-theme="dark"] .projects-page-main,
html[data-theme="dark"] .shell{background:var(--bg)!important}

html[data-theme="dark"] .imovel-card,
html[data-theme="dark"] .why-home-card,
html[data-theme="dark"] .sold-card,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .map-side-card,
html[data-theme="dark"] .home-upcoming-card,
html[data-theme="dark"] .home-upcoming-projects,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .preco-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .property-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .upcoming-project-card,
html[data-theme="dark"] .empty{
  background:var(--surface)!important;
  border-color:var(--theme-border)!important;
  box-shadow:0 18px 55px rgba(0,0,0,.22)!important;
}

html[data-theme="dark"] .search-card{
  background:rgba(15,25,19,.94)!important;
  border-color:rgba(121,211,161,.24)!important;
  box-shadow:0 18px 55px rgba(0,0,0,.34)!important;
}

html[data-theme="dark"] .control,
html[data-theme="dark"] .field,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group input{
  background:#17231b!important;
  color:#edf5f0!important;
  border-color:#34483b!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#83978a!important}
html[data-theme="dark"] select option{background:#17231b;color:#edf5f0}

html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .contact-form-btn.outline,
html[data-theme="dark"] .home-upcoming-card button{
  background:transparent!important;
  color:var(--green-light)!important;
  border-color:var(--green-mid)!important;
}
html[data-theme="dark"] .btn-soft,
html[data-theme="dark"] .ver-btn,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .status-disponivel{background:#193827!important;color:#8bddae!important}

html[data-theme="dark"] .stat,
html[data-theme="dark"] .feature,
html[data-theme="dark"] .highlight,
html[data-theme="dark"] .project-doc,
html[data-theme="dark"] .project-empty-gallery,
html[data-theme="dark"] .section-empty-card,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .home-upcoming-projects,
html[data-theme="dark"] .upcoming-project-card{
  background:var(--surface-soft)!important;
  border-color:var(--theme-border)!important;
}

html[data-theme="dark"] .project-weekly-note,
html[data-theme="dark"] .upcoming-project-icon,
html[data-theme="dark"] .home-upcoming-icon,
html[data-theme="dark"] .why-home-icon{background:#193827!important;color:#8bddae!important}
html[data-theme="dark"] .upcoming-project-top span,
html[data-theme="dark"] .home-upcoming-status{background:#3c2e16!important;color:#ffd27a!important}

html[data-theme="dark"] .project-carousel,
html[data-theme="dark"] .project-carousel-thumb,
html[data-theme="dark"] .gallery-thumb,
html[data-theme="dark"] .property-map{background:#17231b!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .project-carousel-main img.fit-contain,
html[data-theme="dark"] .project-carousel-thumb img.fit-contain,
html[data-theme="dark"] .plan-preview,
html[data-theme="dark"] .plan-preview img{background:#17231b!important}

html[data-theme="dark"] .mobile-actions{background:#142018!important;border:1px solid var(--theme-border)!important}
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .lead,
html[data-theme="dark"] .section-sub,
html[data-theme="dark"] .detalhe-desc{color:var(--theme-muted)!important}

/* Elementos com estilos inline na página principal */
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"]{background:var(--surface)!important}
html[data-theme="dark"] [style*="background:var(--off-white)"],
html[data-theme="dark"] [style*="background: var(--off-white)"]{background:var(--surface-soft)!important}
html[data-theme="dark"] [style*="border:1px solid var(--border)"],
html[data-theme="dark"] [style*="border: 1px solid var(--border)"]{border-color:var(--theme-border)!important}

/* Drawer e modais */
html[data-theme="dark"] .drawer{background:#121c16!important;color:#edf5f0!important}
html[data-theme="dark"] .drawer-header{border-color:var(--theme-border)!important}
html[data-theme="dark"] .drawer-link,
html[data-theme="dark"] .drawer-close,
html[data-theme="dark"] .drawer-theme-toggle{color:#edf5f0!important}
html[data-theme="dark"] .drawer-link:hover,
html[data-theme="dark"] .drawer-theme-toggle:hover{background:#193827!important}
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .cookie-banner{background:#121c16!important;color:#edf5f0!important;border-color:var(--theme-border)!important}

/* Mapa em modo escuro */
html[data-theme="dark"] .leaflet-tile-pane{filter:brightness(.62) invert(1) contrast(.86) hue-rotate(180deg) saturate(.65)}
html[data-theme="dark"] .leaflet-control-zoom a,
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip{background:#17231b!important;color:#edf5f0!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .leaflet-control-attribution{background:rgba(18,28,22,.88)!important;color:#a2b3a8!important}
html[data-theme="dark"] .leaflet-control-attribution a{color:#79d3a1!important}

/* Mantém as zonas de marca e galerias visualmente fortes */
html[data-theme="dark"] nav,
html[data-theme="dark"] .site-nav,
html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer{color:#fff}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .catalog-hero,
html[data-theme="dark"] .projects-hero,
html[data-theme="dark"] .construction-update-banner{filter:saturate(.92) brightness(.94)}

@media(max-width:1050px){
  .theme-toggle{min-width:40px;width:40px;height:40px;padding:0;border-radius:10px}
  .theme-toggle-label{display:none}
}

@media(max-width:760px){
  .theme-toggle{flex:0 0 40px}
}

@media(prefers-reduced-motion:reduce){
  .theme-toggle{transition:none}
}


/* Correções de contraste — tema escuro */
html[data-theme="dark"] .feature-item,
html[data-theme="dark"] .sobre-features .feature-item,
html[data-theme="dark"] .green-info-box:not([style*="background:var(--green-dark)"]){background:var(--surface-raised)!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .feature-text strong,
html[data-theme="dark"] .feature-item strong,
html[data-theme="dark"] .why-home-card h3,
html[data-theme="dark"] .sold-card h3,
html[data-theme="dark"] .review-name,
html[data-theme="dark"] .home-upcoming-card h3,
html[data-theme="dark"] .project-body h2,
html[data-theme="dark"] .property-title,
html[data-theme="dark"] .projects-section-heading h2,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .section-label,
html[data-theme="dark"] .title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .sidebar-card h2,
html[data-theme="dark"] .card h2{color:var(--theme-text)!important}
html[data-theme="dark"] .feature-text span,
html[data-theme="dark"] .feature-item span,
html[data-theme="dark"] .sobre-content p,
html[data-theme="dark"] .why-home-card p,
html[data-theme="dark"] .sold-card p,
html[data-theme="dark"] .review-quote,
html[data-theme="dark"] .review-meta,
html[data-theme="dark"] .home-upcoming-card p,
html[data-theme="dark"] .projects-section-heading p,
html[data-theme="dark"] .project-body p,
html[data-theme="dark"] .property-loc,
html[data-theme="dark"] .description,
html[data-theme="dark"] .project-gallery-sub{color:var(--theme-muted)!important}
html[data-theme="dark"] .btn-primary{background:#3f9b6d!important;color:#fff!important}
html[data-theme="dark"] .btn-primary:hover{background:#54b582!important;color:#08110c!important}
html[data-theme="dark"] .btn-outline{background:transparent!important;color:#8bddae!important;border-color:#62c08d!important}
html[data-theme="dark"] .btn-soft{background:#193827!important;color:#9be2b9!important}
html[data-theme="dark"] .form-group select:hover,
html[data-theme="dark"] .form-group input:hover{background:#1b2a20!important;border-color:#62c08d!important}
html[data-theme="dark"] .imovel-fav{background:#17231b!important;color:#edf5f0!important;border:1px solid #34483b!important}
html[data-theme="dark"] .sobre-card-float{background:#17231b!important;border:1px solid var(--theme-border)!important}
html[data-theme="dark"] .map-popup-title,
html[data-theme="dark"] .map-popup-group-title{color:#edf5f0!important}
html[data-theme="dark"] .map-popup-meta{color:#a2b3a8!important}
html[data-theme="dark"] .map-popup-entry+.map-popup-entry,
html[data-theme="dark"] .map-popup-group-title{border-color:#34483b!important}
html[data-theme="dark"] .map-popup-link{color:#8bddae!important}
html[data-theme="dark"] .home-upcoming-link{color:#8bddae!important;border-color:#62c08d!important}
html[data-theme="dark"] .home-upcoming-link:hover{background:#3f9b6d!important;color:#fff!important}
html[data-theme="dark"] .project-map,
html[data-theme="dark"] .map{background:#17231b!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .property-ref,
html[data-theme="dark"] .price-label,
html[data-theme="dark"] label{color:#a2b3a8!important}
html[data-theme="dark"] .status-vendido{background:#29352e!important;color:#c0cec5!important}
html[data-theme="dark"] .status-reservado{background:#3c2e16!important;color:#ffd27a!important}
html[data-theme="dark"] .home-upcoming-head h3,
html[data-theme="dark"] .map-side-card h3,
html[data-theme="dark"] .contact-item strong{color:var(--theme-text)!important}
html[data-theme="dark"] .home-upcoming-head p,
html[data-theme="dark"] .map-side-card p,
html[data-theme="dark"] .contact-item span{color:var(--theme-muted)!important}

html[data-theme="dark"] .contact-item{background:linear-gradient(135deg,rgba(20,36,28,.96) 0%,rgba(9,18,14,.98) 100%)!important;border-color:#264333!important;box-shadow:0 18px 40px rgba(0,0,0,.24)!important}
html[data-theme="dark"] .contact-item::before{background:linear-gradient(90deg,rgba(98,192,141,.16) 0%,rgba(98,192,141,.06) 42%,rgba(255,255,255,0) 100%)!important}
html[data-theme="dark"] .contact-item:hover{border-color:#3b6e53!important;box-shadow:0 22px 46px rgba(0,0,0,.32)!important}
html[data-theme="dark"] .contact-icon{background:linear-gradient(180deg,#2f7d57 0%,#1b4d35 100%)!important;color:#eef7f1!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 12px 24px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .contact-item strong{color:#eef7f1!important}
html[data-theme="dark"] .contact-item span{color:#b8cabe!important}
html[data-theme="dark"] .contact-item span a{border-color:rgba(184,202,190,.32)!important}
html[data-theme="dark"] .contact-item span a:hover{color:#8bddae!important;border-color:currentColor!important}


/* Vender imóvel — tema escuro */
html[data-theme="dark"] .sell-benefit,
html[data-theme="dark"] .sell-step,
html[data-theme="dark"] .sell-check-item{background:var(--surface-raised)!important;border-color:var(--theme-border)!important;box-shadow:none!important}
html[data-theme="dark"] .sell-process{background:#101d16!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .sell-benefit h2,
html[data-theme="dark"] .sell-step h3,
html[data-theme="dark"] .sell-section-head h2,
html[data-theme="dark"] .sell-check-item strong,
html[data-theme="dark"] .sell-form-heading h3{color:var(--theme-text)!important}
html[data-theme="dark"] .sell-benefit p,
html[data-theme="dark"] .sell-step p,
html[data-theme="dark"] .sell-section-head p,
html[data-theme="dark"] .sell-check-item small,
html[data-theme="dark"] .sell-form-heading p,
html[data-theme="dark"] .sell-form-note,
html[data-theme="dark"] .sell-contact-mini{color:var(--theme-muted)!important}
html[data-theme="dark"] .sell-benefit-icon,
html[data-theme="dark"] .sell-step-icon,
html[data-theme="dark"] .sell-check-item>span{background:#183725!important;color:#8bddae!important}
html[data-theme="dark"] .sell-callout{background:linear-gradient(135deg,#153122,#101d16)!important;border-color:#294c37!important}
html[data-theme="dark"] .sell-callout strong{color:#9be2b9!important}
html[data-theme="dark"] .sell-callout p{color:var(--theme-muted)!important}
