:root {
  --ink: #17211f;
  --muted: #61706d;
  --line: #dbe5e1;
  --paper: #fbfdfb;
  --soft: #edf7f2;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --gold: #d79a2b;
  --coral: #c95f50;
  --sky: #247ba0;
  --shadow: 0 18px 45px rgba(23, 33, 31, 0.13);
  --button-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 56px);
  background: rgba(251, 253, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.brand-mark,
.brand-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
}

.brand-mark {
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.brand-logo {
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.brand small,
.footer span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.nav a,
.nav button {
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 8px;
  border: 0;
  background: transparent;
}

.nav a:hover,
.nav a.active,
.nav button:hover {
  color: var(--teal-dark);
  background: var(--soft);
}

.nav-dropdown {
  position: relative;
}

.nav .nav-highlight {
  color: #fff;
  background: var(--coral);
  font-weight: 900;
}

.buyer-link {
  color: var(--teal-dark) !important;
  font-weight: 900;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu {
  display: grid;
}

.submenu button {
  width: 100%;
  text-align: left;
}

.top-actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--button-radius);
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--teal);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  color: var(--teal-dark);
  background: #fff;
  border-color: var(--line);
}

.ghost-button {
  color: var(--teal-dark);
  background: transparent;
}

.hero-section {
  position: relative;
  min-height: min(720px, calc(100vh - 72px));
  display: grid;
  align-items: end;
  padding: clamp(32px, 7vw, 80px) clamp(16px, 5vw, 72px);
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 36, 34, 0.88), rgba(14, 36, 34, 0.55)),
    url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.hero-content {
  position: relative;
  width: min(920px, 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-content h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  letter-spacing: 0;
}

.hero-content p:not(.eyebrow) {
  max-width: 720px;
  font-size: 1.12rem;
}

.search-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--button-radius);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.strip,
.section {
  padding: clamp(34px, 5vw, 72px) clamp(16px, 5vw, 72px);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--teal-dark);
  color: #fff;
}

.stats-strip div,
.admin-metrics article {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.stats-strip strong,
.admin-metrics strong {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.stats-strip span,
.admin-metrics span {
  color: rgba(255, 255, 255, 0.74);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.market-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.filters,
.dashboard-card,
.plan-card,
.settings-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.07);
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.result-toolbar select {
  max-width: 210px;
}

.property-grid,
.partner-grid,
.blog-grid,
.plans-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.property-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.property-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.property-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.property-meta,
.card-actions,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill {
  color: var(--teal-dark);
  background: var(--soft);
}

.badge {
  color: #fff;
  background: var(--coral);
}

.chip {
  color: var(--muted);
  background: #f4f7f5;
  border: 1px solid var(--line);
}

.price {
  color: var(--teal-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.soft-section {
  background: var(--soft);
}

.partner-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.partner-card {
  min-height: 128px;
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.partner-logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--sky);
  font-weight: 900;
}

.plans-grid,
.cta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cta-grid {
  display: grid;
  gap: 18px;
}

.cta-card {
  min-height: 240px;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 42px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(11, 79, 74, 0.9), rgba(15, 118, 110, 0.72)),
    url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1000&q=80")
      center / cover;
  border-radius: 8px;
}

.buyer-cta {
  background:
    linear-gradient(90deg, rgba(36, 123, 160, 0.9), rgba(36, 123, 160, 0.7)),
    url("https://images.unsplash.com/photo-1582407947304-fd86f028f716?auto=format&fit=crop&w=1000&q=80")
      center / cover;
}

.cta-card h3 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.08;
}

.cta-card p {
  max-width: 540px;
  margin: 0;
  font-size: 1.05rem;
}

.plan-card {
  display: grid;
  gap: 12px;
}

.plan-card strong {
  color: var(--teal-dark);
  font-size: 2rem;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.featured-plan {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.tab.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.form-shell,
.admin-layout {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.profile-form {
  display: none;
}

.profile-form.active {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.fieldset legend {
  padding: 0 8px;
  color: var(--teal-dark);
  font-weight: 900;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mini-stats span {
  padding: 12px;
  color: var(--muted);
  background: #f4f7f5;
  border-radius: 8px;
}

.mini-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.55rem;
}

.compact-form,
.table-list {
  display: grid;
  gap: 10px;
}

.compact-form h4,
.settings-panel h3 {
  margin: 0;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.editor-form {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.editor-controls {
  display: grid;
  grid-template-columns: 1fr 120px 92px;
  gap: 10px;
  align-items: end;
}

.editor-controls input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.rich-text {
  min-height: 150px;
  line-height: 1.65;
}

.table-list span {
  padding: 10px;
  background: #f4f7f5;
  border-radius: 8px;
  color: var(--muted);
}

.message-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f4f7f5;
  border-radius: 8px;
}

.message {
  max-width: 85%;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff;
}

.message.sent {
  justify-self: end;
  color: #fff;
  background: var(--teal);
}

.admin-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 18px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.admin-metrics article {
  background: var(--teal-dark);
}

.settings-panel {
  box-shadow: none;
}

dialog {
  width: min(760px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 33, 31, 0.55);
}

.icon-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 1.4rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-grid img {
  width: 100%;
  border-radius: 8px;
}

.map-frame {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 8px;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.suggestion-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.suggestion-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.payment-options {
  display: grid;
  gap: 10px;
}

.payment-options button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(16px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
  .search-panel,
  .property-grid,
  .dashboard-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .section-heading,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .top-actions,
  .result-toolbar {
    justify-content: stretch;
  }

  .top-actions > *,
  .result-toolbar select {
    flex: 1;
  }

  .hero-section {
    min-height: auto;
    padding-top: 58px;
  }

  .search-panel,
  .stats-strip,
  .property-grid,
  .partner-grid,
  .plans-grid,
  .cta-grid,
  .blog-grid,
  .form-grid,
  .dashboard-grid,
  .admin-metrics,
  .editor-controls,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }
}
