@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #0b1020;
  --text-dark: #1a202c;
  --muted: #6b7280;
  --rule: #d9dde3;
  --brand: #153e7a;      /* TRE blue */
  --brand-2: #c62828;    /* TRE red */
  --shadow: 0 10px 30px rgba(10,10,10,.06);
  --green: #25d366;
  --yellow: #ffd84d;
  --red: #ff3b30;
  --accent: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* Note icon pulsing animation for notes with content */
@keyframes notePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

.notes-icon.has-notes,
.notes-count.has-notes {
  animation: notePulse 2s ease-in-out infinite;
}

/* Notes Icon Hover */
.notes-icon {
  display: inline-flex;
  transition: all 0.2s ease;
}

.notes-icon:hover {
  transform: scale(1.15);
}

.notes-icon:hover svg {
  color: #fbbf24 !important;
}

/* Activity Log Icon */
.activity-icon {
  display: inline-block;
  transition: all 0.2s ease;
}

.activity-icon:hover {
  transform: scale(1.15);
}

.activity-icon:hover svg {
  color: #3b82f6 !important;
}

/* Activity Count (for listings) */
.activity-count {
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.activity-count:hover {
  transform: scale(1.15);
}

.activity-count:hover svg {
  color: #3b82f6 !important;
}

/* Activity Item */
.activity-item {
  transition: background 0.2s ease;
}

.activity-item:hover {
  background: #f9fafb;
}

.activity-item:last-child {
  border-bottom: none !important;
}

.notes-icon,
.notes-count {
  display: inline-block;
  transition: transform 0.2s ease;
}

.notes-icon:hover,
.notes-count:hover {
  transform: scale(1.15);
}

* { box-sizing: border-box; }
body { 
  margin: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink); 
  background: var(--bg); 
}

.hidden { display: none !important; }

.app-header { 
  position: sticky; 
  top: 0; 
  z-index: 1200;
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 12px 24px; 
  background: #0b1220; 
  color: #fff; 
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.app-header .brand { 
  font-weight: 900; 
  letter-spacing: 0.02em; 
  font-size: 24px; 
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brand-text {
  font-family: 'Inter', sans-serif;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.app-header .main-nav { display: flex; gap: 32px; }
.app-header .nav-link { 
  font-family: 'Inter', sans-serif;
  color: #fff; 
  text-decoration: none; 
  padding: 10px 16px; 
  border-radius: 8px; 
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.app-header .nav-link:hover { 
  background: rgba(255,255,255,0.1); 
  transform: translateY(-1px);
}
.app-header .nav-link.active { 
  background: rgba(255,255,255,0.2); 
  font-weight: 700; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.app-header .role-switch { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  background: rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: 8px;
}
.app-header .role-switch select {
  font-family: 'Inter', sans-serif;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

/* Header Actions (User Info, Profile, Logout) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

#headerUserEmail {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.role-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-badge.role-agent {
  background: #3b82f6;
  color: #fff;
}

.role-badge.role-manager {
  background: #8b5cf6;
  color: #fff;
}

.role-badge.role-super_user {
  background: #f59e0b;
  color: #fff;
}

.role-badge.role-accountant {
  background: #10b981;
  color: #fff;
}

/* Profile Button */
#profileBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#profileBtn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

#profileBtn svg {
  width: 16px;
  height: 16px;
}

.view-bar {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 12px; 
  padding: 20px 24px; 
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.view-bar h1 {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}
.role-label { 
  font-size: 12px; 
  color: var(--muted); 
  background: #eef2ff; 
  border: 1px solid #d0d5dd; 
  padding: 6px 12px; 
  border-radius: 999px; 
  font-weight: 600;
}

.table-actions { 
  display: flex; 
  gap: 12px; 
  padding: 20px 24px; 
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.table-actions input[type="search"] { 
  width: 320px; 
  max-width: 100%; 
  padding: 12px 16px; 
  border: 2px solid var(--rule); 
  border-radius: 10px; 
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.table-actions input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 62, 122, 0.1);
}

/* Filters */
.filters {
  display: flex;
  align-items: end;
  gap: 16px;
  margin: 0 24px 20px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 62, 122, 0.1);
}

.filter-spacer {
  flex: 1;
}

.table-wrapper { 
  background: #f1f5f9; 
  margin: 0 24px 24px; 
  border: 1px solid #cbd5e1; 
  border-radius: 16px; 
  overflow: hidden; 
  box-shadow: var(--shadow);
}

/* Special styling for listings table wrapper */
.listings-layout .table-wrapper {
  overflow-x: auto;
  overflow-y: scroll;
  height: 100%;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #f1f5f9;
}

.table-container {
  background: #f1f5f9; 
  margin: 0 24px 24px; 
  border: 1px solid #cbd5e1; 
  border-radius: 16px; 
  overflow: hidden; 
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Listings table specific styles */
#listingsTable {
  width: 100%; /* Table should fit container width */
  table-layout: fixed; /* Fixed layout for better column control */
}

/* Optimize column widths for listings table - Updated for 3-column layout */
#listingsTable th:nth-child(1), #listingsTable td:nth-child(1) {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding: 12px 8px !important;
} /* Expand arrow - Minimal width */

#listingsTable th:nth-child(2), #listingsTable td:nth-child(2) {
  width: 100%;
  min-width: 0;
  max-width: none;
} /* Listings (property name, address, details) - Flexible, takes remaining space */

#listingsTable th:nth-child(3), #listingsTable td:nth-child(3) {
  width: 140px;
  min-width: 120px;
  max-width: 140px;
} /* Rent Range - Compact but readable */

/* Allow wrapping in the listings column, prevent wrapping in others */
#listingsTable th:nth-child(2),
#listingsTable td:nth-child(2) {
  white-space: normal; /* Allow wrapping for property details */
}

#listingsTable th:nth-child(1),
#listingsTable td:nth-child(1),
#listingsTable th:nth-child(3),
#listingsTable td:nth-child(3) {
  white-space: nowrap; /* Prevent wrapping for expand arrow and rent range */
}

/* Compact padding for listings table to fit in 35% column */
#listingsTable th,
#listingsTable td {
  padding: 12px 10px !important;
}

#listingsTable th:nth-child(2),
#listingsTable td:nth-child(2) {
  padding: 12px 12px !important; /* Slightly more padding for main content column */
}

