* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0c1220;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.estate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.95);
}
.estate-brand { display: flex; align-items: baseline; gap: 10px; }
.estate-logo { font-size: 1.35rem; font-weight: 800; color: #5eead4; letter-spacing: -0.02em; }
.estate-tag { font-size: 0.78rem; color: #94a3b8; }
.estate-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  50% { opacity: 0.5; }
}
.estate-header a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.estate-header a:hover { color: #fff; }

.estate-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.tb-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.tb-pill.active {
  background: rgba(45, 212, 191, 0.15);
  color: #5eead4;
  border-color: #2dd4bf;
}
.tb-pill.disabled { opacity: 0.4; cursor: default; }

.estate-dash {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 24px;
  min-height: 0;
}
.dash-intro {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 72ch;
  line-height: 1.45;
}

/* 2×2 equal dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(300px, 38vh));
  gap: 14px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(280px, 360px);
  }
}

.dash-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}
.panel-hint {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.map-host {
  flex: 1;
  min-height: 180px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.6);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.68rem;
  color: #94a3b8;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lg-swatch {
  width: 20px;
  height: 8px;
  border-radius: 2px;
}

.bar-chart {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding-right: 4px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
}
.bar-row .name {
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row .val {
  text-align: right;
  font-weight: 700;
  color: #5eead4;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  grid-column: 1 / -1;
  height: 10px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease, background 0.3s;
}

.listing-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
  align-content: start;
}
@media (max-width: 600px) {
  .listing-grid { grid-template-columns: 1fr; }
}
.list-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.list-card-visual {
  height: 72px;
  background: linear-gradient(120deg, #134e4a, #1e3a5f, #7c2d12);
  position: relative;
}
.list-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
  padding: 3px 6px;
  border-radius: 4px;
}
.list-card-body { padding: 10px 10px 12px; }
.list-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 4px;
}
.list-card-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0 0 6px;
}
.list-card-addr {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.bubble-stage {
  flex: 1;
  position: relative;
  min-height: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
}
.bubble-map-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(45, 212, 191, 0.08), transparent),
    linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  opacity: 1;
}
.bubble-map-bg::after {
  content: "Jaipur";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  color: rgba(148, 163, 184, 0.07);
  letter-spacing: 0.2em;
  pointer-events: none;
}
.bubble-layer {
  position: absolute;
  inset: 0;
}
.bubble-item {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: default;
  transition: transform 0.35s ease, background 0.35s;
}
.bubble-item .b-yoy {
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.95);
  line-height: 1;
}
.bubble-item .b-name {
  font-size: 0.52rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
  max-width: 56px;
  text-align: center;
  line-height: 1.1;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubble-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.7rem;
  color: #94a3b8;
}
.bubble-legend .lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.bubble-legend .lg.up { background: #3b82f6; }
.bubble-legend .lg.mid { background: #d6b27a; }
.bubble-legend .lg.down { background: #f97316; }

.fineprint {
  margin: 14px 0 0;
  font-size: 0.72rem;
  color: #64748b;
  max-width: 70ch;
}
.fineprint code {
  background: rgba(30, 41, 59, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.estate-foot {
  padding: 12px 20px;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.estate-foot p { margin: 0; }

.leaflet-container { background: #1e293b; font-family: inherit; }
