/* Aneuk map CRM final visual layer. Loaded after styles.css by design. */
:root {
  --bg: #eef3f8;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --ink: #111827;
  --ink-soft: #263241;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #d9e2ec;
  --line-soft: #e8eef5;
  --blue: #1c74f5;
  --blue-strong: #0d5bd8;
  --blue-soft: #eaf2ff;
  --orange: #ff6817;
  --orange-strong: #ea5508;
  --orange-soft: #fff1e8;
  --teal: #11a889;
  --teal-soft: #e7f8f4;
  --green: #1f9d62;
  --green-soft: #e9f8ef;
  --red: #ef4f45;
  --red-soft: #fff0ee;
  --yellow: #f5a524;
  --yellow-soft: #fff7e5;
  --shadow-sm: 0 8px 18px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 16px 36px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 24px 70px rgba(16, 24, 40, 0.18);
  --topbar-h: 66px;
  --search-h: 58px;
  --filter-h: 50px;
  --brief-h: 42px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 116, 245, 0.55) rgba(224, 231, 240, 0.9);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0, rgba(255, 255, 255, 0.78) 150px, rgba(238, 243, 248, 0) 260px),
    linear-gradient(135deg, rgba(255, 104, 23, 0.06), transparent 30%),
    linear-gradient(90deg, rgba(28, 116, 245, 0.06), transparent 45%, rgba(17, 168, 137, 0.07)),
    var(--bg);
}

body::-webkit-scrollbar,
.listing-list::-webkit-scrollbar,
.crm-drawer::-webkit-scrollbar,
.advanced-strip::-webkit-scrollbar,
.deal-segment::-webkit-scrollbar,
.category-rail::-webkit-scrollbar,
.main-nav::-webkit-scrollbar,
.market-brief-metrics::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

body::-webkit-scrollbar-track,
.listing-list::-webkit-scrollbar-track,
.crm-drawer::-webkit-scrollbar-track,
.advanced-strip::-webkit-scrollbar-track,
.deal-segment::-webkit-scrollbar-track,
.category-rail::-webkit-scrollbar-track,
.main-nav::-webkit-scrollbar-track,
.market-brief-metrics::-webkit-scrollbar-track {
  background: rgba(224, 231, 240, 0.9);
  border-radius: 8px;
}

body::-webkit-scrollbar-thumb,
.listing-list::-webkit-scrollbar-thumb,
.crm-drawer::-webkit-scrollbar-thumb,
.advanced-strip::-webkit-scrollbar-thumb,
.deal-segment::-webkit-scrollbar-thumb,
.category-rail::-webkit-scrollbar-thumb,
.main-nav::-webkit-scrollbar-thumb,
.market-brief-metrics::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(28, 116, 245, 0.68), rgba(17, 168, 137, 0.64));
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-rows: var(--topbar-h) var(--search-h) var(--filter-h) var(--brief-h) 1fr;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 9px;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.96)),
    linear-gradient(90deg, rgba(255, 104, 23, 0.06), rgba(28, 116, 245, 0.05), rgba(17, 168, 137, 0.05));
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 30px rgba(16, 24, 40, 0.07);
  z-index: 30;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 104, 23, 0.84), rgba(28, 116, 245, 0.72), rgba(17, 168, 137, 0.72));
  border-radius: 8px 8px 0 0;
  opacity: 0.75;
  pointer-events: none;
}

.brand {
  min-width: 174px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 14px 0 10px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 104, 23, 0.18);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(255, 104, 23, 0.09), 0 1px 0 rgba(255, 255, 255, 0.98) inset;
  text-decoration: none;
}

.brand::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 7px;
  width: 4px;
  background: linear-gradient(180deg, var(--orange), var(--blue));
  border-radius: 8px;
}

.brand::after {
  content: "";
  margin-left: 10px;
  width: 7px;
  height: 24px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
  border-radius: 8px;
  opacity: 0.9;
}

.brand-wordmark {
  width: 118px;
  height: 32px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  margin-left: 8px;
}

.brand-logo,
.brand strong,
.brand small {
  display: none;
}

.main-nav {
  flex: 0 1 auto;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(241, 245, 249, 0.82);
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.045) inset, 0 1px 0 rgba(255, 255, 255, 0.94);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.nav-item {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  color: #344054;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  color: var(--blue-strong);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.06);
  transform: translateY(-1px);
}

.nav-item.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  border-color: rgba(28, 116, 245, 0.45);
  box-shadow: 0 12px 22px rgba(28, 116, 245, 0.25);
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
}

.top-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 226, 236, 0.88);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.07);
}

