/* 土地帮 · 全站公共样式（清爽浅色 / 土地绿主题 / 移动端优先） */
:root {
  --bg: #f5f7f4;
  --bg-deep: #eef1eb;
  --surface: #ffffff;
  --surface-2: #f7f9f5;
  --surface-3: #eef2ea;
  --border: #e6ebe1;
  --border-strong: #d5ddcd;
  --text: #1e2a20;
  --text-2: #5a685c;
  --text-dim: #98a397;
  --accent: #2f8f5b;
  --accent-2: #3aa86d;
  --accent-soft: #e8f5ed;
  --accent-deep: #227046;
  --amber: #e89a2a;
  --amber-soft: #fff4e0;
  --blue: #3a7bd5;
  --blue-soft: #e8f1fc;
  --red: #e05252;
  --red-soft: #fdecec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 18px rgba(40, 80, 50, .06);
  --shadow-lg: 0 14px 40px rgba(40, 80, 50, .14);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep); color: var(--text); line-height: 1.5; min-height: 100vh; font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }

/* ===== 手机框架 ===== */
.phone {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  position: relative; padding-bottom: calc(70px + env(safe-area-inset-bottom));
  box-shadow: 0 0 60px rgba(30, 60, 40, .08);
}
@media (min-width: 520px) { .phone { border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.topbar-inner { padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #7bc47f); color: #fff; font-size: 19px;
}
.brand small { display: block; font-size: 10px; color: var(--text-dim); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 16px; transition: .15s; position: relative;
}
.icon-btn:hover { border-color: var(--accent); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ===== 搜索 ===== */
.searchbar { padding: 10px 16px; background: var(--surface); }
.search-inner { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; }
.search-inner input { flex: 1; border: none; background: none; outline: none; font-size: 13px; }
.search-inner .s-ic { font-size: 15px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(47,143,91,.25); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn-amber:hover { opacity: .9; color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { opacity: .9; color: #fff; }
.btn-danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 3px 9px; font-size: 11px; line-height: 1.4; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== 分类条 ===== */
/* ===== 区域筛选条 ===== */
.region-drop { flex: none; display: flex; align-items: center; gap: 3px; border: none; background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; font-weight: 700; padding: 6px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; max-width: 96px; }
.region-drop em { font-style: normal; font-size: 10px; color: var(--accent); }
.region-drop span { overflow: hidden; text-overflow: ellipsis; }
.brand #brandRegion { color: var(--accent); font-weight: 800; margin-left: 2px; }
.region-picker { display: flex; gap: 8px; margin-top: 12px; }
.region-col { flex: 1; min-width: 0; }
.region-col .rc-title { font-size: 11px; color: var(--text-dim); font-weight: 700; margin-bottom: 7px; }
.region-col .rc-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.region-opt { padding: 9px 11px; font-size: 13px; border-bottom: 1px solid var(--border); cursor: pointer; transition: .12s; }
.region-opt:last-child { border-bottom: none; }
.region-opt:hover { background: var(--surface-2); }
.region-opt.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }

.cat-scroll { display: flex; gap: 9px; overflow-x: auto; padding: 13px 16px 4px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 62px; transition: .15s; }
.cat-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: var(--surface); border: 2px solid transparent; box-shadow: var(--shadow); transition: .15s;
}
.cat-item.active .cat-icon { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(47,143,91,.2); }
.cat-item .cat-name { font-size: 12px; color: var(--text-2); font-weight: 600; }
.cat-item.active .cat-name { color: var(--accent); }

/* ===== 筛选条 ===== */
.filterbar { display: flex; gap: 8px; padding: 12px 16px 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.filterbar::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); font-weight: 600; transition: .15s; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.filter-opts { display:flex;flex-wrap:wrap;gap:8px; }
.filter-opts .btn { min-width:80px;justify-content:center; }
.ad-banner { margin:10px 14px 0;padding:12px 14px;border-radius:12px;background:linear-gradient(135deg,var(--accent-soft),var(--surface-2));border:1px solid var(--accent);cursor:pointer;position:relative; }
.ad-banner .ad-tag { position:absolute;top:8px;right:10px;font-size:10px;color:var(--accent);font-weight:700; }
.ad-banner .ad-title { font-size:14px;font-weight:800;padding-right:60px;line-height:1.5; }
.ad-banner .ad-price { font-size:12px;color:var(--red);font-weight:700;margin-top:4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.section-title h2 { font-size: 16px; font-weight: 800; }
.section-title .more { font-size: 12px; color: var(--text-dim); }

/* ===== 两列图文地块卡片 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 4px 16px 16px; }
.land-card { background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: .18s; }
.land-card:active { transform: scale(.98); }
.land-cover { width: 100%; aspect-ratio: 3/4; position: relative; display: grid; place-items: center; font-size: 48px; color: #fff; overflow: hidden; }
.land-cover img { width: 100%; height: 100%; object-fit: cover; }
.land-cover .cover-emoji { filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.land-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(0,0,0,.42); backdrop-filter: blur(4px); color: #fff; font-size: 10px; font-weight: 600; }
.land-badge.hot { background: var(--red); }
.land-dist { position: absolute; bottom: 8px; right: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.92); color: var(--accent-deep); font-size: 10px; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.land-body { padding: 9px 11px 11px; }
.land-name { font-size: 13px; font-weight: 700; line-height: 1.22; height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.land-meta { margin-top: 4px; font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.land-price { margin-top: 6px; display: flex; align-items: baseline; gap: 3px; color: var(--red); line-height: 1.2; }
.land-price .num { font-size: 17px; font-weight: 800; }
.land-price .unit { font-size: 10px; color: var(--text-dim); }
.land-tags { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; line-height: 1.3; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); }
.tag.amber { background: var(--amber-soft); color: #a86c12; }

/* ===== 列表卡片（横向）===== */
.list-card { background: var(--surface); border-radius: 14px; padding: 12px; margin: 0 16px 11px; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; gap: 12px; }
.list-thumb { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 11px; display: grid; place-items: center; font-size: 42px; color: #fff; overflow: hidden; position: relative; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.list-sub { margin-top: 4px; font-size: 11px; color: var(--text-dim); }
.list-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80; max-width: 480px; margin: 0 auto;
  display: flex; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--text-dim); transition: .15s; position: relative; }
.tab .ti { font-size: 21px; line-height: 1.1; }
.tab .tl { font-size: 10px; font-weight: 600; }
.tab.active { color: var(--accent); }
.tab.active .ti { transform: translateY(-1px); }

/* ===== 表单 ===== */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 11px;
  background: var(--surface); outline: none; transition: .15s; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.hint { font-size: 11px; color: var(--text-dim); margin-top: 5px; }

/* ===== 弹层/模态 ===== */
.mask { position: fixed; inset: 0; z-index: 100; background: rgba(15,25,18,.45); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 480px; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto; animation: slideUp .22s ease; }
@keyframes slideUp { from { transform: translateY(30px); opacity: .5 } to { transform: translateY(0); opacity: 1 } }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.modal-center { align-items: center; }
.modal-center .modal { border-radius: 18px; max-width: 340px; }

/* ===== 空状态/加载 ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty .ei { font-size: 46px; margin-bottom: 12px; opacity: .7; }
.loading { text-align: center; padding: 40px; color: var(--text-dim); font-size: 13px; }

/* ===== 流程步骤 ===== */
.flow-steps { display: flex; flex-direction: column; gap: 0; }
.flow-step { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.flow-step:last-child::before { display: none; }
.flow-dot { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--surface-3); color: var(--text-dim); border: 2px solid var(--border); z-index: 1; }
.flow-step.done .flow-dot { background: var(--accent); color: #fff; border-color: var(--accent); }
.flow-step.active .flow-dot { background: var(--amber); color: #fff; border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.flow-info { flex: 1; padding-top: 3px; }
.flow-info .ft { font-size: 13px; font-weight: 700; }
.flow-step.pending .flow-info .ft { color: var(--text-dim); }
.flow-info .fd { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ===== 状态徽章 ===== */
.status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.status.pending { background: var(--amber-soft); color: #a86c12; }
.status.assigned, .status.review, .status.signing { background: var(--blue-soft); color: var(--blue); }
.status.viewing, .status.deposit, .status.survey { background: var(--accent-soft); color: var(--accent-deep); }
.status.completed, .status.signed, .status.done, .status.paid, .status.handover { background: var(--accent-soft); color: var(--accent-deep); }
.status.cancelled, .status.refunded, .status.rejected { background: var(--red-soft); color: var(--red); }
.status.draft { background: var(--surface-3); color: var(--text-dim); }

/* ===== 详情大图 ===== */
.detail-cover { width: 100%; aspect-ratio: 16/10; display: grid; place-items: center; font-size: 90px; color: #fff; position: relative; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-price-bar { background: var(--surface); padding: 16px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--border); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; margin: 0 16px; }
.info-cell { background: var(--surface); padding: 12px; }
.info-cell .k { font-size: 11px; color: var(--text-dim); }
.info-cell .v { font-size: 14px; font-weight: 700; margin-top: 3px; }
.sec { background: var(--surface); margin: 11px 16px; border-radius: 14px; padding: 15px; border: 1px solid var(--border); }
.sec h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

/* ===== 聊天 ===== */
.chat-page { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 20px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { padding: 10px 13px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg.mine .bubble { background: var(--accent); color: #fff; }
.msg .m-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 15px; }
.msg-time { text-align: center; font-size: 10px; color: var(--text-dim); }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); align-items: center; }
.chat-input-bar input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); outline: none; }
.chat-input-bar input:focus { border-color: var(--accent); }
.send-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; }

/* ===== Toast ===== */
#toast { position: fixed; z-index: 200; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(20,30,22,.88); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 80vw; text-align: center; }
#toast.show { opacity: 1; }

/* ===== 管理员/商家后台共用 ===== */
.admin-wrap { max-width: 1100px; margin: 0 auto; min-height: 100vh; padding-bottom: 30px; }
.admin-head { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); color: #fff; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-size: 20px; font-weight: 800; }
.admin-head .sub { font-size: 12px; opacity: .8; }
.admin-layout { display: flex; gap: 0; min-height: calc(100vh - 74px); }
.admin-side { width: 96px; flex: 0 0 96px; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; }
.admin-side .nav-group { font-size: 9px; color: var(--text-dim); font-weight: 700; padding: 10px 0 4px; letter-spacing: .5px; text-align: center; }
.admin-nav { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 10px; color: var(--text-2); font-size: 11px; font-weight: 600; margin-bottom: 2px; cursor: pointer; transition: .15s; white-space: nowrap; }
.admin-nav:hover { background: var(--surface-2); }
.admin-nav.active { background: var(--accent-soft); color: var(--accent-deep); }
.admin-nav .ni { font-size: 18px; }
.admin-main { flex: 1; padding: 14px 16px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h2 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.stat-card .sl { font-size: 12px; color: var(--text-dim); }
.stat-card .sv { font-size: 26px; font-weight: 800; margin-top: 6px; color: var(--accent-deep); }
.stat-card .si { font-size: 24px; float: right; opacity: .8; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table.compact td { white-space: nowrap; }
.data-table.compact .actions { flex-wrap: nowrap; }
.data-table.compact .btn { padding: 3px 9px; font-size: 11px; line-height: 1.4; }
.data-table.compact { font-size: 12px; }
.data-table.compact th { padding: 9px 6px; }
.data-table.compact td { padding: 8px 6px; }
.data-table .thumb-sm { width: 34px; height: 34px; flex: 0 0 34px; font-size: 17px; border-radius: 8px; overflow: hidden; }
.data-table .thumb-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell-ellip { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-cap { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tr:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.thumb-sm { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; font-size: 22px; color: #fff; flex: 0 0 44px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-btn { padding: 8px 15px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .admin-side { display: none; } .admin-main { padding: 14px; } .form-grid { grid-template-columns: 1fr; } }
.login-box { max-width: 380px; margin: 10vh auto; background: var(--surface); border-radius: 18px; padding: 30px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.login-box .logo { font-size: 40px; text-align: center; }
.login-box h1 { font-size: 20px; text-align: center; margin: 10px 0 4px; }
.login-box .sub { text-align: center; color: var(--text-dim); font-size: 12px; margin-bottom: 24px; }