.data-table thead th {
  background: #1e293b; 
  text-align: left; 
  font-family: 'Inter', sans-serif;
  font-size: 13px; 
  font-weight: 700; 
  color: #fff; 
  border-bottom: 2px solid #334155; 
  padding: 16px 20px; 
  letter-spacing: 0.02em;
}
.data-table tbody td { 
  padding: 16px 20px; 
  border-bottom: 1px solid #e2e8f0; 
  vertical-align: middle; 
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  background: #f8fafc;
}
.data-table tbody tr:hover { 
  background: #e2e8f0; 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.data-table tbody tr.selected { 
  background: #e0f2fe; 
  border-left: 4px solid var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Sortable headers */
.data-table th.sortable { cursor: pointer; user-select: none; position: relative; }
.data-table th.sortable:hover { background: #334155; }
.data-table th.sorted { background: #475569; color: #fff; }
.sort-icon { margin-left: 8px; font-size: 12px; color: #94a3b8; }
.data-table th.sorted .sort-icon { color: #fff; }
.sortable { 
  cursor: pointer; 
  transition: color 0.2s ease;
}
.sortable:hover {
  color: var(--brand);
}

.lead-name { 
  color: var(--brand); 
  font-weight: 700; 
  cursor: pointer; 
  text-decoration: none; 
  transition: color 0.2s ease;
}
.lead-name:hover {
  color: var(--accent);
}
.icon-btn { 
  background: none; 
  border: none; 
  font-size: 18px; 
  line-height: 1; 
  cursor: pointer; 
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
  color: var(--muted);
  font-weight: bold;
}
.icon-btn:hover {
  background: rgba(0,0,0,0.1);
  color: var(--ink);
}


/* Build Showcase Button */
.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: 2px solid #16a34a;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  transition: all 0.2s ease;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #15803d;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.btn-success:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
}

/* Listing checkboxes */
.listing-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #3b82f6;
  margin: 0;
}

/* Listings table layout - AGGRESSIVE FIX */
#listingsTable {
  table-layout: fixed !important;
  width: 100% !important;
}

/* Checkbox column styling - FORCE NARROW */
#listingsTable th:first-child,
#listingsTable td:first-child {
  width: 25px !important;
  min-width: 25px !important;
  max-width: 25px !important;
  padding: 4px 8px !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

#listingsTable th:nth-child(2),
#listingsTable td:nth-child(2) {
  width: auto !important;
}

#listingsTable th:nth-child(3),
#listingsTable td:nth-child(3) {
  width: 120px !important;
}

#listingsTable th:nth-child(4),
#listingsTable td:nth-child(4) {
  width: 100px !important;
}

#listingsTable th:first-child {
  border-right: none !important;
}

/* PUMI Label Styling */
.pumi-label {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
  animation: pumi-flash 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.pumi-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: pumi-shimmer 3s ease-in-out infinite;
}

@keyframes pumi-flash {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.6), 0 0 20px rgba(34, 197, 94, 0.4);
    transform: scale(1.05);
  }
}

@keyframes pumi-shimmer {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* PUMI Filter Checkbox */
.pumi-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.pumi-filter-label:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.pumi-filter-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #22c55e;
  margin: 0;
}

.pumi-filter-icon {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
  animation: pumi-flash 2s ease-in-out infinite;
}

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

.pumi-filter-checkbox:checked + .pumi-filter-icon {
  animation: pumi-flash 1s ease-in-out infinite;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.5);
}

.pumi-filter-checkbox:checked ~ .pumi-filter-text {
  color: var(--ink);
  font-weight: 600;
}
.mono { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 
  font-size: 13px;
}

/* Health Status Indicators */
.health-btn { 
  border: 0; 
  background: transparent; 
  padding: 0; 
  cursor: pointer; 
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.health-btn:hover {
  transform: scale(1.1);
}
.health-btn:hover .health-dot {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6), 0 0 24px rgba(34, 197, 94, 0.3);
}
.health-btn:hover .health-dot.health-yellow {
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.6), 0 0 24px rgba(234, 179, 8, 0.3);
}
.health-btn:hover .health-dot.health-red {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6), 0 0 24px rgba(239, 68, 68, 0.3);
}
.health-btn:hover .health-icon {
  transform: scale(1.1);
}
.health-dot { 
  width: 18px; 
  height: 18px; 
  border-radius: 50%; 
  border: 2px solid rgba(11, 11, 11, 0.2); 
  display: inline-block; 
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6); 
}
.health-green { 
  background: var(--green); 
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4), 0 0 16px rgba(34, 197, 94, 0.2);
}
.health-yellow { 
  background: var(--yellow); 
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4), 0 0 16px rgba(234, 179, 8, 0.2);
}
.health-red { 
  background: var(--red); 
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4), 0 0 16px rgba(239, 68, 68, 0.2);
}
.health-icon { 
  width: 24px; 
  height: 24px; 
  border-radius: 50%; 
  border: none; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  background: transparent;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.health-icon svg { 
  width: 16px; 
  height: 16px; 
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.health-check svg { 
  stroke: var(--success); 
  stroke-width: 3; 
  fill: none;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.6));
}
.health-lost svg { 
  stroke: var(--danger); 
  stroke-width: 3; 
  fill: none;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6));
}

.badge-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.badge-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
  display: inline-block;
}

/* Preference tags */
.pref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pref-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pref-tag.beds {
  background: #dbeafe;
  color: #1e40af;
}

.pref-tag.baths {
  background: #e0e7ff;
  color: #4338ca;
}

.pref-tag.budget {
  background: #dcfce7;
  color: #166534;
}

.pref-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.select { padding: 6px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; }

