/* lands/static/lands/css/app.css
   CLEANED for Bootstrap coexistence

   Goals:
   - Keep LandSecure theme (.ls-*) + leaflets + hero + footer + whatsapp + accessibility
   - Avoid undefined variables (nav/primary/border)
   - Keep styles organized & maintainable
*/

/* =========================================================
   1) THEME TOKENS
   ========================================================= */
:root{
  /* Brand */
  --ls-brand: #0b6b3a;
  --ls-brand-600:#095c32;
  --ls-accent: #f2b705;
  --ls-accent-600:#d9a104;

  /* Neutrals */
  --ls-bg: #f4f7f5;
  --ls-surface: #ffffff;
  --ls-surface-2:#f7fbf8;
  --ls-text: #0f172a;
  --ls-muted: #64748b;

  /* Borders / Shadow */
  --ls-border: rgba(11,107,58,.12);
  --ls-border-soft: rgba(2,6,23,.10);
  --ls-shadow: 0 12px 30px rgba(2, 6, 23, .08);
  --ls-radius: 14px;

  /* Feedback */
  --ls-ok: #16a34a;
  --ls-warn: #f59e0b;
  --ls-danger: #dc2626;

  /* Navbar background (replaces old --nav) */
  --ls-nav: #0f172a;

  /* Aliases (backward compatibility if old CSS uses these) */
  --primary: var(--ls-brand);
  --border: var(--ls-border-soft);
  --nav: var(--ls-nav);
}

/* =========================================================
   2) BASE / TYPOGRAPHY
   ========================================================= */
body.ls-theme{
  background: var(--ls-bg);
  color: var(--ls-text);
}

.title{ color: var(--ls-text); }
.subtitle{ color: var(--ls-muted); }

/* =========================================================
   3) CARDS
   ========================================================= */
.card{
  background: var(--ls-surface);
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius);
  box-shadow: var(--ls-shadow);
  overflow: hidden; /* helps the accent strip look clean */
}

/* Nice accent bar inside cards */
.card::before{
  content:"";
  display:block;
  height: 4px;
  background: linear-gradient(90deg, var(--ls-brand), var(--ls-accent));
}

