:root {
  --bg: #f3f0ea;
  --ink: #1f2528;
  --muted: #758087;
  --panel: #fffdf8;
  --line: #e5ded2;
  --charcoal: #20272b;
  --accent: #d95032;
  --accent-soft: #ffe1d8;
  --sage: #dce9dc;
  --gold: #f6d78b;
  --shadow: 0 24px 70px rgba(31, 37, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(217, 80, 50, 0.12), transparent 24rem),
    radial-gradient(circle at 90% 0%, rgba(246, 215, 139, 0.35), transparent 28rem),
    linear-gradient(135deg, #f9f4ea, var(--bg));
}

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

button {
  border: 0;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(246, 215, 139, 0.26), transparent 40%),
    rgba(255, 250, 240, 0.92);
  backdrop-filter: blur(10px);
}

.app-loader.is-hidden {
  display: none;
}

.app-loader-card {
  width: min(480px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 30px 28px;
  border-radius: 28px;
  border: 1px solid rgba(226, 93, 55, 0.12);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 248, 239, 0.94));
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.app-loader-card strong {
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.app-loader-card p {
  margin: 0;
  color: #6b7280;
}

.app-loader-scene {
  position: relative;
  width: 220px;
  height: 120px;
}

.loader-house {
  position: absolute;
  bottom: 26px;
  width: 48px;
  height: 40px;
  border-radius: 12px 12px 10px 10px;
  background: linear-gradient(180deg, #fff 0%, #f6efe3 100%);
  border: 2px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  animation: loaderFloat 2.4s ease-in-out infinite;
}

.loader-house::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -15px;
  height: 24px;
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(180deg, #f07a55, #e25537);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.loader-house-one {
  left: 18px;
  transform: scale(0.96);
  animation-delay: 0s;
}

.loader-house-two {
  left: 84px;
  width: 56px;
  height: 48px;
  animation-delay: 0.35s;
}

.loader-house-three {
  right: 18px;
  transform: scale(0.88);
  animation-delay: 0.7s;
}

.loader-ground {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 16px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 93, 55, 0.06), rgba(15, 23, 42, 0.12), rgba(226, 93, 55, 0.06));
}

@keyframes loaderFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.login-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 34px;
  align-items: center;
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.75)),
    repeating-linear-gradient(135deg, rgba(32, 39, 43, 0.05) 0 1px, transparent 1px 18px);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.login-card h1 {
  margin: 24px 0 12px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.login-card p {
  max-width: 580px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.login-channel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.login-channel label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--charcoal);
  font-weight: 800;
  white-space: nowrap;
}

.login-channel input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.channel-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.channel-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.login-channel span:last-child {
  display: inline-block;
  min-width: 86px;
  text-align: left;
}

.whatsapp-icon {
  background: #25d366;
  color: #fff;
}

.email-icon {
  background: #1d4ed8;
  color: #fff;
}

.login-otp-step {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.otp-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: start;
}

.otp-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f3f4;
  color: #aab1b6;
}

.otp-avatar svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.otp-card h2 {
  margin: 0 0 10px;
  color: #111820;
  font-size: 22px;
  line-height: 1.15;
}

.otp-card p {
  margin: 0;
  color: #27313a;
  font-size: 15px;
  line-height: 1.45;
}

.otp-digits {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.otp-digit {
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  border: 1px solid #aeb7c0;
  border-radius: 8px;
  background: #fff;
}

.otp-digit:focus {
  outline: 3px solid rgba(217, 80, 50, 0.18);
  border-color: var(--accent);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 92px 1fr;
  position: relative;
  transition: grid-template-columns 0.24s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: transform 0.24s ease, opacity 0.24s ease;
  z-index: 30;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(229, 222, 210, 0.65);
}

.nav-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.nav-group-title {
  padding: 8px 12px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-list button,
.ghost-button {
  width: 100%;
  padding: 13px 14px;
  border-radius: 15px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.nav-list button:hover,
.nav-list button.is-active {
  background: var(--charcoal);
  color: #fff;
}

.nav-list button[data-module] {
  padding-left: 22px;
}

.ghost-button {
  margin-top: auto;
  border: 1px solid var(--line);
}

.workspace {
  padding: 26px;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(31, 37, 40, 0.08);
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--charcoal);
  color: #fff;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -0.06em;
}

.topbar p,
.form-note {
  margin: 6px 0 0;
  color: var(--muted);
}

.search-box {
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.search-box input,
.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.section-view {
  display: none;
  position: relative;
  z-index: 2;
}

.section-view.is-active {
  display: block;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.panel {
  border: 1px solid rgba(229, 222, 210, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 45px rgba(31, 37, 40, 0.08);
}

.stat-card {
  padding: 17px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.ximo-dashboard-shell {
  display: grid;
  gap: 20px;
  overflow: hidden;
}

.ximo-dashboard-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(246, 215, 139, 0.34), rgba(255, 245, 225, 0.9));
  color: #5b4a15;
  font-weight: 800;
}

.dashboard-dev-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #071f3d;
  font-weight: 900;
}

.alert-dot {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
}

.ximo-dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.ximo-dashboard-header h2 {
  margin-bottom: 8px;
}

.ximo-dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ximo-dashboard-filters label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ximo-dashboard-filters select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 9px 12px;
  font-weight: 800;
}

.ximo-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(229, 222, 210, 0.9);
}

.ximo-dashboard-tabs button {
  position: relative;
  padding: 10px 4px;
  background: transparent;
  color: #4b5563;
  font-weight: 800;
}

.ximo-dashboard-tabs button.is-active,
.ximo-dashboard-tabs button:first-child {
  color: var(--accent);
}

.ximo-dashboard-tabs button.is-active::after,
.ximo-dashboard-tabs button:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

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

.ximo-kpi-card {
  position: relative;
  overflow: hidden;
  animation: dashboardFadeUp 0.45s ease both;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ximo-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), #f39f88);
}

.ximo-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(31, 37, 40, 0.1);
  border-color: rgba(217, 80, 50, 0.18);
}

.ximo-kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ximo-dashboard-grid {
  display: grid;
  gap: 18px;
}

.ximo-dashboard-grid.top {
  grid-template-columns: 1.1fr 1.2fr;
}

.ximo-dashboard-grid.bottom {
  grid-template-columns: 1fr 1fr 1.15fr;
}

.ximo-dashboard-card {
  padding: 20px;
  border: 1px solid rgba(229, 222, 210, 0.9);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 240, 0.9));
  box-shadow: 0 18px 45px rgba(31, 37, 40, 0.08);
}

.ximo-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ximo-card-title h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

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

.ximo-dashboard-list {
  display: grid;
  gap: 10px;
}

.ximo-mini-row {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(229, 222, 210, 0.86);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ximo-mini-row:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 80, 50, 0.16);
  box-shadow: 0 14px 28px rgba(31, 37, 40, 0.06);
}

.ximo-mini-row strong {
  font-size: 15px;
}

.ximo-mini-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ximo-mini-row.is-lead {
  border-left: 4px solid #f59e0b;
}

.ximo-mini-row.is-agenda {
  border-left: 4px solid #3b82f6;
}

.ximo-mini-row.is-property {
  border-left: 4px solid #10b981;
}

.ximo-mini-row.is-client {
  border-left: 4px solid #8b5cf6;
}

