:root {
  /* ─── Leese brand tokens ─── */
  /* Canvas (ops-tuned: light working surfaces, brand-coloured accents) */
  --color-bg: #F0EFED;          /* brand off-white */
  --color-surface: #FFFFFF;     /* cards, modals, inputs */
  --color-surface-2: #F6F5F3;   /* subtle sub-surface / table stripe */
  --color-surface-3: #EAE8E4;   /* hover on surface-2 */
  --color-border: rgba(10, 10, 10, 0.08);
  --color-border-strong: rgba(10, 10, 10, 0.16);

  /* Ink */
  --color-text: #0A0A0A;        /* brand black — not pure black */
  --color-text-muted: #5C5C5C;
  --color-text-faint: #8E8E8E;

  /* Primary / accent — India green */
  --color-primary: #0A0A0A;
  --color-primary-hover: #222222;
  --color-accent: #138808;         /* Leese Green */
  --color-accent-hover: #17A30A;   /* interaction state */
  --color-accent-light: rgba(19, 136, 8, 0.10);
  --color-accent-glow: rgba(19, 136, 8, 0.04);

  /* Semantic — tuned to work on off-white */
  --color-success: #138808;
  --color-success-bg: rgba(19, 136, 8, 0.10);
  --color-warning: #B36A00;
  --color-warning-bg: rgba(179, 106, 0, 0.10);
  --color-error: #C0261A;
  --color-error-bg: rgba(192, 38, 26, 0.08);

  /* Typography — brand system */
  --font-serif: 'Gloock', 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;    /* for Gloock page titles */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);

  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
}

/* --- Layout --- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.app-logo-wordmark {
  height: 26px;
  width: auto;
  display: block;
}

.app-logo-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--color-text);
  line-height: 1;
}

.app-logo-text .dot { color: var(--color-accent); }

.app-logo-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border-strong);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8);
}

.main-content.wide {
  max-width: 1200px;
}

/* --- Typography --- */

h1 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: var(--color-text);
}

h2 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--color-text);
}

h3 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* "Eyebrow" accent before page titles — brand signature */
.page-header .eyebrow,
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.page-header {
  margin-bottom: var(--space-8);
}

.page-header h1 em {
  font-style: italic;
  color: var(--color-accent);
}

.page-header p {
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-size: var(--text-base);
}

/* Footer — brand footprint */
.app-footer {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-12);
}
.app-footer .footer-dot {
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: 14px;
}
.app-footer .footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
  letter-spacing: 0;
  text-transform: none;
}

/* --- Cards & Sections --- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  overflow: hidden;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  user-select: none;
}

.form-section-header:hover {
  background: var(--color-surface-3);
}

.section-label {
  font-family: var(--font-mono);
}

.section-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-section-body {
  padding: var(--space-6);
}

/* --- Form Fields --- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4) var(--space-5);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.field label .required {
  color: var(--color-error);
  margin-left: 2px;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: all var(--transition);
  outline: none;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-faint);
}

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

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field input[type="number"] {
  -moz-appearance: textfield;
}

.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  user-select: none;
}

.checkbox-item:hover {
  border-color: var(--color-accent);
}

.checkbox-item.checked {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.checkbox-item input {
  display: none;
}

/* Toggle switch */
.toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
}

.toggle-field label {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-border-strong);
  border-radius: 22px;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--color-accent);
}

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

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

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

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  background: var(--color-surface-2);
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: var(--color-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.btn-lg {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
}

/* --- Status Badge --- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.awaiting-media {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.status-badge.awaiting-media::before {
  background: var(--color-warning);
}

.status-badge.media-ready {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-badge.media-ready::before {
  background: var(--color-success);
}

.status-badge.inactive {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.status-badge.inactive::before {
  background: var(--color-text-faint);
}

/* --- Success Card --- */

.success-card {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  max-width: 520px;
  margin: var(--space-10) auto;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-6);
  background: var(--color-success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.success-card h1 {
  margin-bottom: var(--space-2);
}

.success-card .property-code {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  margin: var(--space-4) 0;
}

.success-summary {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin: var(--space-6) 0;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.success-summary dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.success-summary dd {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.success-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}

/* --- Detail View --- */

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.detail-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.detail-code {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.detail-section {
  margin-bottom: var(--space-6);
}

.detail-section h2 {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4) var(--space-5);
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-field dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.detail-field dd {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.detail-field dd.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- List View / Table --- */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.list-filters {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.list-filters select,
.list-filters input {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: all var(--transition);
}

.list-filters select:focus,
.list-filters input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.list-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

thead th {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

tbody td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(0, 102, 204, 0.02);
}

tbody tr {
  cursor: pointer;
  transition: background var(--transition);
}

.table-empty {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
}

.table-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  opacity: 0.3;
}

.table-empty p {
  font-size: var(--text-sm);
}

/* --- Search Bar --- */

.search-bar {
  display: flex;
  gap: var(--space-3);
  max-width: 500px;
}

.search-bar input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
  background: var(--color-surface);
  color: var(--color-text);
}

.search-bar input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* --- Toast --- */

.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--color-text);
  color: white;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast.error {
  background: var(--color-error);
}

/* --- Loading --- */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Filter toggle pills --- */

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  user-select: none;
  white-space: nowrap;
}

.filter-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.filter-toggle.active {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-toggle input {
  display: none;
}

.tags-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.tags-inline .tag {
  padding: 1px 6px;
  font-size: 11px;
}

/* --- Media Upload Modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;           /* invisible overlay must NEVER block clicks */
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
  padding: var(--space-4);
}

/* Both .show and .active make the overlay visible and interactive.
   Some modals use .active, others use .show — both must work. */
.modal-overlay.show,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.97);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-size: var(--text-base);
  font-weight: 600;
}

