:root {
  --primary: #1565c0;
  --primary-light: #e3f2fd;
  --success: #2e7d32;
  --warning: #f9a825;
  --danger: #c62828;
  --bg: #eceff1;
  --card: #fff;
  --border: #cfd8dc;
  --text: #263238;
  --text1: #263238;
  --text2: #546e7a;
  --text3: #90a4ae;
  --radius: 6px;
}
* { margin:0; padding:0; box-sizing:border-box; }


/* ========== SVG 按钮图标 ========== */
.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ========== 顶部菜单栏 ========== */
.tabs { display:flex; background:#fff; border-bottom:2px solid var(--border); padding:0 20px; overflow-x:auto;height:42px}
/* 隐藏水平滚动条（保留滑动功能） */
.tabs::-webkit-scrollbar { display: none; }
.tabs { -ms-overflow-style: none; scrollbar-width: none; }

.tab { padding:11px 18px; border:none; background:none; cursor:pointer; font-size:13px; font-weight:500; color:var(--text2); border-bottom:3px solid transparent; transition:all .2s; white-space:nowrap; }
.tab:hover { color:var(--primary); background:var(--primary-light); }
.tab.on { color:var(--primary); border-bottom-color:var(--primary); }

/* 下拉菜单 */
.dropdown { position: static; display: flex; align-items: center; }
.dropdown .tab {
  height: 100%;
  display: flex;
  align-items: center;
}
.dropdown .tab:hover {
  background: var(--primary-light) !important;
}
.dropdown-menu {
  display: none;
  position: fixed;
  top: 116px;
  left: 20px;
  background: #fff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  z-index: 100;
  min-width: 140px;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: background .1s;
}
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

/* 工程名标签 */
.project-badge {
  margin-left: 8px;
  font-size: 12px;
  color: #fff;
  background: var(--primary, #1565c0);
  border-radius: var(--radius, 4px);
  padding: 5px 12px;
  align-self: center;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* 主容器 */
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px 16px 60px 16px; }
.pane { display: none; }
.pane.on { display: block; }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

/* ========== 已记录塔号列表 ========== */
.tower-list-bar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.tower-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.tower-list-title {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
  margin-bottom: 0;
}
.tower-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tower-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.tower-tag:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.tower-tag.on {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
/* 查看全部 / 收起：与 .tower-tag 同款尺寸，背景为蓝色 */
.tower-tag.tower-more-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tower-tag.tower-more-btn:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  color: #fff;
}
/* + 新建：与 .tower-tag 同款尺寸，蓝色描边 */
.tower-tag.tower-new-btn {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.tower-tag.tower-new-btn:hover {
  background: var(--primary);
  color: #fff;
}
.tower-tag-user {
  font-size: 10px;
  opacity: 0.7;
}

/* 编辑指示器 */
.editing-indicator {
  font-size: 12px;
  color: var(--warning);
  align-items: center;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-tip { font-size: 13px; color: var(--text3); }

/* 表单 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}
.grp { display: flex; flex-direction: column; gap: 3px; }
.grp label { font-size: 12px; color: var(--text2); font-weight: 500; }
.grp input, .grp select, .grp textarea {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.grp input:focus, .grp select:focus { border-color: var(--primary); }
.req { color: var(--danger); }

.form-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}
.form-section-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.checkbox-group, .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chk-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.chk-item:hover { border-color: var(--primary); }
.chk-item input { margin: 0; cursor: pointer; }
.other-input {
  margin-top: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.other-input:focus { border-color: var(--primary); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: all .15s;
}
.btn-pri { background: var(--primary); color: #fff; }
.btn-pri:hover { background: #115293; }
.btn-ok { background: var(--success); color: #fff; }
.btn-err { background: var(--danger); color: #fff; }
.btn-out { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-out:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* 搜索输入 */
.search-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  min-width: 200px;
}
.search-input:focus { border-color: var(--primary); }

/* 表格 */
.tbl-wrap {
  overflow: auto;
  max-height: 550px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 6px 8px; border: 1px solid var(--border); min-width: 50px; text-align: left; }
th { background: #f5f5f5; font-weight: 600; position: sticky; top: 0; z-index: 1; text-align: center; }
tr:hover td { background: var(--primary-light); }

/* 成员表：列宽按内容自适应，避免写死像素宽度导致窄屏挤压错位 */
#tbl-members { table-layout: auto; }
#tbl-members th, #tbl-members td { white-space: nowrap; }
#tbl-members th:first-child, #tbl-members td:first-child { width: 1%; }
#tbl-members td { text-align: left; }
#tbl-members th { text-align: center; }

/* 汇总表：与成员表一致，列宽按内容自适应 */
#tbl-summary { table-layout: auto; }
#tbl-summary th, #tbl-summary td { white-space: normal; word-break: break-word; overflow-wrap: break-word; max-width: 200px; }
#tbl-summary th:nth-child(1), #tbl-summary td:nth-child(1),
#tbl-summary th:nth-child(2), #tbl-summary td:nth-child(2) { width: 1%; }
#tbl-summary td { text-align: left; }
#tbl-summary th { text-align: center; }

/* 对话框 */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.modal.on { display: flex; }
.mdl {
  background: #fff;
  border-radius: var(--radius);
  max-width: 850px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
}

/* 工程列表项 */
.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .15s;
}
.project-item:hover { border-color: var(--primary); background: var(--primary-light); }
.project-item .pj-name { font-weight: 500; font-size: 14px; }
.project-item .pj-info { font-size: 11px; color: var(--text2); margin-top: 2px; }
.project-item .pj-time { font-size: 11px; color: var(--text3); }

/* 延迟上传照片占位 */
.photo-placeholder {
  width: 100%;
  height: 180px;
  background: #f0f4f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.photo-placeholder-name {
  font-size: 13px;
  color: var(--text2);
  max-width: 90%;
  text-align: center;
  word-break: break-all;
}
.photo-placeholder-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--warning);
  color: #fff;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 10px;
  font-weight: 500;
}
.photo-upload-btn {
  position: absolute;
  bottom: 38px;
  right: 8px;
  padding: 6px 18px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.photo-upload-btn:hover { opacity: 0.85; }

/* 延迟上传开关 - switch 样式 */
.delay-upload-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  color: var(--text1);
}
.delay-upload-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.delay-switch-track {
  width: 52px;
  height: 28px;
  background: #ccc;
  border-radius: 14px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.delay-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.delay-upload-switch input:checked + .delay-switch-track {
  background: var(--warning);
}
.delay-upload-switch input:checked + .delay-switch-track .delay-switch-thumb {
  transform: translateX(24px);
}
.delay-switch-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text1);
}

