:root{
  --navy:#12324a; --navy-2:#1d4a6b; --sand:#f6f2ea; --ink:#1c2430; --muted:#5f6b78;
  --line:#e2ddd2; --accent:#2f8f6b; --white:#fff;
  --interior:#1fd65a; --golf:#e5322d; --lake:#1f8fff; --undeveloped:#f2d600;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:Inter,system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--sand);display:flex;flex-direction:column}
.topbar{height:64px;display:flex;align-items:center;gap:20px;padding:0 20px;background:var(--navy);color:var(--white);z-index:1000;flex-shrink:0}
.brand{display:flex;flex-direction:column;line-height:1.1;min-width:max-content}
.brand-title{font-family:"Playfair Display",Georgia,serif;font-size:20px;letter-spacing:.2px}
.brand-sub{font-size:11px;text-transform:uppercase;letter-spacing:1.6px;opacity:.75;margin-top:3px}
.search-wrap{position:relative;flex:1;max-width:520px}
#search{width:100%;height:40px;border-radius:8px;border:0;padding:0 14px;font:inherit;font-size:14px;background:rgba(255,255,255,.95)}
.search-results{position:absolute;top:44px;left:0;right:0;background:#fff;color:var(--ink);border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.2);max-height:360px;overflow:auto}
.search-results button{display:block;width:100%;text-align:left;padding:10px 14px;border:0;background:none;font:inherit;font-size:13px;cursor:pointer;border-bottom:1px solid #f0ece4}
.search-results button:hover,.search-results button:focus{background:#f4efe5}
.search-results small{color:var(--muted);display:block;margin-top:2px}
.btn-ghost{margin-left:auto;background:transparent;color:#fff;border:1px solid rgba(255,255,255,.4);border-radius:8px;height:36px;padding:0 14px;font:inherit;font-size:13px;cursor:pointer}
.layout{flex:1;display:flex;min-height:0;position:relative}
.sidebar{width:320px;flex-shrink:0;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:12px;border-right:1px solid var(--line)}
.sidebar.collapsed{display:none}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px}
.card h3{margin:0 0 10px;font-size:12px;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted);font-weight:600}
.stat-row{display:flex;gap:24px}
.stat{font-size:26px;font-weight:700;color:var(--navy);font-variant-numeric:tabular-nums}
.stat-label{font-size:12px;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#faf8f3;border-radius:999px;padding:5px 10px;font-size:12.5px;cursor:pointer;user-select:none}
.chip.off{opacity:.45;background:#fff}
.chip .sw{width:10px;height:10px;border-radius:2px;border:1px solid rgba(0,0,0,.35)}
.chip .n{color:var(--muted);font-variant-numeric:tabular-nums}
.field{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin:6px 0;gap:10px}
.field select{font:inherit;font-size:13px;padding:5px 8px;border:1px solid var(--line);border-radius:6px;background:#fff;min-width:130px}
.check{display:flex;align-items:center;gap:8px;font-size:13px;margin:8px 0}
.btn-link{background:none;border:0;color:var(--navy-2);font:inherit;font-size:12.5px;cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px}
.list-card{flex:1;min-height:220px;display:flex;flex-direction:column}
.list-head{display:flex;justify-content:space-between;align-items:baseline}
.lot-list{list-style:none;margin:0;padding:0;overflow:auto;max-height:420px}
.lot-list li{padding:8px 4px;border-bottom:1px solid #f0ece4;font-size:13px;cursor:pointer;display:flex;gap:8px;align-items:flex-start}
.lot-list li:hover{background:#faf6ee}
.lot-list .sw{width:10px;height:10px;border-radius:2px;margin-top:4px;flex-shrink:0;border:1px solid rgba(0,0,0,.35)}
.lot-list small{color:var(--muted);display:block}
.map-wrap{flex:1;position:relative;min-width:0}
#map{position:absolute;inset:0;background:#dfe6e9}
.legend{position:absolute;left:12px;bottom:24px;background:rgba(255,255,255,.95);border-radius:10px;padding:10px 12px;font-size:12px;z-index:500;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.legend div{display:flex;align-items:center;gap:8px;margin:3px 0}
.legend .sw{width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.4)}
.basemap-toggle{position:absolute;top:12px;left:56px;z-index:500;display:flex;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.basemap-toggle button{border:0;background:#fff;padding:8px 12px;font:inherit;font-size:12.5px;cursor:pointer}
.basemap-toggle button.active{background:var(--navy);color:#fff}
.detail{position:absolute;top:12px;right:12px;bottom:12px;width:360px;max-width:calc(100% - 24px);background:#fff;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.25);z-index:600;overflow:auto;padding:20px 20px 24px}
.detail-close{position:absolute;top:10px;right:12px;border:0;background:none;font-size:26px;line-height:1;cursor:pointer;color:var(--muted)}
.detail .type-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;text-transform:uppercase;letter-spacing:1.2px;font-weight:600;color:var(--muted)}
.detail h2{font-family:"Playfair Display",Georgia,serif;font-size:22px;margin:6px 0 2px;color:var(--navy);padding-right:24px}
.detail .sub{color:var(--muted);font-size:13px;margin-bottom:14px}
.detail .quick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.detail .quick div{background:var(--sand);border-radius:8px;padding:8px 10px}
.detail .quick b{display:block;font-size:15px;color:var(--navy)}
.detail .quick span{font-size:11px;color:var(--muted)}
.detail table{width:100%;border-collapse:collapse;font-size:13px}
.detail td{padding:7px 0;border-bottom:1px solid #f0ece4;vertical-align:top}
.detail td:first-child{color:var(--muted);width:46%}
.detail td:last-child{font-weight:500}
.detail .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.detail .actions a,.detail .actions button{display:inline-flex;align-items:center;height:34px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--navy);font:inherit;font-size:12.5px;font-weight:500;text-decoration:none;cursor:pointer}
.detail .actions .primary{background:var(--navy);color:#fff;border-color:var(--navy)}
.detail .muted-note{font-size:11.5px;color:var(--muted);margin-top:14px;line-height:1.5}
.leaflet-tooltip.lot-tip{font-family:Inter,sans-serif;font-size:12px;border-radius:6px;padding:6px 8px}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--navy);color:#fff;padding:10px 16px;border-radius:8px;font-size:13px;z-index:2000}
@media (max-width:860px){
  .brand-sub{display:none}
  .sidebar{position:absolute;top:0;left:0;bottom:0;z-index:1100;background:var(--sand);width:300px;box-shadow:6px 0 20px rgba(0,0,0,.15)}
  .detail{top:auto;left:8px;right:8px;bottom:8px;width:auto;max-height:62%}
}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.top-actions .btn-ghost{margin-left:0}
.admin-badge{font-size:12px;background:rgba(255,255,255,.14);border-radius:999px;padding:6px 10px;white-space:nowrap}
.colorby-toggle{position:absolute;top:52px;left:56px;z-index:500;display:flex;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.colorby-toggle button{border:0;background:#fff;padding:8px 12px;font:inherit;font-size:12.5px;cursor:pointer}
.colorby-toggle button.active{background:var(--navy);color:#fff}
.price-tag{font-size:20px;font-weight:700;color:var(--accent);margin:-6px 0 14px;font-variant-numeric:tabular-nums}
.status-pill{display:inline-block;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;margin-left:8px;vertical-align:middle;letter-spacing:.3px}
.edit-box{margin-top:18px;border:1px solid var(--line);border-radius:10px;padding:14px;background:#fbfaf6}
.edit-box h3{margin:0 0 10px;font-size:12px;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted)}
.edit-box label{display:block;font-size:12.5px;color:var(--muted);margin:8px 0 4px}
.edit-box select,.edit-box input,.edit-box textarea{width:100%;font:inherit;font-size:13.5px;padding:8px 10px;border:1px solid #d6d0c3;border-radius:7px;background:#fff;color:var(--ink)}
.edit-box textarea{min-height:84px;resize:vertical}
.edit-box .row{display:flex;gap:8px;align-items:center;margin-top:12px}
.edit-box .saved{font-size:12px;color:var(--accent)}
.edit-box .err{font-size:12px;color:#b3261e}
.history{margin-top:12px;font-size:12px;color:var(--muted)}
.history summary{cursor:pointer}
.history li{margin:4px 0}
.notes-view{white-space:pre-wrap;background:#fff8e6;border:1px solid #f1e2b8;border-radius:8px;padding:8px 10px;font-size:13px;margin-top:10px}
.btn-primary{background:var(--navy);color:#fff;border:0;border-radius:8px;height:36px;padding:0 16px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.btn-primary[disabled]{opacity:.6;cursor:default}
.btn-secondary{background:#fff;color:var(--navy);border:1px solid var(--line);border-radius:8px;height:36px;padding:0 14px;font:inherit;font-size:13px;cursor:pointer}
.modal{position:fixed;inset:0;background:rgba(12,24,36,.55);display:flex;align-items:center;justify-content:center;z-index:3000;padding:16px}
.modal[hidden]{display:none}
.modal-card{background:#fff;border-radius:14px;padding:24px;width:380px;max-width:100%;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-card h2{font-family:"Playfair Display",Georgia,serif;margin:0 0 6px;color:var(--navy)}
.modal-card p{font-size:13px;color:var(--muted);margin:0 0 14px;line-height:1.5}
.modal-card label{display:block;font-size:12.5px;color:var(--muted);margin:10px 0 0}
.modal-card input{display:block;width:100%;margin-top:4px;font:inherit;font-size:14px;padding:9px 10px;border:1px solid #d6d0c3;border-radius:7px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.form-error{color:#b3261e;font-size:12.5px;margin-top:10px}
@media (max-width:860px){
  .colorby-toggle{top:52px;left:56px}
  .admin-badge{display:none}
  .brand-title{font-size:16px}
  .topbar{height:auto;flex-wrap:wrap;padding:10px 12px;gap:10px}
  .search-wrap{order:3;flex-basis:100%;max-width:none}
  #search{height:38px}
  .top-actions .btn-ghost{height:32px;padding:0 10px;font-size:12.5px}
  .detail{z-index:1200}
}
.count-pill{display:inline-block;min-width:18px;height:18px;line-height:18px;border-radius:9px;background:#e5322d;color:#fff;font-size:11px;font-weight:700;padding:0 5px;margin-left:4px}
.gallery{margin:0 -4px 14px;display:flex;gap:6px;overflow-x:auto;padding:0 4px 4px;scroll-snap-type:x mandatory}
.gallery .ph{position:relative;flex:0 0 auto;width:100%;scroll-snap-align:start;border-radius:10px;overflow:hidden;background:#dfe6e9;cursor:zoom-in;aspect-ratio:16/10}
.gallery.multi .ph{width:86%}
.gallery img{width:100%;height:100%;object-fit:cover;display:block}
.gallery .ph .cap{position:absolute;left:8px;bottom:8px;background:rgba(12,24,36,.72);color:#fff;font-size:11px;padding:3px 8px;border-radius:6px}
.gallery .ph .del{position:absolute;top:6px;right:6px;border:0;border-radius:6px;background:rgba(255,255,255,.92);font-size:12px;padding:3px 8px;cursor:pointer;color:#b3261e}
.cta{display:flex;gap:8px;margin:0 0 16px}
.cta .btn-primary{flex:1;height:40px;background:var(--accent)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.inq-lot{font-weight:600;color:var(--navy)!important}
.modal-card select,.modal-card textarea{display:block;width:100%;margin-top:4px;font:inherit;font-size:14px;padding:9px 10px;border:1px solid #d6d0c3;border-radius:7px;background:#fff}
.modal-card textarea{min-height:90px;resize:vertical}
.modal-card{max-height:calc(100vh - 32px);overflow:auto}
.modal-card.wide{width:720px}
.inbox-head{display:flex;justify-content:space-between;align-items:center}
.inbox-head .detail-close{position:static}
.inbox-filter{margin:8px 0 12px}
.inbox-filter select{font:inherit;font-size:13px;padding:6px 8px;border:1px solid var(--line);border-radius:6px}
.inbox-list{display:flex;flex-direction:column;gap:10px}
.inq{border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:13px;background:#fbfaf6}
.inq .top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.inq b{color:var(--navy);font-size:14px}
.inq .meta{color:var(--muted);font-size:12px;margin:2px 0 6px}
.inq .msg{white-space:pre-wrap;margin:6px 0}
.inq .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.inq select{font:inherit;font-size:12.5px;padding:4px 6px;border:1px solid var(--line);border-radius:6px}
.inq a{color:var(--navy-2)}
.upload-row{display:flex;gap:8px;align-items:center;margin-top:10px;flex-wrap:wrap}
.upload-row input[type=text]{flex:1;min-width:140px}
.lightbox{position:fixed;inset:0;background:rgba(6,12,18,.92);z-index:4000;display:flex;align-items:center;justify-content:center}
.lightbox[hidden]{display:none}
.lightbox figure{margin:0;max-width:92vw;max-height:88vh;text-align:center}
.lightbox img{max-width:92vw;max-height:82vh;border-radius:8px}
.lightbox figcaption{color:#e8e4da;font-size:13px;margin-top:8px}
.lb-close{position:absolute;top:14px;right:18px;border:0;background:none;color:#fff;font-size:34px;cursor:pointer}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);border:0;background:rgba(255,255,255,.12);color:#fff;font-size:34px;width:48px;height:64px;border-radius:8px;cursor:pointer}
.lb-nav.prev{left:14px}.lb-nav.next{right:14px}
@media (max-width:860px){ #inbox-btn{padding:0 8px} }

.gallery .ph.aerial{cursor:pointer}
.gallery .mini-map{position:absolute;inset:0;z-index:0}
.gallery .ph .cap,.gallery .ph .del{z-index:500}
.modal-card .inq select,.modal-card .inbox-filter select{display:inline-block;width:auto;margin:0 0 0 6px;padding:4px 8px;font-size:12.5px}
.inq .row{font-size:12.5px;color:var(--muted)}
