:root {
  color-scheme: light;
  --canvas: #f5f7f6;
  --surface: #ffffff;
  --surface-soft: #f0f5f2;
  --surface-mint: #e4f2ed;
  --surface-strong: #e5e9e7;
  --ink: #191c1b;
  --ink-soft: #3f4947;
  --muted: #6b7673;
  --primary: #0f766e;
  --primary-deep: #0b4a44;
  --primary-pale: #d9eee8;
  --border: #dfe5e2;
  --border-strong: #bec9c6;
  --danger: #b54747;
  --danger-pale: #fbebea;
  --amber: #a66a18;
  --amber-pale: #fbf1df;
  --blue: #426f95;
  --blue-pale: #e8f0f6;
  --shadow: 0 3px 12px rgba(23, 42, 36, .045);
  --shadow-float: 0 22px 56px rgba(19, 35, 30, .18);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(15, 118, 110, .22); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: white; background: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: -.06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark--large { width: 44px; height: 44px; border-radius: 14px; font-size: 14px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; background: var(--surface); border-right: 1px solid var(--border); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 10px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand-title { color: var(--ink); font-size: 13px; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; }
.brand-subtitle { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.sidebar-rule { height: 1px; margin: 22px 7px 17px; background: var(--border); }
.nav-label { padding: 0 12px; margin: 0 0 8px; color: #8a9491; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-group { display: grid; gap: 3px; }
.nav-link { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 9px; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.nav-link svg { width: 18px; height: 18px; flex: none; color: #6f7e79; stroke-width: 1.8; }
.nav-link:hover { background: #f4f7f5; color: var(--primary-deep); }
.nav-link[aria-current="page"] { color: var(--primary-deep); background: var(--surface-mint); font-weight: 650; }
.nav-link[aria-current="page"] svg { color: var(--primary); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: var(--primary); }
.nav-badge { min-width: 21px; margin-left: auto; padding: 3px 6px; color: var(--primary-deep); background: rgba(15,118,110,.1); border-radius: 999px; font-size: 10px; font-weight: 700; text-align: center; }
.sidebar-spacer { flex: 1; }
.sidebar-note { margin: 10px 4px 13px; padding: 12px; color: var(--ink-soft); background: #f6f8f7; border: 1px solid var(--border); border-radius: 10px; }
.sidebar-note strong { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 700; }
.sidebar-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 11px 9px 3px; border-top: 1px solid var(--border); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--primary-deep); background: #dceee8; border-radius: 50%; font-size: 11px; font-weight: 700; }
.user-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.user-name { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.user-role { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; transition: background .15s, border-color .15s; }
.icon-button svg { width: 18px; height: 18px; stroke-width: 1.8; }
.icon-button:hover { background: #f2f6f4; border-color: var(--border); }
.sidebar-signout { width: 30px; height: 30px; }

.main-column { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 70px; display: flex; align-items: center; gap: 18px; padding: 0 clamp(20px, 3vw, 42px); background: rgba(255,255,255,.93); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.mobile-menu-button { display: none; }
.breadcrumb { min-width: 140px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.topbar-search { position: relative; width: min(390px, 42vw); margin-left: auto; }
.topbar-search svg { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; color: #75827d; transform: translateY(-50%); pointer-events: none; }
.topbar-search input { width: 100%; height: 38px; padding: 0 68px 0 39px; color: var(--ink); background: #f7f9f8; border: 1px solid var(--border); border-radius: 9px; font-size: 12px; transition: border .15s, background .15s; }
.topbar-search input:focus { background: #fff; border-color: #9fc7ba; outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.08); }
.shortcut { position: absolute; right: 9px; top: 50%; padding: 2px 5px; color: #7d8884; background: #fff; border: 1px solid var(--border); border-radius: 5px; font-size: 9px; transform: translateY(-50%); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.notification-wrap { position: relative; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: #dc7b65; border: 1px solid white; border-radius: 50%; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; font-size: 12px; font-weight: 620; cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.button svg { width: 16px; height: 16px; stroke-width: 2; }
.button:hover { background: #f6f9f7; border-color: #9daea8; }
.button:active { transform: translateY(1px); }
.button--primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 4px rgba(15,118,110,.12); }
.button--primary:hover { color: #fff; background: #0c665f; border-color: #0c665f; box-shadow: 0 4px 10px rgba(15,118,110,.18); }
.button--quiet { min-height: 34px; padding: 0 10px; background: transparent; border-color: transparent; }
.button--quiet:hover { color: var(--primary-deep); background: var(--surface-soft); border-color: transparent; }
.button--danger { color: var(--danger); background: var(--danger-pale); border-color: #f2d1cd; }
.button--small { min-height: 32px; padding: 0 10px; font-size: 11px; }

.page-content { width: 100%; max-width: 1600px; min-width: 0; margin: 0 auto; padding: 31px clamp(20px, 3vw, 42px) 48px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin: 0 0 23px; }
.eyebrow { margin: 0 0 7px; color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-title { margin: 0; color: #1c2926; font-size: clamp(24px, 2vw, 31px); font-weight: 670; letter-spacing: -.04em; line-height: 1.16; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 7px; }
.preview-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 9px 12px; color: #476b61; background: #edf6f2; border: 1px solid #d5e9e0; border-radius: 8px; font-size: 11px; }
.preview-banner svg { width: 15px; height: 15px; flex: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.section-heading h2, .section-heading h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 680; letter-spacing: -.015em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; padding: 5px 0; color: var(--primary); background: none; border: 0; font-size: 11px; font-weight: 650; cursor: pointer; }
.text-link:hover { color: var(--primary-deep); }
.text-link svg { width: 14px; height: 14px; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.muted { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 127px; padding: 17px 18px 14px; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-label { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.stat-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--primary); background: #eef6f3; border-radius: 9px; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-value { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; color: #20312d; font-size: 27px; font-weight: 680; letter-spacing: -.055em; line-height: 1; }
.stat-change { display: inline-flex; align-items: center; gap: 3px; color: var(--primary); font-size: 10px; font-weight: 650; letter-spacing: 0; }
.stat-change--muted { color: var(--muted); font-weight: 500; }
.stat-foot { color: #87918e; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .95fr); gap: 16px; margin-bottom: 17px; }
.chart-card { padding: 18px 19px 13px; }
.chart-legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }
.chart-wrap { position: relative; height: 200px; margin-top: 15px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #e8eeeb; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartFill); }
.chart-point { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.chart-x-label { fill: #8a9491; font: 10px Inter, sans-serif; }
.chart-y-label { fill: #9aa39f; font: 9px Inter, sans-serif; }
.pipeline-card { padding: 18px 19px; }
.pipeline-list { display: grid; gap: 13px; margin-top: 19px; }
.pipeline-row { display: grid; grid-template-columns: 80px 1fr 26px; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 10px; }
.pipeline-track { height: 7px; overflow: hidden; background: #edf1ef; border-radius: 99px; }
.pipeline-fill { height: 100%; min-width: 3px; background: var(--primary); border-radius: inherit; }
.pipeline-count { color: var(--muted); text-align: right; }
.pipeline-caption { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; color: var(--muted); border-top: 1px solid var(--border); font-size: 10px; }
.pipeline-caption strong { color: var(--ink); font-size: 12px; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(285px, .85fr); gap: 16px; }
.table-card { overflow: hidden; }
.table-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--border); }
.table-card-header h3 { margin: 0; font-size: 13px; font-weight: 680; }
.table-card-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 14px; color: #75817d; background: #f8faf9; border-bottom: 1px solid var(--border); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; color: var(--ink-soft); border-bottom: 1px solid #edf1ef; font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fbfcfb; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 145px; }
.person-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: none; color: #3e6257; background: #e5f1ec; border-radius: 50%; font-size: 9px; font-weight: 700; }
.person-copy { min-width: 0; display: grid; gap: 4px; }
.person-copy strong { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.person-copy span { color: var(--muted); font-size: 9px; }
.status-pill, .soft-tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 99px; color: #456b60; background: #eaf4ef; font-size: 9px; font-weight: 650; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-pill--blue { color: #4d7491; background: #edf4f8; }
.status-pill--amber { color: #9a691f; background: #fbf3e5; }
.status-pill--rose { color: #a85f56; background: #fbefed; }
.status-pill--gray { color: #6d7773; background: #eef1ef; }
.temperature { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 10px; }
.temperature i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8ca49c; }
.temperature--hot i { background: #d77965; }
.temperature--warm i { background: #d0a353; }
.temperature--cold i { background: #8aa5b8; }
.inline-date { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.table-actions { display: flex; justify-content: flex-end; gap: 3px; }
.table-actions .icon-button { width: 28px; height: 28px; }
.table-actions .icon-button svg { width: 14px; height: 14px; }
.followup-list { display: grid; }
.followup-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 17px; border-bottom: 1px solid #edf1ef; }
.followup-item:last-child { border-bottom: 0; }
.followup-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--primary); background: #edf6f2; border-radius: 9px; }
.followup-icon svg { width: 15px; height: 15px; }
.followup-copy { min-width: 0; display: grid; gap: 4px; }
.followup-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.followup-copy span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.followup-time { color: var(--muted); font-size: 9px; text-align: right; white-space: nowrap; }
.followup-time--overdue { color: var(--danger); font-weight: 650; }
.empty-inline { padding: 25px 18px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 13px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.toolbar-search { position: relative; min-width: 220px; flex: 1; }
.toolbar-search svg { position: absolute; top: 50%; left: 11px; width: 15px; height: 15px; color: #78847f; transform: translateY(-50%); }
.field, .select, .textarea { width: 100%; min-height: 38px; padding: 0 11px; color: var(--ink); background: #fff; border: 1px solid var(--border-strong); border-radius: 7px; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.field::placeholder, .textarea::placeholder { color: #9aa39f; }
.field:focus, .select:focus, .textarea:focus { border-color: #83b3a6; outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.08); }
.toolbar-search .field { padding-left: 34px; }
.toolbar .select { width: auto; min-width: 130px; }
.toolbar-count { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--primary-deep); background: #eaf4ef; border: 1px solid #d7e9e0; border-radius: 99px; font-size: 10px; }
.leads-table-card { overflow: hidden; }
.lead-name-button { max-width: 205px; overflow: hidden; padding: 0; color: var(--ink); background: transparent; border: 0; font-size: 11px; font-weight: 650; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.lead-name-button:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.property-summary { display: grid; gap: 3px; min-width: 105px; }
.property-summary strong { color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.property-summary span { color: var(--muted); font-size: 9px; }
.currency-value { color: var(--ink); font-size: 10px; font-weight: 630; white-space: nowrap; }
.subhead-row { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 0 0 14px; }
.subhead-row h2 { margin: 0; font-size: 14px; font-weight: 680; }
.subhead-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.pipeline-board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-column { min-width: 190px; padding: 11px; background: #eef2f0; border: 1px solid #e0e6e3; border-radius: 11px; }
.pipeline-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 11px; }
.pipeline-column-head strong { color: var(--ink-soft); font-size: 11px; font-weight: 670; }
.pipeline-column-head span { min-width: 21px; padding: 3px 5px; color: #5d6d67; background: #fff; border-radius: 6px; font-size: 9px; font-weight: 650; text-align: center; }
.pipeline-cards { display: grid; align-content: start; gap: 8px; min-height: 90px; }
.pipeline-lead { padding: 12px; background: #fff; border: 1px solid #e3e9e6; border-radius: 9px; box-shadow: 0 1px 3px rgba(20,39,32,.035); }
.pipeline-lead:hover { border-color: #a9c9be; box-shadow: 0 4px 12px rgba(27,75,61,.08); }
.pipeline-lead-open { width: 100%; display: grid; gap: 6px; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; cursor: pointer; }
.pipeline-lead-open:focus-visible { outline-offset: 4px; }
.pipeline-lead strong { display: block; margin: 0; font-size: 10px; font-weight: 650; }
.pipeline-lead span { display: block; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-lead-foot { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf1ef; }
.pipeline-lead-foot small { color: var(--primary); font-size: 9px; font-weight: 650; }
.stage-next { display: inline-flex; align-items: center; gap: 4px; color: #7a8581; background: none; border: 0; font-size: 9px; cursor: pointer; }
.stage-next:hover { color: var(--primary); }

.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.property-card { position: relative; overflow: hidden; }
.input-pair { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 7px; }
.property-visual { position: relative; height: 145px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #e5f0eb 0%, #d2e5dd 48%, #bfd8cd 100%); }
.property-visual::before, .property-visual::after { content: ""; position: absolute; bottom: -35px; width: 60%; height: 115px; background: rgba(255,255,255,.34); border-radius: 50% 50% 0 0; }
.property-visual::before { left: -15%; transform: rotate(-9deg); }
.property-visual::after { right: -15%; height: 90px; background: rgba(15,118,110,.09); transform: rotate(11deg); }
.property-building { position: relative; z-index: 1; width: 86px; height: 82px; display: flex; align-items: flex-end; justify-content: center; gap: 7px; padding: 12px 10px 0; background: #f8fbf9; border: 1px solid rgba(57,102,86,.2); border-radius: 7px 7px 1px 1px; box-shadow: 0 9px 20px rgba(25,66,52,.1); }
.property-building::before { content: ""; position: absolute; top: -16px; left: 50%; width: 75px; height: 18px; background: #edf5f1; border: 1px solid rgba(57,102,86,.17); border-radius: 4px 4px 0 0; transform: translateX(-50%); }
.property-window { width: 14px; height: 20px; margin-bottom: 11px; background: #cfe5dc; border: 1px solid #9ebfb0; border-radius: 2px 2px 0 0; }
.property-door { width: 15px; height: 28px; background: #8eb4a2; border-radius: 3px 3px 0 0; }
.property-visual--blue { background: linear-gradient(145deg, #e8eef1 0%, #d4e1e4 48%, #bdd2d4 100%); }
.property-visual--sand { background: linear-gradient(145deg, #f3eee4 0%, #e6dcc7 48%, #d9c9ad 100%); }
.property-visual--blue .property-building { background: #f8fbfb; }
.property-visual--sand .property-building { background: #fbfaf6; }
.property-status { position: absolute; z-index: 2; top: 11px; left: 11px; }
.property-body { padding: 15px; }
.property-title-row { display: flex; align-items: start; justify-content: space-between; gap: 9px; }
.property-title-row h3 { margin: 0; font-size: 13px; font-weight: 670; letter-spacing: -.02em; }
.property-title-row .icon-button { flex: none; margin: -7px -7px 0 0; }
.property-location { display: flex; align-items: center; gap: 5px; margin: 7px 0 13px; color: var(--muted); font-size: 10px; }
.property-location svg { width: 13px; height: 13px; }
.property-facts { display: flex; flex-wrap: wrap; gap: 13px; color: var(--ink-soft); font-size: 10px; }
.property-facts span { display: inline-flex; align-items: center; gap: 5px; }
.property-facts svg { width: 14px; height: 14px; color: #71817a; }
.property-price-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.property-price { color: var(--primary-deep); font-size: 14px; font-weight: 700; letter-spacing: -.025em; }
.property-reference { color: #87918e; font-size: 9px; }
.property-lead-match { margin-top: 12px; padding: 10px 11px; color: #4d6960; background: #f0f6f3; border-radius: 8px; font-size: 10px; line-height: 1.45; }
.property-lead-match strong { color: var(--primary-deep); }

.activity-feed { display: grid; }
.activity-row { position: relative; display: grid; grid-template-columns: 33px minmax(0,1fr) auto; gap: 11px; padding: 14px 17px; }
.activity-row + .activity-row { border-top: 1px solid #edf1ef; }
.activity-mark { width: 31px; height: 31px; display: grid; place-items: center; color: var(--primary); background: #edf6f2; border-radius: 9px; }
.activity-mark svg { width: 15px; height: 15px; }
.activity-copy { min-width: 0; }
.activity-copy h3 { margin: 1px 0 5px; color: var(--ink); font-size: 11px; font-weight: 650; }
.activity-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.activity-copy p strong { color: var(--ink-soft); font-weight: 620; }
.activity-meta { color: #8a9491; font-size: 9px; white-space: nowrap; }
.followup-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr); gap: 16px; }
.followup-date-group + .followup-date-group { border-top: 1px solid var(--border); }
.followup-date-label { padding: 12px 17px 6px; color: var(--primary); font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.followup-detail { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 17px 13px; }
.followup-detail .person-avatar { width: 32px; height: 32px; }
.followup-detail-copy { min-width: 0; display: grid; gap: 4px; }
.followup-detail-copy strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.followup-detail-copy span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.today-summary { padding: 18px; }
.today-summary h3 { margin: 0; font-size: 13px; font-weight: 670; }
.summary-big { margin: 19px 0 5px; color: var(--primary-deep); font-size: 31px; font-weight: 700; letter-spacing: -.05em; }
.summary-caption { color: var(--muted); font-size: 10px; }
.summary-progress { height: 7px; margin: 14px 0 8px; overflow: hidden; background: #edf1ef; border-radius: 99px; }
.summary-progress span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.summary-note { color: #7f8a85; font-size: 10px; line-height: 1.5; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.report-card { padding: 18px; }
.report-card h3 { margin: 0 0 5px; font-size: 13px; font-weight: 670; }
.report-card > p { margin: 0 0 18px; color: var(--muted); font-size: 10px; }
.report-row { display: grid; grid-template-columns: minmax(75px,105px) minmax(0,1fr) 28px; align-items: center; gap: 10px; margin: 13px 0; color: var(--ink-soft); font-size: 10px; }
.report-row .pipeline-track { height: 8px; }
.report-row strong { color: var(--ink); font-size: 10px; text-align: right; }
.report-callout { display: flex; gap: 12px; margin-top: 16px; padding: 13px; color: #49685d; background: #f0f6f3; border-radius: 9px; font-size: 10px; line-height: 1.5; }
.report-callout svg { width: 17px; height: 17px; flex: none; }
.team-grid { display: grid; gap: 10px; }
.team-person { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 9px; }
.team-person .person-avatar { width: 34px; height: 34px; }
.team-person strong { display: block; color: var(--ink); font-size: 11px; font-weight: 650; }
.team-person small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.team-role { color: var(--ink-soft); font-size: 10px; text-transform: capitalize; }
.team-status { font-size: 9px; }

.modal-backdrop, .drawer-backdrop { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(19, 32, 28, .34); backdrop-filter: blur(2px); }
.modal { width: min(680px, 100%); max-height: min(90vh, 900px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 15px; box-shadow: var(--shadow-float); animation: modal-in .18s ease-out; }
.modal--narrow { width: min(460px, 100%); }
@keyframes modal-in { from { opacity: .65; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 680; letter-spacing: -.025em; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.modal > form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.modal-header, .modal-footer { flex: 0 0 auto; }
.modal-body { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 22px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 22px; background: #fbfcfb; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 13px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field label { color: var(--ink-soft); font-size: 10px; font-weight: 650; }
.form-field label em { color: #b45e51; font-style: normal; }
.field-hint { color: #89938f; font-size: 9px; }
.textarea { min-height: 76px; padding: 10px 11px; line-height: 1.45; resize: vertical; }
.form-error { margin: 0; padding: 9px 11px; color: #9d4943; background: #fbefed; border: 1px solid #f0d3cf; border-radius: 7px; font-size: 10px; }
.drawer-backdrop { justify-content: flex-end; padding: 0; }
.drawer { width: min(520px, 100%); height: 100%; display: flex; flex-direction: column; overflow-y: auto; background: #fff; box-shadow: var(--shadow-float); animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .7; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 22px 23px 18px; background: #f7faf8; border-bottom: 1px solid var(--border); }
.drawer-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.drawer-person { display: flex; align-items: center; gap: 13px; }
.drawer-person .person-avatar { width: 45px; height: 45px; font-size: 12px; }
.drawer-person h2 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: -.025em; }
.drawer-person p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.drawer-content { display: grid; gap: 16px; padding: 18px 23px 30px; }
.detail-section { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.detail-section:last-child { padding: 0; border: 0; }
.detail-section h3 { margin: 0 0 12px; color: #65716d; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.detail-item { min-width: 0; display: grid; gap: 4px; }
.detail-item span { color: var(--muted); font-size: 9px; }
.detail-item strong { overflow-wrap: anywhere; color: var(--ink-soft); font-size: 11px; font-weight: 580; line-height: 1.4; }
.detail-item--wide { grid-column: 1 / -1; }
.timeline-mini { display: grid; gap: 10px; }
.timeline-entry { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px; }
.timeline-entry .activity-mark { width: 24px; height: 24px; border-radius: 7px; }
.timeline-entry .activity-mark svg { width: 13px; height: 13px; }
.timeline-entry p { margin: 2px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.timeline-entry small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.drawer-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding: 12px 20px; background: rgba(255,255,255,.94); border-top: 1px solid var(--border); backdrop-filter: blur(10px); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.1fr); background: #fff; }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 36px clamp(28px, 5vw, 74px); overflow: hidden; color: white; background: #0d514a; }
.auth-aside::before { content: ""; position: absolute; top: 18%; right: -190px; width: 440px; height: 440px; border: 1px solid rgba(214,244,234,.18); border-radius: 50%; box-shadow: 0 0 0 38px rgba(214,244,234,.045), 0 0 0 78px rgba(214,244,234,.035), 0 0 0 120px rgba(214,244,234,.025); }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.auth-brand .brand-mark { color: var(--primary-deep); background: #d4eee3; }
.auth-brand .brand-title { color: white; font-size: 14px; }
.auth-brand .brand-subtitle { color: rgba(229,245,239,.66); }
.auth-hero { position: relative; z-index: 1; max-width: 490px; margin: auto 0; padding: 36px 0 72px; }
.auth-hero .eyebrow { color: #a8ddd0; }
.auth-hero h1 { margin: 0; font-size: clamp(31px, 4vw, 51px); font-weight: 630; letter-spacing: -.055em; line-height: 1.08; }
.auth-hero p { max-width: 430px; margin: 16px 0 0; color: rgba(238,249,245,.72); font-size: 13px; line-height: 1.7; }
.auth-proof { display: flex; align-items: center; gap: 11px; color: rgba(235,247,242,.72); font-size: 10px; }
.auth-proof-mark { width: 25px; height: 25px; display: grid; place-items: center; color: #d9f0e8; border: 1px solid rgba(217,240,232,.35); border-radius: 50%; }
.auth-proof-mark svg { width: 13px; height: 13px; }
.auth-main { display: grid; place-items: center; min-width: 0; padding: 34px; background: #f8faf9; }
.auth-card { width: min(420px, 100%); padding: 31px; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 30px rgba(27,48,40,.055); }
.auth-card h2 { margin: 0; font-size: 23px; font-weight: 670; letter-spacing: -.035em; }
.auth-card > p { margin: 8px 0 23px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.auth-card .form-field { margin-bottom: 14px; }
.auth-card .button { width: 100%; min-height: 42px; margin-top: 7px; }
.auth-caption { margin-top: 15px; color: #87918e; font-size: 9px; line-height: 1.5; text-align: center; }
.auth-error { margin: 0 0 13px; }
.auth-footer { display: none; }

.toast-region { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(340px, calc(100vw - 36px)); pointer-events: none; }
.toast { display: flex; align-items: start; gap: 9px; padding: 12px 13px; color: #34564b; background: #fff; border: 1px solid #d5e8df; border-left: 3px solid var(--primary); border-radius: 9px; box-shadow: 0 8px 24px rgba(26,53,42,.14); font-size: 11px; line-height: 1.4; animation: modal-in .18s ease-out; }
.toast svg { width: 15px; height: 15px; flex: none; color: var(--primary); }
.toast--error { color: #8d4942; border-color: #efd5d1; border-left-color: var(--danger); }
.toast--error svg { color: var(--danger); }
.loading-line { height: 8px; overflow: hidden; background: #e8efeb; border-radius: 99px; }
.loading-line::after { content: ""; display: block; width: 40%; height: 100%; background: #bdd9cd; border-radius: inherit; animation: loading 1.1s ease-in-out infinite alternate; }
@keyframes loading { to { transform: translateX(155%); } }

@media (max-width: 1200px) {
  :root { --sidebar: 224px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 15px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
  .property-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .data-table th, .data-table td { padding-right: 11px; padding-left: 11px; }
}
@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid, .dashboard-bottom, .followup-layout { grid-template-columns: 1fr; }
  .pipeline-board { grid-template-columns: repeat(5, 205px); }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: minmax(280px, .8fr) minmax(380px, 1.2fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(286px, calc(100vw - 48px)); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 40px rgba(19,35,30,.12); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(17,31,26,.3); }
  .main-column { min-height: 100vh; }
  .topbar { height: 61px; gap: 9px; padding: 0 15px; }
  .mobile-menu-button { display: inline-grid; width: 34px; height: 34px; flex: none; }
  .mobile-menu-button svg { width: 20px; height: 20px; }
  .breadcrumb { min-width: 0; flex: 1; font-size: 11px; }
  .topbar-search { width: min(210px, 37vw); margin-left: 0; }
  .topbar-search input { height: 35px; padding-right: 12px; font-size: 11px; }
  .shortcut { display: none; }
  .topbar-actions { gap: 2px; }
  .topbar-actions > .button { width: 36px; min-height: 36px; padding: 0; font-size: 0; gap: 0; }
  .topbar-actions > .button svg { width: 17px; height: 17px; }
  .page-content { padding: 23px 16px 35px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .page-title { font-size: 25px; }
  .page-subtitle { max-width: 460px; font-size: 11px; }
  .heading-actions { padding-top: 0; }
  .heading-actions .button { min-height: 35px; padding: 0 10px; font-size: 10px; }
  .heading-actions .button svg { width: 14px; height: 14px; }
  .stats-grid { gap: 9px; margin-bottom: 12px; }
  .stat-card { min-height: 112px; padding: 13px; }
  .stat-value { font-size: 23px; margin: 12px 0 5px; }
  .stat-icon { width: 27px; height: 27px; }
  .stat-label { font-size: 10px; }
  .stat-foot { font-size: 9px; }
  .dashboard-grid, .dashboard-bottom, .followup-layout { gap: 12px; margin-bottom: 12px; }
  .chart-card, .pipeline-card { padding: 15px; }
  .chart-wrap { height: 170px; }
  .table-card-header { padding: 14px 14px 12px; }
  .followup-item { padding: 11px 13px; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; }
  .followup-icon { width: 28px; height: 28px; }
  .toolbar { gap: 7px; padding: 9px; }
  .toolbar-search { min-width: 100%; }
  .toolbar .select { min-width: 0; flex: 1; }
  .toolbar-count { margin-left: 0; }
  .property-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .property-visual { height: 120px; }
  .property-body { padding: 12px; }
  .report-grid { grid-template-columns: 1fr; gap: 12px; }
  .auth-shell { display: block; background: #f8faf9; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; padding: 22px 15px; }
  .auth-card { padding: 25px 22px; }
  .auth-footer { display: block; margin-top: 20px; color: #87918e; font-size: 9px; text-align: center; }
}
@media (max-width: 560px) {
  .topbar-search { width: 36px; flex: none; }
  .topbar-search input { width: 36px; padding: 0; color: transparent; background: transparent; border-color: transparent; }
  .topbar-search input::placeholder { color: transparent; }
  .topbar-search svg { left: 10px; }
  .topbar-search:focus-within { position: absolute; z-index: 1; left: 55px; right: 105px; width: auto; }
  .topbar-search:focus-within input { width: 100%; padding: 0 12px 0 34px; color: var(--ink); background: #fff; border-color: #9fc7ba; }
  .topbar-search:focus-within input::placeholder { color: #9aa39f; }
  .topbar-actions .notification-wrap { display: none; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 14px; }
  .heading-actions .button { flex: 1; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 105px; padding: 12px; }
  .stat-label { max-width: 104px; line-height: 1.35; }
  .stat-icon { width: 25px; height: 25px; }
  .stat-icon svg { width: 14px; height: 14px; }
  .stat-value { font-size: 21px; }
  .stat-change { font-size: 9px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pipeline-row { grid-template-columns: 74px minmax(0,1fr) 20px; }
  .data-table-wrap { overflow: visible; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .data-table tbody { padding: 8px; }
  .data-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin: 0 0 8px; padding: 9px 11px; background: #fff; border: 1px solid #e7ece9; border-radius: 9px; }
  .data-table td { min-width: 0; display: block; padding: 7px 0; border: 0; background: transparent !important; font-size: 10px; overflow-wrap: anywhere; }
  .data-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #8a9491; font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .data-table .person-cell { min-width: 0; }
  .data-table .person-cell::before { display: none; }
  .data-table td[data-label="Contact"] { grid-column: 1 / -1; }
  .data-table td[data-label="Actions"] { grid-column: 2; justify-self: end; }
  .data-table .table-actions { justify-content: flex-end; }
  .data-table tr:last-child { margin-bottom: 0; }
  .lead-name-button { max-width: 145px; }
  .table-card-header { align-items: flex-start; }
  .table-card-header .button { min-height: 30px; font-size: 10px; }
  .table-card-header .button svg { width: 13px; height: 13px; }
  .property-grid { grid-template-columns: 1fr; }
  .property-visual { height: 144px; }
  .pipeline-board { grid-template-columns: repeat(5, 190px); margin-right: -16px; padding-right: 16px; }
  .toolbar .select { flex-basis: calc(50% - 5px); }
  .team-person { grid-template-columns: 36px minmax(0,1fr) auto; }
  .team-person .team-status { display: none; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-field--wide { grid-column: auto; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 15px 15px 0 0; }
  .modal-header { padding: 17px 17px 13px; }
  .modal-body { padding: 15px 17px 20px; }
  .modal-footer { padding: 11px 17px max(11px, env(safe-area-inset-bottom)); }
  .drawer { width: 100%; }
  .drawer-head { padding: 17px 17px 15px; }
  .drawer-content { padding: 16px 17px 24px; }
  .drawer-footer { padding: 10px 17px max(10px, env(safe-area-inset-bottom)); }
  .detail-grid { gap: 11px; }
  .activity-row { grid-template-columns: 30px minmax(0,1fr); padding: 12px; gap: 9px; }
  .activity-meta { grid-column: 2; margin-top: -3px; }
  .followup-detail { grid-template-columns: 34px minmax(0,1fr); padding-right: 12px; padding-left: 12px; }
  .followup-detail > .button { grid-column: 2; justify-self: start; }
  .report-row { grid-template-columns: 73px minmax(0,1fr) 20px; gap: 7px; }
  .auth-card { padding: 23px 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
