:root {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e6e8ef;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --red: #ef4444;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input { font-family: inherit; }

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #fde4e1 0%, #f8cfc9 60%, #f3bdb5 100%);
  display: grid; place-items: center;
  overflow: hidden;
}
.brand-mark svg { width: 26px; height: 26px; display: block; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-name span { color: var(--brand); font-weight: 700; }

.topnav {
  display: flex;
  gap: 6px;
  background: #f3f4f7;
  padding: 4px;
  border-radius: 999px;
}
.nav-item {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s;
}
.nav-item:hover { color: var(--ink); }
.nav-item.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: #f3f4f7;
  border: 1px solid transparent;
  padding: 9px 14px;
  border-radius: 999px;
  width: 300px;
  color: var(--ink-3);
  transition: all 0.15s;
}
.search:focus-within { background: #fff; border-color: var(--line); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #f3f4f7;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--line); color: var(--ink); }

.user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.user-meta .user-name { font-weight: 600; font-size: 13px; }
.user-meta .user-email { font-size: 11px; color: var(--ink-3); }

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr 400px;
  gap: 20px;
  padding: 20px 28px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

/* FILTERS */
.filters {
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.filters-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 2px 0;
}
.filters-title { font-weight: 700; font-size: 15px; }
.link-btn { color: var(--brand); font-weight: 600; font-size: 12px; }
.link-btn:disabled { color: var(--ink-3); cursor: default; opacity: 0.7; }

.filter-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 4px;
}
.filter-label .pin { font-size: 14px; }
.x-btn {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #f3f4f7;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  display: grid; place-items: center;
}

.check, .radio {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background 0.1s;
}
.check:hover, .radio:hover { background: #f8fafc; }
.check input, .radio input { accent-color: var(--brand); width: 15px; height: 15px; }
.check input:checked + span, .radio input:checked + span { color: var(--ink); font-weight: 500; }

.slider-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 0;
}
.slider-row input[type=range] { flex: 1; accent-color: var(--brand); }
.chip {
  background: #f3f4f7;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

.minmax { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.minmax-field {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
}
.minmax-field input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 13px; min-width: 0; }
.minmax-field span { font-size: 11px; color: var(--ink-3); font-weight: 600; }

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.15s;
}
.pill.active, .pill:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.live-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.live-stat {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.live-stat span {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
}
.live-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}
.feed-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feed-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feed-status-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.feed-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.feed-pill.ready {
  background: #ecfdf5;
  color: #059669;
}
.feed-pill.error {
  background: #fef2f2;
  color: #dc2626;
}
.feed-name {
  font-weight: 600;
  font-size: 13px;
}
.feed-count {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.feed-note {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}

.grid-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.view-head.compact { margin-bottom: 0; }
.grid-empty { margin: 0; }

/* GRID */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
}
.card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
}
.card.no-image {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
}
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card.active { outline: 2px solid var(--brand); outline-offset: 2px; }