.modal-body {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* Upload Zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.upload-zone:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.upload-zone.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

/* Upload Progress Items */
.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-xs);
  border-bottom: 1px solid var(--color-border);
}

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

.upload-item-name {
  color: var(--color-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.upload-item-status {
  font-weight: 600;
  flex-shrink: 0;
}

.upload-item-status.uploading {
  color: var(--color-accent);
}

.upload-item-status.done {
  color: var(--color-success);
}

.upload-item-status.error {
  color: var(--color-error);
}

/* Media Grid */
/* Form contact rows */
.form-contact-row {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}

/* Inspection contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.contact-card {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
}

.contact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.contact-card-header strong {
  font-size: var(--text-sm);
}

.contact-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--color-primary-light, #e8f5e3);
  color: var(--color-primary, #138808);
  margin-left: var(--space-2);
  vertical-align: middle;
}

.contact-card-phone {
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.contact-card-phone a {
  color: var(--color-primary, #138808);
  text-decoration: none;
  font-weight: 500;
}

.contact-card-phone a:hover {
  text-decoration: underline;
}

.contact-card-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.contact-card-meta .meta-label {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 18px;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity var(--transition), color var(--transition);
}

.btn-icon:hover {
  opacity: 1;
  color: var(--color-error);
}

/* Property detail media gallery */
.detail-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.detail-media-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.detail-media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

.detail-media-item.video-item {
  cursor: default;
}

.detail-media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: var(--text-xs);
  font-weight: 500;
}

@media (max-width: 600px) {
  .detail-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-2);
  }
}

/* Media lookup grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--space-2);
}

.media-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-2);
  cursor: pointer;
}

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

.media-thumb.video {
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb .video-icon {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.media-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-2);
  opacity: 0;
  transition: opacity var(--transition);
}

.media-thumb:hover .media-thumb-overlay {
  opacity: 1;
}

.media-thumb-name {
  font-size: 10px;
  color: white;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.media-delete-btn {
  background: rgba(204, 34, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-1);
  transition: background var(--transition);
}

.media-delete-btn:hover {
  background: var(--color-error);
}

/* Clickable status badge (Awaiting Media) */
.status-badge.clickable {
  cursor: pointer;
  transition: all var(--transition);
}

.status-badge.clickable:hover {
  filter: brightness(0.9);
  box-shadow: 0 0 0 3px var(--color-warning-bg);
}

/* --- Footer --- */

.app-footer {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

.app-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--color-text);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .app-header {
    padding: var(--space-3) var(--space-4);
  }

  .main-content {
    padding: var(--space-5) var(--space-4);
  }

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

  .form-grid .span-2 {
    grid-column: span 1;
  }

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

  .detail-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .success-summary {
    flex-direction: column;
    gap: var(--space-4);
  }

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

  .list-filters {
    flex-wrap: wrap;
  }

  .header-nav a span {
    display: none;
  }
}

/* Shortlist Floating Bar */
.shortlist-bar {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: var(--space-3) var(--space-5);
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 400;
  font-size: var(--text-sm);
  font-weight: 500;
  animation: slideUp 200ms ease-out;
}

.shortlist-bar .btn {
  background: white;
  color: var(--color-primary);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  font-weight: 600;
}

.shortlist-bar .btn:hover {
  background: var(--color-surface-2);
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Modal close button */
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--color-text);
}

/* Nav separator */
.nav-separator {
  width: 1px;
  height: 18px;
  background: var(--color-border-strong);
  margin: 0 var(--space-1);
  flex-shrink: 0;
}

/* Shortlist checkbox styling */
.shortlist-cb {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

table tr:has(.shortlist-cb:checked) {
  background: var(--color-accent-light);
}

/* ===== NEW: Tenant / Broker / Deal Styles ===== */

/* Tenant status badges */
.status-badge.tenant-active {
  background: var(--color-accent-light);
  color: var(--color-accent);
}
.status-badge.tenant-active::before {
  background: var(--color-accent);
}
.status-badge.tenant-closed {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.status-badge.tenant-closed::before {
  background: var(--color-success);
}
.status-badge.tenant-lost {
  background: var(--color-error-bg);
  color: var(--color-error);
}
.status-badge.tenant-lost::before {
  background: var(--color-error);
}

/* Deal outcome badges */
.status-badge.deal-closed {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.status-badge.deal-closed::before {
  background: var(--color-success);
}
.status-badge.deal-closed-other {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.status-badge.deal-closed-other::before {
  background: var(--color-warning);
}
.status-badge.deal-lost {
  background: var(--color-error-bg);
  color: var(--color-error);
}
.status-badge.deal-lost::before {
  background: var(--color-error);
}
.status-badge.deal-withdrawn {
  background: #fef3cd;
  color: #856404;
}
.status-badge.deal-withdrawn::before {
  background: #856404;
}
.status-badge.deal-on-hold {
  background: #e2e3f1;
  color: #495057;
}
.status-badge.deal-on-hold::before {
  background: #495057;
}

/* Activity timeline */
.activity-timeline {
  position: relative;
  padding-left: var(--space-8);
}

.activity-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline-entry {
  position: relative;
  margin-bottom: var(--space-5);
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -31px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-strong);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-border-strong);
}

.timeline-dot.note {
  background: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-light);
}

.timeline-entry-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 2px;
}

