: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;
}

.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;
}

.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;
}

.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);
}

.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;
}

.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;
}

.imovel-status-chip {
  --status-color: #64748b;
  --status-bg: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--status-color) 28%, transparent);
  border-radius: 999px;
  background: var(--status-bg);
  color: #17202a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.imovel-status-chip.is-available {
  --status-color: #16a34a;
  --status-bg: #ecfdf3;
}

.imovel-status-chip.is-reserved {
  --status-color: #f59e0b;
  --status-bg: #fffbeb;
}

.imovel-status-chip.is-unavailable {
  --status-color: #dc2626;
  --status-bg: #fef2f2;
}

.imovel-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--status-color);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color) 45%, transparent);
  animation: imovelStatusPulse 1.15s ease-out infinite;
}

@keyframes imovelStatusPulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color) 52%, transparent);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--status-color) 0%, transparent);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color) 0%, transparent);
  }
}

.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;
}

.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;
}

.imovel-full-fields {
  display: grid;
  gap: 18px;
}

.imovel-full-fields h4 {
  margin: 6px 0 -6px;
  padding-top: 10px;
  border-top: 1px solid #efe6da;
  color: var(--charcoal);
  font-size: 0.95rem;
}

.imovel-postal-row,
.imovel-modal-add-media {
  display: flex;
  gap: 8px;
  align-items: center;
}

.webmail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.primary-link-button,
.ghost-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

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

.ghost-link-button {
  border: 1px solid rgba(231, 68, 63, 0.35);
  color: var(--brand, #e7443f);
  background: #fff;
}

.webmail-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: #fff;
}

.imovel-postal-row input {
  flex: 1 1 180px;
  min-width: 150px;
}

.imovel-postal-row .ghost-button {
  flex: 0 0 auto;
  min-width: 104px;
}

.imovel-modal-add-media input[type="file"] {
  min-width: 0;
  flex: 1;
}

.ximo-filter-workspace {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  overflow: hidden;
  pointer-events: none;
  padding: 0 18px;
  margin: 0 0 0;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(255,250,244,0.92)),
    radial-gradient(circle at 96% 0%, rgba(231,68,63,0.12), transparent 34%);
  box-shadow: none;
  transition: max-height 360ms ease, opacity 220ms ease, transform 260ms ease, padding 260ms ease, margin 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.ximo-filter-workspace.is-open {
  max-height: 760px;
  opacity: 1;
  transform: translateY(0) scale(1);
  overflow: visible;
  pointer-events: auto;
  padding: 18px;
  margin: 0 0 18px;
  border-color: rgba(231, 68, 63, 0.12);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
}

.ximo-filter-side {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 48px 12px 0 0;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.ximo-filter-side button,
.ximo-filter-tabs button {
  border: 0;
  background: transparent;
  color: #1f2933;
  text-align: left;
  font-size: 0.86rem;
  cursor: pointer;
}

.ximo-filter-side button {
  padding: 9px 14px;
  border-radius: 6px;
}

.ximo-filter-side button.is-active,
.ximo-filter-tabs button.is-active {
  background: rgba(231, 68, 63, 0.1);
  color: var(--brand);
}

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

.ximo-filter-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 0 16px;
}

.ximo-filter-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef1f3, 0 10px 22px rgba(15, 23, 42, 0.04);
}

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

.ximo-imoveis-filters label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #111827;
}

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

.ximo-imoveis-filters input,
.ximo-imoveis-filters select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #dfe5ea;
  border-radius: 10px;
  padding: 7px 10px;
  color: #334155;
  background: #fff;
}

.ximo-filter-chips {
  grid-column: span 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: stretch;
}

.ximo-filter-chips button {
  border: 1px solid #dfe5ea;
  background: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  color: #334155;
  font-size: 0.78rem;
  cursor: pointer;
}

.ximo-filter-chips button.is-active {
  border-color: var(--brand);
  background: rgba(231, 68, 63, 0.1);
  color: var(--brand);
  font-weight: 900;
}

.ximo-filter-actions {
  grid-column: span 3;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: end;
}

@media (max-width: 1100px) {
  .ximo-filter-workspace {
    grid-template-columns: 1fr;
  }

  .ximo-filter-side {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 0;
    border-right: 0;
  }

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

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

@media (max-width: 680px) {
  .ximo-imoveis-filters,
  .ximo-filter-side {
    grid-template-columns: 1fr;
  }

  .ximo-filter-actions,
  .ximo-filter-chips,
  .ximo-imoveis-filters label.is-wide {
    grid-column: span 1;
  }
}

.property-thumb-wrap,
.energy-photo-frame {
  position: relative;
  display: inline-block;
}

.property-thumb-wrap .property-thumb,
.energy-photo-frame > img {
  display: block;
}

.energy-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 38px;
  padding: 0 8px;
  border-radius: 0;
  overflow: visible;
  background: #b8cf28;
  color: #fff;
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.energy-badge-house {
  clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%);
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.energy-badge-house span {
  transform: translateY(3px);
}

.energy-badge.is-a-plus,
.energy-badge.is-a {
  background: #259b49;
}

.energy-badge.is-b {
  background: #82bd36;
}

.energy-badge.is-b-minus {
  background: #b8cf28;
}

.energy-badge.is-c {
  background: #f0d338;
  color: #172033;
}

.energy-badge.is-d {
  background: #f39a2f;
}

.energy-badge.is-e {
  background: #e95a31;
}

.energy-badge.is-f {
  background: #d73832;
}

.energy-badge.is-isento,
.energy-badge.is-empty,
.energy-badge.is-custom {
  background: rgba(226, 232, 240, 0.92);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12);
  font-size: 1rem;
}

.energy-photo-frame-empty {
  width: 100%;
  min-height: 210px;
}

