/* 黎川房产 PWA —— 遵循小程序视觉规范：主色 #2C6BED / 价格 #FF4D3A / 强调橙 #FF7A45 / 底色 #F5F6F8 */
:root {
  --primary: #2C6BED;
  --primary-light: #EAF1FE;
  --price: #FF4D3A;
  --orange: #FF7A45;
  --text: #1A1A1A;
  --sub: #6B7280;
  --light: #9AA3B2;
  --line: #EEF0F3;
  --bg: #F5F6F8;
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }

/* 布局壳 */
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 62px; }
.page { animation: fadein .18s ease; }
@keyframes fadein { from { opacity: .4; } to { opacity: 1; } }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50; background: var(--primary); color: #fff;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.topbar.plain { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.topbar .back { font-size: 20px; width: 24px; cursor: pointer; }
.topbar .title { font-size: 16px; font-weight: 600; flex: 1; }
.topbar .search {
  flex: 1; background: rgba(255,255,255,.92); border-radius: 18px; padding: 8px 14px;
  color: var(--sub); display: flex; align-items: center; gap: 6px; font-size: 13px;
}
.topbar .search input { border: 0; flex: 1; background: transparent; font-size: 13px; color: var(--text); }

/* 底部 tabbar */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px;
  background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 60; padding-bottom: env(safe-area-inset-bottom);
}
#tabbar .tab { flex: 1; text-align: center; padding: 7px 0 6px; color: var(--light); font-size: 11px; cursor: pointer; }
#tabbar .tab .ico { font-size: 21px; line-height: 1.2; }
#tabbar .tab.on { color: var(--primary); font-weight: 600; }
#tabbar .tab .dot { position: relative; }
#tabbar .tab .dot::after {
  content: attr(data-n); position: absolute; top: -2px; right: calc(50% - 22px);
  background: var(--price); color: #fff; font-size: 10px; min-width: 15px; height: 15px;
  border-radius: 8px; line-height: 15px; padding: 0 3px;
}

/* 卡片 */
.card { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(17,24,39,.04); margin: 10px 12px; padding: 14px; }
.sec-title { font-size: 15px; font-weight: 600; margin: 16px 14px 0; display: flex; justify-content: space-between; align-items: baseline; }
.sec-title .more { font-size: 12px; color: var(--light); font-weight: 400; }

