:root{
  --navy:#0b1526;
  --navy-2:#0f1f38;
  --orange:#f7791f;
  --orange-dark:#e2650c;
  --green:#2ecc71;
  --red:#e74c3c;
  --yellow:#f5c518;
  --purple:#9b59b6;
  --grey:#7f8c8d;
  --blue:#2f80ed;
  --bg:#f4f6f9;
  --text:#1c2531;
  --muted:#697386;
  --radius:14px;
  --shadow:0 6px 24px rgba(11,21,38,.08);
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  padding-bottom:76px;
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
.container{max-width:520px;margin:0 auto;background:#fff;min-height:100vh;position:relative;box-shadow:var(--shadow)}

/* ===== Header ===== */
.app-header{
  background:linear-gradient(180deg,var(--navy) 0%,var(--navy-2) 100%);
  color:#fff;
  padding:14px 16px;
  display:flex;align-items:center;justify-content:space-between;
  position:sticky;top:0;z-index:50;
}
.app-header .brand{display:flex;align-items:center;gap:8px;flex:1;justify-content:center}
.app-header .brand img{height:28px}
.app-header .brand-text{display:flex;flex-direction:column;line-height:1.1}
.app-header .brand-text b{color:var(--orange);font-size:17px;letter-spacing:1px}
.app-header .brand-text span{font-size:10px;color:#c9d2e0}
.app-header .icon-btn{background:none;border:none;color:#fff;font-size:18px;cursor:pointer;width:32px}
.app-header .icon-btn.notif{position:relative}
.app-header .icon-btn.notif::after{content:'';width:8px;height:8px;border-radius:50%;background:var(--red);position:absolute;top:0;right:4px;border:1.5px solid var(--navy)}

/* ===== Bottom Nav ===== */
.bottom-nav{
  position:fixed;bottom:0;left:0;right:0;
  max-width:520px;margin:0 auto;
  background:var(--navy);
  display:flex;justify-content:space-around;align-items:center;
  padding:9px 0 12px;
  z-index:60;
  border-top:1px solid rgba(255,255,255,.06);
}
.bottom-nav a{
  color:#9fb0c9;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:4px;
  flex:1;text-align:center;
}
.bottom-nav a i{font-size:17px}
.bottom-nav a.active{color:var(--orange)}

/* ===== Hero / Home ===== */
.hero{position:relative;min-height:520px;display:flex;flex-direction:column;justify-content:flex-end;color:#fff;
  background:linear-gradient(180deg,rgba(11,21,38,.55),rgba(11,21,38,.35) 40%,rgba(11,21,38,.9)),
  radial-gradient(circle at 30% 20%,#1c3a63,#0b1526 70%);
  padding:26px 20px 20px;
}
.hero .gate{margin:18px 0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.hero .gate-art{
  height:220px;border-radius:var(--radius);
  background:linear-gradient(160deg,#1a2f4d,#0b1526 60%),
    repeating-linear-gradient(90deg,rgba(247,121,31,.08) 0 2px,transparent 2px 40px);
  display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;
}
.hero .gate-art .frame{border:3px solid var(--orange);border-radius:8px;padding:14px 26px;color:var(--orange);font-weight:700;letter-spacing:3px}
.hero h1{font-size:28px;color:var(--orange);letter-spacing:1px;text-align:center}
.hero .sub{text-align:center;color:#dfe6f0;font-size:13px;margin-top:2px}
.hero .headline{text-align:center;font-size:19px;font-weight:600;margin:14px 0 6px}
.stat-row{display:flex;justify-content:space-between;margin:18px 0;text-align:center}
.stat-row .stat{flex:1}
.stat-row .stat b{display:block;font-size:18px}
.stat-row .stat span{font-size:11px;color:#c9d2e0}
.stat-row .stat i{display:block;font-size:18px;color:var(--orange);margin-bottom:4px}
.btn-orange{
  background:var(--orange);color:#fff;border:none;border-radius:10px;
  padding:14px;width:100%;font-size:16px;font-weight:600;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 8px 18px rgba(247,121,31,.35);
}
.btn-orange:hover{background:var(--orange-dark)}
.btn-outline{
  background:#fff;border:1.5px solid #e1e6ee;border-radius:10px;padding:13px;width:100%;
  font-weight:600;color:var(--text);display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
}
.btn-green{background:var(--green);color:#fff;border:none;border-radius:10px;padding:14px;width:100%;font-weight:600;font-size:15px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.dots{display:flex;justify-content:center;gap:6px;margin-top:14px}
.dots span{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.35)}
.dots span.active{background:var(--orange);width:16px;border-radius:4px}

/* ===== Section Toggle (2D/3D/Map/Satellite) ===== */
.view-toolbar{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fff;position:sticky;top:57px;z-index:40;border-bottom:1px solid #eef0f4}
.toggle-group{display:flex;background:#101d33;border-radius:10px;overflow:hidden;flex:1}
.toggle-group a{flex:1;text-align:center;padding:10px 6px;color:#c9d2e0;font-weight:600;font-size:13px}
.toggle-group a.active{background:var(--orange);color:#fff}
.compass{width:40px;height:40px;border-radius:50%;background:#0b1526;color:#fff;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;position:relative;flex-shrink:0}
.compass .n{position:absolute;top:2px;color:var(--red)}

/* ===== Layout Map ===== */
.layout-wrap{position:relative;background:linear-gradient(160deg,#dff0dd,#cfe8d0);padding:16px 10px 22px;overflow:auto}
.map-controls{position:absolute;right:14px;bottom:110px;display:flex;flex-direction:column;gap:8px;z-index:20}
.map-controls button{width:38px;height:38px;border-radius:8px;border:none;background:#fff;box-shadow:var(--shadow);font-size:16px;cursor:pointer}
.legend{
  background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:12px 16px;
  display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;font-size:13px;margin:14px 10px 0;
}
.legend .item{display:flex;align-items:center;gap:8px}
.legend .dot{width:12px;height:12px;border-radius:50%}

.plot-canvas{transform-origin:top center;transition:transform .2s ease}
.blocks-grid{display:flex;flex-direction:column;gap:14px}
.block-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.plot-block{background:rgba(255,255,255,.35);border:1px dashed rgba(255,255,255,.6);border-radius:10px;padding:6px;display:flex;flex-direction:column;gap:4px}
.plot-cell{
  width:56px;min-height:30px;border-radius:5px;display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:11px;font-weight:700;cursor:pointer;border:1.5px solid rgba(255,255,255,.6);
  box-shadow:0 2px 4px rgba(0,0,0,.15);
  position:relative;
}
.plot-cell.selected{outline:3px solid var(--blue);outline-offset:1px}
.landmark{background:#0b1526;color:#fff;font-size:10px;font-weight:700;padding:6px 10px;border-radius:20px;text-align:center;align-self:center;box-shadow:var(--shadow)}
.road-label{font-size:10px;color:#3b4b3c;text-align:center;font-weight:600;letter-spacing:.5px}

/* ===== Popup for plot click ===== */
.plot-popup-backdrop{position:fixed;inset:0;background:rgba(11,21,38,.55);z-index:200;display:flex;align-items:flex-end}
.plot-popup{background:#fff;border-radius:18px 18px 0 0;padding:18px;width:100%;max-width:520px;margin:0 auto;animation:slideUp .2s ease}
@keyframes slideUp{from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}
.plot-popup .row{display:flex;justify-content:space-between;padding:6px 0;font-size:14px;border-bottom:1px solid #f1f3f6}
.plot-popup .row span:first-child{color:var(--muted)}
.plot-popup .row span:last-child{font-weight:600}

/* ===== Badges ===== */
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:20px;font-size:12px;font-weight:700;color:#fff}
.badge.available{background:var(--green)}
.badge.sold{background:var(--red)}
.badge.hold{background:var(--yellow);color:#5c4400}
.badge.reserved{background:var(--purple)}
.badge.blocked{background:var(--grey)}

/* ===== Plot Details ===== */
.plot-hero{position:relative;height:230px;background:linear-gradient(160deg,#274a2f,#132a1a);display:flex;align-items:center;justify-content:center;color:#fff}
.plot-hero .tag{position:absolute;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;align-items:center}
.plot-hero .plot-highlight{width:120px;height:160px;background:var(--blue);border-radius:6px;box-shadow:0 0 0 4px rgba(255,255,255,.6)}
.detail-card{padding:18px 16px 4px}
.detail-card h2{font-size:22px}
.detail-card .subtitle{color:var(--muted);font-size:13px;margin-bottom:8px}
.spec-list{margin-top:10px}
.spec-row{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #f0f2f5;font-size:14px}
.spec-row i{color:var(--orange);width:20px;margin-right:8px}
.spec-row .label{display:flex;align-items:center;color:var(--muted)}
.spec-row .val{font-weight:700}
.total-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;font-size:19px;font-weight:800}
.feature-pills{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}
.feature-pills .pill{background:#f4f6f9;border-radius:10px;padding:10px 4px;text-align:center;font-size:11px;font-weight:600}
.feature-pills .pill i{display:block;color:var(--green);font-size:16px;margin-bottom:6px}
.thumb-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}
.thumb-row .thumb{height:70px;border-radius:8px;background-size:cover;background-position:center;position:relative;overflow:hidden}
.thumb-row .thumb span{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.55);color:#fff;font-size:9px;text-align:center;padding:2px}
.action-row{display:flex;gap:10px;padding:6px 16px 20px}

/* ===== Search & Filter ===== */
.search-bar{display:flex;align-items:center;gap:8px;background:#f4f6f9;border-radius:10px;padding:12px 14px;margin:14px}
.search-bar input{border:none;background:none;flex:1;font-size:14px;outline:none}
.chip-row{display:flex;gap:8px;padding:0 14px 10px;overflow-x:auto}
.chip{padding:8px 16px;border-radius:20px;background:#f4f6f9;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;border:1px solid #e6e9ee}
.chip.active{background:var(--orange);color:#fff;border-color:var(--orange)}
.filter-panel{padding:0 14px}
.field-group{margin-bottom:14px}
.field-group label{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.4px;margin-bottom:6px;display:block}
.field-row{display:flex;gap:10px}
.field-row input,.field-row select,select,input[type=text],input[type=number],input[type=email],input[type=tel],textarea{
  width:100%;padding:12px 12px;border:1.5px solid #e5e9ef;border-radius:9px;font-size:14px;outline:none;background:#fff;
}
.field-row input:focus,select:focus,textarea:focus{border-color:var(--orange)}
.filter-actions{display:flex;gap:10px;margin:16px 0}
.result-list{padding:6px 14px 20px}
.result-item{display:flex;justify-content:space-between;align-items:center;padding:14px;border:1px solid #eef0f4;border-radius:12px;margin-bottom:10px}
.result-item .info b{display:block;font-size:15px}
.result-item .info span{font-size:12px;color:var(--muted)}

/* ===== Enquiry Form ===== */
.mini-plot-card{display:flex;gap:12px;align-items:center;background:#f4f6f9;border-radius:12px;padding:12px;margin:14px}
.mini-plot-card .box{width:52px;height:64px;background:var(--blue);border-radius:6px;flex-shrink:0}
.form-wrap{padding:0 14px}
.secure-note{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);justify-content:center;padding:10px 0 24px}

/* ===== Gallery ===== */
.gallery-tabs{display:flex;gap:8px;overflow-x:auto;padding:12px 14px;border-bottom:1px solid #eef0f4}
.gallery-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px}
.gallery-item{border-radius:10px;overflow:hidden;position:relative;height:130px;background-size:cover;background-position:center}
.gallery-item .cap{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(0deg,rgba(0,0,0,.65),transparent);color:#fff;font-size:12px;font-weight:600;padding:8px}

/* ===== Info list ===== */
.info-list{padding:10px 14px}
.info-row{display:flex;align-items:center;gap:14px;padding:16px 4px;border-bottom:1px solid #f0f2f5}
.info-row .ic{width:42px;height:42px;border-radius:10px;background:#fdece0;color:var(--orange);display:flex;align-items:center;justify-content:center;font-size:17px}
.info-row .txt b{display:block;font-size:15px}
.info-row .txt span{font-size:12px;color:var(--muted)}
.info-row i.chev{margin-left:auto;color:#c3c9d3}
.static-section{padding:16px}
.static-section h3{margin:16px 0 8px;color:var(--navy)}
.static-section p, .static-section li{color:#4a5568;font-size:14px;line-height:1.6}
.static-section ul{padding-left:18px;margin-bottom:8px}

/* ===== Share / QR ===== */
.qr-card{background:#fff;border:1px solid #eef0f4;border-radius:16px;padding:24px;text-align:center;margin:18px 14px;box-shadow:var(--shadow)}
#qrcode{display:flex;justify-content:center;margin:14px 0}
.link-box{display:flex;align-items:center;gap:8px;background:#f4f6f9;border-radius:9px;padding:10px 12px;font-size:12px;color:var(--muted);margin:14px}
.link-box button{background:none;border:none;color:var(--orange);font-weight:700;cursor:pointer}

/* ===== Generic ===== */
.page-title{padding:16px;font-size:20px;font-weight:700}
.section-pad{padding:0 16px}
.mt-10{margin-top:10px}.mb-10{margin-bottom:10px}
.flex{display:flex}.gap-8{gap:8px}
.center{text-align:center}
.empty-state{text-align:center;padding:40px 20px;color:var(--muted)}
.back-header{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--navy);color:#fff;position:sticky;top:0;z-index:50}
.back-header a{color:#fff;font-size:18px}
.back-header b{font-size:16px}

/* Admin shares utility classes too, loaded separately */
