/* ========================================
   可步行性专家评价工具 - 组件样式
   ======================================== */

/* ===== 层级标签页 ===== */
.level-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: 12px;
}

.level-tab {
  position: relative;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-tab:hover {
  background: var(--white);
  color: var(--gray-800);
}

.level-tab.active {
  background: var(--level-gradient);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.level-tab i {
  font-size: 14px;
}

/* ===== 模式/视图切换 ===== */
.mode-switcher, .view-switcher {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-200);
  border-radius: 8px;
}

.mode-btn, .view-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover, .view-btn:hover {
  color: var(--gray-800);
}

.mode-btn.active, .view-btn.active {
  background: var(--white);
  color: var(--gray-800);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== 量表按钮组 ===== */
.scale-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scale-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--white);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 70px;
  text-align: center;
}

.scale-btn:hover {
  border-color: var(--level-primary);
  color: var(--level-primary);
  transform: translateY(-1px);
}

.scale-btn.selected {
  background: var(--level-gradient);
  border-color: var(--level-primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* ===== 多选标签 ===== */
.checkbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--gray-700);
  background: var(--white);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-tag:hover {
  border-color: var(--level-primary);
  background: var(--level-light);
}

.checkbox-tag.checked {
  background: var(--level-light);
  border-color: var(--level-primary);
  color: var(--level-dark);
}

.checkbox-tag i {
  font-size: 12px;
  color: var(--gray-400);
  transition: all 0.2s ease;
}

.checkbox-tag.checked i {
  color: var(--level-primary);
}

/* ===== 可折叠说明 ===== */
.collapsible {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapsible-header:hover {
  background: var(--gray-100);
}

.collapsible-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
}

.collapsible-title i {
  font-size: 12px;
  color: var(--gray-400);
}

.collapsible-arrow {
  font-size: 12px;
  color: var(--gray-400);
  transition: transform 0.3s ease;
}

.collapsible.expanded .collapsible-arrow {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapsible.expanded .collapsible-content {
  max-height: 500px;
}

.collapsible-inner {
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-600);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

/* ===== 进度条 ===== */
.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.progress-bar {
  flex: 1;
  min-width: 100px;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--level-gradient);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
}

/* ===== 卡片 ===== */
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

/* ===== 评价卡片 ===== */
.rating-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.rating-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rating-card.completed {
  border-left: 4px solid var(--level-primary);
}

.rating-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

/* ===== 图像卡片（画册视图） ===== */
.image-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 4/3;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--white);
}

.image-card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.image-card-status.rated {
  background: rgba(34, 197, 94, 0.9);
}

.image-card-status.unrated {
  background: rgba(156, 163, 175, 0.9);
}

/* 图像卡片名称 */
.image-card-name {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* 评价结果显示 */
.image-card-rating {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.9);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 6px;
}

/* 参考数据摘要（浏览模式） */
.card-ref-summary {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.9);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.card-no-ref {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(156, 163, 175, 0.9);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.btn-primary {
  background: var(--level-gradient);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-icon {
  padding: 10px;
  min-width: 40px;
}

/* ===== 导航按钮 ===== */
.nav-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 保存状态提示 ===== */
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.save-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.save-status i {
  font-size: 12px;
}

/* ===== 文件上传区域 ===== */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gray-50);
}

.upload-zone:hover {
  border-color: var(--level-primary);
  background: var(--level-light);
}

.upload-zone.dragover {
  border-color: var(--level-primary);
  background: var(--level-light);
  transform: scale(1.01);
}

.upload-zone i {
  font-size: 48px;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.upload-zone p {
  color: var(--gray-600);
  font-size: 14px;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: var(--gray-600);
  padding: 0 16px;
}

/* ===== 选择框 ===== */
.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper select {
  appearance: none;
  padding: 8px 36px 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-wrapper select:hover {
  border-color: var(--gray-300);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--level-primary);
  box-shadow: 0 0 0 3px var(--level-light);
}

.select-wrapper::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--gray-400);
  font-size: 12px;
}

/* ===== 工具提示 ===== */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: var(--gray-800);
  color: var(--white);
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===== 评分标准编辑器 ===== */
.scale-editor {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.scale-editor-item {
  text-align: center;
}

.scale-editor-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.scale-editor-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.scale-editor-input:focus {
  outline: none;
  border-color: var(--level-primary);
  box-shadow: 0 0 0 3px var(--level-light);
}

/* ===== 问题编辑器 ===== */
.question-editor {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.question-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.question-editor-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.question-editor-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--level-primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}

.question-editor-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
}

.question-editor-actions {
  display: flex;
  gap: 4px;
}

