:root {
  --estate-primary: #2a2845;
  --estate-primary-dark: #201e36;
  --estate-accent: #c5570e;
  --estate-ink: #2a2845;
  --estate-muted: #616779;
  --estate-line: #e1e3e9;
  --estate-soft: #f5f5f7;
  --estate-warm: #fcf6f0;
  --bs-primary: var(--estate-primary);
  --bs-primary-rgb: 42, 40, 69;
  --bs-link-color: var(--estate-primary);
  --bs-link-hover-color: var(--estate-primary-dark);
  --bs-body-color: var(--estate-ink);
  --bs-border-radius: 0.375rem;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.btn {
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--estate-primary);
  --bs-btn-border-color: var(--estate-primary);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--estate-primary-dark);
  --bs-btn-hover-border-color: var(--estate-primary-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--estate-primary-dark);
  --bs-btn-active-border-color: var(--estate-primary-dark);
  --bs-btn-active-color: #fff;
}

.btn-outline-primary {
  --bs-btn-color: var(--estate-primary);
  --bs-btn-border-color: var(--estate-primary);
  --bs-btn-hover-bg: var(--estate-primary);
  --bs-btn-hover-border-color: var(--estate-primary);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--estate-primary);
  color: #fff;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-brand span:last-child {
  white-space: nowrap;
}

.flash-stack {
  padding-top: 1rem;
}

.eyebrow {
  margin-bottom: .5rem;
  color: var(--estate-accent);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-hero {
  padding: clamp(2.5rem, 7vw, 6rem) 0 2rem;
  background:
    linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,.8)),
    url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1800&q=80") center/cover;
  border-bottom: 1px solid var(--estate-line);
}

.search-hero h1,
.page-title h1,
.text-page h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4.6vw, 4.25rem);
  line-height: 1.03;
  font-weight: 850;
}

.search-panel,
.filter-panel,
.contact-card,
.form-section,
.auth-card,
.panel-box {
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 33, 43, .08);
}

.search-panel {
  padding: 1.25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 720px;
  margin-top: clamp(2rem, 6vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: var(--estate-line);
}

.hero-stats div {
  padding: 1.1rem;
  background: rgba(255,255,255,.9);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1;
}

.hero-stats span {
  color: var(--estate-muted);
  font-size: .93rem;
}

.section-band,
.bg-soft {
  background: var(--estate-soft);
}

.section-band,
.page-title,
.text-page {
  padding: clamp(2.25rem, 5vw, 4rem) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.filter-panel h2,
.contact-card h2,
.form-section h2,
.panel-box h2 {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.15;
  font-weight: 850;
}

.form-section h2,
.panel-box h2 {
  margin-bottom: .5em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-tile {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
}

.category-tile:hover {
  border-color: var(--estate-primary);
  text-decoration: none;
}

.category-tile span {
  font-weight: 800;
}

.category-tile small {
  color: var(--estate-muted);
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  transition: transform .16s ease, box-shadow .16s ease;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(23, 33, 43, .1);
}

.listing-card-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--estate-soft);
}

.listing-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-image .badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
}

.listing-card-body {
  padding: 1rem;
}

.listing-card-title {
  min-height: 3rem;
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 800;
}

.listing-card-title a {
  color: var(--estate-ink);
}

.listing-card-price {
  margin-bottom: .9rem;
  color: var(--estate-primary-dark);
  font-size: 1.25rem;
  font-weight: 850;
}

.listing-facts,
.detail-grid {
  display: grid;
  gap: .6rem;
  margin: 0;
}

.listing-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-facts div,
.detail-grid div {
  min-width: 0;
}

.listing-facts dt,
.detail-grid dt {
  color: var(--estate-muted);
  font-size: .78rem;
  font-weight: 700;
}

.listing-facts dd,
.detail-grid dd {
  margin: 0;
  font-weight: 800;
}

.filter-panel {
  position: sticky;
  top: 90px;
  padding: 1rem;
}

.empty-state {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.empty-state h2,
.empty-state h1,
.empty-state h3 {
  font-weight: 850;
}

.small-state {
  padding: 2rem;
}

.listing-show {
  padding: 1.5rem 0 4rem;
  background: var(--estate-soft);
}

.breadcrumb-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
  color: var(--estate-muted);
  font-size: .92rem;
}