.timeline-action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-time {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.timeline-agent {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: auto;
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}

.timeline-empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Star rating widget */
.star-rating {
  display: inline-flex;
  gap: 2px;
  cursor: pointer;
}

.star-rating .star {
  font-size: 20px;
  color: var(--color-border-strong);
  transition: color var(--transition);
  line-height: 1;
  user-select: none;
}

.star-rating .star.filled {
  color: var(--color-warning);
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
  color: var(--color-border-strong);
}

.star-rating:hover .star {
  color: var(--color-warning);
}

.star-rating .star:hover ~ .star {
  color: var(--color-border-strong);
}

/* Display-only stars */
.stars-display {
  display: inline-flex;
  gap: 1px;
}

.stars-display .star {
  font-size: 13px;
  color: var(--color-border-strong);
}

.stars-display .star.filled {
  color: var(--color-warning);
}

/* Deal creation step cards */
.deal-outcome-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

@media (max-width: 600px) {
  .deal-outcome-cards {
    grid-template-columns: 1fr;
  }
}

.deal-outcome-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  background: var(--color-surface);
}

.deal-outcome-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.deal-outcome-card.outcome-closed {
  border-color: var(--color-success);
}

.deal-outcome-card.outcome-closed:hover {
  background: var(--color-success-bg);
}

.deal-outcome-card.outcome-other {
  border-color: var(--color-warning);
}

.deal-outcome-card.outcome-other:hover {
  background: var(--color-warning-bg);
}

.deal-outcome-card.outcome-lost {
  border-color: var(--color-error);
}

.deal-outcome-card.outcome-lost:hover {
  background: var(--color-error-bg);
}

.deal-outcome-card.outcome-withdrawn {
  border-color: #856404;
}

.deal-outcome-card.outcome-withdrawn:hover {
  background: #fef3cd;
}

.deal-outcome-card.outcome-on-hold {
  border-color: #495057;
}

.deal-outcome-card.outcome-on-hold:hover {
  background: #e2e3f1;
}

.deal-outcome-card .outcome-icon {
  font-size: 32px;
  line-height: 1;
}

.deal-outcome-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.deal-outcome-card p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Broker detail modal (wider) */
.modal.modal-broker {
  max-width: 640px;
}

/* Req summary card */
.req-summary {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
}

