:root {
  --navy: #0e3768;
  --navy-2: #174d87;
  --blue: #1d64b3;
  --orange: #f07822;
  --orange-soft: #fff3e8;
  --ink: #152b45;
  --muted: #6d7f94;
  --line: #dfe6ee;
  --bg: #f4f7fa;
  --panel: #fff;
  --green: #1c9c75;
  --purple: #6956b8;
  --shadow: 0 8px 24px rgba(15, 45, 78, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
a { color: inherit; text-decoration: none; }

.global-header { height: 64px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-inner { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.brand-mark.small { width: 24px; height: 24px; font-size: 9px; }
.brand-word { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.brand-word b { color: #ffb15f; }
.main-nav { height: 100%; display: flex; align-items: center; gap: 28px; color: #b9c9dc; font-size: 14px; }
.main-nav a { height: 100%; display: flex; align-items: center; border-bottom: 3px solid transparent; }
.main-nav a.active { color: #fff; border-color: #ff9a46; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.link-button, .outline-button, .premium-button { border: 0; background: transparent; color: inherit; padding: 8px 12px; font-weight: 700; }
.outline-button { border: 1px solid currentColor; color: #d9e7f6; }
.premium-button { background: var(--orange); color: #fff; border-radius: 4px; padding: 10px 15px; }
.premium-button:hover { background: #d96516; }
.premium-button.wide { width: 100%; justify-content: center; display: flex; gap: 8px; }
.user-greeting { color: #d9e7f6; font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-main { max-width: 1440px; margin: 0 auto; padding: 20px 28px 48px; }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: #8b9bad; font-size: 12px; margin-bottom: 16px; }
.breadcrumb i { font-style: normal; color: #b8c3cf; }
.breadcrumb strong { color: var(--ink); }
.portal-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-copy { padding: 34px 38px 30px; background: linear-gradient(110deg, #f9fcff 0%, #fff 70%); }
.portal-kicker, .section-kicker { font-size: 10px; font-weight: 850; letter-spacing: .13em; color: var(--blue); }
.portal-kicker { display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 0 3px rgba(28, 156, 117, .12); }
.hero-copy h1 { font-size: 42px; line-height: 1.15; letter-spacing: -.045em; margin: 14px 0 10px; }
.hero-copy p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.hero-search { height: 48px; display: flex; align-items: center; border: 1px solid #b9c8d9; background: #fff; max-width: 760px; }
.search-icon { font-size: 25px; color: #71869f; padding: 0 12px; }
.hero-search input { border: 0; outline: 0; min-width: 0; flex: 1; color: var(--ink); }
.hero-search button { height: 100%; border: 0; background: var(--orange); color: #fff; padding: 0 24px; font-weight: 800; }
.hero-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 13px; color: #8293a7; font-size: 12px; }
.hero-links button { border: 0; background: transparent; color: var(--blue); padding: 0; }
.hero-summary { background: var(--navy); color: #fff; padding: 24px 26px; display: flex; flex-direction: column; }
.summary-head { display: flex; justify-content: space-between; color: #b5c8dd; font-size: 12px; }
.summary-date { color: #7f9abb; }
.summary-number { font-size: 44px; font-weight: 850; letter-spacing: -.05em; margin-top: 22px; }
.summary-label { color: #b7c8dc; font-size: 12px; }
.summary-bars { display: grid; gap: 13px; margin-top: 26px; }
.summary-bars > div { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 8px; font-size: 11px; color: #c8d6e5; }
.summary-bars b { height: 6px; background: #f7a45e; display: block; }
.summary-bars em { font-style: normal; text-align: right; color: #fff; }
.summary-link { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 12px; color: #fff; }
.summary-link span { float: right; color: #ffad69; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 22px; }
.metric { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; display: flex; align-items: center; gap: 12px; min-height: 78px; }
.metric-icon { width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; font-weight: 850; font-size: 13px; }
.metric-icon.blue { background: #e9f2fd; color: var(--blue); }
.metric-icon.orange { background: var(--orange-soft); color: var(--orange); }
.metric-icon.green { background: #e8f7f1; color: var(--green); }
.metric-icon.purple { background: #efecfb; color: var(--purple); }
.metric div { display: grid; gap: 4px; min-width: 0; }
.metric strong { font-size: 20px; line-height: 1; }
.metric small { font-size: 11px; color: var(--muted); }
.metric em { font-size: 10px; font-style: normal; color: #9babbc; margin-left: auto; align-self: flex-start; }

.portal-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.filter-sidebar, .results-column, .insight-card { background: var(--panel); border: 1px solid var(--line); }
.filter-sidebar { padding: 18px 16px; }
.side-title, .results-head, .insight-head { display: flex; align-items: flex-start; justify-content: space-between; }
.side-title h2, .results-head h2 { font-size: 20px; margin: 6px 0 0; letter-spacing: -.03em; }
.reset-button { border: 0; background: transparent; color: var(--blue); font-size: 12px; padding: 4px 0; }
.filter-sidebar form { display: grid; gap: 13px; margin-top: 20px; }
.filter-sidebar label { display: grid; gap: 6px; color: #536c87; font-size: 12px; font-weight: 650; }
.filter-sidebar input, .filter-sidebar select { height: 36px; width: 100%; border: 1px solid var(--line); background: #fff; padding: 0 9px; color: var(--ink); outline: 0; }
.filter-sidebar input:focus, .filter-sidebar select:focus { border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-submit { border: 0; background: var(--blue); color: #fff; height: 38px; font-weight: 800; }
.filter-submit:hover { background: #155393; }
.saved-search { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.saved-search > div { display: flex; gap: 8px; align-items: center; }
.save-icon { font-size: 22px; color: var(--orange); }
.saved-search strong, .saved-search small { display: block; }
.saved-search strong { font-size: 12px; }
.saved-search small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.saved-search button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; color: var(--blue); }
.source-note { display: flex; gap: 9px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.source-check { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #e8f7f1; color: var(--green); font-size: 11px; }
.source-note p { font-size: 10px; line-height: 1.5; margin: 0; }
.source-note strong { color: var(--ink); }

.results-column { padding: 20px; }
.results-head { align-items: end; }
.results-head h2 { font-size: 24px; }
.result-tools { display: flex; align-items: center; gap: 8px; }
.result-tools > span { color: var(--muted); font-size: 12px; }
.result-tools select { border: 1px solid var(--line); height: 32px; background: #fff; color: var(--ink); font-size: 12px; padding: 0 8px; }
.view-toggle { display: flex; border: 1px solid var(--line); }
.view-toggle button { border: 0; background: #fff; width: 30px; height: 30px; color: #8da0b4; }
.view-toggle button.selected { background: #edf4fc; color: var(--blue); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; min-height: 28px; margin: 16px 0 4px; }
.filter-chip { border: 0; background: #eef5fc; color: var(--blue); padding: 5px 8px; font-size: 11px; }
.listing-list { display: grid; gap: 9px; }
.listing-list.grid-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.listing-list.grid-mode .property-card { grid-template-columns: 1fr; gap: 9px; }
.listing-list.grid-mode .property-meta, .listing-list.grid-mode .property-status, .listing-list.grid-mode .property-price { text-align: left; }
.listing-list.grid-mode .property-status, .listing-list.grid-mode .property-price { grid-row: auto; grid-column: auto; }
.property-card { display: grid; grid-template-columns: minmax(0, 1fr) 126px 130px 108px; align-items: center; gap: 14px; padding: 15px 14px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s; cursor: pointer; }
.property-card:hover, .property-card:focus { border-color: #9ab9da; box-shadow: 0 4px 14px rgba(17, 74, 128, .1); outline: 0; }
.property-main { min-width: 0; }
.property-ref { color: #8c9cad; font-size: 10px; letter-spacing: .08em; }
.property-source-link { color: var(--blue); text-decoration: underline; text-decoration-color: #b9cee4; text-underline-offset: 2px; }
.property-source-link:hover { color: var(--orange); }
.property-name { font-weight: 800; font-size: 15px; line-height: 1.25; margin: 5px 0; }
.property-address { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-meta span { display: block; color: #93a2b3; font-size: 10px; margin-bottom: 4px; }
.property-meta strong { font-size: 12px; }
.property-price { font-size: 17px; font-weight: 850; color: var(--orange); text-align: right; }
.property-price small { display: block; color: #97a5b4; font-size: 10px; font-weight: 500; margin-top: 3px; }
.property-status { text-align: right; }
.status-tag { display: inline-block; padding: 5px 7px; font-size: 10px; background: #eaf5ef; color: var(--green); }
.status-tag.warn { background: #fff4e8; color: #c76719; }
.empty { border: 1px dashed var(--line); padding: 42px 20px; text-align: center; color: var(--muted); }
.error-state, .form-message[data-kind="error"] { color: #c23a2a; }
.form-message[data-kind="success"] { color: var(--green); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; }
.pagination button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; color: var(--blue); }
.pagination button:disabled { color: #b4beca; }
.pagination span { font-size: 12px; color: var(--muted); }

.insight-sidebar { display: grid; gap: 12px; }
.insight-card { padding: 18px; }
.insight-card h3 { font-size: 17px; margin: 5px 0 0; letter-spacing: -.03em; }
.live-chip { font-size: 9px; color: var(--green); background: #e8f7f1; padding: 4px 7px; font-weight: 850; }
.pulse-map { height: 165px; margin: 16px 0 12px; background: #eef4f9; position: relative; overflow: hidden; border: 1px solid #d7e3ef; }
.map-outline { position: absolute; inset: 20px 36px; border: 2px solid #b7cde2; border-radius: 48% 52% 42% 58% / 55% 42% 58% 45%; transform: rotate(-12deg); }
.map-dot { position: absolute; z-index: 2; background: var(--blue); color: #fff; border-radius: 50%; font-size: 8px; font-weight: 850; width: 25px; height: 25px; display: grid; place-items: center; box-shadow: 0 0 0 5px rgba(29, 100, 179, .12); }
.dot-one { left: 48%; top: 34%; }
.dot-two { left: 55%; top: 52%; background: var(--orange); }
.dot-three { left: 68%; top: 75%; background: var(--green); }
.dot-four { left: 27%; top: 30%; background: var(--purple); }
.area-list { display: grid; gap: 8px; }
.area-list div { display: flex; justify-content: space-between; font-size: 12px; }
.area-list span { color: var(--muted); }
.area-list strong { font-size: 13px; }
.member-card { background: #f0f5fb; }
.member-card p { font-size: 11px; color: var(--muted); line-height: 1.55; }
.member-card ul { padding: 0; margin: 14px 0; display: grid; gap: 8px; list-style: none; font-size: 11px; }
.member-card li span { color: var(--green); font-weight: 900; margin-right: 6px; }
.method-mini { display: grid; gap: 12px; }
.status-line { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 7px; font-size: 11px; }
.status-line small { color: var(--muted); text-align: right; }
.method-mini > a { font-size: 11px; color: var(--blue); }

.method-section { display: grid; grid-template-columns: 1fr 1.45fr; gap: 70px; margin-top: 20px; padding: 44px 34px; background: var(--navy); color: #fff; }
.method-heading h2 { font-size: 32px; line-height: 1.2; margin: 10px 0 14px; letter-spacing: -.045em; }
.method-heading h2 em { font-style: normal; color: #ffb274; }
.method-heading p { font-size: 12px; color: #b7c9dd; line-height: 1.7; max-width: 390px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.method-grid article { border-top: 1px solid #547292; padding-top: 14px; }
.method-grid article > span { font-size: 11px; color: #ffb274; font-weight: 850; }
.method-grid h3 { margin: 26px 0 8px; font-size: 16px; }
.method-grid p { font-size: 11px; color: #b7c9dd; line-height: 1.6; }
.portal-footer { max-width: 1440px; margin: 0 auto; padding: 20px 28px 30px; display: flex; justify-content: space-between; color: #8493a5; font-size: 11px; }
.portal-footer > div { display: flex; align-items: center; gap: 9px; }
.portal-footer > div:last-child { gap: 18px; }

.modal-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(8, 31, 57, .55); display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; width: min(470px, 100%); padding: 28px; position: relative; box-shadow: 0 18px 50px rgba(3, 20, 39, .25); }
.modal-close { position: absolute; top: 10px; right: 13px; border: 0; background: transparent; color: #8192a5; font-size: 24px; line-height: 1; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.auth-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; }
.auth-tabs button { border: 0; background: transparent; color: #8a9aad; padding: 0 0 10px; font-weight: 750; }
.auth-tabs button.active { color: var(--blue); border-bottom: 2px solid var(--blue); }
.modal h2 { font-size: 24px; letter-spacing: -.04em; margin: 0 0 8px; }
.modal > p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.modal form { display: grid; gap: 13px; margin-top: 18px; }
.modal label { display: grid; gap: 6px; color: #536c87; font-size: 12px; font-weight: 650; }
.modal input { height: 40px; border: 1px solid var(--line); padding: 0 10px; outline: 0; }
.modal input:focus { border-color: var(--blue); }
.form-message { display: block; color: var(--orange); font-size: 11px; margin-top: 12px; line-height: 1.5; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.plan-grid article { border: 1px solid var(--line); padding: 17px; }
.plan-grid article.featured { border: 2px solid var(--orange); padding: 16px; background: #fffaf6; }
.plan-grid small { font-size: 10px; letter-spacing: .12em; color: #8ea0b4; font-weight: 850; }
.plan-grid h3 { font-size: 17px; margin: 10px 0; }
.plan-grid strong { font-size: 25px; }
.plan-grid strong span { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-grid p { min-height: 48px; font-size: 11px; line-height: 1.5; margin: 11px 0; color: var(--muted); }
.plan-grid .outline-button { border: 1px solid var(--line); color: var(--blue); width: 100%; }

@media (max-width: 1100px) {
  .portal-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .insight-sidebar { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .pulse-map { height: 130px; }
  .method-section { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 780px) {
  .header-inner { padding: 0 16px; gap: 18px; }
  .main-nav { gap: 14px; font-size: 12px; }
  .header-actions .link-button { display: none; }
  .premium-button { padding: 9px 10px; font-size: 12px; }
  .portal-main { padding: 14px 14px 34px; }
  .portal-hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 26px 22px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-summary { min-height: 245px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-layout { grid-template-columns: 1fr; }
  .filter-sidebar { order: 0; }
  .results-column { order: 1; }
  .insight-sidebar { order: 2; grid-column: auto; grid-template-columns: 1fr; }
  .filter-sidebar form { grid-template-columns: 1fr 1fr; }
  .filter-sidebar form > label:first-child, .filter-submit { grid-column: 1 / -1; }
  .saved-search, .source-note { display: none; }
  .property-card { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
  .property-meta { display: none; }
  .property-status { grid-column: 2; grid-row: 1; text-align: right; }
  .property-price { grid-column: 2; grid-row: 2; }
  .listing-list.grid-mode { grid-template-columns: 1fr; }
  .method-section { grid-template-columns: 1fr; padding: 30px 22px; gap: 28px; }
  .method-grid { gap: 12px; }
  .portal-footer { padding: 18px 14px; display: grid; gap: 12px; }
  .portal-footer > div:last-child { gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 500px) {
  .brand-word { font-size: 15px; }
  .main-nav { display: none; }
  .header-actions { gap: 4px; }
  .outline-button { padding: 7px 8px; }
  .hero-search button { padding: 0 13px; font-size: 12px; }
  .hero-links { gap: 10px; }
  .metric { padding: 13px 12px; }
  .metric strong { font-size: 17px; }
  .metric em { display: none; }
  .results-column { padding: 15px 11px; }
  .results-head { display: grid; gap: 12px; }
  .result-tools { justify-content: space-between; }
  .result-tools select { max-width: 168px; }
  .filter-sidebar form { grid-template-columns: 1fr; }
  .filter-sidebar form > label:first-child, .filter-submit { grid-column: auto; }
  .property-card { padding: 13px 11px; }
  .property-name { font-size: 13px; }
  .property-address { font-size: 10px; }
  .property-price { font-size: 15px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid h3 { margin: 12px 0 6px; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-grid p { min-height: 0; }
}
