/* MultiSelect 自定义多选下拉样式（ms- 前缀，与既有样式无冲突） */
.ms-wrap { position: relative; width: 100%; box-sizing: border-box; }
.ms-trigger {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ms-trigger:hover { border-color: #9ca3af; }
.ms-trigger.ms-open { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.ms-trigger-text { flex: 1; color: #9ca3af; }
.ms-trigger-text.ms-has-sel { color: #111827; }
.ms-trigger-count {
  background: #2563eb; color: #fff; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; line-height: 1.5; flex: 0 0 auto;
}
.ms-trigger-arrow { color: #6b7280; flex: 0 0 auto; }

.ms-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-height: 320px;
}
.ms-search-wrap { padding: 8px; border-bottom: 1px solid #e5e7eb; flex: 0 0 auto; }
.ms-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
}
.ms-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }

.ms-list {
  overflow-y: auto;
  max-height: 260px;
  padding: 4px 0;
}
.ms-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}
.ms-item:hover { background: #f3f4f6; }
.ms-item input[type="checkbox"] {
  margin: 0;
  pointer-events: none;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.ms-item.ms-checked { background: #eff6ff; }
.ms-item.ms-checked .ms-item-label { color: #1e40af; font-weight: 500; }
.ms-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-empty {
  padding: 16px;
  color: #9ca3af;
  text-align: center;
  font-size: 13px;
}
/* 只读模式：不展开、不可点，仅展示已选名单；灰底区分「只读」与「可编辑」 */
.ms-readonly .ms-trigger,
.ms-trigger-readonly {
  cursor: not-allowed;
  background: #f9fafb;
  border-color: #e5e7eb;
}
.ms-readonly .ms-trigger:hover { border-color: #d1d5db; }
.ms-readonly .ms-trigger-arrow { display: none; }
.ms-readonly .ms-trigger-text { white-space: normal; line-height: 1.5; }