:root {
  --ink: #24171a;
  --muted: #6f6265;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #e7ded8;
  --brand: #7d1128;
  --brand-dark: #4d0b18;
  --green: #74a80f;
  --green-dark: #254a20;
  --coral: #b68a4d;
  --blue: #e7f0e0;
  --gold: #d7b36a;
  --shadow: 0 18px 50px rgba(77, 11, 24, 0.14);
  --radius: 8px;
  --content-width: 1180px;
  --focus-ring: 0 0 0 3px rgba(125, 17, 40, 0.22);
  --transition-ui: 160ms ease;
}

/* Base */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fcfbf9;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

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

button {
  cursor: pointer;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

button,
a,
strong,
span,
p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform var(--transition-ui);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 7px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(125, 17, 40, 0.14);
  background: rgba(255, 255, 255, 0.97);
  color: var(--brand-dark);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 164px;
  overflow: hidden;
}

.brand-logo {
  width: clamp(148px, 14vw, 178px);
  height: 66px;
  object-fit: contain;
  object-position: center;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 30px);
  color: rgba(77, 11, 24, 0.76);
}

.top-nav a {
  position: relative;
  padding: 12px 0;
  font-size: 0.94rem;
  font-weight: 650;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--brand);
}

.top-nav > a::after,
.nav-dropdown > a::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.top-nav > a:hover::after,
.top-nav > a:focus-visible::after,
.nav-dropdown:hover > a::after,
.nav-dropdown:focus-within > a::after,
.top-nav .is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.top-nav .is-current {
  color: var(--brand);
  font-weight: 850;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -18px;
  z-index: 30;
  display: grid;
  min-width: 210px;
  visibility: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    visibility 150ms ease;
}

.nav-dropdown-menu a {
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: #f7efed;
  color: var(--brand);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.header-action,
.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  transition:
    transform var(--transition-ui),
    background var(--transition-ui),
    border-color var(--transition-ui);
}

.header-action,
.primary-button {
  background: var(--brand);
  color: #fff;
}

.header-action:hover,
.primary-button:hover {
  border-color: var(--brand);
  background: #fff;
  color: var(--brand);
  transform: translateY(-1px);
}

.ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.ghost-button.light {
  border-color: rgba(255, 255, 255, 0.56);
  color: #fff;
}

.ghost-button.light:hover {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
}

.wide {
  width: 100%;
}

/* Public pages */
.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--header-height, 82px));
  min-height: calc(100svh - var(--header-height, 82px));
  align-items: center;
  padding: clamp(96px, 12vh, 150px) clamp(18px, 5vw, 60px) 118px;
  overflow: hidden;
  isolation: isolate;
  background: #2c0811;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(44, 8, 17, 0.9), rgba(44, 8, 17, 0.58) 43%, rgba(44, 8, 17, 0.12));
  pointer-events: none;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-carousel-track.is-resetting {
  transition: none;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  background: center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  margin: 0 auto;
}

/* Controles do carrossel: setas e miniaturas centralizadas na parte de baixo. */
.hero-controls {
  position: absolute;
  right: 0;
  bottom: clamp(18px, 4vh, 34px);
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
}

.hero-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(44, 8, 17, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
  transition:
    background var(--transition-ui),
    border-color var(--transition-ui),
    transform var(--transition-ui);
}

.hero-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-arrow:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

.hero-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 6px 4px;
  scrollbar-width: none;
}

.hero-thumbs::-webkit-scrollbar {
  display: none;
}

.hero-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  padding: 0;
  background: #4d0b18 center / cover no-repeat;
  opacity: 0.62;
  transition:
    opacity var(--transition-ui),
    border-color var(--transition-ui),
    transform var(--transition-ui),
    box-shadow var(--transition-ui);
}

.hero-thumb:hover {
  opacity: 0.9;
}

.hero-thumb.is-active {
  border-color: #fff;
  opacity: 1;
  transform: scale(1.14);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track,
  .hero-arrow,
  .hero-thumb {
    transition: none;
  }
}

