/* ============================================================
   产品管理模块样式
   ============================================================ */

/* 筛选栏 */
.products-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.products-filter .form-input {
  min-width: 150px;
  flex: 0 1 auto;
}

/* 毛利 */
.margin-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  font-weight: 600;
}
.margin-cell .margin-pct {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}
.margin-pos { color: #16a34a; }
.margin-neg { color: #dc2626; }

/* 多中心小标记 */
.muted-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 8px;
  font-weight: 500;
}

/* 弹窗内合作中心供货价 */
.form-section {
  margin-top: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafbfc;
}
.form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  color: #334155;
}
.price-rows { display: flex; flex-direction: column; gap: 8px; }
.price-row {
  display: grid;
  grid-template-columns: 1fr 140px 90px 40px;
  gap: 8px;
  align-items: center;
}
.price-row .form-input { width: 100%; }
.price-row-head {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  padding-bottom: 2px;
}
.price-row-head .ph-small { text-align: center; }
.price-primary-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #475569;
  white-space: nowrap;
}
.price-remove { padding: 6px 8px; }

/* 暗色主题适配 */
.dark .form-section { background: #1e293b; border-color: #334155; }
.dark .form-section-head { color: #e2e8f0; }
.dark .muted-tag { background: #334155; color: #cbd5e1; }

/* ===== 服务管理：产品项目行 ===== */
.service-items { gap: 8px; }
.service-item-row {
  display: grid;
  grid-template-columns: 90px 150px 1fr 140px 1fr 90px 1fr 40px;
  gap: 8px;
  align-items: center;
}
.service-item-row .form-input { width: 100%; min-width: 0; }
.service-item-head {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  padding-bottom: 2px;
}
.service-item-head > span:last-child { text-align: center; }
.service-item-row .btn-danger-text { padding: 6px 8px; }

/* 服务列表涉及医院过长时换行 */
.services-table .text-center .badge-soft { margin: 0; }

@media (max-width: 1100px) {
  .service-item-row { grid-template-columns: 1fr 1fr; }
  .service-item-head { display: none; }
}