/* Tenant action bar */
.tenant-action-bar {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* ===== INSPECTION STATUS BADGES ===== */
.status-badge.inspection-scheduled { background: #e3f2fd; color: #1565c0; }
.status-badge.inspection-completed { background: #e8f5e9; color: #2e7d32; }
.status-badge.inspection-cancelled { background: #fce4ec; color: #c62828; }

/* ===== PROPERTY PICKER IN MODAL ===== */
.property-picker-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.property-picker-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--text-sm);
}
.property-picker-item:last-child { border-bottom: none; }
.property-picker-item:hover { background: var(--color-surface-2); }
.property-picker-item input[type="checkbox"] { flex-shrink: 0; }

/* ===== HISTORY TIMELINE TYPE DOTS ===== */
.timeline-dot.type-media_share { background: #1565c0; }
.timeline-dot.type-inspection { background: #138808; }
.timeline-dot.type-inspection.cancelled { background: #c62828; }

/* ===== COPY LINK AREA ===== */
.copy-link-area {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
}
.copy-link-area input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: monospace;
  font-size: var(--text-xs);
  color: var(--color-text);
  outline: none;
}

/* ===== INSPECTION PROPERTY ITEM ===== */
.insp-property-item {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  transition: background 0.15s;
}
.insp-property-item:hover {
  background: var(--color-surface-3, var(--color-surface-2));
  border-color: var(--color-border-strong);
}


/* ===== AVAILABILITY SYSTEM ===== */

/* Availability Badge (read-only label) */
.avail-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
}
.avail-badge.avail-available   { background: var(--color-accent-light); color: var(--color-accent); }
.avail-badge.avail-in-progress { background: #fff8e1; color: #e65100; }
.avail-badge.avail-closed      { background: #e3f2fd; color: #0d47a1; }
.avail-badge.avail-lost        { background: #fbe9e7; color: #bf360c; }
.avail-badge.avail-withdrawn   { background: #f3e5f5; color: #6a1b9a; }
.avail-badge.avail-on-hold     { background: #eceff1; color: #37474f; }

/* Availability Dropdown (interactive) */
.avail-dropdown {
  position: relative;
  display: inline-block;
}
.avail-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.5;
}
.avail-trigger:hover { filter: brightness(0.95); }

/* Color coding for the trigger button */
.avail-trigger.avail-available   { background: var(--color-accent-light); color: var(--color-accent); border-color: rgba(19,136,8,0.25); }
.avail-trigger.avail-in-progress { background: #fff8e1; color: #e65100; border-color: #ffe0b2; }
.avail-trigger.avail-closed      { background: #e3f2fd; color: #0d47a1; border-color: #bbdefb; }
.avail-trigger.avail-lost        { background: #fbe9e7; color: #bf360c; border-color: #ffccbc; }
.avail-trigger.avail-withdrawn   { background: #f3e5f5; color: #6a1b9a; border-color: #e1bee7; }
.avail-trigger.avail-on-hold     { background: #eceff1; color: #37474f; border-color: #cfd8dc; }

/* Dropdown menu */
.avail-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 100;
  min-width: 170px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 4px;
  overflow: hidden;
}
.avail-dropdown.open .avail-menu {
  display: block;
}
.avail-option {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  color: var(--color-text);
}
.avail-option:hover {
  background: var(--color-surface-2);
}
.avail-option.active {
  font-weight: 700;
}
/* Color dot indicators in menu */
.avail-option.avail-available::before   { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); margin-right: 8px; vertical-align: middle; }
.avail-option.avail-in-progress::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f57c00; margin-right: 8px; vertical-align: middle; }
.avail-option.avail-closed::before      { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1976d2; margin-right: 8px; vertical-align: middle; }
.avail-option.avail-lost::before        { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e53935; margin-right: 8px; vertical-align: middle; }
.avail-option.avail-withdrawn::before   { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #8e24aa; margin-right: 8px; vertical-align: middle; }
.avail-option.avail-on-hold::before     { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #546e7a; margin-right: 8px; vertical-align: middle; }

/* Deal in Progress row highlight */
tr.row-deal-in-progress {
  border-left: 4px solid #f57c00;
  background: rgba(255, 248, 225, 0.35);
}
tr.row-deal-in-progress:hover {
  background: rgba(255, 248, 225, 0.55);
}

/* ===== AVAILABILITY MODAL ===== */
.avail-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  animation: avail-fade-in 0.15s ease;
}
@keyframes avail-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.avail-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  width: 440px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: avail-slide-up 0.2s ease;
}
@keyframes avail-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.avail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-5) var(--space-6) 0;
}
.avail-modal-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.avail-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.avail-modal-close:hover {
  color: var(--color-text);
}
#avail-modal-form {
  padding: var(--space-5) var(--space-6) var(--space-6);
}
.avail-modal-field {
  margin-bottom: var(--space-4);
}
.avail-modal-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}
.avail-modal-field select,
.avail-modal-field input,
.avail-modal-field textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s;
}
.avail-modal-field select:focus,
.avail-modal-field input:focus,
.avail-modal-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(19, 136, 8, 0.15);
}
.avail-modal-field textarea {
  resize: vertical;
  min-height: 70px;
}
.avail-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* ===== Google Location Picker ===== */
.location-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.location-picker input[type="text"] {
  width: 100%;
}
.location-map-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.location-info {
  margin-top: var(--space-1);
}
.location-tagged {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.location-tagged svg {
  color: #138808;
  flex-shrink: 0;
}
.location-tagged span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-tagged .btn-icon {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--color-text-muted);
}
.location-tagged .btn-icon:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* Detail page map */
.detail-map-container {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.location-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #138808;
  text-decoration: none;
  font-weight: 500;
}
.location-link:hover {
  text-decoration: underline;
}

/* Google Places autocomplete dropdown styling */
.pac-container {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: var(--font-sans);
  margin-top: 4px;
}
.pac-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}
.pac-item:hover {
  background: var(--color-surface-2);
}



/* ===== Share Link Views Table ===== */
.views-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.views-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.views-table thead {
  background: var(--color-surface-2);
}
.views-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.views-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.views-table tbody tr:last-child td {
  border-bottom: none;
}
.views-table tbody tr:hover {
  background: var(--color-surface-2);
}

/* ===== Backup Button ===== */
.nav-backup-btn {
  color: var(--color-text-muted) !important;
  font-size: var(--text-xs) !important;
}
.nav-backup-btn:hover {
  color: var(--color-accent) !important;
}

/* ===== Backup Modal ===== */
.backup-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.backup-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.backup-checkbox:hover {
  background: var(--color-surface-3, #e8e8e4);
}
.backup-checkbox input[type="checkbox"] {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Login Overlay — full-brand dark treatment ── */
#login-overlay {
  position: fixed;
  inset: 0;
  background: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  overflow: hidden;
}

/* Ambient green glow — brand signature */
#login-overlay::before {
  content: '';
  position: absolute;
  left: -15%; top: 10%;
  width: 60vw; height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19,136,8,0.10) 0%, transparent 65%);
  pointer-events: none;
  animation: loginDrift 16s ease-in-out infinite alternate;
}
#login-overlay::after {
  content: '';
  position: absolute;
  right: -10%; bottom: 5%;
  width: 45vw; height: 45vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19,136,8,0.06) 0%, transparent 65%);
  pointer-events: none;
  animation: loginDrift 22s ease-in-out infinite alternate-reverse;
}
@keyframes loginDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(2%,3%) scale(1.05); } }

.login-box {
  position: relative;
  background: #111111;
  border: 1px solid #232323;
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 32px;
}

.login-logo-text {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1;
}
.login-logo-text .dot { color: var(--color-accent); }

.login-logo-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #A8A8A8;
  border: 1px solid #2E2E2E;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.login-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: #FFFFFF;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.login-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #A8A8A8;
  margin: 0 0 28px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.login-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #CFCFCF;
}

.login-field input {
  height: 44px;
  border: 1px solid #2E2E2E;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: #FFFFFF;
  background: #161616;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.login-field input:focus {
  border-color: var(--color-accent);
  background: #1C1C1C;
  box-shadow: 0 0 0 3px rgba(19,136,8,0.15);
}