.pagination { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.pagination button { padding: 8px 10px; border: 1px solid #d0d5dd; background: #fff; border-radius: 8px; cursor: pointer; }

.drawer { position: fixed; top: 0; right: 0; width: 420px; max-width: 100%; height: 100vh; background: #fff; border-left: 1px solid #e4e7ec; box-shadow: -10px 0 30px rgba(0,0,0,0.08); display: flex; flex-direction: column; z-index: 1000; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e4e7ec; background: #f8fbff; }
.drawer-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.drawer-header .icon-btn {
  background: #fff;
  border: 2px solid var(--rule);
  color: var(--muted);
  font-size: 20px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.drawer-header .icon-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: scale(1.1);
}
.drawer-content { padding: 16px; overflow: auto; flex: 1; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: #667085; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 8px; }
.field .value { font-weight: 600; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 2000; }
.modal-card { background: #fff; width: 900px; max-width: 100%; border-radius: 12px; border: 1px solid #e4e7ec; overflow: hidden; }

/* Wider showcase modals */
#showcaseModal .modal-card,
#buildShowcaseModal .modal-card,
#matchesModal .modal-card {
  width: 1400px;
  max-width: 95%;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e4e7ec; }
.modal-actions { display: flex; align-items: center; gap: 12px; }
.modal-sticky-header {
  position: sticky;
  top: 0;
  background: #f8fbff;
	padding: 24px;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
	align-items: flex-start;
	gap: 24px;
  justify-content: space-between;
  z-index: 10;
}

/* Showcase controls layout */
.showcase-controls {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.control-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.control-group label {
	font-weight: 500;
	color: #374151;
	font-size: 14px;
}

/* Showcase actions layout */
.showcase-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	min-width: 280px;
}

.selection-count {
  font-size: 14px;
	color: #6b7280;
  font-weight: 500;
	text-align: right;
}

/* Form styling improvements */
.form-select {
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	background: white;
	min-width: 200px;
}

.form-select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.modal-body { padding: 16px; max-height: 60vh; overflow: auto; }
.modal-footer { padding: 12px 16px; border-top: 1px solid #e4e7ec; display: flex; gap: 10px; justify-content: flex-end; }

/* Showcase Button Styles */
.showcase-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	padding: 8px 16px !important;
	border-radius: 8px;
	transition: all 0.2s ease;
	background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
	color: #ffffff !important;
	border: 2px solid #1d4ed8 !important;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
	position: relative;
	overflow: hidden;
	font-size: 0.875rem;
	cursor: pointer;
}

.showcase-btn * {
	color: #ffffff !important;
}

.showcase-btn svg {
	fill: #ffffff !important;
}

.showcase-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
	border-color: #1e40af;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
	transform: translateY(-1px);
}

.showcase-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #9ca3af;
	border-color: #9ca3af;
	color: #6b7280 !important;
	transform: none;
}

.showcase-btn svg {
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.showcase-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
	transition: left 0.5s ease;
}

.showcase-btn:hover:not(:disabled)::before {
	left: 100%;
}

/* Showcase button in modal header */
.showcase-actions .showcase-btn {
	padding: 12px 24px;
	font-size: 1rem;
}

.selection-count {
	font-size: 0.875rem;
	color: #6b7280;
	font-weight: 500;
}

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.listing-card {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.listing-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-image img {
  transform: scale(1.05);
}

.listing-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.listing-content {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.listing-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
}

.commission-tag {
  background: var(--brand);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.listing-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.price-amount {
  font-weight: 900;
  font-size: 18px;
  color: var(--ink);
}

.listing-specs {
  color: #374151;
  font-size: 14px;
}

.listing-notes {
  color: #374151;
  font-size: 14px;
  line-height: 1.4;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #e4e7ec;
  padding-top: 12px;
}

.listing-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.listing-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.listing-actions {
  display: flex;
  gap: 8px;
}

.listing-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.listing-action-btn:hover {
  background: #f0f3f7;
  transform: translateY(-1px);
}

/* Enhanced Listing Card Styles */
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.listing-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.3;
}

.listing-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stars {
  color: #fbbf24;
  font-size: 0.875rem;
}

.rating-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.listing-price {
  margin-bottom: 16px;
}

.price-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 4px;
}

.listing-specs {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.listing-features {
  margin-bottom: 20px;
}

.feature-tag {
  background: #f0f9ff;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-block;
  border: 1px solid #bae6fd;
}

.feature-tag.secondary {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.listing-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #374151;
}

.listing-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.listing-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.listing-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-weight: bold;
  font-size: 12px;
}

.checkbox-text {
  font-size: 0.875rem;
}

/* Email Preview Modal Styles */
.email-preview-card {
  max-width: 800px;
  width: 90vw;
}

.email-preview-body {
  padding: 0;
  background: #f8fafc;
}

.email-preview {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.email-header {
  background: #f1f5f9;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.email-subject {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.email-from {
  font-size: 0.875rem;
  color: #64748b;
}

.email-content {
  padding: 24px;
}

.email-greeting {
  font-size: 1rem;
  color: #1e293b;
  margin-bottom: 16px;
  font-weight: 500;
}

.email-message {
  margin-bottom: 24px;
  line-height: 1.6;
  color: #374151;
}

.email-message p {
  margin-bottom: 16px;
}

.perks-list {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}

.perks-list li {
  margin-bottom: 8px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: #4b5563;
}

.perks-list li strong {
  color: #1e293b;
}

.preview-properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.preview-property-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: transform 0.2s ease;
}

.preview-property-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-property-image {
  height: 120px;
  overflow: hidden;
}

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

.preview-property-content {
  padding: 12px;
}

.preview-property-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.preview-property-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 4px;
}

.preview-property-specs {
  font-size: 0.75rem;
  color: #6b7280;
}

.email-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.875rem;
}

.email-info {
	font-size: 0.875rem;
	color: #6b7280;
}

/* Interested Leads Modal Styles */
.interested-lead-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 12px;
	background: white;
	transition: all 0.2s ease;
}

.interested-lead-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.lead-info {
	flex: 1;
}

.lead-name {
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 4px;
}

.lead-contact {
	font-size: 0.875rem;
	color: #6b7280;
	margin-bottom: 4px;
}

.lead-agent {
	font-size: 0.75rem;
	color: #9ca3af;
}

.interest-details {
	text-align: right;
}

.interest-date {
	font-size: 0.75rem;
	color: #6b7280;
	margin-bottom: 4px;
}

.interest-status {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 500;
}

.interest-status.interested {
	background: #dcfce7;
	color: #166534;
}

.interest-status.tour-scheduled {
	background: #dbeafe;
	color: #1e40af;
}

.interest-status.converted {
	background: #fef3c7;
	color: #92400e;
}

.interest-icon {
	width: 32px;
	height: 32px;
	background: #f3f4f6;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	font-weight: 600;
	font-size: 0.875rem;
	margin-right: 12px;
}

.interest-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f3f4f6;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: all 0.2s ease;
}

.interest-count:hover {
	background: #e5e7eb;
	transform: translateY(-1px);
}

.interest-count svg {
	width: 16px;
	height: 16px;
}