.icon-button,
.profile-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.profile-button:hover {
  border-color: rgba(28, 116, 245, 0.28);
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.07);
  transform: translateY(-1px);
}

.icon-button {
  width: 38px;
  position: relative;
  color: var(--teal);
  font-weight: 900;
}

.icon-button::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--orange);
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.profile-button {
  gap: 8px;
  padding: 0 11px 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
}

.profile-button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.7px solid #667085;
  border-bottom: 1.7px solid #667085;
  transform: rotate(45deg) translateY(-2px);
}

.profile-button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0b8fce);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.search-strip {
  height: var(--search-h);
  display: grid;
  grid-template-columns: minmax(360px, 520px) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line-soft);
  z-index: 25;
}

.search-box {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  background: #ffffff;
  border: 1px solid rgba(28, 116, 245, 0.22);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(28, 116, 245, 0.08);
}

.search-box:focus-within {
  border-color: rgba(28, 116, 245, 0.62);
  box-shadow: 0 0 0 3px rgba(28, 116, 245, 0.12), 0 14px 26px rgba(28, 116, 245, 0.11);
}

.search-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--blue);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -4px;
  background: var(--blue);
  border-radius: 8px;
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

.search-box input::placeholder {
  color: #667085;
  font-weight: 680;
}

.deal-segment {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.deal-segment .filter-chip {
  height: 32px;
  min-width: 58px;
  padding: 0 13px;
  color: #475467;
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 820;
}

.deal-segment .filter-chip.is-active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 8px 16px rgba(28, 116, 245, 0.22);
}

.advanced-strip {
  height: var(--filter-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  overflow-x: auto;
  background: rgba(250, 252, 255, 0.96);
  border-bottom: 1px solid var(--line-soft);
  z-index: 24;
}

.soft-toggle,
.soft-filter,
.status-select,
.reset-button {
  height: 35px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #344054;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 13px rgba(16, 24, 40, 0.045);
  font-size: 13px;
  font-weight: 760;
}

.soft-toggle,
.soft-filter,
.reset-button {
  padding: 0 13px;
}

.soft-toggle.is-active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(17, 168, 137, 0.32);
}

.soft-filter::after,
.status-select::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.65;
}

.status-select {
  padding: 0 9px 0 12px;
}

.status-select span {
  color: #667085;
  font-size: 12px;
}

.status-select select {
  appearance: none;
  color: #1d2939;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  font-weight: 820;
}

.reset-button {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(239, 79, 69, 0.22);
}

.market-brief {
  height: var(--brief-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line-soft);
  z-index: 23;
}

.market-brief-main {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.market-brief-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.market-brief-main span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-brief-metrics {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  flex: 0 0 auto;
}

.market-brief-metrics span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #344054;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(16, 24, 40, 0.045);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.market-brief-metrics b {
  color: var(--blue);
  font-size: 14px;
}

.mobile-view-switch {
  display: none;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 76px 404px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.category-rail {
  grid-column: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 7px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line-soft);
}

.category-tab {
  min-width: 0;
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 24px auto auto;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: #344054;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.category-tab:hover {
  color: var(--blue-strong);
  background: #f7fbff;
  border-color: var(--line);
  transform: translateY(-1px);
}

.category-tab span {
  grid-row: auto;
  grid-column: auto;
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 950;
}

.category-tab strong {
  grid-row: auto;
  grid-column: auto;
  max-width: 64px;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tab small {
  grid-row: auto;
  grid-column: auto;
  max-width: 64px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tab.is-active {
  color: var(--blue);
  background: #ffffff;
  border-color: rgba(28, 116, 245, 0.38);
  box-shadow: 0 10px 22px rgba(28, 116, 245, 0.14);
}

.category-tab.is-active span {
  color: #ffffff;
  background: var(--blue);
}

.category-tab.is-active small {
  color: var(--blue-strong);
}

.listing-panel {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: 14px 0 34px rgba(16, 24, 40, 0.08);
  z-index: 5;
}

.panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 15px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal), transparent);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 940;
}

.save-search {
  height: 36px;
  flex: 0 0 auto;
  padding: 0 14px;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(17, 168, 137, 0.38);
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(17, 168, 137, 0.18);
  font-size: 13px;
  font-weight: 850;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 16px 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.summary-grid div {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid var(--line-soft);
}

.summary-grid div:last-child {
  border-right: 0;
}

.summary-grid strong {
  display: block;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.summary-grid span {
  display: block;
  margin-top: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 720;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 10px;
}

.section-title-row h2,
.section-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
}

.section-title-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-title-row.tight {
  padding: 0;
}

.listing-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 18px 14px;
  overflow-y: auto;
}