.listing-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: .5rem;
  overflow: hidden;
  border-radius: 8px;
  background: var(--estate-line);
}

.listing-gallery a,
.listing-gallery > img {
  display: block;
  min-height: 100%;
}

.listing-gallery a:first-child {
  grid-row: 1 / span 2;
}

.listing-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-content,
.contact-card {
  padding: clamp(1rem, 3vw, 2rem);
}

.offer-content h1 {
  margin-bottom: .75rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 850;
}

.offer-location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  margin-bottom: .75rem;
  color: var(--estate-muted);
}

.offer-location .fa-map-marker-alt {
  color: var(--estate-accent);
  font-size: 1.05rem;
}

.offer-location-text {
  min-width: 0;
}

.offer-location-preview {
  font-weight: 800;
  white-space: nowrap;
}

.offer-price {
  color: var(--estate-primary-dark);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.5rem 0;
}

.detail-grid div {
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.offer-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--estate-line);
}

.offer-section h2 {
  margin-bottom: 1rem;
  font-size: 1.45rem;
  font-weight: 850;
}

.offer-description {
  color: #253342;
  font-size: 1.03rem;
  line-height: 1.78;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: .8rem 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.contact-card {
  position: sticky;
  top: 90px;
}

.lead-form {
  padding-top: 1rem;
  border-top: 1px solid var(--estate-line);
}

.editor-form .form-section + .form-section {
  margin-top: 1rem;
}

.form-section {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.form-side {
  top: 90px;
}

.feature-checks {
  display: grid;
  gap: .45rem;
}

.auth-page {
  padding: clamp(2rem, 6vw, 5rem) 0;
  background: var(--estate-warm);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.auth-shell-narrow {
  grid-template-columns: minmax(0, .75fr) minmax(320px, 480px);
}

.auth-shell h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 850;
}

.auth-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.panel-box {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.account-list {
  display: grid;
  gap: .75rem;
}

.account-list article {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
}

.account-list img {
  width: 96px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

.account-list h3 {
  margin: 0 0 .25rem;
  font-size: 1rem;
  font-weight: 800;
}

.account-list p {
  margin: 0;
  color: var(--estate-muted);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
  align-items: center;
}

.account-actions form {
  margin: 0;
}

.inquiry-list {
  display: grid;
  gap: .75rem;
}

.inquiry-list article {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--estate-line);
}

.inquiry-list span {
  display: block;
  color: var(--estate-muted);
  font-size: .9rem;
}

.inquiry-list p {
  margin: .5rem 0 0;
}

.import-source-list {
  display: grid;
  gap: .85rem;
}

.crm-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.crm-provider-card {
  display: grid;
  gap: .45rem;
  min-height: 148px;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.crm-provider-card strong {
  color: var(--estate-ink);
  line-height: 1.2;
}

.crm-provider-card > span:not(.badge) {
  color: var(--estate-primary);
  font-size: .86rem;
  font-weight: 800;
}

.crm-provider-card p {
  margin: 0;
  color: var(--estate-muted);
  font-size: .9rem;
}

.import-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.import-preview-summary div {
  display: grid;
  gap: .2rem;
  min-height: 78px;
  padding: .85rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #f7faf8;
}

.import-preview-summary span {
  color: var(--estate-muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.import-preview-summary strong {
  overflow-wrap: anywhere;
  color: var(--estate-ink);
  line-height: 1.25;
}

.import-source-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
}

.import-source-item h3 {
  font-size: 1.05rem;
  font-weight: 850;
}

.import-source-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  color: var(--estate-muted);
  font-size: .9rem;
}

.import-source-actions,
.form-stack {
  display: grid;
  gap: .75rem;
}

.import-source-actions {
  align-content: start;
}

.text-page-content {
  max-width: 820px;
}

.text-page-content p {
  color: #263646;
  font-size: 1.05rem;
  line-height: 1.75;
}

.footer-heading {
  font-size: .95rem;
  font-weight: 850;
}

.footer-links {
  display: grid;
  gap: .45rem;
}

.site-footer {
  background: #fbfcfd;
}

.brand-logo {
  display: block;
  width: min(192px, 52vw);
  height: auto;
}

.footer-logo {
  max-width: 192px;
}

.home-search-panel {
  border-top: 4px solid var(--estate-primary);
}

.search-tabs,
.filter-view,
.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.search-tabs {
  margin-bottom: 1rem;
}

.search-tabs label,
.filter-view label {
  flex: 1 1 120px;
}

.search-tabs input,
.filter-view input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-tabs span,
.filter-view span,
.view-switch a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: .55rem .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-weight: 800;
  text-align: center;
}

.search-tabs input:checked + span,
.filter-view input:checked + span,
.view-switch a.active {
  border-color: var(--estate-primary-dark);
  background: rgba(42, 40, 69, .13);
  color: var(--estate-primary);
}

.seo-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.seo-link-grid a {
  min-height: 76px;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-weight: 800;
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}

.search-save { position: relative; flex: none; }
.search-heading .search-save-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid #ddc6b6;
  border-radius: .7rem;
  background: #fff;
  color: var(--estate-ink);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}
.search-save-trigger::-webkit-details-marker { display: none; }
.search-save-trigger .fa-bookmark { color: var(--estate-accent); }
.search-save-chevron { margin-inline-start: .2rem; font-size: .65rem; }
.search-save[open] .search-save-chevron { transform: rotate(180deg); }
.search-heading .search-save-trigger:hover, .search-save[open] > summary {
  border-color: var(--cd-link);
  background: var(--estate-warm);
}
.save-search-form {
  position: absolute;
  inset: calc(100% + .5rem) 0 auto auto;
  z-index: 15;
  display: grid;
  gap: 1rem;
  width: 21rem;
  max-width: calc(100vw - 2rem);
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--estate-line);
  border-radius: .85rem;
  box-shadow: 0 8px 28px #2a28451a;
}
.save-search-form label { font-size: .9rem; }
.save-search-form label[for] { margin-bottom: .35rem; font-weight: 600; }
.save-search-form small { color: var(--estate-muted); font-weight: 400; }
.search-save-notify { display: flex; align-items: baseline; gap: .6rem; cursor: pointer; }
.search-save-notify input { flex: none; }
.save-search-form .btn { min-height: 44px; }
@media (max-width: 767px) {
  .search-heading:has(.search-save-trigger) { flex-direction: column; align-items: stretch; }
  .search-heading .search-save-trigger { align-self: start; }
  .save-search-form { position: static; width: 100%; max-width: none; margin-top: .6rem; box-shadow: none; }
}

.advanced-filter {
  display: grid;
  gap: .85rem;
}

.filter-group {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: .85rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.filter-group legend {
  float: none;
  width: auto;
  margin-bottom: .35rem;
  font-size: .92rem;
  font-weight: 850;
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
  align-items: end;
}

.filter-range label {
  grid-column: 1 / -1;
  color: var(--estate-ink);
  font-weight: 700;
}

.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.result-toolbar strong {
  font-size: 1.25rem;
}

.result-toolbar span {
  color: var(--estate-muted);
}

.view-switch a {
  min-width: 88px;
  min-height: 38px;
}

.listing-card-promoted {
  border-color: rgba(42, 40, 69, .42);
  box-shadow: 0 18px 38px rgba(42, 40, 69, .12);
}

.listing-card-media {
  position: relative;
}

.listing-card-badges {
  position: absolute;
  top: .75rem;
  left: .75rem;
  right: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  pointer-events: none;
}

.favorite-form {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  margin: 0;
}

.favorite-button {
  min-width: 110px;
  min-height: 38px;
  padding: .45rem .75rem;
  border: 1px solid rgba(65, 73, 82, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  color: var(--estate-ink);
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(65, 73, 82, .16);
}

.favorite-button.active,
.favorite-inline-form .btn.active {
  border-color: var(--estate-primary-dark);
  background: var(--estate-primary);
  color: #fff;
}

.listing-card-meta,
.listing-seller-row,
.listing-price-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
}

.listing-card-meta,
.listing-seller-row {
  color: var(--estate-muted);
  font-size: .9rem;
}

.listing-card-meta span:first-child,
.listing-seller-row span:last-child,
.listing-seller-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-price-row {
  align-items: baseline;
}

.listing-price-row span,
.offer-price-row span {
  color: var(--estate-muted);
  font-weight: 800;
  white-space: nowrap;
}

.listing-seller-row {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--estate-line);
}

.map-board {
  display: grid;
  min-height: 360px;
  gap: .6rem;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--estate-soft), #f5ede8);
}

