/* ImovFlow — Design System (identidade visual oficial) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Montserrat:wght@500;600;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/metropolis-2');

:root {
  --brand-primary: #c59461;
  --brand-accent: #a67e52;
  --brand-charcoal: #2c2c2c;
  --brand-gold-light: #d4a778;
  --brand-gray: #707070;
  --black: var(--brand-charcoal);
  --white: #ffffff;
  --pure-black: #1a1a1a;
  --light-gray: #f7f5f2;
  --apple-blue: var(--brand-primary);
  --link-blue: var(--brand-accent);
  --link-blue-dark: var(--brand-gold-light);
  --gray-80: rgba(44, 44, 44, 0.8);
  --gray-48: var(--brand-gray);
  --border: #e0dbd4;
  --filter-bg: #faf8f5;
  --dark-surface-1: #333333;
  --shadow-card: rgba(44, 44, 44, 0.18) 3px 5px 30px 0px;
  --nav-bg: rgba(44, 44, 44, 0.94);
  --error: #ff3b30;
  --success-bg: #ecfdf3;
  --success-text: #1d6f42;
  --warning-bg: #fff8e6;
  --warning-text: #8a6100;
  --font-display: 'Metropolis', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-pill: 980px;
  --max-width: 980px;
  /* Loop 1 — tokens aditivos (não substituem radius globais) */
  --surface-sand: #f4f0e8;
  --surface-warm: #fbfaf7;
  --surface-charcoal: #2c2c2c;
  --line-soft: #e0dbd4;
  --line-strong: #2c2c2c;
  --radius-editorial: 2px;
  --shadow-editorial: 0 1px 0 rgba(44, 44, 44, 0.06);
  --space-section: 72px;
  --space-block: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  min-height: 48px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-shell {
  position: relative;
  z-index: 100;
}
.nav-shell .nav-bar {
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand links actions";
}
.nav-shell .nav-menu-toggle {
  display: none;
}
.nav-shell .nav-brand {
  grid-area: brand;
  justify-self: start;
}
.nav-shell .nav-links--bar {
  grid-area: links;
  justify-self: center;
  margin: 0;
  padding: 0;
}
.nav-shell .nav-actions--bar {
  grid-area: actions;
  justify-self: end;
}
.nav-shell .nav-drawer,
.nav-shell .nav-backdrop {
  display: none !important;
}
.nav-drawer-auth {
  display: none;
}
.nav-drawer-auth-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-drawer-auth-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}
.nav-drawer-auth-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}
.nav-drawer-auth-btn {
  width: 100%;
  min-height: 44px;
}
.nav-brand {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.28px;
  justify-self: start;
}
.nav-brand:hover { text-decoration: none; opacity: 0.9; }
.nav-brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo-img { display: block; width: auto; object-fit: contain; }
.brand-logo-nav { height: 28px; max-width: 148px; }
.brand-logo-sidebar { height: 34px; max-width: 160px; }
.brand-logo-auth { height: 44px; max-width: 200px; margin: 0 auto; }
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  justify-self: center;
}
.nav-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-drawer {
  justify-self: center;
}
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
}
.nav-cta {
  display: inline-block;
  background: var(--apple-blue);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; text-decoration: none; }

