/* 基础设置 */
html,
body {
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1f2937; /* Gray-800 */
}

/* 自定义滚动条 - 更柔和 */
.scrollable-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollable-list::-webkit-scrollbar-thumb {
  background-color: #e5e7eb; /* Gray-200 */
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.scrollable-list::-webkit-scrollbar-thumb:hover {
  background-color: #ff7f32; /* Brand Orange */
}
.scrollable-list::-webkit-scrollbar-track {
  background-color: transparent;
}

/* 左侧物料列表选中项样式 - 更清晰 */
#materialList li {
  /* 增加边框用于占位，防止hover时抖动 */
  border: 1px solid transparent;
}

#materialList li:hover {
  background-color: #f9fafb;
  border-color: #f3f4f6;
}

#materialList li.active {
  background-color: #fff7ed; /* Orange-50 */
  border-color: #ffedd5; /* Orange-100 */
  box-shadow: 0 1px 2px 0 rgba(255, 127, 50, 0.05);
}

#materialList li.active span:first-child {
  color: #c2410c; /* Orange-700 */
}

/* 搜索高亮 - 更醒目 */
.search-highlight {
  background-color: #ffedd5; /* Orange-100 */
  color: #c2410c; /* Orange-700 */
  border-radius: 2px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* BOM树样式 - 连接线更细 */
.bom-tree .item {
  position: relative;
  padding-left: 24px;
  margin-top: 2px;
}

.bom-tree .item {
  border-left: 1px dashed #e5e7eb; /* Gray-200 dashed */
}

.bom-tree .item::before {
  content: "";
  position: absolute;
  top: 18px; /* Align with center of row */
  left: 0;
  width: 14px;
  height: 1px;
  border-top: 1px dashed #e5e7eb;
}

.bom-tree .item:last-child {
  border-left-color: transparent;
}

/* Tag Input 样式 */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  transition: all 0.2s;
}

.tag-input-container:focus-within {
  border-color: #ff7f32;
  box-shadow: 0 0 0 3px rgba(255, 127, 50, 0.1);
}

.tag-pill {
  display: flex;
  align-items: center;
  background-color: #fff7ed; /* Orange-50 */
  color: #c2410c; /* Orange-700 */
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #ffedd5;
}

.tag-pill-remove {
  margin-left: 6px;
  color: #fb923c;
  cursor: pointer;
  font-weight: bold;
}
.tag-pill-remove:hover {
  color: #c2410c;
}

.tag-input-field {
  flex-grow: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 2px;
  font-size: 0.95rem;
  min-width: 80px;
}

/* Sticky Header Customization */
thead th.sticky {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
