:root {
  /* Brand */
  --green: #0F5C34;
  --green-dark: #082D19;
  --green-light: #1B7A47;
  --green-50: #EEF6F0;
  --green-100: #DCEEE1;
  --gold: #C89B3C;
  --gold-dark: #A67C1E;
  --gold-50: #FBF3E2;
  --whatsapp: #25D366;
  --whatsapp-dark: #1CB358;

  /* Neutrals */
  --bg: #F7F8F6;
  --card: #ffffff;
  --ink: #15201A;
  --text: #202A22;
  --muted: #626F67;
  --muted-2: #8A968F;
  --border: #E4E9E3;
  --border-strong: #D3DAD1;
  --danger: #B3261E;
  --danger-bg: #FDECEA;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 30, 20, 0.06), 0 1px 1px rgba(15,30,20,0.04);
  --shadow-md: 0 6px 16px rgba(9, 40, 22, 0.10);
  --shadow-lg: 0 18px 40px rgba(6, 30, 16, 0.16);

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius: 12px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }

a { color: var(--green); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--green-light); text-decoration: underline; }

img { max-width: 100%; display: block; }

::selection { background: var(--gold-50); color: var(--ink); }

*:focus-visible {
  outline: 2px solid var(--green-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: -3px; flex-shrink: 0; }
.icon svg { display: block; }

/* Navbar */
.navbar {
  background: var(--green);
  background-image: linear-gradient(180deg, var(--green) 0%, #0D5230 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), var(--shadow-sm);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.1px;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand .mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #2b2005;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .sub { font-size: 10.5px; font-weight: 600; color: #B9D9C3; letter-spacing: 0.4px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav-links a:not(.btn) { color: #dcece1; font-size: 14.5px; font-weight: 500; position: relative; }
.nav-links a:not(.btn):hover { color: #fff; text-decoration: none; }
.nav-links .btn { margin-left: 4px; }

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.badge-nonprofit {
  font-size: 11px;
  background: rgba(255,255,255,0.14);
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
  color: #dcecdf;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%); color: #2b2005; box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.05); color: #2b2005; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-green { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-green:hover { background: var(--green-light); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #f6c9c5; }
.btn-danger:hover { background: #fbdedb; color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-whatsapp { background: var(--whatsapp); color: #06341c; box-shadow: var(--shadow-sm); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); color: #06341c; }

.contact-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(1200px 500px at 15% -10%, #14663a 0%, transparent 60%),
              linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 68px 0 84px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"><path d="M0 60 L60 0 L120 60 L60 120 Z" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1.5"/></svg>');
  background-size: 120px 120px;
  opacity: 0.5;
  pointer-events: none;
}
.hero .container { text-align: center; position: relative; }
.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  color: #dcecdf;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 14px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.hero p.sub { font-size: 17px; color: #dbe7dd; max-width: 640px; margin: 0 auto 30px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }

.trust-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.trust-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #cfe4d6;
  font-size: 12.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 20px;
}

/* Search box */
.search-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.search-box form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box select, .search-box input {
  flex: 1;
  min-width: 130px;
}

/* Forms */
label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #b9c4b6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(27, 122, 71, 0.14);
}
.field { margin-bottom: 16px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 160px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
fieldset { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 16px; margin-bottom: 18px; }
legend { font-weight: 700; padding: 0 8px; color: var(--green); font-size: 14px; }

/* Sections & cards */
.section { padding: 52px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 25px; margin: 0; font-weight: 800; }
.section-head p { color: var(--muted); margin: 5px 0 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; background: var(--green-dark); flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px; display: none; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 10px 6px; }
  .nav-links .btn { margin: 6px 0 0; }
  .nav-toggle { display: inline-flex; }
}

.listing-card { transition: transform .18s ease, box-shadow .18s ease; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.listing-card .thumb {
  height: 190px;
  background: var(--green-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
  overflow: hidden;
  position: relative;
}
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.listing-card:hover .thumb img { transform: scale(1.05); }
.listing-card .price { font-size: 19px; font-weight: 800; color: var(--green); margin: 8px 0 4px; }
.listing-card h3 { margin: 4px 0; font-size: 16px; font-weight: 700; }
.listing-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.listing-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.listing-card .tags .tag { display: inline-flex; align-items: center; gap: 4px; }

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--green-50);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tag-rent { background: var(--gold-50); color: #8a5a08; }
.tag-sale { background: var(--green-50); color: var(--green); }
.tag-pending { background: #fff4e5; color: #9a6400; }
.tag-approved { background: #e7f6ea; color: #1a7431; }
.tag-independent { background: #eef1fb; color: #2b3f9e; }
.tag-rejected { background: var(--danger-bg); color: var(--danger); }
.tag-suspended { background: var(--danger-bg); color: var(--danger); }
.tag-dismissed { background: #f1f2f0; color: #5b6b5e; }

.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 800px) { .stat-cards { grid-template-columns: repeat(2,1fr); } }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 27px; font-weight: 800; color: var(--green); letter-spacing: -0.01em; }
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

.alert { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f6c9c5; }
.alert-success { background: #e7f6ea; color: #1a7431; border: 1px solid #bfe6c8; }
.alert-info { background: #eef4fb; color: #2a5b8a; border: 1px solid #cfe0f2; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
tbody tr:hover { background: var(--green-50); }

.gallery { display: flex; flex-direction: column; gap: 6px; margin-bottom: 26px; }
.gallery-main { position: relative; width: 100%; }
.gallery-main img { width: 100%; height: 480px; object-fit: cover; border-radius: var(--radius-md) var(--radius-md) 0 0; display: block; }
.gallery-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.gallery-strip img { flex: 1 1 90px; max-width: 130px; height: 84px; object-fit: cover; cursor: pointer; transition: outline .15s ease; }
.gallery-strip img.active { outline: 3px solid var(--green); outline-offset: -3px; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(8, 45, 25, 0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .15s ease;
}
.gallery-nav:hover { background: rgba(8, 45, 25, 0.8); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-counter {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(8, 45, 25, 0.65); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
@media (max-width: 720px) { .gallery-main img { height: 240px; } }

.admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-search input[type="text"] { flex: 1; min-width: 220px; max-width: 420px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; }

.password-field { display: flex; gap: 8px; align-items: center; }
.password-field input { flex: 1; }
.password-toggle {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
}
.password-toggle:hover { background: var(--green-50); }

.pmls-combo-field { position: relative; }
.pmls-combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 230px;
  overflow-y: auto;
}
.pmls-combo-option { padding: 9px 12px; font-size: 13.5px; cursor: pointer; }
.pmls-combo-option:hover { background: var(--green-50); color: var(--green); }

.listing-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.listing-status-badge.status-under-contract { background: var(--gold-dark); }
.listing-status-badge.status-pending { background: #2b3f9e; }
.listing-status-badge.status-closed { background: var(--danger); }

.photo-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-manager-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.photo-manager-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
.photo-manager-actions { display: flex; gap: 4px; padding: 6px; justify-content: center; background: var(--green-50); }
.photo-manager-actions form { margin: 0; }
.photo-manager-actions button { min-width: 30px; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-tabs { margin-top: 30px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tabs a { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: var(--green); border-color: var(--green); }

.plan-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 12px; background: linear-gradient(180deg, #fff 0%, var(--green-50) 200%); }
.plan-card h4 { margin: 0 0 10px; color: var(--green); font-size: 15.5px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; font-size: 13.5px; }
@media (max-width: 700px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
.plan-grid div span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }

.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-md); margin-bottom: 14px; background:#000; }
.video-embed iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:0; }

.pdf-embed { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: #eef0ee; }
.pdf-embed embed { width: 100%; height: 560px; display: block; }
@media (max-width: 720px) { .pdf-embed embed { height: 380px; } }

.id-card-preview { max-width: 260px; border-radius: var(--radius-md); border: 1px solid var(--border); margin-top: 10px; }

.footer { background: var(--green-dark); color: #cfe0d3; padding: 46px 0 26px; margin-top: 64px; font-size: 13.5px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 26px; }
.footer strong { letter-spacing: 0.2px; }
.footer a { color: #dcecdf; }
.footer a:hover { color: #fff; }
.footer .fine { color: #7f9587; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }

.auth-card { max-width: 460px; margin: 50px auto; }
.auth-card h1 { font-size: 23px; text-align: center; margin-bottom: 6px; font-weight: 800; }
.auth-card p.sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 14px; }

.role-toggle { display: flex; gap: 10px; margin-bottom: 20px; }
.role-toggle label {
  flex: 1; text-align: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px;
  cursor: pointer; font-size: 13.5px; margin: 0; transition: border-color .15s ease, background-color .15s ease;
}
.role-toggle label:hover { border-color: var(--green-light); background: var(--green-50); }
.role-toggle input { width: auto; }

.dashboard-shell { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }
@media (max-width: 800px) { .dashboard-shell { grid-template-columns: 1fr; } }
.side-nav { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; position: sticky; top: 84px; box-shadow: var(--shadow-sm); }
.side-nav a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-weight: 500; }
.side-nav a:hover { background: var(--green-50); text-decoration: none; }
.side-nav a.active { background: var(--green); color: #fff; }

.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state .icon { margin-bottom: 14px; color: var(--muted-2); }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }

.repeatable-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; position: relative; background: #fcfdfc; }
.remove-row { position: absolute; top: 8px; right: 8px; }

.how-it-works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 800px) { .how-it-works { grid-template-columns: 1fr; } }
.hiw-card { text-align: center; padding: 12px; }
.hiw-num { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(155deg, var(--green-light), var(--green)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 14px; box-shadow: var(--shadow-sm); }
.hiw-card h3 { font-size: 16.5px; margin-bottom: 6px; }

.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--green); flex-shrink: 0; }
.faq-item p { color: var(--muted); margin: 0 0 18px; padding-left: 24px; }
.faq-item[open] summary { color: var(--green); }

.report-details summary { cursor: pointer; font-weight: 700; color: var(--green); }
.report-details[open] summary { margin-bottom: 4px; }
