/* ============================================================
   沐沐智慧农业平台 — 数据大屏样式
   设计基准 1920 × 1080
   ============================================================ */

:root {
  --bg-deep: #04100c;
  --bg: #061a13;
  --panel: rgba(10, 34, 25, 0.66);
  --panel-2: rgba(14, 42, 31, 0.5);
  --line: rgba(0, 229, 160, 0.16);
  --line-strong: rgba(0, 229, 160, 0.38);
  --pri: #00e5a0;
  --pri-dim: #0b9c73;
  --cyan: #22d3ee;
  --amber: #ffb020;
  --red: #ff5c5c;
  --purple: #8b7cd8;
  --txt: #e8f6f0;
  --txt-2: #a7c8bb;
  --txt-3: #6d8f82;
  --font: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', system-ui, sans-serif;
  --num: 'DIN Alternate', 'Bahnschrift', 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: #020806;
  overflow: hidden;
  font-family: var(--font);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 舞台与自适应 ---------- */
#viewport {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 700px at 50% -10%, #0a2d21 0%, transparent 60%),
    radial-gradient(900px 600px at 12% 100%, #06231a 0%, transparent 55%),
    radial-gradient(900px 600px at 88% 100%, #06231a 0%, transparent 55%),
    #030b08;
}
#stage {
  width: 1920px; height: 1080px;
  flex: 0 0 auto;
  position: relative;
  transform-origin: center center;
  display: flex; flex-direction: column;
  padding: 0 40px 20px;
}

/* 背景网格与光晕 */
#stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 160, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 160, 0.028) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 78%);
}

/* ---------- 顶部 ---------- */
.hdr {
  height: 92px; flex: 0 0 92px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 5;
}
.hdr::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,160,.42) 22%, rgba(0,229,160,.62) 50%, rgba(0,229,160,.42) 78%, transparent);
}

.brand { display: flex; align-items: center; gap: 14px; width: 500px; }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0,229,160,.22), rgba(0,229,160,.04));
  border: 1px solid rgba(0,229,160,.34);
  box-shadow: 0 0 22px rgba(0,229,160,.18), inset 0 0 14px rgba(0,229,160,.1);
}
.brand-txt .b1 { font-size: 20px; font-weight: 700; letter-spacing: 2px; line-height: 1.1; }
.brand-txt .b2 { font-size: 11px; color: var(--txt-3); letter-spacing: 3px; margin-top: 3px; }

.hdr-center { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); text-align: center; width: 760px; }
.hdr-center h1 {
  font-size: 36px; font-weight: 700; letter-spacing: 8px;
  background: linear-gradient(180deg, #ffffff 8%, #9df3d2 52%, #00c98c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(0,229,160,.32));
  padding-left: 8px;
}
.hdr-center .sub {
  margin-top: 4px; font-size: 11px; letter-spacing: 6px; color: var(--txt-3);
  text-transform: uppercase;
}
.hdr-center .bar {
  width: 100%; height: 10px; margin-top: 8px; position: relative;
}
.hdr-center .bar::before,
.hdr-center .bar::after {
  content: ''; position: absolute; top: 4px; height: 1px; width: 44%;
  background: linear-gradient(90deg, transparent, rgba(0,229,160,.5));
}
.hdr-center .bar::before { left: 0; }
.hdr-center .bar::after { right: 0; transform: scaleX(-1); }
.hdr-center .bar i {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px; border: 1px solid rgba(0,229,160,.7); background: rgba(0,229,160,.12);
}

.hdr-right { display: flex; align-items: center; gap: 18px; width: 500px; justify-content: flex-end; }
.weather { display: flex; align-items: center; gap: 12px; padding-right: 18px; border-right: 1px solid var(--line); }
.weather .w-ico { width: 42px; height: 42px; }
.weather .w-main { font-size: 15px; font-weight: 600; }
.weather .w-main b { font-family: var(--num); font-size: 22px; color: var(--pri); margin-right: 6px; font-weight: 600; }
.weather .w-sub { font-size: 11px; color: var(--txt-3); margin-top: 3px; letter-spacing: .5px; }
.clock { text-align: right; }
.clock .c-time { font-family: var(--num); font-size: 26px; font-weight: 600; letter-spacing: 1px; color: #fff; font-variant-numeric: tabular-nums; }
.clock .c-date { font-size: 11px; color: var(--txt-3); letter-spacing: 1px; margin-top: 2px; }

/* ---------- 布局 ---------- */
.grid {
  flex: 1; display: grid;
  grid-template-columns: 500px 1fr 500px;
  gap: 18px; min-height: 0;
  position: relative; z-index: 2;
  padding-top: 10px;
}
.col { display: flex; flex-direction: column; gap: 18px; min-height: 0; }

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,34,25,.82) 0%, rgba(7,24,18,.72) 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex; flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 8px 30px rgba(0,0,0,.28);
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--line-strong); border-style: solid;
}
.panel::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.panel::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

