/* ============================================================
 * 育粮人 - 样式 (style.css)
 * 绿色主题 · 移动端 H5
 * ============================================================ */

:root {
  --green-50: #f1f8e9;
  --green-100: #dcedc8;
  --green-200: #c5e1a5;
  --green-300: #aed581;
  --green-400: #66bb6a;
  --green-500: #4caf50;
  --green-600: #43a047;
  --green-700: #388e3c;
  --green-800: #2e7d32;
  --green-900: #1b5e20;
  --bg: #f4f8f1;
  --card: #ffffff;
  --text: #212121;
  --text-2: #616161;
  --text-3: #9e9e9e;
  --line: #e8efde;
  --border: #e8efde;
  --warn: #ff9800;
  --danger: #f44336;
  --radius: 12px;
  --shadow: 0 1px 8px rgba(46, 125, 50, 0.07);
  --shadow-btn: 0 3px 10px rgba(67, 160, 71, 0.3);
  --tab-h: 50px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #e8ede4;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

/* H5 容器(手机宽度居中) */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100svh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

/* ---------- 顶部导航栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: #fff;
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  min-height: 44px;
}
.nav-btn {
  background: rgba(255,255,255,.15); color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 5px 9px; border-radius: 7px; white-space: nowrap;
}
.nav-btn:active { background: rgba(255,255,255,.28); }
.nav-title { font-size: 16px; font-weight: 600; flex: 1; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-right { font-size: 12px; display: flex; gap: 6px; align-items: center; }

/* ---------- 内容区 ---------- */
.content {
  flex: 0 1 auto;
  padding: 10px 10px calc(var(--tab-h) + 10px);
  overflow-y: auto;
}

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex; z-index: 50;
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-3); cursor: pointer; gap: 3px; min-width: 0; padding: 0 2px;
}
.tabbar .tab .ic { font-size: 24px; line-height: 1; }
.tabbar .tab .lb { font-size: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1; }
.tabbar .tab.active { color: var(--green-700); font-weight: 600; }

/* 筛选条 */
.filter-bar { margin-bottom: 8px; }
.filter-bar select { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdf9; font-size: 13px; color: var(--text); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 9px 10px;
  margin-bottom: 7px;
}
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; }
.card-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.card-sub .pr { color: var(--danger); font-weight: 700; }

/* ---------- 段落标题/描述/操作区 ---------- */
.section-title { font-size: 14px; font-weight: 700; margin: 7px 2px 4px; color: var(--green-900); display: flex; align-items: center; justify-content: space-between; }
.section-desc { font-size: 12px; color: var(--text-2); margin: 0 2px 4px; line-height: 1.5; }
.page-actions { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.page-actions .btn { flex: 1; }

/* ---------- 开关 / 统计 / 复选 / 键值 ---------- */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: .3s; }
.switch .slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: var(--green-600); }
.switch input:checked + .slider:before { transform: translateX(18px); }

.stat-row { display: flex; gap: 8px; margin: 10px 0; }
.stat-box { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; }
.stat-box .num { font-size: 22px; font-weight: 800; color: var(--green-700); }
.stat-box .lb { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.check-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); background: var(--green-50); border: 1px solid var(--green-100); border-radius: 7px; padding: 5px 7px; }
.check-item input { accent-color: var(--green-600); width: 15px; height: 15px; }