.map-board-empty {
  align-self: center;
  justify-self: center;
  color: var(--estate-muted);
  font-weight: 850;
}

.map-source {
  padding: .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-weight: 800;
}

.leaflet-board .map-source {
  display: none;
}

.map-ready {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(180deg, var(--estate-soft), var(--estate-warm));
  background-size: 48px 48px, 48px 48px, auto;
}

.map-ready .map-source,
.map-ready .map-board-empty {
  display: none;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 190px;
  padding: .45rem .6rem;
  border: 1px solid var(--estate-primary-dark);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-size: .82rem;
  font-weight: 850;
  box-shadow: 0 12px 30px rgba(65, 73, 82, .18);
}

.map-pin small {
  display: block;
  color: var(--estate-muted);
  font-weight: 700;
}

.offer-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: baseline;
}

.offer-section-first {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: 0;
}

.media-list li {
  background: var(--estate-soft);
}

.gallery-modal-content {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #111820;
}

.gallery-modal-content img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.gallery-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  background-color: rgba(255, 255, 255, .85);
}

.report-form {
  max-width: 760px;
}

.account-nav {
  display: flex;
  flex-flow: column nowrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.account-nav a {
  min-height: 40px;
  padding: .5rem .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-weight: 800;
}

.account-nav a.active {
  border-color: var(--estate-primary-dark);
  background: rgba(42, 40, 69, .13);
}

.saved-search-list,
.inquiry-table,
.stats-table {
  display: grid;
  gap: .75rem;
}

.saved-search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.saved-search-item h2 {
  margin-bottom: .35rem;
}

.saved-search-item p {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .75rem;
}

.saved-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.inquiry-table article {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(0, 1.25fr) auto;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--estate-line);
}