.listing-card {
  position: relative;
  width: 100%;
  min-height: 172px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  color: inherit;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(16, 24, 40, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, background 150ms ease;
}

.listing-card:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 116, 245, 0.35);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.1);
}

.listing-card.is-selected {
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  border-color: rgba(28, 116, 245, 0.56);
  box-shadow: 0 18px 38px rgba(28, 116, 245, 0.13);
}

.listing-card.is-selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
  border-radius: 0 8px 8px 0;
}

.listing-media {
  position: relative;
  width: 118px;
  height: 152px;
  overflow: hidden;
  background: #e5e7eb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

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

.listing-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(10, 18, 28, 0.74));
}

.photo-count {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 7px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 850;
}

.listing-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.listing-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.listing-kicker > span {
  min-width: 0;
  overflow: hidden;
  color: #475467;
  font-size: 11px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.status-new {
  color: var(--red);
  background: var(--red-soft);
}

.status-called,
.status-recommended {
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.status-visit {
  color: var(--teal);
  background: var(--teal-soft);
}

.status-contract {
  color: #875100;
  background: var(--yellow-soft);
}

.status-hold {
  color: #64748b;
  background: #f1f5f9;
}

.listing-price {
  display: block;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 960;
  letter-spacing: 0;
}

.listing-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 890;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-meta,
.listing-sub {
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 1.28;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-trust,
.tag-row,
.card-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.listing-trust b,
.tag-row span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.listing-trust b {
  color: var(--blue-strong);
  background: var(--blue-soft);
  border: 1px solid rgba(28, 116, 245, 0.13);
}

.listing-trust b:nth-child(2) {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(17, 168, 137, 0.14);
}

.listing-trust b:nth-child(3) {
  color: #9a4b12;
  background: var(--orange-soft);
  border-color: rgba(255, 104, 23, 0.13);
}

.tag-row span {
  color: #475467;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
}

.card-footer {
  margin-top: auto;
  justify-content: space-between;
  gap: 8px;
  color: #667085;
  font-size: 11px;
  font-weight: 760;
}

.agent-mini,
.inquiry-mini {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-mini b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--teal);
  border-radius: 7px;
  font-size: 9px;
}

.empty-state {
  margin: 12px 4px;
  padding: 22px;
  color: #475467;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.map-panel {
  grid-column: 3;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #dde8f3;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.map-canvas > div {
  min-width: 0;
}

.mock-map-surface {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.48) 1px, transparent 1px),
    linear-gradient(135deg, #edf4fb 0%, #f3f8f2 50%, #e7f1fb 100%);
  background-size: 48px 48px, 48px 48px, cover;
}

.mock-map-surface::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    linear-gradient(116deg, transparent 0 28%, rgba(255, 255, 255, 0.78) 28% 31%, transparent 31%),
    linear-gradient(22deg, transparent 0 46%, rgba(255, 255, 255, 0.7) 46% 49%, transparent 49%),
    linear-gradient(151deg, transparent 0 58%, rgba(165, 184, 205, 0.38) 58% 61%, transparent 61%);
  pointer-events: none;
}

.road {
  position: absolute;
  z-index: 1;
  height: 18px;
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(199, 210, 222, 0.9);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.09);
}

.road-a {
  left: -8%;
  top: 28%;
  width: 72%;
  transform: rotate(22deg);
}

.road-b {
  left: 20%;
  top: 56%;
  width: 92%;
  transform: rotate(-8deg);
}

.road-c {
  left: -5%;
  top: 74%;
  width: 54%;
  transform: rotate(-16deg);
}

.road-d {
  right: -10%;
  top: 42%;
  width: 46%;
  transform: rotate(35deg);
}