@media (max-width: 520px) {
  .hero-controls {
    gap: 8px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

  .hero-thumb {
    width: 36px;
    height: 36px;
  }

  .hero-thumbs {
    gap: 8px;
  }
}

/* Título e texto trocam junto com a foto do carrossel. */
.hero-content [data-banner-title],
.hero-content [data-banner-description],
.hero-content .hero-actions {
  transition:
    opacity 350ms ease,
    transform 350ms ease;
}

.hero-content.is-changing [data-banner-title],
.hero-content.is-changing [data-banner-description],
.hero-content.is-changing .hero-actions {
  opacity: 0;
  transform: translateY(10px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-content [data-banner-title],
  .hero-content [data-banner-description],
  .hero-content .hero-actions {
    transition: none;
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e7cb8d;
}

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

h1 {
  max-width: 740px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}

.quick-search {
  display: grid;
  grid-template-columns: 1.2fr 1.35fr 1fr auto;
  gap: 12px;
  width: min(980px, 100%);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quick-search-band {
  position: relative;
  z-index: 3;
  padding: 28px clamp(18px, 5vw, 60px);
  background: var(--brand-dark);
}

.quick-search {
  grid-template-columns: minmax(260px, 1.8fr) minmax(170px, 0.65fr) minmax(190px, 0.75fr) auto;
  width: min(1180px, 100%);
  margin: 0 auto;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.quick-search label {
  color: rgba(255, 255, 255, 0.82);
}

.quick-search-query input {
  font-weight: 700;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

textarea {
  min-height: 118px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(125, 17, 40, 0.12);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 92px) 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-head > p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
  border: 1px solid #ead8ce;
  border-radius: 8px;
  padding: 16px;
  background: #fff7f2;
}

.advanced-filters label {
  gap: 5px;
  grid-column: span 2;
  min-width: 0;
}

.advanced-filters input,
.advanced-filters select {
  border-color: #e4c3b2;
  background: #fff;
}

.catalog-page {
  background: #f8f6f2;
}

.catalog-page-hero {
  display: grid;
  min-height: 330px;
  align-items: end;
  padding: 70px clamp(18px, 5vw, 60px) 46px;
  background:
    linear-gradient(90deg, rgba(44, 8, 17, 0.9), rgba(44, 8, 17, 0.3)),
    url("assets/imovel-casa.jpg") center 46% / cover no-repeat;
  color: #fff;
}

.catalog-page-hero.all-properties {
  background:
    linear-gradient(90deg, rgba(44, 8, 17, 0.92), rgba(44, 8, 17, 0.3)),
    url("assets/portal-paraiso-hero.jpeg") center 42% / cover no-repeat;
}

.catalog-page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.catalog-page-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.catalog-page-hero p:not(.eyebrow) {
  max-width: 660px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.6;
}

.catalog-results {
  padding-top: 52px;
}

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

.catalog-filters .filter-query {
  grid-column: span 4;
}

.filter-search-button,
.filter-clear-button {
  width: 100%;
  min-height: 46px;
  grid-column: span 2;
  align-self: end;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: normal;
  white-space: nowrap;
}

.filter-search-button {
  background: var(--brand);
  color: #fff;
}

.filter-clear-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.catalog-property-grid {
  width: 100%;
}

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

.property-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(77, 11, 24, 0.07);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.property-card-link {
  cursor: pointer;
}

.property-card-main-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.property-card:hover {
  border-color: rgba(125, 17, 40, 0.3);
  box-shadow: 0 18px 38px rgba(77, 11, 24, 0.12);
  transform: translateY(-3px);
}

.property-card-link:focus-within {
  outline: 3px solid rgba(125, 17, 40, 0.28);
  outline-offset: 3px;
}

.card-actions {
  position: relative;
  z-index: 2;
}

.property-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--blue);
}

.property-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.property-card:hover .property-media img {
  transform: scale(1.035);
}

.badge-row {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(77, 11, 24, 0.92);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

.badge.alt {
  background: rgba(116, 168, 15, 0.95);
}

.property-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.property-title {
  min-height: 62px;
}

.property-title h3 {
  margin: 0 0 6px;
  min-height: 2.5em;
  font-size: 1.05rem;
  line-height: 1.25;
}

.property-title span {
  color: var(--muted);
  font-size: 0.92rem;
}

.price {
  font-size: 1.24rem;
  font-weight: 880;
  color: var(--brand-dark);
}

.facts {
  display: grid;
  grid-template-columns: minmax(84px, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.facts span {
  display: grid;
  min-width: 0;
  min-height: 46px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fdfbf8;
  line-height: 1.25;
  text-align: center;
}

.facts span:first-child {
  padding-right: 4px;
  padding-left: 4px;
  font-size: 0.76rem;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions button,
.card-actions a {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  padding: 9px 8px;
  text-align: center;
}

.card-actions a {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
}

.card-actions .details-link {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.categories-band {
  width: 100%;
  max-width: none;
  padding-right: clamp(18px, 5vw, 60px);
  padding-left: clamp(18px, 5vw, 60px);
  background: #f4f1ea;
}

.categories-band .section-head,
.category-grid {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

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

.category-tile {
  display: grid;
  gap: 24px;
  min-height: 178px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 24px rgba(77, 11, 24, 0.05);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.category-tile:hover,
.category-tile:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 16px 34px rgba(77, 11, 24, 0.1);
  transform: translateY(-3px);
}

.category-tile span {
  color: var(--brand);
  font-weight: 850;
}

.category-tile strong {
  max-width: 230px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.admin-page {
  background: #f7f3ef;
}

.admin-auth-pending .admin-main {
  visibility: hidden;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.password-change-notice {
  display: flex;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 36px));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 24px;
  border: 1px solid #d7a51d;
  border-left: 5px solid #d7a51d;
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff8df;
  color: var(--brand-dark);
}

.password-change-notice[hidden] {
  display: none;
}

.password-change-notice div {
  display: grid;
  gap: 5px;
}

.password-change-notice p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.password-change-notice .primary-button {
  flex: 0 0 auto;
}

.admin-header {
  position: sticky;
}

.admin-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-header-actions .ghost-button,
.admin-header-actions .header-action {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow-wrap: normal;
}

.admin-user-chip {
  display: inline-flex;
  max-width: 230px;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px 3px 3px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.admin-user-chip:hover {
  border-color: var(--brand);
}

.admin-avatar,
.access-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 850;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.74rem;
}

.admin-user-text {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.admin-user-text strong,
.admin-user-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.admin-user-text strong {
  font-size: 0.8rem;
}

.admin-user-text small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #f5f0ec;
}

.admin-tabs button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  overflow-wrap: normal;
  transition:
    background var(--transition-ui),
    color var(--transition-ui);
}

@media (max-width: 1320px) {
  .admin-tabs button {
    padding: 0 12px;
  }

  .admin-tabs button svg {
    display: none;
  }
}

.admin-tabs button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-tabs button:not(.is-active):hover {
  background: #fff;
  color: var(--brand);
}

.admin-tabs button.is-active {
  background: var(--brand);
  color: #fff;
}

.admin-main {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 42px 0 30px;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar h1 {
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1;
}

.admin-toolbar p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-panel {
  padding-top: 38px;
}

.admin-panel[hidden] {
  display: none;
}

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

.admin-panel-heading h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.admin-panel-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-panel-actions > span,
.metrics-note {
  color: var(--muted);
  font-weight: 750;
}

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

.admin-property-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(77, 11, 24, 0.06);
}

.admin-property-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
}

.admin-property-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.admin-property-body h3 {
  margin: 5px 0;
  min-height: 2.5em;
  font-size: 1.08rem;
  line-height: 1.25;
}

.admin-property-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-property-code {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-property-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-property-facts span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fcfaf7;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.admin-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.admin-card-actions button,
.admin-card-actions a {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.admin-card-actions button:first-child {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.admin-card-actions .danger {
  color: #a23f33;
}

.admin-editor-form {
  gap: 20px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.editor-gallery-section,
.editor-section {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(77, 11, 24, 0.05);
}

.editor-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.editor-section-heading > span {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.editor-section-heading h3 {
  margin: 0 0 5px;
  color: var(--brand-dark);
  font-size: 1.18rem;
  line-height: 1.25;
}

.editor-section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.admin-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.editor-fields {
  display: grid;
  gap: 20px;
}

.editor-summary {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.editor-summary > strong {
  color: var(--brand-dark);
  font-size: 1.35rem;
  line-height: 1.2;
}

.editor-summary > span:not(.detail-purpose) {
  color: var(--muted);
}

.editor-summary p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.banner-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.banner-editor-fields {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.photo-dropzone.compact {
  min-height: 150px;
}

.banner-button-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fdfbf8;
}

.banner-live-preview {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 14px;
}

.banner-live-preview > span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.banner-live-preview > small {
  color: var(--muted);
  line-height: 1.45;
}

.banner-preview-canvas {
  display: grid;
  min-height: 520px;
  align-content: center;
  gap: 14px;
  overflow: hidden;
  border-radius: 8px;
  padding: 26px;
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.banner-preview-canvas > strong {
  font-size: 2.25rem;
  line-height: 1;
}

.banner-preview-canvas > p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.banner-preview-canvas > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.banner-preview-canvas > div > span {
  pointer-events: none;
}

/* Admin: permissões e acessos */
.admin-panel.is-readonly [data-requires-edit] {
  display: none !important;
}

.admin-panel.is-readonly input:disabled,
.admin-panel.is-readonly textarea:disabled,
.admin-panel.is-readonly select:disabled {
  background: #f8f5f2;
  color: var(--ink);
  cursor: not-allowed;
  opacity: 1;
}

[data-admin-tab-target][hidden] {
  display: none !important;
}

.admin-panel-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.access-chain {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.access-chain-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.access-chain-heading h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.2rem;
}

.access-tree,
.access-tree ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.access-tree ul {
  position: relative;
  margin-top: 10px;
  padding-left: 30px;
}

.access-tree ul::before {
  position: absolute;
  top: 0;
  bottom: 22px;
  left: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  content: "";
}

.access-tree ul > li {
  position: relative;
}

.access-tree ul > li::before {
  position: absolute;
  top: 30px;
  left: -16px;
  width: 14px;
  height: 2px;
  background: var(--line);
  content: "";
}

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

.access-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fdfbf8;
}

.access-card.is-owner {
  border-color: rgba(125, 17, 40, 0.3);
  background: #fff8f7;
}

.access-card.is-current {
  box-shadow: inset 4px 0 0 var(--brand);
}

.access-avatar {
  width: 42px;
  height: 42px;
  font-size: 0.86rem;
}

.access-card:not(.is-owner) .access-avatar {
  background: #8a7d80;
}

.access-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.access-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.access-name-row strong {
  color: var(--brand-dark);
  font-size: 1rem;
}

.access-badge {
  border-radius: 999px;
  padding: 3px 9px;
  background: #efe8e3;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.access-badge.is-owner {
  background: var(--brand);
  color: #fff;
}

.access-badge.is-you {
  background: #e7f0e0;
  color: var(--green-dark);
}

.access-email {
  color: var(--ink);
  font-size: 0.88rem;
}

.access-details,
.access-origin {
  color: var(--muted);
  font-size: 0.8rem;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.permission-chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.permission-chip.is-edit {
  border-color: rgba(125, 17, 40, 0.35);
  color: var(--brand);
}

.permission-chip.is-view {
  border-color: #d9c38f;
  color: #8a6a1f;
}

.permission-chip.is-none {
  text-decoration: line-through;
  opacity: 0.7;
}

.permission-chip.is-owner {
  border-color: var(--brand);
  color: var(--brand);
}

.access-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.access-actions .danger {
  color: #a23f33;
}

.access-locked {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

/* O painel acompanha a altura do conteúdo e nunca passa da tela; só o miolo rola. */
.admin-dialog {
  width: min(760px, calc(100% - 24px));
  height: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(36, 23, 26, 0.35);
}

.admin-dialog[open] {
  display: flex;
  flex-direction: column;
}

.admin-dialog.is-narrow {
  width: min(520px, calc(100% - 24px));
}

.admin-dialog::backdrop {
  background: rgba(36, 23, 26, 0.55);
  backdrop-filter: blur(3px);
}

.admin-dialog-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.admin-dialog-header,
.admin-dialog-footer {
  flex: 0 0 auto;
}

.admin-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
}

.admin-dialog-header,
.admin-dialog-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
}

.admin-dialog-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.admin-dialog-header h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.5rem;
}

.admin-dialog-header .eyebrow {
  margin-bottom: 6px;
}

.admin-dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

.admin-dialog-body {
  display: grid;
  gap: 22px;
  overflow-y: auto;
  padding: 22px;
}

.admin-dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fbf8f5;
}

.admin-dialog-footer .form-status {
  margin: 0 auto 0 0;
}

.dialog-section {
  display: grid;
  gap: 12px;
}

.dialog-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.dialog-section h3 span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.72rem;
}

.access-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.access-type-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}

.access-type-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.access-type-option span {
  display: grid;
  gap: 4px;
}

.access-type-option strong {
  color: var(--brand-dark);
  font-size: 0.95rem;
}

.access-type-option small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

.access-type-option:has(input:checked) {
  border-color: var(--brand);
  background: #fff8f7;
  box-shadow: 0 0 0 1px var(--brand);
}

.permission-editor {
  display: grid;
  gap: 10px;
}

.permission-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.permission-presets button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: #fff;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}

.permission-presets button:hover {
  border-color: var(--brand);
}

.permission-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px;
}

.permission-row + .permission-row {
  border-top: 1px solid var(--line);
}

.permission-row > div:first-child {
  display: grid;
  gap: 2px;
}

.permission-row strong {
  color: var(--ink);
}

.permission-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: #f5f0ec;
}

.segmented label {
  display: block;
  color: inherit;
  font-size: inherit;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.segmented span {
  display: block;
  min-width: 64px;
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--brand);
  color: #fff;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.account-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.account-summary dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-summary dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .access-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .access-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .access-type-options,
  .account-summary {
    grid-template-columns: 1fr;
  }

  .access-tree ul {
    padding-left: 18px;
  }

  .access-tree ul::before {
    left: 6px;
  }

  .access-tree ul > li::before {
    left: -12px;
    width: 10px;
  }

  .admin-dialog-footer {
    flex-wrap: wrap;
  }

  .admin-dialog-footer .form-status {
    width: 100%;
  }
}

/* Admin: carrossel, contato, gráficos e avisos */
.metrics-charts {
  --chart-surface: #ffffff;
  --chart-series-1: #9b1c36;
  --chart-series-2: #bf8520;
  --chart-grid: #eee8e3;
  --chart-baseline: #cfc4bd;
  --chart-muted: #8a7d80;
  margin-top: 28px;
}

.metrics-charts-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.metrics-charts-toolbar h3 {
  margin-bottom: 6px;
  font-size: 1.4rem;
}

.chart-filter {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #f5f0ec;
}

.chart-filter button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.chart-filter button:not(.is-active):hover {
  background: #fff;
  color: var(--brand);
}

.chart-filter button.is-active {
  background: var(--brand);
  color: #fff;
}

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

.chart-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--chart-surface);
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 18px;
}

.chart-card-header h4 {
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.chart-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
}

.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-key {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--chart-series-1);
}

.chart-key.is-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

.chart-key.series-2 {
  background: var(--chart-series-2);
}

.chart {
  position: relative;
  min-width: 0;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-gridline,
.chart-baseline {
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart svg .chart-gridline {
  stroke: var(--chart-grid);
}

.chart svg .chart-baseline {
  stroke: var(--chart-baseline);
}

.chart-axis {
  fill: var(--chart-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart-value {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.chart-line {
  fill: none;
  stroke: var(--chart-series-1);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.series-2 {
  stroke: var(--chart-series-2);
}

.chart-dot {
  fill: var(--chart-series-1);
  stroke: var(--chart-surface);
  stroke-width: 2;
}

.chart-dot.series-2 {
  fill: var(--chart-series-2);
}

.chart-column {
  fill: var(--chart-series-1);
}

.chart-crosshair {
  stroke: var(--chart-baseline);
  stroke-width: 1;
}

.chart-overlay {
  fill: transparent;
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 4px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.chart-tooltip strong {
  color: var(--brand-dark);
}

.chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.chart-tooltip b {
  margin-left: auto;
  padding-left: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chart-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.chart-bars {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-bars li {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.chart-bar-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.chart-bar-track {
  display: block;
  height: 16px;
}

.chart-bar {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--chart-series-1);
}

.chart-bar-value {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-table summary {
  width: fit-content;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.chart-table-scroll {
  max-height: 260px;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.chart-table th,
.chart-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.chart-table th {
  position: sticky;
  top: 0;
  background: #fbf8f5;
  color: var(--muted);
}

.chart-table tr:last-child td {
  border-bottom: 0;
}

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

  .chart-card {
    padding: 16px;
  }

  .chart-bars li {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 6px 10px;
  }

  .chart-bar-label {
    grid-column: 1 / -1;
  }
}

.admin-back-link {
  margin-bottom: 14px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
}

.admin-back-link:hover {
  text-decoration: underline;
}

.admin-empty-state {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 42px 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.admin-empty-state strong {
  color: var(--brand-dark);
  font-size: 1.1rem;
}

.editor-section-heading > div {
  flex: 1 1 auto;
}

.section-counter {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 11px;
  background: #f7efed;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.slide-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slide-item {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fdfbf8;
}

.slide-side {
  display: grid;
  align-content: start;
  gap: 8px;
}

.slide-media {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper);
}

.slide-status {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(36, 23, 26, 0.86);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
}

.slide-device-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
}

.slide-device {
  gap: 5px;
}

.slide-device select {
  min-height: 38px;
  padding: 0 10px;
}

.slide-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.slide-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.slide-toggle.is-off {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.slide-item.is-inactive {
  border-style: dashed;
  background: #f6f2ee;
}

.slide-item.is-inactive .slide-media img {
  filter: grayscale(1);
  opacity: 0.55;
}

.slide-item.is-inactive .slide-fields {
  opacity: 0.72;
}

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

.slide-button-row {
  display: grid;
  gap: 8px;
}

.slide-button-row .check-row {
  color: var(--brand-dark);
  font-weight: 850;
}

.slide-button-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.banner-preview-status {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 850;
}

.banner-preview-canvas.is-inactive {
  filter: grayscale(0.85);
}

.banner-preview-dots span.is-off {
  opacity: 0.35;
}

.slide-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.slide-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.slide-fields textarea {
  min-height: 78px;
}

.slide-order {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.slide-actions {
  display: grid;
  grid-template-columns: 38px 38px minmax(0, 1fr);
  gap: 6px;
}

@media (max-width: 760px) {
  .slide-item {
    grid-template-columns: 1fr;
  }
}

.slide-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.slide-actions button:not(:disabled):hover {
  border-color: var(--brand);
  color: var(--brand);
}

.slide-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}

.slide-actions .danger {
  color: #a23f33;
}

.slide-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.photo-dropzone.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.45;
}

.field-hint.is-error {
  color: #a23f33;
}

input[aria-invalid="true"] {
  border-color: #c9695d;
}

.banner-preview-canvas {
  position: relative;
}

.banner-preview-canvas > .banner-preview-dots {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  justify-content: center;
  gap: 6px;
}

.banner-preview-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background var(--transition-ui);
}

.banner-preview-dots span.is-active {
  background: #fff;
}

.unsaved-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #9a6a12;
  font-size: 0.84rem;
  font-weight: 800;
}

.unsaved-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7a51d;
  content: "";
}

.token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.token-row button {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fdfbf8;
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.token-row button small {
  color: var(--muted);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 650;
}

.token-row button:hover {
  border-color: var(--brand);
}

.whatsapp-preview {
  overflow: hidden;
  border-radius: 8px;
  background: #efeae2;
  box-shadow: var(--shadow);
}

.whatsapp-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--brand-dark);
  color: #fff;
}

.whatsapp-preview-header div {
  display: grid;
  gap: 2px;
}

.whatsapp-preview-header small {
  color: rgba(255, 255, 255, 0.72);
}

.whatsapp-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
}

.whatsapp-preview-body {
  display: grid;
  gap: 8px;
  min-height: 300px;
  align-content: start;
  padding: 18px 16px;
}

.whatsapp-preview-body small {
  justify-self: center;
  border-radius: 6px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.whatsapp-bubble {
  justify-self: end;
  max-width: 88%;
  margin: 0 0 8px;
  border-radius: 8px 0 8px 8px;
  padding: 9px 12px;
  background: #d9fdd3;
  color: #111b21;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.contact-test-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.contact-test-links .ghost-button {
  padding-right: 10px;
  padding-left: 10px;
  font-size: 0.82rem;
}

.contact-test-links [aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(420px, calc(100% - 48px));
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 750;
  line-height: 1.45;
  box-shadow: var(--shadow);
  animation: admin-toast-in 220ms ease;
}

.admin-toast[data-tone="error"] {
  border-left-color: #e0806f;
}

@keyframes admin-toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-toast {
    animation: none;
  }
}

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

.metric-card {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  overflow: hidden;
}

.metric-card > span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card > strong {
  color: var(--brand-dark);
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  line-height: 1;
}

.metric-card .metric-property-name {
  font-size: 1.25rem;
  line-height: 1.3;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.4;
}

.metrics-table-section {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.metrics-table-section h3 {
  font-size: 1.4rem;
}

.metrics-table {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.metrics-row {
  display: grid;
  grid-template-columns: 40px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.metrics-row img {
  width: 72px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.metrics-position {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
}

.metrics-row div {
  display: grid;
  gap: 4px;
}

.metrics-row div span {
  color: var(--muted);
  font-size: 0.82rem;
}

.property-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(77, 11, 24, 0.06);
}

.property-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.form-row.four {
  grid-template-columns: repeat(4, 1fr);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

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

.photo-uploader {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.photo-uploader legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.photo-dropzone {
  display: grid;
  min-height: 132px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 2px dashed #d7b4b9;
  border-radius: 8px;
  padding: 18px;
  background: #fff8f7;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.photo-dropzone strong {
  color: var(--brand);
  font-size: 1rem;
}

.photo-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  opacity: 0;
}

.photo-upload-status {
  color: var(--muted);
  font-size: 0.84rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.photo-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview span {
  position: absolute;
  left: 7px;
  bottom: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(77, 11, 24, 0.86);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 850;
}

.photo-preview button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-weight: 900;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: none;
  padding: clamp(46px, 7vw, 72px) clamp(18px, 5vw, 60px);
  background: var(--brand-dark);
  color: #fff;
}

.contact-band > div:first-child {
  width: min(820px, 100%);
}

.contact-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.contact-points span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
  font-weight: 750;
}

/* Rodapé na mesma cor da faixa de contato, para os dois formarem um só bloco. */
.site-footer {
  padding: 0 clamp(18px, 5vw, 60px);
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 48px;
  padding: 30px 0 36px;
}

/* Quando a faixa de contato vem logo antes, uma linha fina separa as duas partes do bloco. */
main:has(> .contact-band:last-child) + .site-footer .footer-inner {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-brand {
  display: grid;
  gap: 6px;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  margin: 0;
}

.footer-info div {
  display: grid;
  gap: 4px;
}

.footer-info dt {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.footer-info dd {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.site-footer a {
  color: #fff;
  font-weight: 700;
}

.footer-review {
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0 28px;
}

.footer-review-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  padding: 10px 22px;
  transition:
    background var(--transition-ui),
    border-color var(--transition-ui),
    color var(--transition-ui);
}

.footer-review-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: #e7cb8d;
}

.site-footer .footer-review-button:hover,
.site-footer .footer-review-button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

/* Property detail */
.empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 260px;
  place-items: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.12rem;
}

.property-detail-page {
  background: #fff;
}

.detail-loading,
.detail-not-found {
  display: grid;
  min-height: 62vh;
  place-items: center;
  align-content: center;
  gap: 16px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  text-align: center;
}

.detail-not-found h1 {
  color: var(--brand-dark);
}

.detail-not-found p {
  max-width: 580px;
  color: var(--muted);
  line-height: 1.6;
}

.not-found-logo {
  width: min(280px, 72vw);
  max-height: 130px;
  object-fit: contain;
}

.detail-breadcrumb {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-breadcrumb li:not(:last-child)::after {
  margin-left: 9px;
  content: "/";
}

.detail-breadcrumb a:hover {
  color: var(--brand);
}

.detail-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 520px;
  max-height: 720px;
}

.detail-gallery.is-single {
  display: block;
}

.detail-main-image {
  width: 100%;
  height: 100%;
  min-height: 520px;
  max-height: 720px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--paper);
}

.detail-thumbnails {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 10px;
  overflow-y: auto;
}

.detail-thumbnail {
  overflow: hidden;
  min-height: 120px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: #fff;
}

.detail-thumbnail.is-active {
  border-color: var(--brand);
}

.detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 30px;
  border-bottom: 1px solid var(--line);
}

.detail-heading h1 {
  max-width: 900px;
  margin: 14px 0 10px;
  color: var(--brand-dark);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-address {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.detail-code {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(28px, 5vw, 64px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 90px;
  align-items: start;
}

.detail-content {
  min-width: 0;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.detail-facts div {
  display: grid;
  min-height: 88px;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fdfbf8;
}

.detail-facts strong,
.detail-facts span {
  display: block;
}

.detail-facts strong {
  color: var(--brand-dark);
  font-size: 1.08rem;
}

.detail-facts span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.detail-section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  margin-bottom: 22px;
  color: var(--brand-dark);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.detail-copy {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}

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

.feature-list span {
  min-height: 50px;
  align-content: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--ink);
  font-weight: 750;
}

.location-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fdfbf8;
}

.location-address a {
  color: var(--brand);
  font-weight: 850;
}

.detail-map {
  width: 100%;
  min-height: 390px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
}

.detail-map-consent {
  display: grid;
  min-height: 390px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--paper);
  text-align: center;
}

.detail-map-consent p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-map-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fdfbf8;
}

.admin-map-check div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.admin-map-check span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-map-check a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.48;
}

.detail-contact {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-purpose {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-price {
  color: var(--brand-dark);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.detail-contact > p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-contact-meta {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.detail-contact-meta span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-contact-meta strong {
  color: var(--ink);
}

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

.similar-property {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.similar-property div {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.similar-property span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.similar-property strong {
  line-height: 1.25;
}

.similar-property small {
  color: var(--muted);
  font-weight: 750;
}

.access-management {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 24px;
  align-items: start;
}

.access-form {
  min-width: 0;
}

.access-forms {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.access-form label {
  display: grid;
  gap: 7px;
}

.access-form label > span {
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.access-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.access-form small {
  color: var(--muted);
  line-height: 1.45;
}

.authorized-users {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.authorized-users h3 {
  color: var(--brand-dark);
  font-size: 1.45rem;
}

.authorized-user-list {
  display: grid;
  gap: 10px;
}

.authorized-user {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.authorized-user > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.authorized-user strong,
.authorized-user span {
  overflow-wrap: anywhere;
}

.authorized-user span {
  color: var(--muted);
  font-size: 0.82rem;
}

.current-user-label {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 7px 10px;
  background: #edf4e3;
  color: var(--green-dark) !important;
  font-weight: 850;
}

.compact-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 11px;
  font-size: 0.8rem;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.form-status.is-success {
  color: var(--green-dark);
}

.form-status.is-error {
  color: #9b2c25;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(44, 8, 17, 0.62), rgba(44, 8, 17, 0.9)),
    url("assets/portal-paraiso-hero.jpeg") center / cover fixed no-repeat;
}

.login-shell {
  display: grid;
  width: min(1180px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  align-items: center;
  justify-items: end;
  padding: 34px 0;
}

.login-panel {
  display: grid;
  width: min(450px, 100%);
  gap: 26px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(26, 4, 9, 0.34);
}

.login-brand {
  display: inline-flex;
  width: fit-content;
}

.login-brand img {
  width: 190px;
  height: 76px;
  object-fit: contain;
}

.login-heading {
  display: grid;
  gap: 9px;
}

.login-heading h1 {
  color: var(--brand-dark);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.login-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label span {
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.login-form input:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.login-form button:disabled,
.access-form button:disabled,
.admin-header-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.login-back-link {
  width: fit-content;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .site-header {
    gap: 16px;
  }

  .admin-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    min-height: 0;
    padding-bottom: 10px;
  }

  .admin-header .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .admin-header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    overflow-x: auto;
  }

  .admin-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .brand {
    min-width: 144px;
  }

  .brand-logo {
    width: 150px;
    height: 58px;
  }

  .top-nav {
    gap: 16px;
  }

  .top-nav a {
    font-size: 0.88rem;
  }

  .header-action {
    padding-right: 14px;
    padding-left: 14px;
    font-size: 0.88rem;
  }

  .quick-search {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-contact {
    position: static;
    grid-row: 1;
  }

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

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

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

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

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

  .editor-summary {
    position: static;
  }

  .banner-editor {
    grid-template-columns: 1fr;
  }

  .banner-live-preview {
    position: static;
  }

  .access-management {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 14px;
    min-height: 0;
    padding: 8px 16px 10px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .brand-logo {
    width: 130px;
    height: 50px;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 20px;
    overflow: visible;
    border-top: 1px solid var(--line);
    padding: 7px 2px 0;
  }

  .top-nav a {
    padding: 6px 0;
    font-size: 0.88rem;
  }

  .top-nav > a::after,
  .nav-dropdown > a::after {
    bottom: 1px;
  }

  .nav-dropdown-menu {
    right: 0;
    left: auto;
  }

  .header-action {
    grid-column: 2;
    grid-row: 1;
    margin-left: auto;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 76px;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(44, 8, 17, 0.8), rgba(44, 8, 17, 0.45));
  }

  .quick-search,
  .advanced-filters,
  .form-row,
  .form-row.three,
  .form-row.four,
  .property-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .advanced-filters label {
    grid-column: auto;
  }

  .catalog-filters .filter-query {
    grid-column: auto;
  }

  .filter-search-button,
  .filter-clear-button {
    grid-column: auto;
  }

  .quick-search {
    margin-top: 0;
    padding: 14px;
  }

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

  .section-head,
  .contact-band,
  .admin-header {
    align-items: center;
  }

  .admin-header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-header-actions .ghost-button,
  .admin-user-text {
    display: none;
  }

  .admin-user-chip {
    padding-right: 3px;
  }

  .admin-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
    width: 100%;
    overflow-x: auto;
  }

  .admin-tabs button {
    flex: 0 0 auto;
    min-width: 108px;
    padding: 7px 9px;
    font-size: 0.78rem;
    line-height: 1.12;
    white-space: nowrap;
  }

  .admin-toolbar,
  .admin-panel-heading {
    display: grid;
    align-items: start;
  }

  .admin-toolbar-actions {
    justify-content: flex-start;
  }

  .admin-panel-actions {
    justify-content: space-between;
  }

  .admin-catalog,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs button svg {
    display: none;
  }

  .contact-test-links {
    grid-template-columns: 1fr;
  }

  .admin-toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

  .banner-preview-canvas {
    min-height: 440px;
  }

  .authorized-user {
    align-items: flex-start;
  }

  .metrics-row {
    grid-template-columns: 30px 58px minmax(0, 1fr);
  }

  .metrics-row img {
    width: 58px;
  }

  .metrics-row > strong:last-child {
    grid-column: 3;
  }

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

  .property-title {
    min-height: 0;
  }

  .property-title h3 {
    min-height: 0;
  }

  .card-actions button,
  .card-actions a {
    min-height: 46px;
  }

  .detail-gallery {
    display: block;
    min-height: 0;
    max-height: none;
  }

  .detail-main-image {
    min-height: 280px;
    max-height: 520px;
    aspect-ratio: 4 / 3;
  }

  .detail-thumbnails {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 88px;
    margin-top: 10px;
    overflow: visible;
  }

  .detail-thumbnail {
    min-height: 88px;
  }

  .detail-heading,
  .location-address {
    display: grid;
    align-items: start;
  }

  .detail-code {
    width: max-content;
  }

  .detail-facts,
  .feature-list,
  .similar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    display: grid;
    padding: 26px 0 30px;
  }

  .footer-info {
    display: grid;
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    width: 100%;
    align-items: stretch;
    padding: 0;
  }

  .login-panel {
    width: 100%;
    min-height: 100vh;
    align-content: center;
    border: 0;
    border-radius: 0;
    padding: 28px 22px;
  }

  .authorized-user {
    display: grid;
  }

  .authorized-user .compact-button,
  .current-user-label {
    width: fit-content;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand-logo {
    width: 116px;
    height: 46px;
  }

  .top-nav {
    gap: 7px 16px;
  }

  .header-action {
    max-width: 150px;
  }

  .hero {
    padding-top: 60px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions > * {
    width: 100%;
  }

  .admin-panel-actions {
    display: grid;
    width: 100%;
  }

  .admin-panel-actions .primary-button,
  .password-change-notice .primary-button {
    width: 100%;
  }

  .banner-preview-canvas {
    min-height: 360px;
    padding: 20px;
  }

  .banner-preview-canvas > strong {
    font-size: 1.8rem;
  }

  .section-head h2 {
    font-size: 1.9rem;
    line-height: 1.08;
  }

  .card-actions,
  .admin-card-actions {
    grid-template-columns: 1fr;
  }

  .detail-facts,
  .feature-list,
  .similar-grid {
    grid-template-columns: 1fr;
  }
}

/* Celular */
.filter-more-button,
.header-search {
  display: none;
}

/* A etiqueta vermelha sumia sobre a foto escura do topo do catálogo. */
.catalog-page-hero .eyebrow {
  color: #e7cb8d;
}

/* Em telas de toque o submenu abria no primeiro toque e o link só funcionava no segundo (iPhone). */
@media (hover: none) and (pointer: coarse) {
  .nav-dropdown-menu {
    display: none;
  }
}

@media (max-width: 760px) {
  /* Letra abaixo de 16px faz o iPhone dar zoom na página ao tocar no campo. */
  input,
  select,
  textarea {
    font-size: 16px;
  }

  /* Cabeçalho: logo, botão de contato e a lupa de pesquisa no canto direito; atalhos centralizados abaixo. */
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 10px;
  }

  .top-nav {
    justify-content: center;
  }

  .header-search {
    display: block;
    grid-column: 3;
    grid-row: 1;
  }

  .header-search summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    list-style: none;
  }

  .header-search summary::-webkit-details-marker {
    display: none;
  }

  .header-search summary svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .header-search-close,
  .header-search[open] .header-search-open {
    display: none;
  }

  .header-search[open] .header-search-close {
    display: block;
  }

  .header-search[open] summary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
  }

  .header-search-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 12px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(77, 11, 24, 0.12);
  }

  .header-search-panel .primary-button {
    min-height: 46px;
    padding: 0 16px;
  }

  /* Banner menor que a tela, para aparecer o começo da parte de baixo e ficar claro que dá para rolar. */
  .hero {
    min-height: min(440px, calc(100vh - var(--header-height, 112px) - 96px));
    min-height: min(440px, calc(100svh - var(--header-height, 112px) - 96px));
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  /* No celular o banner mostra só o título e os botões; o texto aparece no computador. */
  .hero .hero-copy {
    display: none;
  }

  .hero-content {
    min-height: var(--hero-text-height, 0px);
  }

  .hero-actions {
    margin-bottom: 0;
  }

  .contact-band {
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
  }

  .contact-band h2 {
    margin-bottom: 12px;
  }

  .contact-actions .primary-button {
    width: 100%;
  }

  .category-tile {
    min-height: 0;
    gap: 8px;
    align-content: start;
    padding: 18px 20px;
  }

  .category-tile strong {
    max-width: none;
    font-size: 1.05rem;
  }

  .catalog-filters[data-collapsible-filters] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filters[data-collapsible-filters] > label {
    grid-column: 1 / -1;
  }

  .catalog-filters[data-collapsible-filters]:not(.is-expanded) > label:nth-of-type(n + 3) {
    display: none;
  }

  .filter-more-button {
    display: inline-flex;
    min-height: 44px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d9b8a8;
    border-radius: 8px;
    padding: 0 16px;
    background: transparent;
    color: var(--brand);
    font-weight: 850;
  }

  .admin-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .admin-tabs button {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    padding: 8px 6px;
    font-size: 0.76rem;
  }

  .admin-toolbar {
    padding: 26px 0 22px;
  }

  .admin-toolbar h1 {
    font-size: 2rem;
  }

  /* A mensagem de status vazia ocupava uma linha inteira acima dos botões das janelas. */
  .admin-dialog-footer .form-status:empty {
    display: none;
  }

  .admin-dialog-footer > button {
    flex: 1 1 0;
  }

  /* Caixa dentro de caixa espremia os campos do cadastro de imóvel no celular. */
  .property-form.admin-editor-form {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 520px) {
  /* Menos espaço vazio no banner para setas e miniaturas caberem na primeira tela de celulares menores. */
  .hero {
    padding-top: 32px;
    padding-bottom: 92px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }

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

  .detail-facts div {
    min-height: 0;
    padding: 12px;
  }

  .similar-property {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .similar-property img {
    height: 100%;
    min-height: 100px;
    aspect-ratio: auto;
  }

  .detail-map-consent {
    min-height: 0;
    padding: 24px 18px;
  }

  .editor-gallery-section,
  .editor-section {
    padding: 16px;
  }

  /* O contador ao lado do título espremia o texto numa coluna estreita. */
  .editor-section-heading {
    flex-wrap: wrap;
  }

  .editor-section-heading > div {
    flex-basis: calc(100% - 51px);
    min-width: 0;
  }

  .editor-section-heading .section-counter {
    margin-left: 51px;
  }
}

@media (max-width: 360px) {
  .site-header {
    column-gap: 8px;
  }

  .site-header .brand-logo {
    width: 100px;
  }

  .site-header .header-action {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.76rem;
  }

  .header-search summary {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 20px;
    padding-bottom: 80px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}
