/* =============================================
   components.css — 各类 UI 组件样式
   KPI卡、进度条、成本格、联系人、单价档位、表格
   ============================================= */

/* ===========================
   KPI 卡片
   =========================== */
.kpi-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.kpi-card {
  background: rgba(0,120,255,0.06);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
/* 左侧彩色竖线 */
.kpi-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
}
.kpi-card.cyan::after   { background: var(--accent-cyan); }
.kpi-card.green::after  { background: var(--accent-green); }
.kpi-card.orange::after { background: var(--accent-orange); }
.kpi-card.purple::after { background: var(--accent-purple); }
.kpi-card.yellow::after { background: var(--accent-yellow); }
.kpi-card:hover {
  background: rgba(0,212,255,0.10);
  border-color: rgba(0,212,255,0.30);
  transform: translateX(3px);
}

/* 图标 */
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.kpi-icon.cyan   { background: rgba(0,212,255,0.15); color: var(--accent-cyan); }
.kpi-icon.green  { background: rgba(0,255,157,0.15); color: var(--accent-green); }
.kpi-icon.orange { background: rgba(255,140,0,0.15);  color: var(--accent-orange); }
.kpi-icon.purple { background: rgba(157,78,221,0.15); color: var(--accent-purple); }
.kpi-icon.yellow { background: rgba(255,215,0,0.15);  color: var(--accent-yellow); }

/* 文字信息 */
.kpi-info  { flex: 1; }
.kpi-label { font-size: 11px; color: var(--text-secondary); letter-spacing: 1px; margin-bottom: 4px; }
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-value.cyan   { color: var(--accent-cyan); }
.kpi-value.green  { color: var(--accent-green); }
.kpi-value.orange { color: var(--accent-orange); }
.kpi-value.purple { color: var(--accent-purple); }
.kpi-value.yellow { color: var(--accent-yellow); }
.kpi-unit { font-size: 12px; margin-left: 2px; color: var(--text-secondary); }

/* ===========================
   小型收益卡（右侧面板 2×2）
   =========================== */
.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.mini-card {
  border-radius: var(--radius-btn);
  padding: 12px;
  text-align: center;
}
.mini-card-label { font-size: 10px; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 1px; }
.mini-card-value { font-size: 20px; font-weight: 700; }

/* ===========================
   进度条
   =========================== */
.progress-item { margin-bottom: 14px; }
.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.progress-header span:last-child { color: var(--accent-cyan); font-weight: 600; }
.progress-bar-bg {
  height: 6px;
  background: rgba(0,80,120,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  position: relative;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: white;
  box-shadow: 0 0 6px white;
  animation: glowTip 2s infinite;
}
@keyframes glowTip {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.progress-bar-fill.cyan   { background: linear-gradient(90deg, var(--accent-blue),  var(--accent-cyan)); }
.progress-bar-fill.green  { background: linear-gradient(90deg, #009f60,             var(--accent-green)); }
.progress-bar-fill.orange { background: linear-gradient(90deg, #cc5500,             var(--accent-orange)); }
.progress-bar-fill.purple { background: linear-gradient(90deg, #5a00a0,             var(--accent-purple)); }

/* ===========================
   成本分解格
   =========================== */
.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: calc(100% - 50px);
}
.cost-item {
  background: rgba(0,40,80,0.5);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-btn);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}
.cost-item:hover {
  border-color: rgba(0,212,255,0.3);
  background: rgba(0,80,160,0.2);
}
.cost-item i { font-size: 20px; }
.cost-name { font-size: 11px; color: var(--text-secondary); letter-spacing: 1px; }
.cost-val  { font-size: 18px; font-weight: 700; }
.cost-sub  { font-size: 10px; color: var(--text-secondary); }

/* ===========================
   单价档位列表
   =========================== */
.tier-section-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.tier-section-label i { color: var(--accent-cyan); margin-right: 4px; }
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0,40,80,0.3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
  font-size: 13px;
}
.tier-item i { color: var(--accent-yellow); font-size: 14px; }
.tier-range  { color: var(--text-secondary); flex: 1; }
.tier-price  { color: var(--accent-green); font-weight: 700; font-size: 16px; }
.tier-price .unit { font-size: 11px; color: var(--text-secondary); }

/* ===========================
   联系人卡片
   =========================== */
.contact-section-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.contact-section-label i { color: var(--accent-purple); margin-right: 4px; }
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0,40,80,0.4);
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-dim);
  transition: all 0.3s;
}
.contact-item:hover {
  border-color: rgba(0,212,255,0.25);
  background: rgba(0,80,160,0.15);
}
.contact-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.contact-info  { flex: 1; }
.contact-name  { font-size: 14px; font-weight: 600; }
.contact-role  { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.contact-phone { font-size: 12px; color: var(--accent-cyan); letter-spacing: 1px; }

/* ===========================
   每日明细数据表
   =========================== */
.table-scroll { overflow-y: auto; height: calc(100% - 50px); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table thead th {
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  padding: 6px 8px;
  background: rgba(0,120,180,0.1);
  border-bottom: 1px solid var(--border-dim);
  letter-spacing: 1px;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table tbody td {
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,80,120,0.15);
  color: var(--text-primary);
  transition: background 0.2s;
}
.data-table tbody tr:hover td { background: rgba(0,212,255,0.06); }
/* 颜色辅助类 */
.col-highlight { color: var(--accent-cyan);   font-weight: 600; }
.col-warn      { color: var(--accent-orange); }
.col-good      { color: var(--accent-green);  }
.col-purple    { color: var(--accent-purple); }
.col-yellow    { color: var(--accent-yellow); }
