/* ==========================================================================
   云花卫士 · 花卉病虫害管理系统
   设计系统：深绿 + 奶油底色 + 暖色风险标识
   ========================================================================== */

:root {
  --bg: #f2f5ee;
  --bg-soft: #f7f9f3;
  --surface: #ffffff;
  --surface-2: #fbfcf8;
  --ink: #1b2a22;
  --ink-2: #34463b;
  --muted: #718076;
  --muted-2: #98a49b;
  --line: #e4e9df;
  --line-strong: #d3dbcc;

  --green-950: #082c1f;
  --green-900: #0b3b2a;
  --green-800: #0f4a33;
  --green-700: #146144;
  --green-600: #1b7a55;
  --green-500: #2c9468;
  --green-100: #e4f0e8;
  --green-50: #eef6f0;
  --lime: #b9d96b;
  --lime-soft: #e7f1c9;

  --amber: #dd9b2f;
  --amber-soft: #fbf0da;
  --red: #d4513f;
  --red-soft: #fbe9e5;
  --blue: #3d79b8;
  --blue-soft: #e8f1fa;
  --slate: #7d8b83;
  --slate-soft: #eef1ed;

  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(18, 45, 31, 0.05);
  --shadow-sm: 0 2px 6px rgba(18, 45, 31, 0.05), 0 1px 2px rgba(18, 45, 31, 0.04);
  --shadow: 0 18px 40px -24px rgba(11, 59, 42, 0.28), 0 2px 6px rgba(11, 59, 42, 0.04);
  --shadow-lg: 0 30px 70px -30px rgba(8, 44, 31, 0.4);

  --sidebar-w: 244px;
  --topbar-h: 76px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SF Pro Display", "DIN Alternate", ui-sans-serif, var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
::selection { background: var(--lime-soft); color: var(--green-900); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd4c8; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b3bfae; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-28 { margin-top: 28px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- 启动屏 */
.boot-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #174f38 0%, #0b3b2a 55%, #082c1f 100%);
  color: #eaf3e9; transition: opacity 0.35s ease, visibility 0.35s;
}
.boot-screen.is-done { opacity: 0; visibility: hidden; }
.boot-logo { display: flex; align-items: center; gap: 14px; }
.boot-logo svg { border-radius: 15px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6); }
.boot-brand { font-size: 26px; font-weight: 700; letter-spacing: 0.06em; }
.boot-brand span { display: block; font-size: 11px; letter-spacing: 0.14em; color: var(--lime); font-weight: 600; margin-top: 2px; }
.boot-bar { width: 180px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); margin-top: 30px; overflow: hidden; }
.boot-bar i { display: block; width: 45%; height: 100%; border-radius: 99px; background: var(--lime); animation: bootSlide 1.2s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
.boot-text { margin-top: 14px; font-size: 12px; color: rgba(234, 243, 233, 0.55); letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- 登录 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr); }
.login-aside {
  position: relative; overflow: hidden; color: #eef5ea;
  background: radial-gradient(120% 100% at 10% 0%, #1a5b40 0%, #0e4a34 45%, #082c1f 100%);
  padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-aside::before {
  content: ""; position: absolute; right: -160px; top: -140px; width: 560px; height: 560px;
  border-radius: 50%; border: 1px solid rgba(185, 217, 107, 0.18);
  box-shadow: 0 0 0 60px rgba(185, 217, 107, 0.035), 0 0 0 140px rgba(185, 217, 107, 0.025),
    0 0 0 240px rgba(185, 217, 107, 0.015);
}
.login-aside::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 260px;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 26px);
  mask-image: linear-gradient(to top, #000, transparent);
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.login-brand .mark { width: 54px; height: 54px; border-radius: 15px; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14); }
.login-brand h1 { font-size: 24px; letter-spacing: 0.08em; font-weight: 700; }
.login-brand p { font-size: 11px; letter-spacing: 0.16em; color: var(--lime); margin-top: 3px; font-weight: 600; }
.login-hero { position: relative; z-index: 1; max-width: 520px; margin: 40px 0; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.18em; color: var(--lime); font-weight: 600; }
.login-kicker::before { content: ""; width: 22px; height: 1px; background: var(--lime); }
.login-hero h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.28; margin: 20px 0 18px; font-weight: 700; letter-spacing: 0.01em; }
.login-hero h2 em { font-style: normal; color: var(--lime); }
.login-hero > p { font-size: 15px; line-height: 1.9; color: rgba(238, 245, 234, 0.7); max-width: 430px; }
.login-points { margin-top: 34px; display: grid; gap: 14px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: rgba(238, 245, 234, 0.82); }
.login-points .icon { width: 18px; height: 18px; color: var(--lime); margin-top: 2px; }
.login-stats { position: relative; z-index: 1; display: flex; gap: 44px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.login-stats b { display: block; font-size: 26px; font-family: var(--font-num); font-weight: 650; letter-spacing: 0.01em; }
.login-stats span { font-size: 12px; color: rgba(238, 245, 234, 0.55); letter-spacing: 0.08em; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 40px; background: var(--bg-soft); }
.login-box { width: 100%; max-width: 380px; }
.login-box h3 { font-size: 25px; font-weight: 700; letter-spacing: 0.01em; }
.login-box .sub { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.login-form { margin-top: 32px; display: grid; gap: 18px; }
.login-error { display: none; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 10px; background: var(--red-soft); color: #a3392b; font-size: 13px; }
.login-error.is-show { display: flex; }
.login-submit { width: 100%; height: 48px; margin-top: 4px; font-size: 15px; }
.login-demo { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-strong); }
.login-demo > p { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.demo-accounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.demo-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 11px; font-size: 12px; cursor: pointer; transition: 0.15s; color: var(--ink-2); }
.demo-chip b { font-weight: 650; margin-right: 4px; }
.demo-chip:hover { border-color: var(--green-500); background: var(--green-50); color: var(--green-800); transform: translateY(-1px); }
.login-foot { margin-top: 28px; font-size: 11.5px; color: var(--muted-2); display: flex; justify-content: space-between; }
.login-panel .mobile-brand { display: none; }

/* ---------------------------------------------------------------- 应用骨架 */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, #175538 0%, #0e4a34 42%, #0a3527 100%);
  color: #e7f0e4; padding: 22px 14px 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 40% at 100% 100%, rgba(185, 217, 107, 0.07), transparent 70%);
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 20px; position: relative; z-index: 1; }
.sidebar .brand .mark { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, 0.09); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.13); }
.sidebar .brand .mark svg { width: 30px; height: 30px; border-radius: 8px; }
.brand-text b { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0.13em; line-height: 1.2; }
.brand-text span { font-size: 9.5px; letter-spacing: 0.1em; color: var(--lime); font-weight: 600; }
.sidebar .nav { flex: 1; overflow-y: auto; padding-top: 6px; position: relative; z-index: 1; scrollbar-width: none; }
.sidebar .nav::-webkit-scrollbar { display: none; }
.nav-label { font-size: 10.5px; letter-spacing: 0.2em; color: rgba(231, 240, 228, 0.38); padding: 16px 12px 7px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9.5px 11px; border-radius: 9px;
  color: rgba(231, 240, 228, 0.68); font-size: 13.5px; font-weight: 500;
  transition: background 0.16s, color 0.16s; position: relative; margin-bottom: 2px;
}
.nav-item .icon { width: 19px; height: 19px; opacity: 0.85; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-item.active { color: #0b3b2a; background: var(--lime); font-weight: 650; box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.55); }
.nav-item.active .icon { opacity: 1; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.nav-item.active .nav-badge { background: rgba(11, 59, 42, 0.14); color: var(--green-900); }
.nav-badge.danger { background: var(--red); }
.sidebar-foot { position: relative; z-index: 1; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: rgba(255, 255, 255, 0.055); }
.user-card .avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--lime), #8fbf4c); color: var(--green-950); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.user-card b { display: block; font-size: 13px; line-height: 1.3; }
.user-card span { font-size: 11px; color: rgba(231, 240, 228, 0.5); }
.user-card .logout { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: rgba(231, 240, 228, 0.55); border: 0; background: transparent; cursor: pointer; }
.user-card .logout:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.user-card .logout .icon { width: 16px; height: 16px; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 30px;
  background: rgba(242, 245, 238, 0.82); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(228, 233, 223, 0.8);
}
.topbar-title h1 { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.25; }
.topbar-title p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-title .crumb { color: var(--green-600); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 12px; color: var(--muted); padding-right: 4px; border-right: 1px solid var(--line-strong); line-height: 1.5; text-align: right; }
.topbar-date b { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.weather-chip { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow-xs); }
.weather-chip .icon { width: 17px; height: 17px; color: var(--amber); }
.weather-chip .temp { font-family: var(--font-num); font-weight: 650; }
.topbar .avatar { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 650; box-shadow: 0 6px 14px -8px rgba(11, 59, 42, 0.6); }
.menu-btn { display: none; }
.sidebar-scrim { display: none; }

.page { padding: 26px 30px 50px; max-width: 1540px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; font-weight: 700; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  background: var(--surface); color: var(--ink-2); border-color: var(--line-strong);
}
.btn:hover { border-color: #bcc8b8; background: #fbfcf9; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--green-700); border-color: var(--green-700); color: #fff; box-shadow: 0 8px 18px -12px rgba(20, 97, 68, 0.8); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--green-950); }
.btn-lime:hover { background: #c6e37f; border-color: #c6e37f; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-800); border-color: transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #bf4231; border-color: #bf4231; }
.btn-danger-ghost { color: var(--red); border-color: #f0cfc9; background: #fff; }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: #e9bcb4; }
.btn-outline { background: transparent; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); display: inline-grid; place-items: center; cursor: pointer;
  color: var(--muted); transition: 0.15s;
}
.icon-btn:hover { color: var(--green-700); border-color: #c6d2c2; background: var(--green-50); }
.icon-btn .icon { width: 18px; height: 18px; }
.link-btn { border: 0; background: transparent; color: var(--green-600); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 2px; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--green-800); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- 卡片 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: flex-start; gap: 16px; padding: 18px 22px 0; }
.card-head h2, .card-title { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 22px 22px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; gap: 13px; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.kpi::after { content: ""; position: absolute; right: -26px; top: -30px; width: 92px; height: 92px; border-radius: 50%; background: var(--green-50); opacity: 0.9; }
.kpi-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; position: relative; z-index: 1; }
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon.green { background: var(--green-100); color: var(--green-700); }
.kpi-icon.amber { background: var(--amber-soft); color: #b47a15; }
.kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi-icon.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-icon.slate { background: var(--slate-soft); color: #5d6b62; }
.kpi-meta { position: relative; z-index: 1; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-family: var(--font-num); font-size: 27px; font-weight: 650; line-height: 1.18; letter-spacing: -0.02em; margin-top: 3px; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-hint { font-size: 11px; color: var(--muted-2); margin-top: 5px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-hint .up { color: var(--red); font-weight: 650; }
.kpi-hint .down { color: var(--green-600); font-weight: 650; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--slate-soft); color: #56655c; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-amber { background: var(--amber-soft); color: #9a6612; }
.badge-red { background: var(--red-soft); color: #ab3c2d; }
.badge-blue { background: var(--blue-soft); color: #2f659e; }
.badge-slate { background: var(--slate-soft); color: #5d6b62; }
.badge-lime { background: var(--lime-soft); color: #4e681c; }
.badge-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }

.risk-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.risk-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.risk-high { background: var(--red-soft); color: #b03d2e; }
.risk-mid { background: var(--amber-soft); color: #9a6612; }
.risk-low { background: var(--green-100); color: var(--green-700); }
.risk-none { background: var(--slate-soft); color: #6b7a71; }

.crop-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: 0.15s; user-select: none; }
.chip:hover { border-color: var(--green-500); color: var(--green-700); }
.chip.active { background: var(--green-800); border-color: var(--green-800); color: #fff; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-static { cursor: default; }
.chip-sm { height: 26px; font-size: 11.5px; padding: 0 10px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.search-box input { height: 38px; width: 230px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); transition: 0.15s; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(44, 148, 104, 0.12); }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- 表单 */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.field > span em { color: var(--red); font-style: normal; }
.field .hint { font-size: 11.5px; color: var(--muted-2); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 13.5px; transition: border-color 0.15s, box-shadow 0.15s; appearance: none;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23718076' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(44, 148, 104, 0.12); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); padding-top: 6px; grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.05em; padding: 11px 14px; background: var(--surface-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table th:first-child { padding-left: 22px; }
.data-table th:last-child { padding-right: 22px; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #eef1ea; vertical-align: middle; }
.data-table td:first-child { padding-left: 22px; }
.data-table td:last-child { padding-right: 22px; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: #fafbf7; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cell-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.row-danger td { background: #fffaf9; }
.row-danger:hover td { background: #fff5f3; }

/* ---------------------------------------------------------------- 弹窗 / 抽屉 / 提示 */
.modal-backdrop, .drawer-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 30, 22, 0.44);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.modal-backdrop.is-open, .drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.985); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }
.modal-sm { max-width: 420px; }
.modal-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 16px; }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-head .icon-btn { margin-left: auto; border-color: transparent; background: var(--bg-soft); }
.modal-body { padding: 4px 24px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-foot .left { margin-right: auto; font-size: 12px; color: var(--muted); }

.drawer-backdrop { justify-content: flex-end; padding: 0; }
.drawer {
  width: min(560px, 100%); height: 100%; background: var(--bg-soft); display: flex; flex-direction: column;
  transform: translateX(40px); transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1); box-shadow: -20px 0 60px -30px rgba(8, 30, 22, 0.5);
}
.drawer-backdrop.is-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; font-weight: 700; }
.drawer-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.drawer-head .icon-btn { margin-left: auto; flex: none; border-color: transparent; background: var(--bg-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; justify-content: flex-end; }

.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px;
  background: var(--green-900); color: #f0f7ee; box-shadow: 0 16px 34px -16px rgba(8, 44, 31, 0.65);
  font-size: 13px; animation: toastIn 0.25s ease both;
}
.toast .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--lime); flex: none; }
.toast.is-error { background: #8f2f22; }
.toast.is-error .icon { color: #ffd8d0; }
.toast.is-warn { background: #7a5310; }
.toast.is-warn .icon { color: #ffe3a3; }
.toast p { line-height: 1.5; }
.toast.is-out { animation: toastOut 0.22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------------------------------------------------------------- 工作台 */
.dash-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.hero-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 24px 28px;
  background: radial-gradient(120% 130% at 100% 0%, #1d6446 0%, #0f4a33 50%, #0a3527 100%);
  color: #edf5e9; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between;
}
.hero-card::before {
  content: ""; position: absolute; right: -70px; bottom: -110px; width: 330px; height: 330px; border-radius: 50%;
  border: 1px solid rgba(185, 217, 107, 0.16); box-shadow: 0 0 0 46px rgba(185, 217, 107, 0.045), 0 0 0 110px rgba(185, 217, 107, 0.025);
}
.hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 30px);
  mask-image: linear-gradient(110deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(110deg, #000, transparent 70%); pointer-events: none;
}
.hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 16px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: 0.14em; color: var(--lime); font-weight: 600; }
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(185, 217, 107, 0.16); }
.hero-card h2 { font-size: 23px; font-weight: 700; margin-top: 12px; letter-spacing: 0.01em; }
.hero-card h2 em { font-style: normal; color: var(--lime); }
.hero-card .hero-copy { font-size: 13px; color: rgba(237, 245, 233, 0.66); margin-top: 8px; max-width: 560px; line-height: 1.75; }
.hero-weather { position: relative; z-index: 1; margin-left: auto; text-align: right; flex: none; }
.hero-weather .now { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 30px; font-family: var(--font-num); font-weight: 650; }
.hero-weather .now .icon { width: 26px; height: 26px; color: var(--lime); }
.hero-weather p { font-size: 11.5px; color: rgba(237, 245, 233, 0.55); margin-top: 2px; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 30px; padding-top: 18px; margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.hero-stats div b { font-family: var(--font-num); font-size: 20px; font-weight: 650; }
.hero-stats div span { display: block; font-size: 11px; color: rgba(237, 245, 233, 0.5); letter-spacing: 0.06em; margin-top: 1px; }
.hero-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-actions .btn { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); color: #f0f6ec; }
.hero-actions .btn:hover { background: rgba(255, 255, 255, 0.17); }
.hero-actions .btn-lime { background: var(--lime); border-color: var(--lime); color: var(--green-950); }

.todo-card { display: flex; flex-direction: column; }
.todo-card .card-head { padding-bottom: 6px; }
.todo-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 14px; }
.todo-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; transition: background 0.15s; }
.todo-item:hover { background: var(--bg-soft); }
.todo-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; color: transparent; }
.todo-item.overdue .todo-check { border-color: var(--red); }
.todo-main { min-width: 0; flex: 1; }
.todo-main p { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-main span { font-size: 11.5px; color: var(--muted); }
.todo-time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.todo-empty { padding: 24px 16px; text-align: center; color: var(--muted-2); font-size: 12.5px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; margin-top: 16px; }
.dash-grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.risk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; }
.risk-tile {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 13px 14px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative; overflow: hidden;
}
.risk-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--slate); }
.risk-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.risk-tile.risk-high::before { background: var(--red); }
.risk-tile.risk-mid::before { background: var(--amber); }
.risk-tile.risk-low::before { background: var(--green-500); }
.risk-tile.risk-none::before { background: var(--muted-2); }
.risk-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.risk-tile h3 { font-size: 13px; font-weight: 650; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-tile .meta { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-bar { height: 4px; border-radius: 99px; background: #eef1ea; margin-top: 10px; overflow: hidden; }
.risk-bar i { display: block; height: 100%; border-radius: 99px; background: var(--amber); transition: width 0.4s; }
.risk-tile.risk-high .risk-bar i { background: var(--red); }
.risk-tile.risk-mid .risk-bar i { background: var(--amber); }
.risk-tile.risk-low .risk-bar i { background: var(--green-500); }
.risk-tile.risk-none .risk-bar i { background: var(--muted-2); }
.risk-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; font-size: 10.5px; color: var(--muted-2); }

.alert-list { display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #f0f2ec; transition: background 0.14s; cursor: pointer; }
.alert-row:hover { background: #fafbf7; }
.alert-row:last-child { border-bottom: 0; }
.alert-level-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--amber); box-shadow: 0 0 0 4px rgba(221, 155, 47, 0.13); }
.alert-level-dot.high { background: var(--amber); }
.alert-level-dot.urgent { background: var(--red); box-shadow: 0 0 0 4px rgba(212, 81, 63, 0.12); }
.alert-level-dot.mid { background: var(--amber); }
.alert-main { flex: 1; min-width: 0; }
.alert-main p { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-main span { font-size: 11px; color: var(--muted); }
.alert-time { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.level-tag { flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.level-tag.urgent { background: var(--red); color: #fff; }
.level-tag.high { background: var(--amber-soft); color: #96630f; }
.level-tag.mid { background: #fdf6e8; color: #96630f; }
.level-tag.low { background: var(--green-100); color: var(--green-700); }

.forecast-list { display: flex; flex-direction: column; gap: 8px; }
.forecast-item { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--surface-2); }
.forecast-item.high { border-color: #f1c9c1; background: #fdf6f4; }
.forecast-item.mid { border-color: #f0dcb8; background: #fdfaf2; }
.forecast-head { display: flex; align-items: center; gap: 8px; }
.forecast-head b { font-size: 12.5px; font-weight: 650; }
.forecast-head .badge { margin-left: auto; }
.forecast-item p { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.forecast-days { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.forecast-days span { font-size: 10px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--muted); }

.weather-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.weather-day { text-align: center; padding: 10px 4px; border-radius: 10px; transition: background 0.15s; }
.weather-day.today { background: var(--green-50); }
.weather-day .wd { font-size: 10.5px; color: var(--muted); }
.weather-day .icon { width: 20px; height: 20px; margin: 7px auto 5px; color: var(--slate); }
.weather-day.sun .icon { color: var(--amber); }
.weather-day.rain .icon { color: var(--blue); }
.weather-day .temp { font-size: 11px; font-family: var(--font-num); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.weather-day .temp span { color: var(--muted-2); font-weight: 400; }
.weather-day .hum { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }

/* ---------------------------------------------------------------- 田块 */
.plot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.plot-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 15px; box-shadow: var(--shadow-xs); transition: transform 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; }
.plot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.plot-card-head { display: flex; align-items: flex-start; gap: 12px; }
.crop-avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--green-50); border: 1px solid var(--line); flex: none; }
.plot-card-head h3 { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.plot-card-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.plot-card-head .risk-badge { margin-left: auto; flex: none; }
.plot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0 12px; padding: 11px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.plot-stats div span { display: block; font-size: 10.5px; color: var(--muted); }
.plot-stats div b { font-size: 13.5px; font-family: var(--font-num); font-weight: 650; }
.plot-stats div b small { font-size: 10px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.plot-riskbar { display: flex; align-items: center; gap: 8px; }
.plot-riskbar .risk-bar { flex: 1; margin: 0; }
.plot-riskbar span { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.plot-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.plot-card-foot .meta { font-size: 11px; color: var(--muted-2); flex: 1; }
.plot-card-foot .meta b { color: var(--ink-2); font-weight: 600; }

/* ---------------------------------------------------------------- 巡查 */
.severity-dots { display: inline-flex; gap: 3px; align-items: center; }
.severity-dots i { width: 6px; height: 6px; border-radius: 50%; background: #e2e7dd; }
.severity-dots i.on.s1 { background: #9ec8a8; }
.severity-dots i.on.s2 { background: var(--amber); }
.severity-dots i.on.s3 { background: #e07a44; }
.severity-dots i.on.s4 { background: var(--red); }
.finding-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.finding-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; font-size: 11.5px; }
.finding-chip b { font-weight: 600; }
.finding-chip .sev { font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--slate-soft); color: var(--muted); }
.finding-chip .sev.s2 { background: var(--amber-soft); color: #96630f; }
.finding-chip .sev.s3 { background: #fbeadb; color: #b35620; }
.finding-chip .sev.s4 { background: var(--red-soft); color: #ab3c2d; }
.finding-chip .sev.s1 { background: var(--green-100); color: var(--green-700); }

.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.detail-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.detail-stat span { font-size: 10.5px; color: var(--muted); display: block; }
.detail-stat b { font-size: 13px; font-weight: 650; margin-top: 2px; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); cursor: zoom-in; }
.severity-scale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.severity-scale .scale-bar { display: flex; gap: 3px; }
.severity-scale .scale-bar i { width: 22px; height: 6px; border-radius: 2px; }

.finding-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.7fr) minmax(0, 0.78fr) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 10px; }
.finding-row .field > span { font-size: 11px; }
.finding-row .input, .finding-row .select { height: 36px; font-size: 12.5px; }
.finding-row .remove { width: 34px; height: 36px; }
.segmented { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; height: 28px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; color: var(--muted); cursor: pointer; transition: 0.14s; white-space: nowrap; }
.segmented button:hover { color: var(--ink-2); }
.segmented button.active[data-v="0"] { background: #fff; color: var(--muted); box-shadow: var(--shadow-xs); font-weight: 600; }
.segmented button.active[data-v="1"] { background: var(--green-100); color: var(--green-700); box-shadow: var(--shadow-xs); font-weight: 600; }
.segmented button.active[data-v="2"] { background: var(--amber-soft); color: #96630f; box-shadow: var(--shadow-xs); font-weight: 650; }
.segmented button.active[data-v="3"] { background: #fbeadb; color: #b35620; box-shadow: var(--shadow-xs); font-weight: 650; }
.segmented button.active[data-v="4"] { background: var(--red-soft); color: #ab3c2d; box-shadow: var(--shadow-xs); font-weight: 650; }
.segmented button.active[data-v="seg"] { background: var(--green-800); color: #fff; font-weight: 600; }

.upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.upload-tile { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px dashed var(--line-strong); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--muted-2); font-size: 11px; text-align: center; gap: 4px; overflow: hidden; }
.upload-tile:hover { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }
.upload-tile .icon { width: 20px; height: 20px; }
.upload-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-tile .rm { position: absolute; top: 4px; right: 4px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; }
.upload-tile .rm .icon { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- 知识库 */
.kb-summary { display: flex; gap: 26px; align-items: center; padding: 18px 22px; background: linear-gradient(110deg, #f7faf2, #ffffff 65%); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; flex-wrap: wrap; }
.kb-summary .intro { flex: 1; min-width: 240px; }
.kb-summary h3 { font-size: 15px; font-weight: 700; }
.kb-summary p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kb-stat { text-align: center; padding: 0 6px; }
.kb-stat b { display: block; font-family: var(--font-num); font-size: 23px; font-weight: 650; }
.kb-stat span { font-size: 11px; color: var(--muted); }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 15px; }
.kb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 19px 15px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; display: flex; flex-direction: column; }
.kb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #ccd8c7; }
.kb-card-top { display: flex; align-items: center; gap: 8px; }
.kb-type { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 5px; letter-spacing: 0.03em; }
.kb-type.disease { background: #fbeaea; color: #b0433b; }
.kb-type.pest { background: #eaf2e5; color: #4f7a37; }
.kb-type .icon { width: 12px; height: 12px; }
.kb-card-top .crop { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 5px; }
.kb-card h3 { font-size: 15px; font-weight: 700; margin-top: 11px; }
.kb-card .symptom { font-size: 12px; color: var(--muted); line-height: 1.75; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.kb-tag { font-size: 10px; color: var(--muted); background: var(--bg-soft); border-radius: 4px; padding: 1px 6px; }
.kb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #f0f2ec; font-size: 11px; color: var(--muted-2); }
.kb-card-foot .hot { color: var(--red); font-weight: 600; }
.kb-detail-hero { display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: linear-gradient(120deg, var(--green-50), #fff 70%); border: 1px solid var(--line); border-radius: 12px; }
.kb-detail-hero .glyph { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; background: #fff; border: 1px solid var(--line); flex: none; }
.kb-detail-hero h3 { font-size: 18px; font-weight: 700; }
.kb-detail-hero p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kb-section { margin-top: 18px; }
.kb-section h4 { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.kb-section h4::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--green-600); }
.kb-section p { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.kb-list { display: flex; flex-direction: column; gap: 7px; }
.kb-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; padding-left: 16px; position: relative; }
.kb-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); }
.chem-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.chem-table th { text-align: left; font-size: 10.5px; color: var(--muted); font-weight: 600; padding: 7px 9px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.chem-table td { padding: 9px; border-bottom: 1px solid #f0f2ec; vertical-align: top; }
.chem-table tr:last-child td { border-bottom: 0; }
.chem-table b { font-weight: 650; }
.chem-table small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* ---------------------------------------------------------------- 预警 */
.alert-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; cursor: pointer; transition: 0.15s; border-top: 3px solid var(--line-strong); }
.stat-tile:hover { box-shadow: var(--shadow-sm); }
.stat-tile.active { border-color: var(--green-300, #9fc9ae); background: var(--green-50); }
.stat-tile .label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-tile b { font-family: var(--font-num); font-size: 26px; font-weight: 650; margin-top: 4px; display: block; }
.stat-tile .dot { width: 7px; height: 7px; border-radius: 50%; }
.stat-tile.pending { border-top-color: var(--red); }
.stat-tile.pending .dot { background: var(--red); }
.stat-tile.doing { border-top-color: var(--amber); }
.stat-tile.doing .dot { background: var(--amber); }
.stat-tile.done { border-top-color: var(--green-500); }
.stat-tile.done .dot { background: var(--green-500); }
.stat-tile.all { border-top-color: var(--slate); }
.stat-tile.all .dot { background: var(--slate); }

.alert-card { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; transition: box-shadow 0.15s; }
.alert-card:hover { box-shadow: var(--shadow-sm); }
.alert-card .side { width: 4px; flex: none; background: var(--amber); }
.alert-card.urgent .side { background: var(--red); }
.alert-card.high .side { background: #e07a44; }
.alert-card.mid .side { background: var(--amber); }
.alert-card-body { flex: 1; padding: 15px 18px 14px; min-width: 0; }
.alert-card-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.alert-card-head h3 { font-size: 14px; font-weight: 700; }
.alert-card-head .status { margin-left: auto; }
.alert-reason { font-size: 12.5px; color: var(--muted); margin-top: 9px; line-height: 1.75; }
.alert-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--muted-2); }
.alert-meta span { display: inline-flex; align-items: center; gap: 4px; }
.alert-meta .icon { width: 13px; height: 13px; }
.alert-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.alert-actions .task-link { font-size: 11.5px; color: var(--muted); margin-right: auto; }
.alert-actions .task-link b { color: var(--green-700); }

/* ---------------------------------------------------------------- 任务 */
.task-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.task-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.task-col { background: #eef2e9; border: 1px solid #e3e8dc; border-radius: 13px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; }
.task-col-body { padding-right: 2px; }
.task-col-head { display: flex; align-items: center; gap: 8px; padding: 3px 5px 10px; }
.task-col-head h3 { font-size: 12.5px; font-weight: 700; }
.task-col-head .count { margin-left: auto; font-size: 11px; color: var(--muted); background: #fff; border-radius: 99px; padding: 0 7px; line-height: 20px; }
.task-col-head .dot { width: 7px; height: 7px; border-radius: 50%; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; margin-bottom: 9px; box-shadow: var(--shadow-xs); }
.task-card:last-child { margin-bottom: 0; }
.task-card.overdue { border-left: 3px solid var(--red); }
.task-card h4 { font-size: 12.5px; font-weight: 650; line-height: 1.5; }
.task-card .task-sub { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.task-card .task-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.task-card .task-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--muted-2); }
.task-card .task-foot .who { display: flex; align-items: center; gap: 5px; }
.mini-avatar { width: 18px; height: 18px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-size: 9px; font-weight: 700; }
.task-card .task-foot .link-btn { margin-left: auto; font-size: 10.5px; }

/* ---------------------------------------------------------------- 农药 */
.inv-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stock-cell { min-width: 150px; }
.stock-top { display: flex; align-items: baseline; gap: 4px; font-size: 12.5px; }
.stock-top b { font-family: var(--font-num); font-size: 15px; font-weight: 650; }
.stock-top span { color: var(--muted); font-size: 11px; }
.stock-bar { height: 5px; border-radius: 99px; background: #edf0e9; margin-top: 5px; overflow: hidden; }
.stock-bar i { display: block; height: 100%; border-radius: 99px; background: var(--green-500); }
.stock-bar i.low { background: var(--red); }
.stock-bar i.medium { background: var(--amber); }
.stock-badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 650; margin-left: 4px; }
.stock-badge.low { background: var(--red-soft); color: var(--red); }
.stock-badge.expiring { background: var(--amber-soft); color: #96630f; }
.stock-badge.expired { background: var(--red); color: #fff; }
.stock-badge.ok { background: var(--green-100); color: var(--green-700); }

/* ---------------------------------------------------------------- 报表 */
.report-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.report-title h2 { font-size: 19px; font-weight: 700; }
.report-title p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.report-chart { min-height: 240px; }
.report-chart-sm { min-height: 220px; }
.report-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.report-split-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 2px; }
.usage-list { display: flex; flex-direction: column; gap: 11px; }
.usage-item { display: flex; align-items: center; gap: 10px; }
.usage-item .name { width: 82px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-item .bar { flex: 1; height: 7px; background: #edf0e9; border-radius: 99px; overflow: hidden; }
.usage-item .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7fb88f, var(--green-600)); }
.usage-item .val { width: 122px; text-align: right; font-size: 10.5px; color: var(--muted); font-family: var(--font-num); white-space: nowrap; }
.perf-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.perf-row:last-child { border-bottom: 0; }
.perf-row .mini-avatar { width: 26px; height: 26px; font-size: 11px; }
.perf-row .who { flex: 1; font-size: 12.5px; font-weight: 600; }
.perf-row .who span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }
.perf-row .rate { font-family: var(--font-num); font-size: 13px; font-weight: 650; }

/* ---------------------------------------------------------------- 设置 */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.settings-nav button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; text-align: left; }
.settings-nav button:hover { background: var(--bg-soft); color: var(--ink-2); }
.settings-nav button.active { background: var(--green-100); color: var(--green-800); font-weight: 650; }
.settings-nav .icon { width: 17px; height: 17px; }
.settings-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.settings-panel h2 { font-size: 16px; font-weight: 700; }
.settings-panel .desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.settings-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-section:first-of-type { border-top: 0; margin-top: 18px; padding-top: 0; }
.settings-section h3 { font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; }
.settings-form .full { grid-column: 1 / -1; }
.settings-actions { display: flex; gap: 10px; margin-top: 22px; }
.danger-zone { border: 1px solid #f0cfc9; background: #fffafa; border-radius: 11px; padding: 18px; }
.danger-zone h3 { color: #a3392b; }
.danger-zone p { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.7; }
.role-option { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.role-option.selected { border-color: var(--green-500); background: var(--green-50); }
.role-option b { font-size: 12.5px; display: block; }
.role-option span { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- 空状态 / 加载 */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .glyph { width: 64px; height: 64px; border-radius: 18px; background: var(--green-50); display: grid; place-items: center; margin: 0 auto 14px; color: var(--green-600); }
.empty-state .glyph .icon { width: 30px; height: 30px; }
.empty-state h3 { font-size: 14px; color: var(--ink-2); font-weight: 650; }
.empty-state p { font-size: 12px; margin-top: 5px; color: var(--muted); }
.empty-state .btn { margin-top: 16px; }
.loading-block { padding: 50px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--green-600); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef1ea 25%, #f6f8f3 37%, #eef1ea 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 7px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------- 辅助布局 */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.section-head h2 { font-size: 16px; font-weight: 700; }
.section-head .sub { font-size: 12px; color: var(--muted); }
.section-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.info-strip { display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px; border-radius: 9px; background: var(--green-50); border: 1px solid #dcead9; font-size: 12px; color: var(--green-800); line-height: 1.65; }
.info-strip .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.info-strip.warn { background: var(--amber-soft); border-color: #f0dcb8; color: #7a5310; }
.info-strip.danger { background: var(--red-soft); border-color: #f0cfc9; color: #963527; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kv-row { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { width: 92px; flex: none; color: var(--muted); }
.kv-row .v { color: var(--ink-2); font-weight: 500; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1380px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-2 > :last-child { grid-column: 1 / -1; }
  .task-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-split-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-split-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  :root { --sidebar-w: 220px; }
  .page { padding: 22px 24px 44px; }
  .topbar { padding: 0 24px; }
  .dash-hero { grid-template-columns: 1fr; }
  .hero-card { min-height: 176px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-col { display: contents; }
  .report-split { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1); width: 252px; }
  .sidebar.is-open { transform: none; box-shadow: 30px 0 80px -30px rgba(8, 30, 22, 0.55); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(8, 30, 22, 0.42); z-index: 55; opacity: 0; visibility: hidden; transition: 0.2s; }
  .sidebar-scrim.is-open { opacity: 1; visibility: visible; }
  .topbar { padding: 0 18px; gap: 10px; }
  .topbar-date { display: none; }
  .page { padding: 18px 18px 40px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alert-summary, .task-summary, .inv-summary, .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .plot-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; gap: 4px; overflow-x: auto; }
  .settings-nav button { width: auto; white-space: nowrap; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-panel { min-height: 100vh; }
  .login-panel .mobile-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; }
  .login-panel .mobile-brand .mark { width: 42px; height: 42px; border-radius: 12px; background: var(--green-800); display: grid; place-items: center; }
  .login-panel .mobile-brand b { font-size: 17px; letter-spacing: 0.12em; }
  .login-panel .mobile-brand span { display: block; font-size: 9px; letter-spacing: 0.12em; color: var(--green-600); font-weight: 700; }
  .login-panel .mobile-brand svg { width: 34px; height: 34px; border-radius: 8px; }
}
@media (max-width: 720px) {
  .weather-chip { display: none; }
  .hero-top { flex-direction: column; gap: 8px; }
  .hero-weather { margin-left: 0; text-align: left; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .hero-weather .now { justify-content: flex-start; font-size: 26px; }
  .hero-weather p { margin-top: 0; font-size: 11px; }
  .hero-card h2 { font-size: 18px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .weather-strip { grid-template-columns: repeat(7, 62px); overflow-x: auto; padding-bottom: 6px; }
  .topbar-title h1 { font-size: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 9px; }
  .kpi-icon .icon { width: 17px; height: 17px; }
  .kpi-value { font-size: 23px; }
  .hero-card { padding: 20px; }
  .hero-stats { gap: 20px; }
  .hero-weather .now { font-size: 24px; }
  .hero-weather .now .icon { width: 22px; height: 22px; }
  .hero-card h2 { font-size: 19px; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-grid-2 > :last-child { grid-column: auto; }
  .task-board { grid-template-columns: 1fr; }
  .report-kpis, .alert-summary, .task-summary, .inv-summary { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .finding-row { grid-template-columns: 1fr 1fr; }
  .finding-row .finding-pest { grid-column: 1 / -1; }
  .finding-row .remove { width: 100%; grid-column: 2; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .upload-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 24px); border-radius: 20px; }
  .drawer { width: 100%; }
  .card-head { padding: 15px 16px 0; }
  .card-body { padding: 14px 16px 18px; }
  .table-wrap { margin: 0 -16px; width: calc(100% + 32px); }
  .search-box input { width: 170px; }
  .toolbar { gap: 8px; }
  .toolbar .right { margin-left: 0; width: 100%; }
  .kb-summary { gap: 14px; padding: 16px; }
  .kb-stat { padding: 0 10px 0 0; }
  .risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-tile { min-width: 0; }
  .alert-card-body { padding: 13px 14px; }
  .alert-card-head .status { margin-left: 0; }
  .report-head { align-items: flex-start; }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid > .kpi:last-child { grid-column: 1 / -1; }
  .risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-tile { padding: 11px; }
  .risk-tile h3 { font-size: 12px; }
  .risk-tile .meta { font-size: 10px; }
  .alert-summary, .task-summary, .inv-summary, .report-kpis { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .plot-grid { grid-template-columns: 1fr; }
  .login-panel { padding: 32px 22px; }
  .page { padding: 14px 14px 36px; }
  .topbar { padding: 0 14px; height: 66px; }
  .topbar .avatar { width: 32px; height: 32px; }
  .topbar-title p { display: none; }
  .dash-grid, .dash-grid-2, .card, .card-body, .weather-strip { min-width: 0; }
}

/* ---------------------------------------------------------------- 打印 */
@media print {
  .sidebar, .topbar, .sidebar-scrim, .toast-stack, .no-print, .page-head-actions { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .card, .kpi, .stat-tile { box-shadow: none; break-inside: avoid; }
  .dash-grid, .report-split, .report-split-3 { grid-template-columns: 1fr 1fr; }
}