.ximo-dashboard-media-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ximo-media-chip {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(229, 222, 210, 0.86);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ximo-media-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(31, 37, 40, 0.08);
}

.ximo-media-chip img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
  border-radius: 14px;
  background: #f3f0ea;
}

.ximo-media-chip span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.ximo-dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 18px;
  border: 1px dashed rgba(117, 128, 135, 0.3);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

@keyframes dashboardFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-grid,
.split-layout {
  display: grid;
  gap: 18px;
}

.panel-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.split-layout {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

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

.agenda-shell > .panel.is-hidden {
  display: none !important;
}

.escala-panel {
  min-height: calc(100vh - 150px);
}

.escala-frame {
  width: 100%;
  min-height: calc(100vh - 240px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.preenche-web-panel {
  min-height: calc(100vh - 150px);
  padding: 18px;
}

.preenche-web-frame {
  width: 100%;
  height: calc(100vh - 230px);
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.terrenos-rotundas-frame {
  min-height: 900px;
  background: #020617;
}

.panel {
  padding: 20px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.agenda-panel-head {
  align-items: center;
}

.agenda-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.panel-head span {
  color: var(--muted);
}

.ximo-list-panel {
  gap: 22px;
}

.ximo-list-head {
  align-items: center;
}

.ximo-list-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ximo-list-body {
  display: grid;
}

.ximo-new-button {
  min-width: 124px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(217, 80, 50, 0.22);
}

.icon-ghost-button {
  min-width: 52px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--charcoal);
  font-size: 22px;
  line-height: 1;
}

.ximo-inline-title h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.subtabs {
  display: flex;
  gap: 18px;
  margin: -4px 0 16px;
  border-bottom: 1px solid var(--line);
}

.subtabs button {
  position: relative;
  padding: 10px 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.subtabs button.is-active {
  color: var(--accent);
}

.subtabs button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.ximo-leads-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 222, 210, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.ximo-lead-head,
.ximo-lead-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 180px minmax(220px, 1fr) minmax(170px, 0.7fr) minmax(320px, 1.15fr) minmax(180px, 0.75fr) 190px;
  gap: 18px;
  align-items: center;
}

.ximo-contact-head,
.ximo-contact-row {
  grid-template-columns: 170px minmax(320px, 1.12fr) minmax(250px, 0.95fr) 160px 140px 160px 220px;
}

.ximo-lead-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(229, 222, 210, 0.9);
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: #fffaf4;
}

.ximo-lead-row {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(236, 229, 219, 0.95);
  transition: background 0.18s ease, transform 0.18s ease;
}

.ximo-lead-row:last-child {
  border-bottom: 0;
}

.ximo-lead-row:hover {
  background: rgba(255, 247, 239, 0.68);
}

.ximo-col {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ximo-col-status {
  grid-template-columns: 20px 1fr;
  align-items: start;
}

.ximo-check {
  width: 15px;
  height: 15px;
  margin-top: 5px;
  border: 1px solid #cfc5b7;
  border-radius: 4px;
  background: #fff;
}

.ximo-property-col {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.ximo-property-thumb {
  width: 92px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(229, 222, 210, 0.95);
  background: #f4efe6;
}

.ximo-property-thumb.is-small {
  width: 80px;
  height: 60px;
}

.ximo-property-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ximo-person {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
}

.ximo-avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #f1ece4;
  border: 1px solid rgba(229, 222, 210, 0.9);
}

.ximo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ximo-avatar-fallback {
  background: #0f2a4f;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.ximo-col-actions {
  justify-items: start;
}

.ximo-outline-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(31, 37, 40, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 800;
}

.ximo-empty-state {
  padding: 26px 20px;
  color: var(--muted);
  font-weight: 700;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form label {
  color: var(--muted);
  font-size: 13px;
}

.stack-form textarea {
  min-height: 92px;
  resize: vertical;
}

.stack-form button {
  padding: 13px 16px;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.recurrence-box {
  display: grid;
  gap: 8px;
}

.recurrence-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.recurrence-days legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recurrence-days label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.table-list,
.record-list,
.timeline {
  display: grid;
  gap: 10px;
}

.row-card,
.timeline-item {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.8fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #eee7dd;
  border-radius: 18px;
  background: #fff;
}

.ximo-wide-list .row-card {
  min-height: 120px;
  grid-template-columns: minmax(340px, 1.35fr) minmax(220px, 0.9fr) minmax(220px, 0.85fr);
  padding: 18px;
  border-radius: 22px;
}

#imoveis .ximo-filter-workspace {
  display: none;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(229, 222, 210, 0.95);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 45px rgba(31, 37, 40, 0.08);
}

#imoveis .ximo-filter-workspace.is-open {
  display: grid;
}

.ximo-filter-side {
  display: grid;
  align-content: start;
  gap: 7px;
  padding-right: 14px;
  border-right: 1px solid rgba(229, 222, 210, 0.9);
}

.ximo-filter-side button,
.ximo-filter-tabs button,
.ximo-filter-chips button {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #26313a;
  font-weight: 800;
}

.ximo-filter-side button {
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
}

.ximo-filter-side button:hover,
.ximo-filter-side button.is-active,
.ximo-filter-tabs button:hover,
.ximo-filter-tabs button.is-active {
  background: #fff1ef;
  color: #071f3d;
  border-color: rgba(226, 73, 48, 0.16);
}

.ximo-filter-main {
  min-width: 0;
}

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

.ximo-filter-tabs button {
  min-height: 36px;
  padding: 8px 13px;
}

.ximo-imoveis-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.ximo-imoveis-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.ximo-imoveis-filters label.is-wide {
  grid-column: span 2;
}

.ximo-imoveis-filters input,
.ximo-imoveis-filters select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  border-radius: 11px;
  background: #fff;
  color: #111820;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
}

.ximo-imoveis-filters input:focus,
.ximo-imoveis-filters select:focus {
  outline: 2px solid rgba(226, 73, 48, 0.18);
  border-color: rgba(226, 73, 48, 0.58);
}

.ximo-filter-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.ximo-filter-chips button {
  min-height: 32px;
  padding: 6px 11px;
  background: #fff;
  border-color: rgba(209, 213, 219, 0.9);
  color: #334155;
}

.ximo-filter-chips button:hover,
.ximo-filter-chips button.is-active {
  background: #071f3d;
  border-color: #071f3d;
  color: #fff;
}

.ximo-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.ximo-filter-actions .ghost-button {
  margin: 0;
  width: auto;
}

.imovel-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.imovel-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.imovel-status-chip.is-available {
  border-color: rgba(22, 163, 74, 0.34);
  background: rgba(22, 163, 74, 0.09);
  color: #15803d;
}

.imovel-status-chip.is-reserved,
.imovel-status-chip.is-pending {
  border-color: rgba(202, 138, 4, 0.34);
  background: rgba(250, 204, 21, 0.14);
  color: #a16207;
}

.imovel-status-chip.is-sold,
.imovel-status-chip.is-unavailable {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

.property-thumb-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 78px;
  min-height: 58px;
}

.property-thumb-wrap .energy-badge {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
}

.property-thumb-wrap.is-wide {
  width: 126px;
  min-height: 92px;
}

.energy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(245, 245, 245, 0.94);
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
}

.energy-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  white-space: nowrap;
}

.energy-badge.is-a-plus,
.energy-badge.is-a {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.98), rgba(5, 150, 105, 0.98));
  border-color: rgba(4, 120, 87, 0.42);
  color: #fff;
}