.primary { background: #0b5; border: 1px solid #0a4; color: #fff; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.primary:disabled { background: #a7f3d0; border-color: #86efac; cursor: not-allowed; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-row input, .form-row textarea { padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 8px; }

.match-item { border: 1px solid #e4e7ec; border-radius: 10px; padding: 12px; margin-bottom: 10px; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; }
.match-title { font-weight: 700; }
.subtle { color: #667085; font-size: 12px; }

/* Toast Notifications */
.toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #111827;
	color: #fff;
	padding: 12px 20px;
	border-radius: 10px;
	box-shadow: 0 10px 20px rgba(0,0,0,0.3);
	font-size: 14px;
	font-weight: 500;
	z-index: 10000;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.3s ease;
	max-width: 400px;
	word-wrap: break-word;
}

.toast.show {
	opacity: 1;
	transform: translateY(0);
}

.toast-success {
	background: #10b981;
	color: #fff;
}

.toast-error {
	background: #ef4444;
	color: #fff;
}

.toast-warning {
	background: #f59e0b;
	color: #fff;
}

.toast-info {
	background: #3b82f6;
	color: #fff;
}

.public-wrap { margin: 16px; background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; overflow: hidden; }
.public-header { padding: 16px; border-bottom: 1px solid #e4e7ec; }
.public-banner { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; padding: 8px 10px; border-radius: 8px; display: inline-block; }
.public-body { padding: 16px; }
.public-card { 
  border: 1px solid var(--rule); 
  border-radius: 12px; 
  padding: 16px; 
  margin-bottom: 12px; 
  background: var(--panel);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-btn { 
  padding: 8px 12px; 
  border: 2px solid var(--rule); 
  background: #fff; 
  border-radius: 8px; 
  cursor: pointer; 
  font-size: 12px; 
  font-weight: 600;
  margin-right: 6px; 
  transition: all 0.2s ease;
}
.action-btn:hover { 
  background: #f8fafc; 
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.action-btn.danger {
  color: var(--danger);
  border-color: #fca5a5;
}
.action-btn.danger:hover {
  background: #fef2f2;
}
.action-btn.secondary {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
  font-size: 13px;
  padding: 6px 12px;
}
.action-btn.secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: 16px; 
  margin-bottom: 20px; 
}
.stat-card { 
  background: var(--panel); 
  border: 1px solid var(--rule); 
  border-radius: 12px; 
  padding: 20px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-card .label { 
  font-size: 12px; 
  color: var(--muted); 
  margin-bottom: 8px; 
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .value { 
  font-size: 28px; 
  font-weight: 800; 
  color: var(--brand); 
}

/* Map Layout */
.listings-layout { 
  display: grid; 
  grid-template-columns: 35% 65%; 
  gap: 20px; 
  margin: 0 24px 24px;
  height: calc(100vh - 150px); /* Increased height by ~10% (was 200px, now 150px) */
  max-height: 900px; /* Increased max height by ~10% (was 800px, now 900px) */
}


/* Column width constraints for listings table */
#listingsTable th:nth-child(1),
#listingsTable td:nth-child(1) {
  width: 50%;
}

#listingsTable th:nth-child(2),
#listingsTable td:nth-child(2) {
  width: 30%;
}

#listingsTable th:nth-child(3),
#listingsTable td:nth-child(3) {
  width: 20%;
}

/* Custom scrollbar for listings table */
.listings-table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.listings-table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.listings-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.listings-table-container {
  overflow-x: auto;
  overflow-y: scroll; /* Force scrollbar to always be visible */
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  height: 100%; /* Take full height of parent */
  max-height: 100%; /* Don't exceed parent height */
  position: relative; /* Ensure proper positioning */
  /* Force scrollbar to be visible */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Webkit scrollbar styling */
.listings-table-container::-webkit-scrollbar {
  width: 8px;
}

.listings-table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.listings-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.listings-table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.mapwrap { 
  border: 1px solid var(--rule); 
  border-radius: 16px; 
  overflow: hidden; 
  height: 100%; /* Take full height of parent */
  max-height: 100%; /* Don't exceed parent height */
  box-shadow: var(--shadow);
}
#listingsMap { 
  width: 100%; 
  height: 100%; 
}

/* Community meta styling */
.community-details {
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
}

.market-info {
	color: #3b82f6;
	font-weight: 600;
}

.beds-baths {
	color: #6b7280;
	font-size: 11px;
}

.listing-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.gear-icon {
	display: flex;
	align-items: center;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 2px;
	border-radius: 4px;
}

.gear-icon:hover {
	background: #f3f4f6;
	transform: scale(1.1);
}

.gear-icon:hover svg {
	color: #374151 !important;
}

.community-meta {
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
}

.interest-count {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.interest-count:hover {
	transform: scale(1.05);
}

.interest-count svg {
	transition: all 0.2s ease;
}

.interest-count:hover svg {
	transform: scale(1.1);
}

.notes-count {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.notes-count:hover {
	transform: scale(1.05);
}

.notes-count svg {
	transition: all 0.2s ease;
}

.notes-count:hover svg {
	transform: scale(1.1);
	color: #fbbf24 !important; /* Yellow on hover */
}

.notes-count span {
	font-size: 12px;
	font-weight: 500;
	color: #374151;
}

.last-updated {
	color: #6b7280;
	font-size: 11px;
}

/* PUMI listing styling - Correct structure */
.listings-layout .table-wrapper #listingsTable tr.pumi-listing {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%) !important;
	border-left: 6px solid #22c55e !important;
	box-shadow: 0 0 25px rgba(34, 197, 94, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
	animation: pumi-table-glow 3s infinite !important;
}

.listings-layout .table-wrapper #listingsTable tr.pumi-listing:hover {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.12) 100%) !important;
	box-shadow: 0 0 30px rgba(34, 197, 94, 0.5), 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.listings-layout .table-wrapper #listingsTable tr.pumi-listing .lead-name {
	color: #15803d !important;
	font-weight: 700 !important;
	text-shadow: 0 0 8px rgba(34, 197, 94, 0.3) !important;
}

.listings-layout .table-wrapper #listingsTable tr.pumi-listing .market-info {
	color: #16a34a !important;
	font-weight: 700 !important;
	text-shadow: 0 0 6px rgba(34, 197, 94, 0.3) !important;
}

/* PUMI table glow animation */
@keyframes pumi-table-glow {
	0% {
		box-shadow: 0 0 25px rgba(34, 197, 94, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1);
	}
	50% {
		box-shadow: 0 0 35px rgba(34, 197, 94, 0.6), 0 6px 16px rgba(0, 0, 0, 0.15);
	}
	100% {
		box-shadow: 0 0 25px rgba(34, 197, 94, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1);
	}
}

/* Form styling for listing edit modal */
.form-group {
	margin-bottom: 16px;
}

.form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--text-dark);
	font-size: 14px;
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
	accent-color: #3b82f6;
	flex-shrink: 0; /* Prevent checkbox from shrinking */
}

.checkbox-label span {
	font-size: 14px;
	color: #374151;
}

/* Disabled checkboxes for off-market units */
.unit-checkbox:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* Field hint text */
.field-hint {
	font-size: 0.85em;
	color: #6b7280;
	margin-top: 4px;
	line-height: 1.4;
	line-height: 1.5;
}

/* Password validation styles */
.password-field {
	position: relative;
}

.password-error {
	display: none;
	color: #dc2626;
	font-size: 12px;
	margin-top: 4px;
}

.password-field.error input {
	border-color: #dc2626;
	background-color: #fef2f2;
}

.password-field.error .password-error {
	display: block;
}

.password-field.success input {
	border-color: #10b981;
	background-color: #f0fdf4;
}

/* Review flag styling */
.review-flag {
	margin-left: 8px;
	font-size: 14px;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.6; }
	100% { opacity: 1; }
}

/* Custom dot markers */
.custom-dot-marker {
	transition: all 0.2s ease;
}

.custom-dot-marker:hover {
	transform: scale(1.2);
	box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}

/* PUMI pulse animation for map dots - fixed positioning */
@keyframes pumi-pulse {
	0% {
		box-shadow: 0 0 15px rgba(34, 197, 94, 0.8), 0 0 25px rgba(34, 197, 94, 0.6), 0 2px 8px rgba(0,0,0,0.3);
	}
	50% {
		box-shadow: 0 0 20px rgba(34, 197, 94, 1), 0 0 35px rgba(34, 197, 94, 0.8), 0 2px 12px rgba(0,0,0,0.4);
	}
	100% {
		box-shadow: 0 0 15px rgba(34, 197, 94, 0.8), 0 0 25px rgba(34, 197, 94, 0.6), 0 2px 8px rgba(0,0,0,0.3);
	}
}

/* Mapbox popup styles */
.mapboxgl-popup-content {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 12px;
}