.imovel-status-chip.is-pending .imovel-status-dot {
  background: #38bdf8;
}

.imovel-status-chip.is-sold .imovel-status-dot,
.imovel-status-chip.is-unavailable .imovel-status-dot {
  background: #ef4444;
}


.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: 80;
  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));
  }
}

@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;
  }
}


.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(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

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

.email-settings-card .panel-head {
  align-items: flex-start;
}

.email-settings-card label {
  font-size: 0.86rem;
  color: #475569;
}

.email-settings-card input,
.email-settings-card select {
  margin-top: 6px;
}

.email-roundcube.webmail-panel {
  min-height: 760px;
}

.email-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.email-toolbar h2 {
  margin-bottom: 4px;
}

.email-toolbar p {
  margin: 0;
  color: #64748b;
}

.webmail-open-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.webmail-provider-note {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.16);
  color: #475569;
}

.webmail-frame {
  width: 100%;
  min-height: 640px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: #fff;
}

.preenche-web-panel {
  min-height: 760px;
}

.preenche-web-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 22px;
  background: #fff;
}

.avaliacao-imoveis-panel {
  padding: 14px;
}

.avaliacao-imoveis-frame {
  min-height: calc(100vh - 170px);
  border-radius: 16px;
}

.module-actionbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.module-actionbar button,
.module-form-actions button,
.simulator-card button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: #e04732;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.module-create-form {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 251, 246, 0.96), rgba(255, 247, 237, 0.8));
}

.module-create-form.is-collapsed {
  display: none;
}

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

.module-form-grid label,
.simulator-card label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
}

.module-form-grid input,
.module-form-grid select,
.module-form-grid textarea,
.simulator-card input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.module-form-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.module-form-grid .is-wide {
  grid-column: 1 / -1;
}

.module-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.maintenance-table-head {
  display: grid;
  grid-template-columns: 1.55fr 1.15fr 1.2fr 1fr 1.35fr 1fr;
  gap: 14px;
  align-items: center;
  padding: 11px 16px;
  margin-bottom: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.maintenance-row-card {
  grid-template-columns: 1.55fr 1.15fr 1.2fr 1fr 1.35fr 1fr;
  gap: 14px;
  align-items: center;
}

.maintenance-title-cell {
  justify-content: flex-start;
}

.maintenance-row-card .property-thumb {
  width: 112px;
  height: 72px;
}

@media (max-width: 980px) {
  .maintenance-table-head,
  .maintenance-row-card {
    grid-template-columns: 1fr;
  }
}

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

.simulator-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.simulator-card h3 {
  margin: 0;
  color: #0f172a;
}

.simulator-card output {
  display: block;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f766e;
  font-weight: 800;
}

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

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

  .module-form-grid,
  .simulator-grid {
    grid-template-columns: 1fr;
  }
}

/* Step 1 visual fix: wider main menu and no horizontal scrollbar. */
.app-shell {
  grid-template-columns: 118px minmax(0, 1fr);
}

.sidebar {
  width: 118px;
}

.ximo-main-menu {
  width: 118px;
  flex-basis: 118px;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-left: 6px;
  padding-right: 6px;
}

.ximo-main-item {
  padding-left: 6px;
  padding-right: 6px;
  overflow-wrap: anywhere;
  word-break: normal;
}

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

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

  .ximo-main-menu {
    width: 112px;
    flex-basis: 112px;
    overflow-x: hidden;
  }

  .ximo-sub-menu {
    left: 112px;
    width: calc(min(92vw, 360px) - 112px);
    flex-basis: calc(min(92vw, 360px) - 112px);
  }
}
/* Ajuste automatico por resolucao detectada no login/app. Mantem o visual existente,
   mas adapta densidade, menu e grelhas para evitar scroll lateral e lentidao visual. */
html,
body {
  overflow-x: hidden;
}

body.viewport-desktop .app-shell {
  grid-template-columns: clamp(118px, 7.4vw, 148px) minmax(0, 1fr);
}

body.viewport-desktop .sidebar {
  width: clamp(118px, 7.4vw, 148px);
}

body.viewport-uhd .app-shell {
  grid-template-columns: clamp(148px, 5.2vw, 190px) minmax(0, 1fr);
}

body.viewport-uhd .sidebar {
  width: clamp(148px, 5.2vw, 190px);
}

body.viewport-uhd .content {
  max-width: 2360px;
  margin-inline: auto;
}

body.viewport-uhd .panel,
body.viewport-uhd .ximo-list-panel {
  border-radius: 28px;
}

body.viewport-tablet .app-shell {
  grid-template-columns: 112px minmax(0, 1fr);
}

body.viewport-tablet .sidebar {
  width: 112px;
}

body.viewport-tablet .topbar {
  gap: 14px;
}

body.viewport-tablet .topbar-tools {
  min-width: min(460px, 52vw);
}

@media (max-width: 760px) {
  .app-shell,
  body.viewport-mobile .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar,
  body.viewport-mobile .sidebar {
    width: min(82vw, 360px);
    max-width: 360px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .topbar {
    align-items: stretch;
    gap: 14px;
  }

  .topbar-tools {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-toggle {
    width: 100%;
    min-height: 58px;
  }

  .panel,
  .ximo-list-panel {
    max-width: 100%;
  }

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

  .maintenance-table-head {
    display: none;
  }

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

  .ximo-filter-actions,
  .ximo-filter-chips {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1280px) {
  .ximo-imoveis-filters {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

@media (min-width: 1920px) {
  .ximo-imoveis-filters {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
  }

  .stats {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}

@media (min-width: 2560px) {
  .topbar h1 {
    font-size: clamp(34px, 1.85vw, 54px);
  }

  .ximo-imoveis-filters {
    grid-template-columns: repeat(6, minmax(170px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