.energy-badge.is-b,
.energy-badge.is-b-minus {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.98), rgba(14, 116, 144, 0.98));
  border-color: rgba(15, 118, 110, 0.42);
  color: #fff;
}

.energy-badge.is-c {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.98), rgba(234, 179, 8, 0.98));
  border-color: rgba(161, 98, 7, 0.36);
  color: #3f2f00;
}

.energy-badge.is-d {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.98), rgba(234, 88, 12, 0.98));
  border-color: rgba(194, 65, 12, 0.38);
  color: #fff;
}

.energy-badge.is-e,
.energy-badge.is-f {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.98), rgba(185, 28, 28, 0.98));
  border-color: rgba(153, 27, 27, 0.42);
  color: #fff;
}

.energy-badge.is-isento,
.energy-badge.is-custom {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
}

.energy-badge img {
  display: block;
  width: auto;
  height: 24px;
  max-width: 58px;
  object-fit: contain;
}

.property-thumb-wrap.is-wide .energy-badge img {
  height: 28px;
  max-width: 72px;
}

.energy-badge.is-empty {
  background: rgba(241, 245, 249, 0.92);
  color: #94a3b8;
  border-color: rgba(203, 213, 225, 0.72);
  box-shadow: none;
}

.energy-photo-frame {
  position: relative;
}

.energy-photo-frame .energy-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.timeline-item {
  grid-template-columns: 120px 1fr 180px;
}

.row-card strong,
.timeline-item strong {
  display: block;
  margin-bottom: 5px;
}

.property-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}

.property-cell-wide {
  gap: 16px;
}

.property-open-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.property-thumb {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f1ece4;
}

.property-thumb-wide {
  width: 126px;
  height: 92px;
  flex: 0 0 126px;
}

.property-thumb-empty {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ximo-client-link {
  gap: 4px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--sage);
  color: #2d5433;
  font-size: 12px;
  font-weight: 800;
}

.chip.hot {
  background: var(--accent-soft);
  color: var(--accent);
}