.mapboxgl-popup-content .mapbox-popup {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mapboxgl-popup-content .mapbox-popup strong {
	color: var(--text-dark);
	font-weight: 600;
}

.mapboxgl-popup-content .mapbox-popup .subtle {
	color: #6b7280;
	font-size: 12px;
}
.price-marker { 
  background: #dc2626; 
  color: #fff; 
  font-weight: 900; 
  padding: 4px 8px; 
  border-radius: 12px; 
  border: 2px solid #fff; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.3); 
  white-space: nowrap; 
  font-size: 12px;
  min-width: 40px;
  max-width: 80px;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-marker:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.price-marker.selected {
  background: #ef4444;
  border-color: #fbbf24;
  transform: scale(1.1);
}

/* Health Status Popover */
.popover { 
  position: fixed; 
  z-index: 2500; 
  background: #fff; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  box-shadow: 0 20px 40px rgba(0,0,0,.18); 
  padding: 12px 16px; 
  width: 280px; 
  display: none;
}
.popover h4 { 
  margin: 0 0 8px; 
  font-size: 14px; 
  color: #111827; 
  font-weight: 700;
}
.popover ul { 
  margin: 0; 
  padding-left: 18px; 
}
.popover li { 
  font-size: 13px; 
  color: #374151; 
  margin: 4px 0; 
  line-height: 1.4;
}
.popover .small { 
  color: #6b7280; 
  font-size: 11px; 
  margin-top: 8px; 
  font-style: italic;
}
.arrow { 
  position: absolute; 
  width: 0; 
  height: 0; 
  border-left: 8px solid transparent; 
  border-right: 8px solid transparent; 
  border-bottom: 8px solid #e5e7eb; 
  top: -8px; 
  left: 18px; 
}
.arrow::after { 
  content: ""; 
  position: absolute; 
  top: 1px; 
  left: -7px; 
  width: 0; 
  height: 0; 
  border-left: 7px solid transparent; 
  border-right: 7px solid transparent; 
  border-bottom: 7px solid #fff; 
}

/* Documents Page Styles */
.agent-row {
  transition: all 0.2s ease;
}

.agent-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.agent-details {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.leads-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: #f8fbff;
  border: 2px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
  min-width: 200px;
}

.dropdown-toggle:hover {
  background: #e0f2fe;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 62, 122, 0.1);
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 400px;
  overflow-y: auto;
}

.lead-item {
  padding: 16px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s ease;
}

.lead-item:last-child {
  border-bottom: none;
}

.lead-item:hover {
  background: #f8fbff;
}

.lead-item .lead-name {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
  font-size: 14px;
}

.lead-document-summary {
  margin: 8px 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.current-step {
  font-size: 11px;
  color: var(--brand);
  font-weight: 600;
  font-style: italic;
}

.overall-status {
  min-width: 200px;
}

.view-details-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.view-details-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(21, 62, 122, 0.3);
}

/* Document Steps Styles */
.document-step {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.document-step.completed {
  border-color: var(--success);
  background: #f0fdf4;
}

.document-step.current {
  border-color: var(--brand);
  background: #e0f2fe;
  box-shadow: 0 4px 12px rgba(21, 62, 122, 0.1);
}

.document-step.pending {
  border-color: var(--rule);
  background: #f9fafb;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.step-number {
  font-weight: 800;
  font-size: 16px;
  color: var(--brand);
  min-width: 24px;
}

.step-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  flex: 1;
}

.step-completed {
  color: var(--success);
  font-weight: 700;
  font-size: 12px;
}

.step-current {
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
}

.step-pending {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

.attachments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
}

.attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fbff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.attachment:hover {
  background: #e0f2fe;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(21, 62, 122, 0.1);
}

.attachment:last-child {
  margin-bottom: 0;
}

.attachment-icon {
  font-size: 14px;
  color: var(--muted);
}

.attachment-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.attachment-download {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attachment-download:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* History Modal Styles */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  transition: all 0.2s ease;
}

.history-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lead-info h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.lead-info .agent-info {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.lead-info .closed-date {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 62, 122, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-secondary:hover:not(:disabled) {
  background: #f8fbff;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:disabled {
  background: #f1f5f9;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}

.btn-outline:hover:not(:disabled) {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(21, 62, 122, 0.2);
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
  background: #9ca3af;
  color: #d1d5db;
  border-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Bulk Selection Count (inline with buttons) */
.bulk-selection-count {
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  padding: 8px 12px;
  background: #eff6ff;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.bulk-selection-count:empty {
  display: none;
}

@media (max-width: 1100px) {
  .listings-layout { 
    grid-template-columns: 1fr; 
    height: calc(100vh - 100px); /* Increased height by ~10% (was 150px, now 100px) */
    max-height: 700px; /* Increased max height by ~10% (was 600px, now 700px) */
  }
  #listingsMap { 
    height: 350px; /* Increased height by ~10% (was 300px, now 350px) */
  }
  
  .history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .dropdown-content {
    max-height: 300px;
  }
}

/* New Documents Page Styles */
.documents-manager-view {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.documents-search {
	margin-bottom: 20px;
}

.search-controls {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	padding: 20px;
	background: #f8fafc;
	border-radius: 8px;
	border: 1px solid #e4e7ec;
}

.search-field,
.search-type {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.search-field label,
.search-type label {
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

.search-field input,
.search-type select {
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	min-width: 200px;
}

.search-field input:focus,
.search-type select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.leads-details h3 {
	margin: 0 0 16px 0;
	padding-left: 20px;
	font-size: 18px;
	font-weight: 600;
	color: #1e293b;
}

.btn-small {
	padding: 6px 12px;
	font-size: 12px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-primary-small {
	background: #3b82f6;
	color: white;
}

.btn-primary-small:hover {
	background: #2563eb;
}

.btn-secondary-small {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #e2e8f0;
}

.btn-secondary-small:hover {
	background: #e2e8f0;
}

/* Agent View Styles */
.documents-agent-view {
	padding: 20px 0;
}

/* Individual Lead Table System */
.documents-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 100%;
	margin: 0 auto;
	padding: 24px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	width: 100%;
	box-sizing: border-box;
}

.lead-table-container {
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 16px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	margin-bottom: 16px;
}

.lead-table-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	cursor: pointer;
}

.lead-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.lead-icon {
	font-size: 18px;
	opacity: 0.7;
}

.lead-details {
	display: flex;
	align-items: center;
}

.lead-names {
	display: flex;
	align-items: center;
	gap: 16px;
}

.agent-label, .lead-label {
	font-weight: 600;
	color: var(--muted);
	font-size: 14px;
}

.agent-name, .lead-name {
	font-weight: 600;
	color: var(--text-dark);
	font-size: 14px;
}

.progress-center {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
}

.progress-info {
	font-size: 13px;
	color: var(--accent);
	font-weight: 500;
	text-align: center;
}

.lead-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
	justify-content: flex-end;
}

.last-updated {
	font-size: 12px;
	color: var(--muted);
	font-weight: 500;
}

.lead-status {
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-block;
	width: fit-content;
}

.lead-status.current {
	background: var(--accent);
	color: white;
}

.lead-status.completed {
	background: var(--success);
	color: white;
}

.lead-status.pending {
	background: var(--warning);
	color: white;
}

.expand-btn {
	background: none;
	border: none;
	color: var(--ink);
	font-size: 18px;
	cursor: pointer;
	padding: 8px;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.expand-btn:hover {
	background: rgba(0,0,0,0.1);
}

.lead-table-content {
	transition: all 0.3s ease;
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}

.lead-table-content.collapsed {
	max-height: 0;
	padding: 0 20px;
}

.lead-table-content.expanded {
	max-height: 2000px;
	padding: 20px;
}

/* Form Row Styles */
.form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.form-row .field {
	flex: 1;
	margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
	.documents-container {
		padding: 0 10px;
	}
	
	.lead-table-header {
		padding: 12px 16px;
	}
	
	.lead-table-content.expanded {
		padding: 16px;
	}
	
	.form-row {
		flex-direction: column;
		gap: 0;
	}
	
	/* Showcase modal responsive */
	.modal-sticky-header {
		flex-direction: column;
		gap: 16px;
		padding: 16px;
	}
	
	.showcase-controls {
		width: 100%;
	}
	
	.showcase-actions {
		width: 100%;
		align-items: stretch;
		min-width: auto;
	}
	
	.showcase-actions .showcase-btn {
		width: 100%;
		justify-content: center;
	}
	
	.selection-count {
		text-align: center;
	}
	
	/* Progress bar responsive scaling */
	.progress-bar-container {
		padding: 12px 16px;
	}
	
	.progress-step-label {
		font-size: 9px;
		max-width: 60px;
	}
	
	/* Removed lead-data-table responsive styles */
}

/* Desktop responsive scaling for progress bars */
@media (min-width: 769px) {
	.progress-bar-container {
		min-width: 100%;
	}
	
	.progress-bar {
		min-width: 100%;
	}
	
	.progress-steps {
		width: 100%;
	}
}

/* Removed lead-data-table styles - no longer using tables */

.progress-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin-top: 16px;
	width: 100%;
	box-sizing: border-box;
}

.progress-summary {
	padding: 8px 12px;
	text-align: center;
	vertical-align: middle;
	width: 150px;
}

.progress-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-start;
	justify-content: center;
	height: 100%;
	min-height: 60px;
	text-align: left;
}

.progress-percentage {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-dark);
	text-align: left;
}

.progress-status {
	font-size: 10px;
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-block;
	text-align: left;
}


.progress-status.current {
	background: var(--accent);
	color: white;
}

.progress-status.completed {
	background: var(--success);
	color: white;
}

.progress-status.pending {
	background: var(--warning);
	color: white;
}

.progress-bar-cell {
	padding: 16px 20px;
	background: #f8f9fa;
}

.progress-bar-container {
	position: relative;
	height: 60px;
	display: flex;
	align-items: center;
	margin: 0;
	background: #f8fafc;
	border-radius: 12px;
	padding: 16px 20px;
	width: 100%;
	box-sizing: border-box;
}

.progress-bar {
	position: relative;
	width: 100%;
	height: 8px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: visible;
}

.progress-line-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 8px;
	background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.progress-steps {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 0;
	display: flex;
	justify-content: space-between;
	transform: translateY(-50%);
	padding: 0 10px;
	z-index: 1;
}

.progress-step {
	position: relative;
	width: 24px;
	height: 24px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.progress-step:hover {
	transform: scale(1.3);
}

.progress-step-dot {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #cbd5e1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--muted);
	transition: all 0.2s ease;
	position: relative;
	z-index: 2;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-step-dot.completed {
	background: var(--success);
	border-color: var(--success);
	color: white;
}

.progress-step-dot.current {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
	animation: pulse 2s infinite;
}

.progress-step-dot.pending {
	background: var(--panel);
	border-color: var(--rule);
	color: var(--muted);
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
	70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.progress-step-label {
	position: absolute;
	top: 30px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	color: #64748b;
	font-weight: 500;
	white-space: nowrap;
	text-align: center;
	width: 70px;
	line-height: 1.2;
}

.progress-step.completed .progress-step-label {
	color: var(--success);
	font-weight: 600;
}

.progress-step.current .progress-step-label {
	color: var(--accent);
	font-weight: 600;
}

/* Progress Step Modal */
.progress-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.progress-modal.show {
	opacity: 1;
	visibility: visible;
}

.progress-modal-content {
	background: white;
	border: 2px solid var(--brand);
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 8px 25px rgba(0,0,0,0.25);
	min-width: 300px;
	max-width: 500px;
	position: relative;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.progress-modal.show .progress-modal-content {
	transform: scale(1);
}

.progress-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: var(--muted);
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s ease;
}

.progress-modal-close:hover {
	background: var(--rule);
	color: var(--ink);
}

.modal-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--brand);
	margin: 0 0 16px 0;
	text-align: center;
}

.modal-content {
	font-size: 14px;
	color: var(--ink);
	line-height: 1.5;
}

.modal-link {
	display: inline-block;
	margin-top: 16px;
	padding: 10px 20px;
	background: var(--accent);
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.2s ease;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.modal-link:hover {
	background: var(--brand);
	color: white;
}

.modal-details {
	margin: 8px 0;
	font-size: 14px;
	color: var(--ink);
	padding: 8px 0;
	border-bottom: 1px solid var(--rule);
}

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

/* Modal Loading and Error States */
.modal-loading {
	text-align: center;
	padding: 40px 20px;
	color: var(--subtle);
	font-style: italic;
}

.modal-error {
	text-align: center;
	padding: 40px 20px;
	color: #dc2626;
	font-weight: 500;
}

/* Modal Sections */
.modal-section {
	margin: 20px 0;
	padding: 16px;
	background: var(--panel);
	border-radius: 8px;
	border-left: 3px solid var(--brand);
}

.modal-section strong {
	display: block;
	margin-bottom: 12px;
	color: var(--brand);
	font-size: 15px;
}

/* Preferences List */
.preferences-list {
	list-style: none;
	padding: 0;
	margin: 8px 0 0 0;
}

.preferences-list li {
	padding: 8px 12px;
	margin: 6px 0;
	background: white;
	border-radius: 6px;
	border: 1px solid var(--rule);
	display: flex;
	gap: 8px;
}

.preferences-list li strong {
	display: inline;
	margin: 0;
	color: var(--ink);
	font-size: 14px;
	min-width: 140px;
}

/* Email Placeholder */
.email-placeholder {
	background: #fef3c7;
	border: 1px dashed #f59e0b;
	border-radius: 6px;
	padding: 16px;
	margin-top: 8px;
	color: #92400e;
}

.email-placeholder em {
	display: block;
}

/* Guest Card Workflow Styles */
.guest-card-workflow {
	max-width: 100%;
}

.guest-card-workflow .help-text {
	color: var(--subtle);
	font-size: 13px;
	margin-top: 8px;
	font-style: italic;
}

.properties-list {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.guest-card-property {
	border: 2px solid var(--rule);
	border-radius: 8px;
	padding: 16px;
	background: white;
	transition: border-color 0.2s ease;
}

.guest-card-property:hover {
	border-color: var(--brand);
}

.guest-card-property.error {
	border-color: #dc2626;
	background: #fef2f2;
	color: #dc2626;
}

.property-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--rule);
}

.property-header h4 {
	margin: 0;
	font-size: 16px;
	color: var(--brand);
	font-weight: 600;
}

.contact-status-badge {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}

.contact-status-badge.contact-ok {
	background: #d1fae5;
	color: #065f46;
}

.contact-status-badge.contact-missing {
	background: #fef3c7;
	color: #92400e;
}

.property-details {
	margin: 12px 0;
	font-size: 14px;
}

.property-details > div {
	padding: 6px 0;
	color: var(--ink);
}

.property-details strong {
	color: var(--brand);
	margin-right: 8px;
	min-width: 120px;
	display: inline-block;
}

.missing-contact-warning {
	margin-top: 12px;
	padding: 12px;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 6px;
}

.missing-contact-warning p {
	margin: 0 0 12px 0;
	color: #92400e;
	font-weight: 500;
}

.property-actions {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--rule);
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

.property-actions .btn {
	flex: 0 0 auto;
	min-width: 160px;
}

.modal-warning {
	padding: 20px;
	background: #fef3c7;
	border: 2px solid #f59e0b;
	border-radius: 8px;
	color: #92400e;
	font-weight: 500;
	text-align: center;
}
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 14px;
}

.email-details-placeholder {
	font-size: 13px;
	line-height: 1.6;
	margin-top: 8px;
	padding-left: 20px;
}

/* Properties Page Sections */
.properties-section {
	margin-bottom: 40px;
}

.properties-section:first-of-type {
	margin-bottom: 60px; /* Extra space after Property Specials */
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--brand);
}

.section-header h2 {
	margin: 0;
	font-size: 20px;
	color: var(--brand);
	font-weight: 600;
}

.field-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--subtle);
	font-style: italic;
}

.text-muted {
	color: var(--subtle);
	font-style: italic;
}

.no-contact-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	background: #fef3c7;
	color: #92400e;
	border-radius: 4px;
	margin-left: 8px;
	font-weight: 500;
}