/* BUTTONS */
.btn {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: opacity 0.15s, background 0.15s;
}
.btn-blue {
  background: var(--apple-blue);
  color: #fff;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
}
.btn-blue:hover { opacity: 0.88; text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--apple-blue);
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--apple-blue);
}
.btn-outline:hover { background: rgba(197, 148, 97, 0.1); text-decoration: none; }
.btn-dark {
  background: var(--black);
  color: #fff;
  padding: 8px 22px;
  border-radius: var(--radius-sm);
}
.btn-dark:hover { opacity: 0.9; text-decoration: none; color: #fff; }
.btn-filter {
  background: var(--filter-bg);
  color: var(--gray-80);
  padding: 6px 14px;
  border-radius: 11px;
  border: 3px solid rgba(0, 0, 0, 0.04);
  font-size: 14px;
}
.btn-block { display: block; width: 100%; }
.btn-sm { font-size: 14px; padding: 6px 16px; }

.btn-hover-lift {
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.15s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.btn-hover-lift:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-blue.btn-hover-lift:hover {
  box-shadow: 0 10px 28px rgba(197, 148, 97, 0.38);
  opacity: 1;
  color: #fff;
}
.btn-outline.btn-hover-lift:hover {
  box-shadow: 0 8px 22px rgba(166, 126, 82, 0.22);
}
.btn-outline-light {
  color: var(--brand-gold-light);
  border-color: rgba(212, 167, 120, 0.75);
  background: transparent;
}
.btn-outline-light:hover {
  background: rgba(197, 148, 97, 0.14);
  border-color: var(--brand-gold-light);
  color: #fff;
}
.btn-ghost-light {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-ghost-light:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.nav-cta.btn-hover-lift:hover {
  box-shadow: 0 6px 18px rgba(197, 148, 97, 0.35);
  transform: translateY(-1px);
  opacity: 1;
}

/* TYPOGRAPHY */
.display-hero {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.28px;
  margin-bottom: 8px;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-48);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.text-muted { color: var(--gray-80); }
.text-subtle { color: var(--gray-48); font-size: 14px; }
.text-link { color: var(--link-blue); font-size: 14px; }

/* LAYOUT */
.page-gray { background: var(--light-gray); min-height: calc(100vh - 48px); }
.page-white { background: var(--white); min-height: calc(100vh - 48px); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 48px 32px; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 64px 24px; }
.section-divider { border: none; border-top: 1px solid var(--border); }

/* APP SHELL */
.app-shell { display: flex; min-height: calc(100vh - 48px); }
.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--pure-black);
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
}
.app-sidebar-brand {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.app-sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-drawer-close,
.nav-drawer-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.app-drawer-close:hover,
.nav-drawer-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.app-sidebar-brand .nav-brand-logo:hover { opacity: 0.92; }
.app-sidebar-nav { flex: 1; padding: 16px 12px; }
.app-sidebar-nav a,
.app-sidebar-nav span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-bottom: 4px;
}
.app-sidebar-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.app-sidebar-nav a.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.app-sidebar-nav span.disabled { color: rgba(255, 255, 255, 0.35); cursor: default; }
.app-sidebar-user {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}
.app-sidebar-user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.app-sidebar-user-name { flex: 1; color: rgba(255, 255, 255, 0.75); }
.app-sidebar-user-edit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: -2px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}
.app-sidebar-user-edit:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}
.app-sidebar-logout {
  margin-top: 12px;
  display: none;
}
.app-sidebar-logout-btn {
  width: 100%;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}
.app-main { flex: 1; min-width: 0; background: var(--light-gray); }
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.app-header-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.app-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.app-menu-toggle,
.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-80);
  cursor: pointer;
}
.app-menu-toggle:hover,
.nav-menu-toggle:hover {
  background: var(--light-gray);
}
.nav-menu-toggle {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
}
.nav-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}
.app-nav-backdrop,
.nav-backdrop {
  display: none;
}
body.nav-drawer-open {
  overflow: hidden;
}
.app-header h1,
.app-header-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.28px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-content { padding: 32px; }

/* Bottom navigation (mobile/tablet app shell) */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.app-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--gray-48);
  font-size: 10px;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-text);
}
.app-bottom-nav__item svg {
  flex-shrink: 0;
}
.app-bottom-nav__item.is-active {
  color: var(--apple-blue);
  font-weight: 600;
}
.app-bottom-nav__item:hover {
  color: var(--gray-80);
  text-decoration: none;
}

.nav-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-drawer-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card-grid--plans {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 960px) {
  .card-grid--plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
  .card-grid--plans {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: box-shadow 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.card:hover { box-shadow: var(--shadow-card); }
.card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.196px;
  margin-bottom: 8px;
}
.card p { font-size: 14px; color: var(--gray-80); line-height: 1.43; }
.card-link { font-size: 14px; color: var(--link-blue); margin-top: 12px; display: inline-block; }
.card-link:hover { text-decoration: underline; }

.property-card { overflow: hidden; padding: 0; position: relative; cursor: pointer; }
.property-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
}
.property-card .checkbox-label { z-index: 2; }
.property-card-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-subtle);
  font-size: 14px;
  background: var(--light-gray);
}
.property-card-image {
  aspect-ratio: 4/3;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-48);
  font-size: 14px;
  position: relative;
}
.property-card-image img { width: 100%; height: 100%; object-fit: cover; }
.property-card-body { padding: 20px; }
.property-card-price {
  font-size: 21px;
  font-weight: 600;
  color: var(--black);
  margin: 8px 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.metric-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.metric-card .label { font-size: 14px; color: var(--gray-48); }
.metric-card .value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: -0.28px;
}