/* 房源卡片 */
.hcard { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(17,24,39,.04); margin: 10px 12px; padding: 10px; display: flex; gap: 10px; cursor: pointer; }
.hcard .pic { width: 110px; height: 84px; border-radius: 8px; object-fit: cover; background: #E8EBF0; flex-shrink: 0; position: relative; }
.hcard .pic .vtag { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.hcard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hcard .t { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcard .meta { font-size: 12px; color: var(--sub); margin-top: 4px; }
.hcard .tags { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }
.hcard .tag { font-size: 10px; color: var(--primary); background: var(--primary-light); padding: 1px 6px; border-radius: 4px; }
.hcard .prow { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; }
.hcard .price { color: var(--price); font-weight: 700; font-size: 17px; }
.hcard .unit { font-size: 11px; color: var(--sub); }
.hcard .time { font-size: 11px; color: var(--light); }

/* 首页 */
.hero { background: linear-gradient(180deg, var(--primary) 0%, var(--primary) 70%, var(--bg) 100%); padding-bottom: 6px; }
.stats { display: flex; margin: 0 12px; background: #fff; border-radius: var(--radius); padding: 12px 0; box-shadow: 0 2px 8px rgba(17,24,39,.04); }
.stats .s { flex: 1; text-align: center; }
.stats .n { font-size: 18px; font-weight: 700; color: var(--primary); }
.stats .l { font-size: 11px; color: var(--sub); margin-top: 2px; }
.king { display: flex; flex-wrap: wrap; background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 14px 4px 6px; box-shadow: 0 2px 8px rgba(17,24,39,.04); }
.king .k { width: 25%; text-align: center; margin-bottom: 12px; cursor: pointer; }
.king .k .e { font-size: 26px; }
.king .k .l { font-size: 12px; color: var(--sub); margin-top: 3px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.topcard { min-width: 200px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(17,24,39,.04); cursor: pointer; }
.topcard img { width: 100%; height: 110px; object-fit: cover; background: #E8EBF0; display: block; }
.topcard .tt { font-size: 13px; font-weight: 600; padding: 8px 10px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topcard .pp { color: var(--price); font-weight: 700; padding: 0 10px 10px; font-size: 15px; }
.brokers { display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; }
.brokers::-webkit-scrollbar { display: none; }
.broker { min-width: 150px; background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: 0 2px 8px rgba(17,24,39,.04); }
.broker img { width: 42px; height: 42px; border-radius: 50%; }
.broker .nm { font-weight: 600; margin-top: 6px; }
.broker .st { font-size: 11px; color: var(--sub); margin-top: 2px; }

/* 筛选 */
.filterbar { display: flex; background: #fff; padding: 9px 6px; position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); }
.filterbar .f { flex: 1; text-align: center; font-size: 13px; color: var(--sub); cursor: pointer; }
.filterbar .f.on { color: var(--primary); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 5px 14px; font-size: 13px; color: var(--sub); cursor: pointer; }
.chip.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.loadmore { text-align: center; color: var(--light); font-size: 13px; padding: 14px 0 20px; cursor: pointer; }

/* 详情 */
.swiper { position: relative; background: #10131A; }
.swiper .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.swiper .track::-webkit-scrollbar { display: none; }
.swiper .slide { min-width: 100%; scroll-snap-align: center; height: 265px; display: flex; align-items: center; justify-content: center; }
.swiper .slide img, .swiper .slide video { max-width: 100%; max-height: 100%; object-fit: contain; }
.swiper .count { position: absolute; right: 12px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 9px; }
.detail-main { margin-top: -14px; position: relative; z-index: 2; }
.d-price { display: flex; align-items: baseline; gap: 8px; }
.d-price .p { color: var(--price); font-size: 24px; font-weight: 700; }
.d-price .u { color: var(--sub); font-size: 12px; }
.d-price .down { color: #0A9E4C; font-size: 12px; }
.d-title { font-size: 18px; font-weight: 700; margin-top: 8px; line-height: 1.4; }
.d-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.d-tags .tag { font-size: 11px; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 4px; }
.grid4 { display: flex; flex-wrap: wrap; margin-top: 4px; }
.grid4 .g { width: 25%; text-align: center; padding: 9px 0; }
.grid4 .g .v { font-size: 14px; font-weight: 600; }
.grid4 .g .l { font-size: 11px; color: var(--sub); margin-top: 2px; }
.nearby .ng { margin-bottom: 12px; }
.nearby .nh { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.nearby .ni { display: flex; justify-content: space-between; font-size: 13px; color: var(--sub); padding: 4px 0; }
.nearby .ni b { color: var(--text); font-weight: 500; }
.nearby .disclaimer { font-size: 11px; color: var(--light); margin-top: 8px; line-height: 1.6; }
.owner { display: flex; align-items: center; gap: 10px; }
.owner img { width: 44px; height: 44px; border-radius: 50%; background: #E8EBF0; }
.owner .nm { font-weight: 600; }
.owner .st { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* 详情底部操作栏 */
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px;
  background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; z-index: 60; padding-bottom: env(safe-area-inset-bottom); }
.dock .ic { width: 56px; text-align: center; font-size: 10px; color: var(--sub); cursor: pointer; padding: 7px 0 5px; }
.dock .ic .e { font-size: 19px; display: block; }
.dock .ic.on { color: var(--primary); }
.dock .btn { flex: 1; margin: 8px 5px; padding: 11px 0; border-radius: 22px; font-size: 15px; font-weight: 600; text-align: center; cursor: pointer; }
.dock .btn.ok { background: var(--primary); color: #fff; }
.dock .btn.warn { background: var(--orange); color: #fff; }

/* 表单 */
.form { background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 4px 14px; }
.frow { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; gap: 8px; }
.frow:last-child { border-bottom: 0; }
.frow label { width: 86px; font-size: 14px; color: var(--text); flex-shrink: 0; }
.frow label .req { color: var(--price); margin-right: 2px; }
.frow input, .frow select, .frow textarea { flex: 1; border: 0; background: transparent; color: var(--text); min-width: 0; }
.frow textarea { min-height: 72px; resize: vertical; line-height: 1.6; }
.frow .ph { color: var(--light); }
.submit-btn { display: block; margin: 16px 12px 30px; width: calc(100% - 24px); padding: 13px 0;
  background: var(--primary); color: #fff; font-size: 16px; font-weight: 600; border-radius: 24px; }
.submit-btn:disabled { background: #B9C9EE; }
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.img-grid .im { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; background: #E8EBF0; }
.img-grid .im.on { border-color: var(--primary); }
.img-grid .tip { width: 100%; font-size: 11px; color: var(--light); }

/* 工具/结果 */
.toolgrid { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 12px; }
.toolgrid .t { width: calc(50% - 5px); background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: 0 2px 8px rgba(17,24,39,.04); cursor: pointer; }
.toolgrid .t .e { font-size: 26px; }
.toolgrid .t .n { font-weight: 600; margin-top: 8px; }
.toolgrid .t .d { font-size: 12px; color: var(--sub); margin-top: 3px; }
.result { background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 14px; }
.result .big { font-size: 26px; font-weight: 700; color: var(--primary); }
.result .big.red { color: var(--price); }
.rline { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rline:last-child { border-bottom: 0; }
.rline b { font-weight: 600; }
.seg { display: flex; background: #EEF1F6; border-radius: 18px; margin: 10px 12px 0; padding: 3px; }
.seg .sg { flex: 1; text-align: center; padding: 7px 0; font-size: 13px; color: var(--sub); border-radius: 15px; cursor: pointer; }
.seg .sg.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(17,24,39,.08); }

/* 行情 */
.rankrow { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; gap: 8px; }
.rankrow:last-child { border-bottom: 0; }
.rankrow .no { width: 20px; color: var(--orange); font-weight: 700; }
.rankrow .nm { flex: 1; }
.rankrow .av { color: var(--price); font-weight: 600; }
.rankrow .ct { color: var(--light); font-size: 11px; width: 52px; text-align: right; }
.trendbars { display: flex; align-items: flex-end; gap: 5px; height: 110px; margin-top: 10px; }
.trendbars .b { flex: 1; background: var(--primary-light); border-radius: 3px 3px 0 0; position: relative; min-height: 4px; }
.trendbars .b i { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; color: var(--light); }
.trendbars .b:hover { background: var(--primary); }

/* 合同 */
.doc { background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 18px 16px; line-height: 1.9; font-size: 14px; }
.doc h2 { text-align: center; font-size: 17px; margin-bottom: 12px; }
.doc .cl { margin-bottom: 10px; }
.doc .cl b { display: block; }
.doc .sig { display: flex; gap: 14px; margin-top: 14px; }
.doc .sig img { width: 110px; height: 52px; object-fit: contain; border: 1px dashed var(--line); border-radius: 6px; background: #FAFBFC; }
.sigpad { border: 1px dashed #C6CFDC; border-radius: 10px; background: #fff; margin: 8px 12px; position: relative; }
.sigpad canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; border-radius: 10px; }
.sigpad .hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--light); font-size: 13px; pointer-events: none; }
.integrity-ok { color: #0A9E4C; font-size: 12px; }
.integrity-bad { color: var(--price); font-size: 12px; }

/* 消息/列表通用 */
.mrow { background: #fff; border-radius: var(--radius); margin: 8px 12px; padding: 13px 14px; display: flex; gap: 10px; }
.mrow .e { font-size: 20px; }
.mrow .bd { flex: 1; min-width: 0; }
.mrow .tt { font-weight: 600; font-size: 14px; }
.mrow .ct { font-size: 13px; color: var(--sub); margin-top: 3px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mrow .tm { font-size: 11px; color: var(--light); margin-top: 4px; }
.badge { display: inline-block; background: var(--price); color: #fff; font-size: 10px; border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }

/* 我的 */
.profile { background: linear-gradient(135deg, var(--primary), #4B84F2); padding: 26px 16px 30px; color: #fff; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.profile img { width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: #E8EBF0; }
.profile .nm { font-size: 18px; font-weight: 700; }
.profile .sub { font-size: 12px; opacity: .85; margin-top: 4px; }
.menu { background: #fff; border-radius: var(--radius); margin: 10px 12px; overflow: hidden; }
.mitem { display: flex; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.mitem:last-child { border-bottom: 0; }
.mitem .e { width: 26px; font-size: 17px; }
.mitem .arr { margin-left: auto; color: #C6CFDC; }
.mitem .n { margin-left: auto; color: var(--light); font-size: 12px; margin-right: 6px; }

/* 空态 */
.empty { text-align: center; padding: 60px 0 80px; color: var(--light); }
.empty .e { font-size: 44px; }
.empty .t { margin-top: 10px; font-size: 13px; }

/* 对比表 */
.cmp { width: calc(100% - 24px); margin: 10px 12px; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(17,24,39,.04); }
.cmp th, .cmp td { border-bottom: 1px solid var(--line); padding: 10px 8px; font-size: 13px; text-align: center; word-break: break-all; }
.cmp th { background: #FAFBFC; color: var(--sub); font-weight: 500; width: 74px; }
.cmp td .p { color: var(--price); font-weight: 700; }
.cmp .del { color: var(--light); font-size: 11px; cursor: pointer; }

.status-tag { font-size: 11px; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.st-pending { background: #FFF3E5; color: var(--orange); }
.st-online { background: #E8F7EE; color: #0A9E4C; }
.st-rejected { background: #FDECEA; color: var(--price); }
.st-offline { background: #EEF0F3; color: var(--sub); }

.offline-tip { text-align: center; font-size: 12px; color: var(--light); padding: 8px 0 4px; }

/* ================= 扩展功能样式（v2） ================= */

/* 筛选栏激活态 */
.filterbar .f.on { color: var(--primary); font-weight: 600; }
.filterbar .f .fnum { display: inline-block; min-width: 14px; height: 14px; border-radius: 7px; background: var(--price); color: #fff; font-size: 10px; line-height: 14px; text-align: center; margin-left: 2px; padding: 0 3px; }
.chip.on { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.mp-title { font-size: 12px; color: var(--sub); padding: 10px 14px 4px; }
.mp-row { display: flex; align-items: center; gap: 8px; padding: 4px 14px 8px; font-size: 12px; color: var(--sub); }
.mp-input { width: 80px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.mp-btns { display: flex; gap: 10px; padding: 12px 14px; }
.mini-btn { background: var(--primary); color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 8px; }
.mini-btn.plain { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.loadmore { text-align: center; color: var(--light); font-size: 12px; padding: 14px; cursor: pointer; }

/* 资讯卡片 */
.newscard { display: flex; gap: 10px; background: #fff; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(17,24,39,.04); margin: 10px 12px; padding: 10px; cursor: pointer; align-items: center; }
.newscard img { width: 100px; height: 68px; border-radius: 8px; object-fit: cover; background: #E8EBF0; flex-shrink: 0; }
.newscard .tt { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.newscard .ct { font-size: 11px; color: var(--sub); margin-top: 4px; }
.newscard .tm { font-size: 11px; color: var(--light); margin-top: 2px; }

/* 地图找房 */
.mapwrap { position: relative; margin: 10px 12px; }
.mapwrap svg { width: 100%; display: block; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(17,24,39,.06); }
.mapcard { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255,255,255,.97); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(17,24,39,.14); padding: 12px 14px; }

/* 详情页更多菜单 / 咨询按钮 */
.dmore { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; text-align: center; line-height: 30px; font-size: 18px; cursor: pointer; z-index: 5; }
.dmenu { position: absolute; top: 36px; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(17,24,39,.16); overflow: hidden; min-width: 150px; }
.dmenu div { padding: 11px 14px; font-size: 13px; color: var(--text); white-space: nowrap; cursor: pointer; }
.dmenu div:active { background: var(--bg); }
.dock .btn.ok { background: var(--primary); color: #fff; }

/* 发布页图片网格 / 示例图库 / 草稿 */
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.imgcell { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.imgcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgcell .rm { position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 18px; text-align: center; border-radius: 0 0 0 8px; }
.imgcell .cv { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(44,107,237,.85); color: #fff; font-size: 10px; text-align: center; padding: 1px 0; }
.imgcell.add { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--light); font-size: 22px; background: var(--bg); border-style: dashed; }
.img-grid .tip { width: 100%; font-size: 11px; color: var(--light); line-height: 1.6; }
.samples { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.samples::-webkit-scrollbar { display: none; }
.samples .sm { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; background: #E8EBF0; }
.samples .sm.on { border-color: var(--primary); }

/* 选择房源底部弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; border-radius: 14px 14px 0 0; width: 100%; max-width: 640px; max-height: 76vh; display: flex; flex-direction: column; }
.sheet-hd { display: flex; justify-content: space-between; align-items: center; padding: 14px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sheet-x { color: var(--light); cursor: pointer; padding: 0 4px; }
.sheet-sch { padding: 10px 14px; }
.sheet-sch input { width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 8px 14px; font-size: 13px; background: var(--bg); }
.sheet-list { overflow-y: auto; padding-bottom: 12px; }

/* 在线咨询 */
.chatbox { padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 46vh; }
.chatbox .msg { max-width: 76%; padding: 9px 12px; border-radius: 12px 12px 12px 2px; background: #fff; font-size: 14px; line-height: 1.6; box-shadow: 0 1px 4px rgba(17,24,39,.05); align-self: flex-start; white-space: pre-wrap; word-break: break-all; }
.chatbox .msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; }
.chatbar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.chatbar input { flex: 1; border: 1px solid var(--line); border-radius: 18px; padding: 8px 14px; font-size: 13px; background: var(--bg); }
.chatbar button { background: var(--primary); color: #fff; border-radius: 18px; padding: 0 18px; font-size: 13px; }

/* 订单 / 套餐 */
.lk { color: var(--primary); font-size: 13px; cursor: pointer; }
.lk.red { color: var(--price); }
.toolgrid .t { display: flex; flex-direction: column; align-items: flex-start; }

/* 举报 / 反馈 */
textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 88px; resize: vertical; background: var(--bg); }

/* 海报页 */
#po-cv { background: #fff; }

/* 详情页底栏密度（按钮较多时紧凑显示） */
.dock .ic { width: 48px; }
.dock .btn { font-size: 13px; padding: 9px 0; margin: 7px 4px; }

/* ==================================================================
   后台管理（/admin）—— PC 左侧导航 + 移动端顶部横滑菜单
   ================================================================== */
.adm {
  position: fixed; inset: 0; z-index: 25; display: flex;
  background: #F2F4F7; font-size: 14px; color: #1A1A1A;
  -webkit-tap-highlight-color: transparent;
}
/* ---------- 侧栏 ---------- */
.adm-side {
  width: 216px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #10192B; color: #9FB0C9; padding-top: env(safe-area-inset-top);
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.adm-brand .lg { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: linear-gradient(135deg,#2C6BED,#5B95FF); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.adm-brand .nm b { display: block; color: #fff; font-size: 14px; line-height: 1.3; }
.adm-brand .nm i { font-style: normal; font-size: 11px; color: #6C7C96; }
.adm-nav { flex: 1; overflow-y: auto; padding: 8px; }
.adm-navitem { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px; color: #9FB0C9; text-decoration: none; font-size: 13.5px; margin-bottom: 2px; }
.adm-navitem:hover { background: rgba(255,255,255,.05); color: #fff; }
.adm-navitem.on { background: #2C6BED; color: #fff; font-weight: 600; }
.adm-navitem .e { font-size: 15px; line-height: 1; }
.adm-navitem .n { margin-left: auto; background: #FF4D3A; color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 16px; min-width: 16px; text-align: center; font-weight: 500; }
.adm-sidefoot { padding: 10px 12px 14px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12px; }
.adm-me { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #C9D6EA; line-height: 1.35; }
.adm-me img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #22314B; }
.adm-me .txt { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adm-me .txt i { font-style: normal; color: #6C7C96; font-size: 11px; }
.adm-sideacts { display: flex; gap: 12px; }
.adm-sideacts a { color: #7E93B3; text-decoration: none; cursor: pointer; font-size: 12px; }
.adm-sideacts a:hover { color: #fff; }
/* ---------- 主区 ---------- */
/* min-height:0 必需：flex 子项默认 min-height:auto，会被内容撑高，
   导致 .adm-body 不做内部滚动、超出视口的部分永远滚不到 */
.adm-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.adm-top { background: #fff; padding: 12px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #E7EBF1; flex-shrink: 0; }
.adm-title { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-title small { font-weight: 400; font-size: 12px; color: #9AA3B2; margin-left: 6px; }
.adm-tbtns { display: flex; gap: 8px; flex-shrink: 0; }
.adm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 48px; -webkit-overflow-scrolling: touch; }
.adm-loading { text-align: center; padding: 40px 0; color: #9AA3B2; font-size: 13px; }
.adm-empty { text-align: center; padding: 46px 16px; color: #9AA3B2; font-size: 13px; line-height: 1.9; }
.adm-empty .e { font-size: 34px; margin-bottom: 6px; }
/* ---------- KPI ---------- */
.adm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adm-kpis-2 { grid-template-columns: repeat(2, 1fr); }
.adm-kpis-4 { grid-template-columns: repeat(4, 1fr); }
.adm-kpi { background: #fff; border: 1px solid #EDF0F5; border-radius: 10px; padding: 14px 16px; min-width: 0; }
.adm-kpi .k { font-size: 12px; color: #8C95A6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpi .v { font-size: 22px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.adm-kpi .v.pri { color: #2C6BED; }
.adm-kpi .v.warn { color: #E86A1F; }
/* ---------- 卡片 ---------- */
.adm-card { background: #fff; border: 1px solid #EDF0F5; border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
.adm-card h4 { margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: #1A1A1A; display: flex; align-items: center; gap: 6px; }
.adm-col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-col2 .adm-card { margin-top: 12px; }
/* ---------- 柱状图 ---------- */
.adm-chart { display: flex; align-items: flex-end; gap: 4px; height: 132px; padding-top: 16px; }
.adm-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; min-width: 0; }
.adm-bar b { position: absolute; top: -15px; font-size: 10px; font-weight: 500; color: #6B7280; }
.adm-bar i { display: block; width: 100%; max-width: 24px; background: linear-gradient(180deg,#5B95FF,#2C6BED); border-radius: 3px 3px 0 0; min-height: 2px; }
.adm-bar em { font-style: normal; font-size: 9px; color: #B0B8C6; margin-top: 5px; white-space: nowrap; }
/* ---------- 进度条 ---------- */
.adm-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12.5px; }
.adm-progress .nm { width: 62px; flex-shrink: 0; color: #5B6472; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adm-progress .bar { flex: 1; height: 7px; background: #F1F3F6; border-radius: 4px; overflow: hidden; }
.adm-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg,#5B95FF,#2C6BED); border-radius: 4px; }
.adm-progress .vl { width: 32px; text-align: right; color: #8C95A6; font-variant-numeric: tabular-nums; }
/* ---------- 待办 ---------- */
.adm-todos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-todo { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid #EDF0F5; border-radius: 9px; text-decoration: none; color: #4A5261; font-size: 13px; background: #FCFDFE; }
.adm-todo:hover { border-color: #C9D6F2; }
.adm-todo.has { background: #FFF8F2; border-color: #FFE3CE; color: #A9551C; }
.adm-todo .e { font-size: 16px; }
.adm-todo .t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adm-todo .n { font-weight: 700; font-variant-numeric: tabular-nums; }
/* ---------- 筛选 ---------- */
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-chip { padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid #E4E8EF; font-size: 13px; color: #5B6472; cursor: pointer; white-space: nowrap; user-select: none; }
.adm-chip:hover { border-color: #C9D6F2; }
.adm-chip.on { background: #EAF1FE; border-color: #2C6BED; color: #2C6BED; font-weight: 600; }
.adm-chip b { font-weight: 600; margin-left: 5px; font-size: 12px; opacity: .85; }
.adm-divider { width: 1px; height: 20px; background: #E4E8EF; margin: 0 2px; }
.adm-search { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.adm-search input { flex: 1; min-width: 0; height: 34px; border: 1px solid #E4E8EF; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff; color: #1A1A1A; }
.adm-search input:focus { outline: none; border-color: #2C6BED; }
/* ---------- 列表行 ---------- */
.adm-row { background: #fff; border: 1px solid #EDF0F5; border-radius: 10px; padding: 12px; margin-top: 8px; display: flex; gap: 12px; align-items: flex-start; }
.adm-row:hover { border-color: #D7E2F5; }
.adm-row.sm { padding: 10px; }
.adm-thumb { width: 86px; height: 64px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: #F2F4F7; cursor: pointer; }
.adm-thumb.round { width: 42px; height: 42px; border-radius: 50%; cursor: default; }
.adm-rowmain { flex: 1; min-width: 0; }
.adm-rowtt { font-size: 14px; font-weight: 500; line-height: 1.5; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; word-break: break-all; }
.adm-rowmeta { font-size: 12px; color: #8C95A6; margin-top: 5px; line-height: 1.75; word-break: break-all; }
.adm-rowacts { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; align-items: center; }
.adm-reason { margin-top: 6px; font-size: 12px; color: #FF4D3A; background: #FFF6F5; border-radius: 6px; padding: 5px 8px; }
.adm-amount { margin-left: auto; font-weight: 700; color: #FF4D3A; font-size: 14px; font-variant-numeric: tabular-nums; }
.adm-hint { font-size: 12px; color: #9AA3B2; }
/* ---------- 按钮 / 徽标 ---------- */
.adm-btn { height: 30px; line-height: 1; padding: 0 12px; border-radius: 7px; border: 1px solid #E4E8EF; background: #fff; color: #4A5261; font-size: 12.5px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-family: inherit; }
.adm-btn:hover { border-color: #C9D6F2; color: #2C6BED; }
.adm-btn:disabled { opacity: .45; cursor: not-allowed; }
.adm-btn.pri { background: #2C6BED; border-color: #2C6BED; color: #fff; }
.adm-btn.pri:hover { background: #2158CE; border-color: #2158CE; color: #fff; }
.adm-btn.danger { color: #FF4D3A; border-color: #FFD9D4; background: #FFF6F5; }
.adm-btn.danger:hover { background: #FFEDEA; color: #FF4D3A; }
.adm-btn.warn { color: #E86A1F; border-color: #FFE0CC; background: #FFF8F2; }
.adm-btn.warn:hover { background: #FFF1E4; color: #E86A1F; }
.adm-select { height: 30px; border: 1px solid #E4E8EF; border-radius: 7px; background: #fff; color: #4A5261; font-size: 12.5px; padding: 0 6px; font-family: inherit; }
.adm-badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.adm-badge.ok { background: #E8F8EF; color: #0A9E4C; }
.adm-badge.warn { background: #FFF3E6; color: #E86A1F; }
.adm-badge.err { background: #FFEDEA; color: #FF4D3A; }
.adm-badge.gray { background: #F1F3F6; color: #7A8290; }
.adm-badge.blue { background: #EAF1FE; color: #2C6BED; }
/* ---------- 驳回面板 ---------- */
.adm-reject { display: none; margin-top: 9px; padding: 10px; background: #FFF8F2; border: 1px solid #FFE3CE; border-radius: 8px; }
.adm-reject.on { display: block; }
.adm-reject .t { font-size: 12px; color: #8C6034; margin-bottom: 8px; }
.adm-reject .opts { display: flex; flex-wrap: wrap; gap: 6px; }
/* ---------- 分页 ---------- */
.adm-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; font-size: 12.5px; color: #8C95A6; }
/* ---------- 表单 ---------- */
.adm-form label { display: block; font-size: 12.5px; color: #6B7280; margin-bottom: 10px; }
.adm-form input, .adm-form textarea { display: block; width: 100%; margin-top: 5px; border: 1px solid #E4E8EF; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; background: #FCFDFE; color: #1A1A1A; font-family: inherit; }
.adm-form input:focus, .adm-form textarea:focus { outline: none; border-color: #2C6BED; background: #fff; }
.adm-form textarea { resize: vertical; line-height: 1.7; }
.adm-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-formacts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.adm-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #EEF0F3; font-size: 13px; }
.adm-kv:last-child { border-bottom: 0; }
.adm-kv span { color: #8C95A6; }
.adm-kv b { font-weight: 500; text-align: right; word-break: break-all; }
.adm-note { font-size: 12px; color: #8C95A6; line-height: 1.85; margin-top: 8px; }
.adm-note b { color: #E86A1F; }
/* ---------- 权限门 ---------- */
.adm-deny { position: fixed; inset: 0; z-index: 25; background: #F2F4F7; display: flex; align-items: center; justify-content: center; padding: 24px; }
.adm-deny .box { background: #fff; border-radius: 14px; padding: 30px 26px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(17,24,39,.08); }
.adm-deny .ico { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.adm-deny h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.adm-deny p { margin: 0 0 18px; font-size: 13px; color: #6B7280; line-height: 1.85; }
.adm-deny .adm-link { display: block; margin-top: 12px; font-size: 12.5px; color: #8C95A6; text-decoration: none; }
.adm-deny .tip { margin-top: 16px; font-size: 11.5px; color: #B0B8C6; border-top: 1px dashed #EEF0F3; padding-top: 12px; }
.only-mobile { display: none; }

/* ---------- 移动端：顶部横滑菜单 ---------- */
@media (max-width: 820px) {
  .adm { flex-direction: column; }
  .adm-side { width: auto; flex-direction: row; align-items: center; padding: 0; padding-top: env(safe-area-inset-top); }
  .adm-brand { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.07); padding: 10px 12px; flex-shrink: 0; }
  .adm-brand .lg { width: 27px; height: 27px; font-size: 13px; border-radius: 7px; }
  .adm-brand .nm b { font-size: 12.5px; white-space: nowrap; }
  .adm-brand .nm i { display: none; }
  .adm-nav { display: flex; overflow-x: auto; overflow-y: hidden; padding: 0 4px; flex: 1; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-navitem { flex-shrink: 0; padding: 7px 11px; margin: 0 2px; border-radius: 7px; font-size: 12.5px; gap: 5px; }
  .adm-navitem .e { font-size: 13px; }
  .adm-navitem .n { display: none; }
  .adm-sidefoot { border-top: 0; padding: 0 12px 0 0; flex-shrink: 0; }
  .adm-me { display: none; }
  .adm-sideacts a:first-child { display: none; }
  .adm-sideacts a { font-size: 12.5px; }
  .adm-top { padding: 9px 12px; }
  .adm-title { font-size: 14.5px; }
  .adm-title small { display: none; }
  .adm-tbtns .adm-btn { height: 28px; padding: 0 10px; font-size: 12px; }
  .adm-body { padding: 12px 12px 40px; }
  .adm-kpis, .adm-kpis-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .adm-kpi { padding: 11px 12px; }
  .adm-kpi .v { font-size: 18px; }
  .adm-col2 { grid-template-columns: 1fr; gap: 0; }
  .adm-chart { height: 108px; }
  .adm-bar em { font-size: 8px; }
  .adm-todos { grid-template-columns: 1fr; }
  .adm-row { flex-wrap: wrap; padding: 10px; gap: 10px; }
  .adm-thumb { width: 64px; height: 48px; }
  .adm-thumb.round { width: 38px; height: 38px; }
  .adm-rowacts { width: 100%; padding-top: 9px; border-top: 1px dashed #EEF0F3; margin-top: 0; }
  .adm-rowacts .adm-btn { flex: 1; min-width: 60px; padding: 0 8px; }
  .adm-rowacts .adm-select { flex: 1; min-width: 76px; }
  .adm-frow { grid-template-columns: 1fr; gap: 0; }
  .adm-search { min-width: 100%; }
  .only-mobile { display: inline-flex; }
  .adm-deny .box { padding: 24px 18px; }
}

/* 我的页：管理员身份标记与后台入口（只有 role=admin 才渲染） */
.role-tag { display: inline-block; font-size: 10.5px; font-weight: 500; line-height: 15px; padding: 0 6px; border-radius: 8px; background: rgba(255,255,255,.22); color: #fff; vertical-align: 1px; }
.admin-entry {
  margin: 12px 14px 0; padding: 13px 14px; border-radius: 12px;
  background: linear-gradient(135deg,#1B2A47 0%,#2C6BED 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 6px 18px rgba(44,107,237,.22); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.admin-entry:active { transform: scale(.99); }
.admin-entry .l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-entry .e { font-size: 20px; line-height: 1; }
.admin-entry b { display: block; font-size: 14px; font-weight: 600; }
.admin-entry i { font-style: normal; font-size: 11.5px; color: rgba(255,255,255,.72); }
.admin-entry .go { font-size: 12.5px; background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 12px; white-space: nowrap; flex-shrink: 0; }