/* Interactive Progress Bar */
.progress-bar-container {
	margin: 20px 0;
}

.progress-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	margin: 20px 0;
}

.progress-line {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--rule);
	transform: translateY(-50%);
	z-index: 1;
}

.progress-line-fill {
	position: absolute;
	top: 50%;
	left: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
	transform: translateY(-50%);
	z-index: 2;
	transition: width 0.3s ease;
}

.progress-step {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.progress-step:hover {
	transform: scale(1.1);
}

.progress-step-dot {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #cbd5e1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	transition: all 0.2s ease;
	position: relative;
}

.progress-step-dot.completed {
	background: var(--success);
	border-color: var(--success);
	color: white;
}

.progress-step-dot.current {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
	animation: pulse 2s infinite;
}

.progress-step-dot.pending {
	background: var(--panel);
	border-color: var(--rule);
	color: var(--muted);
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
	70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.progress-step-label {
	font-size: 11px;
	font-weight: 500;
	color: #64748b;
	margin-top: 8px;
	text-align: center;
	max-width: 80px;
	line-height: 1.2;
}

.progress-step.completed .progress-step-label {
	color: var(--success);
	font-weight: 600;
}

.progress-step.current .progress-step-label {
	color: var(--accent);
	font-weight: 600;
}

/* Progress Details Modal */
.progress-details {
	background: var(--panel);
	border-radius: 8px;
	padding: 16px;
	margin-top: 12px;
	border: 1px solid var(--rule);
}

.progress-details h4 {
	margin: 0 0 12px 0;
	font-size: 16px;
	color: var(--ink);
}

.progress-details p {
	margin: 0 0 8px 0;
	font-size: 14px;
	color: var(--muted);
}

.progress-details .detail-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
}

.progress-details .detail-link:hover {
	text-decoration: underline;
}

.progress-details .property-details {
	background: var(--bg);
	padding: 12px;
	border-radius: 6px;
	margin-top: 8px;
}

.progress-details .property-details h5 {
	margin: 0 0 8px 0;
	font-size: 14px;
	color: var(--ink);
}

.progress-details .property-details p {
	margin: 0 0 4px 0;
	font-size: 13px;
	color: var(--muted);
}

/* Responsive Design */
@media (max-width: 768px) {
	.progress-leads-container {
		grid-template-columns: 1fr;
	}
	
	.progress-card {
		padding: 16px;
	}
	
	.progress-step-label {
		font-size: 10px;
		max-width: 60px;
	}
}

/* Admin Page Styles */
.admin-content {
	padding: 20px;
	max-width: 100%;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.admin-section {
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-bottom: 32px;
	overflow: hidden;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
}

.section-header h2 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: #1e293b;
}

.audit-filters {
	display: flex;
	align-items: center;
	gap: 12px;
}

.audit-filters select {
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}

.users-table-wrapper {
	overflow-x: auto;
	width: 100%;
	box-sizing: border-box;
}

.audit-log-wrapper {
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	width: 100%;
	box-sizing: border-box;
}

.audit-log {
	padding: 16px;
}

.audit-entry {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #f1f5f9;
	transition: background-color 0.2s ease;
}

.audit-entry:hover {
	background: #f8fafc;
}

.audit-entry:last-child {
	border-bottom: none;
}

.audit-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	font-size: 14px;
	font-weight: 600;
	color: white;
}