/* FORMS */
.form-panel {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-width: 720px;
}
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.224px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-text);
  font-size: 17px;
  outline: none;
  letter-spacing: -0.374px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(197, 148, 97, 0.22);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.property-editor-actions .btn {
  min-height: 40px;
  min-width: 132px;
  white-space: nowrap;
  line-height: 1.2;
  padding: 10px 22px;
}
.property-editor-actions__delete {
  color: var(--error);
  border-color: var(--error);
}
.property-editor-actions__delete:hover {
  background: rgba(255, 59, 48, 0.08);
  color: var(--error);
  border-color: var(--error);
}

.password-field {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.password-field:focus-within {
  background: var(--white);
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(197, 148, 97, 0.22);
}
.password-field__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--black);
  padding: 10px 0 10px 14px;
  font-family: var(--font-text);
  font-size: 17px;
  outline: none;
  letter-spacing: -0.374px;
}
.password-field__input::placeholder {
  color: var(--gray-48);
}
.password-field__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #86868b;
  cursor: pointer;
}
.password-field__toggle:hover {
  color: var(--black);
}
.password-field__toggle:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 1px;
}
.password-field__icon {
  display: block;
}
.password-field__icon--hide {
  display: none;
}
.password-field__toggle.is-visible .password-field__icon--show {
  display: none;
}
.password-field__toggle.is-visible .password-field__icon--hide {
  display: block;
}

.photo-section { margin-top: 24px; }
.photo-section__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.photo-section__title { font-size: 18px; font-weight: 600; }
.photo-section__count { font-size: 14px; color: var(--gray-48); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--light-gray); aspect-ratio: 4/3; cursor: grab; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card__actions { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,0.45); opacity: 0; transition: opacity 0.15s; }
.photo-card:hover .photo-card__actions { opacity: 1; }
.photo-card__btn { border: none; border-radius: 999px; width: 36px; height: 36px; cursor: pointer; color: #fff; font-size: 14px; }
.photo-card__btn--remove { background: #ff3b30; }
.photo-card__btn--cover { background: var(--apple-blue); }
.photo-card__badge { position: absolute; top: 8px; left: 8px; background: #ffd60a; color: #1d1d1f; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.photo-card__order { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.photo-dropzone { border: 2px dashed var(--border); border-radius: var(--radius-sm); aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-48); background: var(--filter-bg); transition: border-color 0.15s, background 0.15s; }
.photo-dropzone:hover { border-color: var(--apple-blue); background: #faf6f1; }
.photo-dropzone__plus { font-size: 28px; line-height: 1; }
.photo-dropzone__label { font-size: 13px; margin-top: 4px; }
.photo-dropzone__hint { font-size: 12px; margin-top: 2px; color: var(--gray-48); }
.photo-dropzone--disabled { pointer-events: none; opacity: 0.5; cursor: not-allowed; }
.photo-upload-progress { margin-top: 12px; }
.photo-upload-progress__track { height: 6px; border-radius: 999px; background: var(--light-gray); overflow: hidden; }
.photo-upload-progress__bar { height: 100%; border-radius: 999px; background: var(--apple-blue); transition: width 0.2s ease; }
.photo-upload-progress__label { margin-top: 8px; font-size: 14px; color: var(--gray-48); }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-error { background: #fff2f1; color: #c41e12; border: 1px solid #ffcfc9; }
.alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid #b8e6c8; }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid #ffe08a; }

.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.28px;
}
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--gray-48); }

.list-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.list-item-id { font-size: 12px; color: var(--gray-48); font-family: ui-monospace, monospace; }
.list-item-title { font-size: 17px; font-weight: 600; margin: 4px 0; }
.lead-item {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-item:hover {
  border-color: rgba(197, 148, 97, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}
.list-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--gray-48);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
}

/* COMPARE BADGE */
.compare-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pure-black);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
}
.compare-badge.hidden { display: none; }

/* FOOTER */
.footer {
  padding: 32px;
  text-align: center;
  background: var(--light-gray);
  font-size: 12px;
  color: var(--gray-48);
  border-top: 1px solid var(--border);
}

.site-footer {
  background: var(--light-gray);
  border-top: 1px solid var(--border);
  color: var(--gray-48);
  padding: 40px 24px 28px;
}

.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  align-items: start;
}

.site-footer-block {
  min-width: 0;
}

.site-footer-brand {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-charcoal);
}

.site-footer-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-48);
  max-width: 22ch;
}