/* Headers inside cards */
.card .header{
  border-bottom: 1px solid rgba(2,6,23,.06);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

/* =========================================================
   4) FORMS (Bootstrap harmonization)
   ========================================================= */
label, .form-label{
  font-weight: 800;
  color: #0b1220;
  margin-bottom: 6px;
}

.help, .form-text{
  color: var(--ls-muted);
  font-size: 0.9rem;
}

/* Inputs */
.form-control,
.form-select,
textarea.form-control{
  border-radius: 12px;
  border: 1px solid rgba(2,6,23,.10);
  background: var(--ls-surface-2);
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

/* Focus state */
.form-control:focus,
.form-select:focus{
  border-color: rgba(11,107,58,.55);
  box-shadow: 0 0 0 .25rem rgba(11,107,58,.18);
  background: #fff;
}

/* Checkbox */
.form-check-input{
  border-color: rgba(2,6,23,.18);
}
.form-check-input:checked{
  background-color: var(--ls-brand);
  border-color: var(--ls-brand);
}
.form-check-input:focus{
  box-shadow: 0 0 0 .25rem rgba(11,107,58,.18);
}

/* =========================================================
   5) BUTTONS (Your custom .btn system)
   Note: Bootstrap uses .btn too; this intentionally overrides.
   ========================================================= */
.btn, .ls-login{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  text-decoration:none;
  border: 1px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}

.btn{
  background: var(--ls-brand);
  color: #fff;
}
.btn:hover{
  background: var(--ls-brand-600);
  box-shadow: 0 10px 18px rgba(11,107,58,.18);
}
.btn:active{ transform: translateY(1px); }

.btn.secondary{
  background: #0f172a;
  color: #fff;
}
.btn.secondary:hover{ background:#111c33; }

.btn.light{
  background: #fff;
  color: var(--ls-text);
  border-color: rgba(2,6,23,.10);
}
.btn.light:hover{
  background: #f8fafc;
  box-shadow: 0 10px 18px rgba(2,6,23,.08);
}

.btn.warn{
  background: var(--ls-accent);
  color: #1b1400;
}
.btn.warn:hover{
  background: var(--ls-accent-600);
}

/* =========================================================
   6) ALERTS / FLASH
   ========================================================= */
.alert, .flash{
  border-radius: 14px;
  border: 1px solid rgba(2,6,23,.08);
  background: #fff;
  padding: 12px 14px;
}

.alert.warn, .flash.warning{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
}
.alert.ok, .flash.success{
  border-color: rgba(22,163,74,.28);
  background: rgba(22,163,74,.10);
}
.alert.danger, .flash.error{
  border-color: rgba(220,38,38,.28);
  background: rgba(220,38,38,.10);
}
.alert.muted{
  border-color: rgba(100,116,139,.18);
  background: rgba(100,116,139,.08);
}

/* =========================================================
   7) ACCESSIBILITY
   ========================================================= */
.skip-link{
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: var(--ls-brand);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
}
.skip-link:focus{
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid #fff;
}

/* =========================================================
   8) NAVBAR — Sleek Topbar + Responsive Menu
   ========================================================= */
.ls-topbar{
  background: var(--ls-nav);
  color: rgba(255,255,255,.88);
  font-size: 13px;
}
.ls-topbar-inner{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 10px 0;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
}
.ls-topbar-left{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.ls-topbar-right{ display:flex; gap:8px; align-items:center; }
.ls-topbar .dot{ opacity:.55; }
.ls-topbar .pill{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.ls-header{
  position: sticky;
  top: 0;
  z-index: 2000;
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.ls-nav{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 14px 0;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ls-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: #0f172a;
  flex: 1 1 auto;
  min-width: 160px;
}
.ls-brand-text{
  font-weight: 900;
  letter-spacing: .2px;
}

.ls-menu{
  display:flex;
  align-items:center;
  gap: 6px;
}
.ls-menu a{
  display:inline-flex;
  align-items:center;
  color:#0f172a;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 10px;
  opacity: .88;
  transition: background 140ms ease, opacity 140ms ease;
}
.ls-menu a:hover{
  background: rgba(15,23,42,.06);
  opacity: 1;
  text-decoration:none;
}

.ls-actions{ display:flex; align-items:center; gap:10px; flex: 0 0 auto; }

.ls-login{
  padding: 8px 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  color:#0f172a;
  font-weight: 800;
  font-size: 14px;
  background: #fff;
}

.ls-burger{
  display:none;
  width: 42px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background:#fff;
  cursor:pointer;
  padding: 0 10px;
  flex-direction: column;
  justify-content:center;
  gap: 5px;
}
.ls-burger span{
  display:block;
  height: 2px;
  background:#0f172a;
  border-radius: 2px;
}

.ls-mobile{
  display:none;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 10px 0 18px 0;
  border-top: 1px solid rgba(15,23,42,.08);
}
.ls-mobile a{
  display:block;
  padding: 12px 0;
  text-decoration:none;
  color:#0f172a;
  font-weight: 800;
}
.ls-mobile.open{ display:block; }

@media (max-width: 991px){
  .ls-menu{ display:none; }
  .ls-login{ display:none; }
  .ls-burger{ display:flex; }
}

/* =========================================================
   9) HERO
   ========================================================= */
.ls-hero{
  position: relative;
  padding: 72px 0;
  background: url("/static/lands/img/hero.jpeg") center/cover no-repeat;
}
.ls-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}
.ls-hero > .container{
  position: relative;
  z-index: 2;
}
.ls-hero h1,
.ls-hero p{
  color: #fff !important;
}
.ls-search-card{
  border-radius: 18px;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.92);
}

/* =========================================================
   10) FOOTER (safe)
   ========================================================= */
.footer{
  margin-top: 26px;
  background: var(--ls-nav);
  color: rgba(255,255,255,.75);
}
.footer-inner{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 14px 0;
  text-align:center;
  font-size: 13px;
}
.footer-inner b{ color: #fff; }

/* =========================================================
   11) MAP PAGE (Leaflet)
   ========================================================= */
.map-shell{
  width: 100%;
  height: calc(100vh - 64px);
  position: relative;
}
.ls-map{
  width: 100%;
  height: 100%;
}

.toast{
  position: absolute;
  z-index: 9999;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  max-width: 360px;
}

.area-label{
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(17, 24, 39, 0.25);
  border-radius: 8px;
  padding: 2px 6px;
  font-weight: 900;
  font-size: 12px;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  pointer-events: none;
  white-space: nowrap;
}

.ls-legend{
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  font-size: 13px;
  line-height: 1.6;
}
.ls-legend-title{ font-weight: 900; margin-bottom: 6px; color: #111827; }
.ls-legend-row{ display:flex; align-items:center; gap: 8px; color: #111827; }

.ls-swatch{ width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ls-swatch.is-available{ background: green; }
.ls-swatch.is-allocated{ background: red; }
.ls-swatch.is-disputed{ background: orange; }

.ls-popup{ min-width: 240px; font-size: 13px; }
.ls-popup-title{ font-weight: 900; font-size: 14px; margin-bottom: 6px; }
.ls-popup-actions{
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ls-popup-btn{
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  border: none;
  cursor: pointer;
}
.ls-popup-btn.dark{ background: #111827; color: #fff; }
.ls-popup-btn.green{ background: var(--ls-brand); color: #fff; }

.ls-popup-form{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}
.ls-popup-select{
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(2,6,23,.12);
  font-weight: 800;
  background: #fff;
}

/* Leaflet controls: reset anchor styles */
.leaflet-container .leaflet-bar,
.leaflet-container .leaflet-control{
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.leaflet-container .leaflet-bar a{
  text-decoration: none !important;
  color: #111827 !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 34px !important;
  line-height: 34px !important;
  padding: 0 10px !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
  width: auto !important;
}
.leaflet-container .leaflet-bar a:hover{ background: #f9fafb !important; }
.leaflet-container .leaflet-control-zoom a{
  width: 34px !important;
  padding: 0 !important;
}
.leaflet-container .leaflet-control-zoom a{ margin-bottom: 6px; }
.leaflet-container .leaflet-control-zoom a:last-child{ margin-bottom: 0; }

/* keep map layers behind navbar */
.leaflet-container,
.leaflet-pane,
.leaflet-top,
.leaflet-bottom{
  z-index: 1 !important;
}

/* =========================================================
   12) WHATSAPP FLOAT
   ========================================================= */
.whatsapp-float{
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 28px;
  line-height: 55px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9999;
  text-decoration: none;
}
.whatsapp-float:hover{
  background-color: #1ebe5d;
  text-decoration: none;
}

/* =========================================================
   13) ACCOUNT DROPDOWN (LS)
   ========================================================= */
.ls-account{ position: relative; }
.ls-account-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor:pointer;
  font-weight: 800;
}
.ls-account-name{ color:#0f172a; }
.ls-caret{ opacity:.7; }

.ls-account-menu{
  display:none;
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  width: 220px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  padding: 8px;
  z-index: 5000;
}
.ls-account-menu.open{ display:block; }

.ls-account-menu a{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  color:#111827;
  font-weight:800;
  text-decoration:none;
}
.ls-account-menu a:hover{ background: rgba(0,0,0,.06); }

.ls-divider{
  height:1px;
  background: rgba(0,0,0,.10);
  margin: 8px 0;
}

.ls-account-logout{
  width:100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: none;
  cursor:pointer;
  background: #111827;
  color:#fff;
  font-weight:900;
}