.inquiry-table span,
.inquiry-table small {
  display: block;
  color: var(--estate-muted);
}

.inquiry-table p {
  margin: .45rem 0 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}

.stats-grid div {
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.stats-grid span {
  display: block;
  color: var(--estate-muted);
  font-size: .9rem;
  font-weight: 700;
}

.stats-grid strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.stats-table-head,
.stats-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(90px, .18fr));
  gap: .75rem;
  align-items: center;
}

.stats-table-head {
  color: var(--estate-muted);
  font-size: .85rem;
  font-weight: 850;
}

.stats-table-row {
  padding: .85rem 0;
  border-top: 1px solid var(--estate-line);
  color: var(--estate-ink);
}

.agency-hero {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background: var(--estate-soft);
}

.agency-profile {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(180px, auto);
  gap: 1rem;
  align-items: center;
}

.agency-logo {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-primary-dark);
  font-size: 2.4rem;
  font-weight: 850;
}

.agency-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .75rem;
}

.agency-contact {
  display: grid;
  gap: .5rem;
}

.agency-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.5rem;
}

.agency-facts div {
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.agency-facts span,
.opening-hours dt {
  color: var(--estate-muted);
  font-size: .9rem;
  font-weight: 700;
}

.agency-facts strong,
.opening-hours dd {
  display: block;
  margin: 0;
  font-weight: 850;
}

.one-column {
  grid-template-columns: 1fr;
}

.opening-hours {
  display: grid;
  gap: .45rem;
  margin: 0;
}

.opening-hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--estate-line);
}

.leaflet-board {
  display: block;
  min-height: 440px;
  padding: 0;
  overflow: hidden;
  background: #f5ede8;
}

.leaflet-board .leaflet-container {
  min-height: inherit;
}

.map-board-large {
  min-height: calc(100vh - 190px);
}

.map-search-shell {
  padding: 1rem;
  background: var(--estate-soft);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: stretch;
}

.map-filter-panel {
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.map-results {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.map-result-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--estate-line);
  color: var(--estate-ink);
}

.map-result-item img {
  width: 88px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
}

.map-result-item span {
  display: grid;
  min-width: 0;
  gap: .12rem;
}

.map-result-item strong,
.map-result-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-result-item small {
  color: var(--estate-muted);
}

.map-result-item b {
  color: var(--estate-primary-dark);
}

.map-popup {
  display: grid;
  width: 240px;
  gap: .6rem;
}