.site-footer-heading {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.site-footer-links,
.site-footer-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-links a {
  color: var(--brand-charcoal);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.site-footer-links a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

.site-footer-links a:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-footer-meta {
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-48);
}

.site-footer-meta a {
  color: inherit;
  text-decoration: none;
}

.site-footer-meta a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

.site-footer-meta a:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-footer-copy {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--gray-48);
}

@media (max-width: 860px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer-tagline {
    max-width: none;
  }
}

/* PUBLIC DOC PAGES */
.public-doc {
  background: var(--white);
  padding: 40px 24px 56px;
}

.public-doc-inner {
  max-width: 720px;
  margin: 0 auto;
}

.public-doc-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  color: var(--brand-charcoal);
  line-height: 1.2;
}

.public-doc-lead {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-48);
}

.public-doc-section {
  margin-bottom: 24px;
}

.public-doc-subtitle {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-charcoal);
}

.public-doc-section p,
.public-doc-note {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--brand-charcoal);
}

.public-doc-section a {
  color: var(--brand-accent);
}

.public-doc-section a:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.public-doc-list {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  font-size: 15px;
  line-height: 1.55;
  color: var(--brand-charcoal);
}

.public-doc-list li + li {
  margin-top: 8px;
}

.public-doc-note {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--gray-48);
  font-size: 13px;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--white);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.modal-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--gray-48);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.modal-tabs button.active {
  color: var(--black);
  font-weight: 600;
  border-bottom-color: var(--apple-blue);
}
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

/* TABLE */
.table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: var(--light-gray); font-weight: 600; }
.compare-table .sticky-col {
  position: sticky;
  left: 0;
  background: var(--white);
  font-weight: 600;
  z-index: 1;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--filter-bg);
  color: var(--gray-80);
  text-transform: capitalize;
}

.checkbox-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

/* HERO / LANDING */
.hero {
  padding: 96px 32px 80px;
  text-align: center;
  background: var(--light-gray);
}
.hero p {
  font-size: 21px;
  color: var(--gray-80);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: left;
}
.hero-dark {
  background: var(--pure-black);
  color: #fff;
  padding: 80px 32px;
}
.hero-dark .section-label { color: rgba(255, 255, 255, 0.48); }
.hero-dark h1 { color: #fff; }
.hero-dark p { color: rgba(255, 255, 255, 0.75); }
.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 32px;
}
.hero-panel ul { list-style: none; }
.hero-panel li { padding: 8px 0; color: rgba(255, 255, 255, 0.85); font-size: 15px; }

/* Portal homepage (estilo vitrine imobiliária) */
.portal-hero {
  background: linear-gradient(180deg, #fff 0%, var(--light-gray) 100%);
  padding: 40px 24px 32px;
  border-bottom: 1px solid var(--border);
}
.portal-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.portal-hero-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 10px;
}
.portal-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--brand-charcoal);
  margin-bottom: 10px;
  max-width: 720px;
}
.portal-hero-sub {
  font-size: 17px;
  line-height: 1.45;
  color: var(--gray-80);
  max-width: 640px;
  margin-bottom: 24px;
}
.portal-search {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(44, 44, 44, 0.08);
  margin-bottom: 16px;
}
.portal-search-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.portal-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal-search-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-48);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portal-search-field input,
.portal-search-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--brand-charcoal);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.portal-search-field input:focus,
.portal-search-field select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(197, 148, 97, 0.18);
}
.portal-search-submit {
  white-space: nowrap;
  padding: 11px 22px;
  font-size: 15px;
  align-self: end;
}
.portal-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portal-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brand-charcoal);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.portal-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.portal-chip.is-active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.portal-chip--ghost {
  background: transparent;
  color: var(--gray-48);
}
.portal-listing {
  background: var(--light-gray);
  padding: 32px 24px 48px;
}
.portal-listing-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.portal-listing-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.portal-results-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  color: var(--brand-charcoal);
  margin-bottom: 4px;
}
.portal-results-hint {
  font-size: 14px;
  color: var(--gray-48);
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.portal-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(44, 44, 44, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(44, 44, 44, 0.12);
}
.portal-card-media {
  aspect-ratio: 4 / 3;
  position: relative;
}
.portal-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--brand-charcoal);
}
.portal-badge--sale { background: #2f6b4f; }
.portal-badge--rent { background: #3d5a8a; }
.portal-card-body {
  padding: 16px 16px 14px;
}
.portal-card-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-charcoal);
  margin: 0 0 6px;
  line-height: 1.2;
}
.portal-card-price--muted {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-48);
}
.portal-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-charcoal);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portal-card-location {
  font-size: 14px;
  color: var(--gray-48);
  margin-bottom: 10px;
}
.portal-card-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--gray-80);
}
.portal-card-features li {
  display: inline-flex;
  align-items: center;
}
.portal-card-broker {
  font-size: 12px;
  color: var(--gray-48);
  margin-bottom: 8px;
}
.portal-card-compare {
  position: relative;
  z-index: 2;
  font-size: 13px;
  color: var(--brand-accent);
  margin: 0;
  cursor: pointer;
}
.portal-card-compare input {
  margin-right: 6px;
  accent-color: var(--brand-primary);
}
.portal-empty {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
}
.portal-pagination {
  margin-top: 28px;
}
.portal-broker-cta {
  background: linear-gradient(135deg, #242424 0%, var(--brand-charcoal) 100%);
  color: #fff;
  padding: 40px 24px;
}
.portal-broker-cta-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.portal-broker-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  margin-bottom: 8px;
}
.portal-broker-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
  line-height: 1.45;
}
.portal-broker-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
html { scroll-behavior: smooth; }
@media (max-width: 960px) {
  .portal-search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .portal-search-field--wide {
    grid-column: 1 / -1;
  }
  .portal-search-submit {
    grid-column: 1 / -1;
    width: 100%;
  }
  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .portal-search-grid {
    grid-template-columns: 1fr;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-listing-toolbar {
    flex-direction: column;
  }
}
#vitrine { scroll-margin-top: 56px; }

/* SUPPORT WHATSAPP FAB */
.support-whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: opacity 0.15s, transform 0.15s;
}
.support-whatsapp-fab:hover {
  opacity: 0.92;
  transform: scale(1.04);
  color: #fff;
}

