:root{
  --available:#77B95A;
  --hold:#F3C43A;
  --booked:#F2993A;
  --sold:#E15852;
  --park:#46C8D7;
  --amenities:#A55AD8;
  --utility:#3E86F5;
  --boundary:#2036B5;
  --ink:#181B1F;
  --muted:#6F7780;
  --card:rgba(255,255,255,.965);
  --hair:rgba(28,34,42,.10);
  --shadow:0 14px 34px rgba(10,24,58,.16);
}
*{box-sizing:border-box}
html,body,#map{height:100%;margin:0}
body{
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:#d8e0e4;
  overflow:hidden;
}
button,a{font:inherit}
#map{position:absolute;inset:0}

/* ---------- COMPACT PROJECT CONTROL ---------- */
.inventory-shell{
  position:absolute;
  z-index:30;
  top:12px;
  left:12px;
  width:min(348px,calc(100vw - 24px));
}
.inventory-card{
  background:var(--card);
  border:1px solid rgba(255,255,255,.82);
  border-radius:15px;
  box-shadow:0 10px 28px rgba(0,0,0,.14);
  backdrop-filter:blur(12px);
  background:linear-gradient(180deg,rgba(255,255,255,.985) 0%,rgba(250,252,255,.955) 100%);
  padding:11px 11px 9px;
  overflow:hidden;
}
.brand-row{
  display:flex;
  align-items:flex-start;
  gap:9px;
  position:relative;
}
.inventory-card::before{
  content:'';
  position:absolute;
  left:0;right:0;top:0;
  height:4px;
  background:transparent;
}
.brand-copy{flex:1;min-width:0}
.eyebrow{
  color:#4A5057;
  font-size:8px;
  line-height:1;
  font-weight:850;
  letter-spacing:.95px;
  text-transform:uppercase;
  margin:1px 0 5px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:0;
  border-radius:0;
  background:transparent;
}
.project-title{
  font-size:18.5px;
  line-height:1.02;
  font-weight:830;
  letter-spacing:-.42px;
  margin:0;
}
.project-meta{
  margin-top:4px;
  font-size:9.3px;
  color:#6A7280;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand-row::after{
  content:'';
  position:absolute;
  left:0;right:0;bottom:-7px;
  height:1px;
  background:rgba(34,39,44,.08);
}
.refresh-btn{
  width:31px;
  height:31px;
  flex:0 0 31px;
  border:1px solid var(--hair);
  border-radius:9px;
  background:linear-gradient(180deg,#ffffff 0%,#f6f7f8 100%);
  color:#30343A;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.refresh-btn:hover{background:#f7f8f8}
.refresh-btn.loading{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* Counts: compact, information-first */
.stat-strip{
  margin-top:9px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:4px;
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent;
}
.stat{
  min-width:0;
  padding:5px 4px 5px;
  text-align:center;
  border:1px solid rgba(32,54,181,.08);
  border-radius:10px;
  background:rgba(255,255,255,.92);
}
.stat:last-child{border-right:1px solid var(--hair)}
.stat-top{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  line-height:1;
}
.stat-dot{width:6px;height:6px;border-radius:50%;flex:0 0 6px}
.stat-count{font-size:11.5px;font-weight:850}
.stat-label{
  margin-top:2px;
  font-size:7.2px;
  color:#666E76;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stat:nth-child(1){background:linear-gradient(180deg,rgba(119,185,90,.14) 0%,rgba(255,255,255,.95) 100%)}
.stat:nth-child(2){background:linear-gradient(180deg,rgba(243,196,58,.15) 0%,rgba(255,255,255,.95) 100%)}
.stat:nth-child(3){background:linear-gradient(180deg,rgba(242,153,58,.14) 0%,rgba(255,255,255,.95) 100%)}
.stat:nth-child(4){background:linear-gradient(180deg,rgba(225,88,82,.13) 0%,rgba(255,255,255,.95) 100%)}
.stat:nth-child(1) .stat-count{color:#45853b}
.stat:nth-child(2) .stat-count{color:#9f7300}
.stat:nth-child(3) .stat-count{color:#ba650d}
.stat:nth-child(4) .stat-count{color:#b13731}

.filter-dock{
  margin-top:6px;
  display:flex;
  gap:4px;
  overflow:auto;
  scrollbar-width:none;
}
.filter-dock::-webkit-scrollbar{display:none}
.filter-btn{
  flex:0 0 auto;
  border:1px solid var(--hair);
  background:rgba(255,255,255,.96);
  color:#4B535B;
  border-radius:999px;
  padding:4px 8px;
  font-size:8px;
  font-weight:760;
  cursor:pointer;
}
.filter-btn:hover{background:#fff}
.filter-btn.active{
  color:#fff;
  background:linear-gradient(180deg,#3A4046 0%,#24292E 100%);
  border-color:#24292E;
  box-shadow:0 4px 11px rgba(0,0,0,.16);
}

/* ---------- MAP LABELS: quieter than before ---------- */
.plot-label{
  position:absolute;
  transform:translate(-50%,-50%);
  transform-origin:center;
  min-width:14px;
  height:14px;
  padding:0 2px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#151718;
  font-size:7.8px;
  font-weight:830;
  line-height:1;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(25,31,40,.22);
  border-radius:3px;
  box-shadow:0 1px 2px rgba(0,0,0,.08);
  user-select:none;
  cursor:pointer;
  white-space:nowrap;
}
.plot-label:hover,.plot-label.selected{
  background:#ffffff;
  border-color:#2E3338;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
  z-index:100;
}
.common-label{
  position:absolute;
  transform:translate(-50%,-50%);
  transform-origin:center;
  padding:2px 5px;
  background:rgba(255,255,255,.90);
  border:1px solid rgba(32,33,36,.26);
  border-radius:4px;
  font-size:6px;
  font-weight:830;
  letter-spacing:.08px;
  color:#202124;
  white-space:nowrap;
  pointer-events:none;
  box-shadow:0 1px 2px rgba(0,0,0,.07);
}
.gate-label{pointer-events:auto;cursor:pointer}
.park-label{font-size:6.4px;padding:2px 5px}

/* ---------- QUIET LEGEND ---------- */
.legend{
  position:absolute;
  z-index:25;
  left:12px;
  bottom:12px;
}
.legend-toggle{
  border:1px solid var(--hair);
  background:rgba(255,255,255,.97);
  border-radius:999px;
  padding:6px 9px;
  font-size:8px;
  font-weight:800;
  box-shadow:0 3px 12px rgba(0,0,0,.13);
  cursor:pointer;
}
.legend-body{
  display:none;
  position:absolute;
  left:0;
  bottom:35px;
  min-width:125px;
  padding:7px 9px;
  background:rgba(255,255,255,.985);
  border:1px solid rgba(255,255,255,.65);
  border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,.16);
  font-size:8.4px;
}
.legend.open .legend-body{display:block}
.legend-row{display:flex;align-items:center;gap:6px;margin:4px 0;white-space:nowrap}
.swatch{width:8px;height:8px;border-radius:2px;border:1px solid rgba(0,0,0,.10)}

/* ---------- SELECTED PLOT CARD ---------- */
.detail-card{
  position:absolute;
  z-index:45;
  right:14px;
  bottom:14px;
  width:288px;
  max-height:calc(100vh - 96px);
  display:none;
  overflow:auto;
  padding:13px;
  background:linear-gradient(180deg,rgba(255,255,255,.985) 0%,rgba(250,252,255,.97) 100%);
  border:1px solid rgba(255,255,255,.72);
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.22);
  backdrop-filter:blur(8px);
}
.detail-card.open{display:block}
.detail-head{display:flex;align-items:center;gap:9px}
.detail-title{
  flex:1;
  font-size:18px;
  font-weight:850;
  letter-spacing:-.28px
}
.close-btn{
  width:28px;height:28px;border:0;border-radius:50%;
  background:#F2F3F4;color:#3C4043;cursor:pointer;font-size:16px
}
.status-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  margin:7px 0 11px;
  font-size:9px;
  font-weight:850;
  color:#fff;
}
.detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 12px;
}
.detail-k{
  font-size:7.8px;
  color:#6A7280;
  margin-bottom:2px;
  text-transform:uppercase;
  letter-spacing:.35px
}
.detail-v{font-size:12px;font-weight:740;color:#202124}
.detail-note{
  margin-top:10px;padding-top:9px;border-top:1px solid #ECEFF1;
  font-size:10px;color:#626970;line-height:1.45
}
.actions{display:flex;gap:7px;margin-top:12px}
.action{
  flex:1;border:0;border-radius:8px;padding:9px;text-align:center;
  text-decoration:none;font-size:9.5px;font-weight:830;cursor:pointer
}
.whatsapp{background:linear-gradient(180deg,#23C364 0%,#17A853 100%);color:#fff}
.share{background:linear-gradient(180deg,#f7f9fb 0%,#eef2f7 100%);color:#202124}

/* ---------- DESKTOP HOVER ---------- */
.hover-card{
  position:absolute;z-index:60;display:none;pointer-events:none;
  min-width:140px;max-width:205px;padding:7px 9px;
  background:rgba(255,255,255,.97);border-radius:8px;
  box-shadow:0 3px 13px rgba(0,0,0,.20);
  font-size:9.5px;line-height:1.35
}
.hover-card.open{display:block}
.hover-title{font-size:11px;font-weight:850;margin-bottom:2px}
.hover-status{font-weight:850;margin-bottom:3px}

/* ---------- ERROR ---------- */
.error-card{
  position:absolute;z-index:100;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(520px,calc(100vw - 32px));padding:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f7f9fd 100%);border-radius:16px;box-shadow:0 12px 40px rgba(12,22,52,.22);
  line-height:1.45
}
.error-card h2{margin:0 0 8px;font-size:18px}
.error-card p{margin:5px 0;font-size:12px;color:#525960}
.error-card code{font-size:11px}

/* ---------- MOBILE / TABLET ---------- */
@media(max-width:1024px),(hover:none) and (pointer:coarse){
  .inventory-shell{
    top:7px;
    left:7px;
    width:min(390px,calc(100vw - 14px))
  }
  .inventory-card{border-radius:12px;padding:8px 9px 7px}
  .eyebrow{font-size:6.8px;margin:1px 0 3px}
  .project-title{font-size:15.5px}
  .project-meta{font-size:8px;margin-top:2px}
  .refresh-btn{
    width:29px;height:29px;flex-basis:29px;
    font-size:14px;border-radius:8px
  }
  .stat-strip{margin-top:6px;gap:3px}
  .stat{padding:4px 3px 3px;border-radius:7px}
  .stat-count{font-size:9.5px}
  .stat-dot{width:5px;height:5px;flex-basis:5px}
  .stat-label{font-size:6.2px}
  .filter-dock{margin-top:5px;gap:3px}
  .filter-btn{font-size:7px;padding:3.5px 6px}
  .legend{left:8px;bottom:8px}
  .legend-toggle{font-size:7.5px;padding:5px 8px}
  .legend-body{bottom:32px}
  .detail-card{
    left:8px;right:8px;bottom:8px;width:auto;max-height:44vh;
    border-radius:14px;padding:11px
  }
  .detail-title{font-size:15.5px}
  .plot-label{
    min-width:12px;height:12px;font-size:6.8px;
    background:rgba(255,255,255,.82)
  }
  .common-label{font-size:5.3px;padding:1.5px 4px}
  .park-label{font-size:5.8px}
}