/* 照片上传 */
.photo-upload-area { margin-bottom: 10px; }
.photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
.photo-item {
  position: relative;
  width: 200px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.photo-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.photo-item .photo-caption {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: #f8f9fa;
  word-break: break-all;
}
.photo-item .photo-caption input {
  width: 100%;
  border: none;
  background: none;
  font-size: 12px;
  outline: none;
  color: var(--text);
}
.photo-item .photo-caption input::placeholder { color: var(--text3); }
.photo-item .photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.photo-item .photo-del:hover { background: var(--danger); }

/* 上传进度条覆层 */
.photo-progress-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.photo-progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,.3);
  border-radius: 3px;
  overflow: hidden;
}
.photo-progress-bar-fill {
  height: 100%;
  background: #4fc3f7;
  border-radius: 3px;
  transition: width .15s ease;
}
.photo-progress-text {
  font-size: 11px;
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* 人员搜索 */
.member-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-results {
  margin-bottom: 16px;
}
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 13px;
}
.search-result-item:hover { background: var(--primary-light); }
.search-result-item .sr-info { display: flex; gap: 12px; align-items: center; }
.search-result-item .sr-name { font-weight: 500; }
.search-result-item .sr-phone { color: var(--text2); font-size: 12px; }

/* 手册 */
.manual-content {
  min-height: 200px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.manual-content:empty::before {
  content: '暂无勘察指导手册内容。点击「编辑手册」按钮添加。';
  color: var(--text3);
}
.manual-editor {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.8;
  outline: none;
  resize: vertical;
  font-family: inherit;
}
.manual-editor:focus { border-color: var(--primary); }

/* 记录详情 */
.record-detail-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}
.record-detail-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
}
.record-detail-value {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}