.inline-assign {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.inline-assign select,
.inline-assign button {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}

.inline-assign button {
  border: 0;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
}

.ximo-col-actions .inline-assign {
  width: 100%;
  margin-top: 0;
}

.ximo-col-actions .inline-assign select {
  min-width: 0;
  width: 100%;
}

.ximo-col-actions .inline-assign button {
  white-space: nowrap;
}

.contact-link {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.contact-web-actions {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.contact-detail-button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff7f2;
  color: #111827;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.client-modal-card {
  width: min(920px, calc(100vw - 40px));
}

.calendar-shell {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.calendar-toolbar,
.calendar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-toolbar {
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.calendar-toolbar strong,
.calendar-toolbar span {
  display: block;
}

.calendar-actions select,
.calendar-actions button,
.notice-actions button,
.action-link,
.status-select,
.calendar-event select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.calendar-actions button,
.notice-actions button,
.action-link {
  border: 0;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.action-link.whatsapp {
  background: #0fa958;
}

.calendar-week {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(116px, 1fr));
  min-width: 980px;
  overflow-x: auto;
}

.calendar-corner,
.calendar-day-head,
.calendar-hour,
.calendar-slot {
  border-right: 1px solid #eee7dd;
  border-bottom: 1px solid #eee7dd;
}

.calendar-corner,
.calendar-day-head {
  appearance: none;
  border: 0;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fffdf8;
}

.calendar-day-head {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  text-align: center;
}

.calendar-day-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.calendar-day-head strong {
  font-size: 22px;
}

.calendar-day-head:hover {
  background: rgba(226, 85, 55, 0.08);
}

.calendar-day-head.is-selected {
  background: linear-gradient(180deg, rgba(226, 85, 55, 0.18) 0%, rgba(226, 85, 55, 0.1) 100%);
  box-shadow: inset 0 0 0 1px rgba(226, 85, 55, 0.28);
}

.calendar-day-head.is-today {
  color: var(--accent);
  background: var(--accent-soft);
}

.calendar-hour {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 12px;
  background: #fffdf8;
}

.calendar-hour.is-subslot {
  padding: 3px 10px;
  background: #fff;
}

.calendar-slot {
  min-height: 30px;
  padding: 3px 6px;
  background: linear-gradient(180deg, rgba(246, 215, 139, 0.08), transparent);
  cursor: pointer;
}

.calendar-slot.is-subslot {
  background: #fff;
}

.calendar-slot.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
  background: var(--accent-soft);
}

.calendar-event {
  display: grid;
  gap: 3px;
  margin-bottom: 6px;
  padding: 9px;
  border-left: 4px solid var(--accent);
  border-radius: 13px;
  cursor: grab;
  box-shadow: 0 8px 18px rgba(31, 37, 40, 0.08);
}

.calendar-event.is-dragging {
  opacity: 0.5;
}

.calendar-event strong,
.calendar-event span,
.calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event small {
  color: var(--muted);
}

.calendar-event select,
.status-select {
  width: 100%;
  margin-top: 5px;
}

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

.agenda-alert-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.agenda-alert-card {
  padding: 14px 16px;
  border: 1px solid rgba(217, 80, 50, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 230, 219, 0.95), rgba(255, 248, 243, 0.95));
  box-shadow: 0 10px 26px rgba(217, 80, 50, 0.08);
}

.agenda-alert-card strong {
  display: block;
  margin-bottom: 6px;
}

.agenda-alert-card p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.5;
}

.notice-actions {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.sitebuilder-toolbar,
.sitebuilder-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.sitebuilder-group-title {
  margin: 28px 0 14px;
  font-size: 1.2rem;
}

.sitebuilder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.sitebuilder-card {
  min-height: 286px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 30px rgba(31, 37, 40, 0.06);
}

.sitebuilder-card-top {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sitebuilder-toggle {
  width: 34px;
  height: 18px;
  border-radius: 99px;
  background: #9aa4ad;
  position: relative;
}

.sitebuilder-toggle::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 3px;
  left: 4px;
  border-radius: 50%;
  background: #fff;
  transition: 0.18s ease;
}

.sitebuilder-toggle.is-on {
  background: #14a414;
}

.sitebuilder-toggle.is-on::after {
  transform: translateX(14px);
}

.sitebuilder-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sitebuilder-card h3,
.sitebuilder-card p {
  margin: 0;
}

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

.sitebuilder-card-actions,
.sitebuilder-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.sitebuilder-card-actions button,
.sitebuilder-card-actions a,
.sitebuilder-editor-actions button,
.sitebuilder-editor-actions a {
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.sitebuilder-editor-shell {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.sitebuilder-editor-head {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.sitebuilder-editor-actions input {
  min-width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

#sitebuilder-editor {
  min-height: 720px;
}

.gjs-one-bg {
  background-color: #20272b;
}

.gjs-two-color {
  color: #f3f0ea;
}

.gjs-four-color,
.gjs-four-color-h:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 94px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--charcoal);
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ximo-lead-head,
  .ximo-lead-row,
  .ximo-contact-head,
  .ximo-contact-row {
    grid-template-columns: 1fr;
  }

  .ximo-lead-head {
    display: none;
  }

  .panel-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-card {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(82vw, 320px);
    height: 100vh;
    box-shadow: var(--shadow);
  }

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

  .app-shell.sidebar-collapsed .sidebar {
    transform: translateX(-110%);
    opacity: 1;
    pointer-events: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(31, 37, 40, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 20;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .topbar-title {
    align-items: flex-start;
  }

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

  .row-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }
}


/* XIMO-style two-level navigation */
.sidebar {
  width: 342px;
  gap: 0;
  padding: 0;
  background: #fff;
  border-right: 1px solid #e7e8eb;
}

.sidebar-brand {
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f2;
}

.ximo-nav-shell {
  display: flex;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.ximo-main-menu {
  width: 92px;
  flex: 0 0 92px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px 4px;
  border-right: 1px solid #edf0f2;
  overflow-y: auto;
  background: #fff;
}

.ximo-main-item,
.ximo-sub-menu button {
  border-radius: 6px;
  background: transparent;
  color: #111820;
}

.ximo-main-item {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 7px 4px;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
  border-left: 3px solid transparent;
}

.ximo-main-item .nav-ico {
  font-size: 24px;
  line-height: 1;
}

.ximo-main-item:hover,
.ximo-main-item.is-active {
  background: #fff1ef;
  color: #040404;
  border-left-color: var(--accent);
}

.ximo-sub-menu {
  width: 250px;
  flex: 0 0 250px;
  padding: 18px 12px 22px;
  overflow-y: auto;
  background: #fff;
}

.ximo-sub-title {
  margin: 0 0 18px;
  padding: 0 2px;
  font-size: 18px;
  font-weight: 500;
  color: #111820;
}

.ximo-sub-group {
  gap: 5px;
  padding: 0 0 22px;
  border-bottom: 0;
}

.ximo-sub-group .nav-group-title {
  padding: 10px 2px 8px;
  color: #2b3440;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ximo-sub-menu button {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 8px;
  text-align: left;
  font-size: 17px;
  line-height: 1.2;
}

.ximo-sub-menu button .nav-ico {
  text-align: center;
  color: #26313a;
  font-size: 20px;
}

.ximo-sub-menu button:hover,
.ximo-sub-menu button.is-active {
  background: #fff1ef;
  color: #040404;
}

.ghost-button {
  margin: 8px;
  width: calc(100% - 16px);
}

@media (max-width: 760px) {
  .sidebar {
    width: min(96vw, 342px);
  }

  .nav-list,
  .ximo-nav-shell {
    display: flex;
  }

  .ximo-main-menu {
    width: 88px;
    flex-basis: 88px;
  }

  .ximo-sub-menu {
    width: calc(min(96vw, 342px) - 88px);
    flex-basis: calc(min(96vw, 342px) - 88px);
  }
}


/* Hover submenus like XIMO */
.sidebar {
  width: 92px;
  overflow: visible;
}

.ximo-nav-shell {
  overflow: visible;
  position: relative;
}

.ximo-sub-menu {
  position: absolute;
  left: 92px;
  top: 0;
  bottom: 0;
  display: none;
  box-shadow: 18px 0 34px rgba(31, 37, 40, 0.08);
  border-right: 1px solid #edf0f2;
  z-index: 40;
}

.ximo-nav-shell.is-submenu-open .ximo-sub-menu.is-open,
.ximo-sub-menu:hover,
.ximo-main-menu:hover + .ximo-sub-menu.is-open {
  display: block;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.portal-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #eee7dd;
  border-radius: 8px;
  background: #fff;
}

.portal-card strong {
  display: block;
}

.portal-card button {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 760px) {
  .sidebar {
    width: min(96vw, 342px);
  }

  .ximo-sub-menu {
    left: 88px;
    width: calc(min(96vw, 342px) - 88px);
  }
}


.row-card button[data-imoveis-action] {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
}


.portugal-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 18px;
  height: 12px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(11, 35, 65, 0.18);
}

.support-widget {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.support-widget.is-hidden {
  display: none;
}

.support-widget-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--charcoal);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  z-index: 2;
}

.support-whatsapp {
  position: relative;
  right: auto;
  bottom: auto;
  top: auto;
  transform: none;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px 0 14px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.34), 0 4px 12px rgba(0, 0, 0, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.88);
}

.support-whatsapp span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  color: #25d366;
  font-size: 20px;
}

.support-whatsapp:hover {
  transform: translateY(-2px);
  background: #1ebe5d;
}

.login-card h1 {
  max-width: 560px;
}

@media (max-width: 720px) {
  .support-whatsapp {
    top: auto;
    min-height: 50px;
    padding-right: 16px;
  }

  .support-widget {
    right: 16px;
    bottom: 16px;
  }
}

.support-whatsapp svg {
  width: 23px;
  height: 23px;
  display: block;
}


.login-logo {
  width: min(260px, 72vw);
  height: auto;
  display: block;
  margin: 0 0 28px;
}

.sidebar-logo {
  width: 64px;
  height: auto;
  display: block;
  object-fit: contain;
}

.sidebar-brand {
  align-items: center;
  gap: 8px;
}

.sidebar-brand .sidebar-logo + strong {
  font-size: 12px;
  line-height: 1.1;
}

.app-shell:not(.sidebar-collapsed) .sidebar-brand .sidebar-logo {
  width: 72px;
}

.dev-credit {
  color: #071f3d !important;
  font-weight: 900;
}

.login-card .dev-credit {
  color: #071f3d !important;
  font-weight: 900;
}


.workspace {
  padding-top: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -26px 18px;
  padding: 10px 26px;
  background: rgba(249, 244, 234, 0.94);
  border-bottom: 1px solid rgba(229, 222, 210, 0.92);
  backdrop-filter: blur(18px);
}

.topbar-title {
  min-width: 0;
}

.topbar-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(229, 222, 210, 0.95);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 28px rgba(31, 37, 40, 0.07);
  white-space: nowrap;
}

.topbar-app-brand img {
  width: 48px;
  height: auto;
  display: block;
}

.topbar-app-brand strong {
  max-width: 190px;
  color: #071f3d;
  font-size: 14px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.topbar-current {
  min-width: 0;
}

.topbar h1 {
  font-size: clamp(24px, 3vw, 42px);
}

.topbar-tools {
  min-width: min(520px, 48vw);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: #050608;
  color: #fff;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  font-weight: 900;
}

.quick-search span,
.filter-toggle span {
  font-size: 20px;
  line-height: 1;
}

.quick-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.quick-search input::placeholder {
  color: #fff;
  opacity: 0.98;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-weight: 900;
}

.filter-toggle:hover,
.filter-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.filter-panel {
  position: sticky;
  top: 78px;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 20px;
  background: #101418;
  color: #fff;
  box-shadow: 0 18px 45px rgba(31, 37, 40, 0.14);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #050608;
  color: #fff;
  padding: 8px 10px;
}

.filter-panel button {
  align-self: end;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  color: #071f3d;
  font-weight: 900;
}

.search-box {
  display: none;
}

@media (max-width: 1050px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-tools {
    width: 100%;
    min-width: 0;
  }

  .filter-panel {
    top: 132px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ximo-kpi-grid,
  .ximo-dashboard-grid.top,
  .ximo-dashboard-grid.bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #imoveis .ximo-filter-workspace {
    grid-template-columns: 1fr;
  }

  .ximo-filter-side {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(229, 222, 210, 0.9);
  }

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

@media (max-width: 680px) {
  .topbar-title {
    flex-wrap: wrap;
  }

  .topbar-app-brand strong {
    max-width: 120px;
    font-size: 12px;
  }

  .topbar-tools,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .ximo-dashboard-header,
  .ximo-dashboard-filters,
  .ximo-kpi-grid,
  .ximo-dashboard-grid.top,
  .ximo-dashboard-grid.bottom,
  .ximo-dashboard-media-strip {
    grid-template-columns: 1fr;
  }

  .ximo-dashboard-filters {
    display: grid;
  }

  #imoveis .ximo-filter-workspace {
    margin-left: -6px;
    margin-right: -6px;
    padding: 14px;
    border-radius: 18px;
  }

  .ximo-imoveis-filters,
  .ximo-imoveis-filters label.is-wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .ximo-filter-tabs,
  .ximo-filter-chips,
  .ximo-filter-actions {
    justify-content: stretch;
  }

  .ximo-filter-tabs button,
  .ximo-filter-chips button,
  .ximo-filter-actions button {
    flex: 1 1 auto;
  }

  .ximo-wide-list .row-card {
    grid-template-columns: 1fr;
  }
}


.panel-subtitle {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(229, 222, 210, 0.9);
  border-radius: 18px;
  background: rgba(255, 247, 238, 0.62);
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
  color: #26313a;
  font-weight: 800;
}

.permission-grid input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}