.map-popup img {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  object-fit: cover;
}

.map-popup div,
.map-popup-badges {
  display: grid;
  gap: .3rem;
}

.map-popup-badges {
  display: flex;
  flex-wrap: wrap;
}

.map-popup-badges span {
  padding: .12rem .35rem;
  border-radius: 6px;
  background: rgba(42, 40, 69, .13);
  color: var(--estate-primary);
  font-size: .72rem;
  font-weight: 850;
}

.map-popup strong {
  line-height: 1.25;
}

.map-popup small {
  color: var(--estate-muted);
}

.map-popup b {
  color: var(--estate-primary-dark);
}

.compare-link.active,
.compare-toggle.active {
  border-color: var(--estate-primary-dark);
  background: rgba(42, 40, 69, .13);
  color: var(--estate-primary);
}

.compare-toggle {
  width: 100%;
  min-height: 38px;
  margin-top: .85rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-ink);
  font-weight: 850;
}

.offer-compare {
  width: auto;
  padding: .5rem .8rem;
}

.listing-card-price small,
.price-before {
  display: block;
  color: var(--estate-muted);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: line-through;
}

.embed-grid,
.floorplan-grid,
.faq-grid,
.promotion-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.embed-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #111820;
}

.floorplan-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.floorplan-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.price-history {
  display: grid;
  gap: 1rem;
}

.price-history-bars {
  display: flex;
  height: 120px;
  align-items: end;
  gap: .5rem;
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.price-history-bars span {
  display: block;
  flex: 1;
  min-width: 16px;
  min-height: 20px;
  border-radius: 6px 6px 0 0;
  background: var(--estate-primary);
}

.price-history-list {
  display: grid;
  gap: .45rem;
}

.price-history-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--estate-line);
}

.mortgage-calculator {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}

.mortgage-calculator label,
.mortgage-calculator > div {
  display: grid;
  gap: .35rem;
}

.mortgage-calculator span {
  color: var(--estate-muted);
  font-size: .86rem;
  font-weight: 800;
}

.mortgage-calculator strong {
  min-height: 38px;
  padding: .45rem .65rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-primary-dark);
}

.listing-location-map {
  min-height: 280px;
}

.listing-location-modal-map {
  height: clamp(360px, 64vh, 560px);
  min-height: 360px;
  border-radius: 0;
}

.location-preview-modal .modal-body {
  padding: 0;
}

.location-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-top: 1px solid var(--estate-line);
}

.location-modal-actions span {
  min-width: 0;
  color: var(--estate-muted);
  font-weight: 700;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.compare-card {
  display: grid;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.compare-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.compare-card strong {
  display: block;
  min-height: 2.7rem;
  color: var(--estate-ink);
  line-height: 1.35;
}

.compare-remove {
  min-height: 36px;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
  color: var(--estate-muted);
  font-weight: 800;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  min-width: 760px;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.notification-settings-list,
.notification-event-list,
.promotion-list {
  display: grid;
  gap: .75rem;
}

.notification-settings-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(150px, .35fr) auto;
  gap: .75rem;
  align-items: center;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--estate-line);
}

.notification-settings-item div,
.notification-event-list article,
.promotion-list article {
  display: grid;
  gap: .25rem;
}

.notification-settings-item span,
.notification-event-list span,
.notification-event-list small,
.promotion-list span,
.promotion-list time {
  color: var(--estate-muted);
  font-size: .9rem;
}

.notification-event-list article,
.promotion-list article {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--estate-line);
}

.lead-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 1rem;
  overflow-x: auto;
}

.lead-column {
  min-height: 420px;
  padding: .75rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.lead-column-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: .75rem;
}

.lead-column-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.lead-column-head span {
  display: grid;
  min-width: 32px;
  min-height: 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(42, 40, 69, .13);
  color: var(--estate-primary);
  font-weight: 850;
}

.lead-card {
  display: grid;
  gap: .55rem;
  margin-bottom: .75rem;
  padding: .85rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.lead-card-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
}

.lead-card span,
.lead-card small,
.lead-card time {
  color: var(--estate-muted);
  font-size: .86rem;
}

.lead-card p {
  margin: 0;
}

.lead-status-form,
.lead-note-form {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1fr) auto;
  gap: .4rem;
}

