/* ===== 响应式/组件补充样式 ===== */

/* 工时热力图 */
.heatmap-wrap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 8px 0;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.heatmap-cell:hover { opacity: 0.8; }
.heatmap-cell.h0 { background: #eee; }
.heatmap-cell.h1 { background: #E8EBF8; }
.heatmap-cell.h2 { background: #9baee8; }
.heatmap-cell.h3 { background: var(--primary-light); }
.heatmap-cell.h4 { background: var(--primary); }

/* 仪表盘快捷入口 */
.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.quick-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.quick-entry:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.quick-entry-icon { font-size: 28px; }
.quick-entry-label { font-size: 13px; font-weight: 500; color: var(--text-main); }

/* 客户等级 */
.customer-grade {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.grade-a { background: var(--accent); color: #fff; }
.grade-b { background: var(--primary-light); color: #fff; }
.grade-c { background: var(--text-light); color: #fff; }

/* 合同状态 */
.contract-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* 盖章模态框 */
.seal-preview {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: #fafbff;
  cursor: pointer;
  transition: border-color 0.2s;
}
.seal-preview:hover { border-color: var(--primary); }
.seal-preview-icon { font-size: 40px; opacity: 0.4; }
.seal-preview-text { font-size: 13px; color: var(--text-muted); }

/* 二维图表假占位 */
.bar-chart-wrap {
  height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 0;
}
.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  cursor: pointer;
  position: relative;
}
.bar:hover::after {
  content: attr(data-val);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.bar.primary { background: linear-gradient(180deg, var(--primary-light), var(--primary)); }
.bar.accent { background: linear-gradient(180deg, var(--accent-light), var(--accent)); }
.bar.green { background: linear-gradient(180deg, #43e97b, #27ae60); }
.bar-label { font-size: 11px; color: var(--text-muted); text-align: center; }

/* 折线占位 */
.line-chart-wrap {
  position: relative;
  height: 180px;
  width: 100%;
  overflow: hidden;
}
.line-chart-svg {
  width: 100%;
  height: 100%;
}

/* tab页签 */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  font-weight: 500;
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab-btn:hover { color: var(--primary-light); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 双色分割装饰 */
.hc-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 55%, var(--accent) 55%);
  border-radius: 2px;
  margin: 12px 0;
}

/* 工时卡 */
.workhour-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.workhour-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.workhour-name { font-size: 14px; font-weight: 600; color: var(--text-main); }
.workhour-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}
.workhour-unit { font-size: 12px; color: var(--text-muted); margin-left: 2px; }

/* 实施大纲步骤 */
.outline-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.outline-step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-num.done { background: #27ae60; }
.step-num.current { background: var(--accent); }
.step-content { flex: 1; }
.step-title { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }
.step-assignee { font-size: 12px; color: var(--text-muted); }

/* 版本历史 */
.version-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.version-tag {
  background: var(--primary-pale);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.version-desc { font-size: 13px; color: var(--text-main); }
.version-meta { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }

/* 收益绩效展示 */
.perf-summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.perf-block {
  flex: 1;
  min-width: 130px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.perf-block-val { font-size: 22px; font-weight: 700; color: var(--primary); }
.perf-block-label { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* 步骤条 */
.step-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  overflow-x: auto;
}
.step-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step-bar-item .s-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}
.step-bar-item.done .s-num { border-color: #27ae60; background: #27ae60; color: #fff; }
.step-bar-item.current .s-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-bar-item.active .s-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-bar-item .s-name { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.step-bar-item.done .s-name, .step-bar-item.current .s-name, .step-bar-item.active .s-name { color: var(--text-main); font-weight: 500; }
.step-bar-line { flex: 1; min-width: 24px; height: 2px; background: var(--border); }
.step-bar-line.done { background: var(--primary); }

/* ===== 盖章审核流程增强 ===== */
.step-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 0;
  overflow-x: auto;
}
.step-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  gap: 8px;
}
.step-bar-item .s-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}
.step-bar-item.done .s-num { border-color: #27ae60; background: #27ae60; color: #fff; }
.step-bar-item.current .s-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-bar-item.active .s-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-bar-item .s-name { font-size: 12px; color: var(--text-muted); white-space: nowrap; text-align: center; }
.step-bar-item.done .s-name, .step-bar-item.current .s-name, .step-bar-item.active .s-name { color: var(--text-main); font-weight: 500; }
.step-bar-line { flex: 1; min-width: 32px; height: 2px; background: var(--border); margin-top: 16px; }
.step-bar-line.done { background: var(--primary); }

/* 盖章预览 */
.seal-preview {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: #fafbff;
  cursor: pointer;
  transition: border-color 0.2s;
  padding: 20px;
}
.seal-preview:hover { border-color: var(--primary); background: var(--primary-pale); }
.seal-preview-icon { font-size: 32px; opacity: 0.5; }
.seal-preview-text { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.seal-preview-hint { font-size: 11px; color: #999; }

/* 审核状态标签 */
.tag-red { background: #ffebee; color: #c62828; }
.btn-green { background: #27ae60; color: #fff; border: none; }
.btn-green:hover { background: #219a52; }

/* 无权限提示 */
.no-permission {
  text-align: center;
  padding: 60px 20px;
}
.no-permission-icon { font-size: 64px; margin-bottom: 16px; }
.no-permission-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.no-permission-desc { font-size: 14px; color: var(--text-muted); }

/* 移动端适配 */
@media (max-width: 768px) {
  .step-bar {
    padding: 12px 0;
    justify-content: flex-start;
    gap: 0;
  }
  .step-bar-item {
    min-width: 60px;
  }
  .step-bar-item .s-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .step-bar-item .s-name {
    font-size: 10px;
  }
  .step-bar-line {
    min-width: 16px;
    margin-top: 14px;
  }
}
