/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; overflow: hidden; }
body {
  font-family: 'Nunito Sans', 'Public Sans', -apple-system, sans-serif;
  background: #F5F4EF;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ===== App Shell ===== */
.app-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100vw;
  min-height: 0;
}

/* ===== TOP BAR ===== */
.topbar {
  display: flex;
  align-items: center;
  background: #1b4332;
  padding: 0 0.85rem;
  height: 52px;
  flex-shrink: 0;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  position: relative;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #d4a853;
  color: #1b4332;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  border: 0;
}

.app-picker-button {
  cursor: pointer;
}

.app-picker-button:hover,
.app-picker-button:focus-visible,
.app-picker-button[aria-expanded="true"] {
  background: #f0c85f;
  outline: 2px solid rgba(255,255,255,0.26);
  outline-offset: 2px;
}

.app-picker-popover {
  position: absolute;
  top: 40px;
  left: 0;
  z-index: 5000;
  width: min(340px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(27,67,50,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 22px 54px rgba(0,0,0,0.20);
}

.app-picker-popover[hidden] { display: none; }

.app-picker-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
}

.app-picker-title {
  color: #1b4332;
  font-size: 13px;
  font-weight: 900;
}

.app-picker-close {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd8ca;
  border-radius: 8px;
  background: #fff;
  color: #6b6f66;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.app-picker-close:hover,
.app-picker-close:focus-visible {
  color: #1b4332;
  border-color: rgba(27,67,50,0.24);
  outline: 2px solid rgba(27,67,50,0.12);
}

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

.app-picker-tile {
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 10px 6px;
  border: 1px solid rgba(27,67,50,0.10);
  border-radius: 12px;
  background: #fbfaf6;
  color: #1a1a1a;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.app-picker-tile:hover,
.app-picker-tile:focus-visible {
  background: #fff8e6;
  border-color: rgba(212,168,83,0.55);
  color: #1b4332;
  outline: 2px solid rgba(212,168,83,0.24);
}

.app-picker-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf5ef;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}

.app-picker-tile.current .app-picker-icon {
  background: #fff4d7;
}

.app-picker-footer {
  display: block;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f5f4ef;
  color: #1b4332;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.app-picker-footer:hover,
.app-picker-footer:focus-visible {
  background: #eee8d8;
  outline: 2px solid rgba(27,67,50,0.12);
}

.brand-name {
  color: #fff;
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ===== VIEW TOGGLE (My Properties / All) ===== */
.view-toggle {
  display: flex;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.vt-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.vt-btn:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
}

.vt-btn.vt-active {
  background: #d4a853;
  color: #1b4332;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.vt-btn.vt-active svg { stroke: #1b4332; }
.vt-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== FILE TABS ===== */
.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  height: 100%;
  padding-top: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  position: relative;
  padding: 0.5rem 0.85rem 0.55rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: rgba(255,255,255,0.6);
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  /* 3D effect */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 -1px 3px rgba(0,0,0,0.15);
}

.tab:hover {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
}

.tab.active {
  background: #F5F4EF;
  color: #1a1a1a;
  border-color: #d1d5db;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    -1px -1px 3px rgba(0,0,0,0.06),
    1px -1px 3px rgba(0,0,0,0.06);
  z-index: 2;
  /* Extend down to cover the border */
  margin-bottom: -1px;
  padding-bottom: calc(0.55rem + 1px);
}

.tab-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
  margin-left: 0.3rem;
}

.tab.active .tab-badge {
  background: #2d6a4f;
  color: #fff;
}

.tab-badge-warn {
  background: #d97706 !important;
  color: #fff !important;
}

/* ===== TOP BAR USER ===== */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar-user .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d4a853;
  color: #1b4332;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  font-family: 'Public Sans', sans-serif;
}

.topbar-user .user-name {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 600;
}

.topbar-logout {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.topbar-logout:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid #d1d5db;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ===== INBOX VIEW (2-panel) ===== */
.view-inbox {
  display: none;
  flex: 1;
}

.view-inbox.view-active {
  display: grid;
  grid-template-columns: clamp(380px, 28vw, 520px) minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  height: 100%;
}

/* ===== THREAD LIST ===== */
.thread-list {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.thread-list-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f0f0ec;
}

.thread-list-header h2 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.thread-filters {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.filter-btn {
  padding: 0.25rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover { border-color: #2d6a4f; color: #2d6a4f; }
.filter-btn.active { background: #2d6a4f; color: #fff; border-color: #2d6a4f; }

.filter-count-badge {
  display: inline-flex;
  min-width: 1.15rem;
  justify-content: center;
  margin-left: 0.2rem;
  padding: 0.05rem 0.3rem;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 0.65rem;
}

.inbox-ai-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.inbox-ai-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}
.inbox-ai-toggle:first-child { grid-column: 1; }
.inbox-ai-toggle:nth-child(2) { grid-column: 2; }
.inbox-ai-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.inbox-ai-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.inbox-ai-label { white-space: nowrap; }
.inbox-ai-status {
  margin-top: 0.14rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: normal;
}
.inbox-ai-track {
  flex: 0 0 auto;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  padding: 2px;
  transition: background 0.15s;
}
.inbox-ai-thumb {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.inbox-ai-toggle.is-on {
  border-color: #2d6a4f;
  background: #eef8f2;
  color: #1b4332;
}
.inbox-ai-toggle.is-on .inbox-ai-track { background: #2d6a4f; }
.inbox-ai-toggle.is-on .inbox-ai-thumb { transform: translateX(20px); }
.inbox-ai-toggle.is-on .inbox-ai-status { color: #1b4332; }
.inbox-ai-toggle.is-saving { opacity: 0.65; pointer-events: none; }
.inbox-ai-settings-btn {
  grid-column: 3;
  width: 36px;
  min-height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: #375347;
  cursor: pointer;
  transition: all 0.15s;
}
.inbox-ai-settings-btn:hover,
.inbox-ai-settings-btn.is-open {
  border-color: #2d6a4f;
  color: #1b4332;
  background: #eef8f2;
}
.inbox-ai-settings-card {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 35;
  display: grid;
  gap: 0.85rem;
  border: 1px solid #d9dfd5;
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  color: #1f2937;
}
.inbox-ai-settings-card[hidden] { display: none; }
.inbox-ai-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.inbox-ai-settings-head strong {
  display: block;
  color: #1b4332;
  font-size: 0.88rem;
  line-height: 1.2;
}
.inbox-ai-settings-head span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}
.inbox-ai-settings-close {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-weight: 900;
  cursor: pointer;
}
.inbox-ai-mode-options {
  display: grid;
  gap: 0.55rem;
}
.inbox-ai-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  cursor: pointer;
}
.inbox-ai-mode-option:has(input:checked) {
  border-color: #8fb8a4;
  background: #eef8f2;
}
.inbox-ai-away-schedule {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}
.inbox-ai-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
}
.inbox-ai-day {
  display: grid;
  place-items: center;
}
.inbox-ai-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.inbox-ai-day span {
  width: 100%;
  padding: 0.34rem 0.18rem;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}
.inbox-ai-day input:checked + span {
  border-color: #8fb8a4;
  background: #eef8f2;
  color: #1b4332;
}
.inbox-ai-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.inbox-ai-time-row label {
  display: grid;
  gap: 0.22rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
}
.inbox-ai-time-row input {
  min-width: 0;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  padding: 0.38rem 0.45rem;
  color: #111827;
  font: inherit;
  font-weight: 800;
}
.inbox-ai-mode-option strong {
  display: block;
  color: #1f2937;
  font-size: 0.8rem;
}
.inbox-ai-mode-option span {
  display: block;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.25;
}
.inbox-ai-delay-input {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.inbox-ai-delay-input input {
  width: 68px;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  padding: 0.38rem 0.45rem;
  color: #111827;
  font: inherit;
  font-weight: 800;
}
.inbox-ai-jitter-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 0.36rem 0.45rem;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: #375347;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}
.inbox-ai-mode-fallback {
  display: block;
  margin-top: 0.35rem;
  color: #375347;
  font-size: 0.68rem;
  font-weight: 900;
}
.inbox-ai-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.inbox-ai-settings-status {
  min-width: 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}
.inbox-ai-settings-save {
  border: 0;
  border-radius: 6px;
  background: #1b4332;
  color: #fff;
  padding: 0.48rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}
.inbox-ai-settings-save:disabled { opacity: 0.65; cursor: wait; }

.thread-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: #f9faf8;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.thread-search svg { flex-shrink: 0; color: #9ca3af; }
.thread-search input {
  flex: 1; border: none; background: transparent;
  font-size: 0.82rem; font-family: inherit; outline: none; color: #1a1a1a;
}

.thread-search-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  line-height: 0;
}
.thread-search-clear:hover { background: #e5e7eb; color: #4b5563; }
.thread-search-clear:focus-visible { outline: 2px solid #1b4332; outline-offset: 1px; }
.thread-search-clear[hidden] { display: none; }

.thread-items { flex: 1; overflow-y: auto; }

/* Thread Item */
.thread-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f5f5f0;
  cursor: pointer;
  transition: background 0.1s;
  border-left: 4px solid transparent;
}

.thread-item:hover { background: #fafaf8; }
.thread-item.real-estate-agent { background:#faf5ff; border-left:4px solid #7c3aed; }
.thread-item.real-estate-agent.active { background:#f3e8ff; border-left:4px solid #6d28d9; }
.thread-item.real-estate-agent:hover { background:#f3e8ff; }
.thread-item.owner-portal-thread {
  background: #eff6ff;
  border-left: 4px solid #1e3a8a;
  box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.1);
}
.thread-item.owner-portal-thread.active {
  background: #dbeafe;
  border-left-color: #172554;
}
.thread-item.owner-portal-thread:hover { background: #dbeafe; }
.thread-item.active { background: #f0f7f4; border-left-color: #2d6a4f; }
.thread-item.unread {
  background: #fffdf5;
  border-left-color: #d97706;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.12);
}
.thread-item.unread:hover { background: #fff8e6; }
.thread-item.unread .thread-guest { font-weight: 900; }
.thread-item.unread .thread-preview { color: #1a1a1a; font-weight: 800; }

.thread-content { flex: 1; min-width: 0; }

.thread-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.15rem; }
.thread-guest-line { min-width: 0; display: flex; align-items: center; gap: 0.35rem; }
.thread-guest { font-weight: 800; font-size: 0.92rem; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-property-code {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border: 1px solid #b7d6c3;
  border-radius: 4px;
  background: #eef8f2;
  color: #1b4332;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.18rem 0.35rem;
}
.thread-time { font-size: 0.7rem; color: #9ca3af; white-space: nowrap; margin-left: 0.5rem; }

.thread-mid { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.15rem; }

.owner-thread-label {
  display: inline-flex;
  width: fit-content;
  margin: 0.15rem 0 0.2rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: #172554;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.channel-icon {
  width: 14px; height: 14px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.channel-icon.airbnb { background: #FF5A5F; }
.channel-icon.vrbo { background: #3B5FC0; }
.channel-icon.sms { background: #059669; }
.channel-icon.agent { width:auto; min-width:34px; padding:0 5px; background:#7c3aed; font-size:.48rem; }

.thread-property { font-size: 0.8rem; color: #374151; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-preview { font-size: 0.78rem; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }

.team-response-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.16rem 0.45rem;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.team-response-badge.needed {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.team-response-badge.resolved {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.stay-phase-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.stay-phase-upcoming { background: #eff6ff; color: #1d4ed8; }
.stay-phase-current { background: #ecfdf5; color: #047857; }
.stay-phase-checked-out { background: #f3f4f6; color: #4b5563; }
.agent-thread-label { display:inline-flex; width:max-content; max-width:100%; margin:.15rem 0 .2rem; padding:.16rem .45rem; border-radius:999px; background:#7c3aed; color:#fff; font-size:.58rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }

.thread-bottom { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; }
.thread-booking-open {
  border: 1px solid #d9dfd5;
  border-radius: 999px;
  background: #f6faf8;
  color: #1b4332;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  cursor: pointer;
}
.thread-booking-open:hover {
  border-color: #2d6a4f;
  background: #edf7f2;
}

/* ===== Reservations ===== */
.reservations-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.25rem;
  background: #f4f2f7;
}
.reservations-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.reservations-title { margin: 0; color: #111827; font-size: 1.45rem; font-weight: 850; letter-spacing: 0; }
.reservations-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.icon-btn { width: 34px; height: 34px; border: 1px solid #d7ddd5; border-radius: 9px; background: #fff; color: #375347; font-weight: 850; cursor: pointer; }
.reservation-smart-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; width: min(720px, 100%); border: 1px solid #dde3da; border-radius: 12px; background: #fff; padding: 0.72rem 0.85rem; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.reservation-smart-search input { border: 0; outline: 0; min-width: 0; color: #111827; font-size: 0.92rem; background: transparent; }
.reservation-smart-search button { border: 0; background: transparent; color: #6b7280; font-weight: 900; cursor: pointer; }
.reservations-filter-row { display: flex; align-items: flex-end; gap: 0.55rem; flex-wrap: wrap; }
.reservations-filter-label { color: #4b5563; font-size: 0.86rem; font-weight: 800; }
.reservation-chip, .reservation-columns-btn { border: 1px solid #d4ddd2; border-radius: 999px; background: #fff; color: #344b40; padding: 0.42rem 0.72rem; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.reservation-chip.active { background: #e7f2ec; border-color: #8fb8a4; color: #1b4332; }
.reservation-chip.clear { color: #6b3b2a; border-color: #e7d6ce; }
.reservation-filter-control { display: grid; gap: 0.22rem; min-width: 150px; color: #53615b; font-size: 0.72rem; font-weight: 850; }
.reservation-filter-control.compact { min-width: 118px; }
.reservation-filter-control.saved { min-width: 190px; }
.reservation-filter-control input,
.reservation-filter-control select { width: 100%; min-height: 32px; border: 1px solid #d8dfd4; border-radius: 8px; background: #fff; color: #1f2937; padding: 0.35rem 0.5rem; font-size: 0.8rem; font-weight: 750; }
.reservation-saved-filters { display: flex; align-items: flex-end; gap: 0.4rem; flex-wrap: wrap; }
.reservation-save-btn,
.reservation-favorite-btn { min-height: 32px; border: 1px solid #d4ddd2; border-radius: 8px; background: #fff; color: #344b40; padding: 0.35rem 0.62rem; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.reservation-favorite-btn { width: 34px; padding-inline: 0; font-size: 1rem; line-height: 1; color: #7c5b13; }
.reservation-favorite-btn.active { background: #fff8e1; border-color: #e3c96c; color: #9a6700; }
.reservation-favorite-btn:disabled { cursor: not-allowed; opacity: 0.45; }
.reservation-save-status { align-self: center; min-width: 54px; color: #2d6a4f; font-size: 0.78rem; font-weight: 850; }
.reservation-active-tags { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; min-height: 0; }
.reservation-active-tags[hidden] { display: none; }
.reservation-active-tag { display: inline-flex; align-items: center; gap: 0.32rem; min-height: 28px; border: 1px solid #b9d3c4; border-radius: 999px; background: #f0f8f3; color: #173c2c; padding: 0.22rem 0.55rem; font-size: 0.78rem; font-weight: 850; cursor: pointer; }
.reservation-active-tag span { color: #5f766b; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0; }
.reservation-columns-wrap { position: relative; margin-left: auto; }
.reservation-columns-menu { position: absolute; top: calc(100% + 0.4rem); right: 0; z-index: 20; display: grid; gap: 0.45rem; min-width: 150px; border: 1px solid #d9dfd5; border-radius: 10px; background: #fff; padding: 0.7rem; box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14); }
.reservation-columns-menu[hidden] { display: none; }
.reservation-columns-menu label { display: flex; align-items: center; gap: 0.45rem; color: #374151; font-size: 0.82rem; }
.reservations-table-shell { min-height: 0; overflow: auto; border: 1px solid #dfe5dc; border-radius: 8px; background: #fff; }
.reservations-table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: fixed; }
.reservations-table th,
.reservations-table td { border-bottom: 1px solid #edf0ea; padding: 0.58rem 0.7rem; text-align: left; vertical-align: middle; color: #1f2937; font-size: 0.84rem; }
.reservations-table th { position: sticky; top: 0; z-index: 2; background: #f8faf7; color: #53615b; font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.reservations-table th button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.reservations-table tbody tr { cursor: pointer; }
.reservations-table tbody tr:hover { background: #f7fbf8; }
.reservations-table tbody tr:last-child td { border-bottom: 0; }
.reservation-date-cell { color: #334155; font-weight: 780; white-space: nowrap; }
.reservation-date-cell small { display: block; margin-top: 0.16rem; color: #64748b; font-size: 0.72rem; font-weight: 760; }
.reservation-guest-cell { color: #111827; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reservation-money-cell { color: #173c2c; font-weight: 900; white-space: nowrap; }
.reservation-code { color: #2563eb; font-weight: 850; }
.reservation-legacy-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  padding: 0.12rem 0.4rem;
  font-size: 0.66rem;
  font-weight: 900;
  vertical-align: middle;
  white-space: nowrap;
}
.reservation-legacy-badge.headline {
  margin-left: 0.55rem;
  transform: translateY(-0.12rem);
}
.reservation-listing-cell { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 0.6rem; min-width: 260px; }
.reservation-listing-cell strong { margin-right: 0.35rem; color: #1b4332; }
.reservation-listing-avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e7f2ec; color: #1b4332; font-weight: 900; }
.reservation-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.22rem 0.55rem; font-size: 0.74rem; font-weight: 900; }
.reservation-status.confirmed { background: #ecfdf5; color: #047857; }
.reservation-status.pending { background: #eff6ff; color: #1d4ed8; }
.reservation-status.cancelled { background: #fef2f2; color: #b91c1c; }
.reservations-empty { padding: 2rem !important; color: #6b7280; text-align: center; }
.reservations-empty.error { color: #b91c1c; }

.reservation-detail-page { display: flex; flex-direction: column; gap: 1rem; min-height: 100%; padding: 1.25rem; background: #f4f2f7; }
.reservation-detail-loading,
.reservation-detail-error { border: 1px solid #e1e5dd; border-radius: 8px; background: #fff; padding: 1rem; color: #4b5563; }
.reservation-detail-error { color: #991b1b; }
.reservation-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border: 1px solid #dfe5dc; border-radius: 8px; background: #fff; padding: 1rem; }
.reservation-detail-back { border: 0; background: transparent; color: #2d6a4f; font-size: 0.82rem; font-weight: 850; padding: 0 0 0.4rem; cursor: pointer; }
.reservation-detail-hero h2 { margin: 0; color: #111827; font-size: 1.45rem; font-weight: 900; }
.reservation-detail-hero p { margin: 0.25rem 0 0; color: #64748b; font-size: 0.9rem; }
.reservation-detail-hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.reservation-legacy-notice {
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
  padding: 0.85rem 0.95rem;
}
.reservation-legacy-notice strong,
.reservation-legacy-notice span,
.reservation-legacy-notice small {
  display: block;
}
.reservation-legacy-notice strong {
  font-size: 0.88rem;
  font-weight: 900;
}
.reservation-legacy-notice span {
  margin-top: 0.22rem;
  font-size: 0.82rem;
}
.reservation-legacy-notice small {
  margin-top: 0.28rem;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 750;
}
.reservation-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.reservation-detail-summary div { border: 1px solid #dfe5dc; border-radius: 8px; background: #fff; padding: 0.85rem; min-width: 0; }
.reservation-detail-summary span { display: block; color: #64748b; font-size: 0.72rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0; }
.reservation-detail-summary strong { display: block; margin-top: 0.25rem; color: #111827; font-size: 0.95rem; font-weight: 900; overflow-wrap: anywhere; }
.reservation-detail-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.85rem; align-items: start; }
.reservation-detail-section { border: 1px solid #dfe5dc; border-radius: 8px; background: #fff; padding: 0.95rem; min-width: 0; }
.reservation-detail-section.wide { grid-column: 1 / -1; }
.reservation-detail-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.reservation-detail-section-head h3 { margin: 0; color: #111827; font-size: 0.95rem; font-weight: 900; }
.reservation-detail-section-head p { margin: 0.1rem 0 0; color: #64748b; font-size: 0.78rem; }
.reservation-detail-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.reservation-detail-info-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reservation-detail-info-row { display: grid; gap: 0.18rem; min-width: 0; border: 1px solid #edf0ea; border-radius: 8px; background: #fbfcfb; padding: 0.55rem 0.65rem; }
.reservation-detail-info-row span { color: #64748b; font-size: 0.72rem; font-weight: 800; }
.reservation-detail-info-row strong { color: #111827; font-size: 0.84rem; font-weight: 850; overflow-wrap: anywhere; }
.reservation-detail-empty { color: #64748b; font-size: 0.84rem; }
.reservation-detail-messages { display: grid; gap: 0.55rem; }
.reservation-detail-message { border: 1px solid #e5e7eb; border-radius: 8px; background: #fbfcfb; padding: 0.65rem; color: #1f2937; font-size: 0.84rem; }
.reservation-detail-message.outbound { background: #f3f8f5; border-color: #d9eadf; }
.reservation-detail-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.25rem; color: #64748b; font-size: 0.74rem; }
.reservation-detail-message-meta strong { color: #173c2c; }

@media (max-width: 980px) {
  .reservation-smart-search { width: 100%; }
  .reservation-filter-control { min-width: calc(50% - 0.55rem); }
  .reservation-columns-wrap { margin-left: 0; }
  .reservation-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reservation-detail-layout { grid-template-columns: 1fr; }
  .reservation-detail-info-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .reservations-header { flex-direction: column; }
  .reservations-actions { width: 100%; }
  .reservation-filter-control,
  .reservation-filter-control.compact { min-width: 100%; }
  .reservations-table-shell { margin-inline: -0.25rem; }
  .reservation-detail-hero { flex-direction: column; }
  .reservation-detail-hero-actions { justify-content: flex-start; }
  .reservation-detail-summary,
  .reservation-detail-info-grid,
  .reservation-detail-info-grid.compact { grid-template-columns: 1fr; }
}

.agent-tag {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.65rem; font-weight: 600; padding: 0.1rem 0.35rem;
  border-radius: 4px; background: #f3f4f6; color: #6b7280;
}
.agent-tag.ai { background: #ecfdf5; color: #059669; }
.agent-tag.human { background: #eff6ff; color: #2563eb; }

.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #2d6a4f; flex-shrink: 0; margin-left: auto; }
.unread-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0.15rem 0.42rem;
  margin-left: 0.1rem;
}

.cat-tag {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.65rem; font-weight: 700; padding: 0.12rem 0.4rem;
  border-radius: 4px; white-space: nowrap;
}
.cat-booking { background: #ecfdf5; color: #059669; }
.cat-booking_request { background: #eff6ff; color: #2563eb; }
.cat-inquiry { background: #fef3c7; color: #b45309; }
.cat-message { background: #f3f4f6; color: #374151; }
.cat-owner_portal { background: #e0f2fe; color: #075985; }
.cat-review { background: #fef9c3; color: #a16207; }
.cat-cancellation { background: #fef2f2; color: #dc2626; }
.cat-modification { background: #ede9fe; color: #7c3aed; }
.cat-reminder { background: #f0f9ff; color: #0369a1; }
.cat-payout { background: #ecfdf5; color: #059669; }
.cat-other { background: #f3f4f6; color: #6b7280; }

/* ===== CONVERSATION PANEL ===== */
.conversation {
  display: flex; flex-direction: column; overflow: hidden; background: #fafaf8;
  min-height: 0; min-width: 0; height: 100%;
}

.conv-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.75rem;
  color: #9ca3af; font-size: 0.9rem;
}

.conv-active { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }

.conv-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem; background: #fff; border-bottom: 1px solid #e5e7eb;
  min-width: 0;
}

.conv-guest-name { font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.conv-guest-name .thread-property-code { font-size: 0.9rem; padding: 0.22rem 0.45rem; }

.conv-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.15rem; }

.channel-badge {
  display: inline-block; padding: 0.12rem 0.45rem; border-radius: 4px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.channel-badge.airbnb { background: #fff1f2; color: #FF5A5F; }
.channel-badge.vrbo { background: #eef2ff; color: #3B5FC0; }
.channel-badge.sms { background: #ecfdf5; color: #059669; }
.channel-badge.agent { background:#f3e8ff; color:#6d28d9; border:1px solid #c4b5fd; }

.conv-property, .conv-dates { font-size: 0.78rem; color: #6b7280; }

.conv-header-actions { display: flex; gap: 0.35rem; }

.mobile-conv-back {
  display: none;
}

.icon-btn {
  width: 34px; height: 34px; border: 1px solid #e5e7eb; border-radius: 8px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #6b7280; transition: all 0.15s;
}
.icon-btn:hover { border-color: #2d6a4f; color: #2d6a4f; }

/* Messages */
.conv-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem 1.25rem 1.75rem;
  display: flex; flex-direction: column; gap: 0.85rem;
  min-width: 0;
  scroll-padding-bottom: 1.75rem;
}

.booking-summary-card {
  background: linear-gradient(180deg, #fffdf7, #fff);
  border: 1px solid #eadfc8;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.06);
}

.booking-summary-card.starter {
  border-color: #d4a853;
  background: linear-gradient(180deg, #fff8e8, #fffdf7);
}

.booking-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.booking-summary-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #8b6b2f;
  margin-bottom: 0.2rem;
}

.booking-summary-title {
  font-family: 'Public Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #1b4332;
}

.booking-summary-intro {
  font-size: 0.78rem;
  color: #6b7280;
  max-width: 280px;
  text-align: right;
}

.booking-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 0.8rem;
}

.booking-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.booking-summary-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 700;
}

.booking-summary-value {
  font-size: 0.84rem;
  color: #1f2937;
  font-weight: 700;
  line-height: 1.35;
}

.msg-bubble {
  width: fit-content;
  max-width: min(70%, calc(100% - 1.5rem)); padding: 0.75rem 1rem; border-radius: 12px;
  font-size: 0.85rem; line-height: 1.5; position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.msg-bubble.guest { background: #fff; border: 1px solid #e5e7eb; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-bubble.team { background: #2d6a4f; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble.ai { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #1a1a1a; align-self: flex-end; border: 1px solid #a7f3d0; border-bottom-right-radius: 4px; }
.msg-bubble.agent { background:#f5f3ff; border:1px solid #c4b5fd; color:#2e1065; align-self:flex-start; border-bottom-left-radius:4px; }
.msg-bubble.support { background:#fff7ed; border:1px solid #fed7aa; color:#7c2d12; align-self:flex-start; border-bottom-left-radius:4px; }
.msg-bubble.owner { background:#172554; border:1px solid #1d4ed8; color:#fff; align-self:flex-start; border-bottom-left-radius:4px; box-shadow:0 6px 18px rgba(23,37,84,0.18); }
.msg-bubble.internal-note {
  align-self: center;
  width: min(760px, 92%);
  max-width: 92%;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  color: #451a03;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(146, 64, 14, 0.12);
}
.msg-bubble.internal-note.note-focus {
  outline: 3px solid rgba(217, 119, 6, 0.35);
  outline-offset: 3px;
}

.msg-sender { font-size: 0.7rem; font-weight: 700; margin-bottom: 0.15rem; opacity: 0.7; }
.msg-bubble.team .msg-sender { color: rgba(255,255,255,0.7); }
.msg-bubble.ai .msg-sender { color: #059669; }
.msg-bubble.agent .msg-sender { color:#6d28d9; opacity:1; }
.msg-bubble.support .msg-sender { color:#9a3412; opacity:1; }
.msg-bubble.owner .msg-sender { color:rgba(255,255,255,0.82); opacity:1; }

.msg-meta { margin-bottom: 0.35rem; }
.msg-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.62rem; font-weight: 700; padding: 0.18rem 0.45rem;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em;
}
.msg-badge.guest { background: #f3f4f6; color: #6b7280; }
.msg-badge.agent { background:#ede9fe; color:#6d28d9; border:1px solid #c4b5fd; }
.msg-badge.support { background:#ffedd5; color:#9a3412; border:1px solid #fdba74; }
.msg-badge.owner { background:#dbeafe; color:#172554; border:1px solid #93c5fd; font-size:0.78rem; font-weight:900; letter-spacing:0.08em; }
.msg-badge.internal-note { background:#f59e0b; color:#fff; border:1px solid #d97706; font-size:0.76rem; font-weight:900; letter-spacing:0.04em; }
.msg-badge.human { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.18); }
.msg-badge.automation { background: #f8fafc; color: #0f172a; border: 1px solid rgba(15, 23, 42, 0.18); }
.msg-bubble.team .msg-badge.automation { background: rgba(255,255,255,0.96); color: #0f172a; border-color: rgba(255,255,255,0.78); }
.msg-badge.review-response { background: rgba(255,255,255,0.22); color: rgba(255,255,255,0.96); border: 1px solid rgba(255,255,255,0.3); }
.msg-badge.outside { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.msg-badge.ai { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.msg-badge.draft { background: #fff7ed; color: #9a3412; border: 1px solid #fb923c; }

.msg-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.msg-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
  margin: 0.18rem 0.08rem 0.12rem;
  padding: 0.36rem 0.68rem 0.32rem;
  vertical-align: middle;
  border: 1px solid #1b4332;
  border-bottom-width: 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, #39745c 0%, #2d6a4f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 2px 5px rgba(27,67,50,0.22);
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(27,67,50,0.3);
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.msg-action-link:hover {
  background: linear-gradient(180deg, #2d6a4f 0%, #1b4332 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 3px 7px rgba(27,67,50,0.25);
}

.msg-action-link:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(27,67,50,0.28);
}

.msg-action-link:focus-visible {
  outline: 3px solid #d4a853;
  outline-offset: 2px;
}

.msg-action-link-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.msg-action-link-icon {
  flex: 0 0 auto;
  font-size: 0.9em;
  font-weight: 900;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .msg-action-link {
    transition: none;
  }
}

@media (prefers-contrast: more) {
  .msg-action-link,
  .msg-action-link:hover {
    border-width: 2px;
    border-bottom-width: 4px;
    background: #1b4332;
    box-shadow: none;
    text-shadow: none;
  }
}

@media (max-width: 640px) {
  .msg-action-link {
    min-height: 44px;
    padding: 0.56rem 0.78rem 0.5rem;
  }
}

.msg-translation {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #dbe7df;
  color: #244b3b;
}

.msg-translation-label {
  margin-bottom: 0.2rem;
  color: #39745c;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.msg-translation.pending,
.msg-translation.unavailable {
  color: #6b7280;
  font-size: 0.72rem;
  font-style: italic;
}

.msg-translation.unavailable {
  border-top-color: #e5e7eb;
}

.msg-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.msg-image-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.msg-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.msg-videos {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.45rem;
  width: min(480px, 100%);
  max-width: 100%;
}

.msg-video-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #111827;
}

.msg-video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111827;
}

.msg-video-unavailable,
.msg-video-placeholder {
  display: none;
  min-height: 88px;
  padding: 1rem;
  place-items: center;
  text-align: center;
  color: #6b7280;
  background: #f3f4f6;
}

.msg-video-placeholder,
.msg-video-shell.is-unavailable .msg-video-unavailable { display: grid; }
.msg-video-shell.is-unavailable .msg-video { display: none; }
.msg-bubble.team .msg-video-shell { border-color: rgba(255,255,255,0.2); }

@media (max-width: 640px) {
  .msg-video { max-height: 56vw; }
  .msg-videos { width: 100%; }
}

body.mobile-dashboard .msg-video,
body.mobile-dashboard .msg-videos {
  width: 100%;
  max-width: 100%;
}

.msg-bubble.team .msg-image-link { border-color: rgba(255,255,255,0.2); }

.msg-time { font-size: 0.65rem; margin-top: 0.35rem; opacity: 0.5; }
.msg-bubble.team .msg-time { color: rgba(255,255,255,0.5); }

.msg-ai-tag { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.62rem; font-weight: 600; color: #059669; margin-top: 0.2rem; }
.msg-ai-tag svg { width: 12px; height: 12px; }

.msg-system { text-align: center; font-size: 0.75rem; color: #9ca3af; padding: 0.4rem 0; }
.msg-loading-state { padding: 2rem; color: #6b7280; text-align: center; font-weight: 700; }

/* Composer */
.conv-composer {
  padding: 0.8rem 1.25rem 1.1rem; background: #fff; border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  min-width: 0;
}

.mobile-composer-tab {
  display: none;
}

.composer-agent-tag {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: #6b7280; margin-bottom: 0.55rem;
}

.composer-agent-tag.clean {
  margin-bottom: 0;
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.agent-dot { width: 8px; height: 8px; border-radius: 50%; }
.agent-dot.human { background: #2563eb; }

.bella-draft-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 0.75rem; margin-bottom: 0.75rem;
}
.bella-draft-box.empty { color: #9ca3af; font-size: 0.85rem; }
.bella-draft-head {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem;
}
.bella-draft-title { font-size: 0.78rem; font-weight: 700; color: #2563eb; flex: 1; }
.bella-draft-head button {
  border: 1px solid #d1d5db; background: #fff; color: #374151;
  border-radius: 6px; padding: 0.3rem 0.7rem; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s ease;
}
.bella-draft-head button:hover {
  background: #f3f4f6; border-color: #9ca3af;
}
.bella-copy-btn { color: #1d4ed8 !important; border-color: #bfdbfe !important; }
.bella-copy-btn:hover { background: #eff6ff !important; }
.bella-rewrite-btn { color: #7c3aed !important; border-color: #c4b5fd !important; }
.bella-rewrite-btn:hover { background: #f5f3ff !important; }
.bella-clear-btn { color: #dc2626 !important; border-color: #fecaca !important; }
.bella-clear-btn:hover { background: #fef2f2 !important; }
.bella-draft-head button:disabled {
  opacity: 0.5; cursor: not-allowed;
}
#bellaDraftText {
  width: 100%; min-height: 120px; resize: vertical; border: 1px solid #d1d5db;
  border-radius: 10px; padding: 0.75rem; font: inherit; line-height: 1.5; background: #fff;
}
.composer-actions-only { display: flex; gap: 0.5rem; }
.btn-airbnb-reply {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  background: #FF5A5F; color: #fff; text-decoration: none; font-weight: 700;
  border-radius: 10px; padding: 0.8rem 1rem;
}
.btn-airbnb-reply:hover { background: #e1484d; }
.agent-dot.ai { background: #059669; }

.inquiry-action-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0 0 0.55rem;
  padding: 0.5rem;
  border: 1px solid #dbe7df;
  border-radius: 8px;
  background: #f7fbf8;
}
.inquiry-action-label {
  color: #1f3d2f;
  font-size: 0.74rem;
  font-weight: 900;
  margin-right: 0.1rem;
}
.inquiry-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.38rem 0.65rem;
  border: 1px solid #b8d6c5;
  border-radius: 6px;
  background: #fff;
  color: #1b4332;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.inquiry-action-btn:hover {
  background: #ecf7f0;
  border-color: #8eb99f;
}
.inquiry-action-btn.active {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
  cursor: default;
}
.inquiry-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.inquiry-action-btn.active:disabled {
  opacity: 1;
}

.composer-input-row { display: flex; gap: 0.55rem; align-items: stretch; }

.composer-input-row textarea {
  flex: 1; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 0.8rem 0.95rem; font-family: inherit; font-size: 0.92rem;
  resize: vertical; min-height: 112px; max-height: 240px; line-height: 1.45;
  outline: none; transition: border-color 0.2s; background: #fafaf8;
}
.composer-input-row textarea:focus { border-color: #2d6a4f; box-shadow: 0 0 0 3px rgba(45,106,79,0.08); }

.btn-send {
  width: 54px; min-height: 112px; border: none; border-radius: 12px;
  background: #2d6a4f; color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: background 0.15s, width 0.15s; flex-shrink: 0;
}
.btn-send:hover { background: #245a42; }
.btn-send .send-label { display: none; font-size: 0.72rem; font-weight: 900; line-height: 1.1; text-align: center; }
.conv-composer.note-mode {
  background: #fffbeb;
  border-top-color: #f59e0b;
}
.conv-composer.note-mode .composer-input-row textarea {
  background: #fff7ed;
  border-color: #f59e0b;
}
.conv-composer.note-mode .btn-send {
  width: 96px;
  background: #b45309;
  flex-direction: column;
  gap: 0.35rem;
}
.conv-composer.note-mode .btn-send:hover { background: #92400e; }
.conv-composer.note-mode .btn-send .send-label { display: block; }
.note-mode-btn.active {
  background: #b45309;
  border-color: #92400e;
  color: #fff;
}

.composer-template-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.composer-template-select {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  padding: 0.35rem 0.55rem;
  font-family: inherit;
  font-size: 0.78rem;
}

.composer-template-select:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}

.composer-helper-text {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
  min-height: 1em;
}

.composer-draft-status {
  min-height: 1rem;
  margin-top: 0.35rem;
  color: #6b7280;
  font-size: 0.7rem;
  text-align: right;
}

.template-manager-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2200;
}

.template-manager-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.46);
}

.template-manager-card {
  position: relative;
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.template-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.template-manager-head h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.template-manager-body {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(0, 1.05fr);
  gap: 0.8rem;
  padding: 0.9rem;
  min-height: 420px;
}

.template-manager-list-wrap,
.template-manager-form-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafaf8;
  padding: 0.75rem;
  overflow: auto;
}

.template-manager-subhead {
  font-size: 0.8rem;
  font-weight: 800;
  color: #374151;
  margin-bottom: 0.55rem;
}

.template-manager-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.template-manager-item {
  display: flex;
  gap: 0.45rem;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #dbe2da;
  border-radius: 9px;
  background: #fff;
  padding: 0.45rem;
}

.template-manager-item.active {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 2px rgba(45,106,79,.12);
}

.template-manager-item-main {
  min-width: 0;
}

.template-manager-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-manager-item-meta {
  font-size: 0.72rem;
  color: #6b7280;
}

.template-manager-item-actions {
  display: flex;
  gap: 0.35rem;
}

.template-delete-btn {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff7f7;
}

.template-delete-btn:hover {
  background: #ffecec;
  border-color: #fca5a5;
}

.template-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.template-manager-form-wrap label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.74rem;
  color: #4b5563;
  font-weight: 700;
}

.template-manager-form-wrap input,
.template-manager-form-wrap textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 0.42rem 0.56rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
}

.template-manager-form-wrap textarea {
  resize: vertical;
  min-height: 160px;
}

.template-manager-form-wrap input:focus,
.template-manager-form-wrap textarea:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}

.template-token-help {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.45;
}

.template-token-label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.template-token-btn {
  border: 1px solid #dbe2da;
  background: #fff;
  color: #1b4332;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  margin: 0.12rem 0.18rem 0.12rem 0;
  font-size: 0.68rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
}

.template-token-btn:hover,
.template-token-btn:focus-visible {
  background: #ecfdf5;
  border-color: #2d6a4f;
  outline: none;
}

.template-manager-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.45rem;
}

.template-save-btn {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}

.template-save-btn:hover {
  background: #245a42;
  border-color: #245a42;
  color: #fff;
}

.template-manager-status {
  margin-top: 0.6rem;
  font-size: 0.74rem;
  min-height: 1em;
  color: #6b7280;
}

.template-manager-status.ok {
  color: #166534;
}

.template-manager-status.error {
  color: #b91c1c;
}

.template-manager-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 0.78rem;
  padding: 1rem;
  text-align: center;
}

/* ===== VIEW PANELS (full width) ===== */
.view-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #fafaf8;
}

.view-panel-grid {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 0.75rem; color: #9ca3af;
}
.panel-placeholder h3 { font-family: 'Public Sans', sans-serif; font-weight: 700; color: #6b7280; }
.panel-placeholder p { font-size: 0.9rem; }

.panel-header {
  padding: 1.25rem 2rem 1rem; background: #fff;
  border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10;
}
.panel-header h2 { font-family: 'Public Sans', sans-serif; font-weight: 800; font-size: 1.2rem; margin-bottom: 0.25rem; }
.panel-subtitle { font-size: 0.82rem; color: #6b7280; margin-bottom: 0.6rem; }

.panel-search {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.7rem; background: #f9faf8; border: 1px solid #e5e7eb; border-radius: 8px;
}
.panel-search svg { flex-shrink: 0; color: #9ca3af; }
.panel-search input { flex: 1; border: none; background: transparent; font-size: 0.82rem; font-family: inherit; outline: none; color: #1a1a1a; }

.contacts-search {
  margin: 0 1.5rem 0.85rem;
  padding: 0.72rem 0.9rem;
  background: #ffffff;
  border: 1.5px solid #b7c7be;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.contacts-search:focus-within {
  border-color: #2d7a62;
  box-shadow: 0 0 0 3px rgba(45, 122, 98, 0.13);
}
.contacts-search svg { color: #2d7a62; }
.contacts-search input {
  font-size: 0.95rem;
  font-weight: 600;
}
.contacts-search input::placeholder {
  color: #6b7280;
  font-weight: 500;
}

/* ===== LISTING OPTIMIZER ===== */
.optimizer-shell {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.optimizer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.optimizer-header h2 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.optimizer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.optimizer-filter-bar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.optimizer-filter-btn,
.optimizer-bulk-btn,
.optimizer-generate-all-btn,
.optimizer-generate-btn,
.optimizer-inline-btn,
.optimizer-apply-btn {
  border: 1px solid #d9dfd5;
  border-radius: 999px;
  background: #fff;
  color: #355245;
  padding: 0.52rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.optimizer-filter-btn:hover,
.optimizer-bulk-btn:hover,
.optimizer-generate-all-btn:hover,
.optimizer-generate-btn:hover,
.optimizer-inline-btn:hover,
.optimizer-apply-btn:hover {
  border-color: #2d6a4f;
  color: #1b4332;
}

.optimizer-filter-btn.active {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}

.optimizer-bulk-btn,
.optimizer-generate-all-btn,
.optimizer-generate-btn {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  border-color: #1b4332;
  color: #fff;
}

.optimizer-bulk-btn:disabled,
.optimizer-generate-all-btn:disabled,
.optimizer-generate-btn:disabled,
.optimizer-inline-btn:disabled,
.optimizer-apply-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.optimizer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.optimizer-score-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 1.4rem;
}

.optimizer-score-wrap {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.optimizer-score-ring {
  --score: 0;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--ring-color) calc(var(--score) * 1%), #e8ece7 0);
}

.optimizer-score-ring.is-green { --ring-color: #2d8a57; }
.optimizer-score-ring.is-yellow { --ring-color: #d4a853; }
.optimizer-score-ring.is-red { --ring-color: #cc5b47; }

.optimizer-score-inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #edf1ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.optimizer-score-inner strong {
  font-family: 'Public Sans', sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.optimizer-score-inner span {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 700;
}

.optimizer-score-copy h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.optimizer-score-copy p {
  color: #4b5563;
  line-height: 1.5;
}

.optimizer-score-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.optimizer-metric-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #f9faf8, #f3f6f1);
  border: 1px solid #e5ebe2;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.optimizer-metric-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 700;
}

.optimizer-metric-card strong {
  font-family: 'Public Sans', sans-serif;
  font-size: 1.35rem;
}

.optimizer-categories {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.optimizer-category {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}

.optimizer-category-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  background: linear-gradient(180deg, #fcfcfa, #f6f7f3);
}

.optimizer-category-summary::-webkit-details-marker {
  display: none;
}

.optimizer-category-summary h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.optimizer-category-summary p,
.optimizer-category-score {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
}

.optimizer-fields {
  display: flex;
  flex-direction: column;
}

.optimizer-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.optimizer-btn-generate {
  background: #2d6a4f;
  color: #fff;
}

.optimizer-btn-generate:hover {
  background: #1b4332;
}

.optimizer-btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.optimizer-btn-clear {
  background: #f3f4f6;
  color: #4b5563;
}

.optimizer-btn-clear:hover {
  background: #e5e7eb;
}

.optimizer-btn-apply {
  background: #d97706;
  color: #fff;
}

.optimizer-btn-apply:hover {
  background: #b45309;
}

.opt-editor-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  overflow-y: auto;
}

.opt-editor-panel.open {
  right: 0;
}

.opt-editor-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.opt-editor-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
}

.opt-editor-close:hover {
  color: #1a1a1a;
}

.opt-editor-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}

.opt-editor-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.8rem;
  color: #6b7280;
}

.opt-editor-nav button {
  background: #f3f4f6;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}

.opt-editor-nav button:hover {
  background: #e5e7eb;
}

.opt-editor-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.opt-editor-input-container {
  flex: 1;
  margin: 1rem 1.25rem 0.5rem 1.25rem;
}

.opt-editor-textarea,
.opt-editor-input,
.opt-editor-readonly-wrap {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
  resize: vertical;
  min-height: 200px;
  box-sizing: border-box;
  width: 100%;
}

.opt-editor-input {
  min-height: 48px;
}

.opt-editor-select {
  appearance: none;
  cursor: pointer;
}

.opt-editor-textarea:focus,
.opt-editor-input:focus {
  outline: none;
  border-color: #2d6a4f;
  background: #fff;
}

.opt-editor-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.opt-editor-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #4b5563;
  font-size: 0.83rem;
}

.opt-editor-toggle-copy strong {
  color: #111827;
  font-size: 0.95rem;
}

.opt-editor-toggle {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
}

.opt-editor-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.opt-editor-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d1d5db;
  transition: background 0.2s ease;
}

.opt-editor-toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.opt-editor-toggle input:checked + .opt-editor-toggle-slider {
  background: #2d6a4f;
}

.opt-editor-toggle input:checked + .opt-editor-toggle-slider::before {
  transform: translateX(22px);
}

.opt-editor-readonly-wrap {
  min-height: 140px;
  background: #f8fafc;
}

.opt-editor-readonly-label {
  display: inline-flex;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opt-editor-readonly-value {
  color: #1f2937;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.opt-editor-readonly-empty {
  color: #9ca3af;
  font-style: italic;
}

.property-pill-link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.property-pill-link:hover {
  background: #334155;
}

.amenity-group-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.amenity-group-chevron {
  display: inline-block;
  transition: transform 0.15s;
  font-size: 12px;
  color: #94a3b8;
}

.amenity-group.is-collapsed .amenity-group-chevron {
  transform: rotate(-90deg);
}

.amenity-group.is-collapsed .amenity-group-grid {
  display: none;
}

.amenity-group.is-complete .amenity-group-header {
  color: #86efac;
}

.amenity-edit-hint {
  padding: 8px 12px;
  margin: 8px 0 12px;
  background: #1e3a5f;
  border: 1px solid #2563eb;
  border-radius: 6px;
  color: #93c5fd;
  font-size: 13px;
  text-align: center;
}

.opt-editor-link-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: #1e40af;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}
.opt-editor-link-btn:hover {
  background: #1d4ed8;
}

.opt-editor-meta {
  display: flex;
  justify-content: space-between;
  padding: 0 1.25rem 0.5rem 1.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.opt-char-limit {
  font-weight: 600;
}

.opt-char-over {
  color: #dc2626;
}

.opt-editor-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.opt-editor-status {
  padding: 0 1.25rem 0.75rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.opt-field-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-top: 1px solid #f3f4f6;
  transition: background 0.1s, border-left-color 0.1s;
  min-width: 0;
}

.opt-field-row:hover {
  background: #f9fafb;
}

.opt-field-row.active {
  background: #ecfdf5;
  border-left: 3px solid #2d6a4f;
  padding-left: calc(0.75rem - 3px);
}

.opt-field-status {
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.opt-field-status.filled {
  color: #16a34a;
}

.opt-field-status.empty {
  color: #dc2626;
}

.opt-field-label {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 140px;
  white-space: nowrap;
  flex-shrink: 0;
}

.opt-field-impact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.opt-field-preview {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opt-field-preview.is-empty {
  color: #dc2626;
  font-style: italic;
}

.opt-field-preview.is-amenity {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.opt-field-preview-text {
  min-width: 0;
}

.amenity-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.amenity-score-badge.tone-good {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

.amenity-score-badge.tone-mid {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(234, 179, 8, 0.16);
  color: #fde68a;
}

.amenity-score-badge.tone-low {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.amenity-grid-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #334155;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 32%),
    linear-gradient(180deg, #1e293b, #0f172a);
  color: #e2e8f0;
}

.amenity-score-bar {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.9);
  min-height: 48px;
}

.amenity-score-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444 0%, #facc15 55%, #22c55e 100%);
}

.amenity-score-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.95rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.amenity-missing-alert {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 146, 60, 0.3);
  background: linear-gradient(180deg, rgba(124, 45, 18, 0.32), rgba(69, 26, 3, 0.2));
}

.amenity-missing-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fdba74;
  margin-bottom: 0.7rem;
}

.amenity-missing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.amenity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.amenity-chip-missing {
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

.amenity-groups {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.amenity-group {
  border: 1px solid #334155;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.52);
  overflow: hidden;
}

.amenity-group-header {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
  font-size: 0.86rem;
  font-weight: 800;
  color: #f8fafc;
}

.amenity-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.9rem;
}

.amenity-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #334155;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
}

.amenity-toggle input {
  margin: 0;
  accent-color: #22c55e;
}

.amenity-toggle.is-present {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(20, 83, 45, 0.25);
  color: #dcfce7;
}

.amenity-toggle.is-missing {
  background: rgba(30, 41, 59, 0.78);
  color: #94a3b8;
}

.amenity-toggle-label {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.amenity-toggle-impact {
  color: #facc15;
  font-size: 0.88rem;
}

.opt-impact-high {
  background: #fce9e5;
  color: #dc2626;
}

.opt-impact-medium {
  background: #fff6dc;
  color: #d97706;
}

.opt-impact-low {
  background: #f1f3f4;
  color: #6b7280;
}

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem; padding: 1.25rem 2rem;
}

/* Property + Contact Cards */
.prop-card, .contact-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 1.1rem; transition: box-shadow 0.2s; cursor: pointer;
}
.prop-card:hover, .contact-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.prop-card h3, .contact-card h3 {
  font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 0.95rem;
  margin-bottom: 0.4rem; color: #1a1a1a;
}

.prop-stats, .contact-stats { display: flex; gap: 1rem; margin-bottom: 0.6rem; }
.prop-stat, .contact-stat { display: flex; flex-direction: column; align-items: center; }
.prop-stat-num, .contact-stat-num { font-family: 'Public Sans', sans-serif; font-weight: 800; font-size: 1.15rem; color: #2d6a4f; }
.prop-stat-label, .contact-stat-label { font-size: 0.65rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.prop-meta, .contact-meta { font-size: 0.78rem; color: #6b7280; line-height: 1.5; }
.prop-meta span, .contact-meta span { display: inline-block; margin-right: 0.65rem; }

.contact-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0;
}
.contact-card-top { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.6rem; }
.contact-card-top h3 { margin-bottom: 0; }
.contact-threads { margin-top: 0.4rem; }
.contact-thread-item {
  display: flex; justify-content: space-between;
  padding: 0.3rem 0; border-bottom: 1px solid #f5f5f0;
  font-size: 0.78rem; color: #374151;
}
.contact-thread-item:last-child { border-bottom: none; }
.contact-thread-dates { color: #9ca3af; font-size: 0.72rem; }

/* City Groups */
.city-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  grid-column: 1 / -1;
}

.city-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #fafaf8;
  border-bottom: 1px solid #e5e7eb;
}

.city-header-left h3 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.1rem;
}

.city-region {
  font-size: 0.75rem;
  color: #9ca3af;
}

.city-assign-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s;
}
.city-assign-btn:hover { border-color: #2d6a4f; color: #2d6a4f; }
.city-assign-btn.assigned { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.city-assign-btn.partial { background: #fffbeb; color: #d97706; border-color: #fde68a; }

.city-properties {
  padding: 0;
}

.prop-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid #f5f5f0;
  transition: background 0.1s;
}
.prop-row:last-child { border-bottom: none; }
.prop-row:hover { background: #fafaf8; }
.prop-row.prop-assigned { border-left: 3px solid #2d6a4f; }

.prop-row-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1a1a1a;
}

.prop-row-full {
  font-weight: 400;
  color: #9ca3af;
  font-size: 0.78rem;
  margin-left: 0.5rem;
}

.prop-row-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #6b7280;
  margin-right: 0.75rem;
}

.prop-row-inactive {
  color: #d1d5db;
  font-style: italic;
}

.prop-assign-btn-sm {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.prop-assign-btn-sm:hover { border-color: #2d6a4f; color: #2d6a4f; }
.prop-assign-btn-sm.assigned { background: #ecfdf5; border-color: #a7f3d0; }

/* Property Assign Button */
.prop-assign-btn {
  padding: 0.3rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.prop-assign-btn:hover { border-color: #2d6a4f; color: #2d6a4f; }
.prop-assign-btn.assigned { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.prop-card.prop-assigned { border-left: 3px solid #2d6a4f; }

.property-marker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #fbfdfb;
}

.property-marker-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.property-marker-users {
  display: block;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #1f2937;
}

.prop-marker-user-btn {
  padding: 0.3rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.prop-marker-user-btn:hover {
  border-color: #2d6a4f;
  color: #2d6a4f;
}

.property-search {
  max-width: 360px;
  position: relative;
  padding-right: 0.35rem;
}

.property-search input {
  padding-right: 2rem;
}

.property-search-clear {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #eef2ed;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.property-search-clear:hover {
  background: #dfe7dc;
  color: #1b4332;
}

.property-search-clear[hidden] {
  display: none;
}

.property-filter-bella-btn {
  min-height: 38px;
  border: 1px solid #1b4332;
  border-radius: 8px;
  background: #1b4332;
  color: #fff;
  padding: 0.45rem 0.78rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.property-filter-bella-btn:hover {
  background: #153426;
}

.property-bella-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cfe2d2;
  border-radius: 8px;
  background: #f4fbf5;
  color: #1f2937;
}

.property-bella-filter-bar[hidden] {
  display: none;
}

.property-bella-filter-bar div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.property-bella-filter-bar strong {
  color: #14532d;
  font-size: 0.82rem;
}

.property-bella-filter-bar span {
  color: #374151;
  font-size: 0.84rem;
}

.property-bella-filter-bar em {
  color: #6b7280;
  font-size: 0.78rem;
  font-style: normal;
}

.property-bella-filter-bar button {
  min-height: 30px;
  border: 1px solid #b7d6bd;
  border-radius: 6px;
  background: #fff;
  color: #166534;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.property-bella-filter-bar button:hover {
  border-color: #166534;
}

.properties-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
}

.properties-view-toggle button {
  min-width: 68px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  padding: 0.42rem 0.62rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.properties-view-toggle button.active {
  background: #1b4332;
  color: #fff;
}

.property-quick-filters {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.property-quick-filters button {
  min-height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  padding: 0.34rem 0.58rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.property-quick-filters button.active {
  border-color: #1b4332;
  background: #edf7f2;
  color: #1b4332;
}

.prop-card-modern {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.prop-card-hero {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(212,168,83,0.22), transparent 34%),
    linear-gradient(135deg, #f7f2e6, #ffffff 68%);
  border-bottom: 1px solid #f0ede4;
  position: relative;
}

.prop-photo-placeholder,
.property-detail-photo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1b4332, #2d6a4f);
  color: #fff;
  font-size: 2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.3s ease;
}

.property-image-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.4rem 1rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.prop-strip-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.prop-strip-thumb:hover { opacity: 0.9; }
.prop-strip-thumb.active { opacity: 1; border-color: #1b4332; }

.prop-hero-copy {
  min-width: 0;
  flex: 1;
}

.property-detail-badges {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.prop-channel-badge,
.property-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(27,67,50,0.08);
  color: #1b4332;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.prop-listing-id {
  font-size: 0.72rem;
  color: #6b7280;
}

.prop-card-modern h3 {
  margin: 0 0 0.18rem;
  font-size: 1.04rem;
  line-height: 1.2;
  color: #111827;
}

.prop-display-name {
  margin: 0 0 0.35rem;
  color: #374151;
  font-weight: 700;
  line-height: 1.25;
}

.prop-address,
.property-detail-main p,
.property-description {
  color: #4b5563;
  line-height: 1.5;
}

.prop-sync-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.prop-card-hero .prop-sync-pill {
  align-self: flex-start;
}

.prop-sync-pill.active,
.property-pill-active {
  background: #dcfce7;
  color: #166534;
}

.prop-sync-pill.inactive,
.property-pill-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.property-card-scan-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.55rem;
  padding: 0.8rem 1.2rem 0;
}

.property-card-chip-group {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  flex-wrap: wrap;
}

.property-mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  padding: 0.18rem 0.44rem;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.property-mini-chip.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.property-mini-chip.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.property-mini-chip.muted {
  background: #f3f4f6;
  color: #6b7280;
}

.prop-card-modern.prop-sync-inactive {
  opacity: 0.82;
}

.properties-line-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.properties-line-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: 0.86rem;
}

.properties-line-table th,
.properties-line-table td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #edf1ea;
  text-align: left;
  vertical-align: middle;
}

.properties-line-table th {
  color: #6b7280;
  background: #f8faf7;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.properties-line-table tr {
  cursor: pointer;
}

.properties-line-table tbody tr:hover {
  background: #fbfdfb;
}

.properties-line-table td small {
  display: block;
  margin-top: 0.16rem;
  max-width: 220px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-line-inactive {
  color: #6b7280;
  background: #fffafa;
}

.prop-stats-grid,
.property-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.2rem 1.2rem;
}

.prop-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #f8faf7;
  border: 1px solid #edf1ea;
}

.prop-stat-icon {
  font-size: 1rem;
}

.prop-stat-card-label,
.property-info-label {
  font-size: 0.68rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.prop-stat-card-value,
.property-info-value,
.property-booking-guest,
.pricing-rule-name {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  color: #1a1a1a;
}

#propertyDetail {
  padding: 1.25rem 2rem 2rem;
}

.property-detail-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.property-back-btn {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  background: #1b4332;
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.property-detail-hero {
  display: flex;
  gap: 1.2rem;
  padding: 1.4rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(212,168,83,0.2), transparent 30%),
    linear-gradient(135deg, #f7f2e6, #ffffff 68%);
  border: 1px solid #ece7da;
  align-items: flex-start;
}

.property-active-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.property-active-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.property-active-switch span {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  transition: background 0.16s ease;
  flex-shrink: 0;
}

.property-active-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: transform 0.16s ease;
}

.property-active-switch input:checked + span {
  background: #16a34a;
}

.property-active-switch input:checked + span::after {
  transform: translateX(20px);
}

.property-detail-main h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.property-display-title {
  margin: -0.1rem 0 0.15rem;
  color: #374151;
  font-weight: 800;
}

.property-detail-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.property-detail-actions button {
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: #1b4332;
  padding: 0.38rem 0.58rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.property-workspace-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.72rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.property-workspace-score {
  min-width: 82px;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  padding: 0.45rem 0.65rem;
  text-align: center;
}

.property-workspace-score strong {
  display: block;
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.05rem;
}

.property-workspace-score span {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.property-workspace-score.ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.property-workspace-score.watch {
  border-color: #fde68a;
  background: #fffbeb;
}

.property-workspace-score.blocked {
  border-color: #fecaca;
  background: #fff1f2;
}

.property-workspace-nav-buttons {
  display: flex;
  gap: 0.38rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
}

.property-workspace-nav button {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  padding: 0.42rem 0.62rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.property-workspace-nav button.active,
.property-workspace-nav button:hover {
  border-color: #1b4332;
  background: #edf7f2;
  color: #1b4332;
}

.property-workspace-health {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1.2fr) minmax(180px, 0.8fr);
  gap: 0.9rem;
  align-items: stretch;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 1rem;
  scroll-margin-top: 96px;
}

.property-workspace-health.ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.property-workspace-health.watch {
  border-color: #fde68a;
  background: #fffbeb;
}

.property-workspace-health.blocked {
  border-color: #fecaca;
  background: #fff1f2;
}

.property-workspace-eyebrow,
.property-workspace-section-heading span,
.property-workspace-settlement span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.property-workspace-health-main strong {
  display: block;
  margin: 0.18rem 0;
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.28rem;
}

.property-workspace-health-main p {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}

.property-workspace-health-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-content: flex-start;
}

.property-workspace-health-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  padding: 0.28rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.property-workspace-settlement {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.7rem;
}

.property-workspace-settlement strong {
  display: block;
  margin: 0.28rem 0 0.18rem;
  color: #111827;
  line-height: 1.25;
}

.property-workspace-settlement em {
  color: #64748b;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
  text-transform: capitalize;
}

.property-workspace-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.25rem;
  scroll-margin-top: 96px;
}

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

.property-workspace-section-heading {
  grid-column: 1 / -1;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.25rem 0 0.65rem;
}

.property-workspace-section-heading h3 {
  margin: 0.12rem 0 0;
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.08rem;
}

.property-workspace-section-heading p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.property-settlement-summary-card .property-muted {
  display: block;
  margin-top: 0.75rem;
  line-height: 1.45;
}

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

.property-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.property-optimizer-section {
  grid-column: 1 / -1;
}

.property-account-bridge-section {
  grid-column: 1 / -1;
}

.property-status-checklist {
  grid-column: 1 / -1;
}

.property-checklist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.property-check-row {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 0.65rem 0.72rem;
}

.property-check-row.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.property-check-row.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.property-check-row span {
  display: block;
  margin-bottom: 0.25rem;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.property-check-row strong {
  display: block;
  color: #111827;
  font-size: 0.84rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.property-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.1rem 1.15rem;
}

.property-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.property-section-head h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1rem;
}

.optimizer-filter-bar-inline {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.property-section-head span,
.property-booking-dates,
.pricing-rule-meta,
.property-muted,
.property-empty {
  color: #6b7280;
  font-size: 0.82rem;
}

.property-booking-list,
.pricing-rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.property-booking-item,
.pricing-rule-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #f9faf8;
  border: 1px solid #edf1ea;
}

.property-booking-meta,
.pricing-rule-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  text-align: right;
}

.property-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.property-info-item {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #f9faf8;
  border: 1px solid #edf1ea;
}

.property-amenities,
.property-channel-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.property-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  background: #eef4ee;
  color: #1b4332;
  font-size: 0.76rem;
  font-weight: 700;
}

.property-account-bridge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.property-account-bridge-card {
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.9rem;
}

.property-account-bridge-card.is-new {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.property-account-bridge-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.property-account-bridge-top strong,
.property-account-bridge-top span {
  display: block;
}

.property-account-bridge-top strong {
  color: #111827;
  font-size: 0.94rem;
}

.property-account-bridge-top span {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.property-account-bridge-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 0.25rem 0.5rem;
  text-transform: uppercase;
}

.property-account-bridge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.property-account-bridge-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.5rem;
}

.property-account-bridge-card p {
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: 0.65rem;
}

/* ===== ONBOARDING ===== */
.onboarding-header {
  padding: 1.25rem 2rem 1rem; background: #fff;
  border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10;
}
.onboarding-header h2 { font-family: 'Public Sans', sans-serif; font-weight: 800; font-size: 1.2rem; margin-bottom: 0.6rem; }

.onboarding-stats { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.stat-pill { display: flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.65rem; border-radius: 8px; font-size: 0.78rem; font-weight: 600; }
.stat-pill .stat-num { font-family: 'Public Sans', sans-serif; font-weight: 800; font-size: 0.95rem; }
.stat-ready { background: #ecfdf5; color: #059669; }
.stat-pending { background: #fffbeb; color: #d97706; }
.stat-created { background: #eff6ff; color: #2563eb; }

.onboarding-filters { display: flex; gap: 0.3rem; margin-bottom: 0.6rem; }
.ob-filter {
  padding: 0.25rem 0.65rem; border: 1px solid #e5e7eb; border-radius: 20px;
  background: #fff; font-family: inherit; font-size: 0.75rem; font-weight: 600;
  color: #6b7280; cursor: pointer; transition: all 0.15s;
}
.ob-filter:hover { border-color: #2d6a4f; color: #2d6a4f; }
.ob-filter.active { background: #2d6a4f; color: #fff; border-color: #2d6a4f; }

.onboarding-search {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.7rem; background: #f9faf8; border: 1px solid #e5e7eb; border-radius: 8px;
}
.onboarding-search svg { flex-shrink: 0; color: #9ca3af; }
.onboarding-search input { flex: 1; border: none; background: transparent; font-size: 0.82rem; font-family: inherit; outline: none; color: #1a1a1a; }

.owner-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem; padding: 1.25rem 2rem;
}

.owner-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.owner-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.owner-card.ready { border-left: 3px solid #059669; }
.owner-card.pending { border-left: 3px solid #d97706; }
.owner-card.created { border-left: 3px solid #2563eb; }

.oc-header { padding: 0.9rem 1.1rem; border-bottom: 1px solid #f0f0ec; display: flex; justify-content: space-between; align-items: center; }
.oc-header h3 { font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 0.95rem; color: #1a1a1a; }
.oc-status { padding: 0.18rem 0.5rem; border-radius: 6px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.oc-status.ready { background: #ecfdf5; color: #059669; }
.oc-status.pending { background: #fffbeb; color: #d97706; }
.oc-status.created { background: #eff6ff; color: #2563eb; }

.oc-progress { height: 3px; background: #f0f0ec; margin-top: 0.4rem; border-radius: 2px; overflow: hidden; }
.oc-progress-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }
.oc-progress-fill.low { background: #ef4444; width: 25%; }
.oc-progress-fill.mid { background: #d97706; width: 50%; }
.oc-progress-fill.high { background: #059669; width: 75%; }
.oc-progress-fill.done { background: #059669; width: 100%; }

.oc-body { padding: 0.65rem 1.1rem; }
.oc-field { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid #f9faf8; }
.oc-field:last-child { border-bottom: none; }
.oc-field-label { font-size: 0.7rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; }
.oc-field-value { font-size: 0.82rem; color: #374151; display: flex; align-items: center; gap: 0.35rem; }
.oc-field-value .oc-copy { background: #f3f4f6; border: none; color: #9ca3af; cursor: pointer; padding: 0.18rem 0.45rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; transition: all 0.15s; }
.oc-field-value .oc-copy:hover { background: #2d6a4f; color: #fff; }
.oc-field-value .oc-copy.copied { background: #059669; color: #fff; }
.oc-sensitive { filter: blur(4px); transition: filter 0.2s; cursor: pointer; user-select: none; }
.oc-sensitive:hover, .oc-sensitive.revealed { filter: none; }
.oc-not-submitted { font-size: 0.78rem; color: #d97706; }
.oc-actions { padding: 0.65rem 1.1rem; border-top: 1px solid #f0f0ec; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.oc-btn { padding: 0.4rem 0.75rem; border-radius: 6px; border: none; cursor: pointer; font-size: 0.75rem; font-weight: 600; font-family: inherit; transition: all 0.15s; }
.oc-btn-airbnb { background: #FF5A5F; color: #fff; }
.oc-btn-airbnb:hover { background: #e04e52; }
.oc-btn-vrbo { background: #3B5FC0; color: #fff; }
.oc-btn-vrbo:hover { background: #2f4fa3; }
.oc-btn-done { background: #059669; color: #fff; }
.oc-btn-done:hover { background: #047857; }

/* ===== Review Actions ===== */
.review-actions { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.2rem 0; }
.review-label { font-size: 0.82rem; font-weight: 600; color: #d97706; margin-bottom: 0.2rem; }
.btn-suggest-review, .btn-airbnb-review { padding: 0.6rem 0.9rem; border: none; border-radius: 8px; font-family: 'Public Sans', sans-serif; font-weight: 600; font-size: 0.82rem; cursor: pointer; text-align: center; text-decoration: none; transition: all 0.15s; }
.btn-suggest-review { background: #2d6a4f; color: #fff; }
.btn-suggest-review:hover { background: #245a42; }
.btn-suggest-review:disabled { opacity: 0.6; cursor: wait; }
.btn-airbnb-review { background: #FF5A5F; color: #fff; display: inline-block; }
.btn-airbnb-review:hover { background: #e04e52; }
.review-suggestion { background: #f0f7f4; border: 1px solid #a7f3d0; border-radius: 10px; padding: 0.9rem; margin-top: 0.2rem; }
.review-text { font-size: 0.85rem; line-height: 1.5; color: #1a1a1a; margin-bottom: 0.4rem; }
.review-meta { font-size: 0.7rem; color: #059669; margin-bottom: 0.4rem; }
.btn-copy-review { padding: 0.35rem 0.65rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-copy-review:hover { border-color: #2d6a4f; color: #2d6a4f; }

/* ===== Bella Gap-Fill Review (DEV) ===== */
.gapfill-shell { max-width: 1180px; margin: 0 auto; padding: 1.5rem 2rem 3rem; }
.gapfill-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.gapfill-header h2 { margin: 0 0 0.25rem; color: #173d32; }
.gapfill-property-filter { display: grid; gap: 0.3rem; min-width: 230px; color: #64748b; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.gapfill-property-filter input { border: 1px solid #cbd5e1; border-radius: 8px; padding: 0.6rem 0.7rem; font: inherit; text-transform: none; }
.gapfill-safety-note { margin-bottom: 1rem; padding: 0.8rem 1rem; border: 1px solid #f5d68a; border-radius: 10px; background: #fffbeb; color: #7c5a12; font-size: 0.85rem; }
.gapfill-candidate-list { display: grid; gap: 1rem; }
.gapfill-card { padding: 1.1rem 1.2rem; border: 1px solid #dbe5e0; border-left: 4px solid #2d6a4f; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(23,61,50,.05); }
.gapfill-card.conflict { border-left-color: #dc2626; background: #fffdfd; }
.gapfill-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.gapfill-type-badge, .gapfill-status { display: inline-flex; border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.67rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.gapfill-type-badge.gap-fill { background: #dcfce7; color: #166534; }
.gapfill-type-badge.conflict { background: #fee2e2; color: #991b1b; }
.gapfill-status { background: #fef3c7; color: #92400e; }
.gapfill-property { margin-left: 0.45rem; color: #475569; font-size: 0.78rem; font-weight: 700; }
.gapfill-card h3 { margin: 0.9rem 0; color: #172b24; font-size: 1rem; }
.gapfill-answer-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.gapfill-answer-compare > div, .gapfill-answer-single { padding: 0.8rem; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; }
.gapfill-answer-compare > div:first-child { background: #fff7f7; border-color: #fecaca; }
.gapfill-answer-compare span, .gapfill-answer-single span { color: #64748b; font-size: 0.68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.gapfill-answer-compare p, .gapfill-answer-single p { margin: 0.4rem 0 0; color: #1e293b; line-height: 1.45; white-space: pre-wrap; }
.gapfill-meta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.8rem; color: #64748b; font-size: 0.72rem; }
.gapfill-sources { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }
.gapfill-source-chip { padding: 0.2rem 0.5rem; border-radius: 6px; background: #eef2f6; color: #475569; font-family: ui-monospace, monospace; font-size: 0.68rem; }
.gapfill-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 1rem; }
.gapfill-action { border: 1px solid #cbd5e1; border-radius: 8px; padding: 0.5rem 0.75rem; background: #fff; color: #334155; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.gapfill-action.primary { border-color: #2d6a4f; background: #2d6a4f; color: #fff; }
.gapfill-action:disabled { opacity: .55; cursor: wait; }
.gapfill-card-message { min-height: 1.1rem; margin-top: 0.55rem; color: #475569; font-size: 0.75rem; }
@media (max-width: 760px) {
  .gapfill-shell { padding: 1rem; }
  .gapfill-header { align-items: stretch; flex-direction: column; }
  .gapfill-answer-compare { grid-template-columns: 1fr; }
}

/* ===== MARCEL CHAT BUBBLE ===== */
.chat-bubble-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1b4332;
  color: #fff;
  padding: 0.7rem 1.1rem 0.7rem 0.7rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 1000;
}

.chat-bubble-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(0,0,0,0.25);
}

.chat-bubble-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d4a853;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-bubble-label {
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Chat Window */
.chat-window {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  transition: all 0.25s ease;
}

.chat-window.chat-expanded {
  width: min(700px, calc(100vw - 3rem));
  height: min(85vh, 800px);
  bottom: 1rem;
  right: 1rem;
}

.chat-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #1b4332;
  color: #fff;
  flex-shrink: 0;
}

.chat-window-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-window-avatar {
  font-size: 1.4rem;
}

.chat-window-name {
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.chat-window-status {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.6);
}

.chat-window-controls {
  display: flex;
  gap: 0.25rem;
}

.chat-resize, .chat-minimize {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.chat-resize:hover, .chat-minimize:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Chat Messages */
.chat-window-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #fafaf8;
}

.chat-msg {
  max-width: 85%;
}

.chat-msg-marcel {
  align-self: flex-start;
}

.chat-msg-user {
  align-self: flex-end;
}

.chat-msg-text {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-msg-marcel .chat-msg-text {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
  color: #1a1a1a;
}

.chat-msg-user .chat-msg-text {
  background: #2d6a4f;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-system {
  align-self: center;
}

.chat-msg-system .chat-msg-text {
  background: transparent;
  color: #9ca3af;
  font-size: 0.75rem;
  font-style: italic;
  padding: 0.3rem;
}

.chat-typing {
  display: inline-block;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.82rem;
}

.chat-msg-temp {
  opacity: 0.7;
}

/* Chat Input */
.chat-window-input {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  align-items: flex-end;
}

.chat-window-input textarea {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  min-height: 38px;
  max-height: 100px;
  outline: none;
  background: #fafaf8;
  transition: border-color 0.2s;
}

.chat-window-input textarea:focus {
  border-color: #2d6a4f;
}

.chat-send {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #1b4332;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-send:hover { background: #2d6a4f; }

/* ===== TASKS (Asana-style) ===== */
.tasks-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tasks-sidebar {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 1rem 0;
  overflow-y: auto;
}

.tasks-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1rem;
}

.tasks-sidebar-header h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.tasks-add-section {
  background: none; border: none; color: #9ca3af;
  font-size: 1.1rem; cursor: pointer; padding: 0 0.3rem;
}
.tasks-add-section:hover { color: #2d6a4f; }

.tasks-sidebar-nav { display: flex; flex-direction: column; }

.tasks-nav-item {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  color: #374151;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s;
  text-decoration: none;
}
.tasks-nav-item:hover { background: #f9faf8; }
.tasks-nav-item.active {
  background: #f0f7f4;
  border-left-color: #2d6a4f;
  color: #2d6a4f;
  font-weight: 600;
}

/* Tasks Main */
.tasks-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tasks-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.tasks-toolbar h2 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}

.tasks-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tasks-search {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem; background: #f9faf8;
  border: 1px solid #e5e7eb; border-radius: 6px;
}
.tasks-search input {
  border: none; background: transparent; font-size: 0.8rem;
  font-family: inherit; outline: none; width: 140px;
}

.tasks-sort {
  padding: 0.35rem 0.5rem; border: 1px solid #e5e7eb;
  border-radius: 6px; font-size: 0.78rem; font-family: inherit;
  background: #fff; color: #374151; cursor: pointer;
}

.tasks-add-btn {
  padding: 0.4rem 0.9rem; background: #2d6a4f; color: #fff;
  border: none; border-radius: 6px; font-family: 'Public Sans', sans-serif;
  font-weight: 600; font-size: 0.82rem; cursor: pointer;
  transition: background 0.15s;
}
.tasks-add-btn:hover { background: #245a42; }

/* Task List Header */
.tasks-list-header {
  display: grid;
  grid-template-columns: 36px 1fr 130px 100px 90px 110px;
  padding: 0.45rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e5e7eb;
  background: #fafaf8;
  flex-shrink: 0;
}

/* Task Rows */
.tasks-list {
  flex: 1;
  overflow-y: auto;
}

.task-row {
  display: grid;
  grid-template-columns: 36px 1fr 130px 100px 90px 110px;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid #f5f5f0;
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.85rem;
}
.task-row:hover { background: #fafaf8; }
.task-row.task-selected { background: #f0f7f4; }
.task-row.task-completed { opacity: 0.5; }
.task-row.task-completed .task-title-text { text-decoration: line-through; }

.task-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #d1d5db; background: #fff;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 0.65rem; color: #fff;
  transition: all 0.15s;
}
.task-check:hover { border-color: #2d6a4f; }
.task-check.checked { background: #2d6a4f; border-color: #2d6a4f; }
.task-check.sm { width: 16px; height: 16px; font-size: 0.55rem; }

.task-col-name { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.task-title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-subtask-count { font-size: 0.68rem; color: #9ca3af; background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; flex-shrink: 0; }

.task-col-assignee { display: flex; align-items: center; gap: 0.35rem; }
.task-avatar-sm {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 700; color: #fff;
}
.task-assignee-name { font-size: 0.8rem; color: #374151; }
.task-unassigned { color: #d1d5db; font-size: 0.8rem; }

.task-col-due { font-size: 0.8rem; color: #6b7280; }
.task-col-due.task-overdue { color: #dc2626; font-weight: 600; }

.priority-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 0.25rem;
}
.priority-urgent { background: #dc2626; }
.priority-high { background: #f59e0b; }
.priority-medium { background: #3b82f6; }
.priority-low { background: #9ca3af; }
.priority-none { background: transparent; }

.task-col-priority { font-size: 0.78rem; color: #6b7280; text-transform: capitalize; }
.task-col-section { font-size: 0.75rem; }
.task-section-tag { background: #f3f4f6; padding: 0.15rem 0.4rem; border-radius: 4px; color: #6b7280; font-size: 0.72rem; }

.tasks-empty {
  padding: 3rem; text-align: center; color: #9ca3af;
  font-size: 0.9rem;
}

/* Task Detail Panel */
.task-detail {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 420px; background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 20px rgba(0,0,0,0.06);
  display: flex; flex-direction: column;
  z-index: 20;
  overflow-y: auto;
}

.task-detail-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; border-bottom: 1px solid #f0f0ec;
  flex-shrink: 0;
}

.task-detail-close {
  background: none; border: none; font-size: 1.4rem;
  color: #9ca3af; cursor: pointer; padding: 0 0.3rem;
}
.task-detail-close:hover { color: #1a1a1a; }

.task-detail-action {
  background: none; border: none; font-size: 1rem;
  cursor: pointer; padding: 0.2rem;
}

.task-detail-body { padding: 1rem; flex: 1; }

.task-detail-title {
  width: 100%; border: none; font-family: 'Public Sans', sans-serif;
  font-weight: 700; font-size: 1.15rem; padding: 0.3rem 0;
  outline: none; border-bottom: 2px solid transparent;
  margin-bottom: 1rem;
}
.task-detail-title:focus { border-bottom-color: #2d6a4f; }

.task-detail-fields { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }

.task-field { display: flex; align-items: center; gap: 0.5rem; }
.task-field label {
  font-size: 0.72rem; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.04em;
  min-width: 70px;
}
.task-field select, .task-field input[type=date] {
  flex: 1; padding: 0.35rem 0.5rem; border: 1px solid #e5e7eb;
  border-radius: 6px; font-size: 0.82rem; font-family: inherit;
  background: #fff; color: #374151;
}

.task-detail-desc { margin-bottom: 1.25rem; }
.task-detail-desc label, .task-detail-subtasks label, .task-detail-comments label {
  display: block; font-size: 0.72rem; font-weight: 700;
  color: #9ca3af; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 0.4rem;
}
.task-detail-desc textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 0.6rem; font-family: inherit; font-size: 0.85rem;
  resize: vertical; outline: none;
}
.task-detail-desc textarea:focus { border-color: #2d6a4f; }

.task-detail-subtasks { margin-bottom: 1.25rem; }
.subtask-row {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0;
}
.subtask-row input {
  flex: 1; border: none; border-bottom: 1px solid #f0f0ec;
  padding: 0.25rem 0; font-size: 0.85rem; font-family: inherit;
  outline: none;
}
.subtask-row input.subtask-done { text-decoration: line-through; color: #9ca3af; }
.subtask-delete {
  background: none; border: none; color: #d1d5db;
  font-size: 1rem; cursor: pointer; padding: 0 0.2rem;
}
.subtask-delete:hover { color: #dc2626; }
.task-add-subtask {
  background: none; border: none; color: #2d6a4f;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  padding: 0.3rem 0;
}
.task-add-subtask:hover { text-decoration: underline; }

.task-detail-comments { margin-bottom: 1rem; }
.task-comment {
  padding: 0.5rem 0; border-bottom: 1px solid #f5f5f0;
}
.task-comment-author { font-weight: 700; font-size: 0.8rem; color: #374151; }
.task-comment-time { font-size: 0.7rem; color: #9ca3af; margin-left: 0.4rem; }
.task-comment-text { font-size: 0.85rem; color: #374151; margin-top: 0.2rem; }
.task-comment-input { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.task-comment-input textarea {
  flex: 1; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0.4rem 0.6rem; font-size: 0.82rem; font-family: inherit;
  resize: none; outline: none;
}
.task-comment-input button {
  padding: 0.4rem 0.75rem; background: #2d6a4f; color: #fff;
  border: none; border-radius: 6px; font-size: 0.78rem;
  font-weight: 600; cursor: pointer;
}

/* Make tasks-main position relative for the detail panel */
.tasks-layout { position: relative; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== Mobile ===== */
@media (max-width: 1024px) {
  .view-inbox.view-active { grid-template-columns: 280px 1fr; }
  .brand-name { display: none; }
  .tab { padding: 0.4rem 0.75rem; font-size: 0.72rem; }
}

@media (max-width: 768px) {
  .view-inbox.view-active { grid-template-columns: 1fr; }
  .conversation { display: none; }
  .tab-bar { overflow-x: auto; }
  .tab { font-size: 0.7rem; padding: 0.35rem 0.6rem; }
}

/* ===== TURNOVERS VIEW ===== */
.turnovers-container { padding: 1.25rem; height: 100%; overflow: auto; }
.turnovers-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.turnovers-header h2 { font-size: 1.1rem; font-weight: 700; color: #1f2937; margin: 0; }
.turnovers-filters { display: flex; gap: 0.35rem; }
.turnover-filter {
  border: 1px solid #d1d5db; background: #fff; color: #6b7280;
  border-radius: 6px; padding: 0.3rem 0.7rem; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.turnover-filter:hover { background: #f3f4f6; }
.turnover-filter.active { background: #1b4332; color: #fff; border-color: #1b4332; }

.turnovers-list-header {
  display: grid; grid-template-columns: 30px 96px minmax(180px, 1.25fr) minmax(140px, 1fr) 140px 130px 160px;
  min-width: 860px;
  padding: 0.5rem 0.75rem; font-size: 0.7rem; font-weight: 700;
  color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}
.turnover-row {
  display: grid; grid-template-columns: 30px 96px minmax(180px, 1.25fr) minmax(140px, 1fr) 140px 130px 160px;
  min-width: 860px;
  padding: 0.75rem; border-bottom: 1px solid #f3f4f6;
  align-items: center; font-size: 0.85rem;
  transition: background 0.1s;
}
.turnover-row:hover { background: #f9fafb; }

.to-col-check { width: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; }
.to-col-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #1b4332; }
.turnovers-batch-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fef3c7; border-radius: 6px; margin-bottom: 8px; font-size: 0.85rem; }
.turnovers-batch-bar[hidden] { display: none; }
.batch-assign-select { font-size: 0.8rem; }

.to-col-date { font-weight: 600; color: #374151; }
.to-col-property { color: #374151; }
.to-col-guest { color: #6b7280; }
.to-col-cleaner { }
.to-cleaner-assigned { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; }
.to-cleaner-name { color: #1b4332; font-weight: 600; font-size: 0.8rem; }
.to-change-cleaner {
  border: none; background: transparent; color: #6b7280;
  font-size: 0.68rem; cursor: pointer; padding: 0.1rem 0.2rem;
}
.to-change-cleaner:hover { color: #1b4332; text-decoration: underline; }
.turnover-calendar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: fit-content;
  margin-top: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.turnover-calendar-status span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}
.turnover-calendar-status.clean { background: #ecfdf5; color: #166534; }
.turnover-calendar-status.dirty { background: #fef2f2; color: #991b1b; }
.turnover-calendar-status.inspection { background: #fffbeb; color: #92400e; }
.turnover-readiness {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 0.2rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}
.turnover-readiness.ready { background: #ecfdf5; border-color: #86efac; color: #166534; }
.turnover-readiness.watch { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.turnover-readiness.blocked { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.to-assign-btn {
  border: 1px dashed #d1d5db; background: #fff; color: #6b7280;
  border-radius: 6px; padding: 0.25rem 0.6rem; font-size: 0.75rem;
  cursor: pointer;
}
.to-assign-btn:hover { border-color: #1b4332; color: #1b4332; }
.to-assign-select {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 0.25rem;
  font-size: 0.75rem; width: 100%;
}
.to-status-select {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 0.25rem 0.4rem;
  font-size: 0.72rem; font-weight: 600; cursor: pointer; width: 100%;
}
.to-unassigned { color: #6b7280; background: #f9fafb; }
.to-assigned { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.to-inprogress { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.to-completed { color: #059669; background: #ecfdf5; border-color: #a7f3d0; }

/* ===== CALENDAR VIEW ===== */
.calendar-panel {
  padding: 1.05rem;
  height: 100%;
  overflow-y: auto;
  background: #f3f6fc;
  color: #17264a;
}

.calendar-page-intro {
  max-width: 980px;
  margin: 0 0 1.15rem;
}

.calendar-page-intro h2 {
  margin: 0 0 0.55rem;
  color: #17264a;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.calendar-page-intro p {
  max-width: 940px;
  margin: 0;
  color: #3f4a5f;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.calendar-controls {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: auto minmax(220px, 360px) auto auto 44px minmax(150px, auto) 44px auto auto;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  padding: 1.2rem 1.5rem 0.72rem;
  border: 0;
  border-bottom: 1px solid #d8dde7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.calendar-controls select,
.calendar-controls button {
  min-height: 40px;
  border: 1px solid #bfc7d4;
  background: #fff;
  color: #17264a;
  border-radius: 2px;
  padding: 0.5rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.calendar-controls > button[onclick="calPrevMonth()"],
.calendar-controls > button[onclick="calNextMonth()"] {
  width: 44px;
  padding: 0;
  font-size: 0;
  position: relative;
}

.calendar-controls > button[onclick="calPrevMonth()"]::before,
.calendar-controls > button[onclick="calNextMonth()"]::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-top: 2px solid #17264a;
  border-left: 2px solid #17264a;
}

.calendar-controls > button[onclick="calPrevMonth()"]::before {
  transform: rotate(-45deg);
}

.calendar-controls > button[onclick="calNextMonth()"]::before {
  transform: rotate(135deg);
}

.calendar-bella-filter-bar {
  position: sticky;
  top: 73px;
  z-index: 1190;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.72rem 1.5rem;
  border-bottom: 1px solid #d8dde7;
  background: #eef7f0;
  color: #17264a;
}

.calendar-bella-filter-bar[hidden] {
  display: none;
}

.calendar-bella-filter-bar[hidden] + .calendar-manual-filter-bar {
  top: 73px;
}

.calendar-bella-filter-bar div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.calendar-bella-filter-bar strong {
  color: #14532d;
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-bella-filter-bar span {
  color: #374151;
  font-size: 0.84rem;
  font-weight: 750;
}

.calendar-bella-filter-bar em {
  color: #6b7280;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 750;
}

.calendar-bella-filter-bar button {
  min-height: 30px;
  border: 1px solid #b7d6bd;
  border-radius: 6px;
  background: #fff;
  color: #166534;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.calendar-bella-filter-bar button:hover {
  border-color: #166534;
}

.calendar-manual-filter-bar {
  position: sticky;
  top: 127px;
  z-index: 1180;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.72rem 1.5rem;
  border-bottom: 1px solid #d8dde7;
  background: #fff;
}

.calendar-manual-filter-tabs {
  display: inline-flex;
  gap: 0.22rem;
  padding: 0.18rem;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #f9fafb;
}

.calendar-manual-filter-tabs button,
.calendar-manual-filter-clear {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #374151;
  padding: 0.32rem 0.62rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.calendar-manual-filter-tabs button.active {
  background: #17264a;
  color: #fff;
}

.calendar-manual-filter-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: min(360px, 100%);
  margin: 0;
  color: #3f4a5f;
  font-size: 0.78rem;
  font-weight: 850;
}

.calendar-manual-filter-search input {
  width: min(280px, 100%);
  min-height: 34px;
  border: 1px solid #bfc7d4;
  border-radius: 5px;
  padding: 0.38rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  color: #17264a;
}

.calendar-manual-filter-clear {
  border-color: #d1d5db;
  background: #fff;
}

.calendar-manual-filter-status {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #3f4a5f;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-selected-action {
  border-color: #2d6a4f !important;
  background: #2d6a4f !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.calendar-selected-action:disabled {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #6b7280 !important;
  cursor: default !important;
}

.calendar-day.selected,
.calendar-gantt-cell.selected {
  outline: 3px solid #2d6a4f;
  outline-offset: 2px;
}

.calendar-day.in-range,
.calendar-gantt-cell.in-range {
  box-shadow: inset 0 0 0 2px rgba(45, 106, 79, 0.22);
}

.calendar-day.range-start,
.calendar-day.range-end,
.calendar-gantt-cell.range-start,
.calendar-gantt-cell.range-end {
  outline-color: #1b4332;
}

.calendar-controls button:hover,
.calendar-controls select:hover {
  border-color: #9ca3af;
}

.calendar-month-label {
  font-weight: 900;
  font-size: 1rem;
  color: #17264a;
  min-width: 150px;
  text-align: center;
}

.calendar-grid {
  display: block;
  min-width: 980px;
  padding: 1.5rem 1.5rem 1.55rem;
  border: 0;
  border-left: 0;
  background: #fff;
}

.calendar-dow-row,
.calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-events {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
}

.calendar-dow {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  color: #7b8494;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 0.25rem;
}

.calendar-week {
  position: relative;
  min-height: var(--calendar-week-height, 88px);
}

.calendar-week-days {
  height: 100%;
  min-height: inherit;
}

.calendar-week-events {
  position: absolute;
  left: 0;
  right: 0;
  top: 30px;
  z-index: 3;
  grid-auto-rows: 30px;
  row-gap: 4px;
  pointer-events: none;
}

.calendar-day {
  appearance: none;
  width: 100%;
  min-height: 88px;
  border-radius: 0;
  padding: 0.36rem 0.42rem;
  border: 0;
  border-right: 1px solid #d6dbe4;
  border-bottom: 1px solid #d6dbe4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  background: #fff;
  box-shadow: none;
  text-align: left;
  font: inherit;
  position: relative;
}

.calendar-day.available {
  background: #fff;
}

.calendar-day.booked {
  background: #fff;
  cursor: pointer;
}

.calendar-day.agent-block {
  background: #fbfaff;
}

.calendar-day.owner-reservation {
  background: #eff6ff;
}

.calendar-day.blocked {
  background: #f7f8f6;
}

.calendar-day.past {
  background: #f4f6f4;
  color: #6b7280;
}

.calendar-day.today {
  position: relative;
  outline: 2px solid #dc2626;
  outline-offset: -2px;
  box-shadow: inset 4px 0 0 #dc2626;
}

.calendar-day.today::after {
  content: 'Today';
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  padding: 0.1rem 0.34rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calendar-day.empty {
  background: #fff;
  border-right: 1px solid #d6dbe4;
  border-bottom: 1px solid #d6dbe4;
  box-shadow: none;
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.calendar-day-number {
  align-self: flex-end;
  font-size: 0.78rem;
  font-weight: 800;
  color: #7b8494;
  line-height: 1;
}

.calendar-day.past .calendar-day-number {
  color: #6b7280;
}

.calendar-day-price {
  margin-top: 1.1rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #4a5568;
  line-height: 1.1;
}

.calendar-day-booking {
  margin-top: auto;
  min-height: 24px;
  border-radius: 5px;
  padding: 0.28rem 0.42rem;
  background: transparent;
  font-size: 0.72rem;
  line-height: 1.25;
  color: #526157;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day-meta {
  width: fit-content;
  max-width: 100%;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #7b8494;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day.booked .calendar-day-meta {
  background: #e7f3ee;
  color: #2c7a61;
}

.calendar-month-event {
  appearance: none;
  pointer-events: auto;
  height: 30px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0 0.65rem;
  background: #55b77a;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 30px;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;
}

.calendar-month-event span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-event.booking {
  background: #55b77a;
}

.calendar-month-event.owner-reservation {
  background: #2563eb;
  color: #fff;
}

.calendar-month-event.block,
.calendar-month-event.agent-block {
  background: #e5e5e5;
  color: #293241;
}

.calendar-month-event.start-angled {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  padding-left: 0.72rem;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}

.calendar-month-event.end-angled {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  padding-right: 0.72rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.calendar-month-event.start-angled.end-angled {
  border-radius: 4px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.calendar-month-event.compact {
  opacity: 0.92;
}

.calendar-day.blocked .calendar-day-booking {
  background: #4e555b;
  color: #fff;
}

.calendar-day.blocked .calendar-day-meta {
  background: #edf0ee;
  color: #4e555b;
}

.calendar-day.agent-block .calendar-day-booking,
.calendar-day.agent-block .calendar-day-meta {
  background: #6d5bd0;
  color: #fff;
}

.calendar-day.past .calendar-day-price,
.calendar-day.past .calendar-day-booking,
.calendar-day.past .calendar-day-meta {
  color: #7a8591;
}


.calendar-range-menu {
  position: fixed;
  z-index: 2700;
  width: min(320px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
  padding: 0.85rem;
}

.calendar-range-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 0.65rem;
}

.calendar-range-menu label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  color: #374151;
  margin-bottom: 0.55rem;
}

.calendar-range-property {
  margin: -0.15rem 0 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-range-menu input,
.calendar-range-menu select,
.calendar-range-menu textarea {
  width: 100%;
  margin-top: 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
}

.calendar-range-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.calendar-range-actions button {
  flex: 1;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.calendar-range-submit {
  background: #2d6a4f;
  border-color: #2d6a4f !important;
  color: #fff;
}

.calendar-range-cancel {
  background: #fff;
  color: #374151;
}

.calendar-range-help {
  margin-top: 0.55rem;
  color: #6b7280;
  font-size: 0.7rem;
}

.calendar-popup {
  position: fixed;
  background: white;
  border: 1px solid #dfe5dc;
  border-radius: 8px;
  padding: 0.8rem;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
  z-index: 2600;
  min-width: 280px;
  max-width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.calendar-popup h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  color: #111827;
}

.calendar-popup-summary {
  display: flex;
  gap: 0.72rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.calendar-popup-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1b4332, #2d6a4f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
}

.calendar-popup-title-block {
  min-width: 0;
  flex: 1;
}

.calendar-popup-kicker {
  margin-bottom: 0.15rem;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-popup-chip-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.calendar-popup-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: #edf7f2;
  color: #1b4332;
  padding: 0.12rem 0.42rem;
  font-size: 0.66rem;
  font-weight: 800;
}

.calendar-popup-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  padding: 0.2rem 0;
}

.calendar-popup-label {
  color: #6b7280;
}

.calendar-popup-value {
  color: #111827;
  font-weight: 600;
  text-align: right;
}

.calendar-popup-open {
  width: 100%;
  margin-top: 0.55rem;
  border: 1px solid #d9dfd5;
  border-radius: 8px;
  background: #f6faf8;
  color: #1b4332;
  padding: 0.4rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.calendar-popup-open:hover {
  border-color: #2d6a4f;
  background: #edf7f2;
}

.calendar-popup-help {
  margin: 0.65rem 0 0.35rem;
  color: #4b5563;
  font-size: 0.78rem;
}

/* Why a blocked date cannot be reopened from this unit's calendar. Reads as guidance, not as
   an error - the block itself is correct, the staff member is just on the wrong calendar. */
.calendar-popup-warning {
  margin: 0.65rem 0 0.35rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #f0c36d;
  border-left: 3px solid #d97706;
  border-radius: 4px;
  background: #fdf6e7;
  color: #7c4a03;
  font-size: 0.78rem;
  line-height: 1.35;
}

.calendar-popup-action[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.calendar-popup-status {
  min-height: 1.1rem;
  margin-top: 0.45rem;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.35;
}

.calendar-popup-status.error {
  color: #b91c1c;
  font-weight: 700;
}

.calendar-popup-note-label {
  display: block;
  margin-top: 0.7rem;
  color: #374151;
  font-size: 0.76rem;
  font-weight: 700;
}

.calendar-popup-note {
  width: 100%;
  margin-top: 0.3rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  resize: vertical;
  min-height: 2.4rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f9fafb;
}

.calendar-popup-action,
.calendar-popup-cancel {
  width: 100%;
  margin-top: 0.55rem;
  border-radius: 8px;
  padding: 0.48rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.calendar-popup-action.danger {
  border: 1px solid #b91c1c;
  background: #dc2626;
  color: #fff;
}

.calendar-popup-action.secondary {
  border: 1px solid #2d6a4f;
  background: #2d6a4f;
  color: #fff;
}

.calendar-popup-action:disabled {
  opacity: 0.7;
  cursor: wait;
}

.calendar-popup-cancel {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}

.booking-details-modal {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.booking-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
}

.booking-details-card {
  position: relative;
  width: min(680px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dfe5dc;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
}

.booking-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #dfe5dc;
  padding: 0.8rem 0.95rem;
  background: #f8faf7;
}

.booking-details-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.booking-details-close {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.booking-details-content {
  padding: 0.95rem 1rem 1rem;
}

.booking-details-loading,
.booking-details-error {
  font-size: 0.9rem;
  color: #4b5563;
  padding: 0.5rem 0.1rem;
}

.booking-details-error {
  color: #991b1b;
}

.booking-details-headline h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.2rem;
}

.booking-details-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.7rem;
}

.booking-details-grid {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.booking-details-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #f3f4f6;
  padding: 0.5rem 0.7rem;
  font-size: 0.84rem;
}

.booking-details-row:last-child {
  border-bottom: none;
}

.booking-details-label {
  color: #6b7280;
}

.booking-details-value {
  color: #111827;
  font-weight: 700;
  text-align: right;
}

.booking-details-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.booking-details-btn {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
  text-decoration: none;
}

.booking-details-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.booking-details-btn-link {
  color: #1b4332;
  border-color: #d9dfd5;
  background: #f6faf8;
}

.booking-details-btn-link:hover {
  border-color: #2d6a4f;
  background: #edf7f2;
}

.booking-details-primary {
  border-color: #1b4332;
  background: #1b4332;
  color: #fff;
}

.booking-details-primary:hover {
  border-color: #173c2c;
  background: #173c2c;
}

.guest-review-panel {
  margin-top: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fbfcfb;
  padding: 0.75rem;
}

.guest-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.guest-review-title {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 800;
}

.guest-review-note {
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.guest-review-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef6f1;
  color: #1b4332;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.22rem 0.5rem;
}

.guest-review-field {
  display: grid;
  gap: 0.3rem;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: 0.55rem;
}

.guest-review-field select,
.guest-review-field textarea,
.guest-review-rating select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.5rem 0.55rem;
}

.guest-review-field textarea {
  resize: vertical;
  line-height: 1.4;
}

.guest-review-field select:focus,
.guest-review-field textarea:focus,
.guest-review-rating select:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}

.guest-review-ratings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.guest-review-rating {
  display: grid;
  gap: 0.3rem;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 800;
}

.guest-review-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.guest-review-submit {
  border-color: #d9dfd5;
  background: #f6faf8;
  color: #1b4332;
}

.guest-review-status {
  color: #6b7280;
  font-size: 0.74rem;
}

@media (max-width: 640px) {
  .guest-review-header,
  .guest-review-ratings {
    grid-template-columns: 1fr;
  }
  .guest-review-header {
    display: grid;
  }
  .guest-review-badge {
    justify-self: start;
  }
}

/* Contacts sub-tabs — pill style matching top nav */
.contacts-subtabs {
  display: flex;
  gap: 8px;
  padding: 0 1.5rem .75rem;
  margin-bottom: .75rem;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contact-add-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0 0.85rem;
  border: 1px solid rgba(31, 111, 91, 0.28);
  border-radius: 8px;
  background: #1f6f5b;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.contact-add-button span {
  font-size: 1.05rem;
  line-height: 1;
}

.contact-add-button:hover {
  background: #173d32;
}

.contacts-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background-color: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}
.contacts-subtab:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
  color: #333;
}
.contacts-subtab.active {
  background-color: var(--accent, #c9a227);
  border-color: var(--accent, #c9a227);
  color: #fff;
  font-weight: 600;
}

/* Mini Airbnb link button in composer */
.btn-airbnb-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #e1484d;
  background: #fff5f5;
  border: 1px solid #ffd1d3;
  border-radius: 999px;
  text-decoration: none;
  transition: all .15s;
}
.btn-airbnb-mini:hover {
  background: #ffe7e8;
  color: #c53035;
}

@media (max-width: 720px) {
  .calendar-panel {
    padding: 0.65rem;
    overflow-x: auto;
  }

  .calendar-page-intro {
    display: none;
  }

  .calendar-controls {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    padding: 0.72rem;
  }

  .calendar-legend-btn,
  .calendar-controls > button[onclick="createSuReservationQuick()"] {
    display: none;
  }

  .calendar-controls select,
  .calendar-controls .calendar-mode-toggle,
  .calendar-selected-action,
  .calendar-month-label {
    grid-column: 1 / -1;
  }

  .calendar-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-month-label {
    min-width: 0;
    padding: 0.4rem 0;
    font-size: 0.88rem;
  }

  .calendar-bella-filter-bar,
  .calendar-manual-filter-bar {
    position: static;
    padding: 0.62rem 0.72rem;
  }

  .calendar-bella-filter-bar[hidden] + .calendar-manual-filter-bar {
    top: 0;
  }

  .calendar-manual-filter-search {
    min-width: 100%;
  }

  .calendar-manual-filter-search input {
    width: 100%;
    font-size: 16px;
  }

  .calendar-grid {
    min-width: 896px;
    padding: 0.8rem;
  }

  .calendar-dow-row,
  .calendar-week-days,
  .calendar-week-events {
    grid-template-columns: repeat(7, minmax(128px, 1fr));
  }

  .calendar-dow {
    display: flex;
  }

  .calendar-day.empty {
    display: block;
  }

  .calendar-gantt {
    min-width: 0;
    padding: 0.55rem;
  }

  .calendar-gantt-scroll {
    max-width: calc(100vw - 1.3rem);
  }

  .calendar-gantt-header,
  .calendar-gantt-row {
    grid-template-columns: 146px 1fr;
    min-width: calc(146px + var(--days, 90) * 58px);
  }

  .calendar-gantt-cells {
    grid-template-columns: repeat(var(--half-days, 60), minmax(29px, 1fr));
  }

  .calendar-gantt-property {
    padding: 0.48rem;
    font-size: 0.76rem;
  }

  .booking-summary-head {
    flex-direction: column;
  }

  .booking-summary-intro {
    max-width: none;
    text-align: left;
  }

  .composer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-manager-card {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .template-manager-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

/* Unified composer toolbar */
.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 2px;
  gap: 8px;
}
.composer-bella-actions {
  display: flex;
  gap: 6px;
}
#btnApplyTemplate {
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid #2f8f73;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f8f73, #1f6f5b);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all .15s;
}
#btnApplyTemplate:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a9f83, #2a7f66);
  box-shadow: 0 2px 8px rgba(47,143,115,.35);
}
#btnApplyTemplate:disabled {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.bella-action-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: all .15s;
}
.bella-action-btn:hover {
  background: #eef2ff;
  border-color: #818cf8;
  color: #4338ca;
}
.bella-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== REVIEWS ===== */
.reviews-shell {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}

.reviews-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.reviews-header h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.reviews-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reviews-filter-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.reviews-filter-btn:hover,
.reviews-filter-btn.active {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}

.reviews-advanced-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
}

.reviews-filter-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.reviews-filter-control span {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reviews-filter-control input,
.reviews-filter-control select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.5rem 0.65rem;
}

.reviews-filter-clear {
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.reviews-filter-clear:hover {
  background: #eef2f7;
}

.reviews-active-filter-summary {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 700;
}

.reviews-active-filter-summary[hidden] {
  display: none;
}

.reviews-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.review-stat-card {
  background: linear-gradient(135deg, #fff 0%, #f7f7f3 100%);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.review-stat-label {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.review-stat-value {
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
}

.review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.15rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.review-card-top {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.review-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #1b4332;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
}

.review-card-head {
  flex: 1;
  min-width: 0;
}

.review-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.review-card-meta h3 {
  font-size: 1rem;
  font-weight: 800;
}

.review-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.review-stars {
  color: #d97706;
  letter-spacing: 0.08em;
}

.review-status-badge {
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.review-status-badge.needs-response {
  background: #fef3c7;
  color: #b45309;
}

.review-status-badge.responded {
  background: #dcfce7;
  color: #166534;
}

.review-status-badge.posted {
  background: #eef2ff;
  color: #3730a3;
}

.review-body,
.review-response-text {
  white-space: pre-wrap;
  line-height: 1.6;
  color: #1f2937;
  font-size: 0.92rem;
}

.review-thread {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.review-thread-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fbfcfb;
}

.review-thread-section-guest-review {
  border-left: 4px solid #1b4332;
}

.review-thread-section-response,
.review-thread-section-host-review {
  background: #f7fbf8;
  border-left: 4px solid #4f9d72;
}

.review-thread-section-private {
  background: #fffaf0;
  border-left: 4px solid #d97706;
}

.review-thread-label {
  margin-bottom: 0.35rem;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.review-thread-text {
  color: #1f2937;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.review-actions-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.review-ai-btn,
.review-send-btn {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.review-ai-btn {
  background: #1b4332;
  color: #fff;
}

.review-ai-btn:hover {
  background: #163729;
}

.review-ai-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.review-send-btn {
  background: #f3f4f6;
  color: #374151;
}

.review-send-btn:hover {
  background: #e5e7eb;
}

.review-response-input {
  width: 100%;
  min-height: 112px;
  margin-top: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #fcfcfa;
  font: inherit;
  color: #111827;
  resize: vertical;
}

.review-response-input:focus {
  outline: none;
  border-color: #1b4332;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}

.review-helper-text {
  margin-top: 0.45rem;
  color: #6b7280;
  font-size: 0.78rem;
}

.review-response-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #edf2f7;
}

.review-response-label {
  color: #166534;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

/* ===== AUTOMATIONS ===== */
.automations-container {
  padding: 1.4rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.automations-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.automations-header h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.automation-list-filter {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.automation-list-filter label {
  color: #374151;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.automation-list-filter-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.45rem;
}

.automation-list-filter input {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.86rem;
  color: #111827;
  background: #f8fafc;
}

.automation-list-filter input:focus {
  outline: 2px solid rgba(45, 106, 79, 0.16);
  border-color: #2d6a4f;
  background: #fff;
}

.automation-list-filter span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.automations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===== SETTLEMENT PLANS ===== */
.settlement-shell {
  padding: 1.4rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settlement-header,
.settlement-preview-head,
.settlement-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.settlement-header h2,
.settlement-preview-head h3 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  color: #111827;
}

.settlement-header h2 {
  font-size: 1.25rem;
}

.settlement-header-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.automation-create-btn.secondary {
  background: #fff;
  color: #1b4332;
  border: 1px solid #cbd5e1;
}

.settlement-preview-head h3 {
  font-size: 1rem;
}

.settlement-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.settlement-sidebar,
.settlement-editor-card,
.settlement-preview-card {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.settlement-sidebar {
  padding: 0.9rem;
}

.settlement-sidebar-head {
  align-items: center;
  margin-bottom: 0.75rem;
}

.settlement-sidebar-head span,
.settlement-formula-note,
.settlement-assignment p,
.settlement-preview-head p {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.settlement-plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.settlement-plan-card {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.settlement-plan-card strong,
.settlement-plan-card span {
  display: block;
}

.settlement-plan-card strong {
  color: #111827;
  font-size: 0.92rem;
}

.settlement-plan-card span {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.settlement-plan-card.active {
  background: #ecfdf5;
  border-color: #2d6a4f;
}

.settlement-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
}

.settlement-editor-card,
.settlement-preview-card {
  padding: 1rem;
}

.settlement-form-head,
.settlement-rule-grid,
.settlement-sample-grid {
  display: grid;
  gap: 0.8rem;
}

.settlement-form-head {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  align-items: end;
  margin-bottom: 0.9rem;
}

.settlement-plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

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

.settlement-sample-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0.9rem 0;
}

.settlement-form-head label,
.settlement-rule-grid label,
.settlement-sample-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settlement-form-head label span,
.settlement-rule-grid label span,
.settlement-sample-grid label span {
  color: #374151;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settlement-form-head input,
.settlement-form-head select,
.settlement-rule-grid input,
.settlement-rule-grid select,
.settlement-sample-grid input,
.settlement-property-picker input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.58rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  color: #111827;
  background: #f8fafc;
}

.settlement-form-head input:focus,
.settlement-form-head select:focus,
.settlement-rule-grid input:focus,
.settlement-rule-grid select:focus,
.settlement-sample-grid input:focus,
.settlement-property-picker input:focus {
  outline: 2px solid rgba(45, 106, 79, 0.16);
  border-color: #2d6a4f;
  background: #fff;
}

.settlement-input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.settlement-input-suffix span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 900;
}

.settlement-assignment {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.settlement-property-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.settlement-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.settlement-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

.settlement-empty {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.settlement-preview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.settlement-preview-metric {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
}

.settlement-preview-metric span {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settlement-preview-metric strong {
  display: block;
  color: #111827;
  font-size: 1.18rem;
  margin-top: 0.25rem;
}

.settlement-preview-metric.highlight {
  background: #ecfdf5;
  border-color: #2d6a4f;
}

.settlement-formula-note {
  margin-top: 0.8rem;
  line-height: 1.5;
}

.settlement-guide-modal[hidden] {
  display: none;
}

.settlement-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.settlement-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.settlement-guide-dialog {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100vw - 32px));
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.settlement-guide-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
}

.settlement-guide-header h3 {
  margin: 0;
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.08rem;
}

.settlement-guide-header p {
  margin: 0.24rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
}

.settlement-guide-close {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.settlement-guide-content {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 1rem;
  overflow: auto;
  padding: 1rem;
  background: #f8fafc;
}

.settlement-guide-chat,
.settlement-guide-preview {
  min-width: 0;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
}

.settlement-guide-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settlement-guide-message {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  padding: 0.82rem 0.9rem;
}

.settlement-guide-message span {
  display: block;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settlement-guide-message p {
  margin: 0.3rem 0 0;
  color: #1e293b;
  line-height: 1.48;
}

.settlement-guide-answer {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.85rem;
}

.settlement-guide-choices {
  display: grid;
  gap: 0.55rem;
}

.settlement-guide-choices button {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 0.78rem 0.85rem;
  text-align: left;
  cursor: pointer;
}

.settlement-guide-choices button.active,
.settlement-guide-choices button:hover {
  border-color: #2d6a4f;
  background: #ecfdf5;
}

.settlement-guide-choices strong,
.settlement-guide-choices span {
  display: block;
}

.settlement-guide-choices strong {
  color: #111827;
}

.settlement-guide-choices span {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.settlement-guide-number,
.settlement-guide-text {
  display: grid;
  gap: 0.5rem;
  align-items: center;
}

.settlement-guide-number {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.settlement-guide-text {
  grid-template-columns: minmax(0, 1fr) auto;
}

.settlement-guide-number span {
  color: #64748b;
  font-weight: 900;
}

.settlement-guide-number input,
.settlement-guide-text input {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.64rem 0.72rem;
  font: inherit;
}

.settlement-guide-number button,
.settlement-guide-text button,
.settlement-guide-footer button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1b4332;
  padding: 0.58rem 0.78rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.settlement-edit-note {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-guide-preview {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.settlement-guide-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.settlement-guide-preview-head strong,
.settlement-guide-preview-head span {
  display: block;
}

.settlement-guide-preview-head span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 800;
}

.settlement-flow-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.settlement-flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
}

.settlement-flow-row.highlight {
  border-color: #2d6a4f;
  background: #ecfdf5;
}

.settlement-flow-row strong,
.settlement-flow-row span {
  display: block;
}

.settlement-flow-row strong {
  color: #111827;
  font-size: 0.88rem;
}

.settlement-flow-row span {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}

.settlement-flow-row em {
  color: #111827;
  font-family: 'Public Sans', sans-serif;
  font-style: normal;
  font-weight: 900;
}

.settlement-guide-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: auto;
}

.settlement-guide-footer button.primary {
  border-color: #1b4332;
  background: #1b4332;
  color: #fff;
}

.settlement-guide-footer button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.automation-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.automation-card.status-draft_only,
.automation-card.status-no_send_actions {
  border-color: #fbbf24;
  background: #fffbeb;
}

.automation-card.status-partial {
  border-color: #f59e0b;
  background: #fff7ed;
}

.automation-card-main h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.automation-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  background: #e5e7eb;
  color: #374151;
  font-size: 0.7rem;
  font-weight: 800;
}

.automation-status-chip.live {
  background: #dcfce7;
  color: #166534;
}

.automation-status-chip.partial {
  background: #ffedd5;
  color: #9a3412;
}

.automation-status-chip.draft_only,
.automation-status-chip.no_send_actions {
  background: #fef3c7;
  color: #92400e;
}

.automation-status-chip.disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.automation-card-main p {
  color: #4b5563;
  font-size: 0.86rem;
}

.automation-card-meta {
  margin-top: 0.4rem;
  color: #6b7280;
  font-size: 0.78rem;
  display: flex;
  gap: 0.65rem;
}

.automation-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.automation-card-btn,
.automation-create-btn,
.automation-btn,
.automation-add-btn {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.automation-card-btn:hover,
.automation-create-btn:hover,
.automation-btn:hover,
.automation-add-btn:hover {
  border-color: #2d6a4f;
  color: #1b4332;
}

.automation-create-btn {
  background: linear-gradient(135deg, #2d6a4f, #1b4332);
  color: #fff;
  border-color: #1b4332;
}

.automation-card-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.automation-card-btn.danger:hover {
  background: #fef2f2;
}

.automation-mode-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 2px rgba(15,23,42,0.05);
  overflow: hidden;
}

.automation-mode-chip {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  min-height: 2.15rem;
  min-width: 3.4rem;
  padding: 0.55rem 0.75rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.automation-mode-chip + .automation-mode-chip {
  border-left: 1px solid #e5e7eb;
}

.automation-mode-chip:hover:not(:disabled) {
  background: #f3f4f6;
  color: #1f2937;
}

.automation-mode-chip.active {
  background: #2d6a4f;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.automation-mode-chip.off.active {
  background: #6b7280;
}

.automation-mode-chip:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  background: #f9fafb;
}

.automation-editor {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(17, 24, 39, 0.46);
  padding: 1rem;
}

.automation-editor-shell {
  width: min(1200px, 100%);
  height: 100%;
  margin: 0 auto;
  background: #f4f6f8;
  border-radius: 18px;
  border: 1px solid #dfe4ea;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.automation-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.automation-name-input {
  width: min(420px, 100%);
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.58rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.automation-editor-subtitle {
  margin-top: 0.4rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.automation-action-live-note {
  margin-top: 0.35rem;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
}

.automation-action-live-note.live {
  color: #166534;
}

.automation-editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.automation-btn-primary {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}

.automation-btn-ghost {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.automation-editor-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.automation-section {
  background: linear-gradient(180deg, #edf2f8, #eef3f8);
  border: 1px solid #dce3eb;
  border-radius: 14px;
  padding: 0.8rem;
}

.automation-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.automation-section-head h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #475569;
}

.automation-add-btn {
  border-radius: 999px;
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.automation-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.automation-trigger-card,
.automation-condition-card,
.automation-action-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.automation-card-copy strong {
  display: block;
  margin-bottom: 0.25rem;
}

.automation-card-copy p {
  color: #64748b;
  font-size: 0.8rem;
}

.automation-property-scope {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.automation-scope-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.automation-scope-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.38rem 0.62rem;
}

.automation-property-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.45rem;
}

.automation-property-picker input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  color: #111827;
  background: #fff;
}

.automation-property-picker.is-disabled {
  opacity: 0.62;
}

.automation-property-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 2rem;
}

.automation-property-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #14532d;
  padding: 0.3rem 0.45rem 0.3rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.automation-property-chip small {
  color: #166534;
  font-weight: 700;
}

.automation-property-chip button {
  border: 0;
  background: transparent;
  color: #166534;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.automation-property-empty {
  color: #64748b;
  font-size: 0.78rem;
  padding-top: 0.25rem;
}

.automation-timing-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.7fr) minmax(130px, 0.8fr);
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.automation-timing-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.automation-timing-grid select,
.automation-timing-grid input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.48rem 0.62rem;
  font: inherit;
  font-size: 0.84rem;
  color: #111827;
  background: #fff;
}

.automation-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.automation-mini {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
}

.automation-mini.danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.automation-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.automation-row select,
.automation-row input,
.automation-template-input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.48rem 0.62rem;
  font: inherit;
  font-size: 0.84rem;
  color: #111827;
  background: #fff;
}

.automation-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.template-editor {
  margin-top: 0.35rem;
}

.template-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-bottom: 0.5rem;
}

.variable-btn {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
}

.variable-btn:hover {
  background: #dbeafe;
}

.automation-template-input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.automation-attachments-editor {
  margin-top: 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.65rem;
}

.automation-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.automation-attachments-head strong {
  color: #374151;
  font-size: 0.82rem;
}

.automation-attachments-editor p,
.automation-attachment-empty {
  color: #64748b;
  font-size: 0.76rem;
}

.automation-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.automation-attachment-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.45fr) minmax(150px, 0.8fr) minmax(260px, 2fr) auto;
  gap: 0.45rem;
  align-items: start;
}

.automation-attachment-row select,
.automation-attachment-row input {
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.42rem 0.55rem;
}

.automation-attachment-upload {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.automation-attachment-upload input[type="file"] {
  padding: 0.38rem;
}

.automation-attachment-status {
  color: #475569;
  font-size: 0.74rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.automation-attachment-upload details {
  color: #64748b;
  font-size: 0.74rem;
}

.automation-attachment-upload summary {
  cursor: pointer;
  font-weight: 700;
}

.automation-attachment-upload details input {
  width: 100%;
  margin-top: 0.28rem;
}

.automation-preview-toggle {
  margin-top: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #4b5563;
  font-size: 0.78rem;
}

.automation-preview-box {
  margin-top: 0.45rem;
  border: 1px dashed #c7d2fe;
  border-radius: 10px;
  background: #f8faff;
  padding: 0.65rem 0.75rem;
  white-space: pre-wrap;
  color: #1f2937;
  font-size: 0.83rem;
}

.automation-empty-card {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.8rem;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.83rem;
}

.automation-test-result {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.8rem 1.1rem;
  font-size: 0.82rem;
  color: #1f2937;
}

.automation-test-result pre {
  margin-top: 0.45rem;
  padding: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  white-space: pre-wrap;
}

@media (max-width: 960px) {
  .property-card-scan-row {
    grid-template-columns: 1fr;
  }

  .property-workspace-nav,
  .property-workspace-health {
    grid-template-columns: 1fr;
  }

  .property-workspace-score {
    min-width: 0;
    text-align: left;
  }

  .property-detail-grid.property-workspace-section {
    grid-template-columns: 1fr;
  }

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

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

  .property-info-grid {
    grid-template-columns: 1fr;
  }

  .property-account-bridge-list {
    grid-template-columns: 1fr;
  }

  .optimizer-score-card {
    grid-template-columns: 1fr;
  }

  .optimizer-score-metrics {
    grid-template-columns: 1fr;
  }

  .optimizer-field-row {
    padding: 1rem;
  }

  .automation-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .automation-card-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .automation-editor {
    padding: 0;
  }

  .automation-editor-shell {
    border-radius: 0;
    border: none;
  }
}

@media (max-width: 720px) {
  .property-checklist-grid {
    grid-template-columns: 1fr;
  }

  .property-checklist-grid.compact {
    grid-template-columns: 1fr;
  }

  .property-workspace-nav {
    position: static;
  }

  .property-workspace-nav-buttons {
    padding-bottom: 0.1rem;
  }

  #propertyDetail,
  .card-grid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .property-detail-hero,
  .prop-card-hero,
  .property-booking-item,
  .pricing-rule-item {
    flex-direction: column;
  }

  .property-booking-meta,
  .pricing-rule-meta {
    align-items: flex-start;
    text-align: left;
  }

  .reviews-shell {
    padding: 1rem;
  }

  .reviews-header,
  .review-card-meta,
  .review-actions-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .reviews-advanced-filters {
    grid-template-columns: 1fr;
  }

  .automation-attachment-row {
    grid-template-columns: 1fr;
  }

  .optimizer-shell {
    padding: 1rem;
  }

  .optimizer-score-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .opt-editor-panel {
    width: 100vw;
    max-width: 100vw;
    right: -100vw;
  }

  .opt-field-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .opt-field-label {
    min-width: 0;
    white-space: normal;
  }

  .opt-field-preview.is-amenity {
    width: 100%;
    justify-content: space-between;
  }

  .automations-container {
    padding: 1rem;
  }

  .automations-header {
    flex-direction: column;
  }

  .automation-list-filter {
    grid-template-columns: 1fr;
  }

  .automation-list-filter-control {
    grid-template-columns: 1fr auto;
  }

  .settlement-shell {
    padding: 1rem;
  }

  .settlement-grid,
  .settlement-editor,
  .settlement-form-head,
  .settlement-rule-grid,
  .settlement-sample-grid,
  .settlement-guide-content {
    grid-template-columns: 1fr;
  }

  .settlement-plan-actions {
    justify-content: flex-start;
  }

  .settlement-guide-dialog {
    top: 2vh;
    width: min(100vw - 18px, 720px);
    max-height: 96vh;
  }

  .settlement-guide-preview-head,
  .settlement-flow-row {
    grid-template-columns: 1fr;
  }

  .automation-editor-header {
    flex-direction: column;
  }

  .automation-editor-actions {
    width: 100%;
  }

  .automation-timing-grid {
    grid-template-columns: 1fr;
  }

  .automation-mode-controls {
    width: 100%;
  }

  .automation-mode-chip {
    flex: 1;
    text-align: center;
  }
}

@media (min-width: 961px) {
  .amenity-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Reservation ledger inside booking details */
.booking-ledger-section {
  margin-top: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fbfcfb;
  padding: 0.75rem;
}
.booking-ledger-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.55rem;
}
.booking-ledger-grid { background: #fff; }
.booking-details-row.compact {
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  background: #fff;
  margin-top: 0.3rem;
}
.booking-ledger-subsection { margin-top: 0.75rem; }
.booking-ledger-subtitle {
  font-size: 0.76rem;
  font-weight: 800;
  color: #4b5563;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.booking-ledger-empty {
  border: 1px dashed #d1d5db;
  border-radius: 9px;
  color: #9ca3af;
  font-size: 0.78rem;
  padding: 0.65rem;
  background: #fff;
}
.booking-ledger-note {
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;
}
.booking-ledger-note-text { color: #1f2937; font-size: 0.82rem; line-height: 1.4; }
.booking-ledger-note-meta { color: #9ca3af; font-size: 0.7rem; margin-top: 0.2rem; }
.booking-ledger-note-form { margin-top: 0.45rem; }


.ledger-summary-note {
  margin: 0.35rem 0 0.55rem;
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.35;
}

.ledger-summary-card {
  border: 1px solid #d9dfd5;
  border-radius: 12px;
  background: #fbfdfb;
  overflow: hidden;
  margin: 0.5rem 0 0.75rem;
}

.ledger-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #eef2ee;
  font-size: 0.82rem;
}

.ledger-summary-line:last-child { border-bottom: none; }
.ledger-summary-line span { color: #374151; font-weight: 700; }
.ledger-summary-line strong { color: #111827; font-weight: 900; }
.ledger-summary-line.primary { background: #f0f8f3; }
.ledger-summary-line.primary span,
.ledger-summary-line.primary strong { color: #1b4332; }
.ledger-summary-line.muted span { color: #6b7280; }

.ledger-details {
  margin-top: 0.55rem;
}

.ledger-details summary {
  cursor: pointer;
  color: #2d6a4f;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.35rem 0;
}

.ledger-collected-table {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin-top: 0.35rem;
}

.ledger-collected-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) minmax(120px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.78rem;
}

.ledger-collected-row:last-child { border-bottom: none; }
.ledger-collected-label { font-weight: 800; color: #111827; }
.ledger-collected-meta { color: #9ca3af; font-size: 0.7rem; margin-top: 0.12rem; }
.ledger-collected-bucket { color: #4b5563; font-weight: 700; }
.ledger-collected-amount { color: #111827; font-weight: 900; text-align: right; }

@media (max-width: 760px) {
  .ledger-collected-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .ledger-collected-amount { text-align: left; }
}

.booking-ledger-note-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  resize: vertical;
}
.booking-ledger-note-form textarea:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}
.booking-ledger-note-actions { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.4rem; }
.booking-ledger-status { color: #6b7280; font-size: 0.74rem; }
.booking-ledger-event {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.45rem;
  padding: 0.35rem 0;
}
.booking-ledger-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2d6a4f;
  margin-top: 0.35rem;
}
.booking-ledger-event-label { color: #1f2937; font-size: 0.8rem; font-weight: 700; }
.booking-ledger-event-meta { color: #6b7280; font-size: 0.72rem; line-height: 1.35; }

/* ===== CLEANER MESSAGES ===== */
.cleaner-msgs-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: #f8f7f2;
}

.cleaner-msgs-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #e5e1d6;
  background: #fffdf8;
}

.cleaner-msgs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #eee8dc;
}

.cleaner-msgs-header h2 { font-size: 1.05rem; color: #1b4332; margin: 0; }
.cleaner-msgs-header p { font-size: 0.78rem; color: #6b7280; margin-top: 0.2rem; }

.btn-refresh-cleaners {
  width: 34px;
  height: 34px;
  border: 1px solid #d6ccb9;
  border-radius: 999px;
  background: #fff;
  color: #1b4332;
  cursor: pointer;
  font-weight: 800;
}

.cleaner-auto-sms-card {
  margin: 0.75rem 1rem 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #d6ccb9;
  border-radius: 14px;
  background: #fffaf1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.cleaner-auto-sms-card strong { display: block; color: #1b4332; font-size: 0.82rem; }
.cleaner-auto-sms-card span[id] { display: block; margin-top: 0.18rem; color: #6b7280; font-size: 0.72rem; line-height: 1.25; }
.cleaner-auto-sms-card span[id].is-auto { color: #166534; }
.cleaner-auto-sms-card span[id].is-manual { color: #92400e; }
.switch-toggle { position: relative; display: inline-flex; width: 46px; height: 26px; flex: 0 0 auto; }
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.switch-toggle > span {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #c7beb0;
  border-radius: 999px;
  transition: background 0.18s ease;
}
.switch-toggle > span::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: transform 0.18s ease;
}
.switch-toggle input:checked + span { background: #1b4332; }
.switch-toggle input:checked + span::before { transform: translateX(20px); }
.switch-toggle input:disabled + span { opacity: 0.55; cursor: wait; }

.cleaner-msgs-search {
  margin: 0.75rem 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d6ccb9;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.cleaner-thread-list {
  overflow-y: auto;
  min-height: 0;
  padding: 0 0.55rem 0.75rem;
}

.cleaner-thread-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.cleaner-thread-item:hover { background: #f2efe6; }
.cleaner-thread-item.active { background: #e8f3ed; box-shadow: inset 3px 0 0 #1b4332; }

.cleaner-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1b4332;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
}
.cleaner-thread-avatar.large { width: 44px; height: 44px; font-size: 0.9rem; }

.cleaner-thread-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cleaner-thread-top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.86rem; }
.cleaner-thread-top strong { color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cleaner-thread-top span { color: #9ca3af; font-size: 0.72rem; flex: 0 0 auto; }
.cleaner-thread-meta { color: #6b7280; font-size: 0.72rem; margin-top: 0.12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cleaner-account-mode { display: inline-flex; align-self: flex-start; margin-top: 0.22rem; border-radius: 999px; padding: 0.1rem 0.42rem; font-size: 0.66rem; font-weight: 800; }
.cleaner-account-mode.is-auto { background: #dcfce7; color: #166534; }
.cleaner-account-mode.is-manual { background: #fef3c7; color: #92400e; }
.cleaner-thread-preview { color: #4b5563; font-size: 0.78rem; margin-top: 0.28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cleaner-thread-unread { align-self: center; background: #d97706; color: #fff; border-radius: 999px; min-width: 20px; padding: 0.16rem 0.4rem; font-size: 0.68rem; font-weight: 800; text-align: center; }

.cleaner-conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: linear-gradient(180deg, #fbfaf6 0%, #f3f0e8 100%);
}

.cleaner-empty-state { margin: auto; }

.cleaner-conv-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e5e1d6;
  background: rgba(255,255,255,0.8);
}
.cleaner-conv-title { min-width: 0; flex: 1; }
.cleaner-conv-header h3 { margin: 0; color: #1b4332; font-size: 1rem; }
.cleaner-conv-header p { margin-top: 0.15rem; color: #6b7280; font-size: 0.78rem; }
.cleaner-account-toggle-card {
  margin-left: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d6ccb9;
  border-radius: 12px;
  background: #fffaf1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 250px;
}
.cleaner-account-toggle-card strong { display: block; color: #1b4332; font-size: 0.74rem; }
.cleaner-account-toggle-card span[id] { display: block; margin-top: 0.12rem; color: #6b7280; font-size: 0.68rem; line-height: 1.2; }
.cleaner-contact-open-btn {
  border: 1px solid #cbd8ce;
  border-radius: 999px;
  background: #fffdf8;
  color: #1b4332;
  font-weight: 900;
  padding: 0.52rem 0.8rem;
  cursor: pointer;
}
.cleaner-contact-open-btn:hover { background: #edf5ef; }
.mobile-cleaner-back { display: none; }

.cleaner-conv-messages {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cleaner-msg-bubble {
  max-width: min(680px, 78%);
  padding: 0.72rem 0.85rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17,24,39,0.06);
}
.cleaner-msg-bubble.inbound { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.cleaner-msg-bubble.outbound { align-self: flex-end; background: #dceee5; border-bottom-right-radius: 4px; }
.cleaner-msg-bubble.system { background: #eef3f7; border: 1px solid #d5dee8; }
.cleaner-msg-sender { font-size: 0.72rem; font-weight: 800; color: #1b4332; margin-bottom: 0.28rem; }
.cleaner-msg-system-badge,
.cleaner-system-inline {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e7edf4;
  color: #36536c;
  font-size: 0.66rem;
  font-weight: 850;
  padding: 0.12rem 0.42rem;
}
.cleaner-msg-system-badge { margin-left: 0.45rem; }
.cleaner-system-inline { margin-right: 0.24rem; vertical-align: 1px; }
.cleaner-msg-body { white-space: normal; line-height: 1.42; font-size: 0.9rem; color: #1f2937; }
.cleaner-msg-time { margin-top: 0.38rem; font-size: 0.68rem; color: #6b7280; text-align: right; }
.cleaner-no-messages { margin: auto; color: #9ca3af; font-size: 0.9rem; }

.cleaner-composer {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid #e5e1d6;
  background: rgba(255,255,255,0.88);
}
.cleaner-composer-hint { color: #6b7280; font-size: 0.74rem; margin-bottom: 0.45rem; }
.cleaner-composer-row { display: flex; align-items: flex-end; gap: 0.65rem; }
.cleaner-composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  padding: 0.72rem 0.85rem;
  border: 1px solid #d6ccb9;
  border-radius: 14px;
  font: inherit;
  background: #fff;
}
.cleaner-send { flex: 0 0 auto; }
.cleaner-send:disabled { opacity: 0.55; cursor: wait; }

@media (max-width: 780px) {
  .cleaner-msgs-shell { grid-template-columns: 1fr; }
  .cleaner-msgs-sidebar { max-height: 36vh; border-right: none; border-bottom: 1px solid #e5e1d6; }
  .cleaner-msg-bubble { max-width: 92%; }
}

/* Seller Tools */
.seller-tools-toggle-card {
  background: linear-gradient(135deg, #fffaf1, #ffffff);
  border-color: #ead8b8;
}

.seller-tools-head { align-items: center; }
.seller-tools-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #8a6f3a;
}
.seller-tools-summary {
  margin: 0.6rem 0 0;
  color: #374151;
  font-size: 0.9rem;
}
.seller-tools-switch {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 30px;
}
.seller-tools-switch input { display: none; }
.seller-tools-switch span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .18s ease;
}
.seller-tools-switch span::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
  transition: transform .18s ease;
}
.seller-tools-switch input:checked + span { background: #1b4332; }
.seller-tools-switch input:checked + span::after { transform: translateX(24px); }
.seller-tools-detail-card { border-color: #c7e2d2; }
.seller-tools-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .55rem;
  background: #f3f4f6;
  color: #6b7280;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.seller-tools-pill.active { background: #d1fae5; color: #065f46; }
.seller-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.seller-tools-field,
.seller-tools-check {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.seller-tools-field-wide { grid-column: 1 / -1; }
.seller-tools-field input,
.seller-tools-field textarea,
.seller-tools-field select,
.seller-showing-form input {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .65rem .75rem;
  font-size: .9rem;
  color: #111827;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  background: #fff;
}
.seller-tools-field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}
.seller-tools-field small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: #9ca3af;
}
.seller-link-row,
.seller-tools-actions,
.seller-showing-form {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.seller-link-row input { flex: 1; }
.seller-tools-check {
  flex-direction: row;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  color: #1f2937;
}
.seller-tools-actions { margin-top: .85rem; }
.seller-tools-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1b4332;
  border-radius: 10px;
  padding: .6rem .85rem;
  font-weight: 800;
  cursor: pointer;
}
.seller-tools-btn.primary {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}

.seller-tools-btn.drive {
  background: linear-gradient(180deg, #e0f2fe, #bfdbfe);
  border-color: #60a5fa;
  color: #1d4ed8;
}
.seller-tools-btn.drive:disabled {
  opacity: .52;
  cursor: not-allowed;
  filter: grayscale(.25);
}
.suapi-images-subhead {
  margin: .9rem 0 .5rem;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6b7280;
}
.suapi-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .6rem;
}
.suapi-image-tile {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.suapi-image-tile img,
.suapi-image-tile-placeholder {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  font-size: 1.6rem;
  line-height: 90px;
  text-align: center;
  background: #f3f4f6;
}
.suapi-image-tile figcaption {
  padding: .4rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suapi-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .5rem;
  align-items: end;
  margin-bottom: .5rem;
}
.suapi-image-remove {
  padding: .55rem .7rem;
}
.suapi-images-status {
  font-size: .8rem;
  font-weight: 700;
  color: #6b7280;
}
.suapi-images-status.success { color: #065f46; }
.suapi-images-status.error { color: #b91c1c; }

.prop-fee-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .65rem 0 .15rem;
}
.prop-fee-strip span {
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: .76rem;
  font-weight: 800;
  padding: .28rem .55rem;
}

.fee-customization-card {
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  border-color: #cfe0ef;
}
.pet-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.pet-policy-warnings {
  display: grid;
  gap: .4rem;
  margin-top: .85rem;
}
.pet-policy-warnings p {
  margin: 0;
  border: 1px solid #f8d28b;
  border-radius: 10px;
  background: #fff8e6;
  color: #7c4a03;
  padding: .6rem .75rem;
  font-size: .84rem;
  font-weight: 700;
}
.pet-policy-status {
  color: #6b7280;
  font-size: .82rem;
  font-weight: 700;
}
.fee-panel-subsection {
  border-top: 1px solid #e5edf5;
  padding-top: .95rem;
  margin-top: .95rem;
}
.fee-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}
.fee-subhead h4 {
  margin: 0;
  color: #1f2937;
  font-size: .96rem;
}
.fee-section-note {
  margin: -.35rem 0 .7rem;
}
.fee-table {
  display: grid;
  gap: .8rem;
}
.fee-row {
  display: grid;
  grid-template-columns: auto minmax(140px, 1.2fr) minmax(112px, .75fr) minmax(86px, .55fr) minmax(104px, .7fr) minmax(118px, .75fr) minmax(140px, 1fr);
  gap: .6rem;
  align-items: end;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #fff;
  padding: .75rem;
}
.fee-check,
.fee-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 38px;
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
}
.fee-check input,
.fee-toggle input {
  width: 16px;
  height: 16px;
}
.fee-notes-field {
  grid-column: 2 / -1;
}
.fee-toggle {
  align-self: center;
}
.fee-remove-btn {
  grid-column: -2 / -1;
  justify-self: end;
}
.seller-showing-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f7;
}
.property-section-head.compact h4 { margin: 0; color: #1b4332; }
.seller-showing-form { margin: .7rem 0; }
.seller-showing-form input[type="text"] { flex: 1; }
.seller-hold-list { display: grid; gap: .45rem; }
.seller-hold-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fbfcfd;
  font-size: .85rem;
}
.seller-hold-row span { color: #6b7280; }
@media (max-width: 760px) {
  .seller-tools-grid,
  .pet-policy-grid { grid-template-columns: 1fr; }
  .fee-row { grid-template-columns: 1fr; }
  .fee-notes-field,
  .fee-remove-btn { grid-column: auto; }
  .seller-link-row,
  .seller-tools-actions,
  .seller-showing-form { flex-direction: column; align-items: stretch; }
}


/* ===== DATA EXPORT ===== */
.data-export-shell { padding: 1.5rem 2rem 2rem; display: flex; flex-direction: column; gap: 1rem; }
.data-export-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 1.25rem; box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04); }
.data-export-intro h2 { margin: 0.2rem 0 0.35rem; font-family: 'Public Sans', sans-serif; color: #1b4332; }
.data-export-intro p { margin: 0; color: #6b7280; }
.data-export-grid { display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr); gap: 1rem; align-items: start; }
.data-export-chat label { display: block; font-weight: 700; color: #1f2937; margin-bottom: 0.45rem; }
.data-export-chat textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 12px; padding: 0.8rem; font-family: inherit; resize: vertical; min-height: 120px; }
.data-export-options, .data-export-format { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.data-export-options label, .data-export-format label { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: #374151; }
.data-export-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.data-export-status { margin: 0.8rem 0 0; color: #6b7280; font-size: 0.9rem; }
.data-export-result-empty { color: #9ca3af; padding: 1rem 0; }
.data-export-result-list { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
.data-export-table-preview { border: 1px solid #e5e7eb; border-radius: 12px; padding: 0.85rem; background: #fafaf8; }
.data-export-table-preview strong { color: #1b4332; margin-right: 0.5rem; }
.data-export-table-preview span, .data-export-table-preview small { color: #6b7280; }
.data-export-table-preview pre { max-height: 220px; overflow: auto; background: #111827; color: #e5e7eb; padding: 0.75rem; border-radius: 10px; font-size: 0.75rem; }
@media (max-width: 900px) { .data-export-grid { grid-template-columns: 1fr; } }
.msg-bubble.system {
  background:#fffbeb;
  border:1px solid #fcd34d;
  color:#78350f;
  align-self:center;
  max-width:min(82%, calc(100% - 1.5rem));
}

.msg-bubble.system .msg-translation { display:none; }

/* ===== SU API INTEGRATION PANEL ===== */
.suapi-integration-section { grid-column: 1 / -1; }
.suapi-status-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700;
  background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb;
}
.suapi-status-pill.status-ready { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.suapi-status-pill.status-partial { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.suapi-status-pill.status-blocked { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.suapi-status-pill.status-unknown { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.suapi-meta-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  margin-bottom: 0.85rem; color: #4b5563; font-size: 0.8rem;
}
.suapi-meta-row code {
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0.05rem 0.35rem; font-size: 0.75rem;
}
.suapi-checks-grid {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 1rem;
}
.suapi-check-item {
  padding: 0.7rem 0.8rem; border-radius: 12px;
  background: #f9faf8; border: 1px solid #edf1ea;
}
.suapi-check-item.is-ok { border-color: #bbf7d0; background: #f0fdf4; }
.suapi-check-item.is-fail { border-color: #fecaca; background: #fef2f2; }
.suapi-check-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
}
.suapi-check-name { font-weight: 700; color: #1f2937; font-size: 0.85rem; }
.suapi-check-icon { font-size: 0.95rem; }
.suapi-check-summary {
  margin: 0.25rem 0 0; color: #4b5563; font-size: 0.78rem;
  word-break: break-word;
}
.suapi-check-endpoint {
  margin-top: 0.3rem; color: #9ca3af; font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.suapi-airbnb-card {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem; border-radius: 14px;
  background: #f9faf8; border: 1px solid #edf1ea;
}
.suapi-airbnb-card.is-mapped { background: #f0fdf4; border-color: #bbf7d0; }
.suapi-airbnb-card.is-unavailable { background: #fef9c3; border-color: #fde68a; }
.suapi-airbnb-card.is-not-mapped { background: #fef2f2; border-color: #fecaca; }
.suapi-airbnb-head {
  display: flex; justify-content: space-between; gap: 0.75rem;
  align-items: baseline; flex-wrap: wrap;
}
.suapi-airbnb-head h4 { margin: 0; font-size: 0.95rem; color: #1f2937; }
.suapi-airbnb-detail { margin: 0.4rem 0 0; color: #4b5563; font-size: 0.82rem; }
.suapi-airbnb-rooms {
  margin-top: 0.45rem; display: flex; gap: 0.35rem; flex-wrap: wrap;
}
.suapi-checklist {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.suapi-checklist li {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.55rem 0.7rem; border-radius: 10px;
  background: #f9faf8; border: 1px solid #edf1ea;
  font-size: 0.85rem; color: #1f2937;
}
.suapi-checklist li::before {
  content: ""; flex: 0 0 14px; height: 14px;
  margin-top: 0.18rem; border-radius: 4px;
  border: 1.5px solid #9ca3af; background: #fff;
}
.suapi-checklist li.warn::before { border-color: #f59e0b; background: #fffbeb; }
.suapi-checklist-note {
  margin: 0.5rem 0 0; color: #6b7280; font-size: 0.78rem;
}
.suapi-action-row {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem;
}
.suapi-disabled-btn {
  padding: 0.45rem 0.85rem; border-radius: 10px;
  background: #f3f4f6; color: #9ca3af;
  border: 1px dashed #d1d5db; font-weight: 600; font-size: 0.82rem;
  cursor: not-allowed;
}
.suapi-refresh-btn {
  padding: 0.45rem 0.85rem; border-radius: 10px;
  background: #1b4332; color: #fff; border: none;
  font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.suapi-refresh-btn:hover { background: #2d6a4f; }
.suapi-refresh-btn.secondary {
  background: #f9fafb;
  color: #1f2937;
  border: 1px solid #d1d5db;
}
.suapi-refresh-btn.secondary:hover { background: #f3f4f6; }
.suapi-publish-head-actions { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; justify-content: flex-end; }
body.suapi-publish-open { overflow: hidden; }
.suapi-publish-modal {
  position: fixed; inset: 0; z-index: 10050; padding: 2vh 2vw;
  display: grid; place-items: center; background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
}
.suapi-publish-dialog {
  width: min(1180px, 96vw); max-height: 96vh; overflow: auto;
  border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.38);
}
.suapi-publish-titlebar {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.35rem; color: #fff; background: linear-gradient(135deg, #163c2f, #245a43);
}
.suapi-publish-titlebar h2 { margin: 0.15rem 0 0; font-size: 1.45rem; }
.suapi-publish-titlebar p { margin: 0.35rem 0 0; max-width: 760px; color: #d9eee4; font-size: 0.86rem; }
.suapi-publish-titlebar .property-workspace-eyebrow { color: #b9dbc9; }
.suapi-publish-close {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.suapi-publish-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 1rem; padding: 1.1rem; }
.suapi-publish-form, .suapi-publish-preview {
  min-width: 0; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1rem; background: #fbfdfb;
}
.suapi-publish-preview { background: #f8fafc; }
.suapi-publish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.suapi-publish-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.suapi-publish-field.full { margin-top: 0.75rem; }
.suapi-publish-field span { color: #334155; font-size: 0.76rem; font-weight: 750; }
.suapi-publish-field input, .suapi-publish-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 0.62rem 0.7rem; color: #0f172a; background: #fff; font: inherit; font-size: 0.86rem;
}
.suapi-publish-field input:focus, .suapi-publish-field textarea:focus { outline: 2px solid #86bfa3; border-color: #2d6a4f; }
.suapi-publish-safety {
  display: grid; gap: 0.45rem; margin: 0.8rem 0; padding: 0.75rem;
  border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb;
}
.suapi-publish-safety label { display: flex; align-items: flex-start; gap: 0.5rem; color: #713f12; font-size: 0.8rem; font-weight: 650; }
.suapi-publish-summary { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem; border-radius: 12px; margin-bottom: 0.65rem; }
.suapi-publish-summary.ready { color: #166534; background: #ecfdf5; border: 1px solid #bbf7d0; }
.suapi-publish-summary.blocked { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.suapi-publish-summary span { font-size: 0.78rem; }
.suapi-publish-alert { margin: 0.45rem 0; padding: 0.65rem 0.75rem; border-radius: 10px; font-size: 0.79rem; }
.suapi-publish-alert.error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.suapi-publish-alert.warning { color: #854d0e; background: #fefce8; border: 1px solid #fde68a; }
.suapi-publish-alert.success { color: #166534; background: #ecfdf5; border: 1px solid #bbf7d0; }
.suapi-publish-stages { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.suapi-publish-stage {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 0.65rem;
  padding: 0.7rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
}
.suapi-publish-stage.done { border-color: #86efac; background: #f0fdf4; }
.suapi-publish-stage-index { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: #e2e8f0; color: #334155; font-weight: 800; }
.suapi-publish-stage.done .suapi-publish-stage-index { color: #fff; background: #16a34a; }
.suapi-publish-stage strong, .suapi-publish-stage code, .suapi-publish-stage small { display: block; }
.suapi-publish-stage strong { color: #1e293b; font-size: 0.83rem; }
.suapi-publish-stage code { margin-top: 0.25rem; color: #64748b; white-space: normal; word-break: break-word; font-size: 0.68rem; }
.suapi-publish-stage small { margin-top: 0.2rem; color: #92400e; font-size: 0.7rem; }
.suapi-publish-stage button:disabled { opacity: .45; cursor: not-allowed; }
.suapi-publish-log { margin-top: 0.8rem; }
.suapi-publish-widget { margin: 0 1.1rem 1.1rem; padding: 1rem; min-height: 160px; border: 1px solid #bfdbfe; border-radius: 16px; background: #eff6ff; }
.suapi-publish-widget-note { margin-bottom: 0.75rem; color: #1e40af; font-size: 0.82rem; font-weight: 700; }
@media (max-width: 860px) {
  .suapi-publish-modal { padding: 0; place-items: stretch; }
  .suapi-publish-dialog { width: 100%; max-height: 100vh; border-radius: 0; }
  .suapi-publish-body { grid-template-columns: 1fr; }
  .suapi-publish-grid { grid-template-columns: 1fr; }
  .suapi-publish-stage { grid-template-columns: 30px minmax(0, 1fr); }
  .suapi-publish-stage button { grid-column: 2; justify-self: start; }
}
.crossboarding-subtitle {
  margin: 0.15rem 0 0;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 500;
}
.crossboarding-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}
.crossboarding-summary strong,
.crossboarding-notes strong,
.crossboarding-insights strong,
.crossboarding-artifacts strong,
.crossboarding-events strong {
  display: block;
  color: #111827;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}
.crossboarding-summary p {
  margin: 0;
  color: #374151;
  font-size: 0.86rem;
}
.crossboarding-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.45rem;
}
.crossboarding-summary-grid span {
  display: block;
  padding: 0.5rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
}
.crossboarding-summary-grid b {
  display: block;
  color: #6b7280;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0;
}
.crossboarding-summary-grid em {
  display: block;
  color: #111827;
  font-style: normal;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 0.08rem;
}
.crossboarding-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.crossboarding-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.crossboarding-step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.crossboarding-step.completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.crossboarding-step.ready {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.crossboarding-step.blocked {
  border-color: #fecaca;
  background: #fef2f2;
}
.crossboarding-step.needs-review {
  border-color: #fde68a;
  background: #fffbeb;
}
.crossboarding-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}
.crossboarding-step-title {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}
.crossboarding-step-title strong {
  color: #111827;
  font-size: 0.88rem;
}
.crossboarding-step-title span {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  color: #374151;
  border: 1px solid #d1d5db;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.crossboarding-step-main p {
  margin: 0.22rem 0 0;
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.35;
}
.crossboarding-step-meta,
.crossboarding-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.crossboarding-step-meta span {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.68rem;
  font-weight: 700;
}
.crossboarding-operator-prompt,
.crossboarding-bella-guidance,
.crossboarding-next-action,
.crossboarding-blockers,
.crossboarding-acceptance {
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  color: #374151;
  font-size: 0.78rem;
  line-height: 1.35;
}
.crossboarding-bella-guidance { background: #f8fafc; }
.crossboarding-next-action { background: #ecfdf5; border-color: #bbf7d0; }
.crossboarding-blockers { background: #fff1f2; border-color: #fecdd3; }
.crossboarding-operator-prompt b,
.crossboarding-bella-guidance b,
.crossboarding-next-action b,
.crossboarding-blockers b {
  display: block;
  margin-bottom: 0.2rem;
  color: #111827;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
}
.crossboarding-blockers ul,
.crossboarding-acceptance ul,
.crossboarding-insights ol {
  margin: 0;
  padding-left: 1.1rem;
}
.crossboarding-acceptance summary {
  cursor: pointer;
  font-weight: 800;
  color: #111827;
}
.crossboarding-evidence code,
.crossboarding-artifacts code {
  display: inline-block;
  max-width: 100%;
  padding: 0.22rem 0.4rem;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}
.crossboarding-step-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.crossboarding-log-btn,
.crossboarding-run-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}
.crossboarding-log-btn:hover { background: #f9fafb; }
.crossboarding-run-btn {
  background: #1b4332;
  border-color: #1b4332;
  color: #fff;
}
.crossboarding-run-btn:hover { background: #2d6a4f; }
.crossboarding-run-btn.secondary {
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
}
.crossboarding-run-btn.secondary:hover { background: #f9fafb; }
.crossboarding-run-btn:disabled,
.crossboarding-log-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.crossboarding-notes,
.crossboarding-insights,
.crossboarding-artifacts,
.crossboarding-events {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.crossboarding-notes ul {
  margin: 0;
  padding-left: 1rem;
  color: #4b5563;
  font-size: 0.8rem;
}
.crossboarding-insights li {
  margin: 0.18rem 0;
  color: #4b5563;
  font-size: 0.8rem;
}
.crossboarding-artifacts summary {
  cursor: pointer;
  font-weight: 800;
  color: #111827;
  font-size: 0.82rem;
}
.crossboarding-artifacts div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.crossboarding-events p {
  margin: 0.28rem 0 0;
  color: #4b5563;
  font-size: 0.78rem;
}
.crossboarding-events span {
  color: #6b7280;
  font-weight: 700;
}
@media (max-width: 760px) {
  .crossboarding-summary {
    grid-template-columns: 1fr;
  }
  .crossboarding-summary-grid {
    grid-template-columns: 1fr;
  }
  .crossboarding-step {
    grid-template-columns: 28px 1fr;
  }
  .crossboarding-step-actions {
    grid-column: 2;
    justify-self: start;
  }
}
.msg-badge.system { background:#fef3c7; color:#92400e; border:1px solid #fcd34d; }

.calendar-mode-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #f9fafb;
}

.calendar-mode-toggle button {
  border: 0;
  background: transparent;
  padding: 0.42rem 0.65rem;
}

.calendar-mode-toggle button.active {
  background: #2f4b3d;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
}

.calendar-gantt {
  background: #fff;
  border: 1px solid #dfe5dc;
  border-radius: 8px;
  padding: 0.8rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.calendar-gantt-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.calendar-gantt-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: #111827;
}

.calendar-gantt-head p {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
}

.calendar-gantt-drill,
.calendar-gantt-property.property-link {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.calendar-gantt-scroll {
  /* Sticky descendants bind to the nearest overflow ancestor. Keep both axes
     on this element so the date header follows the body that actually scrolls. */
  overflow: auto;
  max-height: max(320px, calc(100vh - 300px));
  padding-bottom: 0.4rem;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  position: relative;
}

.calendar-gantt-header,
.calendar-gantt-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-width: calc(180px + var(--days, 90) * 72px);
  gap: 0.35rem;
  align-items: stretch;
}

.calendar-gantt-header {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #fff;
  margin-bottom: 0.4rem;
}

.calendar-gantt-row {
  margin-bottom: 0.4rem;
}

.calendar-gantt-property-spacer {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #fff;
  box-shadow: 10px 0 14px rgba(255,255,255,0.95);
}

.calendar-gantt-cells {
  display: grid;
  grid-template-columns: repeat(var(--half-days, 60), minmax(36px, 1fr));
  gap: 0;
}

.calendar-gantt-header-cells .calendar-gantt-date { grid-column: span 2; }

.calendar-gantt-row-cells {
  position: relative;
  grid-auto-rows: 58px;
  gap: 0;
  z-index: 1;
}

.calendar-gantt-property {
  position: sticky;
  left: 0;
  z-index: 7;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #111827;
  text-align: left;
  box-shadow: 10px 0 14px rgba(255,255,255,0.95), 1px 0 0 #e5e7eb;
  isolation: isolate;
}

.calendar-gantt-property-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-property-status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.calendar-property-status-strip strong,
.calendar-property-status-kicker {
  display: block;
}

.calendar-property-status-kicker {
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-property-status {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  width: fit-content;
  min-height: 28px;
  margin-top: 0.45rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f9fafb;
  color: #374151;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.calendar-property-status.month {
  margin-top: 0;
}

.calendar-property-status.clean { background: #ecfdf5; border-color: #86efac; color: #166534; }
.calendar-property-status.dirty { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.calendar-property-status.inspection { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.calendar-property-status.unset { background: #f3f4f6; border-color: #d1d5db; color: #4b5563; }

.calendar-property-status-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.calendar-property-status-menu {
  position: absolute;
  z-index: 90;
  width: min(248px, calc(100vw - 24px));
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.calendar-property-status-menu-title {
  margin-bottom: 0.55rem;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 800;
}

.calendar-property-status-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.48rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.calendar-property-status-choice.clean { color: #166534; }
.calendar-property-status-choice.dirty { color: #991b1b; }
.calendar-property-status-choice.inspection { color: #92400e; }
.calendar-property-status-choice.active { background: #f3f4f6; border-color: currentColor; }

.calendar-property-status-meta {
  margin-top: 0.55rem;
  color: #6b7280;
  font-size: 0.72rem;
}

.calendar-gantt-date {
  border-radius: 5px;
  background: #f8faf7;
  border: 1px solid #dfe5dc;
  color: #374151;
  min-width: 0;
  padding: 0.34rem 0.22rem;
  text-align: center;
  font-size: 0.72rem;
}

.calendar-gantt-date strong { display: block; font-size: 0.85rem; color: #111827; }
.calendar-gantt-date.today {
  outline: 3px solid #dc2626;
  outline-offset: 2px;
  background: #fff7ed;
  color: #991b1b;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16);
}

.calendar-gantt-cell {
  min-height: 58px;
  grid-row: 1;
  border-radius: 0;
  border: 1px solid #e1e7de;
  margin-left: -1px;
  padding: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.calendar-gantt-row-cells .calendar-gantt-cell.booked,
.calendar-gantt-row-cells .calendar-gantt-cell.blocked,
.calendar-gantt-row-cells .calendar-gantt-cell.agent-block {
  background: #fbfcfd;
  border-color: #d9e1ea;
  color: #607083;
}

.calendar-gantt-event {
  grid-row: 1;
  align-self: center;
  z-index: 2;
  min-width: 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 5px;
  padding: 0 0.7rem;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.14);
  overflow: hidden;
}

.calendar-gantt-event span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-gantt-event.booking { background: #58a88f; }
.calendar-gantt-event.owner-reservation { background: #2563eb; }
.calendar-gantt-event.block { background: #4e555b; }
.calendar-gantt-event.agent-block { background: #6d5bd0; }

.calendar-gantt-event.start-angled {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

.calendar-gantt-event.end-angled {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.calendar-gantt-event.start-angled.end-angled {
  border-radius: 5px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.calendar-gantt-cell.today {
  border-color: #dc2626 !important;
  outline: 3px solid #dc2626;
  outline-offset: 2px;
  box-shadow: inset 5px 0 0 #dc2626, 0 0 0 4px rgba(220, 38, 38, 0.18);
}

.calendar-gantt-cell span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-gantt-cell.available { background: #ecfdf5; border-color: #86efac; color: #166534; }
.calendar-gantt-cell.booked { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.calendar-gantt-cell.owner-reservation { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.calendar-gantt-cell.blocked { background: #f3f4f6; border-color: #d1d5db; color: #4b5563; }
.calendar-gantt-cell.agent-block { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }

.calendar-day-straddle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 28px;
  margin: 0.32rem -0.12rem 0.2rem;
  pointer-events: none;
}

.calendar-straddle-half {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 28px;
  padding: 0 0.34rem;
  background: #58a88f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  overflow: hidden;
}

.calendar-straddle-half span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-straddle-half.checkout {
  border-radius: 5px 0 0 5px;
}

.calendar-straddle-half.checkin {
  border-radius: 0 5px 5px 0;
}

.calendar-gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  color: #6b7280;
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}

.calendar-gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.calendar-gantt-legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid transparent;
}

.calendar-gantt-legend i.available { background: #86efac; border-color: #86efac; }
.calendar-gantt-legend i.booked { background: #fca5a5; border-color: #fca5a5; }
.calendar-gantt-legend i.owner-reservation { background: #2563eb; border-color: #2563eb; }
.calendar-gantt-legend i.blocked { background: #d1d5db; border-color: #d1d5db; }
.calendar-gantt-legend i.agent-block { background: #c4b5fd; border-color: #c4b5fd; }

.legend-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
  margin-right: -0.55rem;
}
.legend-dot.available { background: #86efac; }
.legend-dot.booked { background: #fca5a5; }
.legend-dot.blocked { background: #d1d5db; }
.legend-dot.agent-block { background: #c4b5fd; }

/* Bella dashboard drawer */
.bella-dashboard-widget {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, calc(100vw - 18px));
  z-index: 12000;
  font-family: inherit;
  color: #17202a;
  pointer-events: none;
}

/* Position variants */
.bella-dashboard-widget.bella-pos-right {
  top: 0; right: 0; bottom: 0; left: auto;
  width: min(420px, calc(100vw - 18px));
}
.bella-dashboard-widget.bella-pos-left {
  top: 0; left: 0; bottom: 0; right: auto;
  width: min(420px, calc(100vw - 18px));
}
.bella-dashboard-widget.bella-pos-left .bella-dashboard-panel {
  border-left: none;
  border-right: 1px solid rgba(31, 111, 91, 0.18);
  box-shadow: 20px 0 48px rgba(15, 23, 42, 0.18);
}
.bella-dashboard-widget.bella-pos-left .bella-dashboard-tab {
  left: auto;
  right: -38px;
  border: 1px solid rgba(31, 111, 91, 0.22);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.bella-dashboard-widget.bella-pos-bottom {
  top: auto; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: min(380px, 50vh);
}
.bella-dashboard-widget.bella-pos-bottom .bella-dashboard-panel {
  width: 100%;
  height: 100%;
  min-width: unset;
  border-left: none;
  border-top: 1px solid rgba(31, 111, 91, 0.18);
  border-radius: 0;
  box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.18);
}
.bella-dashboard-widget.bella-pos-bottom .bella-dashboard-tab {
  display: none;
}
.bella-dashboard-widget.bella-pos-bottom.collapsed #btnAskBella {
  display: flex;
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  min-width: unset;
  max-width: unset;
  padding: 10px 20px;
  border-radius: 24px;
  writing-mode: horizontal-tb;
  transform: none;
  box-shadow: 0 4px 16px rgba(15,23,42,0.2);
  z-index: 12001;
  font-size: 0.85rem;
  pointer-events: auto;
}
.bella-dashboard-widget.bella-pos-bottom.collapsed #btnAskBella span {
  writing-mode: horizontal-tb;
  transform: none;
}
.bella-dashboard-widget.bella-pos-bottom.collapsed {
  height: 0;
  width: 100%;
}
.bella-dashboard-widget.bella-pos-bottom.collapsed .bella-dashboard-panel {
  transform: translateY(100%);
}
.bella-dashboard-widget.bella-pos-left.collapsed .bella-dashboard-panel {
  transform: translateX(-100%);
}

.bella-dashboard-tab {
  position: absolute;
  left: -38px;
  top: 45%;
  width: 38px;
  height: 106px;
  border: 1px solid rgba(31, 111, 91, 0.22);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #1f6f5b;
  color: #fff;
  box-shadow: -8px 8px 24px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: auto;
  display: grid;
  place-items: center;
}

.bella-dashboard-tab span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.bella-dashboard-tab:hover,
.bella-dashboard-tab.active {
  background: #d4a853;
  color: #173d32;
}

.bella-dashboard-panel {
  width: 100%;
  height: 100%;
  min-width: 320px;
  background: #fff;
  border-left: 1px solid rgba(31, 111, 91, 0.18);
  border-radius: 0;
  box-shadow: -20px 0 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.bella-dashboard-widget.collapsed {
  width: 0;
  overflow: visible;
}

.bella-dashboard-widget.collapsed .bella-dashboard-panel {
  transform: translateX(100%);
}

.bella-dashboard-head {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #123c33, #1f6f5b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.bella-dashboard-head strong { display: block; font-size: 1rem; }
.bella-dashboard-head span { display: block; font-size: 0.75rem; opacity: 0.82; }

.bella-controls-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.bella-controls-toggle:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(45deg);
}
.bella-controls-toggle svg {
  display: block;
}

.bella-pos-btn {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}
.bella-pos-btn:hover {
  border-color: #1f6f5b;
  color: #1f6f5b;
}
.bella-pos-btn.active {
  background: #1f6f5b;
  color: #fff;
  border-color: #1f6f5b;
}

.bella-dashboard-minimize {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.bella-dashboard-messages {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  background: #f8faf9;
}

.bella-dashboard-message {
  max-width: 88%;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}

.bella-dashboard-message strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  color: #64748b;
}

.bella-dashboard-message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.bella-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.bella-choice-btn {
  border: 1px solid rgba(31, 111, 91, 0.22);
  border-radius: 8px;
  background: #f6faf8;
  color: #173d32;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.bella-choice-btn:hover {
  background: #e7f2ed;
}

.bella-choice-btn.primary {
  background: #1f6f5b;
  border-color: #1f6f5b;
  color: #fff;
}

.bella-choice-btn.danger {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.bella-dashboard-message.from-bella {
  background: #fff;
  border: 1px solid #e2e8f0;
}

.bella-dashboard-message.from-user {
  margin-left: auto;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.bella-action-card {
  max-width: 96%;
}

.bella-proposed-action {
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.bella-action-title {
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
}

.bella-proposed-action ul {
  margin: 0.45rem 0;
  padding-left: 1rem;
  font-size: 0.78rem;
  color: #475569;
}

.bella-action-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.bella-action-controls button {
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.bella-confirm-action {
  background: #1f6f5b;
  color: #fff;
}

.bella-cancel-action {
  background: #e2e8f0;
  color: #334155;
}

.bella-action-status {
  font-size: 0.78rem;
  color: #64748b;
}

.bella-action-status.success { color: #047857; }
.bella-action-status.error { color: #b91c1c; }

.bella-dashboard-form {
  display: flex;
  gap: 0.55rem;
  padding: 0.8rem;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.bella-dashboard-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.bella-dashboard-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 0.9rem;
  background: #1f6f5b;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Cleaner contact cards + property cleaning requirements ===== */
.cleaner-contact-card {
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(27,67,50,0.14);
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: 0 10px 28px rgba(21,55,40,0.07);
}
.cleaner-contact-modal { width: min(760px, calc(100vw - 32px)); }
.cleaner-contact-modal-body { padding: 0; overflow-y: auto; }
.cleaner-contact-modal .cleaner-contact-card { border: 0; box-shadow: none; border-radius: 0; }
.cleaner-contact-head,
.cleaner-contact-actions,
.cleaner-context-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.cleaner-contact-head h4 { margin: 0 0 .2rem; color: #173c2c; }
.cleaner-contact-head p,
.cleaner-context-row span,
.cleaner-contact-actions span { color: #647067; font-size: .84rem; }
.cleaner-draft-pill {
  background: #edf5ef;
  color: #1b4332;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.cleaner-missing {
  margin: .8rem 0;
  padding: .55rem .7rem;
  border-radius: 12px;
  background: #fff2d8;
  color: #7b4c00;
  font-size: .86rem;
}
.cleaner-missing.is-complete { background: #eaf7ef; color: #1b6b3a; }
.cleaner-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.cleaner-contact-grid label,
.cleaner-contact-notes,
.cleaning-req-grid label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  color: #526059;
  font-size: .8rem;
  font-weight: 800;
}
.cleaner-contact-grid input,
.cleaner-contact-notes textarea,
.cleaning-req-grid textarea {
  width: 100%;
  border: 1px solid #d7ded8;
  border-radius: 12px;
  padding: .65rem .75rem;
  font: inherit;
  color: #173c2c;
  background: #fff;
}
.cleaner-contact-notes { margin-top: .75rem; }
.cleaner-portal-status {
  margin-top: .8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.cleaner-portal-status > div {
  min-width: 0;
  border: 1px solid #dbe6dd;
  border-radius: 12px;
  background: #f8fbf7;
  padding: .65rem .75rem;
}
.cleaner-portal-status span {
  display: block;
  margin-bottom: .2rem;
  color: #647067;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cleaner-portal-status strong {
  color: #173c2c;
  font-size: .9rem;
}
.cleaner-portal-status.compact {
  margin: .65rem .75rem .5rem;
  padding-top: .65rem;
  border-top: 1px solid var(--border);
}
.cleaner-portal-status.compact > div {
  padding: .5rem .55rem;
  background: #fff;
}
.cleaner-invite-status.not-invited { color: #6b7280; }
.cleaner-invite-status.invited { color: #b7791f; }
.cleaner-invite-status.joined { color: #047857; }
.cleaner-context-row { margin-top: .8rem; }
.cleaner-context-row > div { flex: 1; }
.cleaner-context-row strong { display: block; color: #173c2c; margin-bottom: .2rem; }
.cleaner-save-draft-btn,
.cleaning-req-save,
.cleaning-req-open {
  border: 0;
  border-radius: 999px;
  background: #1b4332;
  color: #fff;
  font-weight: 800;
  padding: .55rem .85rem;
  cursor: pointer;
}
.cleaner-card-actions {
  border-top: 1px solid var(--border);
  padding: .55rem .75rem 0;
}
.cleaner-invite-btn {
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  padding: .45rem .75rem;
  cursor: pointer;
}
.cleaner-invite-btn:hover { background: #1d4ed8; }
.cleaner-invite-btn.is-sent {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.cleaner-invite-btn.is-sent:hover { background: #d1fae5; }
.cleaner-invite-btn:disabled { opacity: .65; cursor: wait; }
.cleaner-disabled-invite {
  border: 1px solid #d7ded8;
  border-radius: 999px;
  background: #f3f4f1;
  color: #879189;
  font-weight: 800;
  padding: .55rem .85rem;
}
.cleaning-req-open {
  margin-top: .25rem;
  display: inline-flex;
  font-size: .72rem;
  padding: .25rem .55rem;
  background: #edf5ef;
  color: #1b4332;
}
.cleaning-req-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(11,28,20,.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cleaning-req-panel {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fffdf7;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  padding: 1.25rem;
}
.cleaning-req-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cleaning-req-head h3 { margin: 0; color: #173c2c; }
.cleaning-req-head p { margin: .2rem 0 0; color: #66766d; }
#closeCleaningReqBtn {
  border: 0;
  background: #edf5ef;
  color: #1b4332;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  cursor: pointer;
}
.cleaning-req-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.cleaning-req-grid .wide { grid-column: 1 / -1; }
.cleaning-req-actions {
  margin-top: 1rem;
  display: flex;
  gap: .8rem;
  align-items: center;
  color: #66766d;
  font-size: .88rem;
}
@media (max-width: 780px) {
  .cleaner-contact-grid,
  .cleaner-portal-status,
  .cleaning-req-grid { grid-template-columns: 1fr; }
  .cleaner-contact-head,
  .cleaner-contact-actions,
  .cleaner-context-row { flex-direction: column; }
}

/* ===== Unified Cleaning workspace ===== */
.cleaning-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #f7f5ef;
}
.cleaning-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fffdf7;
}
.cleaning-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cleaning-external-link,
.cleaner-app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cbd8ce;
  border-radius: 999px;
  background: #fffdf8;
  color: #1b4332;
  text-decoration: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}
.cleaning-external-link:hover,
.cleaner-app-link:hover {
  background: #edf5ef;
}
.cleaning-page-header h2 {
  margin: 0;
  color: #173c2c;
  font-family: 'Public Sans', sans-serif;
}
.cleaning-page-header p {
  margin: .2rem 0 0;
  color: #647067;
  font-size: .9rem;
}
.cleaning-section-tabs {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  border-radius: 999px;
  background: #edf5ef;
  flex-shrink: 0;
}
.cleaning-section-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1b4332;
  font-weight: 800;
  padding: .55rem .9rem;
  cursor: pointer;
}
.cleaning-section-tab.active {
  background: #1b4332;
  color: #fff;
  box-shadow: 0 8px 22px rgba(27,67,50,.18);
}
.cleaning-section {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.cleaning-section[hidden] { display: none !important; }
.cleaning-section.active { display: block; }
#viewCleaning .turnovers-container,
#viewCleaning .cleaner-msgs-shell {
  height: 100%;
}
#viewCleaning .cleaning-issues-panel {
  margin: 0 0 1rem;
  border: 1px solid #f4c7ab;
  background: #fff7ed;
  border-radius: 8px;
  overflow: hidden;
}
.cleaning-issues-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid #fed7aa;
}
.cleaning-issues-head h3 { margin: 0; color: #7c2d12; }
.cleaning-issues-head > div:last-child { display: flex; gap: .4rem; flex-wrap: wrap; }
.cleaning-issues-head p { margin: .15rem 0 0; color: #9a3412; font-size: .85rem; }
.cleaning-issues-list {
  display: grid;
  gap: .65rem;
  padding: .85rem 1rem 1rem;
}
.cleaning-issues-list[hidden] { display: none; }
.cleaning-issue-card {
  border: 1px solid #fed7aa;
  background: #fff;
  border-radius: 8px;
  padding: .75rem .85rem;
}
.cleaning-issue-card.urgent { border-color: #ef4444; background: #fff1f2; }
.cleaning-issue-card.needs_review { border-color: #f97316; }
.cleaning-issue-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.cleaning-issue-card strong {
  color: #7c2d12;
  text-transform: capitalize;
}
.cleaning-issue-card span {
  color: #647067;
  font-size: .82rem;
  text-align: right;
}
.cleaning-issue-card p {
  margin: .4rem 0 0;
  color: #1f2937;
  font-size: .9rem;
}
.cleaning-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}
.cleaning-issue-actions button,
.turnover-verify-btn {
  min-height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.cleaning-issue-actions button {
  padding: .28rem .55rem;
}
.cleaning-issue-actions button:hover,
.turnover-verify-btn:hover {
  border-color: #1b4332;
  color: #1b4332;
}
.turnover-verify-btn {
  display: block;
  width: fit-content;
  margin-top: .35rem;
  padding: .24rem .5rem;
}
.turnover-issue-badge {
  display: inline-flex;
  width: fit-content;
  margin-left: .5rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .72rem;
  font-weight: 800;
}
.cleaning-proof-card {
  display: grid;
  gap: .4rem;
  max-width: 100%;
  margin-top: .5rem;
  padding: .55rem .65rem;
  border: 1px solid #dbe7dd;
  border-radius: 8px;
  background: #f8fbf8;
}
.cleaning-proof-card.compact { font-size: .76rem; }
.cleaning-proof-head,
.cleaning-proof-photos,
.cleaning-proof-selected {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}
.cleaning-proof-head strong {
  color: #173c2c;
  font-size: .76rem;
}
.cleaning-proof-head span {
  padding: .1rem .35rem;
  border-radius: 999px;
  background: #e8f3ec;
  color: #1b4332;
  font-size: .68rem;
  font-weight: 800;
}
.cleaning-proof-card p {
  margin: 0;
  color: #374151;
  font-size: .78rem;
  line-height: 1.35;
}
.cleaning-proof-photos span,
.cleaning-proof-selected span {
  max-width: 100%;
  padding: .12rem .32rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: .68rem;
  overflow-wrap: anywhere;
}
.cleaning-issue-card .cleaning-proof-card {
  border-color: #fed7aa;
  background: #fffaf5;
}
.to-col-property .cleaning-proof-card {
  width: fit-content;
  max-width: min(100%, 360px);
}
#viewCleaning .turnovers-header h3,
#viewCleaning .cleaner-msgs-header h3 {
  margin: 0;
  color: #173c2c;
}
@media (max-width: 820px) {
  .cleaning-page-header { align-items: flex-start; flex-direction: column; }
  .cleaning-header-actions { justify-content: flex-start; width: 100%; }
  .cleaning-section-tabs { width: 100%; }
  .cleaning-section-tab { flex: 1; }
}

#viewCleaning .assignment-rules-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fffdf7;
}
.assignment-rules-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.assignment-rules-head h3 { margin: 0; color: #173c2c; }
.assignment-rules-head p { margin: .2rem 0 0; color: #647067; font-size: .9rem; }
.assignment-rules-tools {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
}
.assignment-property-picker {
  display: grid;
  gap: .28rem;
  min-width: min(300px, 38vw);
  color: #335244;
  font-size: .78rem;
  font-weight: 800;
}
.assignment-property-picker input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d8dfda;
  border-radius: 12px;
  background: #fff;
  color: #173c2c;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  padding: .55rem .75rem;
}
.assignment-property-picker input:focus {
  outline: 2px solid rgba(27,67,50,.18);
  border-color: #1b4332;
}
.assignment-rules-refresh,
.assignment-rule-save,
.assignment-rec-apply {
  border: 0;
  border-radius: 999px;
  background: #1b4332;
  color: #fff;
  font-weight: 800;
  padding: .55rem .85rem;
  cursor: pointer;
}
.assignment-rec-apply[disabled] { background: #cbd5e1; cursor: not-allowed; }
.assignment-rules-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}
.assignment-rule-list {
  border-right: 1px solid #e5e7eb;
  overflow: auto;
  padding: .75rem;
  background: #f8faf7;
}
.assignment-rule-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: .8rem;
  margin-bottom: .6rem;
  cursor: pointer;
  display: grid;
  gap: .2rem;
}
.assignment-rule-item.active {
  border-color: #1b4332;
  box-shadow: 0 10px 24px rgba(27,67,50,.12);
}
.assignment-rule-item strong { color: #173c2c; }
.assignment-rule-item span,
.assignment-rule-item small { color: #647067; }
.assignment-rule-editor { overflow: auto; padding: 1rem; }
.assignment-rule-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1rem;
}
.assignment-rule-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.assignment-rule-editor-head h4 { margin: 0; color: #173c2c; }
.assignment-rule-editor-head p { margin: .25rem 0 0; color: #647067; font-size: .9rem; }
.assignment-rule-enabled,
.assignment-rule-checkbox { display: flex !important; align-items: center; gap: .45rem; font-weight: 800; color: #173c2c; }
.assignment-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.assignment-rule-grid label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 800; color: #335244; }
.assignment-rule-grid .wide { grid-column: 1 / -1; }
.assignment-rule-grid input,
.assignment-rule-grid textarea {
  border: 1px solid #d8dfda;
  border-radius: 12px;
  padding: .65rem .75rem;
  font: inherit;
  font-weight: 600;
  color: #173c2c;
}
.assignment-rule-actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; color: #647067; font-size: .9rem; }
.assignment-rec {
  margin-top: .45rem;
  padding: .5rem;
  border-radius: 12px;
  background: #edf5ef;
  color: #173c2c;
  display: grid;
  gap: .25rem;
  font-size: .76rem;
}
.assignment-rec.muted { background: #f1f5f9; color: #64748b; }
.assignment-rec.has-warning { background: #fff7ed; color: #9a3412; }
.assignment-rec small { color: inherit; opacity: .82; }
.assignment-rec-apply { justify-self: start; padding: .38rem .65rem; font-size: .72rem; }
@media (max-width: 900px) {
  .assignment-rules-head { align-items: stretch; flex-direction: column; }
  .assignment-rules-tools { width: 100%; align-items: stretch; }
  .assignment-property-picker { min-width: 0; flex: 1; }
  .assignment-rules-body { grid-template-columns: 1fr; }
  .assignment-rule-list { border-right: 0; border-bottom: 1px solid #e5e7eb; max-height: 260px; }
  .assignment-rule-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .assignment-rules-tools { flex-direction: column; }
  .assignment-rules-refresh { width: 100%; }
}

/* ===== Mobile dashboard: Inbox + Cleaning only ===== */
body.mobile-dashboard {
  min-height: 100svh;
  overflow: hidden;
  background: #f5f4ef;
}

body.mobile-dashboard .topbar {
  height: 50px;
  padding: 0 0.55rem;
  gap: 0.45rem;
}

body.mobile-dashboard .topbar-brand {
  margin-right: 0;
}

body.mobile-dashboard .brand-name,
body.mobile-dashboard .view-toggle,
body.mobile-dashboard .topbar-user .user-name,
body.mobile-dashboard .topbar-logout,
body.mobile-dashboard .tab[data-view="reviews"],
body.mobile-dashboard .tab[data-view="calendar"],
body.mobile-dashboard .tab[data-view="reservations"],
body.mobile-dashboard .tab[data-view="settlement-plans"],
body.mobile-dashboard .tab[data-view="automations"],
body.mobile-dashboard .tab[data-view="properties"],
body.mobile-dashboard .tab[data-view="contacts"],
body.mobile-dashboard .tab[data-view="data"],
body.mobile-dashboard .tab[data-view="tasks"] {
  display: none !important;
}

body.mobile-dashboard .tab-bar {
  flex: 1;
  height: auto;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  overflow: visible;
}

body.mobile-dashboard .tab {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 0.45rem 0.78rem;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.72);
  font-size: 0.76rem;
  line-height: 1;
  box-shadow: none;
}

body.mobile-dashboard .tab.active {
  margin-bottom: 0;
  padding-bottom: 0.45rem;
  border-color: #d4a853;
  background: #d4a853;
  color: #1b4332;
}

body.mobile-dashboard .tab-badge {
  min-width: 17px;
  margin-left: 0.25rem;
  padding: 0.08rem 0.32rem;
  font-size: 0.62rem;
}

body.mobile-dashboard .topbar-user {
  margin-left: 0;
  gap: 0;
}

body.mobile-dashboard .topbar-user .user-avatar {
  width: 30px;
  height: 30px;
}

body.mobile-dashboard .main-content {
  height: calc(100svh - 50px);
  border-top-color: rgba(27,67,50,0.16);
}

body.mobile-dashboard .view-inbox.view-active {
  display: grid;
  grid-template-columns: 1fr;
  height: 100%;
}

body.mobile-dashboard.mobile-thread-open .thread-list {
  display: none;
}

body.mobile-dashboard:not(.mobile-thread-open) .conversation {
  display: none;
}

body.mobile-dashboard.mobile-thread-open .conversation {
  display: flex !important;
  height: 100%;
}

body.mobile-dashboard .thread-list {
  border-right: 0;
  min-height: 0;
}

body.mobile-dashboard .thread-list-header {
  padding: 0.85rem 1rem 0.7rem;
}

body.mobile-dashboard .thread-list-header h2 {
  margin-bottom: 0.55rem;
  font-size: 1.12rem;
}

body.mobile-dashboard .thread-filters {
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

body.mobile-dashboard .filter-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.32rem 0.7rem;
  font-size: 0.76rem;
}

body.mobile-dashboard .inbox-ai-control {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

body.mobile-dashboard .inbox-ai-toggle {
  min-height: 54px;
  padding: 0.45rem 0.5rem;
  gap: 0.42rem;
  border-radius: 7px;
}

body.mobile-dashboard .inbox-ai-track {
  flex: 0 0 auto;
  width: 42px;
}

body.mobile-dashboard .inbox-ai-label {
  font-size: 0.78rem;
}

body.mobile-dashboard .inbox-ai-status {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.67rem;
  line-height: 1.12;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body.mobile-dashboard .inbox-ai-settings-btn {
  min-height: 54px;
  height: auto;
}

body.mobile-dashboard .inbox-ai-settings-card {
  position: fixed;
  inset: auto 10px max(10px, env(safe-area-inset-bottom)) 10px;
  width: auto;
  max-height: calc(100svh - 86px);
  overflow: auto;
}

body.mobile-dashboard .thread-search {
  min-height: 42px;
  padding: 0.48rem 0.7rem;
}

body.mobile-dashboard .thread-items {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.mobile-dashboard .thread-item {
  padding: 0.72rem 1rem;
  gap: 0.55rem;
}

body.mobile-dashboard .thread-guest {
  font-size: 0.94rem;
}

body.mobile-dashboard .thread-property,
body.mobile-dashboard .thread-preview {
  font-size: 0.8rem;
}

body.mobile-dashboard .conv-header {
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
}

body.mobile-dashboard .mobile-conv-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #d8dfda;
  border-radius: 999px;
  background: #fff;
  color: #1b4332;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

body.mobile-dashboard .conv-header-info {
  min-width: 0;
  flex: 1;
}

body.mobile-dashboard .conv-guest-name {
  font-size: 0.98rem;
  line-height: 1.2;
}

body.mobile-dashboard .conv-meta {
  flex-wrap: wrap;
  gap: 0.32rem;
}

body.mobile-dashboard .conv-header-actions {
  display: none;
}

body.mobile-dashboard .conv-messages {
  padding: 0.85rem 0.75rem 1rem;
  gap: 0.7rem;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 0.85rem;
}

body.mobile-dashboard .booking-summary-head {
  display: grid;
  gap: 0.5rem;
}

body.mobile-dashboard .booking-summary-intro {
  max-width: none;
  text-align: left;
}

body.mobile-dashboard .msg-bubble {
  max-width: 92%;
  padding: 0.7rem 0.82rem;
  font-size: 0.86rem;
}

body.mobile-dashboard .msg-action-link {
  min-height: 44px;
  padding: 0.56rem 0.78rem 0.5rem;
}

body.mobile-dashboard .conv-composer {
  padding: 0.45rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  border-top-color: #d8dfda;
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
}

body.mobile-dashboard .mobile-composer-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8dfda;
  border-radius: 999px;
  background: #f8faf8;
  color: #1b4332;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  padding: 0.35rem 0.8rem 0.35rem 1rem;
  cursor: pointer;
}

body.mobile-dashboard .mobile-composer-tab-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #1b4332;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.16s ease;
}

body.mobile-dashboard .conv-composer:not(.mobile-collapsed) .mobile-composer-tab {
  margin-bottom: 0.55rem;
}

body.mobile-dashboard .conv-composer:not(.mobile-collapsed) .mobile-composer-tab-chevron,
body.mobile-dashboard .cleaner-composer:not(.mobile-collapsed) .mobile-composer-tab-chevron {
  transform: rotate(180deg);
}

body.mobile-dashboard .conv-composer.mobile-collapsed .composer-body,
body.mobile-dashboard .cleaner-composer.mobile-collapsed .cleaner-composer-body {
  display: none;
}

body.mobile-dashboard .composer-toolbar,
body.mobile-dashboard .composer-template-row {
  gap: 0.4rem;
  overflow-x: auto;
}

body.mobile-dashboard .composer-input-row {
  align-items: flex-end;
  gap: 0.45rem;
}

body.mobile-dashboard .composer-input-row textarea,
body.mobile-dashboard .cleaner-composer textarea {
  min-height: 44px;
  font-size: 16px;
}

body.mobile-dashboard .composer-input-row textarea {
  max-height: min(34svh, 180px);
}

body.mobile-dashboard .btn-send {
  min-height: 72px;
}

body.mobile-dashboard #viewCleaning {
  overflow: hidden !important;
}

body.mobile-dashboard .cleaning-page {
  height: 100%;
}

body.mobile-dashboard .cleaning-page-header {
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0.75rem;
}

body.mobile-dashboard .cleaning-page-header > div:first-child,
body.mobile-dashboard .cleaning-page-header p,
body.mobile-dashboard .cleaning-external-link,
body.mobile-dashboard .cleaning-header-actions button[onclick*="contacts"] {
  display: none !important;
}

body.mobile-dashboard .cleaning-header-actions {
  justify-content: flex-start;
  width: 100%;
  gap: 0.45rem;
}

body.mobile-dashboard .cleaning-external-link {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  font-size: 0.76rem;
}

body.mobile-dashboard .cleaning-section-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: calc(100vw - 1.5rem);
  max-width: calc(100vw - 1.5rem);
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 9px;
  padding: 0.2rem;
}

body.mobile-dashboard .cleaning-section-tab {
  min-width: 0;
  min-height: 34px;
  padding: 0.42rem 0.5rem;
  font-size: 0.74rem;
}

body.mobile-dashboard .cleaning-section-tab[data-mobile-label] {
  font-size: 0;
}

body.mobile-dashboard .cleaning-section-tab[data-mobile-label]::after {
  content: attr(data-mobile-label);
  font-size: 0.74rem;
}

body.mobile-dashboard .turnovers-container {
  padding: 0.55rem 0.65rem 0.75rem;
}

body.mobile-dashboard .turnovers-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

body.mobile-dashboard .turnovers-header h3 {
  display: none;
}

body.mobile-dashboard .turnovers-filters {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

body.mobile-dashboard .turnover-filter {
  flex: 0 0 auto;
  min-height: 32px;
}

body.mobile-dashboard .turnovers-list-header {
  display: none;
}

body.mobile-dashboard .turnovers-list {
  display: grid;
  gap: 0.65rem;
}

body.mobile-dashboard .turnover-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
  padding: 0.78rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

body.mobile-dashboard .turnover-row > div {
  min-width: 0;
}

body.mobile-dashboard .to-col-check {
  display: flex;
  align-items: center;
}

body.mobile-dashboard .to-col-date,
body.mobile-dashboard .to-col-property,
body.mobile-dashboard .to-col-guest,
body.mobile-dashboard .to-col-cleaner,
body.mobile-dashboard .to-col-status,
body.mobile-dashboard .to-col-readiness {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  font-size: 0.83rem;
}

body.mobile-dashboard .to-col-date::before { content: 'Date'; }
body.mobile-dashboard .to-col-property::before { content: 'Property'; }
body.mobile-dashboard .to-col-guest::before { content: 'Guest'; }
body.mobile-dashboard .to-col-cleaner::before { content: 'Cleaner'; }
body.mobile-dashboard .to-col-status::before { content: 'Status'; }
body.mobile-dashboard .to-col-readiness::before { content: 'Readiness'; }

body.mobile-dashboard .to-col-date::before,
body.mobile-dashboard .to-col-property::before,
body.mobile-dashboard .to-col-guest::before,
body.mobile-dashboard .to-col-cleaner::before,
body.mobile-dashboard .to-col-status::before,
body.mobile-dashboard .to-col-readiness::before {
  color: #8a948f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

body.mobile-dashboard .to-col-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.mobile-dashboard .cleaner-msgs-shell {
  grid-template-columns: 1fr;
  height: 100%;
}

body.mobile-dashboard .cleaner-msgs-sidebar {
  min-height: 0;
  height: 100%;
  max-height: none;
  border-right: 0;
  border-bottom: 0;
}

body.mobile-dashboard.mobile-cleaner-thread-open .cleaner-msgs-sidebar {
  display: none;
}

body.mobile-dashboard:not(.mobile-cleaner-thread-open) .cleaner-conversation {
  display: none;
}

body.mobile-dashboard.mobile-cleaner-thread-open .cleaner-conversation {
  display: flex !important;
  height: 100%;
}

body.mobile-dashboard .cleaner-msgs-header {
  display: none !important;
}

body.mobile-dashboard .cleaner-auto-sms-card {
  margin: 0.45rem 0.65rem 0.35rem;
  padding: 0.45rem 0.55rem;
}

body.mobile-dashboard .cleaner-auto-sms-card strong {
  font-size: 0.75rem;
}

body.mobile-dashboard .cleaner-auto-sms-card span[id] {
  display: none;
}

body.mobile-dashboard .cleaner-msgs-search {
  margin: 0.35rem 0.65rem 0.45rem;
  min-height: 42px;
  font-size: 16px;
}

body.mobile-dashboard .cleaner-thread-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.35rem 0.65rem;
  -webkit-overflow-scrolling: touch;
}

body.mobile-dashboard .cleaner-thread-item {
  min-height: 76px;
  padding: 0.72rem 0.75rem;
  border-radius: 0;
  border-bottom: 1px solid #ece8df;
  background: #fffdf8;
}

body.mobile-dashboard .cleaner-conv-header {
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
}

body.mobile-dashboard .mobile-cleaner-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #d8dfda;
  border-radius: 999px;
  background: #fff;
  color: #1b4332;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

body.mobile-dashboard .cleaner-conv-title h3 {
  font-size: 0.98rem;
  line-height: 1.2;
}

body.mobile-dashboard .cleaner-conv-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-dashboard .cleaner-account-toggle-card {
  display: none;
}

body.mobile-dashboard .cleaner-contact-open-btn {
  flex: 0 0 auto;
  padding: 0.46rem 0.7rem;
  font-size: 0.76rem;
}

body.mobile-dashboard .cleaner-conv-messages {
  flex: 1;
  min-height: 0;
  padding: 0.85rem 0.75rem;
  -webkit-overflow-scrolling: touch;
}

body.mobile-dashboard .cleaner-msg-bubble {
  max-width: 94%;
}

body.mobile-dashboard .cleaner-composer {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
}

body.mobile-dashboard .cleaner-composer:not(.mobile-collapsed) .mobile-composer-tab {
  margin-bottom: 0.55rem;
}

body.mobile-dashboard .cleaner-composer-hint {
  display: none;
}

body.mobile-dashboard .cleaner-composer-row {
  gap: 0.45rem;
}

body.mobile-dashboard .assignment-rules-shell {
  padding: 0.55rem 0.65rem 0.75rem;
}

body.mobile-dashboard .assignment-rules-head {
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
}

body.mobile-dashboard .assignment-rules-head > div {
  display: none;
}

body.mobile-dashboard .assignment-rules-tools {
  gap: 0.4rem;
}

body.mobile-dashboard .assignment-property-picker span {
  display: none;
}

body.mobile-dashboard .assignment-rules-body {
  margin-top: 0.55rem;
}

/* Automation editor footer bar (Save button above preview) */
.automation-editor-footer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px;
}
.automation-save-status {
  font-size: 0.8rem;
  color: #2f8f73;
}

/* Contact card edit icon */
.contact-card-edit {
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.15s;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.contact-card:hover .contact-card-edit {
  opacity: 0.6;
}
.owner-contact-card {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(45, 122, 98, 0.22);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,253,251,0.96) 54%, rgba(255,247,237,0.9)),
    radial-gradient(circle at 88% 8%, rgba(14,165,233,0.2), transparent 28%),
    radial-gradient(circle at 8% 100%, rgba(45,122,98,0.2), transparent 34%);
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.12),
    0 8px 0 rgba(45, 122, 98, 0.08),
    0 2px 0 rgba(255,255,255,0.85) inset;
  min-height: 236px;
}
.owner-contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(45,122,98,0.95), rgba(14,165,233,0.78) 48%, rgba(249,115,22,0.82)) top / 100% 6px no-repeat,
    linear-gradient(180deg, rgba(255,255,255,0.45), transparent 42%);
}
.owner-card-glow {
  position: absolute;
  inset: auto 24px -52px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249,115,22,0.18), transparent 68%);
  pointer-events: none;
}
.owner-contact-card:hover {
  box-shadow:
    0 28px 56px rgba(15, 23, 42, 0.16),
    0 10px 0 rgba(45, 122, 98, 0.10),
    0 2px 0 rgba(255,255,255,0.85) inset;
}
.owner-contact-shell,
.owner-contact-card > * {
  position: relative;
  z-index: 1;
}
.owner-contact-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(360px, 1fr);
  gap: 0;
  min-height: 236px;
}
.owner-contact-hero {
  display: grid;
  align-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  color: #f8fafc;
  background:
    linear-gradient(150deg, #1f6f5b, #0f766e 54%, #0e7490),
    radial-gradient(circle at top right, rgba(255,255,255,0.26), transparent 42%);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.18);
}
.owner-contact-kicker,
.owner-property-rail-label,
.owner-contact-detail-head span,
.owner-contact-quick span {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.owner-contact-kicker {
  width: fit-content;
  padding: 0.28rem 0.64rem;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  color: rgba(255,255,255,0.82);
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(255,255,255,0.12);
}
.owner-contact-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}
.owner-contact-avatar {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,0.34);
  box-shadow: 0 16px 28px rgba(15,23,42,0.26), inset 0 1px 0 rgba(255,255,255,0.35);
}
.owner-contact-card h3 {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
.owner-contact-quick {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.owner-contact-quick span {
  color: rgba(255,255,255,0.64);
  font-size: 0.64rem;
  font-weight: 900;
}
.owner-contact-quick strong {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.owner-property-rail {
  padding: 0.78rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.owner-property-rail-label {
  color: rgba(255,255,255,0.62);
  font-size: 0.64rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.owner-property-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.owner-property-list span {
  max-width: 100%;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255,255,255,0.14);
  font-size: 0.74rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.owner-contact-detail {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: 1.15rem 1.2rem 1.1rem;
}
.owner-contact-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.owner-contact-detail-head span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
}
.owner-contact-detail-head strong {
  padding: 0.28rem 0.62rem;
  border: 1px solid rgba(14,165,233,0.18);
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 0.72rem;
  font-weight: 900;
}
.owner-contact-name-stack {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.78rem;
  color: #6b7280;
}
.owner-business-row {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(45, 122, 98, 0.18);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.78);
}
.owner-contact-name-stack span {
  color: #9ca3af;
  font-weight: 600;
}
.owner-contact-name-stack strong {
  color: #374151;
  font-weight: 600;
}
.owner-person-stack {
  display: grid !important;
  gap: 0.45rem !important;
  margin-top: 0.1rem;
}
.owner-person-row {
  display: grid !important;
  grid-template-columns: minmax(136px, 0.32fr) minmax(0, 1fr);
  gap: 0.7rem !important;
  align-items: stretch !important;
  padding: 0.66rem;
  border: 1px solid rgba(45, 122, 98, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(240,253,250,0.72)),
    radial-gradient(circle at top right, rgba(14,165,233,0.11), transparent 38%);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.82);
}
.owner-person-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}
.owner-person-identity span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #134e4a;
  background: #ccfbf1;
  font-size: 0.68rem;
  font-weight: 900;
}
.owner-person-identity strong {
  color: #17202a;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.owner-person-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.35rem;
  min-width: 0;
}
.owner-contact-chip {
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.08rem;
  max-width: 100%;
  padding: 0.42rem 0.54rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
.owner-contact-chip b {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.72;
}
.owner-contact-chip.email {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.owner-contact-chip.phone {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.owner-contact-chip.empty {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.owner-card-edit {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  opacity: 1;
  margin: 0;
  padding: 0.3rem 0.58rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15,23,42,0.16);
  font-size: 0.7rem;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
}
.owner-contact-notes {
  position: relative;
  z-index: 1;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(226,232,240,0.9);
  color: #64748b;
  background: rgba(248,250,252,0.76);
  font-size: 0.8rem;
}
@media (max-width: 860px) {
  .owner-contact-card {
    grid-column: 1 / -1;
  }
  .owner-contact-shell {
    grid-template-columns: 1fr;
  }
  .owner-contact-hero {
    min-height: 210px;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.18);
  }
}

/* Contact edit modal */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 15000;
  display: grid;
  place-items: center;
  backdrop-filter: blur(2px);
}
.contact-modal {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15,23,42,0.32), 0 2px 0 rgba(255,255,255,0.85) inset;
  width: min(720px, calc(100vw - 32px));
  max-height: min(92vh, 920px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.contact-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background:
    linear-gradient(135deg, rgba(236,253,245,0.92), rgba(239,246,255,0.88)),
    radial-gradient(circle at right top, rgba(249,115,22,0.14), transparent 34%);
}
.contact-modal-head h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
  color: #17202a;
}
.contact-modal-close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  box-shadow: 0 6px 14px rgba(15,23,42,0.08);
}
.contact-modal-body {
  padding: 1.1rem 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.contact-modal-body label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #6b7280;
  margin-top: 0.25rem;
}
.ce-field-note {
  color: #9ca3af;
  font-weight: 500;
}
.ce-owner-names-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.78rem 0.88rem;
  border: 1px solid rgba(45, 122, 98, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(236,253,245,0.9), rgba(255,247,237,0.72));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.75);
}
.ce-owner-names-head label {
  display: block;
  margin: 0;
  color: #1f2937;
}
.ce-owner-names-head span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}
.ce-owner-names-head button,
.ce-owner-name-remove {
  border: 1px solid rgba(45, 122, 98, 0.28);
  background: linear-gradient(180deg, #ffffff, #ecfdf5);
  color: #17624f;
  border-radius: 999px;
  padding: 0.46rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(45, 122, 98, 0.10);
}
.ce-owner-names-slot {
  display: grid;
  gap: 0.85rem;
}
.ce-owner-person-row {
  position: relative;
  display: grid;
  gap: 0.62rem;
  padding: 0.82rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)),
    radial-gradient(circle at top right, rgba(14,165,233,0.12), transparent 32%);
  box-shadow: 0 16px 32px rgba(15,23,42,0.09), inset 0 1px 0 rgba(255,255,255,0.85);
}
.ce-owner-person-row::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #2d7a62, #0ea5e9, #f97316);
}
.ce-owner-person-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.15rem;
}
.ce-owner-person-badge {
  width: fit-content;
  padding: 0.25rem 0.62rem;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 0.72rem;
  font-weight: 900;
}
.ce-owner-person-label {
  margin-bottom: -0.35rem;
}
.ce-owner-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
}
.ce-owner-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.8rem;
}
.ce-owner-contact-panel {
  min-width: 0;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.ce-owner-contact-panel.email {
  background: linear-gradient(180deg, #f0f9ff, #ffffff);
}
.ce-owner-contact-panel.phone {
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}
.ce-owner-contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.ce-owner-contact-head label {
  margin: 0;
  color: #334155;
}
.ce-owner-contact-head button,
.ce-owner-contact-remove {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.34rem 0.56rem;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 12px rgba(15,23,42,0.06);
}
.ce-owner-contact-head button:hover,
.ce-owner-contact-remove:hover,
.ce-owner-name-remove:hover,
.ce-owner-names-head button:hover {
  transform: translateY(-1px);
}
.ce-owner-contact-panel.email .ce-owner-contact-head button {
  color: #075985;
  border-color: #bae6fd;
  background: #e0f2fe;
}
.ce-owner-contact-panel.phone .ce-owner-contact-head button {
  color: #166534;
  border-color: #bbf7d0;
  background: #dcfce7;
}
.ce-owner-name-remove,
.ce-owner-contact-remove {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}
.ce-owner-contact-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0.82rem;
}
.ce-owner-emails-slot,
.ce-owner-phones-slot {
  display: grid;
  gap: 0.42rem;
}
.ce-owner-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: center;
}
.ce-owner-business-panel {
  display: grid;
  gap: 0.42rem;
  padding: 0.82rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 10px 22px rgba(15,23,42,0.05);
}
.ce-past-stays-section {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding: 0.82rem;
  border: 1px solid rgba(45, 122, 98, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 22px rgba(15,23,42,0.05);
}
.ce-past-stays-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ce-past-stays-head h4 {
  margin: 0;
  color: #17202a;
  font-size: 0.88rem;
  font-weight: 900;
}
.ce-past-stays-head span {
  min-width: 26px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: #17624f;
  font-size: 0.78rem;
  font-weight: 900;
}
.ce-past-stays-list {
  display: grid;
  gap: 0.42rem;
  max-height: 230px;
  overflow: auto;
}
.ce-past-stay {
  display: grid;
  grid-template-columns: minmax(94px, 0.72fr) minmax(156px, 1.1fr) minmax(92px, 0.72fr);
  align-items: center;
  gap: 0.52rem;
  width: 100%;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ce-past-stay:hover {
  border-color: rgba(45, 122, 98, 0.38);
  background: #f7fbf8;
}
.ce-past-stay-property {
  color: #173c2c;
  font-size: 0.8rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ce-past-stay-dates {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ce-past-stay-code {
  justify-self: end;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ce-past-stays-empty {
  padding: 0.72rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  color: #64748b;
  font-size: 0.82rem;
}
.contact-modal-body input,
.contact-modal-body select,
.contact-modal-body textarea {
  width: 100%;
  padding: 0.64rem 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  background: rgba(255,255,255,0.96);
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.04);
}
.contact-modal-body input:focus,
.contact-modal-body select:focus,
.contact-modal-body textarea:focus {
  outline: none;
  border-color: #1f6f5b;
  box-shadow: 0 0 0 2px rgba(31,111,91,0.15);
}
@media (max-width: 520px) {
  .owner-person-row,
  .ce-owner-contact-grid,
  .ce-owner-name-row {
    grid-template-columns: 1fr;
  }
  .ce-owner-contact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ce-past-stay {
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }
  .ce-past-stay-code {
    justify-self: start;
  }
  .contact-modal {
    width: min(96vw, calc(100vw - 18px));
    border-radius: 16px;
  }
  .contact-modal-body,
  .contact-modal-head,
  .contact-modal-foot {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }
  .ce-owner-names-head,
  .ce-owner-person-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .owner-person-row {
    gap: 0.45rem !important;
  }
}
.contact-modal-foot {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248,250,252,0.92);
}
.contact-modal-foot .ce-save {
  padding: 0.62rem 1.35rem;
  background: linear-gradient(180deg, #2d7a62, #1f6f5b);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31,111,91,0.22);
}
.contact-modal-foot .ce-save:hover { background: #174f41; }
.contact-modal-foot .ce-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.contact-modal-foot .ce-cancel {
  padding: 0.62rem 1.15rem;
  background: #fff;
  color: #374151;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(15,23,42,0.06);
}
.contact-modal-foot .ce-cancel:hover { background: #e5e7eb; }

.property-marker-modal { width: min(520px, calc(100vw - 32px)); }
.property-marker-modal-property {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #17202a;
  font-weight: 700;
}
.property-marker-modal-help {
  margin: 0.15rem 0 0;
  color: #6b7280;
  font-size: 0.78rem;
}

/* ===== Tag Badges on Thread Cards ===== */
.thread-tag-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}
.thread-tag-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.thread-tag-btn:hover { opacity: 1; }

.thread-note-btn,
.conv-note-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d97706;
  border-radius: 6px;
  background: #f59e0b;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(146, 64, 14, 0.16);
}
.thread-note-btn {
  min-height: 22px;
  padding: 0.12rem 0.42rem;
  font-size: 0.68rem;
}
.conv-note-tag {
  min-height: 28px;
  padding: 0.2rem 0.58rem;
  margin-left: 0.25rem;
  font-size: 0.78rem;
}
.thread-note-btn:hover,
.conv-note-tag:hover {
  background: #b45309;
  border-color: #92400e;
}

/* ===== Tag Popup ===== */
.tag-popup {
  position: fixed;
  z-index: 13000;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.18);
  min-width: 220px;
  max-width: 300px;
  font-size: 13px;
}
.tag-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.tag-popup-head strong { font-size: 13px; }
.tag-popup-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #94a3b8;
  padding: 0;
}
.tag-popup-close:hover { color: #475569; }
.tag-popup-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}
.tag-popup-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
}
.tag-popup-item:hover { background: #f8fafc; }
.tag-popup-item input[type=checkbox] { margin: 0; }
.tag-popup-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.tag-popup-item.assigned { font-weight: 600; }
.tag-popup-delete {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}
.tag-popup-item:hover .tag-popup-delete { opacity: 0.6; }
.tag-popup-delete:hover { opacity: 1 !important; }
.tag-popup-add {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #f1f5f9;
}
.tag-popup-add input[type=text], .tag-popup-add input#tagNewInput {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
}
.tag-popup-add input[type=color] {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
}
.tag-popup-add button {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: #1f6f5b;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}
.tag-popup-add button:hover { background: #164d3f; }

.ce-cleaner-properties-slot {
  margin: -0.35rem 0 0.65rem;
}
.ce-property-checklist {
  display: grid;
  gap: 0.4rem;
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  background: #f8fafc;
}
.ce-property-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.ce-property-check input {
  margin-top: 0.15rem;
}
.ce-property-check strong,
.ce-property-check small {
  display: block;
}
.ce-property-check strong {
  font-size: 0.85rem;
  color: #111827;
}
.ce-property-check small {
  margin-top: 0.12rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Bella's settings on the Agents tab. The chat gear is a chat-widget menu only — position and
   clear — so these controls need a home with room to breathe rather than a dropdown. */
.bella-agent-settings {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.bella-agent-settings h2 {
  margin: 0;
}

.bella-agent-settings .panel-subtitle {
  margin: 0.15rem 0 0.75rem;
}

.bella-agent-controls-panel {
  position: static;
  display: block;
  width: auto;
  max-height: none;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

/* A past night with no price is not a problem to fix — SU serves ARI forward only and we keep
   no copy once the date passes. Mute it so the first half of the current month stops reading
   as a wall of failures, while a FUTURE "No rate" stays prominent because that one is real. */
.calendar-day-price.unpriced {
  color: #cbd5e1;
}

/* ===== COMBO UNIT GROUPS ON THE CALENDAR =====
   A combo group is a constraint, not a display grouping: blocking one half closes the whole
   house. Rows of a group are forced adjacent and primary-first by orderCalendarRowsByUnitGroup;
   the rail below is only honest because of that ordering. */
.calendar-gantt-row.in-unit-group .calendar-gantt-property {
  border-left: 3px solid #7c9cbf;
}

.calendar-gantt-row.in-unit-group.primary .calendar-gantt-property {
  border-left-color: #2d6a4f;
}

.calendar-gantt-row.in-unit-group.member .calendar-gantt-property > .calendar-gantt-property-open {
  padding-left: 0.85rem;
}

.unit-group-chip {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.32rem;
  border: 1px solid #2d6a4f;
  border-radius: 3px;
  background: #edf7f2;
  color: #2d6a4f;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* A closure the ENGINE derived is not a decision someone made. Hatch it so the two are never
   confused at a glance — the label additionally reads "via <unit>". */
.calendar-month-event.derived,
.calendar-gantt-event.derived {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.34) 0,
    rgba(255, 255, 255, 0.34) 4px,
    transparent 4px,
    transparent 9px
  );
}

/* A preview is deliberately translucent and dotted: it predicts what the pending block would
   change, while the solid/hatch event bars remain the record of what is already written. */
.calendar-gantt-cell.will-close {
  background: rgba(109, 91, 208, 0.08);
  border: 2px dotted #6d5bd0;
  color: #4c3fa3;
  box-shadow: inset 0 0 0 2px rgba(109, 91, 208, 0.1);
}

.calendar-gantt-row.will-close-row .calendar-gantt-property {
  background: #f5f3ff;
  box-shadow: inset 3px 0 0 #6d5bd0;
}

/* Both ends glow without changing their box metrics. Solid green is the decision; the blue
   dashed inset is the closure it caused. */
.calendar-gantt-event.group-linked {
  outline: 3px solid #2d6a4f;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(45, 106, 79, 0.18), 0 6px 14px rgba(17, 24, 39, 0.14);
}

.calendar-gantt-event.group-linked.group-link-cause {
  outline-style: solid;
}

.calendar-gantt-event.group-linked.group-link-effect {
  outline-color: #7c9cbf;
  outline-style: dashed;
  box-shadow: 0 0 0 5px rgba(124, 156, 191, 0.22), 0 6px 14px rgba(17, 24, 39, 0.14);
}

/* This is a building summary, not another inventory row. Keep it shorter and quieter than the
   property rows; "none" is neutral because a fully sold building is not an error. */
.calendar-gantt-row.unit-group-rollup {
  min-height: 34px;
  background: #f8faf7;
  border-bottom: 2px solid #dfe5dc;
}

.unit-group-rollup-label {
  min-height: 34px;
  background: #f8faf7;
  color: #4b5563;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-gantt-cell.rollup {
  min-height: 34px;
  padding: 0.28rem 0.4rem;
  cursor: default;
  text-align: center;
  font-size: 0.66rem;
}

.calendar-gantt-cell.rollup.whole {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.calendar-gantt-cell.rollup.partial {
  background: #fff7ed;
  border-color: #fbbf24;
  color: #92400e;
}

.calendar-gantt-cell.rollup.none {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}
