/* ============================================================
   GAP 中药材溯源系统 · 网页版样式 v2
   深绿侧栏 + SVG 线性图标 + 柔和阴影的桌面控制台
   ============================================================ */

:root {
  --green: #2E7D4F;
  --green-d: #24603d;
  --green-dd: #1A4A30;
  --green-l: #E4F1E9;
  --green-l2: #F2F8F4;

  --bg: #F4F6F3;
  --card: #FFFFFF;
  --text: #1C2822;
  --text-2: #45514A;
  --muted: #7A857E;
  --faint: #A2ABA5;
  --line: #E4E8E1;
  --line-2: #EEF1EC;

  --amber: #A06A17;
  --amber-l: #FBF2DF;
  --red: #C2492F;
  --red-l: #FBEDE8;
  --blue: #33628F;
  --blue-l: #EAF1F8;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 36, 29, .05);
  --shadow: 0 1px 2px rgba(23, 36, 29, .04), 0 6px 20px -6px rgba(23, 36, 29, .07);
  --shadow-lg: 0 2px 6px rgba(23, 36, 29, .05), 0 14px 36px -10px rgba(23, 36, 29, .12);
  --sidebar: 240px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(46, 125, 79, .055), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(46, 125, 79, .04), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(46, 125, 79, .18); }

/* 细滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #CDD4CD; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B4BDB4; background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 启动占位 ---------------- */
.boot {
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
}
.boot-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--green-l);
  border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
.boot-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }

.login-side {
  background:
    radial-gradient(700px 420px at 80% -10%, rgba(255,255,255,.09), transparent 60%),
    linear-gradient(155deg, #143823 0%, #215C3C 52%, #2E7D4F 115%);
  color: #fff;
  padding: 56px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-side::after {
  content: "";
  position: absolute; right: -140px; bottom: -170px;
  width: 480px; height: 480px; border-radius: 50%;
  background: rgba(255, 255, 255, .045);
}
.login-side::before {
  content: "";
  position: absolute; right: 60px; top: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .04);
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 17px; font-weight: 600; letter-spacing: .5px;
  position: relative; z-index: 1;
}
.login-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.25);
}
.login-side h1 {
  font-size: 31px; line-height: 1.45; font-weight: 650;
  margin: 0 0 18px; letter-spacing: .5px;
  position: relative; z-index: 1;
}
.login-side p {
  color: rgba(255,255,255,.78);
  font-size: 14px; line-height: 1.9; margin: 0; max-width: 420px;
  position: relative; z-index: 1;
}
.login-points {
  display: flex; flex-direction: column; gap: 15px;
  margin-top: 34px;
  position: relative; z-index: 1;
}
.login-point {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: rgba(255,255,255,.92);
}
.login-point i {
  width: 20px; height: 20px; flex: none; margin-top: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-style: normal; font-size: 11px;
}
.login-side footer {
  font-size: 12px; color: rgba(255,255,255,.5);
  position: relative; z-index: 1;
}

.login-main { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-size: 24px; margin: 0 0 6px; font-weight: 650; letter-spacing: .2px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 30px; }

