/* ===== frm365 智慧农业 v2.1 · 设计系统（令牌与框架对齐 ibs365，支持暗夜模式） ===== */
:root {
  --bg: #f6f8f7; --surface: #ffffff; --surface-2: #f4f7f5;
  --fg: #1c2b23; --muted: #556358; --faint: #6f7d72;
  --border: #e3ebe5; --border-strong: #d0ddd3;
  --accent: #0e9f6e; --accent-deep: #0a7d56; --accent-soft: #e6f5ed;
  --gold: #e0903a; --gold-soft: #fdf2e4; --gold-deep: #b96b17;
  --good: #12875c; --good-soft: #e6f5ed; --warn: #d1872a; --warn-soft: #fdf2e4;
  --bad: #d9483b; --bad-soft: #fdeae7;
  --info: #3b6fb5; --info-soft: #e9f0fa;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14,159,110,.06), 0 10px 28px -14px rgba(14,159,110,.18);
  --shadow-hover: 0 2px 4px rgba(14,159,110,.07), 0 18px 36px -14px rgba(14,159,110,.26);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --topbar-bg: rgba(246,248,247,.92);
  --overlay: rgba(28,43,35,.4);
  --metric-value: 22px; --metric-label: 13px;
  --dur-fast: .18s;
}
html[data-theme="dark"] {
  --bg: #0f1512; --surface: #151d19; --surface-2: #1b2620;
  --fg: #e2ebe5; --muted: #93a499; --faint: #6f8075;
  --border: #26362e; --border-strong: #35493e;
  --accent: #2fd39a; --accent-deep: #63e6b8; --accent-soft: #17352a;
  --gold: #f0ad54; --gold-soft: #3a2e1c; --gold-deep: #f5c07a;
  --good: #2fd39a; --good-soft: #17352a; --warn: #e0a94f; --warn-soft: #3a2e1c;
  --bad: #f0655a; --bad-soft: #3a2220;
  --info: #6fa8e8; --info-soft: #1c2e44;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.6);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.45), 0 18px 36px -14px rgba(0,0,0,.7);
  --topbar-bg: rgba(15,21,18,.9);
  --overlay: rgba(0,0,0,.6);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--fg); font-size: 14px; -webkit-font-smoothing: antialiased; transition: background .25s ease, color .25s ease; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; color: var(--fg); }
button { font-family: inherit; }
.muted { color: var(--muted); font-size: 12.5px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.sec-title { font-size: 15px; margin: 24px 0 12px; display: flex; align-items: baseline; gap: 8px; }

/* ===== 登录（左右分屏：品牌区 + 表单区） ===== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-brand { position: relative; background: linear-gradient(160deg, #0d1f17 0%, #123326 55%, #1d5138 100%); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-inner { position: relative; z-index: 2; max-width: 480px; padding: 40px 36px; }
.lb-logo { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; margin-bottom: 22px; backdrop-filter: blur(6px); }
.login-brand h1 { font-size: 27px; letter-spacing: .5px; color: #fff; }
.lb-slogan { margin: 10px 0 26px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.7; }
.lb-points { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lb-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,.88); line-height: 1.6; }
.lb-points svg { flex: none; margin-top: 3px; color: #7ce0b0; }
.lb-stats { display: flex; gap: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); }
.lb-stats b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.lb-stats span { font-size: 11.5px; color: rgba(255,255,255,.6); }
.lb-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 140px; z-index: 1; }
.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); padding: 32px 20px; gap: 18px; }
.login-card { width: min(400px, 100%); background: var(--surface); border-radius: 18px; padding: 26px 26px 20px; box-shadow: var(--shadow-hover); border: 1px solid var(--border); }
.login-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-card-head .mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.login-card-head b { display: block; font-size: 16px; }
.login-card-head .muted { display: block; font-size: 12px; margin-top: 1px; }
.login-foot { font-size: 11.5px; }
.login-tip { text-align: center; margin: 14px 0 0; }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 44px 0 100px; }
  .lb-inner { padding: 0 28px; }
  .lb-points, .lb-stats { display: none; }
  .lb-hills { height: 90px; }
  .login-side { padding-top: 0; }
}

/* ===== 表单 ===== */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none; background: var(--surface-2); color: var(--fg); transition: border-color .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); }
.field textarea { resize: vertical; min-height: 64px; }
.form-err { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }

/* ===== 按钮 ===== */
.btn { border: none; border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .05s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:active { transform: scale(.97); }
.btn-pri { background: var(--accent); color: #fff; }
.btn-pri:hover { filter: brightness(1.06); }
.btn-amber { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { font-size: 12px; padding: 5px 12px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ===== 主框架：侧边栏（对齐 ibs365） ===== */
.backdrop { position: fixed; inset: 0; z-index: 55; background: var(--overlay); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 236px; z-index: 60;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
  transition: width .25s cubic-bezier(.16,1,.3,1), transform .28s cubic-bezier(.16,1,.3,1);
}
.sidebar.collapsed { width: 68px; padding-left: 8px; padding-right: 8px; }
.sidebar.collapsed .brand { padding: 4px 0 14px; justify-content: center; }
.sidebar.collapsed .brand-txt, .sidebar.collapsed .user-txt { display: none; }
.sidebar.collapsed .collapse-btn { transform: rotate(180deg); }
.sidebar.collapsed .nav-group { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; font-size: 0; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 8px; }
body.nav-collapsed .main { margin-left: 68px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand .mark { width: 36px; height: 36px; border-radius: 12px; flex: none; background: var(--accent-soft); display: grid; place-items: center; }
.brand-txt { min-width: 0; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.collapse-btn { margin-left: auto; width: 24px; height: 24px; flex: none; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--faint); cursor: pointer; display: grid; place-items: center; font-size: 9px; transition: transform .25s ease, background .18s ease, color .18s ease; }
.collapse-btn:hover { background: var(--accent-soft); color: var(--accent-deep); }
.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group { font-size: 10px; color: var(--faint); letter-spacing: .18em; padding: 16px 10px 4px; user-select: none; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-size: 13px; border: none; background: none; cursor: pointer; text-align: left; width: 100%; font-family: inherit; transition: background .18s ease, color .18s ease; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--fg); }
.nav-item .ic { flex: none; opacity: .78; transition: transform .18s ease, opacity .18s ease; }
.nav-item:hover .ic { opacity: 1; transform: translateX(1px); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 550; }
.nav-item.active .ic { opacity: 1; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 18px; margin-top: -9px; background: var(--gold); border-radius: 0 4px 4px 0; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.sidebar-user:hover { border-color: var(--border-strong); }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--accent), #7fa08a); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.user-name { font-size: 13px; font-weight: 550; line-height: 1.3; }
.user-role { font-size: 11px; color: var(--muted); }

/* ===== 主区域 ===== */
.main { margin-left: 236px; padding: 0 28px 40px; min-height: 100vh; transition: margin-left .25s cubic-bezier(.16,1,.3,1); }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 16px 0; margin-bottom: 22px; background: var(--topbar-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.tb-head h1 { font-size: 22px; letter-spacing: -.02em; font-weight: 650; }
.tb-head .date { font-size: 12px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.topbar .spacer { flex: 1; }
.sync-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.sync-hint .ok { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; transition: background .18s ease, color .18s ease, transform .18s ease; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-deep); }
.icon-btn:active { transform: scale(.94); }
.menu-btn { display: none; }
.bell-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 1.5px solid var(--surface); }
.theme-toggle { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .18s ease, color .18s ease; }
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent-deep); }
html[data-theme="dark"] .ic-moon { display: none; }
html:not([data-theme="dark"]) .ic-sun { display: none; }

.tab-pane { animation: pageIn .28s cubic-bezier(.16,1,.3,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pane-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }

/* ===== 统计卡 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; align-items: center; gap: 12px; }
.stat-card b { display: block; font-size: var(--metric-value); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: var(--metric-label); color: var(--muted); }
.stat-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic-green { background: var(--accent-soft); color: var(--accent); }
.ic-blue { background: var(--info-soft); color: var(--info); }
.ic-amber { background: var(--gold-soft); color: var(--gold-deep); }
.ic-red { background: var(--bad-soft); color: var(--bad); }

/* ===== 大棚卡片 ===== */
.gh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gh-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; border: 1px solid var(--border); }
.gh-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.gh-head { background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--fg); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.gh-head b { font-size: 14.5px; }
.gh-head .muted { color: var(--muted); }
.gh-body { padding: 12px 14px; display: flex; gap: 18px; }
.gh-metric b { font-size: 20px; font-variant-numeric: tabular-nums; }
.gh-metric span { display: block; font-size: 11.5px; color: var(--muted); }
.gh-alert { padding: 7px 14px 11px; font-size: 12px; color: var(--bad); }
.gh-ok { padding: 7px 14px 11px; font-size: 12px; color: var(--good); }

/* ===== 双栏 ===== */
.row2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.list-lite { padding: 4px 16px; }
.lite-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.lite-item:last-child { border-bottom: none; }
.lite-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-danger { background: var(--bad); }
.dot-warn { background: var(--warn); }
.dot-info { background: var(--info); }
.dot-ok { background: var(--good); }
.lite-item b { font-size: 13px; display: block; }
.lite-item .muted { line-height: 1.45; }

/* ===== 监测 ===== */
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.sel { border: 1.5px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; background: var(--surface); font-family: inherit; outline: none; color: var(--fg); }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-left: auto; }
.seg button { border: none; background: transparent; padding: 6px 14px; font-size: 12.5px; color: var(--muted); border-radius: 8px; cursor: pointer; font-weight: 600; }
.seg button.active { background: var(--surface); color: var(--accent-deep); box-shadow: 0 1px 4px rgba(16,40,30,.12); }
.chart-card { padding-bottom: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 6px; }
.chart-head b { font-size: 15px; display: block; }
.chart-head .muted { margin-left: 8px; }
.chart-now b { font-size: 27px; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.chart-box { width: 100%; min-height: 300px; }
.chart-box svg { width: 100%; height: 300px; display: block; }
.chart-foot { padding: 4px 2px 8px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dev-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 14px; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; border: 1px solid var(--border); }
.dev-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.dev-card.active { outline: 2px solid var(--accent); }
.dev-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.dev-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dev-top b { font-size: 13.5px; display: block; }
.dev-top .muted { font-size: 11.5px; }
.dev-val { font-size: 22px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.dev-val small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.dev-spark { margin-top: 6px; height: 30px; }
.dev-spark svg { width: 100%; height: 30px; display: block; }

/* ===== 种植 ===== */
.batch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.batch-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; border: 1px solid var(--border); }
.batch-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.batch-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.batch-top b { font-size: 15px; }
.chip { border-radius: 999px; padding: 2.5px 10px; font-size: 11.5px; font-weight: 600; }
.chip-growing { background: var(--good-soft); color: var(--good); }
.chip-harvested { background: var(--info-soft); color: var(--info); }
.chip-closed { background: var(--surface-2); color: var(--muted); }
.chip-low { background: var(--good-soft); color: var(--good); }
.chip-mid { background: var(--warn-soft); color: var(--warn); }
.chip-high { background: var(--bad-soft); color: var(--bad); }
.batch-kv { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.batch-kv b { color: var(--fg); }
.batch-kv i { font-style: normal; }
.batch-head { display: flex; gap: 18px; flex-wrap: wrap; }
.batch-head .bh-item b { font-size: 16px; display: block; }
.batch-head .bh-item span { font-size: 11.5px; color: var(--muted); }
.batch-actions { display: flex; gap: 8px; }

/* 日志 */
.act-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.act-item:last-child { border-bottom: none; }
.act-type { background: var(--accent-soft); color: var(--accent-deep); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; flex-shrink: 0; height: fit-content; }
.act-item .grow { flex: 1; }
.act-item b { font-size: 13px; }
.act-item .muted { line-height: 1.5; display: block; margin-top: 2px; }
.act-del, .harv-del { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; }
.act-del:hover, .harv-del:hover { background: var(--bad-soft); color: var(--bad); }

/* ===== 病害 ===== */
.pest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pest-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; border: 1px solid var(--border); }
.pest-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pest-top b { font-size: 15px; }
.pest-card p { margin: 4px 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.pest-card p b { color: var(--fg); }
.pest-foot { display: flex; gap: 8px; margin-top: 10px; }
.kb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.kb-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; border: 1px solid var(--border); }
.kb-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--accent-deep); }
.kb-card h4 span { background: var(--accent-soft); color: var(--accent-deep); border-radius: 6px; padding: 1px 7px; font-size: 11px; margin-left: 7px; font-weight: 600; }
.kb-card p { margin: 4px 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.kb-card p b { color: var(--fg); }

/* ===== 我的 ===== */
.me-card { display: flex; align-items: center; gap: 14px; }
.me-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #7fa08a); color: #fff; font-size: 21px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.me-card b { display: block; font-size: 16px; }
.me-card .muted { display: block; margin-top: 2px; }
.role-chip { margin-left: auto; background: var(--accent-soft); color: var(--accent-deep); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; }
.me-menu { margin-top: 14px; padding: 4px 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; padding: 14px 12px; font-size: 14px; color: var(--fg); cursor: pointer; border-radius: 10px; text-align: left; }
.menu-item:hover { background: var(--accent-soft); }
.menu-item svg { color: var(--accent); flex-shrink: 0; }
.menu-item .muted { margin-left: auto; }
.menu-danger { color: var(--bad); }
.menu-danger svg { color: var(--bad); }
.menu-danger:hover { background: var(--bad-soft); }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 18px; width: min(460px, 100%); max-height: 86vh; overflow: auto; padding: 20px 22px; animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal-foot .btn { flex: 1; }

/* ===== 通知弹层 ===== */
.notif-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item b { font-size: 13px; display: block; }
.notif-item .muted { display: block; margin-top: 2px; line-height: 1.5; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: #22302a; color: #fff; border-radius: 12px; padding: 10px 20px; font-size: 13.5px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: toastin .2s ease; max-width: 80vw; }
html[data-theme="dark"] .toast { background: #2a3d33; }
@keyframes toastin { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%); } }

/* ===== v2.1 ===== */
.gh-trend { height: 42px; margin: 2px 6px 0; }
.gh-trend svg { width: 100%; height: 42px; display: block; }
.gh-trend-lg { display: flex; align-items: center; gap: 12px; padding: 2px 14px 4px; font-size: 10.5px; color: var(--muted); }
.gh-trend-lg i { font-style: normal; display: flex; align-items: center; gap: 4px; }
.gh-trend-lg s { width: 14px; height: 3px; border-radius: 2px; text-decoration: none; display: inline-block; }
.lg-temp { background: var(--gold); }
.lg-hum { background: var(--info); }
.gh-trend-lg span { margin-left: auto; }
.gh-metric.hot b { color: var(--bad); }
.alert-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.as-item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: flex; align-items: baseline; gap: 10px; border: 1px solid var(--border); }
.as-item b { font-size: 19px; font-variant-numeric: tabular-nums; }
.as-item span { font-size: 11.5px; color: var(--muted); }
.as-danger b { color: var(--bad); }
.as-warn b { color: var(--warn); }
.as-info b { color: var(--info); }
.as-ok b { color: var(--good); font-size: 16px; }
.chart-right { display: flex; align-items: center; gap: 4px; }
.chart-tip { position: absolute; z-index: 5; background: #22302a; color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 12px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.25); transform: translate(-14%, -110%); white-space: nowrap; }
.chart-tip b { display: block; font-size: 11px; opacity: .85; font-weight: 500; }
.chart-tip span { font-size: 13.5px; font-weight: 700; }
.tip-bad { font-style: normal; display: inline-block; margin-left: 6px; background: var(--bad); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.chart-box { position: relative; }
.prog-wrap { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.prog-bar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; }
.prog-wrap .muted { flex-shrink: 0; font-size: 11.5px; }
.filter-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-chips button { border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 16px; font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 600; transition: all .15s; }
.filter-chips button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-chips button:hover:not(.active) { border-color: var(--accent); color: var(--accent-deep); }
.pest-imgs { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.pest-imgs img { width: 86px; height: 66px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--border); transition: transform .15s; }
.pest-imgs img:hover { transform: scale(1.04); }
.lightbox { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; display: block; }
.upload-prev { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.upload-prev img { width: 74px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.skel-wrap { display: grid; gap: 12px; }
.skel { height: 88px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface) 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== 地块状态墙（大规模巡检视图） ===== */
.wall-card { padding: 16px 18px 18px; }
.wall-filter { margin-left: 0; }
.wall-filter button { padding: 4px 13px; font-size: 12px; }
.plot-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.plot {
  aspect-ratio: 1; border: none; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.95); text-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease; font-family: inherit;
  display: grid; place-items: center; padding: 0;
}
.plot:hover { transform: scale(1.12); box-shadow: var(--shadow-hover); z-index: 2; position: relative; }
.st-ok      { background: #23a06b; }
.st-info    { background: #e3b93e; }
.st-warn    { background: #e88a2e; }
.st-danger  { background: #d9483b; }
.st-stale   { background: #5e7fa8; }
.st-offline { background: #5f6b64; }
.st-partial { background: #a8b3ac; }
.st-none    { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--faint); text-shadow: none; }
html[data-theme="dark"] .st-ok      { background: #1d7a51; }
html[data-theme="dark"] .st-info    { background: #a8842a; }
html[data-theme="dark"] .st-warn    { background: #b06a1f; }
html[data-theme="dark"] .st-danger  { background: #a83a30; }
html[data-theme="dark"] .st-stale   { background: #48617f; }
html[data-theme="dark"] .st-offline { background: #3a453f; }
html[data-theme="dark"] .st-partial { background: #55605a; }
html[data-theme="dark"] .st-none    { border-color: var(--border-strong); color: var(--faint); }
html[data-theme="dark"] .plot { color: rgba(255,255,255,.92); }
/* 图例（可点选筛选） */
.wall-legend { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.lg-item { display: flex; align-items: center; gap: 5px; border: 1px solid transparent; background: none; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--muted); cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s, color .15s; }
.lg-item:hover { background: var(--surface-2); color: var(--fg); }
.lg-item.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); font-weight: 600; }
.lg-item s { width: 12px; height: 12px; border-radius: 4px; text-decoration: none; display: inline-block; }
.lg-ok      { background: #23a06b; }
.lg-info    { background: #e3b93e; }
.lg-warn    { background: #e88a2e; }
.lg-danger  { background: #d9483b; }
.lg-stale   { background: #5e7fa8; }
.lg-offline { background: #5f6b64; }
.lg-partial { background: #a8b3ac; }
.lg-none    { background: transparent; border: 1.5px dashed var(--border-strong); }
/* 悬浮预览 */
.plot-tip { position: fixed; z-index: 210; background: #22302a; color: #fff; border-radius: 10px; padding: 10px 13px; font-size: 12px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: 260px; }
.plot-tip b { display: block; font-size: 13px; margin-bottom: 3px; }
.plot-tip span { display: block; opacity: .8; line-height: 1.5; }
.plot-tip em { font-style: normal; display: block; margin-top: 4px; color: #ffb3ab; }
.plot-tip em.tip-ok { color: #7ce0b0; }

/* ===== 地块详情抽屉 ===== */
.drawer-mask { position: fixed; inset: 0; z-index: 80; background: var(--overlay); }
.gh-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(420px, 92vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0,0,0,.14); overflow-y: auto; padding: 20px 22px 26px;
  animation: drawerIn .25s cubic-bezier(.16,1,.3,1);
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-head { display: flex; align-items: flex-start; gap: 10px; }
.dr-head h3 { font-size: 18px; margin-bottom: 3px; }
.dr-head .chip-st { margin-left: auto; flex-shrink: 0; }
.chip-st.st-ok { background: var(--good-soft); color: var(--good); }
.chip-st.st-info { background: var(--gold-soft); color: var(--gold-deep); }
.chip-st.st-warn { background: var(--warn-soft); color: var(--warn); }
.chip-st.st-danger { background: var(--bad-soft); color: var(--bad); }
.chip-st.st-stale { background: var(--info-soft); color: var(--info); }
.chip-st.st-partial { background: var(--surface-2); color: var(--muted); }
.chip-st.st-offline { background: var(--surface-2); color: var(--muted); }
.chip-st.st-none { background: var(--surface-2); color: var(--faint); }
.dr-trend { margin: 14px -6px 4px; }
.dr-trend svg { width: 100%; height: 64px; display: block; }
.dr-sec { font-size: 13px; color: var(--muted); margin: 18px 0 10px; font-weight: 600; letter-spacing: .04em; }
.dv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dv-item { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.dv-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.dv-item.dv-off .dv-ic { background: var(--surface-2); color: var(--faint); }
.dv-txt b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.dv-txt b i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 2px; font-weight: 400; }
.dv-txt span { font-size: 11px; color: var(--muted); }
.al-list { display: flex; flex-direction: column; gap: 8px; }
.al-item { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border); }
.al-item .chip { flex-shrink: 0; margin-top: 1px; }
.al-item b { display: block; font-size: 12.5px; line-height: 1.45; }
.al-item .muted { display: block; margin-top: 2px; font-size: 11.5px; }
.dr-foot { margin-top: 20px; display: flex; }
.dr-foot .btn { flex: 1; }
/* ===== 抽屉：读数卡联动变色 / 传感器序号 / 阈值编辑器 ===== */
.dv-item { position: relative; }
.dv-no {
  position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.dv-item.dv-ab .dv-no { color: #fff; }
.dv-item.dv-ab.st-danger { background: var(--bad-soft); border: 1.5px solid var(--bad); }
.dv-item.dv-ab.st-danger .dv-no { background: var(--bad); }
.dv-item.dv-ab.st-warn { background: var(--warn-soft); border: 1.5px solid var(--warn); }
.dv-item.dv-ab.st-warn .dv-no { background: var(--warn); }
.dv-item.dv-ab.st-info { background: var(--gold-soft, #fdf6e3); border: 1.5px solid var(--gold-deep, #b8860b); }
.dv-item.dv-ab.st-info .dv-no { background: var(--gold-deep, #b8860b); }
.dv-viol { font-style: normal; font-size: 11px; color: var(--bad); margin-top: 2px; display: block; }
.dv-item.dv-ab.st-warn .dv-viol { color: var(--warn); }
.dv-item.dv-ab.st-info .dv-viol { color: var(--gold-deep, #b8860b); }
.al-link { cursor: pointer; }
.al-link:hover { background: var(--surface-2); }
.rule-editor { display: flex; flex-direction: column; gap: 6px; }
.rule-row {
  display: grid; grid-template-columns: 1fr 66px 72px 74px auto auto;
  gap: 6px; align-items: center; padding: 7px 9px;
  background: var(--surface-2); border-radius: 8px; font-size: 12px;
}
.rule-row .rr-dev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-row select, .rule-row input[type=number] {
  padding: 3px 5px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px; font-family: inherit;
}
.rule-row input[type=number] { width: 100%; }
.rule-row .rr-en { display: flex; align-items: center; gap: 3px; color: var(--muted); white-space: nowrap; }
.rule-row .rr-del {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 2px 4px; border-radius: 6px; font-family: inherit;
}
.rule-row .rr-del:hover { color: var(--bad); background: var(--bad-soft); }
.rule-row.rule-add { background: transparent; border: 1px dashed var(--border); }
.rule-row .rr-addbtn {
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 12px; white-space: nowrap; font-family: inherit;
}
.rule-row .rr-addbtn:hover { background: var(--accent-soft, rgba(14,159,110,.1)); }
.rule-savebar { margin-top: 8px; }

/* ===== 抽屉：地块档案 / 时间线 / 恢复事件 ===== */
.gh-profile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.gp-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gp-head .chip-ok { background: var(--good-soft); color: var(--good); border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; }
.gp-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.gp-bar { height: 6px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 8px; }
.gp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.tl-list { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.tl-item:last-child { border-bottom: none; }
.tl-date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; width: 76px; flex-shrink: 0; padding-top: 1px; }
.tl-ic { font-size: 14px; flex-shrink: 0; }
.tl-item b { display: block; line-height: 1.45; }
.tl-item .muted { display: block; font-size: 11.5px; margin-top: 1px; }
.rec-item { opacity: .75; }
@media (max-width: 860px) { .tl-date { width: 64px; } }

/* ===== 管理页：传感器配置 / 异常阈值 ===== */
.mgr-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mgr-bar .spacer { flex: 1; }
.mgr-bar .btn { flex-shrink: 0; }
.mgr-bar code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }
.sel { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 13px; }
.mgr-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 780px; }
.mgr-table th {
  text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.mgr-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mgr-table tbody tr:last-child td { border-bottom: none; }
.mgr-table tbody tr:hover { background: var(--surface-2); }
.mgr-table select, .mgr-table input[type=number] {
  padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12.5px; font-family: inherit;
}
.mgr-table input[type=number] { width: 78px; }
.mgr-table input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
.mgr-table th:first-child, .mgr-table td:first-child { padding-left: 10px; padding-right: 4px; }
#devTable td:nth-child(3) { white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.dev-key { cursor: pointer; font-size: 11px; background: var(--surface-2); padding: 3px 8px; border-radius: 6px; color: var(--muted); user-select: all; }
.dev-key:hover { color: var(--accent); }
.row-ops { white-space: nowrap; }
.row-btn { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-family: inherit; }
.row-btn:hover { color: var(--accent); border-color: var(--accent); }
.row-btn.row-del:hover { color: var(--bad); border-color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-ok { background: var(--good); }
.dot-off { background: #b9c4bd; }
@media (max-width: 860px) { .mgr-bar code { display: none; } }
@media (max-width: 860px) {
  .gh-drawer { width: 100vw; border-left: none; }
  .dv-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .gh-grid { grid-template-columns: 1fr; }
  .row2col { grid-template-columns: 1fr; }
  .alert-stats { grid-template-columns: repeat(2, 1fr); }
  .sync-hint { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.16,1,.3,1); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-hover); }
  .sidebar.collapsed, body.nav-collapsed .main { width: auto; margin-left: 0; }
  .main { margin-left: 0; padding: 0 18px 36px; }
  .menu-btn { display: grid; }
  .tb-head h1 { font-size: 18px; }
  .collapse-btn { display: none; }
  .toast { bottom: 24px; }
}

/* ===== AI 助手（晨报 + 工具化问答） ===== */
.ai-report { padding: 18px 20px 14px; }
.ai-rep-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-rep-head b { font-size: 15px; }
.ai-rep-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ai-rep-stats .as-item { flex-direction: column; gap: 2px; padding: 10px 12px; }
.ai-rep-sec { font-size: 13px; margin: 16px 0 8px; color: var(--fg); }
.ai-rep-sec::before { content: ''; display: inline-block; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); margin-right: 7px; }
.ai-rep-line { font-size: 12.5px; color: var(--muted); padding: 4px 2px; }
.ai-tips { display: flex; flex-direction: column; gap: 6px; }
.ai-tip { font-size: 12.8px; line-height: 1.6; background: var(--accent-soft); color: var(--accent-deep); border-radius: var(--radius-sm); padding: 8px 12px; }
.ai-rep-foot { font-size: 11.5px; margin-top: 14px; }
.ai-chat { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ai-msgs { max-height: 420px; min-height: 160px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { display: flex; flex-direction: column; max-width: 86%; }
.ai-msg.me { align-self: flex-end; align-items: flex-end; }
.ai-bubble { font-size: 13px; line-height: 1.65; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); white-space: normal; word-break: break-word; }
.ai-msg.me .ai-bubble { background: var(--accent); color: #fff; border-color: transparent; }
.ai-msg.me .ai-bubble { background: var(--accent-deep); }
html[data-theme="dark"] .ai-msg.me .ai-bubble { color: #0f1512; }
.ai-tool { font-size: 11px; color: var(--faint); margin-top: 4px; }
.ai-tool code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--accent-deep); }
.ai-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 10px; }
.ai-chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: 12px; color: var(--muted); cursor: pointer; font-family: inherit; transition: all .15s; }
.ai-chip:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.ai-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.ai-input input { flex: 1; border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-family: inherit; background: var(--surface); color: var(--fg); }
.ai-input input:focus { outline: none; border-color: var(--accent); }

/* ===== 财务记账 ===== */
.fin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fin-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.fin-stat .muted { font-size: 12px; }
.fin-stat b { font-size: 17px; letter-spacing: .3px; }
.fin-in { color: var(--good); }
.fin-out { color: var(--bad); }
#finTable td { white-space: nowrap; }
#finTable td:nth-child(7) { white-space: normal; min-width: 140px; }
.fin-line { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.fin-more { color: var(--accent); font-size: 12.5px; text-decoration: none; }

/* ===== v15 总览可视化（去玩具化） ===== */
.stat-body { min-width: 0; flex: 1; }
.stat-body span { display: block; }
.stat-spark { margin-top: 6px; height: 26px; }
.stat-spark svg { width: 100%; height: 26px; display: block; }
.ov-charts { display: grid; grid-template-columns: 1.9fr 1fr; gap: 16px; margin-top: 16px; }
.ov-trend, .ov-side { padding: 16px 18px 12px; }
.ov-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ov-card-head b { font-size: 14.5px; display: block; }
.ov-card-head .muted { display: block; font-size: 11.5px; margin-top: 2px; }
.ov-card-head .delta-chip { margin-top: 3px; }
.ov-now { display: flex; gap: 12px; flex-wrap: wrap; }
.ov-now-item { display: flex; align-items: baseline; gap: 5px; padding: 4px 12px; border-radius: 10px; white-space: nowrap; }
.ov-now-item b { font-size: 21px; font-variant-numeric: tabular-nums; }
.ov-now-item span { font-size: 11px; color: var(--muted); }
.ov-temp { background: var(--gold-soft); color: var(--gold-deep); }
.ov-hum { background: var(--info-soft); color: var(--info); }
.ft-box { position: relative; }
.ft-box svg { width: 100%; height: 240px; display: block; }
.ft-box svg line { stroke: var(--border-strong); }
.ft-box svg text { fill: var(--muted); }
.ht-box { position: relative; }
.ht-box svg { width: 100%; height: 150px; display: block; }
.ht-box svg line { stroke: var(--border-strong); }
.ht-box svg text { fill: var(--muted); }
.delta-chip { font-style: normal; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.delta-chip.up { background: var(--good-soft); color: var(--good); }
.delta-chip.down { background: var(--bad-soft); color: var(--bad); }
.ov-fin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 12px; cursor: pointer; transition: background .15s; border-radius: 0 0 10px 10px; }
.ov-fin:hover { background: var(--surface-2); }
.ov-fin-item span { display: block; font-size: 11px; color: var(--muted); }
.ov-fin-item b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.empty-ill { padding: 30px 16px; text-align: center; color: var(--muted); }
.empty-ill svg { opacity: .5; margin-bottom: 8px; }
.empty-ill b { display: block; font-size: 13.5px; color: var(--fg); }
.empty-ill span { display: block; font-size: 12px; margin-top: 3px; }
.crop-avatar { width: 34px; height: 34px; border-radius: 11px; flex: none; background: var(--cc, var(--accent-soft)); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.lite-top { display: flex; align-items: center; gap: 8px; }
.lite-top b { font-size: 13px; }
.lite-top .chip { margin-left: auto; }
.lite-item b b { display: inline; font-weight: 700; color: var(--fg); font-size: inherit; }
.batch-row { cursor: pointer; border-radius: 10px; margin: 0 -8px; padding-left: 8px !important; padding-right: 8px !important; transition: background .15s; }
.batch-row:hover { background: var(--surface-2); }
@media (max-width: 1100px) { .ov-charts { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .ov-now { width: 100%; }
  .ov-fin-item b { font-size: 13px; }
}

/* ===== 土地流转 ===== */
.lc-plots { display: flex; flex-direction: column; gap: 6px; }
.lc-plot-row { display: grid; grid-template-columns: 1fr 120px 28px; gap: 6px; align-items: center; }
.lc-plot-row select, .lc-plot-row input { border: 1.5px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; background: var(--surface); color: var(--fg); }
.lc-plot-row .lp-del { border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 6px; }
.lc-plot-row .lp-del:hover { background: var(--bad-soft); color: var(--bad); }
.lc-area-line { background: var(--surface-2); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
.modal-wide { width: min(760px, 100%); }
.lc-meta { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin: 4px 0 6px; }
.lc-meta > div { display: flex; gap: 10px; font-size: 13px; }
.lc-meta span { color: var(--muted); flex: none; width: 76px; }
.lc-meta b { font-weight: 550; }
.lc-sec { font-size: 13px; font-weight: 600; color: var(--fg); margin: 16px 0 8px; }
.lc-sec::before { content: ''; display: inline-block; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); margin-right: 7px; }
#tab-land .mgr-table td:nth-child(6), #tab-land .mgr-table th:nth-child(6) { line-height: 1.4; }
#lcTable td, #llTable td { vertical-align: top; }
#lcTable .chip-st, #llTable .chip-st { white-space: nowrap; }

/* ===== 合规办理中心 ===== */
.cp-redline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(90deg, var(--bad-soft), transparent 70%); border: 1px solid var(--bad); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 12.5px; color: var(--fg); }
.cp-redline b { color: var(--bad); font-size: 13px; flex: none; display: flex; align-items: center; gap: 5px; }
.cp-redline b::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px rgba(217,72,59,.15); }
.cp-redline span { color: var(--muted); }
.cp-grp { margin: 20px 0 10px; }
.cp-grp::before { content: ''; display: inline-block; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); margin-right: 7px; }
.cp-list { display: flex; flex-direction: column; gap: 10px; }
.cp-task { display: grid; grid-template-columns: 128px 1fr auto; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; align-items: start; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.cp-task:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.cp-task.done { opacity: .78; background: linear-gradient(90deg, var(--accent-soft), var(--surface) 45%); }
.cp-task.overdue { border-color: rgba(217,72,59,.45); }
.cp-tk-when { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; align-self: start; }
.cp-tk-when b { color: var(--fg); font-size: 12.5px; }
.cp-od { font-style: normal; color: #fff; background: var(--bad); border-radius: 5px; padding: 1px 6px; font-size: 11px; margin-top: 4px; width: fit-content; }
.cp-tk-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.cp-tk-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-tk-main p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.cp-tk-main > span { font-size: 12px; }
.cp-risk { color: var(--bad); font-size: 12px; }
.cp-tk-ops { display: flex; flex-direction: column; gap: 6px; align-self: center; }
.cp-sts { display: flex; gap: 6px; }
.cp-st { border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all var(--dur-fast); white-space: nowrap; }
.cp-st:hover { border-color: var(--accent); color: var(--accent); }
.cp-st.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
html[data-theme="dark"] .cp-st.on { color: #0f1512; }
.cp-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cp-ck input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.lf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.lf-amount { display: flex; align-items: center; background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; margin-top: 14px; font-size: 13px; color: var(--accent-deep); }
html[data-theme="dark"] .lf-amount { color: var(--accent); }
.lf-amount b { font-size: 17px; margin-left: 8px; }
#lfTable td { vertical-align: top; }
#lfTable .chip-st { white-space: nowrap; }
@media (max-width: 960px) {
  .cp-task { grid-template-columns: 1fr; }
  .cp-tk-when { flex-direction: row; align-items: center; }
  .cp-tk-ops { flex-direction: row; }
}
.cp-task.one-col { grid-template-columns: 1fr auto; }

/* ===== v18 项目化 ===== */
.proj-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.pj-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pj-title b { font-size: 16px; }
.pj-title span { font-size: 12.5px; }
.pj-go { margin-left: auto; }
.pj-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.pj-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; margin-bottom: 5px; }
.pj-head span { color: var(--muted); }
.pj-head b { font-size: 12.5px; font-weight: 600; }
.pj-track { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pj-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .5s ease; }
.pj-fill.full { background: linear-gradient(90deg, #12875c, #0e9f6e); }
.cp-link { display: inline-block; font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.cp-link.full { color: var(--good); background: var(--good-soft); font-weight: 600; }
.cp-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cp-calc { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(360px, 6fr); gap: 16px; align-items: start; }
.cp-calc-p { padding: 16px 18px; }
.cp-calc-r { display: flex; flex-direction: column; gap: 12px; }
.calc-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.calc-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.calc-kpi span { font-size: 12px; color: var(--muted); }
.calc-kpi b { font-size: 16.5px; letter-spacing: -.2px; }
.calc-kpi i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.calc-kpi.ok b { color: var(--good); }
.calc-kpi.bad b { color: var(--bad); }
.calc-be { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.calc-be > b { font-size: 13px; }
.calc-be-row { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; }
.calc-be-row span { color: var(--muted); width: 210px; flex: none; }
.calc-be-row b { font-weight: 650; }
.calc-be-row i { font-style: normal; color: var(--bad); font-size: 12px; }
.calc-tbl { padding: 14px 16px; }
.calc-tbl > b { display: block; font-size: 13px; margin-bottom: 8px; }
.calc-tbl table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.calc-tbl th, .calc-tbl td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: right; }
.calc-tbl th:first-child, .calc-tbl td:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.calc-tbl td.pos { color: var(--good); font-weight: 600; }
.calc-tbl td.neg { color: var(--bad); font-weight: 600; }
.lf-sel, #lfSelAll { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
@media (max-width: 1100px) { .cp-calc { grid-template-columns: 1fr; } .calc-kpis { grid-template-columns: 1fr; } }

/* ===== v20 合规条目可维护 ===== */
.cp-ops { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.cp-op { border: none; background: var(--surface-2); color: var(--muted); width: 22px; height: 22px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: all var(--dur-fast); padding: 0; }
.cp-op:hover { background: var(--accent); color: #fff; }
.cp-task .cp-ops { float: right; }
/* ===== v34 阈值模板：中性石墨设计系统（表格优先 / 等宽数字 / 无装饰） ===== */
/* 本页专用色板：石墨灰阶为主，语义色只体现在文字，低饱和 */
.tpl-grid {
  --tg-ink: #242b2e; --tg-sub: #78848a; --tg-faint: #a3adb2;
  --tg-line: #e4e8ea; --tg-line-soft: #eef1f2; --tg-surface: #ffffff;
  --tg-ok: #1f6b52; --tg-warn: #9a6a15; --tg-dgr: #b0473c;
  --tg-hover: #fafbfb;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
html[data-theme="dark"] .tpl-grid {
  --tg-ink: #e6ede9; --tg-sub: #93a299; --tg-faint: #6f8075;
  --tg-line: #2c3a33; --tg-line-soft: #22302a; --tg-surface: #151d19;
  --tg-ok: #4fc39a; --tg-warn: #d7a94e; --tg-dgr: #e07165;
  --tg-hover: #1a241f;
}
.tpl-card { background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 10px; padding: 14px 18px 12px; transition: border-color .15s; }
.tpl-card:hover { border-color: var(--tg-sub); }
.tpl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tpl-name { font-size: 14px; font-weight: 600; color: var(--tg-ink); line-height: 1.4; }
.tpl-badge { font-size: 10px; font-weight: 500; color: var(--tg-sub); border: 1px solid var(--tg-line); border-radius: 4px; padding: 1px 5px; }
.tpl-meta { font-size: 11.5px; color: var(--tg-sub); }
.tpl-ops { display: inline-flex; gap: 6px; flex-shrink: 0; }
.tpl-ops .row-btn { font-size: 11.5px; padding: 4px 10px; border-radius: 6px; }
/* 表格固定布局：前四列按内容定宽，数字聚拢；备注列吃剩余宽度 */
.tpl-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.tpl-table th { text-align: left; font-size: 10.5px; font-weight: 500; letter-spacing: .04em; color: var(--tg-faint); padding: 0 20px 7px 0; white-space: nowrap; overflow: hidden; }
.tpl-table td { padding: 8px 20px 8px 0; border-top: 1px solid var(--tg-line-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-table tr:first-child td { border-top: none; }
.tpl-table col.c1 { width: 110px; }
.tpl-table col.c2 { width: 150px; }
.tpl-table col.c3 { width: 160px; }
.tpl-table col.c4 { width: 160px; }
.tr-name { color: var(--tg-ink); font-weight: 500; }
.tr-num { font-family: var(--mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tr-ok { color: var(--tg-ok); }
.tr-warn { color: var(--tg-warn); }
.tr-dgr { color: var(--tg-dgr); }
.tr-ext { font-size: 11px; color: var(--tg-sub); }
.tpl-note { font-size: 11px; color: var(--tg-faint); margin-top: 8px; line-height: 1.45; }
/* ===== v36 表格导入：拖拽区 + 预览表格 ===== */
.sheet-drop { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.sheet-drop:hover, .sheet-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.sheet-drop-ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: 22px; color: var(--accent); }
.sheet-drop b { font-size: 13px; font-weight: 600; color: var(--fg); }
.sheet-preview-h { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.sheet-preview-h b { color: var(--accent-deep); }
.sheet-preview-wrap { max-height: 232px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.sheet-preview { width: 100%; border-collapse: collapse; font-size: 12px; }
.sheet-preview th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.sheet-preview td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.sheet-preview tr:last-child td { border-bottom: none; }
.sp-i { color: var(--faint); font-family: var(--mono, monospace); }
.sheet-preview input, .sheet-preview select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--border); border-radius: 5px; padding: 4px 6px; font-size: 12px; font-family: inherit; background: var(--surface); color: var(--fg); outline: none; }
.sheet-preview input:focus, .sheet-preview select:focus { border-color: var(--accent); }
/* ===== v22 接入指引 ===== */
.guide-code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre; margin: 6px 0 4px; font-family: var(--mono, ui-monospace, Menlo, monospace); }
.dot-never { background: #d5dbd7; box-shadow: none; }
/* ===== 编辑弹窗色带配色（仅作辅助预览，低饱和） ===== */
.bar-seg { min-width: 3%; }
.seg-green { background: #7fb694; }
.seg-amber { background: #d6b06a; }
.seg-red { background: #cf8b84; }
.seg-grey { background: #bcc4cb; }
/* ===== v30 阈值编辑表单：紧凑表格化（输入框显式覆盖全局巨型样式） ===== */
.tplf3 { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; }
.tf3-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tf3-head select { border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; background: var(--surface-2); color: var(--fg); width: 150px; flex-shrink: 0; }
.tf3-head .row-btn { white-space: nowrap; flex-shrink: 0; }
.tf3-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
/* 表格：列对齐，紧凑行高 */
.tf3-table { display: grid; grid-template-columns: 44px 74px 74px 1fr; gap: 1px 8px; align-items: center; }
.tf3-th { font-size: 11px; color: var(--muted); padding-bottom: 3px; }
.tf3-lv { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.tf3-lv i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.lv-ok { color: #1f6b52; } .lv-ok i { background: #1f6b52; }
.lv-warn { color: #9a6a15; } .lv-warn i { background: #9a6a15; }
.lv-dgr { color: #b0473c; } .lv-dgr i { background: #b0473c; }
html[data-theme="dark"] .lv-ok { color: #4fc39a; } html[data-theme="dark"] .lv-ok i { background: #4fc39a; }
html[data-theme="dark"] .lv-warn { color: #d7a94e; } html[data-theme="dark"] .lv-warn i { background: #d7a94e; }
html[data-theme="dark"] .lv-dgr { color: #e07165; } html[data-theme="dark"] .lv-dgr i { background: #e07165; }
.tf3-desc { font-size: 11px; color: var(--muted); }
/* 显式覆盖 .field input 的 10px/10px/14px 巨型样式 */
.tplf3 .tf-inp { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--border); border-radius: 6px; padding: 5px 7px; font-size: 13px; font-family: inherit; background: var(--surface-2); color: var(--fg); outline: none; }
.tplf3 .tf-inp:focus { border-color: var(--accent); background: var(--surface); }
.tf3-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.tf3-foot .tf-inp { width: 46px; display: inline-block; padding: 3px 5px; font-size: 12px; }
.tf3-sep { width: 1px; height: 13px; background: var(--border); }
.tf3-err { font-size: 11.5px; color: var(--danger, #d93025); margin-top: 5px; }
.tf3-err:empty { display: none; }
input.bad { border-color: var(--danger, #d93025) !important; background: rgba(217,48,37,.07); }
.modal-wide { width: min(600px, 100%); }
/* 弹窗顶部三个元字段：名称/作物并排，备注整行，紧凑 */
.tf3-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tf3-meta .field.full { grid-column: 1 / -1; }
.tf3-meta .field { margin-bottom: 10px; }
.tf3-meta .field input { border-radius: 7px; padding: 7px 10px; font-size: 13px; }

/* ===== 经营管理模块（v13 规划文档） ===== */
.erp-modnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.erp-mod { border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 9px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.erp-mod:hover { border-color: var(--accent); color: var(--accent); }
.erp-mod.active { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .erp-mod.active { color: #0f1512; }
.erp-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.erp-subtab { border: none; background: transparent; color: var(--muted); padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px; position: relative; }
.erp-subtab:hover { background: var(--surface-2); color: var(--fg); }
.erp-subtab.active { color: var(--accent); background: var(--accent-soft); }
html[data-theme="dark"] .erp-subtab.active { background: var(--accent-soft); }
.erp-card { margin-bottom: 16px; }
.erp-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.erp-card-hd h3 { font-size: 15px; }
.erp-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.erp-toolbar .spacer { flex: 1; }
.erp-table { font-size: 13px; }
.erp-table th { white-space: nowrap; background: var(--surface-2); }
.erp-table td { vertical-align: middle; }
.erp-form { grid-template-columns: 1fr 1fr; gap: 0 14px; }
.erp-form .field.full { grid-column: 1 / -1; }
.erp-form .field { margin-bottom: 12px; }
.erp-form .field input, .erp-form .field select, .erp-form .field textarea { border-radius: 8px; padding: 9px 11px; font-size: 13.5px; }
.empty-mini { padding: 30px 20px; text-align: center; color: var(--faint); font-size: 13px; background: var(--surface-2); border-radius: 10px; }
.lnk { border: none; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 5px; }
.lnk:hover { text-decoration: underline; }
.lnk.danger { color: var(--bad); }
.chip-gray { background: var(--surface-2); color: var(--muted); }
.chip-green { background: var(--good-soft); color: var(--good); }
.chip-blue { background: var(--info-soft); color: var(--info); }
.chip-red { background: var(--bad-soft); color: var(--bad); }
.chip-amber { background: var(--warn-soft); color: var(--warn); }
.up { color: var(--good); } .down { color: var(--bad); }
.erp-total { text-align: right; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.erp-total b { color: var(--fg); font-size: 15px; }
.wl-item { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.wl-item:last-child { border-bottom: none; }
.wl-item b { margin-left: auto; color: var(--warn); font-size: 15px; }
.wl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.modal-title { font-size: 17px; margin-bottom: 16px; }

/* ===================== v40 通用交互增强 UX ===================== */
/* 增强表格工具条 */
.ux-grid { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.ux-grid > .mgr-table { border: none; border-radius: 0; margin: 0; }
.ux-grid-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.ux-grid-tools { display: flex; align-items: center; gap: 12px; }
.ux-grid-right { margin-left: auto; }
.ux-search { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--faint); min-width: 220px; transition: border-color .18s; }
.ux-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ux-search input { border: none; outline: none; background: transparent; color: var(--fg); font-size: 13px; width: 100%; }
.ux-search input::placeholder { color: var(--faint); }
.ux-grid-count { font-size: 12px; color: var(--muted); }
.ux-grid-count b { color: var(--fg); font-size: 13px; }
.ux-tool-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 7px; padding: 6px 11px; font-size: 12px; cursor: pointer; transition: all .18s; }
.ux-tool-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ux-sortable { cursor: pointer; user-select: none; position: relative; }
.ux-sortable:hover { color: var(--accent); }
.ux-sortable.asc::after, .ux-sortable.desc::after { content: ''; position: absolute; right: 6px; top: 50%; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.ux-sortable.asc::after { border-bottom: 5px solid var(--accent); transform: translateY(-60%); }
.ux-sortable.desc::after { border-top: 5px solid var(--accent); transform: translateY(-10%); }
.ux-pager { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.ux-pg { min-width: 30px; height: 30px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 7px; cursor: pointer; font-size: 12px; transition: all .18s; }
.ux-pg:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ux-pg.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.ux-pg:disabled { opacity: .4; cursor: not-allowed; }
.ux-pg-dot { color: var(--faint); padding: 0 3px; }

/* SVG 图表 */
.ux-chart { width: 100%; height: auto; display: block; overflow: visible; }
.ux-ax { fill: var(--faint); font-size: 10px; }
.ux-chart-empty { padding: 32px; text-align: center; color: var(--faint); font-size: 13px; }
.ux-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ux-donut { width: 170px; height: 170px; flex-shrink: 0; }
.ux-donut-v { fill: var(--fg); font-size: 22px; font-weight: 700; }
.ux-donut-l { fill: var(--faint); font-size: 11px; }
.ux-donut-lg { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 120px; }
.ux-lg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.ux-lg i { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.ux-lg b { margin-left: auto; color: var(--fg); }
.ux-prog { display: flex; flex-direction: column; gap: 14px; }
.ux-prog-row { display: flex; flex-direction: column; gap: 6px; }
.ux-prog-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ux-prog-top b { color: var(--fg); }
.ux-prog-track { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ux-prog-track i { display: block; height: 100%; border-radius: 4px; transition: width .5s ease; }

/* 右侧抽屉 */
.ux-drawer-mask { position: fixed; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .2s; z-index: 900; }
.ux-drawer-mask.show { opacity: 1; }
.ux-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: var(--surface); box-shadow: -12px 0 40px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); z-index: 901; display: flex; flex-direction: column; }
.ux-drawer.wide { width: 720px; }
.ux-drawer.show { transform: translateX(0); }
.ux-drawer-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.ux-drawer-hd h3 { font-size: 16px; margin: 0; }
.ux-drawer-x { border: none; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; transition: all .18s; }
.ux-drawer-x:hover { background: var(--surface-2); color: var(--fg); }
.ux-drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.ux-drawer-ft { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }

/* 增强表单字段 */
.ux-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ux-field.full { grid-column: 1 / -1; }
.ux-field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.ux-field > label i { color: var(--bad); font-style: normal; }
.ux-field .inp { border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 11px; font-size: 13px; background: var(--surface); color: var(--fg); width: 100%; outline: none; transition: border-color .18s, box-shadow .18s; }
.ux-field .inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ux-field .ux-err { color: var(--bad); font-size: 11px; }
.ux-field .ux-hint { color: var(--faint); font-size: 11px; }
.ux-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg); cursor: pointer; }
.ux-check input { accent-color: var(--accent); width: 15px; height: 15px; }

/* 经营驾驶舱 */
.cockpit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cockpit-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.cockpit-card h4 { margin: 0 0 4px; font-size: 14px; }
.cockpit-card .sub { font-size: 11px; color: var(--faint); margin-bottom: 14px; }
.cockpit-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cockpit-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; position: relative; overflow: hidden; }
.cockpit-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.cockpit-kpi.k-amber::before { background: var(--gold); }
.cockpit-kpi.k-red::before { background: var(--bad); }
.cockpit-kpi.k-blue::before { background: var(--info); }
.cockpit-kpi label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.cockpit-kpi b { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.cockpit-kpi small { font-size: 11px; color: var(--faint); display: block; margin-top: 4px; }
@media (max-width: 640px) { .ux-search { min-width: 0; } .ux-donut { width: 130px; height: 130px; } }

/* 土地流转二级标签 */
.land-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 16px; }
.land-subtab { border: none; background: transparent; color: var(--muted); padding: 10px 16px; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; transition: all .18s; font-weight: 500; }
.land-subtab:hover { color: var(--fg); }
.land-subtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.land-view[hidden] { display: none; }
.rent-pay-btn { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-deep); border-radius: 6px; padding: 4px 10px; font-size: 11px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.rent-pay-btn:hover { background: var(--accent); color: #fff; }
.rent-pay-btn:disabled { opacity: .45; cursor: not-allowed; border-color: var(--border-strong); background: transparent; color: var(--faint); }
.rent-prog { display: inline-flex; align-items: center; gap: 6px; min-width: 90px; }
.rent-prog .rp-track { width: 54px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rent-prog .rp-track i { display: block; height: 100%; border-radius: 3px; }
.rent-prog .rp-txt { font-size: 11px; color: var(--muted); min-width: 30px; }