.kv-list { margin-top: 6px; }
.kv-list .kv { display: flex; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.kv-list .kv:last-child { border-bottom: none; }
.kv-list .kv .k { width: 92px; color: var(--text-3); flex-shrink: 0; }
.kv-list .kv .v { flex: 1; color: var(--text); word-break: break-word; }

.form-tip { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.opt-tag { display: inline-block; margin-left: 4px; padding: 0 5px; font-size: 10px; color: #fff; background: var(--green-500, #43a047); border-radius: 3px; vertical-align: middle; font-weight: 400; }
.mine-del { color: var(--danger); cursor: pointer; }

/* 服务端表单分区 */
.svc-block { margin-top: 6px; padding-top: 5px; border-top: 2px dashed var(--green-200); }

/* ---------- 表单 ---------- */
.form-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; margin-bottom: 8px;
}
.form-item { margin-bottom: 10px; }
.form-item label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
.form-item input,
.form-item select,
.form-item textarea,
.comment-input .input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; background: #fbfdf9; color: var(--text);
  outline: none; transition: border .2s; font-family: inherit;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus, .comment-input .input:focus { border-color: var(--green-400); background: #fff; }
.form-item textarea { min-height: 60px; resize: vertical; }
.form-item select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2343a047' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* 地图定位按钮 + 预览框 */
.loc-pick-btn { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; padding: 6px 12px;
  font-size: 12px; font-weight: 600; color: var(--brand, #388e3c); background: #e8f5e9;
  border: 1px solid var(--green-300, #a5d6a7); border-radius: 20px; cursor: pointer; white-space: nowrap; }
.loc-pick-btn:active { background: #d0e9d4; }
.loc-map-box { margin-top: 8px; }
.loc-tip { font-size: 12px; color: var(--brand, #388e3c); margin-top: 4px; font-weight: 500; }
.loc-link { display: inline-block; font-size: 12px; color: #1565c0; margin-top: 2px; text-decoration: underline; }

.region-select select { margin-bottom: 6px; }
.region-select select:last-child { margin-bottom: 0; }
.form-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; text-align: center; }
.form-foot a { color: var(--green-700); font-weight: 600; cursor: pointer; }
.chk-row { display: flex; align-items: center; }
.chk-lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.chk-lbl input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green-600); cursor: pointer; }
.btn-ghost { background: var(--card); color: var(--text-2); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: none; border-radius: 20px; padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform .08s, box-shadow .2s; color: #fff;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  box-shadow: var(--shadow-btn);
}
.btn:active { transform: scale(0.97); }
.btn-full { width: 100%; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: #fff; color: var(--green-700); border: 1px solid var(--green-200); box-shadow: none; }
.btn-outline { background: var(--green-50); color: var(--green-700); box-shadow: none; }
.btn-gray { background: #eceff1; color: var(--text-2); box-shadow: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 12px; }
.btn-danger { background: linear-gradient(135deg, #ef5350, var(--danger)); }
.btn:disabled { opacity: .5; }

/* ---------- 启动页 ---------- */
.splash { text-align: center; padding: 36px 20px; }
.splash-logo {
  width: 80px; height: 80px; border-radius: 22px;
  background: linear-gradient(135deg, var(--green-700), var(--green-400)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 38px;
  margin-bottom: 14px; box-shadow: var(--shadow-btn);
}
.splash h1 { margin: 0 0 4px; font-size: 22px; color: var(--green-900); }
.splash p { color: var(--text-2); margin: 0 0 22px; font-size: 13px; }
.splash-links { margin: 16px 0 6px; font-size: 13px; }
.splash-links a { color: var(--green-700); cursor: pointer; font-weight: 600; }
.splash-links .sep { color: var(--line); margin: 0 8px; }
.demo-tip { font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* ---------- 角色选择 ---------- */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card {
  background: #fff; border-radius: var(--radius); padding: 16px 8px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .1s; border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.role-card:active { transform: scale(0.97); border-color: var(--green-200); }
.role-card .ic { font-size: 28px; }
.role-card span:last-child { font-size: 13px; font-weight: 600; color: var(--green-800); }

/* ---------- 详情行 ---------- */
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-row .lb { color: var(--text-3); font-size: 12px; }
.detail-row .val { font-weight: 600; text-align: right; font-size: 13px; }

/* ---------- 列表/留言 ---------- */
.msg-list { }
.msg-item {
  background: #fff; border-radius: 10px; padding: 9px; box-shadow: var(--shadow); margin-bottom: 7px;
  cursor: default; transition: transform .08s;
}
.msg-item:active { transform: scale(0.99); }
.msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 6px; }
.msg-head .from { font-weight: 600; font-size: 13px; color: var(--green-800); }
.msg-time { font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.msg-body { font-size: 13px; color: var(--text); line-height: 1.45; }
.msg-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- 标签 chip ---------- */
.chip {
  background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200);
  padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 500; white-space: nowrap;
}

/* ---------- 自动候选搜索框 ---------- */
.sbar { position: relative; display: flex; gap: 6px; align-items: center; margin: 6px 2px 8px; }
.sbar .sb-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-3); pointer-events: none; }
.sbar .sb-input {
  flex: 1; padding: 8px 12px 8px 30px; border: 1px solid var(--green-200); border-radius: 8px;
  background: #fbfdf9; font-size: 13px; color: var(--text); outline: none; -webkit-appearance: none;
}
.sbar .sb-input:focus { border-color: var(--green-500); background: #fff; }
.sbar .sb-btn { flex-shrink: 0; }
.sbar .sb-suggest {
  display: none; position: absolute; top: calc(100% + 2px); left: 0; right: 60px; z-index: 50;
  background: #fff; border: 1px solid var(--green-200); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12);
  max-height: 220px; overflow-y: auto; padding: 4px 0;
}
.sbar .sb-suggest.show { display: block; }
.sbar .sg-item { padding: 9px 12px; font-size: 13px; color: var(--text); cursor: pointer; line-height: 1.3; }
.sbar .sg-item:hover, .sbar .sg-item.active { background: var(--green-50); color: var(--green-800); }
.sbar .sg-empty { padding: 8px 12px; font-size: 12px; color: var(--text-3); }

/* ---------- 店铺头部 ---------- */
.shop-header {
  background: linear-gradient(135deg, var(--green-700), var(--green-500)); color: #fff;
  border-radius: var(--radius); padding: 14px 12px; margin-bottom: 10px;
}
.shop-header h2 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.shop-header p { margin: 1px 0; font-size: 12px; opacity: .92; }

/* ---------- 种植户主页 ---------- */
.farmer-hero {
  background: linear-gradient(135deg, var(--green-600), var(--green-400)); color: #fff;
  border-radius: var(--radius); padding: 14px 12px; margin-bottom: 8px;
}
.farmer-hero .fh-top { display: flex; align-items: center; gap: 8px; }
.farmer-hero .fh-name { font-size: 17px; font-weight: 700; }
.farmer-hero .fh-edit { margin-left: auto; background: rgba(255,255,255,.2); border: none; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.farmer-hero .fh-meta { font-size: 12px; opacity: .92; margin-top: 4px; }
.farmer-hero .fh-stats { display: flex; gap: 18px; margin-top: 10px; }
.farmer-hero .fh-st b { font-size: 18px; font-weight: 700; }
.farmer-hero .fh-st span { display: block; font-size: 11px; opacity: .85; }

/* ---------- 列表头 + 链接按钮 ---------- */
.list-head { display: flex; justify-content: space-between; align-items: center; margin: 10px 2px 6px; }
.btn-link { background: none; border: none; color: var(--green-600); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px; }

/* ---------- 地块卡片 ---------- */
.plot-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 10px; margin-bottom: 8px; cursor: pointer; transition: transform .08s; }
.plot-card:active { transform: scale(.98); }
.plot-card .plot-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.plot-card .crop-name { font-size: 14px; font-weight: 700; color: var(--green-900); }
.plot-card .plot-row { display: flex; gap: 14px; font-size: 12px; color: var(--text); margin: 2px 0; }
.plot-card .plot-row b { font-weight: 700; }
.plot-card .plot-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ---------- 入口网格 ---------- */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.entry-cell { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 12px 4px; text-align: center; cursor: pointer; transition: transform .08s; }
.entry-cell:active { transform: scale(.96); }
.entry-cell .ec-ic { display: block; font-size: 22px; }
.entry-cell span:last-child { display: block; font-size: 11px; color: var(--text); margin-top: 4px; }

/* 首页设备类型入口（带数量角标） */
.dev-type-grid { gap: 10px; margin-bottom: 12px; }
.dev-type-cell { position: relative; }
.dev-type-cell .ec-num { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; line-height: 18px; text-align: center; box-sizing: border-box; }
.dev-type-cell .ec-num.zero { background: #e5e7eb; color: #9ca3af; }

/* ---------- 种植动态卡片 ---------- */
.farm-post-card { cursor: pointer; transition: transform .08s; }
.farm-post-card:active { transform: scale(.98); }
.farm-post-card .fp-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.farm-post-card .fp-av, .farm-post-detail .fp-av { width: 32px; height: 32px; border-radius: 50%; background: var(--green-100); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.farm-post-card .fp-card-meta { flex: 1; }
.farm-post-card .fp-an { font-size: 13px; font-weight: 600; color: var(--green-900); }
.farm-post-card .fp-ar { font-size: 11px; color: var(--text-3); }
.farm-post-card .fp-card-text { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 6px; word-break: break-word; }
.farm-post-card .fp-thumbs { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; position: relative; }
.farm-post-card .fp-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.farm-post-card .fp-more { width: 80px; height: 80px; background: rgba(0,0,0,.5); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.farm-post-card .fp-vtag { font-size: 11px; color: var(--green-600); margin-bottom: 4px; }
.farm-post-card .fp-card-foot { font-size: 11px; color: var(--text-3); }
.farm-post-mini { margin-bottom: 6px; }
.farm-post-mini .fp-type { font-size: 11px; color: var(--green-600); font-weight: 600; }
.farm-post-mini .fp-text { font-size: 13px; color: var(--text); line-height: 1.4; margin: 3px 0; word-break: break-word; }
.farm-post-mini .fp-thumbs img { width: 60px; height: 60px; }
.farm-post-mini .fp-meta { font-size: 11px; color: var(--text-3); }

/* ---------- 种植动态详情 ---------- */
.farm-post-detail { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 12px; margin-bottom: 8px; }
.farm-post-detail .fp-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.farm-post-detail .fp-an { font-size: 14px; font-weight: 600; }
.farm-post-detail .fp-ar { font-size: 11px; color: var(--text-3); }
.farm-post-detail .fp-type-tag { display: inline-block; background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); border-radius: 10px; padding: 2px 10px; font-size: 11px; margin-bottom: 8px; }
.farm-post-detail .fp-fulltext { font-size: 14px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; }
.farm-post-detail .fp-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.farm-post-detail .fp-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.farm-post-detail .fp-loc { font-size: 12px; color: var(--text-2); }
.fp-actions { display: flex; gap: 8px; margin-bottom: 10px; }

/* ---------- 店铺照片网格 ---------- */
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.img-slot {
  width: 100%; aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--green-200);
  background: var(--green-50); overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 淘宝样式商品 ---------- */
.goods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goods-card {
  background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .08s; display: flex; flex-direction: column;
}
.goods-card:active { transform: scale(0.98); }
.goods-img { width: 100%; aspect-ratio: 1; background: var(--green-50); overflow: hidden; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; }
.goods-body { padding: 6px 8px 8px; flex: 1; display: flex; flex-direction: column; }
.goods-body .nm { font-size: 12px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.goods-body .ds { font-size: 10px; color: var(--text-3); margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.goods-body .pr { color: var(--danger); font-weight: 700; font-size: 14px; }
.goods-card .btn-sm { margin-top: 4px; align-self: flex-start; }
.goods-img-tip { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(5,150,105,.85); color: #fff; font-size: 11px; text-align: center; padding: 3px 0; opacity: 0; transition: opacity .2s; pointer-events: none; }
.goods-img:hover .goods-img-tip, .goods-img:active .goods-img-tip { opacity: 1; }
.goods-bro-link { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 4px; cursor: pointer; }

/* ---------- 宣传册满配（产品+内容一条流，无独立外框） ---------- */
.bro-full { padding: 0 !important; }
.bro-hero { width: 100%; }
.bro-hero img { width: 100%; display: block; max-height: 340px; object-fit: cover; }
.bro-prod-info { padding: 12px 14px 8px; background: #fff; }
.bro-prod-name { font-size: 18px; font-weight: 700; color: var(--text-1); }
.bro-prod-price { font-size: 20px; font-weight: 700; color: var(--green); margin-top: 4px; }
.bro-prod-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.bro-prod-sup { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.bro-stream { background: #fff; padding-bottom: 8px; }
.bro-stream-text { font-size: 15px; line-height: 1.85; color: var(--text-1); margin: 0; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.bro-stream-img { width: 100%; margin: 0; }
.bro-stream-img img { width: 100%; display: block; }
.bro-stream-video { width: 100%; margin: 0; background: #000; }
.bro-stream-video video { width: 100%; display: block; max-height: 420px; }
/* 编辑器内的块也满宽 */
.bro-full .blk { margin: 0; padding: 0; }
.bro-full .blk-img, .bro-full .blk-video { border-radius: 0; }
.bro-full .blk-img img, .bro-full .blk-video video { width: 100%; border-radius: 0; }
.bro-full .blk-text { padding: 0 14px; }
.bro-full .blk-text textarea { font-size: 15px; line-height: 1.85; padding: 10px 26px 10px 0; }
.bro-full .ins-bar { padding: 6px 14px; }
.bro-consult-bar { position: sticky; bottom: 0; margin-top: 16px; padding: 10px 14px 14px; background: linear-gradient(to top, #fff 70%, rgba(255,255,255,.4)); }
.bro-consult-btn { display: block; width: 100%; text-align: center; font-size: 16px; font-weight: 600; padding: 13px; text-decoration: none; }
.bro-consult-btn[disabled] { opacity: .5; }

/* ---------- 添加设备页底"咨询购买"入口 ---------- */
.consult-buy-entry { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 1.5px dashed var(--green); border-radius: 10px; background: rgba(5,150,105,.05); cursor: pointer; transition: background .15s; }
.consult-buy-entry:active { background: rgba(5,150,105,.12); }
.cbi-ic { font-size: 20px; }
.cbi-tx { flex: 1; font-size: 14px; color: var(--green); font-weight: 600; }
.cbi-arrow { font-size: 18px; color: var(--green); }

/* ---------- 设备咨询购买页 ---------- */
.consult-hero { text-align: center; padding: 28px 16px 20px; background: linear-gradient(135deg, var(--green) 0%, var(--green-dark, #047857) 100%); color: #fff; }
.consult-hero-ic { font-size: 48px; }
.consult-hero-title { font-size: 20px; font-weight: 700; margin-top: 8px; }
.consult-hero-sub { font-size: 13px; opacity: .9; margin-top: 4px; }
.consult-hero-tag { display: inline-block; margin-top: 10px; padding: 4px 14px; background: rgba(255,255,255,.2); border-radius: 20px; font-size: 13px; }
.consult-card { padding: 14px; margin-top: 10px; }
.consult-card-label { font-size: 15px; font-weight: 700; color: var(--text-1); }
.consult-card-desc { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.consult-call-btn { margin-top: 12px; font-size: 17px; font-weight: 700; padding: 13px; text-decoration: none; }
.consult-qr-box { text-align: center; margin: 12px 0 6px; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.consult-qr-box img { width: 200px; height: 200px; border-radius: 10px; opacity: 0; transition: opacity .3s; }
.consult-qr-box.loaded img { opacity: 1; }
.consult-qr-tip { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.consult-wechat-id { text-align: center; font-size: 13px; color: var(--text-2); }
.consult-promise { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.consult-promise span { font-size: 13px; color: var(--green); text-align: center; }

/* ---------- 需求分类 ---------- */
.need-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.need-btn {
  background: #fff; border-radius: var(--radius); padding: 14px 6px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: all .15s;
  font-size: 13px; font-weight: 600; color: var(--green-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.need-btn:active { border-color: var(--green-400); transform: scale(0.97); }

/* ---------- AI 推荐 ---------- */
.ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #7c4dff, #e040fb); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 9px; font-weight: 600; margin-right: 6px;
}
.ai-banner {
  background: linear-gradient(135deg, #ede7f6, #f3e5f5); border-radius: var(--radius);
  padding: 7px 9px; margin-bottom: 5px; font-size: 12px; color: #6a1b9a; line-height: 1.4;
}

/* ---------- 横向紧凑推荐卡（智能推荐用，去大盒子感） ---------- */
.rec-list { display: flex; flex-direction: column; gap: 6px; }
.rec-card {
  display: flex; gap: 8px; background: #fff; border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px; cursor: pointer; transition: transform .08s; align-items: center;
}
.rec-card:active { transform: scale(0.98); }
.rec-card .rec-img { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; background: var(--green-50); flex-shrink: 0; position: relative; }
.rec-card .rec-img img { width: 100%; height: 100%; object-fit: cover; }
.rec-card .rec-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rec-card .rec-nm { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--green-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-card .rec-ds { font-size: 11px; color: var(--text-3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rec-card .rec-pr { color: var(--danger); font-weight: 700; font-size: 13px; margin-top: 1px; }
.rec-card.rp-pinned { border: 1.5px solid var(--green-400); }

/* ---------- 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.stat { background: #fff; border-radius: 10px; padding: 9px 4px; box-shadow: var(--shadow); text-align: center; }
.stat .num { font-size: 18px; font-weight: 700; color: var(--green-700); }
.stat .lb { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ---------- 作物名 ---------- */
.crop-name { color: var(--green-700); font-weight: 700; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 18px 12px; color: var(--text-3); font-size: 13px; }

/* ---------- 图片选择器(相册/拍照) ---------- */
.img-picker { }
.ip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ip-thumb { position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--green-50); }
.ip-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.ip-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ip-add { width: 100%; aspect-ratio: 1; border-radius: 8px; border: 2px dashed var(--green-300); background: var(--green-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--green-600); }
.ip-add .ip-plus { font-size: 22px; line-height: 1; }
.ip-add .ip-txt { font-size: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; z-index: 200; max-width: 80%; text-align: center; line-height: 1.45;
}

/* ---------- 验证码提示 ---------- */
.codecard { background: linear-gradient(135deg, #fff8e1, #fffde7); border: 1px dashed var(--warn); border-radius: 10px; padding: 10px; margin: 8px 0; }
.codecard .cd { font-size: 22px; font-weight: 700; color: var(--warn); letter-spacing: 5px; text-align: center; margin: 6px 0; }

/* ============ 论坛 ============ */
.forum-warn {
  background: linear-gradient(135deg, #fff3e0, #fff8e1);
  border: 1px solid #ffe0b2; border-radius: 8px;
  padding: 8px 10px; font-size: 11px; color: #e65100;
  display: flex; gap: 5px; align-items: flex-start; margin-bottom: 8px;
}
.forum-warn .ic { font-size: 14px; flex-shrink: 0; }
.post-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; margin-bottom: 8px;
}
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.post-head .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.post-head .info { flex: 1; min-width: 0; }
.post-head .info .nm { font-weight: 600; font-size: 13px; }
.post-head .info .sub { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.post-text { font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.post-media { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.post-media .ph { width: calc(33.33% - 4px); aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: var(--green-50); }
.post-media .ph img { width: 100%; height: 100%; object-fit: cover; }
.post-media .video-ph { width: 100%; aspect-ratio: 16/9; border-radius: 7px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.post-media .video-ph video { width: 100%; height: 100%; object-fit: cover; }
.post-voice {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-50); border: 1px solid var(--green-200);
  border-radius: 16px; padding: 6px 11px; margin-top: 7px; font-size: 12px; color: var(--green-700);
}
.post-voice .ic { font-size: 14px; }
.post-loc {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--green-600); margin-top: 6px;
}
.post-actions { display: flex; gap: 14px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.post-actions .act { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.post-actions .act .ic { font-size: 16px; }
.post-actions .act.liked { color: var(--danger); }

.comment-list { margin-top: 8px; }
.comment-item { display: flex; gap: 6px; padding: 4px 0; font-size: 12px; }
.comment-item .nm { color: var(--green-700); font-weight: 600; }
.comment-item .tx { color: var(--text-2); flex: 1; }
.comment-input { display: flex; gap: 6px; margin-top: 8px; }
.comment-input .input { flex: 1; }

.post-tools { display: flex; gap: 14px; padding: 8px 4px; }
.post-tools .tool { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--text-2); cursor: pointer; }
.post-tools .tool .ic { font-size: 20px; color: var(--green-600); }
.post-tools .tool.recording .ic { color: var(--danger); }

.floating-add {
  position: fixed; right: calc(50% - 240px + 14px); bottom: calc(var(--tab-h) + 12px);
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: #fff; border: none; font-size: 26px; box-shadow: var(--shadow-btn);
  cursor: pointer; z-index: 40; display: flex; align-items: center; justify-content: center;
}
@media (max-width: 480px) { .floating-add { right: 16px; } }

/* ============ 个人设置 ============ */
.profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.profile-av {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; font-size: 26px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-meta .pm-name { font-size: 17px; font-weight: 600; color: var(--text-1); }
.profile-meta .pm-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 消息页个人中心宫格 */
.mine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mine-cell {
  background: #fff; border-radius: 10px; padding: 12px 6px; text-align: center;
  border: 1px solid var(--border); cursor: pointer;
}
.mine-cell:active { background: var(--green-50); }
.mine-cell .mc-ic { display: block; font-size: 24px; }
.mine-cell .mc-tx { display: block; font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ============ 红包推荐功能 ============ */
.rp-tip {
  background: var(--green-50); border-radius: 8px; padding: 9px 10px;
  font-size: 12px; color: var(--text-3); line-height: 1.5; margin: 9px 0;
}
.rp-banner {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: #fff; border-radius: 10px; padding: 12px; margin: 8px 0;
  font-size: 13px; font-weight: 600; text-align: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(238,90,82,.25);
}
.rp-banner:active { opacity: .9; }

.rp-bar {
  height: 5px; background: #eee; border-radius: 3px; margin: 6px 0; overflow: hidden;
}
.rp-bar-inner {
  height: 100%; background: linear-gradient(90deg, var(--green-400), var(--green-600));
  transition: width .3s;
}
.rp-budget {
  background: var(--green-50); color: var(--green-700);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600;
  margin: 8px 0; text-align: center;
}
.rp-mine { border-left: 3px solid var(--green-500); }
.rp-mine .rp-amt { color: #e53935; font-weight: 600; }
.rp-avail { border-left: 3px solid #ff9800; }

/* —— 商品编辑页红包推广区块 —— */
.rp-row {
  background: #fff; border: 1px solid var(--green-200); border-left: 3px solid var(--green-500);
  border-radius: 8px; padding: 10px; margin: 8px 0;
}
.rp-row-off { border-left-color: var(--text-3); opacity: .75; }
.rp-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rp-amt-big { font-size: 16px; font-weight: 700; color: #e53935; }
.rp-st { font-size: 12px; font-weight: 600; }
.rp-row-sub { font-size: 11px; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.promo-form {
  background: var(--green-50); border-radius: 8px; padding: 10px; margin-top: 8px;
  border: 1px dashed var(--green-300);
}
.promo-form .form-item { margin-bottom: 8px; }
.promo-form .form-item label { font-size: 12px; font-weight: 600; color: var(--green-800); display: block; margin-bottom: 3px; }
.promo-form .form-item input, .promo-form .form-item select, .promo-form .form-item textarea {
  width: 100%; padding: 8px; border: 1px solid var(--green-200); border-radius: 6px;
  font-size: 13px; background: #fff; box-sizing: border-box;
}

/* 置顶商品标记 */
.goods-card.rp-pinned {
  border: 2px solid var(--green-400); box-shadow: 0 2px 12px rgba(76,175,80,.18);
  position: relative;
}
.rp-pin-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: var(--green-600); color: #fff; vertical-align: middle; margin-left: 4px;
}
.rp-badge {
  position: absolute; top: 5px; left: 5px; font-size: 10px; font-weight: 600;
  background: var(--green-600); color: #fff; padding: 2px 7px; border-radius: 8px;
  z-index: 2;
}
.rp-badge-coin { background: #e53935; }

.center-banner { text-align: center; padding: 10px 8px; color: var(--text-3); }
.center-banner .ic { font-size: 32px; color: var(--green-200); }
.center-banner .tx { margin-top: 4px; font-size: 12px; line-height: 1.45; }

/* ============================================================
 * 产品宣传册编辑器 (Brochure Editor)
 * ============================================================ */
.brochure-entry {
  margin: 10px 0;
  padding: 12px;
  background: linear-gradient(135deg, var(--green-50), #fff);
  border: 1px dashed var(--green-300);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
}
.brochure-entry .ic { font-size: 28px; color: var(--green-600); }
.brochure-entry .tt { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--green-700); }
.brochure-entry .ds { margin-top: 3px; font-size: 11px; color: var(--text-3); }
.brochure-entry.has .ic { color: var(--green-500); }

/* 手机外框 */
.phone-frame {
  width: 320px; max-width: 100%;
  margin: 10px auto;
  background: #1a1a1a;
  border-radius: 28px;
  padding: 10px 6px 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.phone-frame .notch {
  width: 110px; height: 5px; background: #000; border-radius: 0 0 7px 7px;
  margin: 0 auto 6px;
}
.phone-screen {
  background: #fff;
  border-radius: 20px;
  min-height: 440px;
  max-height: 68vh;
  overflow-y: auto;
  padding: 12px 10px 70px;
  position: relative;
}
.phone-hint {
  text-align: center; font-size: 11px; color: var(--text-3);
  padding: 6px 0 10px;
}

/* 宣传册块 */
.blk { position: relative; margin-bottom: 6px; }
.blk-text textarea {
  width: 100%; min-height: 36px; border: none; resize: vertical;
  font-size: 14px; line-height: 1.7; color: var(--text-1);
  background: transparent; outline: none; padding: 4px 26px 4px 0;
  font-family: inherit;
}
.blk-text textarea:focus { background: var(--green-50); border-radius: 6px; padding-left: 6px; padding-right: 30px; }
.blk-img { position: relative; border-radius: 8px; overflow: hidden; }
.blk-img img { width: 100%; display: block; }
.blk-video { position: relative; border-radius: 8px; overflow: hidden; background: #000; }
.blk-video video { width: 100%; display: block; }
.blk-tools {
  display: none; position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.55); border-radius: 6px; padding: 2px;
  z-index: 5;
}
.blk:hover .blk-tools, .blk:active .blk-tools { display: flex; }
.blk-tools .bt {
  background: none; border: none; color: #fff; font-size: 14px;
  width: 26px; height: 26px; cursor: pointer;
}
.blk-tools .bt.edit { color: #ffe082; }
.blk-tools .bt.del { color: #ef9a9a; }

/* 插入条 */
.ins-bar {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 2px 0; padding: 3px 0;
}
.ins-line {
  flex: 1; height: 1px; background: var(--green-200);
}
.ins-btns { display: flex; gap: 2px; }
.ins-btn {
  background: var(--green-50); border: 1px solid var(--green-200);
  color: var(--green-700); border-radius: 14px;
  font-size: 11px; padding: 3px 9px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
}
.ins-btn .ic { font-size: 13px; }
.ins-btn:hover { background: var(--green-100); }

/* 底部保存条 */
.bro-foot {
  position: sticky; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 12px; margin: 12px -12px -80px;
  display: flex; gap: 8px;
}
.bro-foot .btn-full { flex: 1; }

/* 宣传册查看模式 */
.brochure-view { padding: 6px 0; }
.brochure-view .bv-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 24px 0; }
.brochure-view .bv-text { font-size: 14px; line-height: 1.8; color: var(--text-1); margin: 8px 0; white-space: pre-wrap; word-break: break-word; }
.brochure-view .bv-img { border-radius: 8px; overflow: hidden; margin: 8px 0; }
.brochure-view .bv-img img { width: 100%; display: block; }
.brochure-view .bv-video { border-radius: 8px; overflow: hidden; margin: 8px 0; background: #000; }
.brochure-view .bv-video video { width: 100%; display: block; }

/* 商品卡片操作按钮 */
.card-actions { display: flex; gap: 6px; margin-top: 8px; }
.card-actions .btn-mini {
  flex: 1; font-size: 12px; padding: 6px 4px; border-radius: 8px;
  border: 1px solid var(--green-200); background: #fff; color: var(--green-700);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
}
.card-actions .btn-mini .ic { font-size: 13px; }
.card-actions .btn-mini.primary { background: var(--green-600); color: #fff; border-color: var(--green-600); }
.card-actions .btn-mini.danger { color: var(--danger); border-color: #f3c2c2; }

/* ============================================================
 * 图片编辑器 (Image Editor)
 * ============================================================ */
.imgedit-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  z-index: 2000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 12px;
}
.imgedit-box {
  width: 100%; max-width: 340px; background: #2b2b2b;
  border-radius: 12px; overflow: hidden; color: #fff;
  display: flex; flex-direction: column;
}
.imgedit-title {
  padding: 9px 12px; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid #444; display: flex; justify-content: space-between; align-items: center;
}
.imgedit-title .sub { font-size: 11px; font-weight: 400; color: #bbb; }
.imgedit-canvas-wrap {
  position: relative; width: 100%; background: #000;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
}
.imgedit-canvas-wrap canvas {
  max-width: 100%; max-height: 52vh; display: block;
}
.imgedit-canvas-wrap #ied-ov {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  cursor: crosshair;
}
/* 当画布尺寸由 JS 内联设置后，需让 overlay 居中对齐到主画布 */
.imgedit-canvas-wrap #ied-cv { position: relative; z-index: 1; }
.imgedit-canvas-wrap #ied-ov { z-index: 2; }
.imgedit-tools {
  padding: 9px 12px; display: flex; flex-direction: column; gap: 8px;
}
.ied-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.ied-row .lb { width: 50px; color: #ccc; flex-shrink: 0; }
.ied-row input[type=range] { flex: 1; accent-color: var(--green-500); }
.ied-row .val { width: 40px; text-align: right; color: #8bc34a; font-variant-numeric: tabular-nums; }
.ied-quick { display: flex; gap: 5px; justify-content: center; }
.ied-quick .qbtn {
  background: #3a3a3a; border: 1px solid #555; color: #fff;
  border-radius: 7px; font-size: 11px; padding: 5px 10px; cursor: pointer;
}
.ied-quick .qbtn:active { background: var(--green-600); }
.ied-tip { font-size: 10px; color: #999; text-align: center; line-height: 1.4; }
.imgedit-btns { display: flex; gap: 6px; padding: 0 12px 12px; }
.imgedit-btns button {
  flex: 1; border: none; border-radius: 9px; font-size: 13px;
  padding: 9px 0; cursor: pointer; font-weight: 600;
}
.imgedit-btns .cancel { background: #444; color: #ddd; }
.imgedit-btns .crop { background: #6b6b6b; color: #fff; }
.imgedit-btns .ok { background: var(--green-600); color: #fff; }
.imgedit-btns .cancel-crop { background: #5a3a3a; color: #f3c2c2; }

/* ===== 平台数据 (adminStats) ===== */
.stat-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.stat-ov-card {
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; border-radius: var(--radius); padding: 18px 14px; text-align: center;
  box-shadow: var(--shadow-btn);
}
.stat-ov-card .so-num { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-ov-card .so-lb { font-size: 12px; opacity: 0.92; margin-top: 6px; }
.stat-section { margin: 0 12px 14px; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat-sec-head { font-size: 14px; font-weight: 700; color: var(--green-800); margin-bottom: 12px; }
.stat-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stat-bar-row .sbr-lb { width: 64px; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.stat-bar-row .sbr-track { flex: 1; height: 8px; background: var(--green-50); border-radius: 4px; overflow: hidden; }
.stat-bar-row .sbr-fill { height: 100%; background: linear-gradient(90deg, var(--green-400), var(--green-600)); border-radius: 4px; min-width: 2px; }
.stat-bar-row .sbr-num { width: 32px; text-align: right; font-size: 12px; font-weight: 700; color: var(--green-700); }
.stat-list { }
.stat-li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-li:last-child { border-bottom: none; }
.stat-li .sl-lb { color: var(--text-2); }
.stat-li .sl-val { font-weight: 700; color: var(--green-700); }
.rank-list { }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rank-row:last-child { border-bottom: none; }
.rank-no { width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; font-size: 11px; font-weight: 700; background: #e0e0e0; color: #888; flex-shrink: 0; }
.rank-no.n1 { background: #ffd54f; color: #5d4037; }
.rank-no.n2 { background: #bdbdbd; color: #424242; }
.rank-no.n3 { background: #bcaaa4; color: #4e342e; }
.rank-name { flex: 1; color: var(--text); }
.rank-num { font-size: 12px; color: var(--green-600); font-weight: 600; }

/* ===== 内容审核 (adminAudit) ===== */
.audit-tabs {
  display: flex; overflow-x: auto; background: var(--card);
  border-bottom: 1px solid var(--line); padding: 0 6px; position: sticky; top: 0; z-index: 5;
}
.audit-tab {
  flex-shrink: 0; padding: 12px 14px; font-size: 13px; color: var(--text-2);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.audit-tab.on { color: var(--green-700); border-bottom-color: var(--green-600); font-weight: 700; }
.audit-list { padding: 10px 12px; }
.audit-card {
  background: var(--card); border-radius: var(--radius); padding: 12px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.audit-card .ac-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.audit-card .ac-author { font-size: 13px; font-weight: 700; color: var(--text); }
.audit-card .ac-type { font-size: 11px; padding: 2px 7px; border-radius: 8px; background: var(--green-50); color: var(--green-700); }
.audit-card .ac-time { font-size: 11px; color: var(--text-3); margin-left: auto; }
.audit-card .ac-text { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; word-break: break-all; }
.audit-card .ac-foot { display: flex; align-items: center; justify-content: space-between; }
.audit-card .ac-meta { font-size: 12px; color: var(--text-3); }
.btn-del-sm {
  border: none; background: var(--danger); color: #fff; font-size: 12px;
  padding: 5px 14px; border-radius: 14px; font-weight: 600; cursor: pointer;
}
.btn-del-sm:active { opacity: 0.85; }
.empty-tip { text-align: center; color: var(--text-3); font-size: 13px; padding: 50px 0; }

/* ===== 注销账号 (accountDestroy) ===== */
.mine-cell-danger { color: var(--danger); }
.mine-cell-danger .mc-ic { color: var(--danger); }
.destroy-warn {
  background: linear-gradient(135deg, #fff5f5, #ffe8e8);
  border-radius: var(--radius); padding: 24px 16px; margin: 14px; text-align: center;
  border: 1px solid #ffd6d6;
}
.destroy-warn .dw-icon { font-size: 40px; line-height: 1; }
.destroy-warn .dw-title { font-size: 17px; font-weight: 800; color: #c62828; margin-top: 10px; }
.destroy-warn .dw-desc { font-size: 13px; color: #b71c1c; margin-top: 8px; line-height: 1.6; }
.destroy-list {
  background: var(--card); border-radius: var(--radius); margin: 0 14px 14px;
  padding: 4px 14px; box-shadow: var(--shadow);
}
.destroy-list .dl-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.destroy-list .dl-row:last-child { border-bottom: none; }
.destroy-list .dl-lb { color: var(--text-2); }
.destroy-list .dl-num { color: var(--danger); font-weight: 700; }
.destroy-list .dl-tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #ffebee; color: #c62828; }
.btn-danger-outline {
  background: #fff; color: var(--danger); border: 1px solid var(--danger);
  font-size: 14px; padding: 12px; border-radius: var(--radius); font-weight: 600; cursor: pointer;
}
.btn-danger-outline:active { background: #fff5f5; }
.btn-danger {
  background: var(--danger); color: #fff; border: none; font-size: 15px; padding: 13px;
  border-radius: var(--radius); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-btn);
}
.btn-danger:active { opacity: 0.9; }
.destroy-tip { font-size: 13px; color: var(--text-2); margin-bottom: 10px; line-height: 1.5; }
.destroy-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-top: 10px; cursor: pointer; }
.destroy-check input { width: 16px; height: 16px; }

/* ============================================================
 * 红包钱包 (wallet)
 * ============================================================ */
.wallet-card {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; border-radius: var(--radius); padding: 20px 18px;
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.25); margin-bottom: 12px;
}
.wc-label { font-size: 13px; opacity: 0.9; }
.wc-amount { font-size: 34px; font-weight: 800; margin: 6px 0 16px; letter-spacing: 0.5px; }
.wc-actions { display: flex; gap: 10px; }
.wallet-act {
  flex: 1; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; border-radius: 10px; padding: 10px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px;
}
.wallet-act:active { background: rgba(255,255,255,0.3); }
.wa-ic { font-size: 20px; }
.wallet-quick-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.wallet-mini-bal {
  background: var(--green-50); color: var(--green-800); border: 1px dashed var(--green-300);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.wallet-txn-list { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.wallet-txn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.wallet-txn:last-child { border-bottom: none; }
.wt-ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--green-50);
  display: flex; align-items: center; justify-content: center; font-size: 18px; }
.wt-body { flex: 1; min-width: 0; }
.wt-desc { font-size: 14px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.wt-st { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 11px; }
.wt-st-pending { background: #fff3e0; color: var(--warn); }
.wt-st-rejected { background: #ffebee; color: var(--danger); }
.wt-amt { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.wt-in { color: var(--green-700); }
.wt-out { color: var(--danger); }
/* 提现申请卡片 */
.cashout-card {
  background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.cc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cc-amount { font-size: 22px; font-weight: 800; color: var(--green-800); }
.cc-status { font-size: 12px; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.co-pending { background: #fff3e0; color: var(--warn); }
.co-approved { background: var(--green-50); color: var(--green-800); }
.co-rejected { background: #ffebee; color: var(--danger); }
.cc-line { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.cc-actions { display: flex; gap: 10px; margin-top: 12px; }
.cc-actions .btn { flex: 1; }

/* 发包人屏蔽用户属性 */
.rp-block-section {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.rp-block-title { font-size: 15px; font-weight: 600; color: var(--text); }
.rp-block-sub { font-size: 12px; color: var(--text-3); margin: 4px 0 10px; line-height: 1.5; }
.rp-block-chks { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chk {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; background: #fff; user-select: none;
}
.rp-chk input { width: 15px; height: 15px; margin: 0; }
.rp-chk:has(input:checked) { border-color: var(--green-600); background: var(--green-50); color: var(--green-800); font-weight: 600; }
.rp-chk:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.rp-blocked-tip { font-size: 12px; color: var(--danger); margin-top: 3px; }

/* 发包人屏蔽个人 - 搜索多选 */
.rp-ures-list { border: 1px solid var(--line); border-radius: 8px; max-height: 240px; overflow-y: auto; background: #fff; }
.rp-ures-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.rp-ures-row:last-child { border-bottom: none; }
.rp-ures-row:active { background: var(--green-50); }
.rp-ures-row.picked { background: var(--green-50); }
.rp-ures-ic {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--green-600); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 600;
}
.rp-ures-body { flex: 1; min-width: 0; }
.rp-ures-name { font-size: 14px; color: var(--text); font-weight: 500; }
.rp-ures-role { font-size: 12px; color: var(--text-3); margin-left: 6px; font-weight: 400; }
.rp-ures-meta { font-size: 12px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-ures-chk {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 13px; color: #fff;
}
.rp-ures-row.picked .rp-ures-chk { background: var(--green-600); border-color: var(--green-600); }
.rp-ures-empty { padding: 12px; text-align: center; font-size: 12px; color: var(--text-3); }
.rp-upicked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.rp-upick-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-300);
  border-radius: 16px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.rp-upick-chip i { font-style: normal; font-size: 14px; opacity: 0.7; }
.rp-upicked-empty { font-size: 12px; color: var(--text-3); }

/* 消息页顶部标签：消息 / 论坛 */
.msg-tabs {
  display: flex; background: var(--card); box-shadow: var(--shadow);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; position: sticky; top: 0; z-index: 5;
}
.msg-tab {
  flex: 1; text-align: center; padding: 12px 0; font-size: 15px; color: var(--text-2);
  cursor: pointer; position: relative; transition: color .2s;
}
.msg-tab.on { color: var(--green-700); font-weight: 700; }
.msg-tab.on::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 36px; height: 3px; background: var(--green-600); border-radius: 2px;
}
.msg-tab-num {
  display: inline-block; margin-left: 4px; min-width: 18px; padding: 0 5px; height: 18px;
  line-height: 18px; text-align: center; font-size: 11px; font-weight: 600;
  background: #eee; color: var(--text-2); border-radius: 9px; vertical-align: middle;
}
.msg-tab.on .msg-tab-num { background: var(--green-100); color: var(--green-800); }

/* ============================================================
 * 软件分享 (shareApp)
 * ============================================================ */
.share-hero {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; border-radius: var(--radius); padding: 28px 20px;
  text-align: center; box-shadow: 0 4px 16px rgba(46, 125, 50, 0.25); margin-bottom: 14px;
}
.sh-icon { font-size: 48px; margin-bottom: 8px; }
.sh-name { font-size: 22px; font-weight: 800; }
.sh-desc { font-size: 13px; opacity: 0.9; margin-top: 6px; line-height: 1.5; }
.share-methods {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.share-method {
  flex: 1; background: var(--card); border-radius: var(--radius);
  padding: 18px 6px; text-align: center; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.share-method:active { transform: scale(0.96); }
.sm-ic { font-size: 32px; }
.sm-label { font-size: 13px; color: var(--text); font-weight: 500; }
.share-qr-box { margin-top: 4px; }
.share-qr-wrap {
  background: #fff; border-radius: var(--radius); padding: 20px;
  text-align: center; box-shadow: var(--shadow);
}
.share-qr-img {
  width: 220px; height: 220px; border-radius: 8px; display: block; margin: 0 auto;
}
.share-qr-tip { font-size: 13px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }
.share-wx-box { margin-top: 4px; }
.share-wx-tip {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
  font-size: 14px; color: var(--text); line-height: 1.5;
}
.share-wx-tip .ic { font-size: 20px; flex-shrink: 0; }
.share-wx-actions { margin-top: 8px; }
/* 蓝牙分享引导区 */
.share-bt-box { margin-top: 4px; }
/* 设置页"待发布（预留）"占位 */
.kv-pending { font-size: 12px; color: var(--text-3); font-style: italic; }

/* ============================================================
 * 超级管理员系统 (super admin)
 * ============================================================ */
/* 超管登录入口 */
.super-login-hero {
  text-align: center; padding: 26px 0 14px;
}
.slh-ic { font-size: 56px; line-height: 1; }
.slh-tx { font-size: 18px; font-weight: 700; color: var(--green-800); margin-top: 8px; }
.btn-super {
  background: linear-gradient(135deg, #5b3520, #8b5a2b);
  border: none; color: #fff; font-weight: 600;
}

/* 超管首页英雄卡 */
.super-hero {
  position: relative; background: linear-gradient(135deg, #3a2a1a, #6b4226);
  color: #fff; border-radius: var(--radius); padding: 22px 18px;
  box-shadow: 0 4px 16px rgba(107, 66, 38, 0.3); margin-bottom: 14px;
  overflow: hidden;
}
.super-hero::after {
  content: '👑'; position: absolute; right: -10px; top: -16px;
  font-size: 110px; opacity: 0.12;
}
.sh-ic { font-size: 40px; }
.sh-name { font-size: 20px; font-weight: 800; margin-top: 4px; }
.sh-sub { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* 待审核提醒横条 */
.super-alert {
  display: flex; align-items: center; gap: 12px; background: #fff8e1;
  border: 1px solid #ffe082; border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 14px; cursor: pointer; transition: transform .15s;
}
.super-alert:active { transform: scale(0.98); }
.super-alert .ic { font-size: 24px; flex-shrink: 0; }
.super-alert b { color: #e65100; }
.super-alert div { font-size: 13px; color: #5d4037; line-height: 1.4; }

/* 统计网格 */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.stat-cell {
  background: var(--card); border-radius: var(--radius); padding: 14px 6px;
  text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s;
}
.stat-cell:active { transform: scale(0.96); }
.sc-num { font-size: 22px; font-weight: 800; color: var(--green-700); }
.sc-lb { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 分级管理员列表行 */
.admin-level-list { padding: 4px 0; }
.admin-level-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.admin-level-row:last-child { border-bottom: none; }
.alr-ic { font-size: 20px; width: 28px; text-align: center; }
.alr-name { flex: 1; font-size: 14px; color: var(--text); }
.alr-num { font-size: 13px; color: var(--text-3); }
/* 阀门台数小标签 */
.valve-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 8px; margin-right: 6px;
  background: #e3f2fd; color: #1565c0; vertical-align: middle;
}
/* 设备推广汇总行 */
.device-sum-row {
  display: flex; justify-content: space-around; align-items: center;
}
.dsr-cell { text-align: center; flex: 1; }
.dsr-ic { font-size: 26px; line-height: 1.2; }
.dsr-num { font-size: 20px; font-weight: 800; color: var(--green-700); }
.dsr-lb { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* 快捷入口按钮组 */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }

/* 等级筛选标签 */
.admin-filter-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px;
  -webkit-overflow-scrolling: touch; margin-bottom: 4px;
}
.admin-filter-tabs::-webkit-scrollbar { display: none; }
.aft {
  flex-shrink: 0; padding: 7px 16px; border-radius: 18px;
  background: var(--card); color: var(--text-2); font-size: 13px;
  box-shadow: var(--shadow); cursor: pointer; transition: all .2s;
}
.aft.on { background: var(--green-600); color: #fff; font-weight: 600; }

/* 管理员卡片 */
.admin-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); margin-bottom: 10px;
}
.adc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.adc-name { font-size: 16px; font-weight: 700; color: var(--text); }
.adc-badge {
  font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 10px;
  background: #eee; color: var(--text-2);
}
.adc-badge.as-active { background: var(--green-100); color: var(--green-800); }
.adc-badge.as-stopped { background: #ffebee; color: #c62828; }
.adc-badge.as-pending { background: #fff8e1; color: #e65100; }
.adc-level { font-size: 13px; color: var(--green-700); font-weight: 500; margin-bottom: 4px; }
.adc-info { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.adc-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 审核卡片 */
.approval-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); margin-bottom: 10px;
  border-left: 3px solid #ffa726;
}
.ac-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ac-name { font-size: 16px; font-weight: 700; }
.ac-level {
  font-size: 11px; padding: 2px 10px; border-radius: 10px;
  background: #fff8e1; color: #e65100; font-weight: 600;
}
.ac-info { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.ac-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 信息横幅（注册/创建页） */
.ai-banner {
  background: var(--green-50); border: 1px solid var(--green-200);
  border-radius: var(--radius); padding: 10px 12px; font-size: 13px;
  color: var(--green-800); line-height: 1.5; margin-bottom: 12px;
}
.ai-banner .ai-badge {
  display: inline-block; background: var(--green-700); color: #fff;
  font-size: 11px; padding: 1px 8px; border-radius: 8px; margin-right: 6px;
  font-weight: 600; vertical-align: middle;
}

/* 表单提示 */
.form-tip {
  font-size: 12px; color: var(--text-3); line-height: 1.5;
  margin: -6px 0 12px; padding: 0 2px;
}

/* 开发者提示条（管理员登录状态检查） */
.dev-tip {
  background: #f5f5f5; border-radius: var(--radius); padding: 10px 12px;
  font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px;
}
.pick-card { cursor: pointer; border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s; }
.pick-card:active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(56,142,60,.12); }
.pick-card .crop-name { font-weight: 600; color: var(--text); }
.pick-edit { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  text-align: center; color: var(--brand); font-size: 13px; font-weight: 600; }