/* ============================================================
   表单控件
   ============================================================ */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 12.5px; color: var(--text-2);
  margin-bottom: 7px; font-weight: 600; letter-spacing: .3px;
}
.field .hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.req { color: var(--red); margin-left: 3px; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:hover, .select:hover, .textarea:hover { border-color: #CBD3CA; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3.5px rgba(46, 125, 79, .12);
}
.input::placeholder { color: var(--faint); }
.textarea { resize: vertical; min-height: 76px; line-height: 1.7; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5L6 8.5L10 4.5' stroke='%237A857E' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px; font-weight: 550;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: #C8D0C6; background: #FAFBF9; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #35905C, #2A7249);
  border-color: #276B44;
  color: #fff;
  box-shadow: 0 1px 2px rgba(26, 74, 48, .25), 0 4px 12px -3px rgba(46, 125, 79, .45);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3A9C63, #2E7D4F);
  border-color: #276B44;
  box-shadow: 0 2px 4px rgba(26, 74, 48, .25), 0 6px 18px -3px rgba(46, 125, 79, .55);
}
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--green-l2); box-shadow: none; }
.btn-danger { color: var(--red); border-color: #ECD4CB; background: #fff; box-shadow: none; }
.btn-danger:hover { background: var(--red-l); border-color: #DFB7AA; box-shadow: none; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; padding: 11px 16px; font-size: 14.5px; }

/* ============================================================
   应用外壳
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

/* ---- 深绿侧栏 ---- */
.sidebar {
  width: var(--sidebar); flex: none;
  background: linear-gradient(180deg, #102A1B 0%, #163524 70%, #1A3F2A 100%);
  color: rgba(255,255,255,.88);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sb-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sb-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #3E9E67, #2A7249);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  flex: none;
  box-shadow: 0 3px 10px -2px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.22);
}
.sb-name { font-size: 14px; font-weight: 650; line-height: 1.3; color: #fff; letter-spacing: .3px; }
.sb-org {
  font-size: 11.5px; color: rgba(255,255,255,.48);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 152px;
}

.sb-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.sb-group {
  font-size: 10.5px; color: rgba(255,255,255,.34);
  padding: 14px 10px 7px;
  letter-spacing: 1.2px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 11px;
  border-radius: 9px;
  color: rgba(255,255,255,.68);
  font-size: 13.5px; font-weight: 480;
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(62, 158, 103, .30), rgba(62, 158, 103, .12));
  color: #fff; font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3.5px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #4DB57C;
  box-shadow: 0 0 8px rgba(77, 181, 124, .8);
}
.nav-item .ico {
  width: 18px; height: 18px; flex: none;
  display: grid; place-items: center;
  opacity: .8;
}
.nav-item.active .ico { opacity: 1; }
.nav-item .ico svg { width: 17px; height: 17px; }
.nav-item .badge {
  margin-left: auto;
  background: #D65A3E;
  color: #fff;
  font-size: 11px; font-weight: 600;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: grid; place-items: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(214, 90, 62, .4);
}

.sb-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 13px 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 33px; height: 33px; border-radius: 50%;
  background: linear-gradient(135deg, #3E9E67, #256543);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 650;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.sb-user-name { font-size: 13px; font-weight: 550; line-height: 1.3; color: #fff; }
.sb-user-post { font-size: 11.5px; color: rgba(255,255,255,.45); }
.sb-foot .btn-ghost { color: rgba(255,255,255,.55); }
.sb-foot .btn-ghost:hover { background: rgba(255,255,255,.09); color: #fff; }

/* ---------------- 主区 ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 58px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  gap: 14px; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--text); font-weight: 650; font-size: 14px; }
.topbar .spacer { flex: 1; }
.topbar-org {
  font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46,125,79,.14);
}

.view { padding: 28px 30px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }

.page-head { margin-bottom: 24px; display: flex; align-items: flex-end; gap: 16px; }
.page-head h1 { font-size: 23px; font-weight: 700; margin: 0; letter-spacing: .2px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }
.page-actions { display: flex; gap: 9px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14.5px; font-weight: 650; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head h3::before {
  content: "";
  width: 4px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #3E9E67, #2A7249);
}
.card-head .spacer { flex: 1; }
.card-body { padding: 20px 22px; }

/* ---------------- KPI ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; gap: 15px; align-items: flex-start;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #C9DCCF;
}
.k-ico {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  display: grid; place-items: center;
}
.k-ico svg { width: 22px; height: 22px; }
.k-ico.t-green { background: var(--green-l); color: var(--green-d); }
.k-ico.t-amber { background: var(--amber-l); color: var(--amber); }
.k-ico.t-blue  { background: var(--blue-l);  color: var(--blue); }
.k-ico.t-red   { background: var(--red-l);   color: var(--red); }
.k-ico.t-gray  { background: #F0F2EF;        color: var(--muted); }

/* 地块切换胶囊 */
.chip {
  flex: none;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.chip:hover { border-color: #C3D4C8; color: var(--text); }
.chip.on {
  background: var(--green-d);
  border-color: var(--green-d);
  color: #fff;
  box-shadow: 0 4px 12px rgba(31,77,54,.22);
}
.chip.on .faint { color: rgba(255,255,255,.66); }
.kpi .k-main { min-width: 0; flex: 1; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .k-value {
  font-size: 30px; font-weight: 700; line-height: 1.2;
  margin-top: 4px; letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi .k-value small {
  font-size: 12.5px; font-weight: 450;
  color: var(--muted); margin-left: 4px; letter-spacing: 0;
}
.kpi .k-sub { font-size: 12px; color: var(--faint); margin-top: 4px; }
.kpi.warn .k-value { color: var(--amber); }
.kpi.bad  .k-value { color: var(--red); }
.kpi.good .k-value { color: var(--green); }

/* ---------------- 通用 ---------------- */
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 12px; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3px; }
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.hidden { display: none !important; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-side { display: grid; grid-template-columns: 1fr 350px; gap: 18px; align-items: start; }

/* ---------------- 徽标 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 550;
  background: var(--line-2);
  color: var(--text-2);
  white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.tag.plain::before { display: none; }
.tag-green { background: var(--green-l); color: var(--green-d); }
.tag-amber { background: var(--amber-l); color: var(--amber); }
.tag-red   { background: var(--red-l);   color: var(--red); }
.tag-blue  { background: var(--blue-l);  color: var(--blue); }
.tag-gray  { background: #F0F2EF; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 1.5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: #F3F5F1;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
}

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11.5px; font-weight: 600;
  color: var(--faint);
  letter-spacing: .8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 10px; }
.table th:last-child { border-top-right-radius: 10px; }
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  vertical-align: middle;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--green-l2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- 进度 / 门禁 ---------------- */
.gate-list { display: flex; flex-direction: column; gap: 2px; }
.gate {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  transition: background .12s;
}
.gate:hover { background: var(--green-l2); }
.gate-mark {
  width: 21px; height: 21px; border-radius: 50%;
  flex: none; margin-top: 1px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.gate.ok .gate-mark { background: var(--green-l); color: var(--green-d); }
.gate.no .gate-mark { background: var(--red-l); color: var(--red); }
.gate-name { font-size: 13.5px; font-weight: 550; }
.gate-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.gate-code { font-size: 11px; color: var(--faint); font-family: ui-monospace, monospace; margin-right: 6px; }

.bar { height: 7px; border-radius: 4px; background: #EDF0EA; overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #3E9E67, #2A7249);
  transition: width .5s cubic-bezier(.25, .8, .35, 1);
}
.bar > i.c-red   { background: linear-gradient(90deg, #D3704F, #B8432C); }
.bar > i.c-amber { background: linear-gradient(90deg, #D9A23E, #B07C1E); }
.bar > i.c-blue  { background: linear-gradient(90deg, #5B8CB8, #33628F); }
.bar > i.c-gray  { background: #C9D0C8; }

.axis { display: flex; flex-direction: column; gap: 12px; }
.axis-row { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; }
.axis-row .lab { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.axis-row .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }

/* 批次状态条 */
.status-row { display: flex; align-items: center; gap: 12px; padding: 7.5px 0; }
.status-row .name { width: 56px; font-size: 12.5px; color: var(--text-2); }
.status-row .bar { flex: 1; }
.status-row .cnt { width: 26px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------------- 阶段条 ---------------- */
.steps { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0 2px; }
.step {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px; min-width: 84px; position: relative; flex: 1;
}
.step .dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
  display: grid; place-items: center;
  font-size: 10.5px; color: var(--faint); font-weight: 650;
  z-index: 1; position: relative;
  transition: all .2s;
}
.step .txt { font-size: 11.5px; color: var(--faint); text-align: center; line-height: 1.3; }
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px -2px rgba(46,125,79,.5); }
.step.done .txt { color: var(--green-d); }
.step.cur .dot {
  border-color: var(--green); color: var(--green); background: #fff;
  box-shadow: 0 0 0 4.5px rgba(46,125,79,.13);
}
.step.cur .txt { color: var(--green-d); font-weight: 650; }
.step::after {
  content: ""; position: absolute; top: 12px; left: 50%; width: 100%;
  height: 2px; background: var(--line-2); z-index: 0;
}
.step:last-child::after { display: none; }
.step.done::after { background: var(--green-l); }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico {
  width: 50px; height: 50px; border-radius: 15px;
  background: var(--green-l2);
  border: 1px solid var(--green-l);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  font-size: 21px;
  color: var(--green-d);
}
.empty h4 { margin: 0 0 6px; font-size: 14.5px; color: var(--text); font-weight: 650; }
.empty p { margin: 0 0 16px; font-size: 13px; }

/* ---------------- 提示条 ---------------- */
.notice {
  display: flex; gap: 11px;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 13px; line-height: 1.65;
  background: var(--green-l2);
  border: 1px solid #DCE9E0;
  color: var(--text-2);
}
.notice .ni { flex: none; font-size: 14px; line-height: 1.4; }
.notice b { color: var(--text); font-weight: 650; }
.notice.warn { background: var(--amber-l); border-color: #EFE1C2; color: #6E4E15; }
.notice.bad  { background: var(--red-l);   border-color: #F0D5CB; color: #7C2E1C; }
.notice.info { background: var(--blue-l);  border-color: #D7E3EF; color: #24486B; }

/* ---------------- Toast ---------------- */
.toast-host {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #22312A;
  color: #fff;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 13.5px;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  animation: toastIn .2s ease-out;
  max-width: 520px;
}
.toast.err { background: #83301D; }
.toast.ok  { background: #256A43; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------- 模态框 ---------------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(18, 30, 23, .42);
  backdrop-filter: blur(3px);
  z-index: 500;
  /* flex 居中：grid 的 max-content 轨道在手机上会把弹窗撑出屏幕 */
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  animation: popIn .18s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.modal.wide { max-width: 720px; }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 9px;
}

/* ---------------- 键值列表 ---------------- */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

/* ---------------- 追溯公开页 ---------------- */
.trace-page {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 0 40px;
  min-height: 100vh;
  background: #fff;
}
.trace-hero {
  background:
    radial-gradient(500px 300px at 85% -20%, rgba(255,255,255,.1), transparent 60%),
    linear-gradient(160deg, #143823, #2E7D4F);
  color: #fff;
  padding: 32px 26px 28px;
  border-radius: 0 0 24px 24px;
}
.trace-hero .badge-ok {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.24);
  padding: 3.5px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 14px;
}
.trace-hero h1 { font-size: 23px; margin: 0 0 5px; font-weight: 650; }
.trace-hero .sub { font-size: 13px; color: rgba(255,255,255,.75); }
.trace-body { padding: 18px 20px; }
.trace-sec-title {
  font-size: 13.5px; font-weight: 650; color: var(--text);
  margin: 24px 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.trace-sec-title::before {
  content: "";
  width: 3.5px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #3E9E67, #2A7249);
}
.tl { position: relative; padding-left: 20px; }
.tl::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 15px; }
.tl-item::before {
  content: ""; position: absolute; left: -19px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green);
}
.tl-item .t { font-size: 13.5px; font-weight: 550; }
.tl-item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------- 打印 ---------------- */
@media print {
  .sidebar, .topbar, .page-actions, .btn { display: none !important; }
  .view { padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-side { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 100;
    transform: translateX(-100%);
    transition: transform .2s;
    box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-flex !important; }
  .view { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { flex-direction: column; gap: 10px; padding: 16px; }
  .kpi .k-value { font-size: 24px; }
  .topbar { padding: 0 14px; }
}
.menu-btn { display: none; }

/* ============================================================
   环境监测 / 安防监控 v3
   ============================================================ */

/* ---- 过滤条 ---- */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip-sm { padding: 4px 11px; font-size: 12.5px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px;
  padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: .16s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--green); color: #fff; }

/* ---- 状态条 ---- */
.env-status {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow: hidden;
}
.es-item {
  padding: 12px 16px; border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.es-item:last-child { border-right: 0; }
.es-k { font-size: 11.5px; color: var(--faint); }
.es-item b { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.es-item .tag { align-self: flex-start; font-size: 10.5px; padding: 0 6px; }

/* ---- 演示条 ---- */
.demo-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #FBF7EC; border: 1px solid #EADFC4; border-radius: 10px;
  padding: 9px 14px; margin-bottom: 16px; font-size: 12.5px; color: #6E5A2E;
}
.demo-tag {
  background: #A06A17; color: #fff; font-size: 11px; padding: 1px 8px;
  border-radius: 20px; font-weight: 600; letter-spacing: .3px;
}

/* ---- 指标分组 ---- */
.env-group + .env-group { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.eg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eg-head b { font-size: 13.5px; font-weight: 600; }
.eg-head .tag { margin-left: auto; }

.env-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.env-metric {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 10px;
  background: var(--card); transition: border-color .16s, box-shadow .16s; position: relative;
}
.env-metric:hover { border-color: #CFDDD3; box-shadow: var(--shadow-sm); }
.em-top { display: flex; align-items: center; gap: 6px; }
.em-label { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.em-top .tag { margin-left: auto; font-size: 10.5px; padding: 0 6px; }
.em-value { font-size: 26px; font-weight: 600; letter-spacing: -.6px; margin: 4px 0 0; line-height: 1.25; font-variant-numeric: tabular-nums; }
.em-value small { font-size: 12px; font-weight: 500; color: var(--faint); margin-left: 3px; letter-spacing: 0; }
.em-sub { font-size: 11px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-spark { width: 100%; height: 34px; display: block; margin-top: 8px; }
.em-spark-empty { height: 34px; margin-top: 8px; border-bottom: 1px dashed var(--line); }
.em-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

/* ---- 适宜性 + 视频 双栏 ---- */
.env-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.suit-wrap { display: flex; gap: 22px; align-items: center; }
.suit-ring { position: relative; width: 92px; height: 92px; flex: none; }
.suit-ring svg { width: 92px; height: 92px; }
.suit-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 600; letter-spacing: -.5px;
}
.suit-num small { font-size: 10px; font-weight: 500; color: var(--faint); margin-left: 1px; }
.suit-dims { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.sd-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.sd-bar { height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.sd-bar i { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }

/* ---- 视频缩略 ---- */
.cam-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cam-mini {
  position: relative; aspect-ratio: 16 / 10; background: #1F2A25;
  border-radius: 9px; overflow: hidden; border: 1px solid #2B3730;
}
.cam-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-mini.off { opacity: .78; }
.cm-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #55705F; }
.cm-ph svg { width: 22px; height: 22px; }
.cm-top, .cm-bottom {
  position: absolute; left: 0; right: 0; padding: 4px 7px; font-size: 10px;
  color: #D6E3DA; display: flex; align-items: center; gap: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.cm-top { top: 0; background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent); font-family: ui-monospace, monospace; }
.cm-bottom { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,.5), transparent); }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot.on { background: #4ADE80; box-shadow: 0 0 0 2px rgba(74,222,128,.25); }
.dot.off { background: #9CA3AF; }
.cam-empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 22px 12px;
  text-align: center; color: var(--muted); font-size: 12.5px;
}

/* ---- 趋势 ---- */
.trend-box { border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px 0; background: var(--card); }
.trend-chart { width: 100%; height: 240px; display: block; }
.trend-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.trend-legend b { color: var(--text); font-weight: 600; margin-left: 3px; }
.chart-empty { padding: 46px 0; text-align: center; color: var(--faint); font-size: 12.5px; }

/* ---- 法定检测条 ---- */
.report-strip {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px;
  border-left: 3px solid var(--green); background: var(--green-l2);
  border-bottom: 1px solid var(--line-2);
}

/* ---- 表单栅格 ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---- 安防画面墙 ---- */
.cam-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cam-feed { min-width: 0; }
.cam-screen {
  position: relative; aspect-ratio: 16 / 9; background: #18211D;
  border-radius: 11px; overflow: hidden; border: 1px solid #27332C;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.cam-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-feed.is-off .cam-screen { background: #1A231F; }
.cam-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; color: #5E7A69; text-align: center;
  background:
    radial-gradient(120px 80px at 50% 40%, rgba(94,122,105,.14), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 10px, transparent 10px 20px);
}
.cam-ph-ico svg { width: 26px; height: 26px; }
.cam-ph-text { font-size: 12.5px; color: #93AC9C; letter-spacing: .5px; }
.cam-ph-sub { font-size: 10.5px; color: #55705F; }
.f-top {
  position: absolute; top: 0; left: 0; right: 0; padding: 7px 10px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
  font-size: 10.5px; color: #DCE8E0;
}
.f-dev { font-family: ui-monospace, monospace; letter-spacing: .3px; }
.f-state { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; letter-spacing: .6px; }
.f-state::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.f-state.s-live { color: #6EE7A0; }
.f-state.s-off { color: #F0A9A0; }
.f-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 7px 10px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  font-size: 11px; color: #DCE8E0;
}
.f-off-tip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(194,73,47,.92); color: #fff; font-size: 11px;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
}
.cam-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 7px 2px 0; }

/* ---- 事件流 ---- */
.ev-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); }
.ev-row:last-child { border-bottom: 0; }
.ev-ava {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.k-person { background: var(--blue-l); color: var(--blue); }
.k-animal { background: var(--amber-l); color: var(--amber); }
.k-vehicle { background: #EEF0F8; color: #4B5A9B; }
.k-fire { background: var(--red-l); color: var(--red); }
.k-sys { background: var(--line-2); color: var(--muted); }
.ev-main { flex: 1; min-width: 0; }
.ev-title { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; flex-wrap: wrap; }
.ev-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ev-meta { font-size: 11px; color: var(--faint); margin-top: 3px; }

@media (max-width: 1180px) {
  .env-status { grid-template-columns: repeat(3, 1fr); }
  .es-item:nth-child(3) { border-right: 0; }
  .env-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .env-status { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .cam-wall { grid-template-columns: 1fr; }
}

/* ============================================================
   大屏投放（1920×1080 优先，深色）
   ============================================================ */
.wall-page {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1400px 620px at 20% -10%, rgba(46,125,79,.20), transparent 60%),
    radial-gradient(1100px 520px at 95% 105%, rgba(46,125,79,.13), transparent 60%),
    #07110D;
  color: #E6F0EA;
  padding: clamp(12px, 1.4vh, 20px) clamp(14px, 1.6vw, 26px);
  gap: clamp(8px, 1vh, 14px);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.wall-inner { flex: 1; display: flex; flex-direction: column; gap: inherit; min-height: 0; }
.wall-loading { flex: 1; display: flex; align-items: center; justify-content: center; }

/* 顶栏 */
.wall-head {
  display: flex; align-items: center; gap: 20px;
  padding: 0 4px clamp(6px, .8vh, 10px);
  border-bottom: 1px solid rgba(94,150,120,.22);
}
.wh-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wh-logo {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, #2E7D4F, #1C4F33);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .5px; color: #DFF3E6;
  box-shadow: 0 0 0 1px rgba(120,200,160,.28), 0 6px 18px -6px rgba(0,0,0,.6);
}
.wh-title { font-size: clamp(16px, 1.45vw, 24px); font-weight: 600; letter-spacing: .5px; line-height: 1.25; }
.wh-sub { font-size: clamp(11px, .78vw, 13px); color: #7E9C8B; margin-top: 3px; letter-spacing: .3px; }
.wh-clock { margin-left: auto; text-align: right; }
.wc-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(22px, 2.1vw, 34px); font-weight: 600; letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums; color: #DFF3E6; line-height: 1.1;
}
.wc-date { font-size: clamp(10px, .74vw, 12.5px); color: #7E9C8B; letter-spacing: .5px; }
.wh-right { display: flex; align-items: center; gap: 8px; margin-left: 18px; }
.wh-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: clamp(11px, .78vw, 13px); color: #A7C2B1;
  border: 1px solid rgba(94,150,120,.28); background: rgba(20,40,32,.55);
  padding: 5px 11px; border-radius: 20px; white-space: nowrap;
}
.wh-dot { width: 6px; height: 6px; border-radius: 50%; background: #6B8578; }
.wh-dot.on { background: #5FB98A; box-shadow: 0 0 0 3px rgba(95,185,138,.18); }
.wh-exit {
  font-size: clamp(11px, .78vw, 13px); color: #9FB8A9; text-decoration: none;
  border: 1px solid rgba(94,150,120,.34); padding: 5px 12px; border-radius: 20px;
  transition: .18s;
}
.wh-exit:hover { color: #DFF3E6; border-color: rgba(120,200,160,.6); background: rgba(46,125,79,.2); }

/* 主体三列 */
.wall-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: clamp(230px, 19vw, 320px) minmax(0, 1fr) clamp(300px, 25vw, 420px);
  gap: clamp(8px, 1vw, 14px);
}
.wall-col { display: flex; flex-direction: column; gap: clamp(8px, 1vh, 14px); min-height: 0; min-width: 0; }

.panel {
  background: linear-gradient(180deg, rgba(18,36,28,.86), rgba(13,28,22,.78));
  border: 1px solid rgba(94,150,120,.22);
  border-radius: 12px; display: flex; flex-direction: column; min-height: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 10px 30px -18px rgba(0,0,0,.8);
  overflow: hidden;
}
.pn-grow { flex: 1; }
.pn-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: clamp(7px, .9vh, 11px) 14px;
  font-size: clamp(12px, .86vw, 14px); font-weight: 600; color: #CFE3D7;
  letter-spacing: .4px; border-bottom: 1px solid rgba(94,150,120,.16);
}
.pn-bar { width: 3px; height: 13px; border-radius: 2px; background: #4FA377; flex: none; }
.pn-note { margin-left: auto; font-size: clamp(10px, .7vw, 11.5px); font-weight: 400; color: #6E8A7B; letter-spacing: 0; }
.pn-foot {
  flex: none; padding: 7px 14px 9px; font-size: clamp(9.5px, .66vw, 11px);
  color: #6E8A7B; line-height: 1.45; border-top: 1px solid rgba(94,150,120,.1);
}

/* 地块信息 */
.plot-block { padding: 12px 14px 14px; }
.pb-name { font-size: clamp(17px, 1.35vw, 22px); font-weight: 600; color: #EAF4EE; letter-spacing: .5px; }
.pb-code { font-family: ui-monospace, monospace; font-size: clamp(10px, .72vw, 12px); color: #6E8A7B; margin-top: 3px; letter-spacing: .4px; }
.pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 14px; }
.pb-kv { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pb-kv span { font-size: clamp(9.5px, .66vw, 11px); color: #6E8A7B; }
.pb-kv b { font-size: clamp(12px, .84vw, 14px); font-weight: 550; color: #CFE3D7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 适宜性 */
.score-wrap { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.score-ring { position: relative; width: clamp(84px, 6.4vw, 104px); height: clamp(84px, 6.4vw, 104px); flex: none; }
.score-ring svg { width: 100%; height: 100%; }
.score-ring.tone-ok { color: #5FB98A; }
.score-ring.tone-low { color: #E0B65F; }
.score-ring.tone-high { color: #E07A5F; }
.score-ring.tone-none { color: #6E8A7B; }
.score-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(22px, 1.7vw, 28px); font-weight: 600; color: #EAF4EE; letter-spacing: -.5px;
}
.score-num small { font-size: 10px; color: #6E8A7B; margin-left: 1px; font-weight: 400; }
.score-dims { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.sd-t { display: flex; justify-content: space-between; font-size: clamp(10px, .72vw, 12px); color: #9FB8A9; margin-bottom: 3px; }
.sd-t b { color: #CFE3D7; font-weight: 550; }
.sd-b { height: 5px; border-radius: 3px; background: rgba(120,160,140,.14); overflow: hidden; }
.sd-b i { display: block; height: 100%; border-radius: 3px; }
.sd-b i.tone-ok { background: #5FB98A; }
.sd-b i.tone-low { background: #E0B65F; }
.sd-b i.tone-high { background: #E07A5F; }
.sd-b i.tone-none { background: #4A6156; }

/* 偏离提醒 */
.alert-list { padding: 6px 8px 10px; overflow: auto; }
.al-row {
  display: grid; grid-template-columns: 42px 1fr auto 42px; align-items: center; gap: 8px;
  padding: 6px 6px; border-bottom: 1px dashed rgba(94,150,120,.14);
  font-size: clamp(10.5px, .74vw, 12.5px);
}
.al-row:last-child { border-bottom: 0; }
.al-date { color: #6E8A7B; font-family: ui-monospace, monospace; }
.al-name { color: #BFD5C7; }
.al-val { color: #EAF4EE; font-family: ui-monospace, monospace; }
.al-val i { font-style: normal; color: #6E8A7B; font-size: 9.5px; margin-left: 2px; }
.al-tag { text-align: center; border-radius: 4px; padding: 1px 0; font-size: 10px; }
.al-tag.t-high { background: rgba(224,122,95,.16); color: #E07A5F; }
.al-tag.t-low { background: rgba(224,182,95,.16); color: #E0B65F; }
.al-none { padding: 16px 8px; color: #6E8A7B; font-size: 11.5px; text-align: center; }

/* 画面墙 */
.wall-cams { flex: 1; min-height: 0; padding: clamp(6px, .8vh, 10px); display: flex; flex-direction: column; gap: 6px; }
.cam-grid { flex: 1; min-height: 0; display: grid; gap: clamp(6px, .7vw, 10px); }
.cam-grid.cam-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.cam-grid.cam-n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.cam-grid.cam-n3, .cam-grid.cam-n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.cam-grid.cam-n3 .cam-cell:first-child { grid-row: span 2; }
.cam-cell {
  position: relative; border-radius: 9px; overflow: hidden;
  background: #0C1A14; border: 1px solid rgba(94,150,120,.2); min-height: 0;
}
.cam-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-cell.off { border-color: rgba(224,122,95,.35); }
.cam-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; color: #3E5B4C;
  background:
    radial-gradient(220px 140px at 50% 45%, rgba(70,120,95,.12), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 12px, transparent 12px 24px);
}
.cam-ph-ico svg { width: clamp(24px, 2vw, 34px); height: clamp(24px, 2vw, 34px); }
.cam-ph-t { font-size: clamp(11px, .8vw, 13.5px); letter-spacing: 1px; color: #55705F; }
.cam-top, .cam-bot {
  position: absolute; left: 0; right: 0; display: flex; align-items: center;
  justify-content: space-between; padding: 6px 10px;
  font-size: clamp(9.5px, .68vw, 11.5px); color: #D6E3DA;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.cam-top { top: 0; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); }
.cam-bot { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,.62), transparent); }
.cam-id { font-family: ui-monospace, monospace; letter-spacing: .5px; }
.cam-state { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; letter-spacing: .8px; }
.cam-state::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cam-state.live { color: #6EE7A0; }
.cam-state.off { color: #F0A9A0; }
.cam-name { font-weight: 500; }
.cam-time { font-family: ui-monospace, monospace; opacity: .85; }
.cam-off-tip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(194,73,47,.9); color: #fff; font-size: clamp(10px, .72vw, 12px);
  padding: 5px 11px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.7);
}
.cam-none { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #6E8A7B; font-size: 13px; text-align: center; }
.cam-none span { font-size: 11px; color: #4E6A5B; }
.cam-pager { display: flex; justify-content: center; gap: 5px; flex: none; }
.cam-pager i { width: 16px; height: 3px; border-radius: 2px; background: rgba(120,160,140,.22); }
.cam-pager i.on { background: #5FB98A; }

/* 关键趋势 */
.wall-trends { flex: none; }
.trend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px 12px 12px; }
.tr-cell { min-width: 0; }
.tr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.tr-top span { font-size: clamp(10px, .72vw, 12px); color: #8FA99A; }
.tr-top b { font-size: clamp(14px, 1.1vw, 18px); font-weight: 600; color: #EAF4EE; font-variant-numeric: tabular-nums; }
.tr-top b i { font-style: normal; font-size: 9.5px; color: #6E8A7B; margin-left: 2px; font-weight: 400; }
.wc-svg { width: 100%; height: clamp(34px, 4.2vh, 54px); display: block; }
.wc-empty { height: clamp(34px, 4.2vh, 54px); display: flex; align-items: center; justify-content: center; color: #4E6A5B; font-size: 10.5px; border-bottom: 1px dashed rgba(94,150,120,.16); }
.tr-foot { display: flex; justify-content: space-between; font-size: clamp(9px, .64vw, 10.5px); color: #5E7A69; margin-top: 3px; }

/* 九项指标 */
.metric-grid {
  flex: 1; min-height: 0; padding: clamp(6px, .8vh, 10px);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: clamp(6px, .7vw, 9px);
}
.m-cell {
  border: 1px solid rgba(94,150,120,.18); border-radius: 9px;
  padding: 8px 10px 6px; background: rgba(12,26,20,.6);
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.m-cell.m-high { border-color: rgba(224,122,95,.4); background: rgba(224,122,95,.06); }
.m-cell.m-low { border-color: rgba(224,182,95,.36); background: rgba(224,182,95,.05); }
.m-top { display: flex; align-items: center; justify-content: space-between; font-size: clamp(10px, .72vw, 12px); color: #8FA99A; }
.m-dot { width: 5px; height: 5px; border-radius: 50%; background: #5FB98A; }
.m-high .m-dot { background: #E07A5F; }
.m-low .m-dot { background: #E0B65F; }
.m-none .m-dot { background: #4E6A5B; }
.m-info .m-dot { background: #6E9BC4; }
.m-val {
  font-size: clamp(18px, 1.6vw, 27px); font-weight: 600; color: #EAF4EE;
  letter-spacing: -.5px; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m-val small { font-size: 10px; font-weight: 400; color: #6E8A7B; margin-left: 2px; letter-spacing: 0; }
.m-chart { flex: 1; min-height: 24px; margin: 2px 0; display: flex; align-items: flex-end; }
.m-chart .wc-svg { height: 26px; }
.m-foot { display: flex; justify-content: space-between; font-size: clamp(9px, .64vw, 10.5px); color: #5E7A69; }
.m-high .m-foot span:first-child { color: #E07A5F; }
.m-low .m-foot span:first-child { color: #E0B65F; }

/* 底栏 */
.wall-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 0; border-top: 1px solid rgba(94,150,120,.18);
  font-size: clamp(10px, .7vw, 12px); color: #6E8A7B; letter-spacing: .3px;
}
.wf-right { font-family: ui-monospace, monospace; }

/* 地块滚动带：所有地块及其设备在线情况 */
.wall-ribbon { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.wall-ribbon:empty { display: none; }
.rb-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 9px;
  border: 1px solid rgba(94,150,120,.2); background: rgba(16,32,25,.5); color: #9FB8A9;
  font-size: clamp(11px, .76vw, 13px); cursor: pointer; transition: .18s;
  font-family: inherit; white-space: nowrap;
}
.rb-item:hover { border-color: rgba(120,200,160,.45); color: #CFE3D7; }
.rb-item.on {
  border-color: rgba(95,185,138,.7); background: rgba(46,125,79,.22); color: #EAF4EE;
  box-shadow: inset 0 0 0 1px rgba(95,185,138,.14);
}
.rb-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.rb-dot.ok { background: #5FB98A; }
.rb-dot.warn { background: #E0B65F; }
.rb-name { font-weight: 600; letter-spacing: .3px; }
.rb-meta { color: #6E8A7B; font-size: .92em; }
.rb-item.on .rb-meta { color: #8FB8A1; }

/* 本块采集设备 */
.pb-dev { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(94,150,120,.18); }
.pb-dev-k { display: block; font-size: clamp(9.5px, .66vw, 11px); color: #6E8A7B; margin-bottom: 6px; }
.pb-dev-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: clamp(9.5px, .68vw, 11.5px); font-family: ui-monospace, monospace;
  padding: 3px 8px; border-radius: 6px; color: #BFD5C7;
  border: 1px solid rgba(94,150,120,.24); background: rgba(12,26,20,.5);
}
.dev-chip i { width: 5px; height: 5px; border-radius: 50%; background: #5FB98A; }
.dev-chip.off { color: #E0A79B; border-color: rgba(224,122,95,.35); }
.dev-chip.off i { background: #E07A5F; }
.dev-none { font-size: clamp(9.5px, .68vw, 11.5px); color: #6E8A7B; }

/* 指标来源标记 */
.m-src {
  font-style: normal; font-size: 9px; line-height: 1.5; color: #6E8A7B;
  border: 1px solid rgba(94,150,120,.28); border-radius: 3px; padding: 0 3px;
  margin-left: auto; margin-right: 6px; flex: none;
}

/* 轮播进度条 */
.rt-bar { height: 2px; background: rgba(94,150,120,.14); flex: none; overflow: hidden; }
.rt-bar i {
  display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3E8B63, #6FD3A0);
  transform-origin: left center; animation-name: rtFill; animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes rtFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 地块切换圆点 */
.plot-pager { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px 11px; flex: none; }
.plot-pager:empty { display: none; }
.pp-dot {
  border: 0; background: transparent; padding: 3px; cursor: pointer; line-height: 0;
}
.pp-dot i {
  display: block; width: 18px; height: 3px; border-radius: 2px;
  background: rgba(120,160,140,.26); transition: .2s;
}
.pp-dot:hover i { background: rgba(140,200,170,.5); }
.pp-dot.on i { background: #5FB98A; width: 26px; }

/* 切块时的轻入场 */
.card-in { animation: cardIn .42s ease both; }
@keyframes cardIn {
  from { opacity: .25; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card-in { animation: none; }
  .rt-bar i { animation: none; transform: scaleX(1); opacity: .5; }
}

@media (max-width: 1420px) {
  .wall-body { grid-template-columns: 230px minmax(0, 1fr) 310px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .trend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .wall-body { grid-template-columns: 1fr; overflow: auto; }
  .wall-left, .wall-right { flex-direction: row; flex-wrap: wrap; }
  .wall-page { overflow: auto; }
}

/* ---------------- 农户小程序接入 ---------------- */
/* 合作主体卡片：比筛选胶囊多两行信息，所以单独一套，不复用 .chip */
.imp-chip {
  flex: none;
  min-width: 156px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
}
.imp-chip:hover { border-color: #C3D4C8; box-shadow: 0 2px 8px rgba(31,77,54,.06); }
.imp-chip.on {
  border-color: var(--green);
  background: var(--green-l2);
  box-shadow: 0 4px 12px rgba(31,77,54,.12);
}
.imp-chip.on .tiny { color: var(--green-d); }

/* 勾选表：已接入的行压暗，避免误以为还能再选一次 */
.imp-pick { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.imp-pick:disabled { cursor: not-allowed; }

/* ---------------- 批次影像依据 ---------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.media-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #FBFCFA;
}
.media-item video {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 7px;
  background: #0D1512;
  display: block;
}
.media-title {
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--red); }
.media-add {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

/* ---------------- 溯源标签打印 ---------------- */
.label-page {
  min-height: 100vh;
  background: #EDEFE9;
  padding-bottom: 48px;
}
.lp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
}
.lp-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.lp-field .select { width: auto; padding: 6px 26px 6px 10px; font-size: 12.5px; }
.lp-field .input { padding: 6px 9px; font-size: 12.5px; }
.lp-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 20px 4px;
  font-size: 12px;
  color: var(--text-2);
}
.lp-meta b { color: var(--text); font-weight: 600; }
.lp-tip { padding: 16px 20px 0; line-height: 1.8; }

.label-sheet { padding: 16px 20px 0; display: grid; gap: 5mm; justify-content: start; }
.label-sheet.size-m { grid-template-columns: repeat(auto-fill, 70mm); }
.label-sheet.size-s { grid-template-columns: repeat(auto-fill, 50mm); }
.label-sheet.size-l { grid-template-columns: repeat(auto-fill, 100mm); }

.trace-label {
  background: #fff;
  border: 1px solid #C4CFC6;
  border-radius: 2mm;
  padding: 2.6mm 3mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 40, 30, .06);
  color: #1F2A24;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.size-m .trace-label { width: 70mm; height: 50mm; }
.size-s .trace-label { width: 50mm; height: 30mm; padding: 1.8mm 2mm; }
.size-l .trace-label { width: 100mm; height: 70mm; }

.tl-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 2.2mm;
  color: #5C6B62;
  letter-spacing: .2px;
  padding-bottom: 1mm;
  border-bottom: 1px solid #E3E9E4;
}
.tl-brand { font-weight: 600; }
.tl-idx { color: #97A69C; }

.tl-main { display: flex; gap: 2.4mm; flex: 1; min-height: 0; padding-top: 1.4mm; }
.tl-qr { width: 26mm; height: 26mm; display: block; image-rendering: pixelated; flex: none; }
.size-s .tl-qr { width: 17mm; height: 17mm; }
.size-l .tl-qr { width: 36mm; height: 36mm; }

.tl-info { flex: 1; min-width: 0; font-size: 2.3mm; line-height: 1.5; color: #33403a; }
.tl-crop { font-size: 3.3mm; font-weight: 700; color: #16211a; margin-bottom: .8mm; }
.size-s .tl-crop { font-size: 2.8mm; margin-bottom: .4mm; }
.tl-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row b { font-weight: 500; color: #7A8A80; margin-right: 1mm; }
.tl-batch, .tl-unit { font-size: 2.1mm; color: #55645b; }
.size-s .tl-batch { display: none; }
.size-s .tl-row:nth-child(3) { display: none; }

.tl-foot {
  margin-top: 1mm;
  padding-top: 1mm;
  border-top: 1px dashed #DDE5DF;
  font-size: 2mm;
  color: #6B7A70;
  text-align: center;
}
.size-s .tl-foot { display: none; }

@media print {
  @page { size: A4; margin: 8mm; }
  body { background: #fff; }
  .lp-bar, .lp-meta, .lp-tip, .label-page > .notice { display: none !important; }
  .label-page { background: #fff; padding: 0; min-height: 0; }
  .label-sheet { padding: 0; gap: 3mm; }
  .trace-label { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
}

/* ---------------- 公开追溯页：全流程与影像 ---------------- */
.trace-steps {
  display: flex;
  gap: 2px;
  margin: 18px 0 6px;
  padding: 14px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.trace-step { flex: 1; text-align: center; min-width: 0; }
.trace-step .dot {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50%;
  background: #F0F2EF;
  color: #93A099;
  font-size: 11px;
  line-height: 22px;
  font-weight: 600;
}
.trace-step.on .dot { background: var(--green); color: #fff; }
.trace-step .nm { font-size: 11px; color: var(--faint); margin-top: 6px; white-space: nowrap; }
.trace-step.on .nm { color: var(--text); font-weight: 500; }

.trace-sec-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--green-l);
  color: var(--green-d);
  font-size: 11px;
  font-weight: 400;
  vertical-align: 1px;
}

.trace-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 4px;
}
.trace-video {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.trace-video video {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: #0D1512;
  display: block;
}
.trace-video .cap { padding: 7px 10px 8px; font-size: 12px; }
.trace-video .cap .t { display: block; font-weight: 500; color: var(--text); }
.trace-video .cap .d { display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; }

.tl-photo {
  width: 100%;
  max-width: 220px;
  border-radius: 8px;
  margin-top: 6px;
  border: 1px solid var(--line-2);
  display: block;
}

.trace-unit {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
}

.trace-qr-card {
  margin: 22px 0 8px;
  padding: 20px 18px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.trace-qr-card img {
  width: 132px;
  height: 132px;
  display: block;
  margin: 0 auto 10px;
  image-rendering: pixelated;
}
.trace-qr-card .q { font-size: 12.5px; color: var(--text-2); }

/* ============================================================
   v4 生长档案时间轴 / 随手拍记录 / 移动端底部导航
   参考已上线 GAP 溯源小程序的可读性做法：环节分组、时间轴、
   大按钮、拍照优先、状态色单一语义
   ============================================================ */

/* ---------------- 生长档案时间轴 ---------------- */
.gtl { position: relative; margin: 2px 0 4px; padding-left: 26px; }
.gtl::before {
  content: ''; position: absolute; left: 8px; top: 6px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--green-l) 0%, var(--line) 55%, var(--line-2) 100%);
}
.gtl-month {
  position: relative; margin: 16px 0 8px -26px; padding-left: 26px;
  font-size: 11.5px; letter-spacing: .06em; color: var(--faint); font-weight: 600;
}
.gtl-item { position: relative; padding: 0 0 14px 2px; }
.gtl-item::before {
  content: ''; position: absolute; left: -23px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green);
  box-shadow: 0 0 0 3px #fff;
}
.gtl-item.k-seed::before { border-color: #6E8F3C; }
.gtl-item.k-farm::before { border-color: var(--green); }
.gtl-item.k-env::before { border-color: var(--blue); }
.gtl-item.k-warn::before { border-color: var(--amber); }
.gtl-item.k-bad::before { border-color: var(--red); }
.gtl-item.k-batch::before { border-color: #7A5EA8; }
.gtl-item.k-now::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }
.gtl-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gtl-name { font-size: 13.5px; font-weight: 600; }
.gtl-date { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.gtl-note { font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.65; }
.gtl-meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.gtl-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.gtl-photos { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.gtl-photos img {
  width: 54px; height: 54px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--green-l2);
}
.gtl-empty { font-size: 12.5px; color: var(--faint); padding: 10px 0 4px; }
.gtl-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px 0 12px; }
.gtl-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.gtl-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------------- 随手拍快捷记录 ---------------- */
.qr-head { margin-bottom: 14px; }
.qr-head h1 { font-size: 21px; margin: 0 0 4px; }
.qr-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.qr-shot {
  position: relative; width: 100%; min-height: 168px;
  border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--green-l2); display: grid; place-items: center;
  cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s;
}
.qr-shot:hover { border-color: var(--green); background: #EFF7F2; }
.qr-shot.has { border-style: solid; border-color: var(--line-2); padding: 0; background: #0D1512; }
.qr-shot img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.qr-shot .ph { text-align: center; color: var(--muted); padding: 22px 12px; }
.qr-shot .ph .big { font-size: 30px; line-height: 1; margin-bottom: 8px; color: var(--green); }
.qr-shot .ph .s { font-size: 12px; }
.qr-shot .badge {
  position: absolute; right: 10px; top: 10px; padding: 3px 9px; border-radius: 20px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; backdrop-filter: blur(4px);
}
.qr-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.qr-thumbs .th { position: relative; width: 58px; height: 58px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); }
.qr-thumbs .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-thumbs .th button {
  position: absolute; right: 0; top: 0; width: 18px; height: 18px; line-height: 16px;
  border: 0; border-radius: 0 7px 0 7px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; cursor: pointer; padding: 0;
}
.qr-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.qr-chip {
  padding: 8px 13px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: all .14s; display: inline-flex; align-items: center; gap: 6px;
}
.qr-chip:hover { border-color: var(--green); color: var(--green-d); }
.qr-chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 550; }
.qr-mic {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.qr-mic-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0; flex: none;
  background: var(--green); color: #fff; font-size: 21px; cursor: pointer;
  display: grid; place-items: center; transition: transform .12s, box-shadow .12s;
  box-shadow: 0 4px 14px -4px rgba(46,125,79,.6);
}
.qr-mic-btn:active { transform: scale(.94); }
.qr-mic-btn.rec { background: var(--red); animation: micPulse 1.4s infinite; }
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(194,73,47,.45); }
  70% { box-shadow: 0 0 0 14px rgba(194,73,47,0); }
  100% { box-shadow: 0 0 0 0 rgba(194,73,47,0); }
}
.qr-mic-txt { min-width: 0; }
.qr-mic-txt b { font-size: 13px; display: block; }
.qr-mic-txt span { font-size: 11.5px; color: var(--faint); line-height: 1.5; display: block; margin-top: 2px; }
.qr-loc {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 10px;
  background: var(--blue-l); font-size: 12px; color: var(--blue);
}
.qr-loc.ok { background: var(--green-l); color: var(--green-d); }
.qr-loc .spacer { flex: 1; }
.qr-score { text-align: center; padding: 6px 0 2px; }
.qr-score .ring {
  width: 104px; height: 104px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line-2) 0);
}
.qr-score .ring::after {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff;
}
.qr-score .ring b { position: relative; z-index: 1; font-size: 27px; font-weight: 600; }
.qr-score .ring b small { font-size: 12px; color: var(--faint); font-weight: 400; }
.qr-score .t { font-size: 13px; font-weight: 600; }
.qr-score .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.qr-tips { font-size: 11.5px; color: var(--faint); line-height: 1.8; }

/* ---------------- 移动端底部 tab ---------------- */
.mob-tab { display: none; }
@media (max-width: 860px) {
  .mob-tab {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: flex-end; justify-content: space-around;
    height: 58px; padding: 0 4px max(0px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mob-tab a, .mob-tab button {
    flex: 1; height: 100%; border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; color: var(--muted); text-decoration: none; padding: 0;
  }
  .mob-tab a.on { color: var(--green-d); font-weight: 600; }
  .mob-tab a.on svg { transform: translateY(-1px); }
  .mob-tab svg { width: 20px; height: 20px; }
  .mob-tab .plus {
    flex: none; width: 62px; position: relative;
  }
  .mob-tab .plus i {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    width: 48px; height: 48px; border-radius: 50%; background: var(--green);
    color: #fff; font-style: normal; font-size: 24px; line-height: 48px; text-align: center;
    box-shadow: 0 8px 18px -6px rgba(46,125,79,.7); border: 3px solid #fff;
  }
  .mob-tab .plus span {
    position: absolute; bottom: 8px; left: 0; right: 0;
    font-size: 10.5px; color: var(--green-d); font-weight: 600;
  }
  .main { padding-bottom: 64px; }
  .view { padding: 14px 14px 20px; }
  .page-head h1 { font-size: 19px; }
  .tl, .gtl { font-size: 13px; }
  .qr-shot { min-height: 140px; }
}

/* ============================================================
   v5 离线草稿队列 / 待补传徽标
   ============================================================ */
.nav-badge {
  margin-left: auto; flex: none;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--amber); color: #fff;
  font-size: 10.5px; font-style: normal; font-weight: 600; line-height: 18px;
  text-align: center; letter-spacing: 0;
}
.plus-badge {
  position: absolute; top: -20px; right: 4px;
  margin: 0; min-width: 17px; height: 17px; line-height: 17px;
  font-size: 10px; border: 2px solid #fff; box-sizing: content-box;
}
.draft-item { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.draft-item:last-of-type { border-bottom: 0; }
@media (max-width: 860px) {
  .nav-badge { font-size: 10px; }
}

.card.flash { outline: 2px solid var(--green); outline-offset: 2px; }

/* ============================================================
   v6 工作台 KPI 卡片可点（地块 / 批次总数 / 在途批次 / 平均评分）
   ============================================================ */
.kpi-link {
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
}
.kpi-link .k-main { padding-right: 18px; }
.kpi-link .k-go {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 24px; height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-l2);
  color: var(--green-d);
  font-size: 15px; line-height: 1; font-weight: 600;
  opacity: .55;
  transition: opacity .16s, transform .16s, background .16s;
}
.kpi-link:hover { border-color: var(--green); }
.kpi-link:hover .k-go {
  opacity: 1;
  background: var(--green);
  color: #fff;
  transform: translateX(2px);
}
.kpi-link:active { transform: translateY(-1px); }
.kpi-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 860px) {
  /* 手机上卡片变窄，箭头贴边容易压字，收小一点 */
  .kpi-link .k-main { padding-right: 14px; }
  .kpi-link .k-go { right: 8px; width: 20px; height: 20px; margin-top: -10px; font-size: 13px; }
}

/* ================= v8：登录页自助注册 ================= */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin: 0 0 22px;
  padding: 3px;
}
.auth-tabs .seg-btn {
  width: 100%;
  padding: 8px 0;
  font-size: 13px;
  text-align: center;
}
.auth-foot {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.auth-foot a {
  color: var(--green-d);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 122, 78, .3);
  padding-bottom: 1px;
  margin: 0 2px;
  transition: .16s;
}
.auth-foot a:hover { color: var(--green); border-bottom-color: var(--green); }
.auth-or { color: var(--faint); margin: 0 6px; }
.auth-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  line-height: 1.7;
}
/* 登录卡片内容变多，小屏时给点上下呼吸 */
@media (max-height: 760px) {
  .login-card h2 { font-size: 21px; }
  .login-card .sub { margin-bottom: 20px; }
  .login-card .field { margin-bottom: 14px; }
}

/* ================= v9：可编辑的品牌 / 基地名 / 头像 ================= */
.sb-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.sb-org-link {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 152px;
  text-decoration: none; cursor: pointer;
  border-radius: 5px;
  transition: color .16s, background .16s;
}
.sb-org-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.sb-org-pen { font-style: normal; font-size: 10px; opacity: 0; transition: opacity .16s; }
.sb-org-link:hover .sb-org-pen { opacity: .9; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* 组织页 / 弹窗里的品牌标识选择 */
.brand-row {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.brand-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-preview {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, #3E9E67, #2A7249);
  color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  overflow: hidden; flex: none;
}
.brand-preview.round { border-radius: 50%; }
.brand-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ================= v10：协议 / 隐私 / 找回密码 ================= */

/* ---- 协议同意行（注册必勾） ---- */
.agree-row { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 16px; }
.agree-check { position: relative; flex: none; width: 18px; height: 18px; margin-top: 1px; cursor: pointer; }
.agree-check input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.agree-check i {
  display: block; width: 18px; height: 18px; border: 1.5px solid var(--line);
  border-radius: 5px; background: #fff; transition: background .15s, border-color .15s;
}
.agree-check input:checked + i { background: var(--green); border-color: var(--green); }
.agree-check input:checked + i::after {
  content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}
.agree-check input:focus-visible + i { box-shadow: 0 0 0 3px rgba(46,125,79,.16); }
.agree-text { font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.agree-text a { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(46,125,79,.35); }
.agree-text a:hover { border-bottom-color: var(--green); }

.auth-legal {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--faint);
}
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--green); }
.auth-legal span { color: var(--line); }

.auth-links { margin-top: 14px; text-align: center; font-size: 12.5px; }
.auth-links a { color: var(--muted); text-decoration: none; cursor: pointer; }
.auth-links a:hover { color: var(--green); }

/* ---- 找回密码 ---- */
.fp-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.fp-card {
  text-align: left; width: 100%; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font: inherit; transition: border-color .16s, box-shadow .16s, transform .16s;
}
.fp-card:hover { border-color: rgba(46,125,79,.45); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.fp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fp-t { font-size: 14px; font-weight: 650; color: var(--text); flex: 1; }
.fp-d { font-size: 12px; color: var(--muted); line-height: 1.6; }

.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; min-width: 0; letter-spacing: 2px; }
.code-row .btn { flex: none; white-space: nowrap; }
.code-row .btn[disabled] { opacity: .55; cursor: not-allowed; }

.legal-links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.legal-links a { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(46,125,79,.3); }

/* ---- 法律文书页 ---- */
.legal-page { min-height: 100vh; background: #fff; }
.legal-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.legal-home { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 650; font-size: 14px; }
.legal-logo {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3E9E67, #2A7249); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .3px;
}
.legal-wrap {
  max-width: 1180px; margin: 0 auto; padding: 30px 22px 80px;
  display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 44px;
}
.legal-side { position: sticky; top: 72px; align-self: start; }
.legal-tabs { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.legal-tab {
  display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: 13.5px; color: var(--text-2); transition: background .15s, color .15s;
}
.legal-tab:hover { background: var(--green-l2); color: var(--green-d); }
.legal-tab.on { background: var(--green-l); color: var(--green-d); font-weight: 650; }
.legal-side-title { font-size: 11px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; padding: 0 12px 8px; }
.legal-toc { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); padding-left: 0; }
.legal-toc-item {
  text-align: left; background: none; border: 0; border-left: 2px solid transparent;
  margin-left: -1px; padding: 6px 10px 6px 12px; font: inherit; font-size: 12.5px;
  color: var(--muted); cursor: pointer; line-height: 1.5; transition: color .15s, border-color .15s;
}
.legal-toc-item:hover { color: var(--text); }
.legal-toc-item.on { color: var(--green-d); border-left-color: var(--green); font-weight: 600; }
.legal-meta { margin-top: 22px; padding: 12px 12px 14px; background: var(--green-l2); border-radius: 10px; font-size: 11.5px; color: var(--text-2); line-height: 1.9; }
.legal-meta-tip { color: var(--muted); margin-top: 6px; line-height: 1.7; }

.legal-main { max-width: 780px; }
.legal-title h1 { font-size: 27px; margin: 0 0 8px; font-weight: 680; letter-spacing: .3px; }
.legal-sub { font-size: 12px; color: var(--faint); }
.legal-lead {
  margin: 20px 0 8px; padding: 14px 16px; border-radius: 10px;
  background: var(--green-l2); border-left: 3px solid var(--green);
  font-size: 13.5px; line-height: 1.85; color: var(--text-2);
}
.legal-sec { margin-top: 34px; scroll-margin-top: 74px; }
.legal-sec h2 { font-size: 16px; margin: 0 0 12px; font-weight: 660; color: var(--text); }
.legal-sec p { margin: 0 0 11px; font-size: 13.5px; line-height: 1.95; color: var(--text-2); }
.legal-ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.legal-ul li {
  position: relative; padding-left: 16px; margin-bottom: 8px;
  font-size: 13.5px; line-height: 1.9; color: var(--text-2);
}
.legal-ul li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--green);
}
.legal-table-wrap { overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--line); border-radius: 10px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.legal-table th {
  background: var(--green-l2); text-align: left; font-weight: 650; color: var(--green-dd);
  padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); line-height: 1.7; vertical-align: top; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-end {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--faint); line-height: 2;
}
.legal-end-links { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-end-links a { color: var(--muted); text-decoration: none; }
.legal-end-links a:hover { color: var(--green); }
.legal-end-links span { color: var(--line); }

@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 22px; padding: 20px 16px 60px; }
  .legal-side { position: static; }
  .legal-tabs { flex-direction: row; flex-wrap: wrap; }
  .legal-toc, .legal-side-title { display: none; }
  .legal-meta { margin-top: 12px; }
  .legal-title h1 { font-size: 22px; }
}

@media print {
  .legal-top, .legal-side, .legal-end-links { display: none !important; }
  .legal-wrap { display: block; max-width: none; padding: 0; }
  .legal-main { max-width: none; }
  .legal-page { background: #fff; }
  .legal-lead { background: #f7f7f7; }
  .legal-sec { page-break-inside: avoid; }
  body { background: #fff; }
}

/* ---- 账号安全 / 重置码 / 短信设置 ---- */
.divider { height: 1px; background: var(--line-2); }
.mb8 { margin-bottom: 8px; }
.btn-danger-ghost { color: var(--red); background: transparent; border: 1px solid rgba(194,73,47,.35); }
.btn-danger-ghost:hover { background: var(--red-l); border-color: var(--red); }

.ticket-box {
  margin: 4px 0 12px; padding: 14px; border-radius: 11px;
  background: var(--green-l2); border: 1px dashed rgba(46,125,79,.35);
  text-align: center;
}
.ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px; letter-spacing: 5px; font-weight: 650; color: var(--green-dd);
  margin: 8px 0 10px; user-select: all;
}

/* ================= v11：移动端侧栏（绿面板）可见性 ================= */

/* 侧栏导航滚动条：深绿底上不要出现刺眼的白色滚动条 */
.sb-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-track { background: transparent; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
.sb-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }

/* 抽屉内的关闭按钮（桌面隐藏） */
.sb-close {
  display: none; position: absolute; right: 10px; top: 22px;
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.sb-close svg { width: 15px; height: 15px; }
.sb-close:hover { background: rgba(255,255,255,.16); }
.sb-brand { position: relative; }

/* 遮罩 */
.sb-mask {
  position: fixed; inset: 0; z-index: 99; display: none;
  background: rgba(12,24,17,.46); backdrop-filter: blur(1.5px);
  opacity: 0; transition: opacity .22s;
}
.sb-mask.on { opacity: 1; }
body.nav-lock { overflow: hidden; }

/* 顶栏汉堡按钮：手机上必须看得见、点得到 */
.menu-btn {
  width: 38px; height: 38px; padding: 0 !important; flex: none;
  align-items: center; justify-content: center; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.menu-btn:hover { color: var(--green-d); border-color: rgba(46,125,79,.35); }
.menu-btn svg { width: 19px; height: 19px; }


@media (max-width: 860px) {
  /* 任何残留的横向溢出都不许把布局视口撑宽（否则整页被缩小） */
  html, body { overflow-x: hidden; }
  .modal { max-width: calc(100vw - 32px); }
  .sb-mask { display: block; }
  .sb-close { display: inline-flex; }
  .sidebar {
    width: min(84vw, 302px);
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
    border-radius: 0 16px 16px 0;
  }
  /* 抽屉打开时，底栏被绿色面板压住，先让出空间 */
  .sidebar.open { box-shadow: 0 0 50px rgba(0,0,0,.45); }
  .sb-nav { padding: 10px 12px 16px; }
  .sb-foot { padding: 12px 14px; background: rgba(0,0,0,.14); }
  .sb-user-name { font-size: 13.5px; }
  .menu-btn { display: inline-flex !important; }
}

/* v12：固定品牌区（华曼标识 + 平台名称） */
.sb-name { font-size: 13px; letter-spacing: 0; }

/* v13：顶栏固定平台品牌（华曼），侧栏品牌恢复客户可编辑 */
.sb-name { font-size: 14px; letter-spacing: .3px; }
.tb-brand {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 4px 12px 4px 5px; margin-left: 2px;
  border-radius: 999px; background: var(--green-l2, #EAF3EC);
  border: 1px solid rgba(46,125,79,.18);
  user-select: none;
}
.tb-brand img { width: 24px; height: 24px; border-radius: 7px; display: block; background: #fff; }
.tb-brand-name { font-size: 12.5px; font-weight: 650; color: var(--green-d, #2A7249); white-space: nowrap; }
@media (max-width: 1180px) { .tb-brand-name { display: none; } .tb-brand { padding: 4px; border-radius: 10px; } }

/* v14：顶栏品牌排布——图标 + 平台名 + 从右向左滚动标语 + 当前页名 */
.tb-brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  user-select: none;
}
.tb-brand img { width: 26px; height: 26px; border-radius: 7px; display: block; background: #fff; }
.tb-brand-name { font-size: 13.5px; font-weight: 650; color: var(--text); white-space: nowrap; letter-spacing: .2px; }
.tb-marquee {
  display: inline-block; overflow: hidden; width: 148px;
  border-left: 1px solid var(--line); padding-left: 12px; margin-left: 3px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tb-marquee-inner { display: flex; width: max-content; animation: tbRoll 11s linear infinite; }
.tb-marquee-inner span {
  white-space: nowrap; padding-right: 44px;
  font-size: 12.5px; color: var(--green-d, #2A7249); letter-spacing: 2px;
}
@keyframes tbRoll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tb-marquee-inner { animation: none; } }
@media (max-width: 1180px) { .tb-marquee { display: none; } }
@media (max-width: 540px) { .tb-brand-name { display: none; } .tb-brand img { width: 24px; height: 24px; } }

/* v15：顶栏品牌区占满整行——公司名加大，滚动标语弹性撑满中间空间 */
.tb-brand { flex: 1; min-width: 0; }
.tb-brand-name { font-size: 15px; letter-spacing: .5px; }
.tb-marquee { flex: 1; width: auto; min-width: 140px; max-width: 560px; }
@media (max-width: 1180px) { .tb-marquee { display: none; } .tb-brand { flex: 0 1 auto; } }
.topbar .spacer { flex: 0 0 8px; }

/* v16：顶栏绿底承载客户品牌+基地名+标语；侧栏顶部白底固定华曼公司名 */
.topbar {
  background: linear-gradient(135deg, #2E7D4F 0%, #256844 100%);
  border-bottom: 0;
}
.menu-btn {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35);
  color: #fff; box-shadow: none;
}
.menu-btn:hover { color: #fff; border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.2); }
.tb-brand { flex: 0 1 auto; gap: 10px; }
.tb-logo {
  width: 32px; height: 32px; border-radius: 9px; flex: none; overflow: hidden;
  background: #fff; color: var(--green-d, #2A7249);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.tb-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.tb-name { font-size: 15px; font-weight: 650; color: #fff; white-space: nowrap; letter-spacing: .4px; }
.topbar .spacer { flex: 1; }
.topbar-org {
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.25); color: #fff;
}
.crumb { color: rgba(255,255,255,.72); }
.crumb b { color: #fff; }
.tb-marquee { flex: none; width: 188px; }
.tb-marquee-inner span { color: rgba(255,255,255,.88); }

/* 侧栏顶部白底：华曼公司名 */
.sb-brand { background: #fff; border-bottom: 1px solid var(--line); }
.sb-logo { background: transparent; box-shadow: none; }
.sb-name { color: var(--text, #20241f); }
.sb-close { border-color: var(--line); background: #fff; color: var(--text-2, #5F6B62); }
.sb-close:hover { background: #F1F4F0; }
@media (max-width: 640px) { .tb-name { display: none; } .tb-marquee { width: 150px; } }

/* v17：侧栏品牌区——「甘肃华曼智能科技」标题 + 下方「共谱华章 · 共享曼福」标语；顶栏移除滚动标语 */
.sb-name { font-size: 14px; letter-spacing: .4px; }
.sb-slogan {
  margin-top: 3px;
  font-size: 11px; line-height: 1.35;
  color: var(--green-d, #2A7249);
  letter-spacing: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: clip;
}
@media (max-width: 860px) {
  .sb-name { font-size: 13.5px; }
  .sb-slogan { font-size: 10.5px; letter-spacing: 1.5px; }
}

/* v18b：侧栏恢复「图标 + 公司名 + 标语」两行布局（图标用裁掉残字的版本）；顶栏保持纯文本可编辑 */
.sb-brand { justify-content: flex-start; padding: 20px 18px 18px; }
.sb-logo { width: 40px; height: 40px; background: transparent; box-shadow: none; border-radius: 12px; }
.sb-logo-img { object-fit: contain; }
.tb-txt {
  font-size: 14px; font-weight: 500; color: #fff; white-space: nowrap;
  letter-spacing: .4px; cursor: pointer; flex: none;
  padding: 3px 2px; border-bottom: 1px dashed transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.tb-txt:hover { border-bottom-color: rgba(255,255,255,.55); }
.tb-txt .dot-live { flex: none; }
.tb-txt-dim { font-size: 12.5px; color: rgba(255,255,255,.78); letter-spacing: 1.5px; }
/* 顶栏标识可点击更换 */
.tb-logo-edit { cursor: pointer; outline: 1px dashed transparent; outline-offset: 2px; }
.tb-logo-edit:hover { outline-color: rgba(255,255,255,.65); }
@media (max-width: 1180px) { .tb-txt-dim { display: none; } }
@media (max-width: 640px) { .tb-txt { font-size: 13px; } }
@media (max-width: 540px) {
  .tb-logo, #topbarOrg, .tb-txt-dim { display: none; }
  .tb-txt { font-size: 13px; }
}

/* ============================================================
   v20：灵动配色优化（纯视觉层，不改结构）
   —— 多彩但克制的 herbal 色板：翠绿为底，金/橘/青/蓝/紫点缀
   ============================================================ */

/* ---- 1. 页面底色：在绿色氛围里加一点暖金与青紫呼吸感 ---- */
body {
  background:
    radial-gradient(1100px 480px at 88% -8%, rgba(46, 125, 79, .06), transparent 60%),
    radial-gradient(760px 420px at -6% 4%, rgba(214, 158, 70, .05), transparent 58%),
    radial-gradient(900px 460px at 50% 112%, rgba(91, 200, 173, .05), transparent 60%),
    var(--bg);
}

/* ---- 2. 侧栏导航：每个模块图标有专属色彩徽章 ---- */
.nav-item .ico {
  width: 27px; height: 27px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  opacity: 1;
  transition: background .15s, color .15s, transform .15s;
}
.nav-item .ico svg { width: 16px; height: 16px; }
.nav-item:hover .ico { transform: scale(1.08); }

.nav-item[data-key="dashboard"] .ico { color: #7ED9A4; background: rgba(126, 217, 164, .14); }
.nav-item[data-key="record"]    .ico { color: #EBC663; background: rgba(235, 198, 99, .14); }
.nav-item[data-key="harvest"]   .ico { color: #F0A55E; background: rgba(240, 165, 94, .14); }
.nav-item[data-key="batches"]   .ico { color: #79B5EC; background: rgba(121, 181, 236, .14); }
.nav-item[data-key="recall"]    .ico { color: #EC8071; background: rgba(236, 128, 113, .14); }
.nav-item[data-key="plots"]     .ico { color: #63C9AE; background: rgba(99, 201, 174, .14); }
.nav-item[data-key="env"]       .ico { color: #A98FDF; background: rgba(169, 143, 223, .14); }
.nav-item[data-key="cameras"]   .ico { color: #93ABC9; background: rgba(147, 171, 201, .14); }
.nav-item[data-key="wall"]      .ico { color: #8AA0F0; background: rgba(138, 160, 240, .14); }
.nav-item[data-key="quality"]   .ico { color: #B9CB6E; background: rgba(185, 203, 110, .14); }
.nav-item[data-key="board"]     .ico { color: #F2AC66; background: rgba(242, 172, 102, .14); }
.nav-item[data-key="lab"]       .ico { color: #64CBD9; background: rgba(100, 203, 217, .14); }
.nav-item[data-key="ledger"]    .ico { color: #CDA472; background: rgba(205, 164, 114, .14); }
.nav-item[data-key="standard"]  .ico { color: #8CC98C; background: rgba(140, 201, 140, .14); }
.nav-item[data-key="trace"]     .ico { color: #55CB92; background: rgba(85, 203, 146, .14); }
.nav-item[data-key="org"]       .ico { color: #BFA6E3; background: rgba(191, 166, 227, .14); }

.nav-item.active .ico { background: rgba(255, 255, 255, .16); }
.nav-item.active[data-key] .ico { color: #fff; }

/* 分组标题加一粒彩色呼吸点 */
.sb-group { display: flex; align-items: center; gap: 6px; }
.sb-group::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, #6FCF97, #4A9E6F);
  opacity: .8;
}

/* ---- 3. 页面标题：渐变玉点起笔 ---- */
.page-head h1 {
  background: linear-gradient(100deg, #1C2822 30%, #2E7D4F 85%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-head h1::before {
  content: "";
  display: inline-block; vertical-align: middle;
  width: 9px; height: 9px; border-radius: 50% 50% 50% 2px;
  background: linear-gradient(135deg, #4DB57C, #2A7249);
  box-shadow: 0 0 0 4px rgba(77, 181, 124, .16);
  margin-right: 10px; margin-top: -3px;
}

/* ---- 4. KPI 卡片：四色渐变顶带 + 渐变数字 ---- */
.kpi { position: relative; overflow: hidden; }
.kpi::before {
  content: "";
  position: absolute; left: 0; top: 0; right: 0; height: 3.5px;
  background: var(--kac, linear-gradient(90deg, #3E9E67, #6FCF97));
  opacity: .9;
}
.kpi-grid .kpi:nth-child(4n+1) { --kac: linear-gradient(90deg, #2E7D4F, #6FCF97); }
.kpi-grid .kpi:nth-child(4n+2) { --kac: linear-gradient(90deg, #D69E46, #F0C070); }
.kpi-grid .kpi:nth-child(4n+3) { --kac: linear-gradient(90deg, #3D7FA6, #79B5EC); }
.kpi-grid .kpi:nth-child(4n+4) { --kac: linear-gradient(90deg, #C25E8A, #E39AC0); }
.kpi:hover::before { height: 5px; }
.kpi:not(.warn):not(.bad):not(.good) .k-value {
  background: linear-gradient(120deg, #22623F 20%, #3E9E67 60%, #58B489 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- 5. 卡片：更灵的悬停与渐变题签 ---- */
.card { transition: box-shadow .18s, border-color .18s, transform .18s; }
.card:hover { transform: translateY(-2px); border-color: #D3E2D6; }
.card-head h3::before {
  width: 4px; height: 15px;
  background: linear-gradient(180deg, #6FCF97 0%, #2E7D4F 55%, #D69E46 130%);
}

/* ---- 6. 按钮与胶囊：轻微上浮 ---- */
.btn-primary { transition: transform .14s, box-shadow .14s, background .14s; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.chip { transition: all .15s; }
.chip:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(31, 77, 54, .1); }
.chip.on { background: linear-gradient(135deg, #35905C, #24603D); }

/* ---- 7. 表格：表头淡绿渐变，悬停行有左侧色点 ---- */
.table th {
  background: linear-gradient(180deg, #F2F8F4, #ECF4EE);
  color: #34634A;
}

/* ---- 8. 空状态：彩色呼吸徽章 ---- */
.empty .ico {
  background: linear-gradient(135deg, var(--green-l), var(--green-l2));
  color: var(--green-d);
  box-shadow: inset 0 0 0 1px rgba(46, 125, 79, .12);
}

/* ---- 9. 入场动效：卡片与 KPI 轻轻浮起 ---- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
.view .card, .view .kpi, .view .panel { animation: riseIn .32s ease both; }
.view .kpi:nth-child(2), .view .card:nth-child(2) { animation-delay: .04s; }
.view .kpi:nth-child(3), .view .card:nth-child(3) { animation-delay: .08s; }
.view .kpi:nth-child(4), .view .card:nth-child(4) { animation-delay: .12s; }

/* ---- 10. 移动端底栏选中态加渐变 ---- */
.mob-tab a.on { color: var(--green-d); }

@media (prefers-reduced-motion: reduce) {
  .view .card, .view .kpi, .view .panel { animation: none; }
  .nav-item:hover .ico, .kpi:hover::before, .btn-primary:hover { transition: none; }
}

/* v20 补丁：手机端页头防挤压（标题/描述不被按钮挤成竖排） */
@media (max-width: 640px) {
  .page-head { flex-wrap: wrap; row-gap: 2px; }
  .page-head h1 { min-width: max-content; flex: 0 0 auto; }
  .page-head p { flex: 1 1 100%; }
}

/* ============================================================
   新手三步引导
   注册后是空基地，用一层浮层把「填信息 → 建地块 → 建批次」讲清楚；
   收起后变右下角小气泡，不挡住干活
   ============================================================ */
body.guide-lock { overflow: hidden; }

.guide-mask {
  position: fixed; inset: 0;
  background: rgba(18, 30, 23, .38);
  backdrop-filter: blur(3px);
  z-index: 520;            /* 高于普通弹窗，低于 toast */
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .16s;
}

.guide-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
  animation: popIn .2s ease-out;
}

.guide-x {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--faint);
  font-size: 15px; line-height: 1;
  cursor: pointer;
}
.guide-x:hover { background: var(--line-2); color: var(--text-2); }

.guide-head {
  padding: 26px 26px 18px;
  border-bottom: 1px solid var(--line-2);
}
.guide-kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--green);
  text-transform: uppercase;
}
.guide-head h3 {
  margin: 8px 0 6px;
  font-size: 19px; font-weight: 680; letter-spacing: -.01em;
}
.guide-head p {
  margin: 0;
  font-size: 13px; line-height: 1.7;
  color: var(--text-2);
}

.guide-meter {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
}
.guide-bar {
  flex: 1; height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.guide-bar > i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #4E9A6C);
  transition: width .3s ease;
}
.guide-count {
  flex: none;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.guide-steps {
  list-style: none;
  margin: 0; padding: 8px 26px 4px;
}
.guide-step {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}
.guide-step:last-child { border-bottom: 0; }

.guide-num {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
  color: var(--muted);
  background: var(--line-2);
  border: 1px solid var(--line);
}
.guide-step.done .guide-num {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.guide-step.current .guide-num {
  color: var(--green-d);
  background: var(--green-l);
  border-color: #BBD9C7;
}

.guide-step-body { flex: 1; min-width: 0; }
.guide-step-body b {
  display: block;
  font-size: 14px; font-weight: 640;
  color: var(--text);
}
.guide-step.done .guide-step-body b { color: var(--text-2); }
.guide-step-body p {
  margin: 4px 0 0;
  font-size: 12.5px; line-height: 1.65;
  color: var(--muted);
}
.guide-now {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--green-l);
  color: var(--green-d);
  font-size: 10.5px; font-style: normal; font-weight: 700;
  vertical-align: 1px;
}
.guide-done-tag {
  flex: none;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--green);
}
.guide-step .btn { flex: none; margin-top: 5px; }

.guide-foot {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 15px 26px 20px;
  border-top: 1px solid var(--line-2);
}

/* 收起后的小气泡 */
.guide-pill {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 300;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  border: 1px solid #CFE3D6;
  background: #fff;
  box-shadow: 0 6px 22px -6px rgba(23, 36, 29, .22);
  font-size: 12.5px; font-weight: 600;
  color: var(--green-d);
  cursor: pointer;
  animation: popIn .18s ease-out;
}
.guide-pill:hover { background: var(--green-l2); box-shadow: var(--shadow-lg); }
.guide-pill i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.guide-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, .16);
}

@media (max-width: 720px) {
  .guide-mask { padding: 14px; align-items: flex-end; }
  .guide-card {
    max-width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 14px 14px;
  }
  .guide-head { padding: 20px 18px 14px; }
  .guide-head h3 { font-size: 17.5px; }
  .guide-steps { padding: 4px 18px 2px; }
  .guide-step { gap: 11px; padding: 13px 0; }
  .guide-step .btn { padding: 5px 10px; font-size: 12px; }
  .guide-foot { padding: 13px 18px calc(16px + env(safe-area-inset-bottom)); }
  .guide-pill { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   v21：公开套餐对比页（#/plans）
   深藏青 + 烫金，与三折页宣传彩页同一视觉；独立整屏，响应三档屏宽
   ============================================================ */
.pv-page{--pv-navy:#0B2B4A;--pv-navy2:#123A60;--pv-gold:#C6A15B;--pv-gold2:#E6CD98;--pv-cream:#F7F4EC;--pv-ink:#1C2822;--pv-ink2:#5A6670;--pv-line:#E7E0D0;
  min-height:100vh;background:var(--pv-cream);color:var(--pv-ink);font-family:inherit;-webkit-font-smoothing:antialiased;}
.pv-top{height:62px;background:#fff;border-bottom:1px solid var(--pv-line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,5vw,64px);}
.pv-top-brand{display:flex;align-items:center;gap:10px;min-width:0;}
.pv-top-brand img{width:30px;height:30px;object-fit:contain;flex:none;}
.pv-top-brand div{display:flex;flex-direction:column;min-width:0;}
.pv-top-brand b{font-size:13px;color:var(--pv-navy);letter-spacing:.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pv-top-brand span{font-size:10.5px;color:var(--pv-gold);letter-spacing:2px;margin-top:1px;}
.pv-top-link{flex:none;font-size:12.5px;color:var(--pv-navy);text-decoration:none;border:1px solid var(--pv-navy);border-radius:6px;padding:6px 14px;transition:.18s;}
.pv-top-link:hover{background:var(--pv-navy);color:#fff;}

.pv-hero{background:linear-gradient(155deg,#0B2B4A 0%,#123A60 62%,#0E3152 100%);color:#fff;padding:clamp(34px,6vw,70px) clamp(16px,5vw,64px) clamp(28px,5vw,52px);position:relative;overflow:hidden;}
.pv-hero::after{content:'';position:absolute;right:-70px;top:-70px;width:300px;height:300px;border:1px solid rgba(230,205,152,.16);border-radius:50%;box-shadow:0 0 0 40px rgba(230,205,152,.05),0 0 0 90px rgba(230,205,152,.035);pointer-events:none;}
.pv-kicker{font-size:11px;letter-spacing:3px;color:var(--pv-gold2);margin-bottom:14px;}
.pv-hero h1{font-family:"Songti SC","STSong",serif;font-size:clamp(26px,4.4vw,44px);line-height:1.35;margin:0 0 16px;font-weight:600;letter-spacing:2px;}
.pv-hero-sub{font-size:clamp(12.5px,1.6vw,15px);line-height:1.9;color:rgba(255,255,255,.8);margin:0;}
.pv-stats{display:flex;flex-wrap:wrap;gap:clamp(16px,4vw,52px);margin-top:clamp(24px,4vw,40px);position:relative;z-index:1;}
.pv-stat{border-left:2px solid var(--pv-gold);padding-left:14px;}
.pv-stat-n{font-family:Georgia,serif;font-size:clamp(28px,4vw,40px);color:var(--pv-gold2);line-height:1;}
.pv-stat-u{font-size:12px;color:rgba(255,255,255,.7);margin-top:4px;}
.pv-stat-t{font-size:12px;color:#fff;margin-top:5px;letter-spacing:1px;}

.pv-body{max-width:1180px;margin:0 auto;padding:clamp(28px,5vw,56px) clamp(16px,4vw,40px) 40px;}
.pv-sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:22px;}
.pv-sec-head h2{font-family:"Songti SC","STSong",serif;font-size:clamp(20px,2.8vw,27px);color:var(--pv-navy);margin:0;letter-spacing:2px;}
.pv-sec-head h2::after{content:'';display:block;width:38px;height:2px;background:var(--pv-gold);margin-top:9px;}
.pv-sec-head span{font-size:12px;color:var(--pv-ink2);}

.pv-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;align-items:stretch;}
.pv-tier{background:#fff;border:1px solid var(--pv-line);border-radius:10px;padding:20px 17px 18px;display:flex;flex-direction:column;position:relative;transition:.2s;min-width:0;}
.pv-tier:hover{box-shadow:0 10px 28px -12px rgba(11,43,74,.22);transform:translateY(-2px);}
.pv-tier.hot{border:1.5px solid var(--pv-gold);background:linear-gradient(180deg,#FFFDF8,#fff 42%);box-shadow:0 8px 24px -12px rgba(198,161,91,.5);}
.pv-ribbon{position:absolute;top:-1px;right:14px;background:var(--pv-gold);color:#fff;font-size:10.5px;letter-spacing:2px;padding:4px 12px;border-radius:0 0 6px 6px;}
.pv-tier-top{padding-bottom:12px;border-bottom:1px dashed var(--pv-line);}
.pv-tier-en{font-size:9.5px;letter-spacing:2.5px;color:var(--pv-gold);font-weight:600;}
.pv-tier-name{font-family:"Songti SC","STSong",serif;font-size:21px;color:var(--pv-navy);margin:5px 0 6px;letter-spacing:1px;}
.pv-tier-tag{font-size:11px;color:var(--pv-ink2);}
.pv-tier-price{margin:16px 0 2px;display:flex;align-items:baseline;gap:3px;}
.pv-cur{font-family:Georgia,"Songti SC",serif;font-size:clamp(24px,2.6vw,30px);font-weight:700;color:var(--pv-navy);letter-spacing:-.5px;}
.pv-tier.hot .pv-cur{color:#B4442C;}
.pv-unit{font-size:11px;color:var(--pv-ink2);}
.pv-tier-base{display:inline-block;font-size:11px;color:var(--pv-navy);background:#EEF3F7;border-radius:4px;padding:3px 8px;margin:6px 0 0;align-self:flex-start;}
.pv-tier-desc{font-size:11.5px;line-height:1.75;color:var(--pv-ink2);margin:12px 0 10px;min-height:58px;}
.pv-feats{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:7px;}
.pv-feats li{font-size:11.5px;color:var(--pv-ink);display:flex;gap:7px;align-items:flex-start;line-height:1.5;}
.pv-tick{flex:none;color:var(--pv-gold);font-weight:700;}
.pv-fit{margin-top:auto;font-size:10.5px;color:var(--pv-ink2);border-top:1px solid var(--pv-line-2,#EEF1EC);padding-top:10px;}

.pv-note{margin-top:26px;background:#fff;border:1px solid var(--pv-line);border-left:3px solid var(--pv-gold);border-radius:8px;padding:18px 22px;}
.pv-note b{font-size:13px;color:var(--pv-navy);}
.pv-note p{font-size:12px;line-height:1.9;color:var(--pv-ink2);margin:8px 0 0;}
.pv-note p b{font-size:12px;}

.pv-cta{margin-top:22px;background:var(--pv-navy);border-radius:10px;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.pv-cta>div{display:flex;flex-direction:column;gap:5px;}
.pv-cta b{font-family:"Songti SC","STSong",serif;font-size:16px;color:var(--pv-gold2);letter-spacing:1px;}
.pv-cta span{font-size:11.5px;color:rgba(255,255,255,.78);}
.pv-cta-btn{flex:none;background:var(--pv-gold);color:#fff;text-decoration:none;font-size:12.5px;font-weight:600;padding:9px 20px;border-radius:6px;transition:.18s;}
.pv-cta-btn:hover{background:var(--pv-gold2);color:var(--pv-navy);}
.pv-foot{text-align:center;font-size:10.5px;color:#96A0A6;margin-top:24px;line-height:1.7;}

@media (max-width: 900px){ .pv-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 560px){
  .pv-grid{grid-template-columns:1fr;}
  .pv-tier-desc{min-height:0;}
  .pv-top-brand b{font-size:12px;}
  .pv-top-brand img{width:26px;height:26px;}
  .pv-top-link{font-size:11.5px;padding:5px 10px;}
  .pv-stats{gap:14px;}
  .pv-stat{padding-left:10px;}
}

/* 侧栏「当前版本」标识：纯展示，点击进公开套餐对比页 */
.sb-plan{display:flex;align-items:center;gap:8px;margin:12px 12px 4px;padding:8px 11px;border:1px solid rgba(230,205,152,.32);border-radius:9px;background:rgba(255,255,255,.07);text-decoration:none;transition:.18s;}
.sb-plan:hover{background:rgba(230,205,152,.14);border-color:rgba(230,205,152,.6);}
.sb-plan-tag{font-size:10px;letter-spacing:1px;color:rgba(255,255,255,.62);flex:none;}
.sb-plan-tier{font-size:12px;font-weight:600;color:var(--pv-gold2,#E6CD98);letter-spacing:.5px;}
.sb-plan-exp{margin-left:auto;font-size:10px;color:rgba(255,255,255,.6);}


/* ============================================================
   承诺书强管控弹窗 · 追加到 /assets/style.css 末尾即可
   沿用平台 CSS 变量（--green / --card / --text / --line 等）与 .btn 类
   ============================================================ */

.pledge-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(16, 26, 20, .62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: plFade .18s ease-out;
}
@keyframes plFade { from { opacity: 0 } to { opacity: 1 } }

.pledge-dialog {
  width: min(720px, 100%); max-height: min(92vh, 940px);
  background: var(--card); border-radius: 16px;
  box-shadow: 0 24px 70px -16px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; overflow: hidden;
  animation: plUp .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes plUp { from { transform: translateY(14px); opacity: .6 } to { transform: none; opacity: 1 } }

/* 顶部警示条 */
.pledge-hd {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 24px 18px;
  background: linear-gradient(180deg, var(--amber-l), var(--card));
  border-bottom: 1px solid var(--line);
}
.pledge-hd-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--amber); color: #fff; font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px -2px rgba(160, 106, 23, .5);
}
.pledge-hd h3 { margin: 0 0 4px; font-size: 17px; color: var(--text); }
.pledge-hd p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

/* 可滚动正文 */
.pledge-scroll { padding: 18px 24px 8px; overflow-y: auto; flex: 1; }
.pledge-sec-title {
  font-size: 13px; font-weight: 700; color: var(--green-d);
  margin: 6px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--green);
}
.pledge-sec-title:not(:first-child) { margin-top: 20px; }

/* 承诺书正文 */
.pledge-doc {
  border: 1px solid var(--line); border-radius: 10px;
  background: #FBFDFB; padding: 16px 18px;
}
.pledge-doc-hd { text-align: center; font-size: 16px; font-weight: 700; letter-spacing: 2px; color: var(--text); }
.pledge-doc-ver { text-align: center; font-size: 11px; color: var(--muted); margin: 4px 0 14px; }
.pledge-doc-body { font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.pledge-doc-body h5 { margin: 12px 0 3px; font-size: 12.5px; color: var(--text); }
.pledge-doc-body p { margin: 0; }
.pledge-lead { color: var(--text); font-weight: 500; }

/* 实名表单 */
.pledge-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.pf-field:first-child, .pf-field:nth-child(3) { grid-column: 1 / -1; }
.pf-field span i, .pledge-check i { color: var(--red); font-style: normal; }
.pf-field input {
  height: 38px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; color: var(--text); background: #fff; outline: none;
}
.pf-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 125, 79, .12); }
.pf-note { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* 留底材料 */
.pledge-evidence { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pe-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--green-l2); }
.pe-tab {
  flex: 1; padding: 10px; border: 0; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--text-2); border-bottom: 2px solid transparent;
}
.pe-tab.active { color: var(--green-d); font-weight: 700; border-bottom-color: var(--green); background: #fff; }
.pe-body { padding: 14px; }
.pe-pick {
  width: 100%; min-height: 64px; border: 1.5px dashed var(--line); border-radius: 9px;
  background: #fff; cursor: pointer; color: var(--text-2); font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.pe-pick:hover { border-color: var(--green); color: var(--green-d); background: var(--green-l2); }
.pe-cam { font-size: 22px; line-height: 1; color: var(--green); }
.pe-tip { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.pe-preview { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.pe-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* 同意勾选 */
.pledge-check {
  display: flex; gap: 9px; align-items: flex-start; margin: 10px 0;
  font-size: 12.5px; color: var(--text-2); line-height: 1.6; cursor: pointer;
}
.pledge-check input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--green); }
.pledge-privacy {
  background: var(--green-l2); border-radius: 8px; padding: 10px 14px;
  font-size: 11.5px; color: var(--text-2); line-height: 1.75;
}

/* 底栏 */
.pledge-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; border-top: 1px solid var(--line); background: #fff;
}
.pledge-ft-l .tiny { font-size: 12px; }
.pledge-ft-r { display: flex; align-items: center; gap: 12px; }
.pledge-err { color: var(--red); font-size: 12px; max-width: 360px; text-align: right; }

/* 窄屏适配 */
@media (max-width: 560px) {
  .pledge-mask { padding: 0; }
  .pledge-dialog { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .pledge-form { grid-template-columns: 1fr; }
  .pledge-hd, .pledge-scroll, .pledge-ft { padding-left: 16px; padding-right: 16px; }
  .pledge-ft { flex-direction: column; align-items: stretch; }
  .pledge-ft-r { justify-content: flex-end; }
  .pledge-err { max-width: none; }
}
