:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #eef3f1;
  --text: #17211f;
  --muted: #66736f;
  --line: #d8e0dd;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --auction: #8a4b10;
  --direct: #145c9e;
  --danger: #9f2f2f;
  --shadow: 0 12px 30px rgba(23, 33, 31, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.site-nav {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - 1220px) / 2 + 24px));
}

.site-nav__toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: none;
  gap: 4px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.site-nav__toggle span {
  background: var(--text);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 20px;
}

.site-nav a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-strong);
}

.site-nav__brand {
  color: var(--accent-strong) !important;
  font-size: 1.04rem;
}

.site-nav__links {
  align-items: center;
  display: flex;
  gap: 24px;
}

.site-nav__login {
  background: var(--accent);
  border-radius: 8px;
  color: #ffffff !important;
  padding: 11px 16px;
}

.site-nav__login:hover {
  background: var(--accent-strong);
  color: #ffffff !important;
}

#favoritosMenu {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

#favoritosMenu.is-active {
  color: var(--accent-strong);
}

.site-nav__links > .is-active {
  color: var(--accent-strong);
}

#favoritosCount {
  align-items: center;
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 0.78rem;
  justify-content: center;
  min-width: 24px;
  padding: 3px 7px;
}

.topbar {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(20, 92, 158, 0.84)),
    url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.topbar__inner {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1220px;
  min-height: 260px;
  padding: 48px 24px 34px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  margin-bottom: 0;
  max-width: 820px;
}

.topbar__metric {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  display: grid;
  min-width: 132px;
  padding: 16px;
  text-align: center;
}

.topbar__metric strong {
  font-size: 2rem;
  line-height: 1;
}

.topbar__metric span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

.page {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 300px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px;
}

.mobile-filter-button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: none;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
}

.filter-icon {
  display: grid;
  gap: 3px;
  width: 18px;
}

.filter-icon::before,
.filter-icon::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
}

.filter-icon::before {
  width: 18px;
}

.filter-icon::after {
  justify-self: end;
  width: 11px;
}

.filters,
.results__bar,
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.filters__header,
.results__bar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.filters h2,
.results h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.price-filter__title,
.sort span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

select,
input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

select:focus,
input:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.price-filter {
  display: grid;
  gap: 10px;
}

.price-filter__inputs {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.button {
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 0 14px;
}

.button:hover {
  background: var(--accent-strong);
}

.button--ghost {
  background: var(--panel-soft);
  color: var(--accent-strong);
}

.button--ghost:hover {
  background: #dce9e5;
}

.results {
  display: grid;
  gap: 18px;
}

.results__bar {
  padding: 16px 18px;
}

.results__bar p {
  color: var(--muted);
  margin-bottom: 0;
}

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.card__image {
  aspect-ratio: 4 / 3;
  background: #dfe7e4;
  overflow: hidden;
  position: relative;
}

.card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  left: 12px;
  position: absolute;
  right: 64px;
  top: 12px;
}

.favorite-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.18);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.2rem;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 42px;
  z-index: 2;
}

.favorite-button:hover,
.favorite-button.is-favorite {
  color: #d12b4c;
}

.favorite-button.is-favorite {
  background: #ffffff;
}

.tag {
  backdrop-filter: blur(8px);
  background: rgba(23, 33, 31, 0.74);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 6px 9px;
}

.tag--auction {
  background: rgba(138, 75, 16, 0.86);
}

.tag--direct {
  background: rgba(20, 92, 158, 0.86);
}

.tag--occupied {
  background: rgba(159, 47, 47, 0.86);
}

.card__body {
  display: grid;
  flex: 1;
  gap: 10px;
  padding: 15px;
}

.card__meta {
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card h3 {
  
  margin-bottom: 0;
}

.card p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.card__footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.facts {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin: 2px 0 0;
}

.facts div {
  background: var(--panel-soft);
  border-radius: 8px;
  min-width: 0;
  padding: 9px 10px;
}

.facts dt {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.facts dd {
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.price {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.15;
}

.price-from {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: line-through;
}

.location {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
  text-align: left;
  overflow-wrap: anywhere;
}

.card__link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  width: 100%;
}

.empty {
  padding: 34px 18px;
  text-align: center;
}

.empty--error {
  border-color: rgba(159, 47, 47, 0.38);
}

.empty--error h3 {
  color: var(--danger);
}

.empty p {
  color: var(--muted);
}

.import-page {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 980px;
  padding: 34px 24px;
}

.import-panel,
.import-message {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.import-panel h1 {
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 14px;
}

.import-panel p,
.import-message p {
  color: var(--muted);
  line-height: 1.55;
}

.import-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.state-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  margin: 0;
  padding: 16px;
}

.state-picker legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 8px;
}

.state-picker label {
  align-items: center;
  background: var(--panel-soft);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
}

.state-picker input {
  min-height: auto;
  width: auto;
}

.state-picker span {
  font-weight: 900;
}

.import-message--error {
  border-color: rgba(159, 47, 47, 0.38);
}

.import-message--error h2 {
  color: var(--danger);
}

.import-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.import-stats div {
  background: var(--panel-soft);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.import-stats strong {
  color: var(--accent-strong);
  font-size: 2rem;
  line-height: 1;
}

.import-stats span {
  color: var(--muted);
  font-weight: 800;
}

.import-errors {
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.preview-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.preview-table th,
.preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.preview-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.preview-table td {
  color: var(--text);
}

.auth-page {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1120px;
  padding: 34px 24px;
}

.auth-intro {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.94), rgba(20, 92, 158, 0.82)),
    url("assets/imovel-generico.svg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  color: #ffffff;
  min-height: 240px;
  padding: 34px;
}

.auth-intro h1 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  margin-bottom: 14px;
}

.auth-intro p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  max-width: 620px;
}

.auth-grid {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: 24px;
}

.auth-card h2 {
  margin-bottom: 4px;
}

.auth-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.auth-row a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.check-field {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 700;
}

.check-field input {
  min-height: auto;
  width: auto;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

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

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

@media (max-width: 680px) {
  .site-nav {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 14px 16px;
  }

  .site-nav__toggle {
    align-items: center;
    display: inline-grid;
  }

  .site-nav__links {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 12px;
  }

  body.menu-open .site-nav__links {
    display: grid;
  }

  .site-nav__links a {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
  }

  .site-nav__login {
    text-align: center;
  }

  .topbar__inner,
  .filters__header,
  .results__bar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar__inner {
    min-height: 300px;
  }

  .page {
    gap: 14px;
    padding: 16px;
  }

  .mobile-filter-button {
    display: inline-flex;
  }

  .filters {
    display: none;
  }

  body.filters-open .filters {
    display: grid;
  }

  .price-filter__inputs,
  .grid {
    grid-template-columns: 1fr;
  }

  .sort {
    align-items: stretch;
    display: grid;
    min-width: 0;
  }

  .location {
    text-align: left;
  }

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

  .import-page {
    padding: 18px 16px;
  }

  .import-stats {
    grid-template-columns: 1fr;
  }

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

  .auth-page {
    padding: 18px 16px;
  }

  .auth-intro,
  .auth-card {
    padding: 20px;
  }

  .auth-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
