/* ============================================================
   H5 移动端布局
   结构：沉浸渐变头部 + 上浮卡片内容 + 底部 Tab + 悬浮按钮
   ============================================================ */
body { background: #e8ecf3; }
.app {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f4f6fa;
  position: relative; padding-bottom: calc(64px + env(safe-area-inset-bottom));
  box-shadow: 0 0 48px rgba(15, 23, 42, .1);
}

/* ==================== 顶部栏 ==================== */
.navbar {
  position: sticky; top: 0; z-index: 50; color: #fff;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  padding: 14px 16px 34px; border-radius: 0 0 24px 24px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .18);
}
.navbar::after {
  content: ''; position: absolute; right: -30px; top: -46px; width: 150px; height: 150px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none;
}
.navbar .row { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.navbar .lg { width: 36px; height: 36px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; padding: 3px; overflow: hidden; box-shadow: 0 3px 10px rgba(2, 8, 30, .25); }
.navbar .lg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.navbar .title { font-size: 16.5px; font-weight: 600; letter-spacing: -.2px; }
.navbar .sub { font-size: 11.5px; opacity: .82; margin-top: 3px; }
.navbar .pill { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; padding: 5px 11px; font-size: 12px; display: flex; align-items: center; gap: 4px; cursor: pointer; flex: none; transition: .15s; }
.navbar .pill:active { background: rgba(255, 255, 255, .3); }
.navbar .ic { color: #fff; }
.navbar .bell { position: relative; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; flex: none; }
.navbar .bell .dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; border: 1.5px solid #1d4ed8; }

/* 子页面返回栏 */
.navbar.back-bar {
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); color: var(--txt);
  border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 14px; box-shadow: none;
}
.navbar.back-bar::after { display: none; }
.navbar.back-bar .ic { color: var(--txt); }
.navbar.back-bar .row { justify-content: space-between; }
.navbar.back-bar .bt { flex: 1; text-align: center; font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.navbar.back-bar .bb { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.navbar.back-bar .bb:active { background: #f1f5f9; }

/* ==================== 页面容器 ==================== */
.page { padding: 12px 12px 16px; }
/* 仅首屏为白卡的页面（首页 / 我的）上浮到渐变头部中 */
.app.hero .page { margin-top: -22px; position: relative; z-index: 2; }
/* 首页：数据已在头部内，白卡轻微上浮衔接 */
.app.hero-home .page { margin-top: -12px; }

/* ==================== 头部数据区（首页专属） ==================== */
.navbar.data-mode { padding-bottom: 16px; }
.navbar.data-mode::before {
  content: ''; position: absolute; left: -40px; bottom: -70px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none;
}
.hero-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-nums .hn { padding-left: 4px; }
.hero-nums .hn .v { font-size: 27px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
.hero-nums .hn .v small { font-size: 12px; font-weight: 500; opacity: .85; margin-left: 2px; }
.hero-nums .hn .lb { font-size: 11.5px; opacity: .85; margin-top: 5px; }
.hero-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 15px; position: relative; z-index: 1; }
.hero-minis .hm { text-align: center; padding: 9px 2px; border-radius: 12px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .14); }
.hero-minis .hm b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.4px; }
.hero-minis .hm b small { font-size: 10.5px; font-weight: 500; opacity: .8; }
.hero-minis .hm span { display: block; font-size: 10.5px; opacity: .82; margin-top: 3px; }

/* ==================== 快捷入口渐变卡片 ==================== */
.qcards { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 12px; }
.qcards .qc {
  position: relative; overflow: hidden; border-radius: 15px; padding: 14px 14px 13px;
  color: #fff; cursor: pointer; transition: .15s; box-shadow: 0 4px 14px rgba(15, 23, 42, .16);
}
.qcards .qc:active { transform: scale(.97); }
.qcards .qc .t { font-size: 15px; font-weight: 600; letter-spacing: -.2px; position: relative; }
.qcards .qc .s { font-size: 11px; opacity: .85; margin-top: 4px; position: relative; }
.qcards .qc i { position: absolute; right: -16px; top: -16px; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.qcards .qc::after { content: ''; position: absolute; right: 14px; bottom: -20px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .1); }

/* ==================== 卡片 ==================== */
.hcard {
  background: #fff; border-radius: 14px; padding: 15px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .05);
  border: 1px solid rgba(230, 234, 242, .8);
}
.hcard .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hcard .hd b { font-size: 14.5px; font-weight: 600; letter-spacing: -.2px; }
.hcard .hd .more { font-size: 12px; color: var(--brand); padding: 3px 8px; border-radius: 6px; background: var(--brand-l); font-weight: 500; }

/* ==================== 指标 ==================== */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 12px; }
.metric {
  background: #fff; border-radius: 14px; padding: 14px; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .05);
  border: 1px solid rgba(230, 234, 242, .8);
}
.metric::before { content: ''; position: absolute; right: -18px; bottom: -18px; width: 68px; height: 68px; border-radius: 50%; opacity: .1; }
.metric.blue::before { background: #2563eb; }
.metric.green::before { background: #10b981; }
.metric.red::before { background: #ef4444; }
.metric.orange::before { background: #f59e0b; }
.metric.purple::before { background: #8b5cf6; }
.metric .lb { font-size: 12px; color: var(--txt2); position: relative; font-weight: 500; }
.metric .v { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.8px; line-height: 1.1; position: relative; }
.metric .v small { font-size: 12.5px; font-weight: 500; color: var(--txt3); margin-left: 2px; }
.metric .d { font-size: 11.5px; color: var(--txt3); margin-top: 6px; position: relative; line-height: 1.5; }
.metric.blue .v { color: #2563eb; }
.metric.green .v { color: #10b981; }
.metric.red .v { color: #ef4444; }
.metric.orange .v { color: #f59e0b; }
.metric.purple .v { color: #8b5cf6; }

/* ==================== 九宫格 ==================== */
.grid9 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.grid9 .g { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 2px; cursor: pointer; border-radius: 10px; transition: .15s; }
.grid9 .g:active { background: #f6f8fc; transform: scale(.96); }
.grid9 .g .ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .13); }
.grid9 .g .ico svg { width: 21px; height: 21px; }
.grid9 .g span { font-size: 11.5px; color: var(--txt2); text-align: center; line-height: 1.3; }

/* ==================== 筛选 chip ==================== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; }
.chips .chip { flex: none; padding: 6px 13px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--txt2); cursor: pointer; transition: .15s; font-weight: 500; }
.chips .chip.on { background: linear-gradient(135deg, #3b82f6, #2563eb); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); }
.chips::-webkit-scrollbar { display: none; }

/* 详情页分段页签（客户详情 / 合同详情）—— 此前缺样式会被渲染成竖排纯文本 */
.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 9px 0 12px; border-bottom: 1px solid #eef2f7; margin-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tb { flex: none; padding: 6px 13px; border-radius: 16px; background: #f2f5f9; color: var(--txt2); font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: .15s; }
.tabs .tb.on { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); }

/* ==================== 列表行 ==================== */
.cell { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f2f5f9; transition: .15s; }
.cell:last-child { border: none; }
.cell:active { background: #fafbfd; }
.cell .main { flex: 1; min-width: 0; }
.cell .t { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.1px; }
.cell .s { font-size: 12px; color: var(--txt3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .r { text-align: right; flex: none; }
.cell .r .amt { font-size: 14px; font-weight: 600; }
.cell .av { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; box-shadow: 0 2px 7px rgba(15, 23, 42, .12); }

/* ==================== 房源卡片 ==================== */
.unit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.unit-card { background: #fff; border-radius: 14px; padding: 13px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); border: 1px solid rgba(230, 234, 242, .8); cursor: pointer; transition: .15s; }
.unit-card:active { transform: scale(.98); }
.unit-card .code { font-size: 14px; font-weight: 600; }
.unit-card .m { font-size: 11.5px; color: var(--txt3); margin-top: 5px; line-height: 1.6; }

/* ==================== 搜索 ==================== */
.hsearch { display: flex; gap: 8px; margin-bottom: 10px; }
.hsearch .ipt { flex: 1; height: 38px; border-radius: 19px; padding: 0 15px; background: #fff; }

/* ==================== 底部 Tab ==================== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  display: flex; z-index: 60; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 16px rgba(15, 23, 42, .05);
}
.tabbar .tb { flex: 1; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--txt3); font-size: 11px; cursor: pointer; position: relative; transition: .15s; }
.tabbar .tb .ic { width: 22px; height: 22px; transition: .18s; }
.tabbar .tb.on { color: var(--brand); font-weight: 600; }
.tabbar .tb.on .ic { transform: translateY(-1px) scale(1.06); }
.tabbar .tb.on::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #3b82f6, #2563eb); }

/* ==================== 详情抽屉 / 弹窗（移动全屏） ==================== */
.drawer { width: 100vw !important; max-width: 480px; height: 100vh; border-radius: 0 !important; }
.drawer-hd { background: #fff; position: sticky; top: 0; z-index: 5; }
.modal { max-width: 92vw !important; }
.form-grid { grid-template-columns: 1fr; gap: 13px; }
.fld.half { grid-column: span 1; }

/* ==================== 我的 ==================== */
.mine-hd { background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #3b82f6); color: #fff; padding: 20px 16px 34px; display: flex; align-items: center; gap: 13px; border-radius: 0 0 24px 24px; }
.mine-hd .av { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; flex: none; }
.mine-hd .n { font-size: 17px; font-weight: 600; }
.mine-hd .r { font-size: 12px; opacity: .88; margin-top: 4px; }
.mine-body { margin-top: -20px; padding: 0 12px 12px; position: relative; z-index: 2; }

/* ==================== 提醒 ==================== */
.rm { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f2f5f9; }
.rm:last-child { border-bottom: none; }
.rm .tp { font-size: 11px; padding: 3px 8px; border-radius: 6px; height: fit-content; font-weight: 500; }

/* ==================== 空态 / 时间线 ==================== */
.empty { padding: 40px 20px; font-size: 13px; }
.timeline { padding-left: 16px; }
.timeline .it { padding-bottom: 15px; }
.timeline .it::before { left: -16px; width: 9px; height: 9px; }

/* ==================== 悬浮按钮 ==================== */
.fab {
  position: fixed; right: calc(50% - 216px); bottom: calc(78px + env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .45); z-index: 55; transition: .15s;
}
.fab:active { transform: scale(.93); }
.fab svg { width: 24px; height: 24px; }
@media (max-width: 480px) { .fab { right: 16px; } }

/* ==================== 表格（移动端窄表） ==================== */
.table-wrap { border-radius: 12px; }
.tbl { font-size: 12.5px; }
.tbl thead th { padding: 10px 10px; }
.tbl tbody td { padding: 10px; }

/* ==================== 版本迭代记录 ==================== */
.mine-hd .vt { flex: none; font-size: 11.5px; padding: 5px 10px; border-radius: 20px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .22); cursor: pointer; }
.ver-hero { background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #2563eb); color: #fff; padding: 18px 16px 20px; border-radius: 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.ver-hero::after { content: ''; position: absolute; right: -46px; top: -56px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ver-hero .row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ver-hero .lg { width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; flex: none; }
.ver-hero .pnm { font-size: 12px; opacity: .82; }
.ver-hero .ver { font-size: 25px; font-weight: 700; letter-spacing: -.6px; margin-top: 3px; }
.ver-hero .ver small { font-size: 11.5px; font-weight: 500; opacity: .75; margin-left: 8px; }
.ver-hero .metas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; margin-top: 18px; position: relative; z-index: 1; }
.ver-hero .metas span { display: block; font-size: 11px; opacity: .68; }
.ver-hero .metas b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 3px; }
.rel-tl { position: relative; padding-left: 4px; }
.rel-tl::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(180deg, #dbe3ef, #eef2f7); border-radius: 2px; }
.rel-tl .tl-item { position: relative; padding: 0 0 18px 30px; }
.rel-tl .tl-item:last-child { padding-bottom: 0; }
.rel-tl .tl-dot { position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-l); }
.rel-tl .tl-hd { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rel-tl .vno { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.rel-tl .tpx { font-size: 11px; padding: 2px 7px; border-radius: 20px; background: #f1f5f9; color: var(--txt3); }
.rel-tl .tpx.cur { background: #ecfdf5; color: #059669; }
.rel-tl .tm { margin-left: auto; font-size: 11.5px; color: var(--txt3); font-variant-numeric: tabular-nums; }
.rel-tl .tl-ti { font-size: 13.5px; font-weight: 600; margin-top: 7px; color: var(--txt); }
.rel-tl .tl-list { margin: 6px 0 0; padding-left: 16px; }
.rel-tl .tl-list li { font-size: 12.5px; line-height: 1.9; color: var(--txt2); }

/* ==================== 登录表单（v2.4.0） ==================== */
.lg-field { position: relative; display: flex; align-items: center; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; padding: 0 13px; gap: 9px; margin-bottom: 12px; transition: .16s; }
.lg-field:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.lg-field .ic { color: var(--txt3); display: flex; flex: none; }
.lg-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14.5px; height: 100%; color: var(--txt); font-family: inherit; }
.lg-field .eye { font-size: 12px; color: var(--brand); font-weight: 500; flex: none; }
.dh-item { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; padding: 10px 14px; font-size: 12.5px; border-top: 1px solid var(--line-2); }
.dh-item:active { background: #f0f7ff; }
.dh-item .ac { font-weight: 600; color: var(--txt); }
.dh-item .pw { color: var(--txt3); font-family: ui-monospace, Consolas, monospace; }
.dh-item .rl { color: var(--brand); font-size: 11px; background: var(--brand-l); padding: 2px 8px; border-radius: 20px; white-space: nowrap; text-align: right; }

/* ---------- 房源图片横滑 ---------- */
.ph-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.ph-strip::-webkit-scrollbar { display: none; }
.ph-cell {
  position: relative; flex: 0 0 auto; width: 112px; height: 84px;
  border-radius: 10px; overflow: hidden; background: #e2e8f0; border: 1px solid var(--line, #e6eaf2);
}
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cell > span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px;
  font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(15, 23, 42, .72));
}
.ph-doc {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #1e293b); color: #e2e8f0;
  font-size: 13px; font-weight: 800; letter-spacing: 1px;
}
