/* 东村点位 · 分类树样式（层级引导线版） */

.tree-node { margin: 0; }

.tree-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin-bottom: 5px;
  border: 2px solid var(--border); border-radius: 12px;
  background: #fdfcff; transition: 0.12s;
}
.tree-row:hover { border-color: var(--primary); background: #f8f4ff; }
.tree-row.sel { border-color: var(--accent); background: #fff8e8; }

.tree-children { margin-left: 24px; }
.tree-children > .tree-node { position: relative; padding-bottom: 5px; }
.tree-children > .tree-node::before {
  content: '';
  position: absolute;
  left: -12px; top: 0; bottom: 0;
  border-left: 2.5px dashed var(--border);
}
.tree-children > .tree-node:last-child::before { bottom: auto; height: 19px; }

.tree-children > .tree-node > .tree-row { position: relative; margin-bottom: 0; }
.tree-children > .tree-node > .tree-row::before {
  content: '';
  position: absolute;
  left: -12px; top: 50%;
  width: 12px; height: 2.5px;
  margin-top: -1px;
  background: var(--border);
}

.tree-arrow {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: 7px;
  background: #f1ecff; font-size: 11px; cursor: pointer;
  color: var(--primary-dark); user-select: none;
}
.tree-arrow.leaf {
  border-color: var(--border); background: #f6f4fb;
  color: var(--ink-2); cursor: default;
}

.tree-name {
  font-family: var(--font-fun); font-size: 14.5px;
  letter-spacing: 1px; white-space: nowrap;
}
.tree-preview {
  flex: 1; min-width: 0; color: var(--ink-2); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tree-ops { flex-shrink: 0; margin-left: auto; opacity: 0; transition: 0.15s; }
.tree-row:hover .tree-ops { opacity: 1; }

/* ---- 地图管理 ---- */
.map-strip { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.map-sec { flex-shrink: 0; }
.map-sec-wide { flex: 1 1 100%; min-width: 0; }
.map-sec-label { font-weight: 800; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.map-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.near-mosaic { display: grid; gap: 0; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 5px 0 var(--ink); max-width: 940px; }
.map-thumb {
  width: 92px; border: 2.5px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #fff; cursor: pointer; transition: 0.12s;
}
.map-thumb:hover { transform: translateY(-2px); border-color: var(--primary); }
.map-thumb.sel { border-color: var(--accent); box-shadow: 0 3px 0 var(--accent); }
.map-thumb img { display: block; width: 100%; height: 58px; object-fit: cover; }
.map-tile { position: relative; cursor: pointer; background: #fff; }
.map-tile img { display: block; width: 100%; height: auto; }
.map-tile:hover img { filter: brightness(1.06); }
.map-tile.sel::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--accent); pointer-events: none; }

.map-thumb-name {
  font-size: 10.5px; font-weight: 800; text-align: center; padding: 3px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-arrow { align-self: center; font-size: 20px; color: var(--ink-2); font-weight: 800; flex-shrink: 0; }
.map-viewer { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.map-stage {
  position: relative; display: inline-block;
  border: 3px solid var(--ink); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: 0 5px 0 var(--ink);
}
.map-stage.drawing { cursor: crosshair; border-color: var(--pink); }
.map-stage img { display: block; max-width: 100%; max-height: 64vh; }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-lines line {
  stroke: var(--pink); stroke-width: 2.5;
  vector-effect: non-scaling-stroke; stroke-dasharray: 7 5;
}
.map-pending-dot {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--pink); border: 2px solid #fff;
  pointer-events: none;
}
.map-crosshair {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(58, 46, 85, 0.85); color: #fff;
  font-size: 12px; font-weight: 800; padding: 4px 12px;
  border-radius: 999px; pointer-events: none;
}
.map-lines-count { font-size: 12px; color: var(--ink-2); font-weight: 800; }
.map-chk {
  font-size: 12.5px; font-weight: 800; color: var(--ink-2);
  display: flex; align-items: center; gap: 5px; margin-right: 4px; cursor: pointer;
}
.map-tip { margin-top: 10px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }

/* hidden 属性优先于 display:flex */
.tb-head .ops[hidden], td .ops[hidden], .ops[hidden] { display: none !important; }

/* 版本切换按钮组 */
.map-versions { display: flex; gap: 6px; flex-wrap: wrap; margin-right: 8px; }

/* 边界线：悬停预览段 */
.map-lines line.preview { stroke: var(--primary); opacity: 0.6; stroke-dasharray: none; }

/* GPS 标定点 */
.calib-dot {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #e5484d; border: 2px solid #fff;
  box-shadow: 0 0 0 2.5px rgba(229, 72, 77, 0.45); pointer-events: none;
}
.calib-list { display: flex; flex-wrap: wrap; gap: 6px; }
.calib-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 2px solid var(--border); border-radius: 999px;
  padding: 2px 5px 2px 10px; font-size: 12px; font-weight: 800; color: var(--ink-2);
}
.calib-item .btn { padding: 0 6px; line-height: 1.4; }

/* GPS 校准状态条 */
.map-calib-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px;
  background: #f6f7f9; border: 2px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--ink-2);
}
.ops-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

.calib-dot.dim, .calib-item.dim { opacity: .45; }

/* 地理点位·已标注图标 */
.geo-tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 列表横条上的标志 / 图片缩略图 */
.row-marker { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.row-photo { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; flex-shrink: 0; }
.row-marker, .row-photo { -webkit-user-drag: none; user-select: none; }

/* 地理点位·地图标注（撑满弹窗宽度，正方形区域，图片按比例居中） */
.geo-pick-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #e8eaed;
  cursor: crosshair;
}
.geo-coord-row { display: flex; gap: 12px; }
.geo-coord { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.geo-coord label { white-space: nowrap; margin-bottom: 0; }
.geo-coord input { flex: 1; min-width: 0; }

/* 点位标志·图库 */
.geo-marker-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.geo-marker-upload { display: inline-flex; align-items: center; cursor: pointer; }
.geo-marker-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-marker-item {
  width: 44px; height: 44px; padding: 4px;
  border: 2px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.geo-marker-item img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.geo-marker-item:hover { border-color: var(--primary); }
.geo-marker-item.sel { border-color: var(--primary-dark); background: #f3ecff; box-shadow: 0 0 0 2px rgba(94, 53, 177, .25); }
.geo-marker-none { font-size: 11px; color: var(--ink-2); }

/* 点位图片·总图库 */
.geo-photos-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.geo-photos-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.geo-photo-tile {
  position: relative; width: 72px; height: 72px; padding: 0;
  border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  background: #fff; cursor: pointer;
}
.geo-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.geo-photo-tile:hover { border-color: var(--primary); }
.geo-photo-tile.sel { border-color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(94, 53, 177, .25); }
.geo-photo-check {
  display: none; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-dark); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.geo-photo-tile.sel .geo-photo-check { display: block; }
.geo-upload-btn { display: inline-flex; align-items: center; cursor: pointer; }
.geo-pick-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
.geo-pick-canvas { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.geo-pick-stage.zoomed { cursor: grab; }
.geo-pick-stage.grabbing { cursor: grabbing; }
.form-html { min-width: 0; }
.geo-pick-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  pointer-events: none;
  display: none;
  transform: scale(1);
  transform-origin: center;
}