.p-hd {
  height: 44px; flex: 0 0 44px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0,229,160,.09);
}
.p-hd .dot {
  width: 3px; height: 14px; background: var(--pri); border-radius: 2px;
  box-shadow: 0 0 8px var(--pri);
}
.p-hd h3 { font-size: 16px; font-weight: 600; letter-spacing: 1.2px; }
.p-hd .en { font-size: 9px; color: var(--txt-3); letter-spacing: 1.6px; text-transform: uppercase; margin-left: 2px; padding-top: 3px; }
.p-hd .extra { margin-left: auto; font-size: 11px; color: var(--txt-3); display: flex; align-items: center; gap: 6px; }
.p-hd .extra b { color: var(--pri); font-family: var(--num); font-size: 14px; }
.p-bd { flex: 1; min-height: 0; padding: 12px 14px; position: relative; }

/* ---------- 左1 指标 ---------- */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 100%; }
.kpi {
  position: relative; padding: 9px 14px;
  background: linear-gradient(135deg, rgba(0,229,160,.07), rgba(0,229,160,.015));
  border: 1px solid rgba(0,229,160,.12);
  border-radius: 3px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  transition: border-color .25s, background .25s;
}
.kpi:hover { border-color: rgba(0,229,160,.34); background: linear-gradient(135deg, rgba(0,229,160,.13), rgba(0,229,160,.03)); }
.kpi .k-lb { font-size: 12px; color: var(--txt-2); letter-spacing: .6px; display: flex; align-items: center; justify-content: space-between; line-height: 1.25; }
.kpi .k-lb i { font-style: normal; font-size: 10px; color: var(--txt-3); white-space: nowrap; margin-left: 6px; }
/* 数字定宽右对齐：位数不同也保证「单位」起点一致 */
.kpi .k-val { display: flex; align-items: baseline; gap: 4px; margin-top: 5px; }
.kpi .k-val b {
  font-family: var(--num); font-size: 27px; font-weight: 600; line-height: 1;
  color: #fff; letter-spacing: .5px; font-variant-numeric: tabular-nums;
  min-width: 2.9em; text-align: right; white-space: nowrap;
}
.kpi .k-val span { font-size: 11px; color: var(--txt-3); white-space: nowrap; }
.kpi .k-note { font-size: 10px; color: var(--txt-3); margin-top: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hl .k-val b { color: var(--pri); text-shadow: 0 0 20px rgba(0,229,160,.4); }
.kpi.warn .k-val b { color: var(--amber); text-shadow: 0 0 20px rgba(255,176,32,.35); }
.kpi .k-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--pri), transparent); width: 42%; opacity: .55; }