.audit-icon.user-created { background: #10b981; }
.audit-icon.user-updated { background: #3b82f6; }
.audit-icon.user-deleted { background: #ef4444; }
.audit-icon.role-changed { background: #f59e0b; }
.audit-icon.password-changed { background: #8b5cf6; }

.audit-content {
	flex: 1;
}

.audit-action {
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 4px;
}

.audit-details {
	font-size: 0.875rem;
	color: #64748b;
}

.audit-timestamp {
	font-size: 0.75rem;
	color: #9ca3af;
	margin-left: 12px;
}

.user-status {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.user-status.active {
	background: #dcfce7;
	color: #166534;
}

.user-status.pending {
	background: #fef3c7;
	color: #92400e;
}

.user-status.invited {
	background: #dbeafe;
	color: #1e40af;
}

.user-status.suspended {
	background: #fee2e2;
	color: #991b1b;
}

.user-actions {
	display: flex;
	gap: 8px;
}

.user-actions .btn {
	padding: 6px 12px;
	font-size: 0.75rem;
}

.role-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.role-badge.role-agent {
	background: #dbeafe;
	color: #1e40af;
}

.role-badge.role-manager {
	background: #fef3c7;
	color: #92400e;
}

.role-badge.role-super_user {
	background: #f3e8ff;
	color: #7c3aed;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 20px 24px;
	border-top: 1px solid #e5e7eb;
	background: #f8fafc;
}

.field label input[type="checkbox"] {
	margin-right: 8px;
}

/* Responsive Admin */
@media (max-width: 768px) {
	.admin-content {
		padding: 16px;
	}
	
	.section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	
	.audit-entry {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	.audit-timestamp {
		margin-left: 0;
	}
}

/* Desktop responsive scaling for Admin page */
@media (min-width: 769px) {
	.admin-content {
		min-width: 100%;
	}
	
	.admin-section {
		width: 100%;
	}
	
	.users-table-wrapper {
		width: 100%;
	}
	
	.audit-log-wrapper {
		width: 100%;
	}
}

.agent-leads-list h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1e293b;
}

.lead-card {
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.lead-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.lead-name {
	font-weight: 600;
	font-size: 16px;
	color: #1e293b;
}

.lead-status {
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 12px;
	font-weight: 500;
}

.lead-status.active {
	background: #dcfce7;
	color: #166534;
}

.lead-status.completed {
	background: #dbeafe;
	color: #1e40af;
}

.lead-status.stalled {
	background: #fef3c7;
	color: #92400e;
}

.lead-progress {
	margin-bottom: 12px;
}

.lead-actions {
	display: flex;
	gap: 8px;
}

/* Document Steps */
.document-steps {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

.document-step {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 14px;
}

.document-step.completed {
	background: #dcfce7;
	color: #166534;
}

.document-step.current {
	background: #dbeafe;
	color: #1e40af;
	font-weight: 600;
}

.document-step.pending {
	background: #f1f5f9;
	color: #64748b;
}

.step-header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.step-number {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
}

.step-completed .step-number {
	background: #22c55e;
	color: white;
}

.step-current .step-number {
	background: #3b82f6;
	color: white;
}

.step-pending .step-number {
	background: #e2e8f0;
	color: #64748b;
}

.attachments {
	margin-top: 8px;
	padding-left: 28px;
}

.attachment {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0;
	font-size: 12px;
	color: #64748b;
}

.attachment-icon {
	width: 16px;
	height: 16px;
}

.attachment-name {
	flex: 1;
}

.attachment-download {
	color: #3b82f6;
	text-decoration: none;
	cursor: pointer;
}

.attachment-download:hover {
	text-decoration: underline;
}

/* Specials Page Styles */
.special-property-name {
	font-weight: 600;
	color: var(--ink);
	margin-bottom: 4px;
}

.special-description {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
	max-width: 300px;
	word-wrap: break-word;
}

.special-expired {
	background: #ef4444;
	color: white;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	display: inline-block;
	margin-top: 4px;
}

.special-expires-soon {
	background: #f59e0b;
	color: white;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	display: inline-block;
	margin-top: 4px;
}

.expired {
	color: #ef4444;
	font-weight: 600;
}

.action-buttons {
	display: flex;
	gap: 8px;
	justify-content: center;
}

.action-buttons .icon-btn {
	padding: 4px 8px;
	font-size: 14px;
	border: 1px solid var(--rule);
	background: var(--panel);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.action-buttons .icon-btn:hover {
	background: var(--brand);
	color: white;
	border-color: var(--brand);
}

/* Specials modal form styles */
#addSpecialModal .form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

#addSpecialModal .form-row .field {
	flex: 1;
	margin-bottom: 0;
}

#addSpecialModal .field textarea {
	resize: vertical;
	min-height: 80px;
}

/* Brand logo styling */
.brand-logo {
	height: 40px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
}

/* ===== MAIN CONTENT SPACING ===== */

/* Ensure main content doesn't get hidden behind sticky header */
main#appRoot {
	padding-top: 20px;
}

/* Ensure first view has proper spacing */
.route-view:first-child {
	margin-top: 0;
}

/* Mobile content spacing */
@media (max-width: 768px) {
	main#appRoot {
		padding-top: 10px;
	}
}

/* ===== BUG TRACKER STYLES ===== */

/* Bug flag icons */
.bug-flag {
	position: fixed;
	top: 50%;
	right: 20px;
	transform: translateY(-50%);
	z-index: 1000;
	background: #10b981;
	color: white;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bug-flag:hover {
	background: #059669;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.bug-flag:active {
	transform: translateY(-50%) scale(0.95);
}

/* Bug tracker page */
.bug-filters {
	display: flex;
	gap: 12px;
	align-items: center;
}

.bug-filters select {
	padding: 6px 12px;
	border: 1px solid var(--rule);
	border-radius: 6px;
	background: var(--panel);
	color: var(--ink);
}

.bugs-table-wrapper {
	overflow-x: auto;
}

/* Bug status badges */
.bug-status {
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.bug-status.pending {
	background: #fef3c7;
	color: #92400e;
}

.bug-status.in_progress {
	background: #dbeafe;
	color: #1e40af;
}

.bug-status.resolved {
	background: #d1fae5;
	color: #065f46;
}

.bug-status.closed {
	background: #f3f4f6;
	color: #374151;
}

/* Bug priority badges */
.bug-priority {
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.bug-priority.low {
	background: #f0f9ff;
	color: #0369a1;
}

.bug-priority.medium {
	background: #fef3c7;
	color: #92400e;
}

.bug-priority.high {
	background: #fed7aa;
	color: #c2410c;
}

.bug-priority.critical {
	background: #fecaca;
	color: #dc2626;
}

/* Bug details modal */
.modal-card.large {
	max-width: 800px;
	width: 90vw;
}

/* Bug table dropdowns */
.bug-status-select,
.bug-priority-select {
	padding: 4px 8px;
	border: 1px solid var(--rule);
	border-radius: 4px;
	background: var(--panel);
	color: var(--ink);
	font-size: 12px;
	min-width: 100px;
}

.bug-status-select:focus,
.bug-priority-select:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Save button styling */
.save-bug {
	background: #10b981 !important;
	color: white !important;
}

.save-bug:hover {
	background: #059669 !important;
}

.bug-details-section {
	margin-bottom: 20px;
	padding: 15px;
	background: var(--panel);
	border-radius: 8px;
	border-left: 4px solid var(--brand);
}

.bug-details-section h4 {
	margin: 0 0 10px 0;
	color: var(--ink);
	font-size: 16px;
}

.bug-details-section p {
	margin: 0;
	color: var(--muted);
	line-height: 1.5;
}

.bug-context {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 10px;
	font-family: monospace;
	font-size: 12px;
	color: #475569;
}

/* Mobile bug flag */
@media (max-width: 768px) {
	.bug-flag {
		width: 45px;
		height: 45px;
		font-size: 20px;
		right: 15px;
	}
}

/* ===== MINIMAL MOBILE FIXES ===== */

/* Only essential mobile improvements - no layout changes */
@media (max-width: 768px) {
	/* Header mobile layout */
	.app-header {
		flex-wrap: wrap;
		padding: 10px 15px;
		gap: 10px;
		min-height: auto;
	}
	
	/* Brand mobile */
	.brand {
		flex-shrink: 0;
	}
	
	.brand-logo {
		height: 28px;
		max-width: 120px;
	}
	
	/* Navigation mobile - horizontal scroll */
	.main-nav {
		overflow-x: auto;
		overflow-y: hidden;
		flex-wrap: nowrap;
		gap: 16px;
		padding: 0 10px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none; /* Firefox */
		-ms-overflow-style: none; /* IE/Edge */
	}
	
	.main-nav::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
	}
	
	.nav-link {
		flex-shrink: 0;
		white-space: nowrap;
		padding: 8px 12px;
		font-size: 14px;
	}
	
	/* Role switch mobile */
	.role-switch {
		flex-shrink: 0;
		font-size: 12px;
		padding: 6px 12px;
	}
	
	.role-switch select {
		font-size: 12px;
		padding: 4px 8px;
	}
	
	/* Touch-friendly buttons */
	.btn {
		min-height: 44px;
		padding: 12px 16px;
		font-size: 16px;
	}
	
	/* Form inputs mobile */
	input, select, textarea {
		font-size: 16px; /* Prevents zoom on iOS */
	}
	
	/* Modal mobile */
	.modal-card {
		margin: 20px;
		max-height: 90vh;
		overflow-y: auto;
	}
	
	/* Table horizontal scroll */
	.data-table {
		overflow-x: auto;
	}
}