/* CHAT WIDGET (legacy Hermes — não renderizado em staging/prod) */
.chat-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--apple-blue);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: opacity 0.15s;
}
.chat-fab:hover { opacity: 0.88; }
.chat-panel {
  position: absolute;
  bottom: 68px;
  left: 0;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 28rem;
}
.chat-panel-header {
  background: var(--pure-black);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: var(--light-gray);
  min-height: 12rem;
  max-height: 18rem;
}
.chat-bubble {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
  margin-bottom: 8px;
}
.chat-bubble-user { background: var(--apple-blue); color: #fff; }
.chat-bubble-bot { background: var(--white); border: 1px solid var(--border); color: var(--black); }
.chat-panel-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.chat-panel-footer input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-family: var(--font-text);
}

.plan-card-current { border-color: var(--apple-blue) !important; box-shadow: 0 0 0 2px rgba(197, 148, 97, 0.22); }

.hidden { display: none !important; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: start;
}

.property-detail {
  max-width: 1200px;
  margin: 0 auto;
}

.property-detail-title {
  font-size: clamp(22px, 4vw, 28px);
  margin: 0;
  line-height: 1.2;
}

.property-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.property-detail-compare {
  position: static;
  box-shadow: none;
  background: var(--filter-bg);
  flex-shrink: 0;
}

.property-detail-price {
  font-size: clamp(22px, 3.5vw, 28px);
  margin-bottom: 24px;
}

.property-detail-main-image {
  position: relative;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-gray);
  aspect-ratio: 4 / 3;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.property-detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.property-detail-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

.property-detail-main-image--empty {
  min-height: 240px;
}

.property-detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.property-detail-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.property-detail-thumb.is-active {
  border-color: var(--apple-blue);
}

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

.property-detail-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 14px;
}

.property-detail-attrs--full {
  grid-column: 1 / -1;
}

.property-detail-broker {
  margin-bottom: 24px;
  padding: 16px;
}

.property-detail-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.property-detail-description {
  margin-bottom: 24px;
}

.property-detail-description-text {
  color: var(--gray-80);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.property-detail-features {
  margin-bottom: 24px;
}

.property-detail-features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.property-detail-feature-item {
  margin: 0;
  padding: 12px 16px;
  background: var(--light-gray);
  border-radius: var(--radius-sm);
  color: var(--gray-80);
  line-height: 1.5;
}

.property-detail-feature-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-48);
  margin-bottom: 4px;
  text-transform: capitalize;
}

.property-detail-feature-value {
  display: block;
}

.property-detail-similar-btn {
  width: 100%;
  max-width: 320px;
}