/* ---------- 左3 环境监测（设备上传值） ---------- */
.env-bd { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.env-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; }
.env-tile {
  position: relative; padding: 10px 12px;
  background: linear-gradient(140deg, rgba(0,229,160,.07), rgba(0,229,160,.012));
  border: 1px solid rgba(0,229,160,.12);
  border-radius: 3px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.env-tile.wide { grid-column: span 2; }
.env-tile .et-lb { font-size: 11.5px; color: var(--txt-2); letter-spacing: .6px; display: flex; align-items: center; gap: 6px; }
.env-tile .et-lb i { width: 5px; height: 5px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 8px var(--pri); }
.env-tile .et-val { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.env-tile .et-val b {
  font-family: var(--num); font-size: 30px; font-weight: 600; line-height: 1;
  color: #eafff6; letter-spacing: .5px; font-variant-numeric: tabular-nums;
}
.env-tile .et-val span { font-size: 11px; color: var(--txt-3); }
.env-tile.off .et-val b { color: var(--txt-3); }
.env-tile.off .et-lb i { background: var(--txt-3); box-shadow: none; }
.env-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--txt-3); letter-spacing: .3px;
  padding-top: 8px; border-top: 1px dashed rgba(0,229,160,.12);
}
.env-foot .st { display: inline-flex; align-items: center; gap: 5px; }
.env-foot .st b { font-weight: 500; color: var(--txt-2); }
.env-foot .st i { width: 6px; height: 6px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 0 0 rgba(0,229,160,.7); animation: pulse 2s infinite; }
.env-foot .st.off i { background: var(--red); animation: none; }
.env-foot .src { margin-left: auto; padding: 1px 7px; border-radius: 2px; border: 1px solid rgba(0,229,160,.25); color: var(--txt-2); }
.env-foot .src.demo { border-color: rgba(255,176,32,.35); color: var(--amber); }

/* ---------- 右2 土壤监测（设备上传值） ---------- */
.soil-bd { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.soil-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 1fr; gap: 8px;
}
.soil-grid .env-tile { padding: 8px 10px; }
.soil-grid .env-tile .et-lb { font-size: 10.5px; letter-spacing: .2px; gap: 5px; }
.soil-grid .env-tile .et-val { margin-top: 4px; }
.soil-grid .env-tile .et-val b { font-size: 22px; letter-spacing: .2px; }
.soil-grid .env-tile .et-val span { font-size: 9.5px; }
.soil-grid .env-tile.wide { grid-column: span 3; }
.soil-grid .env-tile.npk .et-val b { font-size: 19px; letter-spacing: 1.2px; }