.ui-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.consultor-agenda-lock {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(32, 39, 43, 0.08);
  color: var(--ink);
  font-weight: 900;
}


.admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
  gap: 18px;
  align-items: start;
}

.wide-panel,
.table-list {
  min-width: 0;
}

.admin-user-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(229, 222, 210, 0.92);
  border-radius: 24px;
  background: linear-gradient(145deg, #fffdf8, #fff8ef);
  box-shadow: 0 18px 42px rgba(31, 37, 40, 0.08);
  overflow: hidden;
}

.admin-user-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(229, 222, 210, 0.86);
}

.admin-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #071f3d;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: inset 0 -10px 18px rgba(255, 255, 255, 0.08);
}

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

.admin-avatar-preview {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.admin-user-title {
  min-width: 0;
}

.admin-user-head strong {
  display: block;
  font-size: 19px;
  line-height: 1.15;
}

.admin-user-head span:not(.admin-status),
.admin-user-head small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-user-head small {
  margin-top: 3px;
  color: #071f3d;
  font-weight: 800;
}

.admin-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-status.is-active {
  background: #dff7e8;
  color: #0a7f45;
}

.admin-status.is-inactive {
  background: #ffe1d8;
  color: #9b2d16;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.admin-photo-row {
  display: grid;
  gap: 10px;
}

.photo-upload-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.photo-upload-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 222, 210, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.photo-upload-inline input[type="file"] {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-user-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-user-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  font-weight: 800;
}

.admin-permission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
}

.admin-permission {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(229, 222, 210, 0.72);
  color: #26313a;
  font-size: 12px;
  font-weight: 900;
}

.admin-permission input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 2px;
}

.admin-card-actions button {
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 900;
}

.admin-card-actions .ghost-admin {
  background: #fff;
  color: var(--charcoal);
  border: 1px solid var(--line);
}

.consultor-link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .admin-user-controls,
  .admin-user-head {
    grid-template-columns: 1fr;
  }
}

.nav-ico-svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
}

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

.admin-user-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-user-edit-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-actions .danger-admin {
  background: #b93722;
  color: #fff;
}

.calendar-event,
.timeline-item[data-agenda-delete] {
  cursor: pointer;
}

.calendar-event:hover,
.timeline-item[data-agenda-delete]:hover {
  box-shadow: 0 0 0 2px rgba(217, 80, 50, 0.18);
}

@media (max-width: 760px) {
  .admin-user-edit-grid,
  .admin-user-controls,
  .admin-user-head {
    grid-template-columns: 1fr;
  }

  .photo-upload-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-card-actions {
    justify-content: stretch;
  }

  .admin-card-actions button {
    flex: 1 1 100%;
  }

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

  .wide-panel {
    overflow: hidden;
  }
}


.agenda-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 60;
  overflow-y: auto;
}

.agenda-modal.is-hidden {
  display: none;
}

.agenda-modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
  border: 1px solid rgba(226, 93, 55, 0.14);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.agenda-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 12px;
  align-items: flex-start;
}

.agenda-modal-head h3 {
  margin: 0;
  font-size: 1.45rem;
}

.agenda-modal-head p {
  margin: 6px 0 0;
  color: #6b7280;
}

.agenda-modal-close {
  border: 0;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1.35rem;
}

.agenda-modal-body {
  padding: 8px 26px 26px;
  display: grid;
  gap: 18px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.agenda-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agenda-modal-actions button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: white;
  color: #111827;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.agenda-modal-actions button.is-primary {
  background: #e25537;
  border-color: #e25537;
  color: white;
}

.agenda-modal-actions button.is-success {
  background: #e9f8ef;
  color: #137a43;
}

.agenda-modal-actions button.is-progress {
  background: #eef4ff;
  color: #2f5bd1;
}

.agenda-modal-actions button.is-danger {
  background: #fff1f1;
  color: #c53030;
}

.agenda-modal-actions button.is-hidden,
.agenda-modal-recurrence.is-hidden {
  display: none;
}

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

.agenda-modal-grid label,
.agenda-modal-wide label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: #374151;
}

.agenda-modal-grid input,
.agenda-modal-grid select,
.agenda-modal-wide textarea,
.agenda-modal-wide input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: white;
  padding: 12px 14px;
  font: inherit;
}

.agenda-modal-wide {
  display: grid;
  gap: 14px;
}

.agenda-modal-recurrence {
  margin: 0;
}

.agenda-modal-wide textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-modal-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  background: #060b14;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.imovel-modal-card {
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  background: linear-gradient(180deg, #fffdf8 0%, #fff7ee 100%);
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.imovel-modal-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(240px, 0.85fr);
  gap: 18px;
}

.imovel-modal-main-image {
  min-height: 280px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  display: grid;
  place-items: center;
}

.imovel-modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imovel-modal-summary {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 222, 210, 0.86);
}

.imovel-modal-summary strong {
  font-size: 1.2rem;
}

.imovel-modal-summary p {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 900;
  color: #071f3d;
}

.imovel-modal-mini-grid {
  display: grid;
  gap: 10px;
}

.imovel-modal-mini-grid span {
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff7f2;
  color: #3c4651;
  font-weight: 700;
}