.login-error {
  background: rgba(192, 38, 26, 0.12);
  color: #F1A9A0;
  border: 1px solid rgba(192, 38, 26, 0.3);
  font-size: 13px;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.login-submit {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  background: var(--color-accent);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
}

.login-submit:hover { background: var(--color-accent-hover); }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { background: #2E2E2E; color: #8E8E8E; cursor: not-allowed; }

/* ── Demo credentials panel (login screen only) ── */
.login-demo {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #232323;
}
.login-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.login-demo-eyebrow {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent-hover, #17A30A);
}
.login-demo-pw {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #A8A8A8;
}
.login-demo-pw code {
  font-family: inherit;
  background: rgba(19, 136, 8, 0.12);
  color: #E8E8E8;
  border: 1px solid rgba(19, 136, 8, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 1.2px;
}
.login-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.login-demo-chip {
  appearance: none;
  background: #161616;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
  font-family: inherit;
}
.login-demo-chip:hover {
  border-color: var(--color-accent, #138808);
  background: #1A1A1A;
}
.login-demo-chip:active { transform: translateY(1px); }
.login-demo-chip:focus-visible {
  outline: 2px solid var(--color-accent, #138808);
  outline-offset: 2px;
}
.login-demo-user {
  font-family: var(--font-sans, 'DM Sans', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.1px;
}
.login-demo-role {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #A8A8A8;
}

/* ── User Badge (top-right of header) ── */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 5px 10px 5px 12px;
  background: var(--color-surface-2);
  border-radius: 8px;
  font-size: 13px;
}

.user-badge-name {
  font-weight: 600;
  color: var(--color-text);
  text-transform: capitalize;
}

.user-badge-profile-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-transform: capitalize;
  transition: color 0.15s;
}
.user-badge-profile-btn:hover {
  color: var(--color-accent, #138808);
}
.user-badge-profile-btn:focus-visible {
  outline: 2px solid var(--color-accent, #138808);
  outline-offset: 2px;
  border-radius: 3px;
}

.user-badge-role {
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: capitalize;
  background: var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
}

.user-badge-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.user-badge-logout:hover { color: var(--color-error); }

/* ── User Management ─────────────────────────────── */
.btn-danger {
  background: var(--color-error);
  color: white;
  border: none;
}
.btn-danger:hover {
  background: #9E1E15;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 5px;
}
.row-inactive td {
  opacity: 0.45;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-badge.super_admin {
  background: #7c3aed22;
  color: #7c3aed;
}
.role-badge.admin {
  background: #0ea5e922;
  color: #0284c7;
}
.role-badge.agent {
  background: var(--color-accent-light);
  color: var(--color-accent);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.status-dot.active { background: var(--color-accent); }
.status-dot.inactive { background: #9ca3af; }

/* form helper classes used in user-management modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.form-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}
.form-input,
.form-select {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: all var(--transition);
  outline: none;
  width: 100%;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-hint {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 2px;
}

/* modal-panel mirrors .modal so user-management modals match app style */
.modal-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.08);
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.97);
  transition: transform 200ms cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.modal-overlay.show .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

/* ── Dashboard ─────────────────────────────────────── */
.dashboard-wrap {
  padding: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}
.dash-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
@media (max-width: 900px) { .dash-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dash-cards { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.dash-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  border-color: var(--color-border-strong);
}
.dash-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: var(--space-3);
}
.dash-card-val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.dash-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.dash-card-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 800px) { .dash-two-col { grid-template-columns: 1fr; } }

.dash-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.dash-panel-header h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0;
}

/* ── Activity feed ─────────────────────────── */
.activity-feed { padding: var(--space-3) var(--space-4); }
.activity-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 5px;
}
.activity-body { flex: 1; min-width: 0; }
.activity-action {
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--color-text);
}
.activity-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-time {
  font-size: 11px;
  color: var(--color-text-faint);
}

/* ── Property match cards ──────────────────── */
.match-list { display: flex; flex-direction: column; gap: var(--space-2); }
.match-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.match-card:hover { background: var(--color-surface-2); border-color: var(--color-accent); }
.match-score {
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 44px;
  text-align: center;
}
.match-info { flex: 1; min-width: 0; }
.match-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.match-sub { font-size: 12px; color: var(--color-text-muted); }
.match-reasons { font-size: 11px; color: var(--color-text-faint); margin-top: 2px; }
.match-arrow { font-size: 18px; color: var(--color-text-faint); }

/* status pill for table cells */
.status-pill { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600; }
.status-pill.status-scheduled { background:#E0F2FE; color:#0284C7; }
.status-pill.status-completed { background:var(--color-accent-light); color:var(--color-accent); }
.status-pill.status-cancelled { background:var(--color-error-bg); color:var(--color-error); }

/* ═══════════════════════════════════════════════════════════════
   WAR-ROOM DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* Outer wrapper — replaces default .view padding for dashboard */
.dashboard-wrap {
  padding: 0;
  max-width: 100%;
}

/* ── Loading / empty states ───────────────────────────────────── */
.dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  gap: var(--space-3);
}
.dash-empty {
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

/* ── Quote banner ─ full-brand dark treatment ─────────────────── */
.dash-quote-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, #0A0A0A 0%, #161616 100%);
  color: #FFFFFF;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-quote-bar::before {
  content: '';
  position: absolute;
  left: -10%; top: -50%;
  width: 40%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(19,136,8,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.dash-quote-icon {
  font-family: var(--font-serif);
  font-size: 2rem;
  flex-shrink: 0;
  color: var(--color-accent);
  opacity: 0.9;
  line-height: 1;
  position: relative;
}
.dash-quote-text {
  flex: 1;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  position: relative;
}
.dash-quote-author {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
  font-style: normal;
}

/* ── Header row (greeting + quick actions) ──────────────────────── */
.dash-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.dash-greeting h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px 0;
}
.dash-greeting p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}
.dash-quick-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.dash-quick-actions .btn {
  font-size: var(--text-xs);
  padding: 6px 14px;
}

/* ── Pulse strip — "This week" KPI row ───────────────────────── */
.dash-pulse-strip {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  gap: 0;
  overflow-x: auto;
}
.pulse-label-week {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-right: var(--space-6);
  white-space: nowrap;
  flex-shrink: 0;
}
.pulse-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 120px;
  padding: var(--space-2) var(--space-4);
}
.pulse-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.pulse-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.pulse-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
}
.pulse-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ── Two-column main grid ─────────────────────────────────────── */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.dash-col-left,
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ── Panel shell ─────────────────────────────────────────────── */
.dash-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.dash-panel-header h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.dash-panel-header .dash-see-all {
  font-size: var(--text-xs);
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.dash-panel-header .dash-see-all:hover { text-decoration: underline; }

/* ── New Listing cards (horizontal scroll strip) ──────────────── */
.listing-cards-wrap {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.listing-cards-wrap::-webkit-scrollbar { height: 4px; }
.listing-cards-wrap::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 2px; }

.listing-card {
  flex-shrink: 0;
  width: 180px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.listing-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(0,102,204,0.1);
}
.listing-card-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  font-size: 1.8rem;
  background: var(--color-surface-2);
}
.listing-card-body {
  padding: var(--space-3);
}
.listing-card-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-card-loc {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-card-rent {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  margin-top: var(--space-2);
}
.listing-card-meta {
  display: flex;
  gap: var(--space-2);
  margin-top: 4px;
  flex-wrap: wrap;
}
.listing-card-meta span {
  font-size: 10px;
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.listing-card-avail {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: 4px;
}

/* ── Active pipeline rows ─────────────────────────────────────── */
.pipeline-list {
  display: flex;
  flex-direction: column;
}
.pipeline-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.12s;
}
.pipeline-row:last-child { border-bottom: none; }
.pipeline-row:hover { background: var(--color-surface-2); }
.pipeline-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-surface-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.pipeline-info { flex: 1; min-width: 0; }
.pipeline-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-req {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.pipeline-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  white-space: nowrap;
}
.pipeline-time {
  font-size: 10px;
  color: var(--color-text-faint);
  white-space: nowrap;
}

/* ── Inspections this week ────────────────────────────────────── */
.insp-list {
  display: flex;
  flex-direction: column;
}
.insp-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.12s;
}
.insp-row:last-child { border-bottom: none; }
.insp-row:hover { background: var(--color-surface-2); }
.insp-row.insp-today { background: rgba(0,102,204,0.04); }
.insp-row.insp-today .insp-date-badge { background: var(--color-accent); color: #fff; }
.insp-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.insp-date-day {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  color: inherit;
}
.insp-date-mon {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: inherit;
  opacity: 0.7;
}
.insp-info { flex: 1; min-width: 0; }
.insp-tenant {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.insp-props {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.insp-agent {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 1px;
}

/* ── Recent deals ─────────────────────────────────────────────── */
.deals-list {
  display: flex;
  flex-direction: column;
}
.deal-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.12s;
}
.deal-row:last-child { border-bottom: none; }
.deal-row:hover { background: var(--color-surface-2); }
.deal-outcome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.deal-outcome-dot.outcome-closed { background: var(--color-success); }
.deal-outcome-dot.outcome-lost   { background: var(--color-error); }
.deal-outcome-dot.outcome-active { background: var(--color-warning); }
.deal-info { flex: 1; min-width: 0; }
.deal-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-prop {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.deal-badge.badge-closed_won  { background: var(--color-success-bg); color: var(--color-success); }
.deal-badge.badge-closed_lost { background: var(--color-error-bg);   color: var(--color-error); }
.deal-badge.badge-active      { background: var(--color-warning-bg);  color: var(--color-warning); }
.deal-badge.badge-negotiating { background: var(--color-accent-light); color: var(--color-accent); }
.deal-rent {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Responsive: stack columns on narrow screens ─────────────── */
@media (max-width: 900px) {
  .dash-main-grid {
    grid-template-columns: 1fr;
  }
  .dash-pulse-strip {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .pulse-divider { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   MEDIA GALLERY
   ═══════════════════════════════════════════════════════════════ */

.media-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.media-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.media-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  transition: border-color 0.15s;
}

.media-thumb:hover { border-color: var(--color-accent); }

.media-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.media-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.media-thumb:hover .media-del-btn { opacity: 1; }

.media-cap {
  font-size: 10px;
  color: var(--color-text-muted);
  padding: 4px 6px;
  background: var(--color-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-video-row {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 8px;
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════════════
   PROPERTY AUDIT ROWS
   ═══════════════════════════════════════════════════════════════ */

.audit-row {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: border-color 0.15s;
}
.audit-row:hover { border-color: var(--color-border-strong); }

/* ═══════════════════════════════════════════════════════════════
   NEEDS ATTENTION PANEL
   ═══════════════════════════════════════════════════════════════ */

.attn-list { display: flex; flex-direction: column; gap: 0; }

.attn-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s;
}
.attn-row:last-child { border-bottom: none; }
.attn-row:hover { background: var(--color-surface-2); margin: 0 calc(-1 * var(--space-4)); padding-left: var(--space-4); padding-right: var(--space-4); border-radius: 6px; }

.attn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.attn-body { flex: 1; min-width: 0; }

.attn-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attn-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV MORE DROPDOWN
   ═══════════════════════════════════════════════════════════════ */

.nav-more-wrap { position: relative; display: flex; align-items: center; }

.nav-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}
.nav-more-btn:hover { background: var(--color-surface-2); color: var(--color-text); }

.nav-more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 200;
  padding: 6px;
}

.nav-more-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.1s;
}
.nav-more-dropdown a:hover { background: var(--color-surface-2); }

.nav-more-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT INTERFACE (Module 2)
   ═══════════════════════════════════════════════════════════════ */

.chat-layout {
  display: flex;
  height: calc(100vh - 64px);
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) 0;
  overflow: hidden;
}

.chat-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  background: var(--color-surface-2);
  overflow: hidden;
}

.chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--color-border);
}

#chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.chat-hist-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  margin-bottom: 2px;
}
.chat-hist-item:hover { background: var(--color-border); }
.chat-hist-item.active { background: var(--color-accent); }
.chat-hist-item.active .chat-hist-title,
.chat-hist-item.active .chat-hist-meta { color: white; }

.chat-hist-title {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}

.chat-hist-meta {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 300px;
  gap: 8px;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  max-width: 500px;
}

.chat-suggestion {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.chat-suggestion:hover { background: var(--color-surface-2); border-color: var(--color-accent); }

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 80%;
}
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.assistant { align-self: flex-start; }

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.chat-avatar.user-avatar { background: var(--color-text-muted); }

.chat-bubble-wrap { display: flex; flex-direction: column; gap: 4px; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: var(--text-sm);
  line-height: 1.55;
  max-width: 520px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px 16px 16px 16px;
  color: var(--color-text);
}
.chat-msg.user .chat-bubble {
  background: var(--color-accent);
  color: white;
  border-radius: 16px 16px 4px 16px;
}

.chat-tool-calls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.chat-tool-badge {
  font-size: 10px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--color-text-muted);
  cursor: help;
}