.gallery-lightbox {
  /* Scrim fullscreen sem propriedade inset (produto: overlay com margem no dialog) */
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  box-sizing: border-box;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__dialog {
  position: relative;
  width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__img {
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
}

.gallery-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.85;
}

.gallery-lightbox__close:hover {
  opacity: 1;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.gallery-lightbox__nav--prev { left: 16px; }
.gallery-lightbox__nav--next { right: 16px; }

.gallery-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

@media (max-width: 900px) {
  .vitrine-layout { flex-direction: column; }
  .vitrine-sidebar { width: 100%; position: static; }
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .property-detail-attrs { grid-template-columns: 1fr 1fr; }
  .property-detail-main-image { max-height: 55vh; aspect-ratio: 4 / 3; }
  .property-detail-similar-btn { max-width: none; }
  .property-detail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  .property-detail-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  .gallery-lightbox { padding: 8vh 4vw; }
  .gallery-lightbox__nav { width: 40px; height: 52px; font-size: 32px; }
  .gallery-lightbox__nav--prev { left: 8px; }
  .gallery-lightbox__nav--next { right: 8px; }
  .gallery-lightbox__img { max-width: 90vw; max-height: 78vh; }
}

[data-compare-id].compare-selected {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .app-menu-toggle,
  .nav-menu-toggle {
    display: inline-flex;
  }

  .app-drawer-close,
  .nav-drawer-close {
    display: inline-flex;
  }

  .nav-drawer-header {
    display: flex;
  }

  .app-shell.is-sidebar-open .app-nav-backdrop,
  .nav-shell.is-open .nav-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, 0.45);
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: min(280px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }

  .app-shell.is-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-logout {
    display: block;
  }

  .app-header-logout {
    display: none;
  }

  .app-bottom-nav {
    display: flex;
  }

  .app-main {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
  }

  #support-whatsapp-fab {
    right: 16px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0)) !important;
  }

  #chat-widget {
    right: 16px !important;
    left: auto !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0)) !important;
  }

  .compare-badge {
    flex-wrap: wrap;
    max-width: calc(100vw - 32px);
    bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }

  .nav-shell .nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    grid-template-areas: "toggle brand spacer";
    align-items: center;
    gap: 0;
    padding: 0 16px;
    min-height: 48px;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }

  .nav-shell .nav-bar::after {
    content: "";
    grid-area: spacer;
    width: 40px;
    height: 1px;
  }

  .nav-shell .nav-menu-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: start;
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    color: #fff;
  }

  .nav-shell .nav-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-shell .nav-brand {
    grid-area: brand;
    justify-self: center;
  }

  .nav-shell .nav-links--bar,
  .nav-shell .nav-actions--bar {
    display: none !important;
  }

  .nav-shell .brand-logo-nav {
    max-width: 120px;
  }

  .nav-shell .nav-drawer {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    flex-direction: column;
    width: min(280px, 86vw);
    padding: 20px 16px;
    padding-top: calc(20px + env(safe-area-inset-top, 0));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    background: var(--nav-bg);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .nav-shell.is-open .nav-drawer {
    visibility: visible;
    transform: translateX(0);
  }

  .nav-shell .nav-drawer-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-shell .nav-drawer .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    justify-self: auto;
  }

  .nav-shell .nav-drawer .nav-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
  }

  .nav-shell .nav-drawer .nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .app-header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav,
  .nav-shell .nav-bar { padding: 0 16px; }
  .container { padding: 32px 20px; }
  .app-content { padding: 20px; }
  .app-header { padding: 16px 20px; }
  .card-grid-ad-span { grid-column: 1 / -1; }
  .form-panel { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

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

/* Vitrine publicidade */
.vitrine-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.vitrine-content { flex: 1; min-width: 0; }
.vitrine-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}
.ad-slot {
  width: 100%;
  aspect-ratio: var(--ad-aspect, 970 / 90);
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--light-gray);
  border: 1px dashed var(--border);
}
.ad-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ad-slot a { display: block; height: 100%; }
.ad-slot-placeholder,
.ad-slot-preview .ad-slot-placeholder {
  width: 100%;
  height: 100%;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-80);
  font-size: 14px;
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(
    -45deg,
    var(--light-gray),
    var(--light-gray) 8px,
    #ececec 8px,
    #ececec 16px
  );
}
.ad-slot-placeholder small { font-size: 12px; margin-top: 4px; color: var(--text-subtle); }
.ad-slot--vitrine_top { max-height: 120px; }
.card-grid-ad-span { grid-column: 1 / -1; }