.card-tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 2;
}
.card-tag.hot { background: #fef2f2; color: var(--red); }
.card-tag.warm { background: var(--amber-bg); color: var(--amber); }
.card-tag.type { background: #eff6ff; color: var(--brand); }
.card-tag.fresh { background: var(--green-bg); color: var(--green); }

.card-bookmark {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.15);
  backdrop-filter: blur(8px);
  color: var(--brand);
  display: grid; place-items: center;
  z-index: 2;
}

.card-meta {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 14px;
  z-index: 2;
}
.card-title { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.card-addr { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
.card-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.card-price { font-weight: 700; font-size: 14px; }
.card-price span { color: var(--ink-3); font-weight: 500; font-size: 11px; }
.card-score {
  display: flex; align-items: center; gap: 3px;
  font-weight: 600; font-size: 12px;
}
.card-score .star { color: var(--amber); }

/* DETAIL */
.detail {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.detail::-webkit-scrollbar { width: 6px; }
.detail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.detail-photos {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  height: 220px;
}
.detail-hero {
  border-radius: 12px;
  background-position: center;
  background-size: cover;
}
.detail-thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.thumb { border-radius: 10px; background-size: cover; background-position: center; }
.empty-photo {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.detail-title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.detail-addr { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.detail-source-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.detail-link {
  color: var(--brand);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.detail-price { text-align: right; }
.detail-price-num { font-weight: 700; font-size: 18px; }
.detail-price-unit { color: var(--ink-3); font-size: 11px; }

.copilot-card {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #111827 0%, #172033 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.copilot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.copilot-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.88);
  letter-spacing: 0.08em;
}
.copilot-title {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.copilot-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.copilot-pill.loading {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}
.copilot-pill.ready {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}
.copilot-pill.error {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}
.copilot-summary {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}
.copilot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.copilot-metric {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.copilot-metric span {
  display: block;
  font-size: 11px;
  color: rgba(191, 219, 254, 0.84);
}
.copilot-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
}
.copilot-metric strong.good { color: #86efac; }
.copilot-metric strong.bad { color: #fca5a5; }
.copilot-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.copilot-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.84);
  letter-spacing: 0.08em;
}
.copilot-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}
.copilot-foot,
.copilot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(191, 219, 254, 0.74);
  font-size: 11px;
}
.mini-btn {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.mini-btn:hover { background: rgba(255, 255, 255, 0.18); }
.copilot-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.copilot-skeleton span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  background-size: 200% 100%;
  animation: pulse-slide 1.6s linear infinite;
}
.copilot-skeleton span:nth-child(1) { width: 92%; }
.copilot-skeleton span:nth-child(2) { width: 74%; }
.copilot-skeleton span:nth-child(3) { width: 84%; }

.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}
.tab {
  padding: 10px 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--brand); border-color: var(--brand); }

.deal-math {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
}
.math-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.math-key { color: var(--ink-2); }
.math-val { font-weight: 700; }
.math-val.green { color: var(--green); }
.math-note {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-lg {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.owner-block {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.owner-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.owner-lines {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  padding: 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s;
}
.btn.ghost { background: #eff6ff; color: var(--brand); }
.btn.ghost:hover { background: #dbeafe; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }

.map {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 60%, #ede9fe 100%);
  position: relative;
}
.map-inner { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(148,163,184,0.2) 1px, transparent 1px),
  linear-gradient(90deg, rgba(148,163,184,0.2) 1px, transparent 1px);
  background-size: 30px 30px;
}
.map-pin {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
}
.pin-you { background: var(--brand); top: 44%; left: 42%; }
.pin-other.pin-a { background: var(--green); top: 20%; right: 18%; }
.pin-other.pin-b { background: var(--amber); bottom: 14%; right: 22%; }

.map-callout {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-10%, 6px);
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  min-width: 160px;
}
.callout-title { font-weight: 700; font-size: 12px; }
.callout-sub { color: var(--ink-3); font-size: 10px; margin-top: 1px; }

/* LAYOUT VARIANTS */
.layout-triple { grid-template-columns: 280px 1fr 400px; }
.layout-wide   { grid-template-columns: 1fr; }

/* SHARED */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.view-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.view-sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

.single-col { display: flex; flex-direction: column; gap: 16px; }
.empty-state { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-3); }

/* SAVED bookmark state */
.card-bookmark.saved { background: var(--brand); color: #fff; }

/* PIPELINE */
.pipeline-wrap { display: flex; flex-direction: column; gap: 18px; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 200px; }
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.col-title { font-weight: 700; font-size: 13px; }
.col-count { background: #f3f4f7; color: var(--ink-2); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.col-empty { color: var(--ink-3); text-align: center; font-size: 12px; padding: 20px 0; }

.pipe-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pipe-title { font-weight: 600; font-size: 13px; }
.pipe-addr { font-size: 11px; color: var(--ink-3); }
.pipe-row { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.pipe-price { font-weight: 700; font-size: 13px; }
.pipe-spread { font-weight: 700; font-size: 12px; }
.pipe-spread.green { color: var(--green); }
.pipe-spread.red { color: var(--red); }
.pipe-select, .stage-select select {
  appearance: none;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>') no-repeat right 10px center;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 28px 6px 10px; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer;
}

.math-val.red { color: var(--red); }

.stage-select { display: flex; flex-direction: column; gap: 6px; }
.stage-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* COMPS + SETTINGS */
.comps-form, .settings-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.settings-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form-row input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; outline: 0; transition: border-color 0.15s; }
.form-row input:focus { border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.comps-submit { align-self: flex-start; padding: 10px 24px; }
.comps-stub { background: #f8fafc; border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink-3); font-size: 13px; }

/* responsive */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 260px 1fr 380px; }
  .search { width: 220px; }
}
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .detail { position: static; max-height: none; }
  .filters { order: 2; }
  .grid { order: 1; }
  .detail { order: 3; }
  .copilot-metrics { grid-template-columns: 1fr; }
}

/* ==== Hot lead + motivation + offer UI ==== */

.card-rank {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #ff3b30, #ff7a00);
  color: #fff; font-weight: 800; font-size: 11px;
  padding: 5px 10px; border-radius: 999px;
  letter-spacing: 0.02em; z-index: 2;
  box-shadow: 0 4px 14px rgba(255,59,48,0.4);
}

.card-reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reason-chip {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.hot-banner .reason-chip {
  background: rgba(232, 76, 61, 0.1);
  color: #b3362a;
}
.hot-banner.hot .reason-chip {
  background: rgba(232, 76, 61, 0.15);
  color: #9f2d23;
}

.card-score.hot {
  background: linear-gradient(135deg, #ff3b30, #ff7a00) !important;
  color: #fff !important;
}

.card-offer {
  margin-top: 8px;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.4);
  color: #fff;
  backdrop-filter: blur(4px);
}
.card-offer.offer-accepted { background: #16a34a; }
.card-offer.offer-rejected { background: #6b7280; }
.card-offer.offer-sent     { background: #3b82f6; }

/* Detail hot banner */
.hot-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fff4f2;
  border: 1px solid #f4d5d0;
  border-radius: 12px;
  margin-bottom: 16px;
}
.hot-banner.hot {
  background: linear-gradient(135deg, #fff1e8, #ffe2dc);
  border-color: #f2b8ae;
}
.hot-score {
  font-size: 22px;
  font-weight: 800;
  color: #b3362a;
  white-space: nowrap;
}
.hot-score span { font-size: 18px; margin-right: 2px; }
.hot-meta { min-width: 0; }
.hot-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: #0f1115; }
.hot-reasons { display: flex; flex-wrap: wrap; gap: 4px; }
.hot-dom {
  text-align: right;
  font-weight: 800;
  font-size: 20px;
  color: #0f1115;
}
.hot-dom span { display: block; font-size: 10px; font-weight: 600; color: #6b7280; letter-spacing: 0.05em; }
.muted { color: #94a3b8; font-size: 12px; }

/* Snipe form */
.snipe-form {
  margin: 16px 0;
  padding: 16px;
  background: #0f1115;
  border-radius: 12px;
  color: #fff;
}
.snipe-head { margin-bottom: 12px; }
.snipe-title { font-size: 14px; font-weight: 700; }
.snipe-sub { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.snipe-form .form-row label { color: #9ca3af; }
.snipe-form .form-row input {
  background: #1a1d26;
  border: 1px solid #2a2f3d;
  color: #fff;
}
.snipe-form .actions { margin-top: 12px; }
.snipe-form .btn.primary {
  background: linear-gradient(135deg, #ff3b30, #ff7a00);
  border: none;
  font-weight: 700;
}
.snipe-form .btn.primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Offer status block in detail */
.offer-block {
  margin: 16px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.offer-block.status-accepted { background: #ecfdf5; border-color: #a7f3d0; }
.offer-block.status-rejected { background: #f3f4f6; border-color: #d1d5db; }

@keyframes pulse-slide {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.offer-row { display: flex; justify-content: space-between; align-items: center; }
.offer-label { font-weight: 700; font-size: 15px; }
.offer-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.offer-status-badge.sent     { background: #dbeafe; color: #1e40af; }
.offer-status-badge.opened   { background: #e0e7ff; color: #3730a3; }
.offer-status-badge.accepted { background: #16a34a; color: #fff; }
.offer-status-badge.rejected { background: #e5e7eb; color: #374151; }
.offer-sub { color: #6b7280; font-size: 12px; margin-top: 4px; }
.offer-hint { color: #64748b; font-size: 12px; margin-top: 8px; font-style: italic; }

/* Pipeline offer pill */
.pipe-offer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
}
.pipe-offer .offer-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.pipe-offer.offer-sent     { background: #dbeafe; color: #1e40af; }
.pipe-offer.offer-opened   { background: #e0e7ff; color: #3730a3; }
.pipe-offer.offer-accepted { background: #dcfce7; color: #14532d; }
.pipe-offer.offer-rejected { background: #fee2e2; color: #7f1d1d; }

/* ==== Deals screen refresh ==== */

.layout {
  grid-template-columns: 290px 1fr 410px;
  gap: 22px;
}

.filters {
  gap: 20px;
}

.filter-group {
  border-radius: 18px;
  padding: 16px;
  gap: 10px;
}

.filter-group.compact {
  gap: 12px;
}

.filter-label {
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
}

.check,
.radio {
  padding: 7px 10px;
  font-size: 14px;
}

.grid-wrap {
  gap: 18px;
}

.deal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 4px 2px;
}

.deal-toolbar-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.deal-toolbar-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}

.deal-toolbar-pills,
.feed-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}

.feed-inline-pill.ready {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.feed-inline-pill.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.slider-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.muted-control {
  opacity: 0.72;
}

.card {
  border-radius: 22px;
  aspect-ratio: 0.98 / 1;
}

.card-meta {
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 16px;
  padding: 14px 16px;
}

.card-title {
  font-size: 15px;
}

.card-addr {
  font-size: 12px;
}

.card-price {
  font-size: 15px;
}

.card-score {
  min-width: 52px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
}

.card-score.hot {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.detail {
  border-radius: 24px;
  padding: 22px 22px 18px;
  gap: 18px;
}

.detail-photos {
  height: 252px;
}

.detail-hero,
.thumb {
  border-radius: 18px;
}

.detail-head {
  gap: 18px;
}

.detail-title {
  font-size: 22px;
  line-height: 1.15;
}

.detail-addr {
  font-size: 16px;
  line-height: 1.45;
  color: #94a3b8;
}

.tabs {
  gap: 28px;
  padding: 0 4px;
  border-bottom: 1px solid #e8edf5;
}

.tab {
  padding: 8px 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: #94a3b8;
}

.detail-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.overview-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  border-radius: 22px;
  background: #f6f9ff;
  border: 0;
}

.overview-card.error {
  background: #fff7f7;
  border: 1px solid #fecaca;
}

.overview-math {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
}

.overview-key {
  color: #475569;
  font-weight: 500;
}

.overview-value {
  font-weight: 700;
  color: #111827;
  font-size: 18px;
}

.overview-value.green {
  color: #14b86f;
}

.overview-value.red {
  color: #ef4444;
}

.overview-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}

.overview-skeleton {
  display: inline-block;
  width: 110px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: pulse-slide 1.5s linear infinite;
}

.overview-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.tiny-btn {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe5f3;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.tiny-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

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

.comp-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.comp-thumb {
  width: 84px;
  min-width: 84px;
  height: 84px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}

.comp-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.comp-address {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.comp-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
}

.comp-price {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.comp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--ink-2);
}

.comp-meta.compact {
  color: var(--ink-3);
}

.comp-meta a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.comp-line {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: pulse-slide 1.5s linear infinite;
}

.comp-line.short {
  width: 58%;
}

.comp-tab-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subpanel-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

.owner-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.owner-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.owner-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.owner-line span {
  font-size: 12px;
  color: var(--ink-3);
}

.owner-line strong,
.owner-line a {
  font-size: 13px;
  color: #111827;
  text-align: right;
}

.owner-line a {
  text-decoration: none;
  color: var(--brand);
}

.owner-muted {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}

.record-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
}

.detail-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: #f8fafc;
}

.detail-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.detail-empty-copy {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-actions .btn {
  padding: 22px 18px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
}

.detail-actions .btn.ghost {
  background: #eaf2ff;
  color: #2d62ea;
}

.detail-actions .btn.primary {
  background: #2f64ea;
  color: #fff;
}

.stage-select {
  gap: 10px;
}

.stage-label {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
}

.stage-select select {
  min-height: 58px;
  border-radius: 18px;
  padding: 14px 44px 14px 20px;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 1360px) {
  .layout {
    grid-template-columns: 270px 1fr 390px;
  }
}

@media (max-width: 1080px) {
  .deal-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
