/* ============================================================
   沐沐智慧农业平台 · 移动端应用（登录 / 主页 / 设备数据）
   参照壤博士农业平台交互风格
   ============================================================ */
:root {
  --g-deep: #15873f;
  --g-main: #22a45d;
  --g-light: #4cc47f;
  --g-bg1: #26a65b;
  --g-bg2: #63cd8b;
  --pri: #22a45d;
  --pri-bg: #e8f7ef;
  --bg: #f4f6f5;
  --card: #ffffff;
  --txt: #22292b;
  --txt-2: #6b7772;
  --txt-3: #9aa8a1;
  --line: #edf1ee;
  --red: #e5484d;
  --amber: #e8930c;
  --blue: #2b7fd4;
  --font: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --num: 'DIN Alternate', 'Bahnschrift', 'HarmonyOS Sans SC', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: #e6ebe8; color: var(--txt);
  font-size: 14px; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#phone {
  position: relative; margin: 0 auto; height: 100dvh; max-width: 430px;
  background: var(--bg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 20px 60px rgba(20,50,35,.25);
}
@media (max-width: 460px) { #phone { box-shadow: none; } }

/* ---------- 页面切换 ---------- */
.page {
  position: absolute; inset: 0; display: none;
  flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
}
.page.active { display: flex; animation: pgIn .26s ease; }
@keyframes pgIn { from { opacity: .4; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.page.back-anim { animation: pgBack .26s ease; }
@keyframes pgBack { from { opacity: .4; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* ============ 登录页 ============ */
#pg-login {
  background: linear-gradient(172deg, #1e9a50 0%, #2ba95c 34%, #4ab973 62%, #7fd39d 88%, #a8e3ba 100%);
  justify-content: center; align-items: center; overflow: hidden;
}
.hill { position: absolute; left: -4%; right: -4%; bottom: 0; pointer-events: none; }
.logo-box {
  width: 74px; height: 74px; border-radius: 18px; background: #fff;
  display: grid; place-items: center; margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(10,60,30,.25);
}
.login-title { color: #fff; font-size: 25px; font-weight: 700; letter-spacing: 4px; text-shadow: 0 2px 10px rgba(10,60,30,.18); margin-bottom: 44px; }
.login-form { width: 76%; max-width: 320px; position: relative; z-index: 2; }
.inp-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.75); }
.inp-row svg { width: 21px; height: 21px; flex: 0 0 21px; }
.inp-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 16px; font-family: var(--font); letter-spacing: 1px;
}
.inp-row input::placeholder { color: rgba(255,255,255,.75); letter-spacing: 2px; }
.inp-row .eye { cursor: pointer; opacity: .85; }
.remember {
  display: flex; align-items: center; gap: 8px; margin: 18px 2px 30px;
  color: #fff; font-size: 13.5px; cursor: pointer; user-select: none;
}
.cb {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9);
  display: grid; place-items: center; transition: all .18s;
}
.cb.on { background: #2f7ff0; border-color: #2f7ff0; }
.cb svg { width: 11px; height: 11px; opacity: 0; transition: opacity .15s; }
.cb.on svg { opacity: 1; }
.btn-login {
  width: 100%; padding: 12.5px 0; border: none; border-radius: 9px;
  background: #fff; color: var(--g-main); font-size: 16.5px; font-weight: 600;
  font-family: var(--font); letter-spacing: 6px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(10,60,30,.22); transition: transform .15s, box-shadow .15s;
}
.btn-login:active { transform: scale(.97); }
.btn-demo {
  width: 100%; margin-top: 16px; padding: 11.5px 0;
  background: transparent; border: 1px solid rgba(255,255,255,.85); border-radius: 9px;
  color: #fff; font-size: 15px; letter-spacing: 3px; cursor: pointer; font-family: var(--font);
  transition: background .15s;
}
.btn-demo:hover { background: rgba(255,255,255,.12); }
.login-links {
  position: absolute; bottom: 68px; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; gap: 26px;
  color: #fff; font-size: 13px;
}
.login-links span { cursor: pointer; opacity: .95; }
.login-ver { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: 13px; z-index: 2; }

/* ============ 应用外壳 ============ */
#pg-app { overflow: hidden; }
.shell-hd { flex: 0 0 auto; color: #fff; position: relative; z-index: 5; overflow: hidden; }
.shell-hd.plain { background: linear-gradient(150deg, var(--g-bg1), var(--g-bg2)); padding: 14px 18px 14px; font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.shell-hd .plain-sub { font-size: 11px; font-weight: 400; opacity: .8; letter-spacing: .5px; margin-top: 3px; }

/* 主页头部 */
.home-hd { background: linear-gradient(160deg, #1fa24f 0%, #2eb35f 55%, #4cc47f 100%); padding: 24px 20px 58px; }
.home-hd .hi { font-size: 25px; font-weight: 700; letter-spacing: 1px; }
.home-hd .welcome { font-size: 13px; opacity: .88; margin-top: 6px; letter-spacing: .5px; }
.home-hd .bulb { position: absolute; right: 18px; top: 18px; width: 74px; height: 74px; }
.weather-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 20px; text-align: center;
}
.weather-row .w { color: #fff; }
.weather-row .w b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.weather-row .w b small { font-size: 12px; font-weight: 400; }
.weather-row .w span { display: block; font-size: 12px; opacity: .85; margin-top: 4px; }
.weather-row .w b .aqi { font-size: 12px; background: rgba(255,255,255,.22); border-radius: 6px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }

.shell-main { flex: 1; overflow-y: auto; min-height: 0; }
.tab-body { display: none; padding-bottom: 74px; }
.tab-body.active { display: block; }

/* 搜索 */
.search-wrap { margin: -36px 14px 0; position: relative; z-index: 6; }
.search-inner {
  background: var(--card); border-radius: 12px; padding: 11px 14px;
  display: flex; align-items: center; gap: 9px;
  box-shadow: 0 6px 20px rgba(25,60,42,.08);
}
.search-inner svg { width: 16px; height: 16px; flex: 0 0 16px; }
.search-inner input {
  flex: 1; border: none; outline: none; background: #f2f5f3; border-radius: 8px;
  padding: 9px 12px; font-size: 13.5px; font-family: var(--font); color: var(--txt);
}
.search-inner input::placeholder { color: var(--txt-3); }

/* 项目卡片 */
.proj-list { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 12px; }
.proj-card { background: var(--card); border-radius: 12px; padding: 15px 16px 14px; box-shadow: 0 2px 10px rgba(25,60,42,.05); }
.proj-card h3 { font-size: 16px; font-weight: 700; line-height: 1.45; }
.proj-card .meta { font-size: 12.5px; color: var(--txt-2); margin-top: 9px; line-height: 1.8; }
.proj-card .meta b { color: var(--txt-3); font-weight: 400; margin-right: 4px; }
.proj-card .meta .mono { font-family: var(--num); letter-spacing: .2px; }
.proj-acts { display: flex; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.pa-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #f4f6f5; border-radius: 9px; padding: 11px 6px; cursor: pointer;
  transition: background .15s; user-select: none;
}
.pa-btn:active { background: #e9eeeb; }
.pa-btn svg { width: 19px; height: 19px; }
.pa-btn .t { text-align: center; line-height: 1.35; }
.pa-btn .t b { display: block; font-size: 14px; color: var(--pri); }
.pa-btn .t b small { font-size: 10px; color: var(--txt-3); font-weight: 400; margin-left: 1px; }
.pa-btn .t span { font-size: 11.5px; color: var(--txt-2); }
.pa-btn.pest b { color: var(--amber); }

.empty { text-align: center; padding: 60px 0; color: var(--txt-3); font-size: 13px; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 20;
}
.tabbar .tb {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--txt-2); font-size: 11px; cursor: pointer; user-select: none;
}
.tabbar .tb svg { width: 22px; height: 22px; }
.tabbar .tb.active { color: var(--pri); font-weight: 600; }

/* ---------- 子页面 ---------- */
.sub-hd {
  flex: 0 0 auto; background: linear-gradient(150deg, var(--g-bg1), var(--g-bg2));
  color: #fff; padding: 14px 14px 15px; display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 10;
}
.back-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: 0 0 30px; }
.back-btn:active { background: rgba(255,255,255,.15); }
.sub-hd .tt { flex: 1; text-align: center; font-size: 16.5px; font-weight: 600; letter-spacing: .5px; padding-right: 30px; }
.sub-body { flex: 1; overflow-y: auto; padding: 14px 14px 26px; }

/* 设备列表 */
.dev-card {
  background: var(--card); border-radius: 12px; padding: 13px 15px;
  display: flex; align-items: center; gap: 13px; margin-bottom: 11px;
  box-shadow: 0 2px 8px rgba(25,60,42,.05); cursor: pointer; transition: transform .15s;
}
.dev-card:active { transform: scale(.985); }
.dev-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 44px; }
.dev-ico svg { width: 22px; height: 22px; }
.dev-info { flex: 1; min-width: 0; }
.dev-info .n { font-size: 14.5px; font-weight: 600; }
.dev-info .m { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.dev-info .m .mono { font-family: var(--num); }
.arrow { color: #c4cfc9; flex: 0 0 auto; }

/* 数据总览网格 */
.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ov {
  background: var(--card); border-radius: 11px; padding: 12px 4px; text-align: center;
  box-shadow: 0 2px 8px rgba(25,60,42,.05);
}
.ov b { display: block; font-family: var(--num); font-size: 17px; font-weight: 700; color: var(--txt); }
.ov b small { font-size: 10px; font-weight: 400; color: var(--txt-3); margin-left: 1px; }
.ov span { display: block; font-size: 10.5px; color: var(--txt-3); margin-top: 4px; }
.ov b.c-g { color: var(--g-main); } .ov b.c-b { color: var(--blue); }
.ov b.c-a { color: var(--amber); } .ov b.c-p { color: #8b5cd6; }

.card { background: var(--card); border-radius: 12px; box-shadow: 0 2px 8px rgba(25,60,42,.05); margin-bottom: 12px; overflow: hidden; }
.card .c-hd { padding: 13px 15px 0; font-size: 14.5px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.card .c-hd small { font-size: 10.5px; color: var(--txt-3); font-weight: 400; }
.card .c-bd { padding: 10px 12px 13px; }

.mchart { width: 100%; }

/* 表格 */
.mtbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.mtbl th { color: var(--txt-3); font-weight: 500; padding: 8px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: center; }
.mtbl td { padding: 8.5px 4px; border-bottom: 1px dashed var(--line); text-align: center; color: var(--txt-2); font-family: var(--num); }
.mtbl td:first-child, .mtbl th:first-child { text-align: left; padding-left: 6px; }
.mtbl tr:last-child td { border-bottom: none; }

/* 虫情 stat */
.pest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pest-grid .ov { padding: 13px 4px; }

/* ---------- 我的 ---------- */
.mine-hd { background: linear-gradient(160deg, #1fa24f, #4cc47f); padding: 34px 20px 46px; color: #fff; display: flex; align-items: center; gap: 15px; }
.mine-hd .avatar { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--g-main); display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: 0 0 62px; border: 3px solid rgba(255,255,255,.5); }
.mine-hd .nm { font-size: 19px; font-weight: 700; }
.mine-hd .acc { font-size: 12.5px; opacity: .85; margin-top: 5px; font-family: var(--num); letter-spacing: .5px; }
.mine-hd .role { display: inline-block; font-size: 10.5px; background: rgba(255,255,255,.22); border-radius: 6px; padding: 2px 8px; margin-top: 7px; }
.mine-menu { margin: -28px 14px 0; position: relative; z-index: 2; }
.menu-group { background: var(--card); border-radius: 12px; overflow: hidden; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(25,60,42,.05); }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14.5px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.menu-row:last-child { border-bottom: none; }
.menu-row:active { background: #f6f9f7; }
.menu-row .mi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; }
.menu-row .mi svg { width: 17px; height: 17px; }
.menu-row .mt { flex: 1; font-size: 14px; }
.menu-row .mv { font-size: 12px; color: var(--txt-3); }

/* ---------- 地图 tab ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font-size: 12px; padding: 7px 13px; border-radius: 18px;
  background: var(--card); color: var(--txt-2); border: 1px solid var(--line); cursor: pointer;
}
.chip.on { background: var(--pri); border-color: var(--pri); color: #fff; font-weight: 600; }
.map-card { margin: 12px 14px 0; }
#zoneMap { width: 100%; display: block; border-radius: 10px; }
.point-list { padding: 0 14px; }

/* toast */
#mtoast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(28,42,35,.92); color: #fff; font-size: 12.5px;
  padding: 10px 18px; border-radius: 20px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 200; max-width: 80%; text-align: center;
}
#mtoast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.load-dot { text-align: center; color: var(--txt-3); font-size: 11px; padding: 10px 0 4px; }

/* 数据源标识与设备状态 */
.src-tip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; padding: 8px 12px; margin: 0 14px 10px;
  border-radius: 9px; line-height: 1.4;
}
.src-tip i { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.src-tip.live { background: #eaf8ef; color: #1b7a45; }
.src-tip.live i { background: #22a45d; box-shadow: 0 0 0 3px rgba(34,164,93,.15); }
.src-tip.demo { background: #fff6e8; color: #9a6a13; }
.src-tip.demo i { background: #e8930c; }

.dev-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; padding: 9px 13px; margin: 0 0 10px;
  border-radius: 9px; font-weight: 600;
}
.dev-status span { margin-left: auto; font-weight: 400; font-size: 11px; opacity: .8; }
.dev-status i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dev-status.on { background: #eaf8ef; color: #1b7a45; }
.dev-status.on i { background: #22a45d; box-shadow: 0 0 0 3px rgba(34,164,93,.15); }
.dev-status.off { background: #fdecec; color: #b3393d; }
.dev-status.off i { background: #e5484d; }

.dev-empty { text-align: center; color: var(--txt-3); font-size: 12.5px; padding: 22px 0; }
.ov.empty { visibility: hidden; }
.ov b.dim { color: #c3ccc7 !important; }

/* 数据同步时间与手动刷新 */
.src-tip { flex-wrap: nowrap; }
.src-tip .sync { margin-left: auto; font-size: 10.5px; opacity: .72; white-space: nowrap; }
.src-tip .rf {
  flex: 0 0 auto; margin-left: 7px; padding: 2px 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  border: 1px solid currentColor; border-radius: 20px;
  opacity: .78; cursor: pointer;
}
.src-tip .rf:active { opacity: 1; transform: scale(.96); }

/* ================= 采收称重 ================= */
.wg-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 4px 0 12px;
}
.wg-st {
  background: var(--card); border-radius: 12px; padding: 12px 8px;
  text-align: center; box-shadow: 0 1px 4px rgba(31,54,44,.05);
}
.wg-st b { display: block; font-family: var(--num); font-size: 21px; color: var(--pri); }
.wg-st b small { font-size: 10.5px; color: var(--txt-3); font-weight: 500; margin-left: 2px; }
.wg-st span { font-size: 10.5px; color: var(--txt-3); }

.wg-scale { margin-left: auto; font-size: 10.5px; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.wg-scale i { width: 6px; height: 6px; border-radius: 50%; }
.wg-scale.on { color: #1b7a45; } .wg-scale.on i { background: #22a45d; box-shadow: 0 0 0 3px rgba(34,164,93,.15); }
.wg-scale.off { color: #9aa8a1; } .wg-scale.off i { background: #c3ccc7; }

.wg-live {
  display: flex; align-items: center; gap: 10px;
  background: #f2faf5; border: 1px solid #d5eedd; border-radius: 10px; padding: 10px 14px;
}
.wg-live b { font-family: var(--num); font-size: 24px; color: var(--pri); }
.wg-live b small { font-size: 11px; font-weight: 500; color: var(--txt-3); margin-left: 3px; }
.wg-live span { font-size: 10.5px; color: var(--txt-3); }
.wg-fill {
  margin-left: auto; padding: 6px 16px; border: none; border-radius: 20px;
  background: var(--pri); color: #fff; font-size: 12px; font-weight: 600;
}
.wg-fill:active { transform: scale(.96); }

.wg-scale-tip { font-size: 11.5px; color: var(--txt-3); line-height: 1.6; padding: 2px 2px; }

.wg-form label { display: block; font-size: 11px; color: var(--txt-3); margin: 8px 2px 5px; }
.wg-parcels { display: flex; flex-wrap: wrap; gap: 7px; }
.wg-p {
  padding: 6px 12px; border-radius: 18px; border: 1px solid #dde5e0;
  background: #fff; color: var(--txt-2); font-size: 12px;
}
.wg-p.on { background: var(--pri); border-color: var(--pri); color: #fff; font-weight: 600; }
.wg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wg-grid input, .wg-form > input {
  width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid #e3eae6; border-radius: 9px; font-size: 14px; background: #fbfdfc;
}
.wg-form input:focus { outline: none; border-color: var(--pri); }

.wg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid #f1f5f2;
}
.wg-row:last-child { border-bottom: none; }
.wg-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.wg-row .dot.mn { background: #e8930c; }
.wg-row .dot.sc { background: #22a45d; }
.wg-row .mid { flex: 1; min-width: 0; }
.wg-row .t { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-row .m { font-size: 10.5px; color: var(--txt-3); margin-top: 2px; }
.wg-row b { font-family: var(--num); font-size: 15px; color: var(--pri); white-space: nowrap; }
.wg-row b small { font-size: 10px; color: var(--txt-3); font-weight: 500; }
.wg-row .del { flex: 0 0 auto; padding: 4px; }
.wg-legend { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.wg-legend.mn { background: #e8930c; } .wg-legend.sc { background: #22a45d; }

/* ===== 历史数据自定义区间查询 ===== */
.range-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.range-bar input[type="date"] {
  flex: 1; min-width: 0; border: 1px solid #dfe7e2; border-radius: 8px;
  padding: 8px 6px; font-size: 12.5px; color: var(--txt-1, #3c4a43);
  background: #f7faf8; font-family: var(--num); -webkit-appearance: none; appearance: none;
}
.range-bar input[type="date"]:focus { outline: none; border-color: var(--pri); background: #fff; }
.range-bar .rb-sep { color: var(--txt-3, #9aa8a1); font-size: 12px; flex: 0 0 auto; }
.range-bar button {
  flex: 0 0 auto; border: none; background: var(--pri); color: #fff;
  border-radius: 8px; padding: 9px 13px; font-size: 13px; font-weight: 600;
}
.range-bar button:active { opacity: .75; }

/* ===== 协作成员管理 ===== */
.mb-sum { display: flex; align-items: center; gap: 12px; }
.mb-sum b { font-family: var(--num); font-size: 26px; color: var(--pri); }
.mb-sum b small { font-size: 11px; color: var(--txt-3); font-weight: 500; margin-left: 2px; }
.mb-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.mb-tag {
  font-size: 10.5px; padding: 3px 9px; border-radius: 20px;
  background: #e8f7ef; color: #1b7a45; white-space: nowrap;
}
.mb-tag.dim { background: #f0f4f1; color: #9aa8a1; }
.mb-row { cursor: pointer; }
.mb-ava {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: #e8f7ef; color: #1b7a45; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mb-role {
  font-size: 10px; font-weight: 600; color: #2b7fd4;
  background: #e9f2fc; border-radius: 4px; padding: 1px 6px; vertical-align: 1px;
}
.mb-del {
  flex: 0 0 auto; border: 1px solid #f3d7d7; background: #fff;
  color: #e5484d; font-size: 11px; border-radius: 7px; padding: 5px 10px;
}
.mb-del:active { background: #fdeeee; }
.wg-form select {
  width: 100%; padding: 11px 12px; margin-top: 2px;
  border: 1px solid #e3eae6; border-radius: 9px; font-size: 14px; background: #fbfdfc;
  color: var(--txt-1, #3c4a43); -webkit-appearance: none; appearance: none;
}
.wg-form select:focus { outline: none; border-color: var(--pri); }

/* ===== 数据源连接 / 账号管理 ===== */
.rk-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; padding: 12px 14px;
  border-radius: 10px; margin-bottom: 10px;
}
.rk-status i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.rk-status.on { background: #eaf8ef; color: #1b7a45; }
.rk-status.on i { background: #22a45d; box-shadow: 0 0 0 3px rgba(34,164,93,.15); }
.rk-status.off { background: #fdeeee; color: #c0392b; }
.rk-status.off i { background: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
.rk-kv {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid #f1f5f2;
}
.rk-kv:last-of-type { border-bottom: none; }
.rk-kv span { font-size: 12px; color: var(--txt-3); flex: 0 0 auto; }
.rk-kv b { font-size: 12.5px; color: var(--txt-1, #3c4a43); text-align: right; font-weight: 600; }

/* ===== 冷库温湿度监控 ===== */
.cold-card.alarm { border: 1px solid #f3c1c1; }
.cold-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.cold-main { flex: 1; min-width: 0; }
.cold-main .n { font-size: 14px; font-weight: 700; color: var(--txt-1, #3c4a43); display: flex; align-items: center; gap: 6px; }
.cold-main .m { font-size: 10.5px; color: var(--txt-3, #9aa8a1); margin-top: 3px; }
.cold-val { text-align: right; flex: 0 0 auto; }
.cold-val b { font-family: var(--num); font-size: 21px; color: #2b7fd4; display: block; line-height: 1.1; }
.cold-val b.bad { color: #e5484d; }
.cold-val b small { font-size: 10px; font-weight: 600; margin-left: 1px; }
.cold-val span { font-size: 10px; color: var(--txt-3, #9aa8a1); font-family: var(--num); }
.cold-row .arrow { flex: 0 0 auto; color: #b8c4bd; transition: transform .2s; }
.cold-row .arrow.up { transform: rotate(180deg); }
.cold-tag { font-size: 9.5px; font-weight: 700; border-radius: 4px; padding: 1.5px 6px; vertical-align: 2px; }
.cold-tag.ok { background: #e8f7ef; color: #1b7a45; }
.cold-tag.bad { background: #fdeeee; color: #e5484d; }
.cold-tag.off { background: #f0f4f1; color: #9aa8a1; }
.cold-detail { padding: 0 14px 13px; display: flex; flex-direction: column; gap: 10px; }
.cold-detail .cold-recs { border-top: 1px dashed #e7eee9; padding-top: 8px; }
.cold-rec { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt-2, #5b6b62); padding: 3px 0; font-family: var(--num); }
.cold-rec span:nth-child(2), .cold-rec span:nth-child(3) { width: 52px; text-align: right; }
.cold-lgd { display: flex; gap: 14px; font-size: 10px; color: var(--txt-3, #9aa8a1); margin-top: 4px; }
.cold-lgd span { display: flex; align-items: center; gap: 4px; }
.cold-lgd .t2 { margin-left: auto; font-family: var(--num); }
.cold-lgd i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.cold-acts { display: flex; gap: 8px; }
.c-bad { color: #e5484d; }

/* ===== 冷库项目筛选条 ===== */
.cf-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cf-chip {
  font-size: 10.5px; padding: 4px 10px; border-radius: 20px;
  background: #f0f4f1; color: #5b6b62; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; font-weight: 600;
}
.cf-chip.on { background: #e8f7ef; color: #1b7a45; border-color: #bfe6cf; }

/* ===== 物联设备（直连） ===== */
.netdev-sel { border-color: #cfe0f5; box-shadow: 0 2px 10px rgba(43,127,212,.08); }
.cold-val b.off { color: #b8c4bd; }
.nd-sec { margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: #5c6f66; }
.nd-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.nd-node {
  background: #f7faf8; border-radius: 9px; padding: 8px 6px; text-align: center;
  display: flex; flex-direction: column; gap: 1px;
}
.nd-node b { font-size: 10px; color: var(--txt-3, #9aa8a1); font-weight: 600; }
.nd-node b small { font-size: 9px; }
.nd-node span { font-family: var(--num); font-size: 17px; font-weight: 700; color: #2b7fd4; }
.nd-node i { font-style: normal; font-size: 10px; color: #22a45d; font-family: var(--num); }
.cold-rec span:nth-child(3), .cold-rec span:nth-child(4) { width: 44px; }
.nd-rename { display: flex; gap: 8px; }
.nd-rename input {
  flex: 1; min-width: 0; border: 1px solid #e3eae6; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; background: #fbfdfc; color: var(--txt-1, #3c4a43);
}
.nd-rename input:focus { outline: none; border-color: var(--pri); }

/* ---------- 采收：实时读数 ---------- */
.wg-live-box {
  background: linear-gradient(160deg, #f0fbf4, #e6f7ee);
  border: 1px solid #d5eedd; border-radius: 12px;
  padding: 14px 16px 12px; text-align: center;
}
.wg-live-big { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.wg-live-big b {
  font-family: var(--num); font-size: 46px; line-height: 1.05; color: var(--pri);
  letter-spacing: 1px; transition: color .18s;
}
.wg-live-big b.unstable { color: var(--amber); }
.wg-live-big small { font-size: 12px; color: var(--txt-3); font-weight: 500; }
.wg-live-meta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.wg-live-stat { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.wg-live-stat.ok { color: #1b7a45; background: rgba(34,164,93,.1); }
.wg-live-stat.wait { color: #a56a06; background: rgba(232,147,12,.12); }
.wg-live-stat.off { color: #87948e; background: rgba(154,168,161,.14); }
.wg-live-meta em { font-style: normal; font-size: 10.5px; color: var(--txt-3); font-family: var(--num); }

/* 多秤实时小卡：每台秤一格，同时显示读数 */
.wg-all { margin-top: 10px; }
.wg-all-hd {
  display: flex; align-items: center; font-size: 10.5px; color: var(--txt-3);
  margin-bottom: 6px; letter-spacing: .3px;
}
.wg-all-hd em { margin-left: auto; font-style: normal; font-family: var(--num); color: var(--txt-3); }
.wg-all-list { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.wg-all-item {
  flex: 0 0 auto; min-width: 104px; border: 1px solid #e2ebe5; background: #fff;
  border-radius: 10px; padding: 7px 9px; display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "dot code code" "w w em"; gap: 2px 5px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.wg-all-item.on { border-color: var(--pri); box-shadow: 0 0 0 2px rgba(34,164,93,.12); background: #f7fdf9; }
.wg-all-item.off { opacity: .62; }
.wg-all-item i {
  grid-area: dot; width: 6px; height: 6px; border-radius: 50%; align-self: center;
}
.wg-all-item i.on { background: #22a45d; box-shadow: 0 0 0 3px rgba(34,164,93,.15); }
.wg-all-item i.off { background: #b9c4be; }
.wg-all-item b { grid-area: code; font-size: 10.5px; color: var(--txt-2); font-weight: 600; }
.wg-all-item .w {
  grid-area: w; font-family: var(--num); font-size: 17px; color: var(--txt);
  line-height: 1.15; letter-spacing: .4px;
}
.wg-all-item .w small { font-size: 9px; color: var(--txt-3); margin-left: 2px; font-weight: 500; }
.wg-all-item em {
  grid-area: em; font-style: normal; font-size: 9.5px; color: var(--txt-3);
  align-self: end; white-space: nowrap; padding-bottom: 1px;
}

.wg-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.wg-tool {
  border: 1px solid #d9e8df; background: #fff; color: #2c6e4c;
  font-family: var(--font); font-size: 11.5px; padding: 9px 0; border-radius: 9px;
  cursor: pointer; transition: background .15s, transform .12s;
}
.wg-tool:active { transform: scale(.96); background: #f1faf4; }

/* ---------- 采收：地块汇总 ---------- */
.wg-sum { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.wg-sum .n { font-size: 11.5px; color: var(--txt-2); width: 88px; flex: 0 0 88px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-sum .bar { flex: 1; height: 6px; border-radius: 4px; background: #eef3f0; overflow: hidden; }
.wg-sum .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4cc47f, #22a45d); }
.wg-sum b { font-family: var(--num); font-size: 12.5px; color: var(--txt); width: 66px; text-align: right; }
.wg-sum b small { font-size: 9.5px; color: var(--txt-3); font-weight: 500; margin-left: 2px; }

.wg-export { margin-left: auto; font-size: 10.5px; color: var(--pri); font-weight: 600; }

/* ---------- 电子秤设置弹层 ---------- */
.ss-mask {
  position: fixed; inset: 0; z-index: 999; background: rgba(12,26,20,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: ssFade .18s ease;
}
@keyframes ssFade { from { opacity: 0; } to { opacity: 1; } }
.ss-box {
  width: 100%; max-width: 520px; background: #fff;
  border-radius: 16px 16px 0 0; padding: 16px 16px 20px;
  animation: ssUp .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes ssUp { from { transform: translateY(24px); } to { transform: none; } }
.ss-hd { display: flex; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.ss-hd .ss-x { margin-left: auto; font-size: 20px; color: var(--txt-3); line-height: 1; cursor: pointer; padding: 0 4px; }
.ss-bd label { display: block; font-size: 11px; color: var(--txt-3); margin: 12px 0 6px; }
.ss-tip { font-size: 11.5px; line-height: 1.65; color: var(--txt-2); background: #f4f8f6; border-radius: 9px; padding: 10px 12px; }
.ss-ports { display: flex; flex-direction: column; gap: 6px; }
.ss-port {
  display: flex; align-items: center; gap: 8px; background: #fbfdfc;
  border: 1px solid #e6eeea; border-radius: 9px; padding: 8px 11px; font-size: 12px;
}
.ss-port b { font-size: 11.5px; color: var(--txt-2); font-weight: 600; min-width: 52px; }
.ss-port .mono { font-family: var(--num); color: var(--pri); font-size: 12px; }
.ss-port em { margin-left: auto; font-style: normal; font-size: 10.5px; padding: 1px 8px; border-radius: 20px; }
.ss-port em.on { color: #1b7a45; background: rgba(34,164,93,.1); }
.ss-port em.off { color: #87948e; background: rgba(154,168,161,.14); }
.ss-seg { display: flex; gap: 8px; }
.ss-seg button {
  flex: 1; border: 1px solid #dbe7e1; background: #fff; color: var(--txt-2);
  font-family: var(--font); font-size: 12px; padding: 9px 0; border-radius: 9px; cursor: pointer;
}
.ss-seg button.on { background: var(--pri-bg); border-color: var(--pri); color: #15873f; font-weight: 600; }
.ss-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.ss-grid input { width: 100%; border: 1px solid #e2eae6; border-radius: 9px; padding: 9px 11px; font-size: 13px; font-family: var(--font); }
.ss-grid input:focus { outline: none; border-color: var(--pri); }
.ss-chk { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--txt-2); margin-top: 14px; }
.ss-chk input { width: 15px; height: 15px; accent-color: var(--pri); }
.ss-err { font-size: 11px; color: var(--amber); margin-top: 8px; min-height: 14px; }
.ss-ft { display: flex; gap: 10px; margin-top: 16px; }
.ss-btn {
  flex: 1; border: none; border-radius: 10px; padding: 11px 0; font-family: var(--font);
  font-size: 13.5px; font-weight: 600; background: var(--pri); color: #fff; cursor: pointer;
}
.ss-btn.ghost { background: #f0f4f2; color: var(--txt-2); }

/* ---------- 电子秤选择（秤 ↔ 项目） ---------- */
.wg-scales { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wg-scales .wg-sc {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; padding: 8px 11px;
}
.wg-scales .wg-sc b { font-size: 12px; font-family: var(--num); }
.wg-scales .wg-sc small { font-size: 10px; color: var(--txt-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-scales .wg-sc.dis { opacity: .45; }
.wg-proj {
  margin-top: 8px; font-size: 11px; color: var(--txt-3);
  background: #f4f8f6; border-radius: 8px; padding: 7px 11px;
}
.wg-proj b { color: #15873f; font-weight: 600; }
.wg-proj.warn { color: #a56a06; background: #fdf6e9; }