/* ---------- 右3 冷库实时监测 ---------- */
.cold-bd { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 10px; }
.cold-mini { flex: 1; min-height: 0; overflow-y: auto; }
.cold-mini::-webkit-scrollbar { width: 0; }
.cm-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.cm-row + .cm-row { border-top: 1px dashed rgba(0,229,160,.1); }
.cm-row .st-dot {
  flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pri); box-shadow: 0 0 8px var(--pri);
}
.cm-row .nm { flex: 1; font-size: 11.5px; color: #d7eee4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row .tmp { font-family: var(--num); font-size: 17px; color: #eafff6; font-variant-numeric: tabular-nums; }
.cm-row .tmp small { font-family: var(--font); font-size: 9.5px; color: var(--txt-3); margin-left: 1px; }
.cm-row .hum { flex: 0 0 44px; text-align: right; font-size: 10px; color: var(--txt-3); }
.cm-row.alarm .st-dot { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1.2s infinite; }
.cm-row.alarm .tmp { color: var(--red); }
.cm-row.alarm .nm { color: #ffd9d9; }
.cm-row.off .st-dot { background: var(--txt-3); box-shadow: none; }
.cm-row.off .tmp { color: var(--txt-3); }
.cm-empty { padding: 26px 0 0; text-align: center; font-size: 11.5px; color: var(--txt-3); letter-spacing: 1px; }

/* ---------- 图表容器 ---------- */
.chart { width: 100%; height: 100%; }

/* ---------- 中间地图 ---------- */
.map-panel .p-bd { padding: 0; overflow: hidden; }
#chinamap { width: 100%; height: 100%; display: block; }

/* ---------- 今日采收列表 ---------- */
.hv-list { height: 100%; overflow-y: auto; padding: 4px 14px 10px; box-sizing: border-box; }
.hv-list::-webkit-scrollbar { width: 0; }
.hv-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.hv-row + .hv-row { border-top: 1px dashed rgba(0,229,160,.1); }
.hv-row .nm { flex: 0 0 76px; font-size: 12px; color: #d7eee4; letter-spacing: .5px; white-space: nowrap; }
.hv-row .dot2 { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.hv-row .tk { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.hv-row .tk i { display: block; height: 100%; border-radius: 3px; transition: width .8s cubic-bezier(.2,.7,.3,1); }
.hv-row .vl { flex: 0 0 86px; text-align: right; font-family: var(--num); font-size: 14px; color: #eafff6; }
.hv-row .vl small { font-family: var(--font); font-size: 10px; color: var(--txt-3); margin-left: 3px; }
.hv-empty { padding: 34px 0 0; text-align: center; font-size: 12px; color: var(--txt-3); letter-spacing: 1px; }

.map-legend {
  position: absolute; left: 16px; bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: 560px;
  background: rgba(4,16,12,.7); padding: 8px 12px; border-radius: 3px;
  border: 1px solid rgba(0,229,160,.1);
}
.map-legend .lg { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--txt-2); }
.map-legend .lg i { width: 9px; height: 9px; border-radius: 2px; opacity: .85; }

.map-hint {
  position: absolute; right: 16px; top: 14px; font-size: 10.5px; color: var(--txt-3);
  display: flex; align-items: center; gap: 6px; letter-spacing: .5px;
}
.map-hint .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 0 0 rgba(0,229,160,.7); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,229,160,.6); }
  70% { box-shadow: 0 0 0 9px rgba(0,229,160,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,229,160,0); }
}

/* 地块详情卡 */
.parcel-card {
  position: absolute; right: 16px; bottom: 14px; width: 268px;
  background: linear-gradient(160deg, rgba(8,30,22,.97), rgba(4,18,13,.97));
  border: 1px solid rgba(0,229,160,.3);
  border-radius: 4px; padding: 12px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(0,229,160,.06);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.parcel-card.show { opacity: 1; transform: translateY(0); }
.pc-hd { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid rgba(0,229,160,.14); }
.pc-hd .t { font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.pc-hd .t em { font-style: normal; font-size: 10px; color: var(--txt-3); margin-left: 6px; letter-spacing: 0; }
.pc-hd .x { cursor: pointer; color: var(--txt-3); font-size: 15px; line-height: 1; padding: 2px 4px; }
.pc-hd .x:hover { color: var(--pri); }
.pc-row { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; padding: 5px 0; color: var(--txt-2); }
.pc-row span:last-child { color: var(--txt); font-family: var(--num); font-size: 13px; }
.pc-row span:last-child small { font-family: var(--font); font-size: 9.5px; color: var(--txt-3); margin-left: 2px; }
.pc-tag { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 10px; border: 1px solid; }
.pc-prog { margin-top: 8px; }
.pc-prog .lbl { display: flex; justify-content: space-between; font-size: 10px; color: var(--txt-3); margin-bottom: 4px; }
.pc-prog .track { height: 4px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.pc-prog .fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #0b9c73, #00e5a0); }

/* ---------- 底部指标条 ---------- */
.strip {
  flex: 0 0 98px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.strip-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: linear-gradient(100deg, rgba(0,229,160,.07), rgba(0,229,160,.01));
  border: 1px solid rgba(0,229,160,.12);
  border-left: 2px solid rgba(0,229,160,.5);
  border-radius: 3px;
  overflow: hidden;
}
.strip-item::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(0,229,160,.13), transparent 68%);
}
.strip-item .s-ico { width: 30px; height: 30px; flex: 0 0 30px; opacity: .85; }
.strip-item .s-val { font-family: var(--num); font-size: 26px; font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.strip-item .s-val small { font-family: var(--font); font-size: 10px; color: var(--txt-3); margin-left: 3px; font-weight: 400; }
.strip-item .s-lb { font-size: 11px; color: var(--txt-2); margin-bottom: 5px; letter-spacing: .5px; }
.strip-item .s-sub { font-size: 10px; color: var(--txt-3); margin-top: 4px; }

/* ---------- 告警列表 ---------- */
.alarm-wrap { height: 100%; overflow: hidden; position: relative; }
.alarm-list { position: absolute; inset: 0; }
.alarm {
  display: flex; gap: 10px; padding: 9px 4px;
  border-bottom: 1px dashed rgba(0,229,160,.1);
  align-items: flex-start;
}
.alarm:last-child { border-bottom: none; }
.alarm .a-lv {
  flex: 0 0 20px; height: 20px; border-radius: 3px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; font-family: var(--num);
  margin-top: 1px;
}
.lv1 { background: rgba(255,92,92,.16); color: #ff7b7b; border: 1px solid rgba(255,92,92,.4); }
.lv2 { background: rgba(255,176,32,.14); color: var(--amber); border: 1px solid rgba(255,176,32,.36); }
.lv3 { background: rgba(34,211,238,.12); color: var(--cyan); border: 1px solid rgba(34,211,238,.3); }
.alarm .a-body { flex: 1; min-width: 0; }
.alarm .a-top { display: flex; align-items: baseline; gap: 8px; }
.alarm .a-zone { font-size: 12px; font-weight: 600; color: var(--txt); letter-spacing: .3px; }
.alarm .a-type { font-size: 9.5px; color: var(--txt-3); border: 1px solid rgba(255,255,255,.1); padding: 0 5px; border-radius: 2px; }
.alarm .a-time { margin-left: auto; font-family: var(--num); font-size: 11px; color: var(--txt-3); flex: 0 0 auto; }
.alarm .a-msg { font-size: 10.5px; color: var(--txt-2); line-height: 1.55; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alarm .a-dev { font-size: 9px; color: var(--txt-3); font-family: var(--num); margin-top: 3px; letter-spacing: .4px; }

/* ---------- 设备在线 ---------- */
.dev-top { display: flex; align-items: center; gap: 16px; padding-bottom: 10px; }
.dev-ring { position: relative; width: 92px; height: 92px; flex: 0 0 92px; }
.dev-ring .rt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dev-ring .rt b { font-family: var(--num); font-size: 21px; color: var(--pri); line-height: 1; }
.dev-ring .rt span { font-size: 9px; color: var(--txt-3); }
.dev-nums { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; }
.dev-nums div { font-size: 10px; color: var(--txt-3); }
.dev-nums b { display: block; font-family: var(--num); font-size: 16px; color: var(--txt); margin-bottom: 1px; }
.dev-nums b.g { color: var(--pri); }
.dev-nums b.r { color: var(--red); }
.dev-bars { display: flex; flex-direction: column; gap: 6px; }
.db-row { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--txt-2); }
.db-row .nm { flex: 0 0 76px; }
.db-row .tk { flex: 1; height: 5px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.db-row .tk i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #0b9c73, #00e5a0); }
.db-row .vl { flex: 0 0 34px; text-align: right; font-family: var(--num); color: var(--txt-3); }

/* ---------- 底部滚动条 ---------- */
.ticker {
  flex: 0 0 30px; margin-top: 10px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  background: rgba(0,229,160,.04);
  border: 1px solid rgba(0,229,160,.1);
  border-radius: 3px;
  overflow: hidden;
}
.ticker .tk-lb { flex: 0 0 auto; font-size: 10px; color: var(--pri); letter-spacing: 2px; display: flex; align-items: center; gap: 6px; }
.ticker .tk-lb::after { content: ''; width: 1px; height: 12px; background: rgba(0,229,160,.3); }
.ticker-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
.ticker-inner { position: absolute; white-space: nowrap; display: flex; align-items: center; height: 100%; gap: 48px; animation: marquee 42s linear infinite; }
.ticker-inner span { font-size: 11px; color: var(--txt-2); }
.ticker-inner span em { font-style: normal; color: var(--pri); margin-right: 6px; font-family: var(--num); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 空态 / 加载 ---------- */
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media print { #stage { transform: none !important; } }


/* ---- 园区一张图 ---- */
#parkmap text { pointer-events: none; user-select: none; }
.pc-shape { cursor: pointer; transition: fill-opacity .22s, stroke-width .22s, filter .22s; }
.pc-g:hover .pc-shape { fill-opacity: .42; stroke-width: 2; filter: drop-shadow(0 0 10px rgba(0,229,160,.35)); }
.pc-g.active .pc-shape { fill-opacity: .46; stroke-width: 2.2; filter: drop-shadow(0 0 14px rgba(0,229,160,.5)); }
.pc-g.active .pc-name { fill: #fff; }
.pc-name { font-size: 15px; font-weight: 600; fill: #eafff6; letter-spacing: .5px; }
.pc-sub { font-size: 11px; fill: rgba(200,235,220,.62); letter-spacing: .3px; }
.pc-val { font-size: 10.5px; fill: rgba(0,229,160,.78); font-family: var(--num); }
.road { stroke: rgba(120,180,155,.16); stroke-linecap: round; }
.road-c { stroke: rgba(0,229,160,.13); stroke-dasharray: 10 12; stroke-width: 1.4; }
.sensor { animation: blink 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.gw { font-size: 10px; fill: rgba(160,200,182,.5); letter-spacing: 1px; }
/* ---------- 真实地图（Leaflet） ---------- */
#parkmap { position: absolute; inset: 0; background: #04120c; z-index: 1; }
.map-panel .p-bd { position: relative; }
.map-hint, .map-legend, .parcel-card, .map-tools { z-index: 6; }

/* Leaflet 控件与大屏风格统一 */
.leaflet-container { font-family: var(--font); background: #04120c; }
.leaflet-control-attribution {
  background: rgba(4,16,12,.66) !important; color: #5f7f72 !important;
  font-size: 9px !important; padding: 1px 6px !important;
}
.leaflet-control-attribution a { color: #7ba291 !important; }

/* 地块标注（永久 tooltip） */
.pc-tip {
  background: rgba(4,18,13,.78) !important;
  border: 1px solid rgba(0,229,160,.22) !important;
  border-radius: 3px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.4) !important;
  color: #eafff6 !important; padding: 4px 10px !important;
  white-space: nowrap;
}
.pc-tip::before { display: none !important; }
.pc-tip b { display: block; font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.pc-tip span { display: block; font-size: 9.5px; color: #9fd4bd; margin-top: 1px; }

/* 设施标注 */
.fac {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 9.5px; letter-spacing: 1px; white-space: nowrap;
  color: var(--c); background: var(--cbg);
  border: 1px solid var(--cbd); border-radius: 2px;
  padding: 3px 8px; text-shadow: 0 0 8px rgba(0,0,0,.6);
}

/* 地块多边形 */
.pc-shape2 { cursor: pointer; transition: fill-opacity .2s, stroke-width .2s; }
.pc-shape2:hover { fill-opacity: .46; }

/* 右上工具条：底图切换 + 缩放 */
.map-tools { position: absolute; right: 16px; top: 40px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.map-switch { display: flex; border: 1px solid rgba(0,229,160,.25); border-radius: 3px; overflow: hidden; background: rgba(4,16,12,.78); }
.map-switch button {
  border: none; background: transparent; color: #9fd4bd; cursor: pointer;
  font-family: var(--font); font-size: 10.5px; letter-spacing: 1px; padding: 5px 12px;
  transition: background .18s, color .18s;
}
.map-switch button.on { background: rgba(0,229,160,.18); color: #eafff6; }
.map-zoom { display: flex; flex-direction: column; border: 1px solid rgba(0,229,160,.25); border-radius: 3px; overflow: hidden; background: rgba(4,16,12,.78); }
.map-zoom button {
  border: none; background: transparent; color: #9fd4bd; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 5px 9px; font-family: var(--font);
}
.map-zoom button:hover { background: rgba(0,229,160,.15); color: #eafff6; }
.map-zoom button + button { border-top: 1px solid rgba(0,229,160,.18); }

/* 卫星底图下地块下加一层暗色描边提升可读性 */
.leaflet-pane .pc-shape2 { filter: drop-shadow(0 0 6px rgba(0,0,0,.55)); }
