/* ============================================
 * cost.css - 成本分析模块样式
 * 作用域：.cost-overview 及其子元素
 * ============================================ */

/* ---- 概览区域 ---- */
.cost-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
}

/* ---- 预算对比区域 ---- */
.budget-compare {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 预算条轨道 */
.budget-bar-track {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* 预算条填充 */
.budget-bar {
  height: 100%;
  border-radius: 12px;
  transition: width 0.6s ease;
  position: relative;
}

/* 预算条内标签 */
.budget-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary, #cbd5e1);
}

/* 剩余预算文字 */
.budget-remaining {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---- 费用分类饼图区域 ---- */
.category-chart {
  text-align: center;
  padding: 16px;
}

/* ---- EVM指标网格 ---- */
.evm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* EVM指标卡片 */
.evm-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 6px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s;
}

/* EVM数值 */
.evm-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  color: var(--neon-cyan, #00f0ff);
  line-height: 1.3;
}

/* EVM标签 */
.evm-label {
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
  white-space: nowrap;
}

/* 负值状态：红色高亮 */
.evm-card.negative {
  border-color: rgba(248, 113, 113, 0.2);
}

.evm-card.negative .evm-value {
  color: var(--danger, #f87171);
}

/* ---- 成本记录列表 ---- */
.cost-list {
  display: flex;
  flex-direction: column;
}

/* 成本记录项 */
.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}

.cost-item:last-child {
  border-bottom: none;
}

/* 左侧信息 */
.cost-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* 分类标签 */
.cost-item-category {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid;
  line-height: 1.6;
  width: fit-content;
}

/* 人工=青色 */
.cost-item-category[style*="22d3ee"] {
  background: rgba(34, 211, 238, 0.1);
}

/* 材料=紫色 */
.cost-item-category[style*="a855f7"] {
  background: rgba(168, 85, 247, 0.1);
}

/* 设备=黄色 */
.cost-item-category[style*="fbbf24"] {
  background: rgba(251, 191, 36, 0.1);
}

/* 其他=灰色 */
.cost-item-category[style*="6b7280"] {
  background: rgba(107, 114, 128, 0.1);
}

/* 描述文字 */
.cost-item-desc {
  font-size: 0.78rem;
  color: var(--text-secondary, #cbd5e1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧金额与日期 */
.cost-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

/* 金额 */
.cost-item-amount {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

/* 日期 */
.cost-item-date {
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
}
