/*
 * 自己做的下拉菜单（select.js）。负责人 2026-12-01：「像这些下拉菜单的前端做好看点，做丝滑点，要有下拉菜单的样子。」
 * 按钮长得和旁边的输入框一样（白底、细边、8px 圆角）；菜单是一张浮起来的白卡片，从按钮底下展开，淡入加一点点下移，
 * 鼠标到哪一项哪一项有底色，选中的那一项字是品牌蓝、右边一个勾。颜色只用品牌蓝和灰。
 */
.xs-native { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.xs-trigger { width: 100%; min-width: 0; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border: 1px solid #dfe1e6; border-radius: 8px; color: var(--text); background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color .14s ease, box-shadow .14s ease; }
.xs-trigger:hover:not(:disabled) { border-color: #c5c9d1; }
.xs-trigger:focus-visible, .xs-trigger.open { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 165, .1); }
.xs-trigger:disabled { color: #a9adb5; background: #f7f8fa; cursor: not-allowed; }
.xs-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-value.dim { color: #a0a4ac; }
.xs-caret { width: 16px; height: 16px; flex: none; fill: none; stroke: #8a8f99; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease, stroke .14s ease; }
.xs-trigger.open .xs-caret { transform: rotate(180deg); stroke: var(--blue); }

.xs-menu { position: fixed; z-index: 95; top: 0; left: 0; max-width: min(360px, calc(100vw - 16px)); padding: 6px; border: 1px solid #e6e8ec; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(20, 21, 28, .14), 0 2px 6px rgba(20, 21, 28, .06);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.xs-menu.up { transform: translateY(6px) scale(.98); transform-origin: bottom center; }
.xs-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.xs-search { padding: 2px 2px 6px; }
.xs-search input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid #e3e5ea; border-radius: 8px; color: var(--ink); background: #f7f8fa; font: inherit; font-size: 13.5px; transition: border-color .12s ease, background .12s ease; }
.xs-search input::placeholder { color: #a9adb5; }
.xs-search input:focus { outline: 0; border-color: var(--blue); background: #fff; }
.xs-list { max-height: 280px; overflow-y: auto; outline: 0; overscroll-behavior: contain; scrollbar-width: thin; }
.xs-option { min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 8px; color: var(--text); font-size: 14px; line-height: 20px; cursor: pointer; transition: background .1s ease, color .1s ease; }
.xs-option span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-option.active { background: #f1f7fb; }
.xs-option.on { color: var(--blue); font-weight: 500; }
.xs-option.off { color: #b4b8c0; cursor: not-allowed; }
.xs-check { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.xs-none { margin: 0; padding: 12px 10px; color: #9aa0aa; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .xs-menu, .xs-caret { transition: none; } }
/* 填写框里的下拉（客户档案的客户类别）矮一点，和旁边 36px 的输入框一样高 */
.cpc-form .xs-trigger { height: 36px; border-radius: 9px; border-color: #dcdfe5; }
/* 小浮窗里的下拉（销售人员） */
.cpv-quick .xs-trigger { height: 38px; }
