:root {
  --green: #00ae66;
  --green-dark: #009157;
  --green-light: #e6f7ef;
  --orange: #ff6a00;
  --text: #222;
  --text-2: #666;
  --text-3: #999;
  --line: #eee;
  --bg: #f5f6f7;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --maxw: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航 ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; height: 64px; gap: 22px; }
.logo { font-size: 22px; font-weight: 800; color: var(--green); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.city { color: var(--text-2); cursor: pointer; white-space: nowrap; }
.city b { color: var(--text); }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a { padding: 8px 14px; border-radius: 6px; color: var(--text); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--green); background: var(--green-light); }
.nav a.admin-link { margin-left: auto; color: var(--text-3); font-size: 13px; }
.search-mini { width: 220px; }
.search-mini input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 16px; outline: none; }
.search-mini input:focus { border-color: var(--green); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, #00ae66 0%, #00c878 100%); color: #fff; padding: 38px 0 30px; }
.hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.hero p { opacity: .9; margin-bottom: 22px; }
.hero-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.hero-tabs button { background: rgba(255,255,255,.18); border: none; color: #fff; padding: 8px 18px; border-radius: 20px; cursor: pointer; font-size: 15px; }
.hero-tabs button.active { background: #fff; color: var(--green); font-weight: 700; }
.hero-search { display: flex; background: #fff; border-radius: 28px; overflow: hidden; max-width: 720px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.hero-search input { flex: 1; border: none; outline: none; padding: 0 22px; height: 52px; font-size: 15px; }
.hero-search button { background: var(--green); color: #fff; border: none; padding: 0 34px; font-size: 16px; font-weight: 700; cursor: pointer; }
.hero-search button:hover { background: var(--green-dark); }

/* ---------- 板块入口 ---------- */
.section { padding: 36px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head .more { color: var(--text-3); font-size: 13px; }
.entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.entry { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; cursor: pointer; }
.entry:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.entry .thumb { height: 120px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 800; }
.entry .meta { padding: 12px 14px; }
.entry .meta b { font-size: 16px; }
.entry .meta span { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* ---------- 房源卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.card .cover { position: relative; height: 180px; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover .tag-top { position: absolute; left: 8px; top: 8px; background: var(--orange); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.card .cover .tag-status { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.card .body { padding: 12px 14px; }
.card .body .title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .body .info { color: var(--text-2); font-size: 12px; margin: 6px 0; }
.card .body .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; min-height: 20px; }
.card .body .tags em { font-style: normal; background: var(--green-light); color: var(--green-dark); font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.card .body .price { color: var(--orange); font-weight: 800; font-size: 17px; }
.card .body .price small { font-size: 12px; font-weight: 400; }

/* ---------- 经纪人 ---------- */
.agent-card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: center; }
.agent-card .ava { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; }
.agent-card .name { font-weight: 700; font-size: 16px; }
.agent-card .store { color: var(--text-3); font-size: 12px; }
.agent-card .stat { display: flex; justify-content: center; gap: 18px; margin-top: 10px; color: var(--text-2); font-size: 12px; }
.agent-card .stat b { color: var(--green); font-size: 16px; display: block; }

/* ---------- 全民经纪人 ---------- */
.crowd { background: linear-gradient(120deg, #fff7ed, #e6f7ef); border-radius: 14px; padding: 28px; display: flex; align-items: center; gap: 30px; }
.crowd .txt h3 { font-size: 22px; margin-bottom: 8px; }
.crowd .txt p { color: var(--text-2); max-width: 560px; }
.crowd .txt .btn { margin-top: 14px; }
.btn { display: inline-block; background: var(--green); color: #fff; border: none; padding: 10px 24px; border-radius: 22px; cursor: pointer; font-size: 14px; font-weight: 700; }
.btn:hover { background: var(--green-dark); }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.orange { background: var(--orange); }
.btn.orange:hover { background: #e65f00; }
.btn.purple { background: #7b54d6; }
.btn.purple:hover { background: #663fb8; }
.btn.sm { padding: 6px 14px; font-size: 13px; }

/* ---------- 列表页 ---------- */
.layout { display: flex; gap: 20px; align-items: flex-start; }
.filters { width: 250px; flex: none; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: sticky; top: 80px; }
.filters h4 { font-size: 14px; margin: 14px 0 8px; color: var(--text-2); }
.filters h4:first-child { margin-top: 0; }
.filters .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .opts button { border: 1px solid var(--line); background: #fff; color: var(--text-2); padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.filters .opts button.active { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }
.filters input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; margin-top: 4px; }
.filters .row2 { display: flex; gap: 8px; }
.list-main { flex: 1; min-width: 0; }
.list-bar { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: var(--radius); padding: 10px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.list-bar .sort button { border: none; background: none; color: var(--text-2); cursor: pointer; padding: 4px 10px; font-size: 13px; }
.list-bar .sort button.active { color: var(--green); font-weight: 700; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 22px 0; }
.pager button { border: 1px solid var(--line); background: #fff; min-width: 36px; height: 36px; border-radius: 6px; cursor: pointer; }
.pager button.active { background: var(--green); color: #fff; border-color: var(--green); }
.pager button:disabled { color: #ccc; cursor: not-allowed; }

/* ---------- 详情页 ---------- */
.detail-wrap { display: flex; gap: 20px; align-items: flex-start; }
.gallery { flex: 1; min-width: 0; }
.gallery .main-img { width: 100%; height: 380px; border-radius: var(--radius); object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img { width: 86px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.thumbs img.active { border-color: var(--green); }
.detail-side { width: 320px; flex: none; }
.panel { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.detail-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.detail-price { color: var(--orange); font-size: 30px; font-weight: 800; }
.detail-price small { font-size: 15px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 16px 0; }
.kv div span { color: var(--text-3); display: block; font-size: 12px; }
.kv div b { font-size: 15px; }
.desc { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-top: 16px; }
.agent-box { display: flex; align-items: center; gap: 12px; }
.agent-box .ava { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.form input, .form textarea, .form select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; margin-bottom: 10px; outline: none; font-family: inherit; }
.form input:focus, .form textarea:focus { border-color: var(--green); }
.map-box { height: 240px; border-radius: var(--radius); background: #e8eef0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><path d="M20 2C12 2 6 8 6 16c0 10 14 22 14 22s14-12 14-22C34 8 28 2 20 2z" fill="%2300ae66" opacity=".25"/></svg>') center/60px no-repeat; display: flex; align-items: center; justify-content: center; color: var(--text-3); }

/* ---------- 页脚 ---------- */
.footer { background: #2b2f33; color: #b9bdc2; padding: 30px 0; margin-top: 40px; font-size: 13px; }
.footer a { color: #b9bdc2; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.footer .copy { border-top: 1px solid #3a3f44; padding-top: 14px; color: #7c8186; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 440px; max-width: 92vw; max-height: 88vh; overflow: auto; padding: 22px; }
.modal h3 { margin-bottom: 14px; }
.modal .close { float: right; cursor: pointer; color: #999; font-size: 20px; }
.toast { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 12px 22px; border-radius: 8px; z-index: 200; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; }

.empty { text-align: center; color: var(--text-3); padding: 50px 0; }
@media (max-width: 980px) {
  .entries, .cards { grid-template-columns: repeat(2, 1fr); }
  .layout, .detail-wrap { flex-direction: column; }
  .filters, .detail-side { width: 100%; position: static; }
  .nav { display: none; }
}
