:root {
  color-scheme: light;
  --ink: #1b2930;
  --muted: #5d6e79;
  --line: #e2eaee;
  --bg: #f5f8fa;
  --surface: #fff;
  --soft: #f0f4f6;
  --accent: #087e9b;
  --accent-hover: #076c85;
  --accent-soft: #e5f4f8;
  --focus: #4c89a9;
  --success: #237461;
  --radius: 24px;
  --control: 13px;
  --shadow: 0 5px 24px #213e4d06;
  color: var(--ink);
  background: var(--bg);
  font: 400 15px/1.5 "DM Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Manrope, "DM Sans", sans-serif; }
h1 { font-size: clamp(32px, 4vw, 45px); line-height: 1.13; letter-spacing: -.052em; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.035em; font-weight: 800; }
h3 { font-size: 16px; line-height: 1.35; letter-spacing: -.018em; }
a { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 6; top: 12px; left: 12px; background: white; padding: 10px 16px; border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent-hover); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.badge { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--soft); color: #526573; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.blue { color: #08637c; background: var(--accent-soft); }
.badge.green { color: #236751; background: #e8f5ed; }
.badge.amber { color: #795820; background: #f9f1df; }
.badge.red { color: #943934; background: #fcece9; }
.badge .icon { width: 13px; height: 13px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: white; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled), .icon-btn:hover, .profile summary:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.soft { background: var(--accent-soft); color: #07647d; border-color: transparent; }
.btn.small { min-height: 35px; padding: 5px 12px; font-size: 12px; }
.btn.small .icon { width: 15px; height: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--accent-hover); font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 15px; height: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: white; }
.card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.app-shell { max-width: 1536px; padding: 25px clamp(22px, 4.1vw, 64px) 0; margin-inline: auto; }
.topbar { position: relative; min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.workspace-brands { display: flex; align-items: center; gap: 15px; flex: none; }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand img { width: 145px; height: auto; filter: brightness(0); display: block; }
.brand-product { display: grid; gap: 2px; border-left: 1px solid #d6e1e6; margin-left: 9px; padding-left: 9px; white-space: nowrap; }
.brand-name { color: #526778; font: 700 14px/1.15 Manrope, sans-serif; }
.brand-description { color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.2; }
.organization-logo { display: block; width: 157px; height: auto; padding: 6px 8px; border-radius: 8px; background: #001f49; }
.workspace-account { position: relative; flex: none; }
.workspace-account .organization-logo { position: absolute; top: calc(100% + 6px); right: 0; }
.nav { display: flex; gap: 3px; align-items: center; padding: 5px; min-width: 0; max-width: 100%; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: thin; }
.nav a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; min-height: 38px; padding: 7px 12px; border-radius: 13px; text-decoration: none; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 700; }
.nav a .icon { width: 16px; height: 16px; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { color: white; background: var(--accent); }
.nav a:focus-visible { outline-offset: -2px; }
.profile { position: relative; flex: none; }
.profile summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; padding: 5px 9px 5px 5px; background: white; border: 1px solid var(--line); border-radius: 999px; }
.profile summary::-webkit-details-marker { display: none; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 50%; background: #e0f1f7; color: #17637c; font-size: 11px; font-weight: 800; }
.profile-name { display: flex; flex-direction: column; max-width: 126px; }
.profile-name strong { font-size: 12px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.profile-name small { font-size: 10px; color: var(--muted); }
.profile summary .icon { width: 14px; height: 14px; color: var(--muted); }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 3; width: max-content; max-width: min(320px, 85vw); padding: 12px; border-radius: 15px; box-shadow: 0 18px 45px #2039451f; }
.profile-menu p { margin: 0 6px 10px; font-size: 13px; overflow-wrap: anywhere; }

.page { min-height: calc(100vh - 164px); }
.page-heading { margin: 43px 0 25px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading .muted { margin-top: 10px; max-width: 650px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.accent-period { color: var(--accent); }
.footer { margin-top: 30px; padding: 17px 0 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.footer .footer-brand { display: flex; align-items: center; gap: 8px; }
.footer img { width: 17px; height: auto; opacity: .7; filter: brightness(.45); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: grid; padding: 19px 20px 17px; gap: 9px; color: var(--ink); text-decoration: none; }
a.stat:hover { border-color: #b7d7e2; box-shadow: 0 8px 28px #1a6d840c; }
.stat-head { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-icon, .tile-icon { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 11px; color: var(--accent-hover); background: var(--accent-soft); }
.stat-icon .icon { width: 17px; height: 17px; }
.stat strong { color: var(--ink); font: 800 35px/1.06 Manrope, sans-serif; letter-spacing: -.06em; }
.stat small { color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 16px; margin-top: 17px; }
.dashboard-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.panel { padding: 20px 22px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-head p { margin-top: 4px; font-size: 13px; }
.panel-head .text-link { margin-top: 3px; white-space: nowrap; }
.dashboard-list { display: grid; }
.dashboard-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 0; border-bottom: 1px solid #ecf0f2; }
.dashboard-row:last-child { border: 0; padding-bottom: 2px; }
.dashboard-row .tile-icon { width: 35px; height: 35px; background: var(--soft); color: #4f6977; }
.dashboard-row .row-title { display: grid; gap: 2px; flex: 1; min-width: 0; }
.row-title strong { font-size: 14px; overflow-wrap: anywhere; }
.row-title small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.dashboard-row > small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.suburb-bars { display: grid; gap: 14px; padding-top: 5px; }
.suburb-bar { display: grid; gap: 5px; font-size: 13px; }
.suburb-bar span { display: flex; justify-content: space-between; gap: 8px; }
.suburb-bar strong { color: #315366; font-size: 12px; }
progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden; background: #edf3f5; color: #68a9be; }
progress::-webkit-progress-bar { background: #edf3f5; }
progress::-webkit-progress-value { background: #68a9be; border-radius: 999px; }
progress::-moz-progress-bar { background: #68a9be; border-radius: 999px; }
.callout { background: #e5f4f8; border-color: #d7ebf2; padding: 20px 22px; }
.callout .tile-icon { background: #fff; margin-bottom: 12px; }
.callout p { color: #426677; margin: 6px 0 14px; font-size: 13px; }
.local-label { display: inline-flex; align-items: center; gap: 6px; }
.local-label::before { content: ""; width: 7px; height: 7px; background: #83a8ba; border-radius: 50%; }

.tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; gap: 4px; border-radius: 16px; background: #eaf0f3; padding: 4px; margin: 0 0 17px; }
.tabs button { min-height: 38px; flex: none; border-radius: 12px; padding: 6px 14px; color: var(--muted); border: 0; background: transparent; font-weight: 700; font-size: 13px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: #086781; background: white; box-shadow: 0 2px 10px #2039450d; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; color: #384d5a; font-size: 13px; font-weight: 700; }
.field :is(input,select,textarea) { min-height: 44px; border: 1px solid #d9e4ea; border-radius: var(--control); background: #fbfdfe; padding: 9px 11px; color: var(--ink); width: 100%; font-size: 14px; font-weight: 400; }
.field textarea { min-height: 100px; resize: vertical; }
.field :is(input,select,textarea):focus { border-color: #6da6bb; }
.field small { color: var(--muted); font-weight: 400; }
.form-stack { display: grid; gap: 14px; }
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-error { border-radius: 12px; padding: 10px 13px; margin: 12px 0 0; background: #fff0ee; border: 1px solid #f4d9d4; color: #873836; font-size: 13px; overflow-wrap: anywhere; }
.form-error ul { margin: 7px 0 0; padding-left: 18px; }
.filter-card { padding: 20px; }
.filter-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.filter-head .icon { color: var(--accent-hover); }
.filters { display: grid; grid-template-columns: minmax(145px,1.2fr) minmax(120px,1.08fr) repeat(3,minmax(92px,.68fr)) repeat(2,minmax(108px,1fr)); gap: 10px; }
.suburb-field { position: relative; align-self: start; }
.suburb-suggestions { position: absolute; z-index: 5; inset-inline-start: 0; top: calc(100% + 5px); width: 100%; min-width: min(215px, calc(100vw - 56px)); max-height: min(235px, 45vh); overflow-y: auto; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--control); background: #fff; box-shadow: 0 10px 28px #1b415124; list-style: none; }
.suburb-suggestions li { padding: 7px 9px; border-radius: 7px; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.suburb-suggestions li:is(:hover,[aria-selected="true"]) { background: var(--accent-soft); color: var(--accent); }
.filter-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 10px 14px; margin-top: 15px; }
.suburb-attribution { margin-right: auto; color: var(--muted); font-size: 12px; }
.results-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 23px 0 12px; }
.results-head .muted { font-size: 13px; }
.lead-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.lead-card { padding: 17px 18px; display: grid; gap: 10px; align-content: start; }
.lead-flags, .lead-price, .lead-ctas { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.lead-card h3 { font-size: 19px; overflow-wrap: anywhere; }
.lead-location { margin-top: 2px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.lead-location .icon { width: 14px; height: 14px; }
.lead-price { min-height: 27px; color: #244b60; font: 800 20px Manrope,sans-serif; letter-spacing: -.04em; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; }
.specs span { display: flex; align-items: center; gap: 5px; }
.specs .icon { width: 16px; height: 16px; }
.lead-ctas { flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 3px; }
.lead-owner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lead-owner .avatar { width: 28px; height: 28px; font-size: 9px; }
.lead-owner strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.lead-owner small { display: block; color: var(--muted); font-size: 10px; }
.empty-state { display: grid; place-items: center; text-align: center; gap: 7px; padding: 35px 16px; }
.empty-state .tile-icon { margin-bottom: 3px; }
.empty-state p { color: var(--muted); max-width: 435px; font-size: 13px; }
.panel .empty-state { padding: 22px 10px; }
.pager { display: flex; align-items: center; justify-content: end; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }

.table-card { padding: 8px 18px 16px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e9eff2; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
td { color: #354b58; font-size: 13px; }
td strong { color: var(--ink); }
td small { display: block; font-size: 12px; color: var(--muted); }
.grid-tools { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); gap: 15px; align-items: start; }
.team-list { display: grid; gap: 0; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 7px; }
.list-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.list-text + .text-link { margin-top: 10px; }
.notice { padding: 12px 15px; margin-bottom: 13px; border-radius: 12px; background: #edf5f8; color: #375d6e; font-size: 13px; }
.upload { display: grid; justify-items: center; text-align: center; gap: 7px; padding: 22px 14px; border: 1px dashed #91bdcd; border-radius: 17px; background: #f4fbfd; font-size: 13px; }
.upload .tile-icon { margin-bottom: 2px; }
.upload strong { overflow-wrap: anywhere; max-width: 100%; }
.upload input { width: min(100%, 345px); padding: 5px; font: 13px "DM Sans", sans-serif; }
.upload input::file-selector-button { border-radius: 999px; border: 1px solid #c7dce5; background: white; color: #224d61; padding: 7px 11px; margin-right: 7px; cursor: pointer; }
.upload-preview { margin-top: 14px; }

.session-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(100%, 435px); padding: clamp(22px, 5vw, 34px); box-shadow: 0 14px 45px #17364a0b; }
.auth-card .workspace-brands { flex-wrap: wrap; gap: 10px 14px; margin-bottom: 28px; }
.auth-card .brand img { width: 125px; }
.auth-card .organization-logo { width: 130px; }
.auth-card h1 { font-size: 31px; margin: 5px 0 8px; }
.auth-card .muted { margin-bottom: 19px; }
.auth-card form { display: grid; gap: 13px; }
.auth-card form .btn { width: 100%; margin-top: 3px; }
.auth-card .preview-access { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.preview-access summary { color: var(--accent-hover); cursor: pointer; font-size: 13px; font-weight: 700; }
.preview-access .demo-list { display: grid; gap: 6px; padding-top: 8px; }
.demo-list button { justify-content: space-between; white-space: normal; text-align: left; }
.demo-list small { color: var(--muted); }

dialog { width: min(550px, calc(100% - 26px)); max-height: 90vh; overflow: auto; padding: 23px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 25px; box-shadow: 0 24px 80px #20394526; }
dialog::backdrop { background: #243b4b54; backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 17px; }
.modal-head h2 { font-size: 24px; }
.modal-head p { font-size: 13px; margin-top: 5px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: end; margin-top: 16px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 14px 0; }
.detail-grid div { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-grid strong { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.detail-wide { grid-column: 1 / -1; }
#toasts { position: fixed; z-index: 5; bottom: 19px; right: 19px; max-width: min(430px, calc(100% - 38px)); pointer-events: none; }
.toast { background: #214b5f; color: white; padding: 12px 16px; border-radius: 13px; box-shadow: 0 12px 30px #2647592c; font-size: 14px; }

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .nav { order: 3; width: max-content; }
  .filters { grid-template-columns: repeat(4,minmax(100px,1fr)); }
}
@media (max-width: 900px) {
  .page { padding-top: 16px; }
  .workspace-account { position: static; }
  .workspace-account .organization-logo { width: 130px; padding: 5px 6px; }
}
@media (max-width: 770px) {
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .dashboard-grid, .grid-tools { grid-template-columns: 1fr; }
  .lead-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .filters .field:first-child { grid-column: span 2; }
  .page-heading { margin: 29px 0 20px; align-items: start; flex-direction: column; gap: 12px; }
  .app-shell { padding-top: 14px; }
}
@media (max-width: 500px) {
  .app-shell { padding-inline: 13px; }
  .nav { width: 100%; }
  .nav a { padding-inline: 9px; }
  .brand img { width: 120px; }
  .profile-name { display: none; }
  .lead-grid, .form-two { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel, .filter-card { padding: 15px; }
  .stat { padding: 13px 11px; gap: 7px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-head { gap: 6px; font-size: 12px; }
  .stat strong { font-size: 29px; }
  .panel-head { flex-wrap: wrap; gap: 3px 10px; }
  .footer { font-size: 10px; }
}
.notice .icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.page:focus, .session-shell:focus { outline: none; }
.shortlist-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 3px 0 13px; }
.shortlist-controls p { font-size: 13px; }
.lead-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.lead-card.shortlisted { border-color: #9acbd6; }
.entry-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.entry-fields legend { margin-bottom: 8px; font-weight: 700; }
.entry-fields > p { margin: 0 0 10px; }
.import-mapping-table { max-height: 345px; overflow-y: auto; }
.import-mapping-table td:first-child { width: 46%; overflow-wrap: anywhere; }
.import-mapping-table select { width: 100%; min-height: 35px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfe; color: var(--ink); }