/* Typing animation */
.typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Input area */
.chat-input-area {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 8px 8px 8px 14px;
  transition: border-color 0.15s;
}
.chat-input-wrap:focus-within { border-color: var(--color-accent); }

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
  max-height: 120px;
  font-family: inherit;
}

.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { opacity: 0.85; }

@media (max-width: 700px) {
  .chat-sidebar { display: none; }
  .chat-messages { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   SHORTLIST REVIEW MODAL
   ═══════════════════════════════════════════════════════════════ */

.shortlist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.shortlist-row:last-child { border-bottom: none; }

.shortlist-check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}
.shortlist-check-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
}
.shortlist-prop-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.shortlist-prop-detail {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.shortlist-fit {
  font-size: 11px;
  color: var(--color-accent);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   MATCHING TENANTS ALERT (Property success screen)
   ═══════════════════════════════════════════════════════════════ */

.match-alert {
  background: var(--color-accent-light);
  border: 1.5px solid rgba(19,136,8,0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  text-align: left;
}

.match-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.match-alert-icon { font-size: 20px; }
.match-alert-title { font-weight: 600; font-size: var(--text-sm); color: var(--color-accent); }
.match-alert-sub { font-size: 12px; color: var(--color-accent-hover); margin-top: 1px; }

.match-alert-list { display: flex; flex-direction: column; gap: 6px; }

.match-alert-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--color-surface);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.1s;
  border: 1px solid rgba(19,136,8,0.18);
}
.match-alert-row:hover { background: var(--color-accent-light); }
.match-alert-name { font-size: var(--text-sm); font-weight: 600; flex: 1; color: var(--color-text); }
.match-alert-detail { font-size: 11px; color: var(--color-accent); font-family: var(--font-mono); }
.match-alert-timeline {
  font-size: 11px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   TASKS VIEW (Module 3)
   ═══════════════════════════════════════════════════════════════ */

.task-list { display: flex; flex-direction: column; gap: 0; }

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  transition: opacity 0.3s;
}
.task-row:last-child { border-bottom: none; }
.task-row.task-done { opacity: 0.5; }

.task-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.task-body { flex: 1; min-width: 0; }

.task-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.task-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.task-draft {
  background: var(--color-surface-2);
  border-radius: 6px;
  padding: 8px;
  margin-top: 6px;
  border-left: 3px solid #25D366;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.task-rule {
  font-size: 10px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
}

.task-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

/* ═════════════════════════════════════════════════════════════════════
   LEADS PANEL (v2.5) — inbox-style chatbot intake
   ═════════════════════════════════════════════════════════════════════ */

.leads-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}
.leads-page-title {
  font-family: 'Gloock', serif;
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 4px;
  color: var(--color-text, #0A0A0A);
}
.leads-dot { color: var(--color-success, #138808); }
.leads-subtitle {
  color: var(--color-text-muted, #5C5C5C);
  font-size: 13px;
}
.btn-refresh-leads {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-refresh-leads:hover { border-color: var(--color-text); color: var(--color-text); }

/* KPI row */
.leads-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.leads-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.leads-kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #8E8E8E;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.leads-kpi-val {
  font-family: 'Gloock', serif;
  font-size: 28px;
  line-height: 1;
}
.leads-kpi-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .leads-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* Source attribution strip + pills */
.leads-source-strip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.leads-source-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8E8E8E;
  text-transform: uppercase;
}
.leads-source-pills {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.leads-campaign {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #8E8E8E;
  margin-left: -8px;
}

.src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.src .ico { font-size: 11px; line-height: 1; }
.src-ig       { background: #FDE8EF; color: #C13584; border-color: rgba(193,53,132,0.15); }
.src-li       { background: #E7F1F9; color: #0A66C2; border-color: rgba(10,102,194,0.15); }
.src-wa       { background: #E2F5EA; color: #128C7E; border-color: rgba(18,140,126,0.15); }
.src-google   { background: #FEF3E8; color: #C6540C; border-color: rgba(198,84,12,0.15); }
.src-x        { background: #E8E8E8; color: #0A0A0A; border-color: rgba(10,10,10,0.15); }
.src-yt       { background: #FEE8E8; color: #C21B1B; border-color: rgba(194,27,27,0.15); }
.src-direct   { background: var(--color-surface-2); color: var(--color-text-muted); border-color: var(--color-border); }
.src-referral { background: rgba(107,33,168,0.08); color: #6B21A8; border-color: rgba(107,33,168,0.15); }

/* Filter bar + chips */
.leads-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.leads-chip {
  padding: 6px 12px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.leads-chip:hover { border-color: var(--color-text); color: var(--color-text); }
.leads-chip.active {
  background: var(--color-text);
  color: #FFF;
  border-color: var(--color-text);
}
.leads-chip .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: 0.7;
}
.leads-divider { color: var(--color-border-strong); }
.leads-search {
  flex: 1;
  max-width: 320px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
}
.leads-date-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8E8E8E;
  text-transform: uppercase;
}
.leads-date-input {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
}

/* Table */
.leads-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(10,10,10,0.04), 0 4px 12px rgba(10,10,10,0.04);
}
.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.leads-table thead th {
  background: var(--color-surface-2);
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8E8E8E;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}
.leads-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.leads-table tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}
.leads-table tbody tr:hover { background: var(--color-surface-2); }
.leads-table tbody tr.unread td { background: #FFFDF5; }
.leads-table tbody tr.unread .leads-name { font-weight: 700; }
.leads-table tbody tr.read .leads-name    { font-weight: 500; color: var(--color-text-muted); }
.leads-table tbody tr.read .leads-captured { color: #8E8E8E; }
.leads-table tbody tr.read .leads-captured strong { color: var(--color-text-muted); font-weight: 500; }

.leads-read-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-success, #138808);
  margin-right: 8px;
}
.persona-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.persona-tenant   { background: rgba(19,136,8,0.10); color: #138808; }
.persona-landlord { background: rgba(29,78,216,0.08); color: #1D4ED8; }
.persona-relocate { background: rgba(179,106,0,0.10); color: #B36A00; }
.persona-nri      { background: rgba(107,33,168,0.08); color: #6B21A8; }

.leads-captured { font-size: 12px; color: var(--color-text-muted); }
.leads-captured strong { color: var(--color-text); font-weight: 500; }

.leads-age {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8E8E8E;
}
.leads-nobody { color: #B36A00; font-weight: 600; font-size: 12px; }
.leads-responded { display: inline-flex; align-items: center; gap: 6px; }
.leads-responded-label { font-size: 12px; color: var(--color-text-muted); }

.leads-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-text-muted);
}

.lead-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.av-green { background: #138808; }
.av-blue  { background: #0A66C2; }
.av-pink  { background: #C13584; }
.av-amber { background: #B36A00; }
.av-grey  { background: #8E8E8E; }

.leads-empty {
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
}
.leads-empty-title { font-family: 'Gloock', serif; font-size: 20px; margin-bottom: 6px; }
.leads-empty-sub   { color: var(--color-text-muted); font-size: 13px; }

/* Drawer */
.leads-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.35);
  z-index: 900;
  display: none;
}
.leads-drawer-scrim.open { display: block; }
.leads-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 560px;
  max-width: 100%;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: -8px 0 24px rgba(10,10,10,0.08);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.leads-drawer.open { transform: translateX(0); }
.leads-drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.leads-drawer-head h2 {
  font-family: 'Gloock', serif;
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 400;
}
.leads-drawer-sub {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.leads-drawer-close {
  border: none;
  background: transparent;
  font-size: 26px;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
}
.leads-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.leads-drawer-section { margin-bottom: 22px; }
.leads-drawer-section h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #8E8E8E;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.leads-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  row-gap: 8px;
  font-size: 13px;
  margin: 0;
}
.leads-kv dt { color: var(--color-text-muted); }
.leads-kv dd { margin: 0; color: var(--color-text); word-break: break-word; }
.leads-transcript {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px;
}
.leads-t-turn { margin-bottom: 10px; font-size: 12.5px; }
.leads-t-q { color: var(--color-text-muted); }
.leads-t-a {
  color: var(--color-text);
  font-weight: 500;
  padding: 4px 0 0 12px;
  border-left: 2px solid var(--color-success, #138808);
  margin-top: 2px;
}
.leads-drawer-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  background: var(--color-surface-2);
  flex-wrap: wrap;
}
.leads-btn {
  padding: 9px 14px;
  border: 1.5px solid var(--color-success, #138808);
  background: var(--color-surface);
  color: var(--color-success, #138808);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.leads-btn:hover { background: rgba(19,136,8,0.08); }
.leads-btn-primary {
  background: var(--color-success, #138808);
  color: white;
}
.leads-btn-primary:hover { background: #17A30A; border-color: #17A30A; color: white; }
.leads-btn-ghost {
  border-color: var(--color-border-strong);
  color: var(--color-text-muted);
}
.leads-btn-ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text);
  background: transparent;
}
.leads-note-ok {
  padding: 10px 12px;
  background: rgba(19,136,8,0.08);
  border: 1px solid rgba(19,136,8,0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #138808;
  margin-bottom: 18px;
}
.leads-note-warn {
  padding: 10px 12px;
  background: rgba(179,106,0,0.08);
  border: 1px solid rgba(179,106,0,0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #B36A00;
  margin-bottom: 18px;
}

/* ── MY PROFILE MODAL ──────────────────────────────── */
.profile-modal {
  max-width: 560px;
  width: 100%;
}
.profile-section {
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
}
.profile-section:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.profile-section-head {
  margin-bottom: 14px;
}
.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin: 0 0 3px 0;
}
.profile-section-sub {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}
.profile-section-readonly .form-input:disabled {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.profile-msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.profile-msg-error {
  background: rgba(222, 53, 34, 0.08);
  border: 1px solid rgba(222, 53, 34, 0.25);
  color: var(--color-error, #DE3522);
}
.profile-msg-success {
  background: rgba(19, 136, 8, 0.10);
  border: 1px solid rgba(19, 136, 8, 0.30);
  color: var(--color-accent, #138808);
}
.profile-msg-info {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