.imovel-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.imovel-gallery-thumb {
  height: 88px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

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

.imovel-gallery-empty {
  padding: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.imovel-modal-add-media {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.imovel-modal-add-media .ghost-button {
  margin: 0;
  width: auto;
  min-height: 46px;
  white-space: nowrap;
}

.contact-modal-card .agenda-modal-head {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-modal-card .agenda-modal-head p {
  color: #9fb0ca;
}

.contact-modal-card .agenda-modal-close {
  background: transparent;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-modal-card .agenda-modal-body {
  gap: 18px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.contact-modal-primary,
.contact-modal-block,
.contact-modal-button {
  border-radius: 16px;
  font-weight: 800;
}

.contact-modal-primary,
.contact-modal-block {
  width: 100%;
  padding: 16px 18px;
  cursor: pointer;
}

.contact-modal-primary {
  border: 0;
  background: #17d47b;
  color: #04120c;
}

.contact-modal-block {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #f8fafc;
}

.contact-modal-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.contact-modal-section-title {
  color: #7f8da6;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-modal-consultor-row,
.contact-modal-client-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-modal-consultor-row {
  grid-template-columns: 1.15fr 1fr 1fr;
}

.contact-modal-select,
.contact-modal-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #f8fafc;
  padding: 0 14px;
}

.contact-modal-select option {
  color: #111827;
}

.contact-modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.contact-modal-button.is-whatsapp {
  color: #00f281;
}

.contact-modal-button.is-email {
  color: #4ea1ff;
}

.contact-modal-property {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 2px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-modal-property-image {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.contact-modal-property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-modal-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #9fb0ca;
  font-size: 0.85rem;
}

.contact-modal-property h4,
.contact-modal-info-grid strong,
.contact-modal-notes strong {
  margin: 0;
  font-size: 1.05rem;
}

.contact-modal-property p,
.contact-modal-property span,
.contact-modal-info-grid span,
.contact-modal-notes p {
  margin: 0;
  color: #d4deed;
}

.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 980px;
  padding: 18px 20px;
  border: 1px solid rgba(13, 29, 48, 0.12);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 22px 60px rgba(11, 20, 32, 0.18);
  backdrop-filter: blur(14px);
}

.cookie-consent.is-hidden {
  display: none;
}

.cookie-consent strong {
  display: block;
  margin-bottom: 4px;
  color: #071b35;
  font-size: 1rem;
}

.cookie-consent p {
  margin: 0;
  color: #697787;
  line-height: 1.45;
}

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

.cookie-consent-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #e24d32;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.cookie-consent-actions .ghost-button {
  border: 1px solid rgba(13, 29, 48, 0.12);
  background: #fff;
  color: #132535;
}

.contact-modal-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 151, 122, 0.18);
  color: #ff9e7f;
  font-size: 12px;
  font-weight: 900;
}

.contact-modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-modal-info-grid > div,
.contact-modal-notes {
  display: grid;
  gap: 6px;
}

@media (max-width: 760px) {
  .agenda-modal { padding: 12px; }
  .agenda-modal-head, .agenda-modal-body { padding-left: 18px; padding-right: 18px; }
  .agenda-modal-grid { grid-template-columns: 1fr; }
  .agenda-modal-actions { flex-direction: column; }
  .agenda-modal-actions button { width: 100%; }
  .contact-modal-consultor-row,
  .contact-modal-client-row,
  .contact-modal-info-grid,
  .contact-modal-property {
    grid-template-columns: 1fr;
  }
  .imovel-modal-hero,
  .imovel-modal-add-media {
    grid-template-columns: 1fr;
  }
  .contact-modal-property-image {
    width: 100%;
    max-width: 180px;
    height: 120px;
  }
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 88px;
    grid-template-columns: 1fr;
  }
  .cookie-consent-actions {
    justify-content: stretch;
  }
  .cookie-consent-actions button {
    flex: 1 1 100%;
  }
}

@media (max-height: 860px) {
  .agenda-modal {
    place-items: start center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .agenda-modal-card,
  .contact-modal-card {
    max-height: calc(100vh - 24px);
  }
}

.email-console {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.email-settings-card {
  position: sticky;
  top: 20px;
}

.email-settings-form .form-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.email-roundcube {
  min-height: 680px;
  overflow: hidden;
}

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

.email-toolbar h2 {
  margin: 0;
}

.email-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.email-toolbar-head {
  display: grid;
  gap: 10px;
}

.email-provider-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.email-provider-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(229, 77, 52, 0.28);
  background: #fff7f2;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.email-provider-tab:hover,
.email-provider-tab:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(229, 77, 52, 0.12);
}

.email-provider-tab.is-active {
  background: linear-gradient(135deg, #fff2eb 0%, #ffe1d4 100%);
}

.email-provider-note {
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff7f2;
  border: 1px solid rgba(229, 77, 52, 0.16);
  color: var(--muted);
}

.email-provider-note strong {
  color: var(--ink);
}

.email-provider-panels {
  display: grid;
}

.email-provider-panel {
  display: none;
}

.email-provider-panel.is-active {
  display: block;
}

.email-provider-card {
  min-height: 320px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(255, 247, 239, 0.96));
}

.email-provider-card h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.email-provider-card p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.6;
}

.provider-open-button {
  width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(27, 34, 36, 0.14);
}

.provider-open-button-secondary {
  background: var(--accent);
}

.email-test-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.email-test-box input {
  min-width: 240px;
}

.email-layout {
  display: grid;
  grid-template-columns: 180px minmax(260px, 360px) minmax(0, 1fr);
  min-height: 560px;
}

.email-folders {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 14px 18px 0;
  border-right: 1px solid var(--line);
}

.email-folders button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.email-folders button.is-active,
.email-folders button:hover {
  background: rgba(229, 77, 52, 0.1);
  color: var(--accent);
}

.email-message-list {
  border-right: 1px solid var(--line);
  max-height: 600px;
  overflow: auto;
}

.email-message {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.email-message:hover,
.email-message.is-active {
  background: #fff4ef;
}

.email-message-state {
  width: max-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #234b8f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.email-message-state.falhou {
  background: #ffe5df;
  color: #b73523;
}

.email-message-state.enviado {
  background: #e4f8ec;
  color: #197641;
}

.email-message small,
.email-message span:not(.email-message-state) {
  color: var(--muted);
}

.email-preview {
  padding: 22px;
  min-width: 0;
}

.email-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.email-preview-head h3 {
  margin: 8px 0 4px;
}

.email-preview-head p {
  margin: 0;
  color: var(--muted);
}

.email-body-preview {
  margin: 18px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.55;
  color: var(--ink);
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  max-height: 420px;
  overflow: auto;
}

.email-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffe7e0;
  color: #aa2e1c;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .email-console,
  .email-layout {
    grid-template-columns: 1fr;
  }

  .email-settings-card {
    position: static;
  }

  .email-folders {
    grid-auto-flow: column;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }

  .email-message-list {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .email-toolbar,
  .email-test-box {
    align-items: stretch;
    flex-direction: column;
  }

  .email-test-box input {
    min-width: 0;
    width: 100%;
  }
}

/* Stable XIMO sidebar: no internal scrollbar, hover on desktop and click on touch devices. */
.sidebar {
  width: 96px;
  overflow: visible;
}

.ximo-nav-shell {
  overflow: visible;
}

.ximo-main-menu {
  width: 96px;
  flex: 0 0 96px;
  gap: 1px;
  padding: 5px 4px;
  overflow: visible;
}

.ximo-main-item {
  min-height: 52px;
  padding: 5px 3px;
  font-size: 12.5px;
  line-height: 1.08;
  white-space: normal;
}

.ximo-main-item .nav-ico {
  display: grid;
  min-height: 19px;
  place-items: center;
  font-size: 18px;
}

.ximo-sub-menu {
  left: 96px;
}

#logout-button {
  margin: 6px;
  width: calc(100% - 12px);
}

@media (max-height: 760px) {
  .sidebar-brand {
    min-height: 42px;
    padding: 6px;
  }

  .sidebar-brand strong {
    display: none;
  }

  .ximo-main-item {
    min-height: 47px;
    font-size: 11.5px;
  }

  .ximo-main-item .nav-ico {
    font-size: 16px;
    min-height: 16px;
  }
}

@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .sidebar {
    width: min(96vw, 342px);
  }

  .ximo-nav-shell {
    display: flex;
    overflow: visible;
  }

  .ximo-main-menu {
    width: 92px;
    flex: 0 0 92px;
    overflow: visible;
  }

  .ximo-sub-menu {
    left: 92px;
    width: calc(min(96vw, 342px) - 92px);
    flex-basis: calc(min(96vw, 342px) - 92px);
  }
}

/* Real Roundcube webmail workspace */
.email-console {
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - 170px);
}

