@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:wght@600;700&display=swap');

:root {
  --forest-950: #10291f;
  --forest-900: #173b2d;
  --forest-800: #22553d;
  --forest-700: #347454;
  --red-700: #9f2d32;
  --red-600: #b93c40;
  --red-100: #f8eaea;
  --gold-500: #d2a44b;
  --gold-100: #f7efd9;
  --cream: #f8f5ee;
  --paper: #fffdf8;
  --white: #ffffff;
  --ink: #1d2923;
  --muted: #6d756f;
  --border: #dedfd7;
  --border-soft: #ecece4;
  --shadow: 0 12px 36px rgba(29, 60, 43, 0.08);
  --shadow-sm: 0 5px 18px rgba(29, 60, 43, 0.07);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 2%, rgba(210, 164, 75, 0.08), transparent 22rem),
    var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p { margin-bottom: 0.5rem; }
a { color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
main { min-height: 72vh; padding: 32px 0 64px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-medium { font-weight: 600; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.pt-4 { padding-top: 1rem; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-1rem { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.border-t { border-top: 1px solid var(--border-soft); }
.w-full { width: 100%; }
.max-w-md { max-width: 640px; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(16, 41, 31, 0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}
.navbar .container {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-size: 1.05rem;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  transition: 180ms ease;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.09); }
.nav-links a.active { color: var(--white); background: rgba(255,255,255,0.12); }
.nav-links .nav-cta {
  margin-left: 4px;
  color: var(--forest-950);
  background: var(--gold-100);
}
.nav-links .nav-cta:hover { color: var(--forest-950); background: var(--white); }

.hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 22px;
  padding: 54px 32px 48px;
  text-align: center;
  border: 1px solid rgba(210,164,75,0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(16,41,31,0.98), rgba(34,85,61,0.94)),
    var(--forest-900);
  color: var(--white);
  box-shadow: var(--shadow);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(210,164,75,0.12);
  border-radius: 50%;
}
.hero::before { left: -110px; top: -130px; }
.hero::after { right: -100px; bottom: -160px; }
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--gold-100);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 { max-width: 760px; margin: 0 auto 12px; }
.hero p { max-width: 680px; margin: 0 auto; color: rgba(255,255,255,0.76); font-size: 1.05rem; }

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.search-bar input {
  height: 48px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  font-size: 1rem;
}
.search-bar input:focus { border: 0; box-shadow: none; }

.chip-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  padding: 7px 14px;
  font: 600 0.86rem "DM Sans", sans-serif;
  cursor: pointer;
  transition: 180ms ease;
}
.chip:hover { border-color: var(--forest-700); color: var(--forest-800); }
.chip.active { border-color: var(--forest-900); background: var(--forest-900); color: var(--white); }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 24px;
  align-items: start;
}
.map-container {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #eef0e8;
  box-shadow: var(--shadow-sm);
}
.map-full { height: 620px; }
#map { width: 100%; height: 100%; }
.map-location-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1000;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.94);
  color: var(--muted);
  font-size: 0.8rem;
}