.map-water,
.map-park {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.map-water {
  left: -6%;
  right: -6%;
  bottom: -12%;
  height: 31%;
  background: linear-gradient(135deg, rgba(83, 163, 219, 0.3), rgba(110, 199, 222, 0.46));
  transform: rotate(-8deg);
}

.map-park {
  background: rgba(68, 164, 103, 0.22);
  border: 1px solid rgba(68, 164, 103, 0.2);
  border-radius: 8px;
}

.park-a {
  left: 16%;
  top: 59%;
  width: 28%;
  height: 15%;
  transform: rotate(-8deg);
}

.park-b {
  right: 8%;
  top: 18%;
  width: 20%;
  height: 18%;
  transform: rotate(14deg);
}

.district-label {
  position: absolute;
  z-index: 3;
  padding: 6px 10px;
  color: #344054;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 850;
}

.label-a {
  left: 18%;
  top: 31%;
}

.label-b {
  left: 43%;
  top: 69%;
}

.label-c {
  right: 18%;
  top: 48%;
}

.map-search-card,
.mock-map-note,
.map-mode-stack,
.map-zoom-stack,
.map-toolbar,
.map-legend {
  position: absolute;
  z-index: 12;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.map-search-card {
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 256px;
  padding: 11px 12px;
}

.map-search-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.map-search-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.mock-map-note {
  left: 18px;
  top: 72px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.mock-map-note strong {
  color: var(--ink);
  font-size: 13px;
}

.mock-map-note span {
  color: var(--muted);
  font-size: 12px;
}

.map-toolbar {
  right: 24px;
  top: 22px;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.map-toolbar button,
.map-mode-stack button,
.map-zoom-stack button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.map-toolbar button,
.map-mode-stack button {
  width: 56px;
  height: 34px;
}

.map-toolbar button:first-child,
.map-mode-stack button.is-active {
  color: #ffffff;
  background: var(--blue);
}

.map-mode-stack {
  right: 430px;
  top: 22px;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.map-zoom-stack {
  right: 430px;
  bottom: 82px;
  display: grid;
  overflow: hidden;
}

.map-zoom-stack button {
  width: 40px;
  height: 38px;
  color: #111827;
  font-size: 20px;
}

.map-zoom-stack button + button {
  border-top: 1px solid var(--line-soft);
}

.map-legend {
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.legend-dot.sale {
  background: var(--blue);
}

.legend-dot.rent {
  background: var(--orange);
}

.legend-dot.active {
  background: var(--teal);
}

.map-price-marker {
  position: absolute;
  z-index: 6;
  min-width: 82px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #12304f;
  background: #ffffff;
  border: 1px solid rgba(28, 116, 245, 0.38);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.16);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.map-price-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}

.map-price-marker.is-rent {
  color: #93410c;
  border-color: rgba(255, 104, 23, 0.42);
}

.map-price-marker.is-selected {
  color: #ffffff;
  background: var(--blue);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 38px rgba(28, 116, 245, 0.34);
  z-index: 20;
}

.crm-drawer {
  position: absolute;
  z-index: 18;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(388px, calc(100% - 44px));
  max-width: 388px;
  min-width: 332px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.drawer-hero {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border-radius: 8px;
  background: #111827;
}

.drawer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.86));
}

.drawer-hero img {
  width: 100%;
  height: 100%;
  min-height: 238px;
  display: block;
  object-fit: cover;
}

.drawer-hero-copy {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 15px;
  display: grid;
  gap: 5px;
}

.drawer-hero .eyebrow {
  margin: 0;
  color: #67e8cf;
}

.drawer-hero h2,
.drawer-hero strong {
  margin: 0;
  color: #ffffff;
}

.drawer-hero h2 {
  font-size: 21px;
  line-height: 1.25;
}

.drawer-hero strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 950;
}

.drawer-hero span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 760;
}

.drawer-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-signal-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--blue-strong);
  background: var(--blue-soft);
  border: 1px solid rgba(28, 116, 245, 0.13);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.drawer-signal-row span:nth-child(2) {
  color: var(--teal);
  background: var(--teal-soft);
}

.drawer-signal-row span:nth-child(3) {
  color: #9a4b12;
  background: var(--orange-soft);
}

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

.drawer-actions button {
  height: 42px;
  color: var(--blue-strong);
  background: var(--blue-soft);
  border: 1px solid rgba(28, 116, 245, 0.16);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.drawer-actions .primary {
  color: #ffffff;
  background: var(--orange);
  border-color: rgba(255, 104, 23, 0.44);
  box-shadow: 0 12px 22px rgba(255, 104, 23, 0.18);
}

.drawer-section {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.drawer-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 930;
}

.lead-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #fffaf6;
  border: 1px solid rgba(255, 104, 23, 0.16);
  border-radius: 8px;
}

.lead-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}

.lead-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
}

.lead-card p {
  margin: 4px 0 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 14px;
  border-left: 2px solid rgba(17, 168, 137, 0.25);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 3px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(17, 168, 137, 0.16);
}

.timeline strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
}

.timeline span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.info-list div {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.info-list dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 890;
}

.recommend-button {
  height: 44px;
  margin-top: auto;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(17, 168, 137, 0.4);
  border-radius: 8px;
  box-shadow: 0 14px 24px rgba(17, 168, 137, 0.17);
  font-size: 14px;
  font-weight: 920;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 72px 386px minmax(0, 1fr);
  }

  .crm-drawer {
    width: 352px;
    min-width: 314px;
  }

  .map-mode-stack,
  .map-zoom-stack {
    right: 390px;
  }
}