.email-settings-card {
  width: 210px;
  min-width: 210px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 18px;
}

.email-settings-card .panel-head {
  gap: 8px;
}

.email-settings-card h2 {
  font-size: 18px;
  line-height: 1.08;
}

.email-settings-card label {
  font-size: 12px;
}

.email-settings-card input,
.email-settings-card select {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

.email-settings-card .form-note {
  font-size: 12px;
  line-height: 1.2;
}

.webmail-panel {
  min-height: calc(100vh - 140px);
  padding: 18px;
}

.webmail-panel .email-toolbar {
  margin-bottom: 12px;
}

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

.extra-metrics article {
  border: 1px solid rgba(226, 73, 48, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 241, 0.9));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  padding: 16px;
}

.extra-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.extra-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 1.7rem;
}

.imoveis-extra-form {
  margin: 0 0 16px;
}

.imoveis-extra-form .inline-check {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 48px;
}

.imoveis-extra-form .inline-check input {
  width: auto;
}

.imoveis-extra-row {
  border-left: 4px solid var(--accent);
}

.imoveis-extra-row .notice-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.imoveis-extra-row .notice-actions button {
  border: 0;
  border-radius: 12px;
  background: #172026;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
}

.imoveis-extra-row .notice-actions button:nth-child(2) {
  background: #22c55e;
}

.imoveis-extra-row .notice-actions button:nth-child(3) {
  background: #e24930;
}

.imoveis-extra-wa {
  align-items: center;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 18px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 14px 16px;
}

.imoveis-extra-wa.is-online {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.94), rgba(240, 253, 244, 0.88));
}

.imoveis-extra-wa.is-offline {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(254, 226, 226, 0.72));
  border-color: rgba(226, 73, 48, 0.22);
}

.imoveis-extra-wa strong,
.imoveis-extra-wa span {
  display: block;
}

.imoveis-extra-wa span {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 3px;
}

.imoveis-extra-wa a,
.agent-module-card button {
  border: 0;
  border-radius: 999px;
  background: #172026;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
  text-decoration: none;
}

.agents-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.agent-module-card {
  border: 1px solid rgba(226, 73, 48, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #fff8f2);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
  padding: 18px;
}

.agent-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.agent-head strong,
.agent-head span {
  display: block;
}

.agent-head span,
.agent-module-card p {
  color: var(--muted);
}

.agent-score {
  color: var(--accent);
  font-size: 2rem;
  font-weight: 950;
  margin: 14px 0 8px;
}

@media (max-width: 900px) {
  .extra-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .extra-metrics {
    grid-template-columns: 1fr;
  }

  .imoveis-extra-wa {
    align-items: stretch;
    flex-direction: column;
  }
}

.webmail-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(27, 34, 36, 0.14);
}

.webmail-frame {
  width: 100%;
  height: calc(100vh - 180px);
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 25, 27, 0.02);
}

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

  .email-settings-card {
    width: auto;
    min-width: 0;
    max-height: none;
  }

  .webmail-frame {
    height: 72vh;
    min-height: 560px;
  }

  .email-provider-tabs {
    flex-direction: column;
  }

  .provider-open-button {
    width: 100%;
  }
}

.marketing-builder-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(217, 80, 50, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(217, 80, 50, 0.16), transparent 28rem),
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(255, 247, 235, 0.88));
  box-shadow: 0 26px 70px rgba(31, 37, 40, 0.10);
}

.marketing-builder-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 100%;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(31, 37, 40, 0.96), rgba(78, 54, 43, 0.92)),
    radial-gradient(circle at 18% 18%, rgba(217, 80, 50, 0.4), transparent 18rem);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.marketing-builder-copy h3,
.marketing-board-head h3,
.marketing-campaign-card h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.marketing-builder-copy p,
.marketing-board-head p,
.marketing-campaign-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.marketing-builder-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.marketing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.marketing-builder-copy .marketing-eyebrow {
  color: #ffd1c7;
}

.marketing-builder-stats {
  display: grid;
  gap: 10px;
}

.marketing-builder-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.marketing-builder-stats strong {
  color: #fff;
  font-size: 1.4rem;
}

.marketing-campaign-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.marketing-form-section {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(229, 222, 210, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.marketing-form-section > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(217, 80, 50, 0.11);
  color: var(--accent);
  font-weight: 900;
}

.marketing-form-section label {
  display: grid;
  gap: 8px;
  color: #5b646b;
  font-size: 0.86rem;
  font-weight: 800;
}

.marketing-form-section input,
.marketing-form-section select,
.marketing-form-section textarea {
  width: 100%;
  border: 1px solid rgba(177, 158, 135, 0.42);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  outline: 0;
  padding: 12px 13px;
}

.marketing-form-section textarea {
  min-height: 128px;
  resize: vertical;
}

.marketing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.marketing-actions small {
  color: var(--muted);
  line-height: 1.35;
}

.marketing-save-button,
.marketing-send-button,
.marketing-pause-button,
.marketing-stop-button,
.marketing-resume-button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(31, 37, 40, 0.10);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.marketing-save-button,
.marketing-send-button {
  color: #fff;
  background: linear-gradient(135deg, #ed5837 0%, #c9331e 100%);
}

.marketing-pause-button {
  color: #3a2a0a;
  background: linear-gradient(135deg, #ffe7a8 0%, #f6c861 100%);
}

.marketing-stop-button {
  color: #fff;
  background: linear-gradient(135deg, #1f2528 0%, #4a1711 100%);
}

.marketing-resume-button {
  color: #12351d;
  background: linear-gradient(135deg, #dff4de 0%, #98d79a 100%);
}

.marketing-save-button:hover,
.marketing-send-button:hover,
.marketing-pause-button:hover,
.marketing-stop-button:hover,
.marketing-resume-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(31, 37, 40, 0.16);
}

.marketing-send-button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .55;
  transform: none;
}

.marketing-campaign-board {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(229, 222, 210, 0.95);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.76);
}

.marketing-board-head,
.marketing-campaign-head,
.marketing-campaign-actions,
.marketing-campaign-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketing-board-head,
.marketing-campaign-head {
  justify-content: space-between;
}

.marketing-list {
  display: grid;
  gap: 14px;
}

.marketing-campaign-card {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(229, 222, 210, 0.94);
  border-left: 7px solid var(--accent);
  border-radius: 24px;
  background: linear-gradient(135deg, #fffdf8 0%, #fff7ee 100%);
  box-shadow: 0 18px 42px rgba(31, 37, 40, 0.08);
}

.marketing-campaign-card.is-paused {
  border-left-color: #d99a18;
}

.marketing-campaign-card.is-stopped {
  border-left-color: #1f2528;
}

.marketing-campaign-card.is-sent {
  border-left-color: #2e9f5a;
}

.marketing-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(217, 80, 50, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-status.is-paused {
  background: rgba(246, 215, 139, 0.35);
  color: #8a5b00;
}

.marketing-status.is-stopped {
  background: rgba(31, 37, 40, 0.12);
  color: #1f2528;
}

.marketing-status.is-sent {
  background: rgba(46, 159, 90, 0.13);
  color: #1b7a40;
}

.marketing-campaign-metrics {
  flex-wrap: wrap;
}

.marketing-campaign-metrics span {
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(243, 240, 234, 0.82);
  color: var(--muted);
}

.marketing-campaign-metrics strong {
  color: var(--ink);
}

.marketing-property-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-property-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 420px);
  padding: 8px 10px;
  border: 1px solid rgba(229, 222, 210, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #4b555b;
  font-weight: 800;
}

.marketing-property-chip img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
}

.marketing-campaign-actions {
  flex-wrap: wrap;
  padding-top: 4px;
}

.marketing-stars {
  color: #d99a18;
  letter-spacing: .16em;
}

@media (max-width: 1020px) {
  .marketing-builder-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .marketing-form-section,
  .marketing-board-head,
  .marketing-campaign-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .marketing-campaign-actions button,
  .marketing-save-button {
    width: 100%;
  }
}

.chat-interno-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.chat-directory-panel,
.chat-conversation-panel {
  min-height: calc(100vh - 220px);
}

.chat-search-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #5f544b;
  font-size: 13px;
  font-weight: 600;
}

.chat-search-field input {
  width: 100%;
  border: 1px solid rgba(190, 163, 141, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdfa;
}

.chat-consultor-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding-right: 4px;
}

.chat-consultor-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(208, 192, 179, 0.45);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(145deg, #fffefe 0%, #fbf7f3 100%);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.chat-consultor-row:hover,
.chat-consultor-row.is-active {
  transform: translateY(-1px);
  border-color: rgba(227, 88, 54, 0.35);
  box-shadow: 0 16px 30px rgba(86, 53, 41, 0.08);
}

.chat-consultor-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-consultor-meta strong,
.chat-conversation-head-copy strong {
  font-size: 15px;
  color: #1f2937;
}

.chat-consultor-snippet,
.chat-consultor-subline,
.chat-conversation-head-copy span,
.chat-composer-hint {
  color: #70645b;
  font-size: 12px;
}

.chat-unread-badge {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  background: linear-gradient(135deg, #ed4126 0%, #c92d16 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(201, 45, 22, 0.25);
}

.chat-unread-badge.is-alert {
  animation: chatPulse 1.1s ease-in-out infinite;
}

.chat-conversation-root {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 260px);
}

.chat-empty-state {
  display: grid;
  place-items: center;
  min-height: 100%;
  text-align: center;
  color: #6c625a;
  gap: 10px;
}

.chat-empty-state strong {
  font-size: 22px;
  color: #1f2937;
}

.chat-conversation-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 260px);
  gap: 16px;
}