.question-editor-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-editor-btn:hover {
  background: var(--gray-200);
  color: var(--gray-600);
}

.question-editor-btn.delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.question-editor-body {
  padding: 16px;
}

.question-editor-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.question-editor-row label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.question-editor-row input,
.question-editor-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.question-editor-row input:focus,
.question-editor-row textarea:focus {
  outline: none;
  border-color: var(--level-primary);
  box-shadow: 0 0 0 3px var(--level-light);
}

.question-type-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.question-type-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-type-btn:hover {
  background: var(--gray-200);
}

.question-type-btn.active {
  background: var(--level-light);
  color: var(--level-dark);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ===== 优化策略与实施举措 推理链路层级(问题→策略→举措 分组) ===== */
.chain-sr{margin:0 0 14px;padding:10px 12px 6px;border:1px solid var(--line);border-left:3px solid #4f7a9e;border-radius:6px;background:rgba(79,122,158,.03)}
.chain-sr-h{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.chain-sr-h .chip-sr{font-weight:600;font-size:13px;color:#243447;background:#eef3f8;border:1px solid #d6e1ec;border-radius:4px;padding:2px 8px}
.chain-sr-h .chain-arrow{font-size:12px;color:var(--mute)}
.chain-body{display:flex;flex-direction:column;gap:8px}
.chain-si{display:flex;flex-direction:column;gap:6px}
.chain-si .checkbox-tag{font-size:13px}
.chain-sm{margin-left:18px;padding-left:10px;border-left:2px dashed #d6e1ec;display:flex;flex-wrap:wrap;gap:6px}
.chain-sm .checkbox-tag{font-size:12.5px;background:#f7f9fb}

/* 推理链路内涵展开 */
.chain-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.chain-info-btn{font-size:12px;color:#4f7a9e;cursor:pointer;user-select:none;padding:2px 6px;border:1px solid #d6e1ec;border-radius:4px;background:#f7f9fb;transition:.12s}
.chain-info-btn:hover{background:#eef3f8}
.chain-info-btn.on{background:#4f7a9e;color:#fff;border-color:#4f7a9e}
.chain-info-box{margin:4px 0 6px;padding:8px 10px;font-size:12.5px;line-height:1.65;color:#3a3530;background:#faf8f2;border:1px solid #ece5d4;border-radius:5px;border-left:3px solid #cbb87e}
.chain-sm-item{display:flex;flex-direction:column;gap:2px}

/* 知识库:完整推理链路层级总览(与下方选择区同构对位) */
.kb-title{margin:14px 0 8px;padding-top:10px;border-top:1px dashed var(--line);font-weight:600;font-size:13.5px;color:#243447}
.kb-sr{margin:0 0 12px;padding:10px 12px;border:1px solid var(--line);border-left:3px solid #4f7a9e;border-radius:6px;background:rgba(79,122,158,.03)}
.kb-sr-h{font-weight:600;font-size:13px;color:#243447;margin-bottom:4px}
.kb-si{margin:8px 0 0;padding:8px 10px;background:#fff;border:1px solid #eef1f4;border-radius:5px}
.kb-si-h{font-weight:600;font-size:12.5px;color:#3a5a78;margin-bottom:3px}
.kb-sm-list{margin:6px 0 0;padding-left:10px;border-left:2px dashed #e3e8ee}
.kb-sm{margin:0 0 6px;font-size:12px}
.kb-sm-h{color:#555;margin-bottom:2px}
.kb-tag{display:inline-block;font-size:11px;font-weight:600;color:#243447;background:#eef3f8;border:1px solid #d6e1ec;border-radius:3px;padding:1px 6px;margin-right:4px}
.kb-tag.sub{color:#3a5a78;background:#eaf0f5}
.kb-tag.sm{color:#6b5a3a;background:#f6f0e6;border-color:#ece0c8}
.kb-desc{font-size:12.5px;line-height:1.65;color:#3a3530;margin:2px 0 4px}
/* 问题归因区SR标签inline内涵(sr-tags每项一行) */
.sr-tags{flex-direction:column;align-items:flex-start;gap:4px}

/* 知识库侧边抽屉:右下角按钮 + 右侧推开式侧栏(展开时主区左移让位,不遮挡评价区) */
.kb-toggle{position:fixed;right:20px;bottom:24px;z-index:60;display:flex;align-items:center;gap:6px;padding:9px 16px;border:none;border-radius:24px;background:#243447;color:#fff;font-size:13px;font-weight:600;box-shadow:0 4px 14px rgba(36,52,71,.32);cursor:pointer;transition:.15s}
.kb-toggle:hover{background:#324659;transform:translateY(-1px)}
.kb-toggle i{font-size:14px}
.kb-drawer{position:fixed;top:0;right:0;width:400px;max-width:85vw;height:100vh;background:#fff;z-index:70;box-shadow:-6px 0 28px rgba(0,0,0,.16);transform:translateX(100%);transition:transform .28s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.kb-drawer.open{transform:translateX(0)}
.kb-drawer-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px;background:#243447;color:#fff;font-size:14px;font-weight:600}
.kb-drawer-title{display:inline-flex;align-items:center}
.kb-drawer-title i{margin-right:6px}
.kb-drawer-close{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.12);color:#fff;border-radius:5px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.kb-drawer-close:hover{background:rgba(255,255,255,.28)}
.kb-drawer-body{flex:1;overflow-y:auto;padding:16px 18px;line-height:1.7}
body.kb-open .app-container{margin-right:400px;transition:margin-right .28s cubic-bezier(.4,0,.2,1)}
@media(max-width:900px){body.kb-open .app-container{margin-right:0}.kb-drawer{width:100vw;max-width:100vw}}

/* 对外:问题→优化策略→实施举措 嵌套填空 */
.nest-block{margin:10px 0 4px;padding:10px 12px;border:1px solid var(--gray-200,#e5e7eb);border-left:3px solid #4f7a9e;border-radius:6px;background:rgba(79,122,158,.025)}
.nest-deeper{border-left-color:#cbb87e;background:rgba(203,184,126,.05)}
.nest-block-h{font-weight:600;font-size:13px;color:#243447;display:flex;align-items:center;gap:6px}
.nest-block-h i{color:#4f7a9e}
.nest-deeper .nest-block-h i{color:#a98a4e}
.nest-hint{font-size:11.5px;color:var(--gray-500,#6b7280);margin:3px 0 6px;line-height:1.5}
.strategy-entry,.measure-entry{margin:8px 0;padding:10px 12px;background:#fff;border:1px solid #eef1f4;border-radius:5px}
.measure-entry{background:#fdfcf8}
.nest-entry-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.nest-entry-head .lbl{font-weight:600;font-size:12.5px;color:#3a5a78}
.measure-entry .lbl{color:#7a6a3e}
.nest-del{border:none;background:rgba(0,0,0,.04);color:#999;width:24px;height:24px;border-radius:4px;cursor:pointer;font-size:11px}
.nest-del:hover{background:rgba(192,84,84,.12);color:#c05454}
.add-nest-btn{margin-top:6px;border:1px dashed #b8c4d0;background:transparent;color:#4f7a9e;font-size:12px;padding:5px 12px;border-radius:5px;cursor:pointer;font-weight:600}
.add-nest-btn:hover{background:#eef3f8}
.add-nest-btn:disabled{opacity:.4;cursor:not-allowed}
.nest-block .attr-label{font-size:11.5px;color:var(--gray-600,#4b5563);margin:6px 0 2px}

/* 落地页评价步骤说明 */
.landing-steps{margin:14px 0 10px;text-align:left;display:flex;flex-direction:column;gap:7px}
.landing-step{display:flex;align-items:flex-start;gap:8px;font-size:13.5px;line-height:1.6;color:#3a3530}
.step-no{flex-shrink:0;width:22px;height:22px;border-radius:50%;background:#243447;color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center}
.landing-note{font-size:12.5px;color:var(--gray-500,#6b7280);margin:6px 0 12px;line-height:1.6}


/* ========================================
   2026-07 改版:视图切换tab栏 / 画册视图 / 历史参照 / 动效
   ======================================== */

/* ===== 视图切换(header 内嵌) ===== */
.eval-view-switcher { flex-shrink: 0; }
.eval-view-switcher .view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
}
.eval-view-switcher .view-btn i { font-size: 12.5px; }
.eval-view-switcher .view-btn.active { color: var(--safety-dark); }

/* ===== 画册视图 / 历史参照 滚动容器 ===== */
.board-scroll {
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 20px 24px 32px;
  background: var(--gray-50);
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
}
.board-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: boardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.album-card, .hist-card { cursor: pointer; }
.album-card:hover, .hist-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}
.board-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
  overflow: hidden;
}
.board-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.album-card:hover .board-thumb img { transform: scale(1.03); }
.board-status {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.board-status.done { background: rgba(34, 197, 94, 0.9); color: #fff; }
.board-status.todo { background: rgba(107, 114, 128, 0.85); color: #fff; }
.board-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.board-pid {
  font-family: var(--font-mono); font-size: 12px; color: var(--gray-500);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.board-pid .idx { color: var(--gray-400); }

/* 标签分组与 chips */
.chip-group { display: flex; flex-direction: column; gap: 4px; }
.chip-group-label {
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  display: flex; align-items: center; gap: 5px;
}
.chip-group-label i { font-size: 10px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip {
  font-size: 12px; line-height: 1.4;
  padding: 2px 9px; border-radius: 999px;
  background: var(--gray-100); color: var(--gray-600);
  border: 1px solid transparent;
}
.tag-chip.attr { background: #eef3f8; color: #243447; border-color: #d6e1ec; }
.tag-chip.strategy { background: #eaf0f5; color: #3a5a78; border-color: #d3e0ea; }
.tag-chip.measure { background: #f6f0e6; color: #6b5a3a; border-color: #ece0c8; }
.tag-chip.noissue { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.tag-chip.empty { background: transparent; color: var(--gray-400); border-style: dashed; border-color: var(--gray-300); }

/* 诊断评级 chip(按分值色阶) */
.rate-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; border: 1px solid transparent;
}
.rate-chip .v { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }
.rate-1 { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.rate-2 { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.rate-3 { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.rate-4 { background: #ecfccb; color: #4d7c0f; border-color: #d9f99d; }
.rate-5 { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.rate-dim { font-weight: 500; opacity: 0.85; }

/* ===== 历史参照 ===== */
.hist-note {
  max-width: 1600px; margin: 0 auto 16px;
  background: #faf8f2; border: 1px solid #ece5d4; border-left: 3px solid #cbb87e;
  border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 12.5px; line-height: 1.7; color: #3a3530;
}
.hist-note b { color: #243447; }
.hist-rounds { display: flex; gap: 4px; }
.round-badge {
  font-size: 10.5px; font-weight: 600; font-family: var(--font-mono);
  padding: 1px 7px; border-radius: 4px;
  background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200);
}
.hist-partial { font-size: 11.5px; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 4px 8px; }
.hist-texts { border-top: 1px dashed var(--gray-200); padding-top: 8px; }
.hist-texts summary {
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--gray-500);
  user-select: none; outline: none;
}
.hist-texts summary:hover { color: var(--gray-700); }
.hist-text-block { margin-top: 6px; font-size: 12px; line-height: 1.7; color: var(--gray-600); white-space: pre-wrap; }
.hist-text-block .tb-label { font-weight: 600; color: var(--gray-500); font-size: 11px; }
.hist-loading { text-align: center; color: var(--gray-400); padding: 60px 0; font-size: 14px; }

/* 历史详情弹窗(点击卡片进入,可前后翻页) */
.hist-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: viewFade 0.18s ease both;
}
.hist-modal {
  position: relative;
  width: min(1120px, 94vw); height: min(740px, 90vh);
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex; overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.hist-modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(17, 24, 39, 0.55); color: #fff;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.hist-modal-close:hover { background: rgba(17, 24, 39, 0.78); }
.hist-modal-left {
  flex: 1.15; min-width: 0;
  background: var(--gray-900);
  display: flex; align-items: center; justify-content: center;
}
.hist-modal-left img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.hist-modal-right {
  flex: 1; overflow-y: auto;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.hist-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 8px; padding-right: 36px; border-bottom: 1px solid var(--gray-100);
}
.hist-modal-nav {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hist-modal-idx { font-size: 12px; color: var(--gray-400); font-family: var(--font-mono); }
@media (max-width: 860px) {
  .hist-modal { flex-direction: column; }
  .hist-modal-left { flex: 0 0 40%; }
}

/* ===== 动效 ===== */
@keyframes boardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-fade { animation: viewFade 0.22s ease both; }
@keyframes viewFade { from { opacity: 0; } to { opacity: 1; } }

/* 勾选对勾弹入 / 量表选中脉冲 */
.checkbox-tag.checked i { animation: checkPop 0.22s ease; }
@keyframes checkPop {
  0% { transform: scale(0.3); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.scale-btn.selected { animation: btnPulse 0.25s ease; }
@keyframes btnPulse {
  0% { transform: translateY(-2px) scale(0.96); }
  55% { transform: translateY(-2px) scale(1.04); }
  100% { transform: translateY(-2px) scale(1); }
}

/* 顶部进度条微光 */
.eval-progress .fill { position: relative; overflow: hidden; }
.eval-progress .fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: fillShine 2.6s ease-in-out infinite;
}
@keyframes fillShine {
  0%, 55% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .board-card, .view-fade, .checkbox-tag.checked i, .scale-btn.selected, .eval-progress .fill::after, .hist-modal-overlay, .hist-modal {
    animation: none !important;
  }
  .album-card, .hist-card, .album-card:hover, .hist-card:hover, .board-thumb img {
    transition: none !important;
    transform: none !important;
  }
}