@media (max-width: 1100px) {
  .search-strip {
    grid-template-columns: minmax(280px, 1fr) auto;
  }

  .market-brief-main span {
    display: none;
  }

  .workspace {
    grid-template-columns: 70px 360px minmax(0, 1fr);
  }

  .crm-drawer {
    width: 328px;
  }

  .map-mode-stack,
  .map-zoom-stack {
    right: 366px;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  body::-webkit-scrollbar-track {
    background: rgba(226, 233, 242, 0.55);
  }

  body::-webkit-scrollbar-thumb {
    background: rgba(28, 116, 245, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.86);
  }

  .main-nav,
  .deal-segment,
  .advanced-strip,
  .market-brief-metrics,
  .category-rail {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-nav::-webkit-scrollbar,
  .deal-segment::-webkit-scrollbar,
  .advanced-strip::-webkit-scrollbar,
  .market-brief-metrics::-webkit-scrollbar,
  .category-rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .app-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto auto auto 1fr;
    overflow: hidden;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 9px 12px;
    overflow: hidden;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-wordmark {
    width: 138px;
    height: 38px;
  }

  .profile-button strong {
    display: none;
  }

  .main-nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 5px;
    overflow-x: auto;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .nav-item {
    height: 32px;
    padding: 0 12px;
  }

  .search-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 12px;
    overflow: hidden;
  }

  .search-box {
    max-width: 100%;
    min-width: 0;
    height: 44px;
  }

  .deal-segment {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .deal-segment .filter-chip {
    flex: 1 0 62px;
  }

  .advanced-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .market-brief {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 9px 12px;
    overflow: hidden;
  }

  .market-brief-main {
    display: block;
    min-width: max-content;
  }

  .market-brief-main span {
    display: none;
  }

  .market-brief-metrics {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
  }

  .mobile-view-switch {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 12px;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid var(--line-soft);
  }

  .mobile-view-switch button {
    height: 39px;
    color: #344054;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-view-switch button.is-active {
    color: #ffffff;
    background: var(--blue);
    border-color: rgba(28, 116, 245, 0.42);
  }

  .workspace {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
  }

  .category-rail {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    flex-direction: row;
    gap: 7px;
    padding: 0 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
  }

  .category-tab {
    width: 112px;
    min-width: 112px;
    min-height: 58px;
    background: #ffffff;
    border-color: var(--line);
  }

  .listing-panel,
  .map-panel,
  .crm-drawer {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
  }

  .listing-panel {
    min-height: 620px;
  }

  .map-panel {
    min-height: 560px;
  }

  .map-canvas {
    min-height: 560px;
  }

  .crm-drawer {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
  }

  body[data-mobile-view="list"] .map-panel,
  body[data-mobile-view="list"] .crm-drawer,
  body[data-mobile-view="map"] .listing-panel,
  body[data-mobile-view="map"] .crm-drawer,
  body[data-mobile-view="crm"] .listing-panel,
  body[data-mobile-view="crm"] .map-panel {
    display: none;
  }

  .map-toolbar {
    display: none;
  }

  .map-mode-stack,
  .map-zoom-stack {
    right: 12px;
  }

  .map-mode-stack {
    top: 174px;
  }

  .map-search-card,
  .mock-map-note {
    left: 12px;
    max-width: calc(100% - 78px);
  }

  .map-search-card {
    top: 12px;
  }

  .mock-map-note {
    top: 66px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding-top: 8px;
  }

  .brand-wordmark {
    width: 132px;
    height: 36px;
  }

  .icon-button {
    width: 36px;
    height: 34px;
  }

  .profile-button {
    width: 38px;
    height: 34px;
    padding: 0;
  }

  .profile-button span {
    width: 28px;
    height: 28px;
  }

  .panel-head {
    padding: 16px 16px 14px;
  }

  h1 {
    font-size: 22px;
  }

  .summary-grid {
    margin: 14px 14px 12px;
  }

  .listing-list {
    padding: 0 10px 14px;
  }

  .listing-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 178px;
    padding: 9px;
  }

  .listing-media {
    width: 112px;
    height: 154px;
  }

  .listing-price {
    font-size: 20px;
  }

  .listing-title {
    font-size: 13px;
  }

  .listing-trust b:nth-child(3),
  .tag-row {
    display: none;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-legend,
  .mock-map-note {
    display: none;
  }

  .drawer-hero,
  .drawer-hero img {
    min-height: 220px;
  }

  .drawer-actions {
    grid-template-columns: 1fr 1fr;
  }
}