.chat-conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(217, 204, 194, 0.75);
}

.chat-conversation-head-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.chat-conversation-head-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.chat-conversation-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-conversation-actions button,
.chat-composer-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.chat-conversation-actions .is-alert,
.chat-composer-actions .is-send {
  background: linear-gradient(135deg, #ed4126 0%, #c92d16 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(201, 45, 22, 0.22);
}

.chat-conversation-actions .is-subtle,
.chat-composer-actions .is-subtle {
  background: #f5efe9;
  color: #4d4038;
}

.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 360px;
  max-height: calc(100vh - 450px);
  overflow: auto;
  padding-right: 6px;
}

.chat-message-item {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-message-item.is-mine {
  justify-content: flex-end;
}

.chat-message-bubble {
  max-width: min(72ch, 82%);
  padding: 14px 16px;
  border-radius: 20px;
  background: #fbf6f1;
  border: 1px solid rgba(224, 214, 205, 0.82);
  box-shadow: 0 12px 24px rgba(38, 20, 13, 0.06);
  display: grid;
  gap: 10px;
}

.chat-message-item.is-mine .chat-message-bubble {
  background: linear-gradient(145deg, #fff0eb 0%, #ffe0d8 100%);
  border-color: rgba(237, 65, 38, 0.25);
}

.chat-message-bubble.is-alert {
  border-color: rgba(201, 45, 22, 0.38);
  background: linear-gradient(145deg, #fff5f2 0%, #ffe3da 100%);
}

.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #7d6f66;
}

.chat-message-text {
  white-space: pre-wrap;
  line-height: 1.55;
  color: #2f241d;
}

.chat-message-file,
.chat-message-audio {
  display: grid;
  gap: 8px;
}

.chat-message-file a {
  color: #b53a20;
  font-weight: 700;
  text-decoration: none;
}

.chat-message-audio audio {
  width: min(100%, 340px);
}

.chat-composer {
  border-top: 1px solid rgba(217, 204, 194, 0.75);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.chat-composer textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid rgba(190, 163, 141, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fffdfa;
  line-height: 1.5;
}

.chat-composer-status {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f6efe8;
  color: #5d4e44;
  font-size: 12px;
  font-weight: 600;
}

.chat-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-composer-actions-left,
.chat-composer-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-composer-actions .is-recording {
  background: linear-gradient(135deg, #8b0f1f 0%, #d12c44 100%);
  color: #fff;
  animation: chatPulse 1.2s ease-in-out infinite;
}

.chat-alert-host {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 1400;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.chat-alert-card {
  width: min(360px, calc(100vw - 32px));
  background: rgba(24, 21, 19, 0.96);
  color: #fff;
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  display: grid;
  gap: 12px;
}

.chat-alert-card strong {
  font-size: 16px;
}

.chat-alert-card p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.45;
}

.chat-alert-actions {
  display: flex;
  gap: 10px;
}

.chat-alert-actions button {
  flex: 1 1 0;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.chat-alert-actions .is-open {
  background: linear-gradient(135deg, #ed4126 0%, #c92d16 100%);
  color: #fff;
}

.chat-alert-actions .is-close {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

@keyframes chatPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(237, 65, 38, 0.28); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(237, 65, 38, 0); }
}

@media (max-width: 1120px) {
  .chat-interno-layout {
    grid-template-columns: 1fr;
  }

  .chat-directory-panel,
  .chat-conversation-panel,
  .chat-conversation-root,
  .chat-conversation-shell {
    min-height: auto;
  }

  .chat-message-list {
    max-height: 50vh;
  }
}

@media (max-width: 760px) {
  .chat-conversation-head,
  .chat-composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-conversation-actions,
  .chat-composer-actions-left,
  .chat-composer-actions-right {
    width: 100%;
  }

  .chat-conversation-actions button,
  .chat-composer-actions button {
    flex: 1 1 auto;
  }

  .chat-alert-host {
    left: 12px;
    right: 12px;
    bottom: 84px;
  }

  .chat-alert-card {
    width: auto;
  }
}
.imovel-publish-toggle {
  align-items: center;
  background: linear-gradient(135deg, rgba(226, 75, 47, 0.12), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(226, 75, 47, 0.22);
  border-radius: 18px;
  display: flex;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
}

.imovel-publish-toggle input {
  accent-color: var(--accent, #e24b2f);
  height: 20px;
  width: 20px;
}

.imovel-publish-toggle strong,
.imovel-publish-toggle small {
  display: block;
}

.imovel-publish-toggle small {
  color: var(--muted, #6f7b87);
  font-size: 0.82rem;
  margin-top: 4px;
}