.browse-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.browse-heading h2 { font-size: 1.55rem; }
.result-count { color: var(--muted); font-size: 0.85rem; }
.listing-card {
  display: block;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--paper);
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(29,60,43,0.035);
  transition: 180ms ease;
}
.listing-card:hover { transform: translateY(-2px); border-color: rgba(52,117,84,0.45); box-shadow: var(--shadow); }
.listing-img { display: block; width: 100%; height: 170px; object-fit: cover; background: #e9eadf; }
.listing-content { padding: 16px 18px 18px; }
.listing-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.listing-title { display: block; margin-bottom: 4px; color: var(--ink); font-size: 1.08rem; }
.listing-category {
  flex: 0 0 auto;
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--gold-100);
  color: #7d6025;
  font-size: 0.72rem;
  font-weight: 700;
}
.listing-desc { color: var(--muted); font-size: 0.88rem; }
.listing-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.78rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 700 0.9rem "DM Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: 180ms ease;
}
.btn-primary { background: var(--forest-900); color: var(--white); }
.btn-primary:hover { background: var(--forest-800); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline { border-color: var(--border); background: var(--paper); color: var(--forest-900); }
.btn-outline:hover { border-color: var(--forest-700); background: var(--white); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger:hover { background: var(--red-700); }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.58; cursor: default; transform: none; box-shadow: none; }

label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 0.86rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  padding: 11px 12px;
  font: 500 0.94rem "DM Sans", sans-serif;
  transition: 180ms ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(52,117,84,0.11);
}
textarea { min-height: 126px; resize: vertical; }
.address-autocomplete { position: relative; }
.address-suggestions {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow);
}
.address-suggestions[hidden] { display: none; }
.address-suggestion {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--ink);
  font: 500 0.9rem "DM Sans", sans-serif;
  text-align: left;
  cursor: pointer;
}
.address-suggestion:last-child { border-bottom: 0; }
.address-suggestion:hover, .address-suggestion:focus { background: var(--cream); }
.location-picker-map {
  width: 100%;
  height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  z-index: 0;
}
.location-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.form-group { margin-bottom: 18px; }
.checkbox-group { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-group input { width: auto; accent-color: var(--forest-800); }
.small-text { margin-top: 6px; color: var(--muted); font-size: 0.78rem; }

.alert { margin-bottom: 18px; padding: 14px 16px; border: 1px solid; border-radius: var(--radius-md); }
.alert-success { border-color: #b8d7c4; background: #edf7f0; color: var(--forest-800); }
.alert-error { border-color: #efbfc1; background: var(--red-100); color: var(--red-700); }

.category-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 700;
}
.category-badge { background: var(--gold-100); color: #806225; }
.status-badge { background: #edf0e8; color: var(--muted); }
.status-approved { background: #e5f2e9; color: #276743; }
.status-pending { background: var(--gold-100); color: #806225; }
.status-rejected { background: var(--red-100); color: var(--red-700); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--forest-800);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }
.detail-panel {
  padding: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.detail-panel h1 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.1rem); }
.detail-address { padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); }
.photo-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.photo-list img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-md); }
.description-label { display: block; margin: 18px 0 6px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.grid-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.detail-stat { padding: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--white); }
.detail-stat span { display: block; }
.detail-map { height: 620px; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-header p { margin: 8px 0 0; }
.form-shell {
  padding: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.form-full { grid-column: 1 / -1; }
.file-input {
  position: relative;
  min-height: 100px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: #fbfaf5;
  display: grid;
  place-items: center;
  color: var(--forest-800);
  font-weight: 700;
  text-align: center;
}
.file-input input { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: pointer; }

.admin-header { align-items: center; }
.card {
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 3px 12px rgba(29,60,43,0.035);
}
.card h3 { margin-bottom: 4px; }
.btn-group { display: flex; gap: 8px; }
.empty {
  padding: 58px 20px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.52);
  color: var(--muted);
  text-align: center;
}

.auth-shell {
  max-width: 460px;
  margin: 38px auto;
  padding: 32px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth-shell h1 { margin-bottom: 18px; text-align: center; }

.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--forest-950);
  color: rgba(255,255,255,0.68);
  padding: 28px 0;
}
.footer a { color: var(--gold-100); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .map-full, .detail-map { height: 420px; }
  .listing-img { height: 220px; }
}
@media (max-width: 680px) {
  .container { padding: 0 16px; }
  main { padding-top: 20px; }
  .navbar .container { height: 64px; }
  .brand { font-size: 1.18rem; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-links a:not(.nav-cta):not(.active) { display: none; }
  .nav-links .nav-cta { margin: 0; }
  .hero { padding: 38px 18px 36px; border-radius: var(--radius-lg); }
  .hero h1 { font-size: 2.25rem; }
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .btn { width: 100%; }
  .map-full { height: 360px; }
  .listing-img { height: 180px; }
  .form-grid { grid-template-columns: 1fr; }
  .location-fields { grid-template-columns: 1fr; gap: 0; }
  .form-full { grid-column: auto; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .detail-panel, .form-shell, .auth-shell { padding: 20px; }
  .location-picker-map { height: 290px; }
  .detail-panel h1 { font-size: 2.05rem; }
  .photo-list { grid-template-columns: 1fr 1fr; }
  .photo-list img { height: 130px; }
  .grid-detail { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .card > .flex { align-items: flex-start; flex-direction: column; }
  .btn-group { width: 100%; }
  .btn-group form { flex: 1; }
  .btn-group .btn { width: 100%; }
}