.lead-note-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.lead-notes {
  display: grid;
  gap: .25rem;
  padding: .55rem;
  border-radius: 8px;
  background: var(--estate-soft);
}

.lead-empty {
  padding: 1rem;
  color: var(--estate-muted);
  text-align: center;
}

.promotion-package-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promotion-package,
.faq-grid article {
  padding: 1rem;
  border: 1px solid var(--estate-line);
  border-radius: 8px;
  background: #fff;
}

.promotion-package {
  display: grid;
  gap: .45rem;
}

.promotion-package span,
.promotion-package p {
  color: var(--estate-muted);
}

.promotion-package b {
  color: var(--estate-primary-dark);
}

.faq-grid article h3 {
  font-size: 1.05rem;
  font-weight: 850;
}

@media (max-width: 991.98px) {
  .site-header {
    position: static;
  }

  .section-heading,
  .auth-shell {
    display: block;
  }

  .section-heading .btn,
  .auth-card {
    margin-top: 1rem;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-link-grid,
  .stats-grid,
  .agency-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel,
  .contact-card,
  .form-side {
    position: static;
  }

  .listing-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 300px 170px 170px;
  }

  .listing-gallery a:first-child {
    grid-column: 1 / span 2;
    grid-row: auto;
  }

  .agency-profile,
  .saved-search-item,
  .notification-settings-item,
  .inquiry-table article {
    grid-template-columns: 1fr;
  }

  .map-layout,
  .mortgage-calculator {
    grid-template-columns: 1fr;
  }

  .map-board-large,
  .map-results {
    min-height: 460px;
    max-height: none;
  }

  .compare-grid,
  .promotion-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agency-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-table {
    overflow-x: auto;
  }

  .stats-table-head,
  .stats-table-row {
    min-width: 720px;
  }
}

@media (max-width: 575.98px) {
  .hero-stats,
  .category-grid,
  .seo-link-grid,
  .stats-grid,
  .agency-facts,
  .detail-grid,
  .feature-list,
  .embed-grid,
  .floorplan-grid,
  .faq-grid,
  .compare-grid,
  .promotion-package-grid {
    grid-template-columns: 1fr;
  }

  .listing-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-gallery {
    display: block;
    border-radius: 0;
    margin-right: calc(var(--bs-gutter-x) * -.5);
    margin-left: calc(var(--bs-gutter-x) * -.5);
  }

  .listing-gallery a {
    display: none;
    height: 320px;
  }

  .listing-gallery a:first-child,
  .listing-gallery > img {
    display: block;
    height: 320px;
  }

  .account-list article {
    grid-template-columns: 80px 1fr;
  }

  .account-list article .badge {
    grid-column: 2;
    justify-self: start;
  }

  .account-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .account-list img {
    width: 80px;
    height: 68px;
  }

  .import-source-item {
    grid-template-columns: 1fr;
  }

  .crm-provider-grid,
  .import-preview-summary {
    grid-template-columns: 1fr;
  }

  .import-source-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .import-source-actions .btn {
    width: 100%;
  }

  .title-actions,
  .agency-contact {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .listing-card-meta,
  .listing-seller-row,
  .listing-price-row {
    display: grid;
  }

  .map-board {
    min-height: 420px;
  }

  .map-search-shell {
    padding: .75rem 0;
  }

  .lead-status-form {
    grid-template-columns: 1fr;
  }
}

.listing-dropzone {display:grid; justify-items:center; gap:.65rem; padding:1.2rem; border:2px dashed var(--estate-primary,#45416a); border-radius:.75rem; background:var(--estate-soft,#f7f7fa); text-align:center; cursor:pointer;}
.listing-dropzone:focus-within,.listing-dropzone.is-over {outline:3px solid var(--estate-primary,#45416a); outline-offset:2px;}
.listing-dropzone i {font-size:1.5rem;}
.listing-dropzone .form-control {max-width:24rem;}
.photo-upload-list {display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,10rem),1fr)); gap:.75rem; padding:0; list-style:none;}
.photo-upload-list li {display:grid; align-content:start; gap:.4rem; padding:.65rem; border:1px solid #ddd; border-radius:.6rem; overflow-wrap:anywhere;}
.photo-upload-list img {width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:.35rem;}
.photo-upload-list progress {width:100%;}