/* 详情：左侧 2 列 10 行表格 + 右侧塔头相序示意 */
.record-detail-grid { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.record-detail-table-wrap { flex: 1 1 58%; min-width: 0; }
.record-detail-aside { flex: 0 0 38%; min-width: 0; padding: 12px; background: #f8f9fa; border-radius: 6px; }
.record-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #f8f9fa;
  border-radius: 6px;
  overflow: hidden;
}
.record-detail-table tr + tr td { border-top: 1px solid #ececec; }
.record-detail-table td { padding: 10px 12px; vertical-align: top; overflow-wrap: anywhere; }
.record-detail-table .record-detail-label {
  width: 42%;
  margin-bottom: 0;
  color: var(--text);
}
.record-detail-table .record-detail-value {
  width: 58%;
  color: var(--text2);
  line-height: 1.6;
}
.record-detail-table .det-color { max-width: 100%; }
.record-detail-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.record-detail-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #f0f0f0;
}
.photo-detail-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
}
.photo-detail-caption {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  word-break: break-all;
  width: 100%;
  line-height: 1.4;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin: 1px;
}
.tag-blue { background: #e3f2fd; color: #1565c0; }
.tag-green { background: #e8f5e9; color: #2e7d32; }
.tag-orange { background: #fff8e1; color: #f57f17; }
.tag-red { background: #ffebee; color: #c62828; }
.tag-grey { background: #f5f5f5; color: #616161; }

/* ========== 响应式：平板 ========== */
@media(max-width: 900px) {
  .wrap { padding: 8px 8px 70px 8px; }
  .card { padding: 10px; }
  .checkbox-group, .radio-group { flex-direction: column; gap: 6px; }
  .member-search-bar { flex-direction: column; }
  .search-input { min-width: 0; width: 100%; }
  table { font-size: 11px; }
  th, td { padding: 4px 5px; }
  .record-detail-photos { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 响应式：手机 ========== */
@media(max-width: 768px) {
  .project-badge { font-size: 11px; padding: 3px 6px; }
  .dropdown-menu { left: 10px; min-width: 120px; }
  .dropdown-menu a { padding: 14px 18px; font-size: 15px; }
  .tab { padding: 10px 12px; font-size: 15px; }
  .tabs { height: 48px; padding: 0 8px; }

  /* 主容器 */
  .wrap { padding: 8px 8px 80px 8px; }
  .card {
    padding:10px;
    margin-bottom: 10px;
  }
  .card h2 {
    font-size: 16px;
    padding-left: 12px;
  }

  /* 塔号列表 */
  .tower-list-bar { padding: 10px 12px; }
  .tower-list-title { font-size: 14px; }
  .tower-tag {
    font-size: 14px;
    padding: 7px 14px;
  }
  .tower-tag-user { font-size: 11px; }

  /* 地物/植被/地质 选项两列布局 */
  .checkbox-group, .radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .checkbox-group .chk-item, .radio-group .chk-item { width: 100%; }

  /* 表单 */
  .form-grid { padding: 14px; margin-bottom: 14px; gap: 14px; }
  .grp label { font-size: 14px; }
  .grp input, .grp select, .grp textarea {
    padding: 10px 12px;
    font-size: 15px;
  }
  .form-section {
    padding: 14px;
    margin-bottom: 14px;
  }
  .form-section-label {
    font-size: 15px;
    margin-bottom: 10px;
  }
  .chk-item {
    padding: 8px 16px;
    font-size: 15px;
    gap: 6px;
  }
  .other-input {
    padding: 10px 12px;
    font-size: 15px;
  }

  /* 按钮 */
  .btn {
    padding: 10px 16px;
    font-size: 15px;
  }
  .btn-icon {
    width: 18px;
    height: 18px;
  }

  /* 搜索框 */
  .search-input {
    padding: 10px 12px;
    font-size: 15px;
    min-width: 0;
    width: 100%;
  }
  /* 汇总工具栏：搜索框限宽 50%，避免把刷新按钮挤到下一行 */
  #summary-search {
    width: calc(50% - 4px);
    flex: 0 0 auto;
    font-size: 15px;
  }

  /* 表格 */
  table { font-size: 14px; }
  th, td { padding: 8px 6px; }
  .tbl-wrap { max-height: 450px; }
  /* 汇总表：手机端给最小总宽，避免列被压到极窄导致长文本换行、行高爆炸（横向滑动查看） */
  #tbl-summary { min-width: 760px; }

  /* 照片 */
  .photo-item {
    width: calc(50% - 6px);
  }
  .photo-item img { height: 140px; }
  .photo-item .photo-caption { font-size: 13px; }
  .photo-item .photo-caption input { font-size: 13px; }
  .photo-del {
    width: 26px;
    height: 26px;
  }

  /* 对话框 */
  .mdl {
    width: 96%;
    padding: 16px;
  }
  .mdl h3 { font-size: 17px; }

  /* 人员搜索 */
  .member-search-bar { flex-direction: column; gap: 10px; }
  .search-result-item {
    padding: 12px;
    font-size: 15px;
  }
  .sr-name { font-size: 15px; }
  .sr-phone { font-size: 13px; }

  /* 手册 */
  .manual-content { font-size: 15px; }
  .manual-editor { font-size: 15px; }

  /* 记录详情 */
  .record-detail-label { font-size: 14px; }
  .record-detail-value { font-size: 15px; }
  .record-detail-grid { flex-direction: column; gap: 12px; }
  .record-detail-table-wrap, .record-detail-aside { flex: 1 1 auto; width: 100%; }
  .record-detail-table td { padding: 8px 5px; }
  .record-detail-table .record-detail-label { font-size: 12px; }
  .record-detail-table .record-detail-value { font-size: 12px; }
  .record-detail-photos { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* 标签 */
  .tag { font-size: 12px; padding: 3px 9px; }

  /* 空状态 */
  .empty-icon { font-size: 56px; }
  .empty-text { font-size: 18px; }
  .empty-tip { font-size: 14px; }
}

/* ========== 打包任务：进度条 / 列表 ========== */
.pkg-progress-track {
  width: 100%;
  height: 8px;
  background: #eceff1;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.pkg-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--primary);
  transition: width .3s ease;
}
.pkg-progress-fill-running { background: #1e88e5; }
.pkg-progress-fill-done    { background: var(--success); }
.pkg-progress-fill-failed  { background: var(--danger); }
.pkg-progress-text {
  font-size: 11px;
  color: var(--text2);
  margin-top: 3px;
}
.pkg-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.pkg-status-running { color: #1e88e5; }
.pkg-status-done    { color: var(--success); }
.pkg-status-failed  { color: var(--danger); }
.pkg-tower-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-height: 76px;
  overflow-y: auto;
}
.pkg-url {
  font-size: 11px;
  color: var(--text2);
  word-break: break-all;
}
.pkg-url[href] {
  color: var(--primary);
  text-decoration: underline;
}
/* 汇总表「打包记录」列的可点击标记 */
.pkg-record-cell {
  white-space: normal;
  line-height: 1.7;
}
.pkg-mark {
  cursor: pointer;
  margin: 1px 2px 1px 0;
  transition: box-shadow .15s, transform .15s;
}
.pkg-mark:hover {
  box-shadow: 0 0 0 2px rgba(21, 101, 192, .25);
  transform: translateY(-1px);
}
.pkg-row-hi td {
  background: #fff8e1 !important;
}

.pkg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.btn-sm { padding: 3px 8px !important; font-size: 12px !important; }

/* ========== 照片地图信息窗：取消 box-shadow ========== */
.tdt-infowindow,
.tdt-infowindow-content-wrapper,
.tdt-infowindow-content,
.tdt-infowindow .tdt-infowindow-content-wrapper {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

/* ========== 上传队列进度条 ========== */
.upload-queue {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f7f9fb;
  font-size: 13px;
  color: var(--text2);
}
.upload-queue.running { border-color: #9ec5fe; background: #eef4ff; color: #1e4f8a; }
.upload-queue.ok      { border-color: #a3d9b1; background: #eefaf1; color: #1e6b3a; }
.upload-queue.failed  { border-color: #f0c08a; background: #fff6ec; color: #8a4b12; }
.uq-line  { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.uq-warn  { color: var(--danger); }
.uq-track { margin-top: 8px; height: 6px; background: #e3e9ef; border-radius: 3px; overflow: hidden; }
.uq-fill  { height: 100%; background: var(--primary, #2f7de1); border-radius: 3px; transition: width .25s ease; }
.uq-tip   { margin-top: 6px; font-size: 12px; opacity: .8; }
.uq-spin {
  width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block;
  animation: uq-rotate .8s linear infinite;
}
@keyframes uq-rotate { to { transform: rotate(360deg); } }
.uq-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--warning, #e6a23c); display: inline-block; flex: 0 0 8px; }
.uq-check { font-weight: 700; color: #1e6b3a; }

/* 全部上传完成后，保存按钮短暂高亮一下 */
.btn-pri.btn-flash { animation: btn-flash 1.1s ease-in-out 2; }
@keyframes btn-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(76, 175, 80, .28); }
}

/* ==================== xxjl 线路与相序表单 ==================== */
.line-badge { margin-left: 8px; background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.line-bar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.line-bar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.line-bar-title { font-size: 13px; font-weight: 600; color: var(--text2); }
.line-select { height: 36px; border: 1px solid var(--border); border-radius: 4px; padding: 0 10px; font-size: 13px; color: var(--text); background: #fff; min-width: 200px; max-width: 100%; }
.line-empty-tip { margin-top: 8px; font-size: 12px; color: #b26a00; background: #fff8e1; border: 1px solid #ffe0b2; border-radius: 4px; padding: 6px 10px; display: none; }
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--text2); }
.empty-text { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.empty-tip { font-size: 13px; color: var(--text3); }

.form-section { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.form-section-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.chk-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); cursor: pointer; }
.chk-item input { width: 15px; height: 15px; }
.field-tip { font-size: 12px; color: var(--text3); margin-top: 6px; }
.detail-tower-schematic { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 10px; background: #fbfcfe; border: 1px solid #e0e8ef; border-radius: 6px; overflow-x: auto; }

/* 塔头示意：全部排在一行，超出宽度可左右滑动（手机端触摸滑动） */
.tower-head-list { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 4px 2px 10px; }
.tower-head-item { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fafbfc; cursor: pointer; transition: all .15s; min-width: 104px; }
.tower-head-item:hover { border-color: var(--primary); background: #f3f8ff; }
.tower-head-item.on { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 1px var(--primary) inset; }
.tower-head-item input { margin: 0; }
.th-schematic { display: block; line-height: 0; }
.th-name { font-size: 12px; color: var(--text2); }

.circuit-fields { margin-top: 16px; }
/* 回路填报选项卡：一次只显示一个回路，手机端与上方塔头示意同屏 */
.circuit-tabs { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 2px solid var(--border); margin-bottom: 12px; }
.circuit-tab { flex: 0 0 auto; padding: 8px 16px; border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; background: #f5f7fa; color: var(--text2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.circuit-tab.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.circuit-panels .circuit-block { display: none; }
.circuit-panels .circuit-block.on { display: block; }
.circuit-block { background: #f7fafc; border: 1px solid #e0e8ef; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.circuit-block .form-grid { margin-top: 0; }
.phase-input { height: 36px; border: 1px solid var(--border); border-radius: 4px; padding: 0 10px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; width: 100%; max-width: 220px; }
.grp-name .phase-input { letter-spacing: normal; text-transform: none; max-width: 220px; }
.color-select-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-select { height: 36px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; font-size: 13px; background: #fff; color: var(--text); min-width: 200px; max-width: 100%; }
.color-swatch { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 4px; display: inline-block; flex: 0 0 26px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }

@media (max-width: 720px) {
  .line-select, .color-select { min-width: 150px; width: 100%; }
  .line-bar-head { gap: 6px; }
  .tower-head-list { gap: 6px; }
  .tower-head-item { min-width: 92px; padding: 6px; }
}

/* 回路数在手机端保持单行（覆盖通用 radio-group 的两列/纵向规则） */
@media (max-width: 900px) {
  #circuit-count { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; }
  #circuit-count .chk-item { width: auto; flex: 0 0 auto; }
}

/* 杆塔定位：塔号与回路数之间的定位按钮 */
.location-section { margin-top: 12px; padding-top: 12px; }
.location-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.location-status { font-size: 13px; color: var(--text2); }
.location-status.has-location { color: #2e7d32; font-weight: 600; }
.btn-icon-sm { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
@media (max-width: 768px) {
  .location-row { gap: 8px; }
  .location-status { font-size: 14px; width: 100%; }
}

/* 相序地图：标记气泡内的塔头示意 */
/* 避免与天地图自身的 .tdt-infowindow-content-wrapper 样式冲突导致 SVG 脱离容器悬浮 */
.pm-phase-info { position: static !important; box-shadow: none !important; line-height: 1.4; }
.pm-phase-box { margin-top: 8px; background: #fbfcfe; border: 1px solid #e0e8ef; border-radius: 6px; padding: 6px; text-align: center; position: relative; overflow: hidden; }
.pm-phase-box svg { display: block; position: static !important; max-width: 100% !important; max-height: 186px !important; margin: 0 auto; }
.pm-phase-btn { margin-top: 8px; width: 100%; padding: 6px 10px; font-size: 12px; border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 4px; cursor: pointer; }
.pm-phase-btn:hover { filter: brightness(.94); }