/* Admin tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  font-weight: 600;
  color: var(--gray-80);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.data-table code {
  font-size: 13px;
  background: var(--light-gray);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ——— Marketing home (B2B QR-first) ——— */
.mkt-hero {
  background: linear-gradient(165deg, #f7f5f2 0%, #ffffff 45%, #f0ebe4 100%);
  padding: 56px 24px 64px;
}
.mkt-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.mkt-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 12px;
}
.mkt-hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--brand-charcoal);
}
.mkt-hero-sub {
  font-size: 18px;
  color: var(--gray-80);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 34em;
}
.mkt-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mkt-mock {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.mkt-mock-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-gray);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.mkt-mock-flow {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.mkt-mock-flow li {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--light-gray);
  border-radius: 8px;
  font-size: 14px;
}
.mkt-mock-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.mkt-mock-metrics--wide { max-width: 640px; margin: 24px auto 0; }
.mkt-metric-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--brand-charcoal);
}
.mkt-metric-label {
  display: block;
  font-size: 12px;
  color: var(--brand-gray);
  margin-top: 2px;
}
.mkt-section { padding: 64px 24px; }
.mkt-section--alt { background: var(--light-gray); }
.mkt-section-inner { max-width: 1100px; margin: 0 auto; }
.mkt-section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.mkt-section-sub {
  color: var(--gray-80);
  margin-bottom: 32px;
  max-width: 36em;
  line-height: 1.5;
}
.mkt-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mkt-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.mkt-step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.mkt-step h3 { font-size: 18px; margin-bottom: 8px; }
.mkt-step p { font-size: 14px; color: var(--gray-80); line-height: 1.45; }
.mkt-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.mkt-split--reverse { direction: rtl; }
.mkt-split--reverse > * { direction: ltr; }
.mkt-checklist {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.mkt-checklist li {
  padding-left: 22px;
  position: relative;
  font-size: 15px;
  color: var(--gray-80);
}
.mkt-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
}
.mkt-proof-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.mkt-proof-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brand-gray);
  margin-bottom: 16px;
}
.mkt-qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-gray);
  background: repeating-linear-gradient(-45deg, #faf8f5, #faf8f5 6px, #fff 6px, #fff 12px);
}
.mkt-panel-placeholder { text-align: left; }
.mkt-panel-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.mkt-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mkt-features article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.mkt-features h3 { font-size: 16px; margin-bottom: 6px; }
.mkt-features p { font-size: 14px; color: var(--gray-80); line-height: 1.45; }
.mkt-faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.mkt-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}
.mkt-faq details p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--gray-80);
  line-height: 1.5;
}
.mkt-cta-final {
  background: var(--brand-charcoal);
  padding: 64px 24px;
}
.mkt-footer {
  background: #1f1f1f;
  color: rgba(255,255,255,0.7);
  padding: 24px;
  font-size: 13px;
}
.mkt-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.mkt-footer a { color: rgba(255,255,255,0.75); margin-left: 16px; }
.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.plan-card--recommended { border: 2px solid var(--brand-primary); }
/* Planos públicos: largura suficiente para 4 cards + tabela sem scroll horizontal */
.plans-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
  box-sizing: border-box;
}
.plans-page--compare { padding-bottom: 64px; }
.plans-compare-title {
  font-size: 22px;
  margin-bottom: 16px;
  text-align: center;
}
.plans-compare-note {
  margin-top: 12px;
  font-size: 13px;
}
.plan-compare-wrap {
  width: 100%;
  overflow-x: visible;
}
.plan-compare {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
}
.plan-compare-col-feature { width: 28%; }
.plan-compare-col-plan { width: 18%; }
.plan-compare th,
.plan-compare td {
  border: 1px solid var(--border);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.plan-compare th[scope="row"],
.plan-compare th:first-child,
.plan-compare td:first-child {
  text-align: left;
  font-weight: 600;
}
.plan-compare thead { background: var(--light-gray); }
.plan-compare thead th {
  font-weight: 700;
  font-size: 13px;
}
@media (max-width: 720px) {
  .plan-compare {
    font-size: 12px;
  }
  .plan-compare th,
  .plan-compare td {
    padding: 8px 4px;
  }
  .plan-compare-col-feature { width: 32%; }
  .plan-compare-col-plan { width: 17%; }
}
.legal-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-page h1 { font-family: var(--font-display); font-size: 28px; margin-bottom: 8px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { font-size: 15px; color: var(--gray-80); line-height: 1.55; margin-bottom: 10px; }
.legal-disclaimer {
  background: var(--warning-bg);
  color: var(--warning-text);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin: 16px 0 24px;
}
.qr-privacy-note { font-size: 12px; color: var(--brand-gray); margin-top: 12px; line-height: 1.4; }
@media (max-width: 860px) {
  .mkt-hero-inner, .mkt-split, .mkt-steps, .mkt-features { grid-template-columns: 1fr; }
  .mkt-split--reverse { direction: ltr; }
}

/* ——— App nav sections + status chips ——— */
.app-sidebar-section {
  margin: 16px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--light-gray);
  color: var(--gray-80);
  border: 1px solid var(--border);
}
.status-chip--draft { background: #f3f4f6; color: #4b5563; }
.status-chip--published { background: var(--success-bg); color: var(--success-text); }
.status-chip--subscription_suspended { background: var(--warning-bg); color: var(--warning-text); }
.status-chip--archived,
.status-chip--sold { background: #eef2ff; color: #3730a3; }
.status-chip--qr-active { background: var(--success-bg); color: var(--success-text); }
.status-chip--qr-missing { background: var(--warning-bg); color: var(--warning-text); }
.status-chip--plan-ok { background: var(--success-bg); color: var(--success-text); }
.status-chip--plan-blocked { background: #fee2e2; color: #991b1b; }
.status-chip--wa-active { background: var(--success-bg); color: var(--success-text); }
.status-chip--wa-pending { background: var(--warning-bg); color: var(--warning-text); }

/* ——— Onboarding checklist (primeiro valor) ——— */
.onboarding-steps {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.onboarding-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}
.onboarding-step.is-done {
  background: var(--success-bg);
  border-color: #b7e4c7;
}
.onboarding-step.is-current {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px rgba(197, 148, 97, 0.25);
}
.onboarding-step-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.onboarding-step-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--light-gray);
  color: var(--brand-charcoal);
  flex-shrink: 0;
}
.onboarding-step.is-done .onboarding-step-mark {
  background: var(--success-text);
  color: #fff;
}
.onboarding-step.is-current .onboarding-step-mark {
  background: var(--brand-primary);
  color: #fff;
}
.onboarding-step-title {
  font-size: 15px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .onboarding-step { flex-direction: column; align-items: flex-start; }
}

/* ——— Loop 1: shell autenticado editorial (scoped .app-shell) ——— */
.app-shell {
  background: var(--surface-sand);
  min-height: 100vh;
}
.app-shell .app-sidebar {
  width: 204px;
  background: var(--surface-charcoal);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.app-shell .app-sidebar-brand {
  padding: 22px 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.app-shell .app-sidebar-nav {
  padding: 14px 10px;
}
.app-shell .app-sidebar-nav a,
.app-shell .app-sidebar-nav span {
  border-radius: var(--radius-editorial);
  border-left: 2px solid transparent;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.app-shell .app-sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.app-shell .app-sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: var(--brand-gold-light);
  font-weight: 600;
}
.app-shell .app-sidebar-section {
  margin: 18px 12px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.app-shell .app-sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 18px;
}
.app-shell .app-main {
  background: var(--surface-sand);
}
.app-shell .app-header {
  height: 72px;
  padding: 0 28px;
  background: var(--surface-warm);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: none;
}
.app-shell .app-header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-charcoal);
}
.app-shell .app-header .btn-outline {
  border-radius: var(--radius-editorial);
  border-color: var(--brand-charcoal);
  color: var(--brand-charcoal);
  min-height: 36px;
}
.app-shell .app-header .btn-outline:hover {
  background: var(--brand-charcoal);
  color: var(--surface-warm);
}
.app-shell .app-menu-toggle {
  border-radius: var(--radius-editorial);
  border-color: var(--line-soft);
  background: var(--surface-warm);
}
.app-shell .app-content {
  padding: 36px 4% 56px;
  max-width: 1320px;
}
.app-shell .app-bottom-nav {
  background: var(--surface-warm);
  border-top: 1px solid var(--line-soft);
  box-shadow: none;
}
.app-shell .app-bottom-nav__item {
  border-radius: 0;
  color: var(--brand-gray);
}
.app-shell .app-bottom-nav__item.is-active {
  color: var(--brand-primary);
}
.app-shell .app-drawer-close {
  border-radius: var(--radius-editorial);
}
