/*
 * 模块说明：自动回复与谈判 · 交互原型 · antd 风格设计系统（纯 CSS，无依赖）
 * 参照 Ant Design 5 视觉规范：主色 #1677ff、圆角 6px、间距 8 栅格、
 * 表格/标签/按钮/弹窗/抽屉/时间线/统计卡等常用组件的高保真复刻。
 * 仅用于原型演示，不进入生产代码。
 */

/* ========== 基础 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  background: #f5f5f5;
  -webkit-font-smoothing: antialiased;
}
a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }
::selection { background: #1677ff; color: #fff; }

/* ========== 整体布局（侧栏视觉对齐现有系统 frontend/src/components/Sidebar.tsx）==========
 * 对齐要点：220px 白底 / 顶部 46px 品牌栏（HOTCLAW 加宽字距）/ 菜单项 h-40 圆角 6px /
 * 选中态 = 品牌色 hsl(229 84% 56%) 10% 淡底 + 品牌字色 / 分组手风琴（chevron 旋转、
 * 含 active 子项时组头左侧 2px 品牌指示条）/ 子项缩进 36px / lucide 18px 描边图标
 */
:root {
  --brand: hsl(229 84% 56%);
  --brand-soft: hsl(229 84% 56% / 0.1);
  --zinc-100: #f4f4f5; --zinc-200: #e4e4e7; --zinc-400: #a1a1aa;
  --zinc-500: #71717a; --zinc-600: #52525b; --zinc-900: #18181b;
}
.layout { display: flex; min-height: 100vh; }
.sider {
  width: 220px; flex: none; background: #fff;
  border-right: 1px solid var(--zinc-200);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.sider-brand {
  height: 46px; flex: none; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; border-bottom: 1px solid var(--zinc-200);
}
.sider-brand .brand-toggle {
  width: 36px; height: 36px; border-radius: 6px; border: none; background: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--zinc-600);
}
.sider-brand .brand-toggle:hover { background: var(--zinc-100); }
.sider-brand .brand-text {
  font-weight: 700; font-size: 14px; letter-spacing: 0.12em; color: var(--zinc-900);
}
.sider-brand .brand-proto {
  margin-left: auto; font-size: 10px; color: #d46b08; background: #fff7e6;
  border: 1px solid #ffd591; border-radius: 4px; padding: 0 4px; line-height: 16px;
  white-space: nowrap;
}
.menu {
  padding: 12px 8px; display: flex; flex-direction: column; gap: 4px;
  flex: 1; overflow-y: auto;
}
.menu-item {
  display: flex; align-items: center; gap: 12px; height: 40px; flex: none;
  padding: 0 12px; border-radius: 6px; border: none; background: none;
  color: var(--zinc-600); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background 0.15s, color 0.15s; text-align: left; width: 100%;
  font-family: inherit; text-decoration: none;
}
.menu-item svg { width: 18px; height: 18px; flex: none; }
.menu-item .menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item:hover { background: var(--zinc-100); color: var(--zinc-900); }
.menu-item.active { background: var(--brand-soft); color: var(--brand); }
.menu-item.placeholder { color: var(--zinc-400); }
.menu-item.placeholder:hover { background: var(--zinc-100); color: var(--zinc-500); }
.menu-item .menu-badge {
  background: #ff4d4f; color: #fff; border-radius: 10px; flex: none;
  font-size: 11px; line-height: 16px; min-width: 16px; padding: 0 5px;
  text-align: center; font-weight: 500;
}
/* 分组（手风琴）：组头 + 可折叠子项容器 */
.menu-group-header {
  display: flex; align-items: center; gap: 12px; height: 40px; flex: none;
  padding: 0 12px 0 10px; border-radius: 6px; border: none; background: none;
  border-left: 2px solid transparent;
  color: var(--zinc-600); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background 0.15s, color 0.15s; width: 100%; text-align: left;
  font-family: inherit;
}
.menu-group-header svg { width: 18px; height: 18px; flex: none; }
.menu-group-header:hover { background: var(--zinc-100); color: var(--zinc-900); }
.menu-group-header .menu-label { flex: 1; }
.menu-group-header .chevron { width: 16px; height: 16px; transition: transform 0.2s ease-out; }
.menu-group.open .menu-group-header .chevron { transform: rotate(90deg); }
.menu-group.contains-active .menu-group-header { border-left-color: var(--brand); }
.menu-children {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.22s ease-out, opacity 0.22s ease-out;
  display: flex; flex-direction: column; gap: 4px;
}
.menu-group.open .menu-children { max-height: 520px; opacity: 1; padding-top: 4px; }
.menu-children .menu-item { padding-left: 36px; }
.menu-children .menu-item svg { width: 16px; height: 16px; }
/* 底部：主题切换 + 用户区（对齐现有系统底部区） */
.sider-footer {
  flex: none; border-top: 1px solid var(--zinc-200); padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.sider-footer .user-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
}
.sider-footer .user-row .user-name { font-size: 13px; font-weight: 500; color: var(--zinc-900); }
.sider-footer .user-row .user-role { font-size: 11px; color: var(--zinc-500); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header {
  height: 56px; background: #fff; flex: none;
  border-bottom: 1px solid rgba(5, 5, 5, 0.06);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 90;
}
.header .page-title { font-size: 16px; font-weight: 600; }
.header .page-module { font-size: 12px; color: rgba(0,0,0,0.45); }
.header .spacer { flex: 1; }
.header .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #87d068;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
}
.content { padding: 20px 24px 48px; flex: 1; }

/* ========== 卡片 ========== */
.card {
  background: #fff; border-radius: 8px; border: 1px solid rgba(5, 5, 5, 0.06);
  margin-bottom: 16px;
}
.card-head {
  padding: 12px 20px; border-bottom: 1px solid rgba(5, 5, 5, 0.06);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-extra { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 20px; }
.card-body.p0 { padding: 0; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 15px; border-radius: 6px; font-size: 14px;
  border: 1px solid #d9d9d9; background: #fff; color: rgba(0, 0, 0, 0.88);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  font-family: inherit;
}
.btn:hover { border-color: #4096ff; color: #4096ff; }
.btn-primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.btn-primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.btn-danger:hover { color: #ff7875; border-color: #ff7875; }
.btn-danger-solid { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.btn-danger-solid:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.btn-sm { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 4px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-link { border: none; background: none; color: #1677ff; padding: 0 4px; height: auto; }
.btn-link:hover { color: #4096ff; border: none; }
.btn-link.danger { color: #ff4d4f; } .btn-link.danger:hover { color: #ff7875; }
.btn[disabled], .btn.disabled {
  color: rgba(0,0,0,0.25); background: rgba(0,0,0,0.04);
  border-color: #d9d9d9; cursor: not-allowed;
}

/* ========== 标签 Tag ========== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 7px; height: 22px; border-radius: 4px; font-size: 12px;
  border: 1px solid #d9d9d9; background: #fafafa; color: rgba(0, 0, 0, 0.88);
  white-space: nowrap; line-height: 20px;
}
.tag-blue    { color: #1677ff; background: #e6f4ff; border-color: #91caff; }
.tag-geekblue{ color: #2f54eb; background: #f0f5ff; border-color: #adc6ff; }
.tag-green   { color: #52c41a; background: #f6ffed; border-color: #b7eb8f; }
.tag-red     { color: #ff4d4f; background: #fff2f0; border-color: #ffccc7; }
.tag-orange  { color: #fa8c16; background: #fff7e6; border-color: #ffd591; }
.tag-gold    { color: #d48806; background: #fffbe6; border-color: #ffe58f; }
.tag-purple  { color: #722ed1; background: #f9f0ff; border-color: #d3adf7; }
.tag-cyan    { color: #08979c; background: #e6fffb; border-color: #87e8de; }
.tag-magenta { color: #c41d7f; background: #fff0f6; border-color: #ffadd2; }
.tag-volcano { color: #d4380d; background: #fff2e8; border-color: #ffbb96; }
.tag-gray    { color: rgba(0,0,0,0.65); background: #fafafa; border-color: #d9d9d9; }

/* 待定/待确认 醒目标注 */
.tbd {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600;
  color: #d46b08; background: #fff7e6; border: 1px dashed #ffa940;
  white-space: nowrap;
}
.tbd::before { content: "⚠ 待定"; font-weight: 700; }
.tbd-block {
  border: 1px dashed #ffa940; background: #fffbe6; border-radius: 6px;
  padding: 10px 14px; margin: 8px 0; font-size: 13px; color: #874d00;
  line-height: 1.7;
}
.tbd-block strong { color: #d46b08; }
.tbd-block::before { content: "⚠ 待定 / 待确认"; display: block; font-weight: 700; color: #d46b08; margin-bottom: 2px; }

/* ========== 徽标 Badge ========== */
.badge-dot { display: inline-flex; align-items: center; gap: 6px; }
.badge-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #d9d9d9; flex: none;
}
.badge-dot.processing::before { background: #1677ff; }
.badge-dot.success::before { background: #52c41a; }
.badge-dot.error::before { background: #ff4d4f; }
.badge-dot.warning::before { background: #faad14; }
.badge-dot.default::before { background: #d9d9d9; }
.badge-dot.purple::before { background: #722ed1; }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  background: #fafafa; text-align: left; font-weight: 600;
  padding: 11px 16px; border-bottom: 1px solid #f0f0f0;
  color: rgba(0, 0, 0, 0.88); white-space: nowrap;
}
.table td {
  padding: 11px 16px; border-bottom: 1px solid #f0f0f0; vertical-align: middle;
}
.table tr:hover td { background: #fafafa; }
.table tr.row-danger td { background: #fff2f0; }
.table tr.row-danger:hover td { background: #ffece8; }
.table tr.row-top td { background: #fffbe6; }
.table tr.row-top:hover td { background: #fff7db; }
.table .cell-sub { font-size: 12px; color: rgba(0,0,0,0.45); margin-top: 2px; }
.table .num { font-variant-numeric: tabular-nums; }

/* ========== 表单 ========== */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.form-item { margin-bottom: 16px; }
.form-item .label {
  display: block; margin-bottom: 6px; font-size: 14px; color: rgba(0,0,0,0.88);
}
.form-item .label .required::before { content: "* "; color: #ff4d4f; }
.form-item .help { font-size: 12px; color: rgba(0,0,0,0.45); margin-top: 4px; line-height: 1.6; }
.input, .select, .textarea {
  width: 100%; padding: 5px 11px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; height: 32px;
  color: rgba(0,0,0,0.88); transition: border-color 0.2s; outline: none;
}
.input:hover, .select:hover, .textarea:hover { border-color: #4096ff; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #1677ff; box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}
.input[disabled], .input[readonly].locked {
  background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.45); cursor: not-allowed;
}
.textarea { height: auto; min-height: 80px; line-height: 1.7; resize: vertical; }
.input-sm { height: 24px; padding: 1px 7px; font-size: 13px; border-radius: 4px; }
.input-w-sm { width: 90px; }
.input-w-md { width: 160px; }
.input-w-lg { width: 280px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; cursor: pointer; }

/* 开关 Switch */
.switch {
  width: 40px; height: 22px; border-radius: 11px; background: rgba(0,0,0,0.25);
  position: relative; cursor: pointer; transition: background 0.2s; border: none;
  flex: none; display: inline-block; vertical-align: middle;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch.on { background: #1677ff; }
.switch.on::after { left: 20px; }
.switch.locked { opacity: 0.6; cursor: not-allowed; }
.switch-sm { width: 32px; height: 18px; border-radius: 9px; }
.switch-sm::after { width: 14px; height: 14px; }
.switch-sm.on::after { left: 16px; }

/* 分段控制器 Segmented（话术三态等） */
.seg { display: inline-flex; background: rgba(0,0,0,0.04); border-radius: 6px; padding: 2px; }
.seg .seg-item {
  padding: 3px 12px; border-radius: 4px; font-size: 13px; cursor: pointer;
  color: rgba(0,0,0,0.65); transition: all 0.2s; white-space: nowrap;
}
.seg .seg-item.active { background: #fff; color: rgba(0,0,0,0.88); box-shadow: 0 1px 2px rgba(0,0,0,0.1); font-weight: 500; }
.seg .seg-item.active.danger { color: #ff4d4f; }
.seg .seg-item.active.warn { color: #fa8c16; }
.seg .seg-item.active.ok { color: #1677ff; }

/* ========== 标签页 Tabs ========== */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid #f0f0f0; padding: 0 20px; overflow-x: auto; }
.tabs .tab {
  padding: 12px 2px; cursor: pointer; font-size: 14px; color: rgba(0,0,0,0.65);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs .tab:hover { color: #1677ff; }
.tabs .tab.active { color: #1677ff; font-weight: 500; border-bottom-color: #1677ff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ========== 统计卡 Statistic ========== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid rgba(5,5,5,0.06); border-radius: 8px;
  padding: 16px 20px;
}
.stat .stat-label { font-size: 13px; color: rgba(0,0,0,0.45); margin-bottom: 6px; }
.stat .stat-value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .stat-value .unit { font-size: 14px; font-weight: 400; color: rgba(0,0,0,0.45); margin-left: 4px; }
.stat .stat-foot { font-size: 12px; color: rgba(0,0,0,0.45); margin-top: 8px; }
.stat .up { color: #52c41a; } .stat .down { color: #ff4d4f; }

/* 迷你条形图 / 分布条 */
.bar-list .bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-list .bar-label { width: 110px; flex: none; font-size: 13px; color: rgba(0,0,0,0.65); text-align: right; }
.bar-list .bar-track { flex: 1; height: 16px; background: #f5f5f5; border-radius: 4px; overflow: hidden; }
.bar-list .bar-fill { height: 100%; background: #1677ff; border-radius: 4px; min-width: 2px; }
.bar-list .bar-value { width: 56px; flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 进度条 */
.progress { height: 8px; background: #f5f5f5; border-radius: 4px; overflow: hidden; }
.progress .progress-fill { height: 100%; background: #1677ff; border-radius: 4px; }

/* ========== 警告框 Alert ========== */
.alert {
  padding: 9px 14px; border-radius: 6px; font-size: 13px; line-height: 1.7;
  margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start;
}
.alert .alert-icon { flex: none; font-weight: 700; }
.alert-info    { background: #e6f4ff; border: 1px solid #91caff; color: rgba(0,0,0,0.88); }
.alert-info .alert-icon { color: #1677ff; }
.alert-warning { background: #fffbe6; border: 1px solid #ffe58f; }
.alert-warning .alert-icon { color: #faad14; }
.alert-error   { background: #fff2f0; border: 1px solid #ffccc7; }
.alert-error .alert-icon { color: #ff4d4f; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; }
.alert-success .alert-icon { color: #52c41a; }

/* ========== 描述列表 Descriptions ========== */
.desc { display: grid; grid-template-columns: auto 1fr; gap: 0; border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; }
.desc .desc-label {
  background: #fafafa; padding: 10px 16px; font-size: 13px; color: rgba(0,0,0,0.45);
  border-bottom: 1px solid #f0f0f0; white-space: nowrap;
}
.desc .desc-value { padding: 10px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.desc .desc-label:nth-last-child(2), .desc .desc-value:last-child { border-bottom: none; }
.desc-plain { border: none; }
.desc-plain .desc-label { background: none; border: none; padding: 5px 12px 5px 0; }
.desc-plain .desc-value { border: none; padding: 5px 0; }

/* ========== 时间线 Timeline ========== */
.timeline { list-style: none; padding-left: 0; }
.timeline .tl-item { position: relative; padding: 0 0 20px 26px; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px;
  width: 2px; background: #f0f0f0;
}
.timeline .tl-item:last-child::before { display: none; }
.timeline .tl-dot {
  position: absolute; left: 0; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid #1677ff;
}
.timeline .tl-dot.green { border-color: #52c41a; }
.timeline .tl-dot.red { border-color: #ff4d4f; }
.timeline .tl-dot.orange { border-color: #fa8c16; }
.timeline .tl-dot.gray { border-color: #d9d9d9; }
.timeline .tl-dot.purple { border-color: #722ed1; }
.timeline .tl-time { font-size: 12px; color: rgba(0,0,0,0.45); margin-bottom: 2px; }
.timeline .tl-title { font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline .tl-body { font-size: 13px; color: rgba(0,0,0,0.65); line-height: 1.7; }

/* 邮件气泡（时间线内） */
.mail-bubble {
  border: 1px solid #f0f0f0; border-radius: 8px; padding: 10px 14px;
  background: #fafafa; margin-top: 6px; font-size: 13px; line-height: 1.7;
}
.mail-bubble.ours { background: #e6f4ff; border-color: #bae0ff; }
.mail-bubble .mail-meta { font-size: 12px; color: rgba(0,0,0,0.45); margin-bottom: 4px; }
.mail-bubble .mail-subject { font-weight: 600; margin-bottom: 4px; }
.mail-bubble em.hl { background: #fff1b8; font-style: normal; padding: 0 2px; border-radius: 2px; }
.mail-bubble .amount-lock {
  background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322;
  border-radius: 3px; padding: 0 3px; font-weight: 600; font-style: normal;
}

/* 可展开面板（AI 出价依据等） */
.expander { border: 1px solid #f0f0f0; border-radius: 8px; margin-top: 8px; overflow: hidden; }
.expander > summary {
  padding: 8px 14px; background: #fafafa; cursor: pointer; font-size: 13px;
  font-weight: 500; color: #1677ff; list-style: none; user-select: none;
}
.expander > summary::before { content: "▸ "; }
.expander[open] > summary::before { content: "▾ "; }
.expander .expander-body { padding: 12px 14px; font-size: 13px; line-height: 1.8; border-top: 1px solid #f0f0f0; }
.calc-line { display: flex; gap: 8px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.calc-line .calc-k { color: rgba(0,0,0,0.45); width: 170px; flex: none; }
.calc-line .calc-v { font-weight: 500; }

/* ========== 弹窗 Modal / 抽屉 Drawer ========== */
.mask {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1000; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 60px 16px;
}
.mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 8px; width: 640px; max-width: 100%;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12); animation: modalIn 0.18s ease;
}
.modal.modal-lg { width: 880px; }
.modal.modal-sm { width: 440px; }
@keyframes modalIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 14px 20px; font-size: 15px; font-weight: 600;
  display: flex; align-items: center;
}
.modal-head .modal-close { margin-left: auto; cursor: pointer; color: rgba(0,0,0,0.45); font-size: 16px; background: none; border: none; padding: 4px; }
.modal-head .modal-close:hover { color: rgba(0,0,0,0.88); }
.modal-body { padding: 4px 20px 8px; max-height: 65vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.drawer-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; }
.drawer-mask.open { display: block; }
.drawer {
  position: fixed; top: 0; right: -760px; width: 720px; max-width: 92vw;
  height: 100vh; background: #fff; z-index: 1001;
  box-shadow: -6px 0 16px rgba(0,0,0,0.08); transition: right 0.25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.drawer-head {
  padding: 14px 20px; border-bottom: 1px solid #f0f0f0; font-size: 15px;
  font-weight: 600; display: flex; align-items: center; gap: 8px; flex: none;
}
.drawer-head .modal-close { margin-left: auto; cursor: pointer; color: rgba(0,0,0,0.45); font-size: 16px; background: none; border: none; padding: 4px; }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid #f0f0f0; display: flex; gap: 8px; justify-content: flex-end; flex: none; }

/* ========== 筛选栏 ========== */
.filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
}
.filter-bar .filter-label { font-size: 13px; color: rgba(0,0,0,0.45); }
.filter-bar .select, .filter-bar .input { width: auto; min-width: 130px; }

/* ========== 分页（静态） ========== */
.pagination { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 20px; align-items: center; }
.pagination .page-info { font-size: 13px; color: rgba(0,0,0,0.45); margin-right: auto; }
.pagination .page-btn {
  min-width: 30px; height: 30px; border: 1px solid #d9d9d9; border-radius: 6px;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
}
.pagination .page-btn.active { border-color: #1677ff; color: #1677ff; font-weight: 500; }

/* ========== 空状态 ========== */
.empty { text-align: center; padding: 40px 0; color: rgba(0,0,0,0.25); font-size: 13px; }
.empty::before { content: "◫"; display: block; font-size: 34px; margin-bottom: 8px; }

/* ========== 阶段漏斗（十二阶段） ========== */
.stage-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.stage-cell {
  flex: 1; min-width: 96px; border: 1px solid #f0f0f0; border-radius: 8px;
  padding: 10px 12px; cursor: pointer; transition: all 0.2s; background: #fff;
}
.stage-cell:hover { border-color: #91caff; box-shadow: 0 2px 8px rgba(22,119,255,0.08); }
.stage-cell.active { border-color: #1677ff; background: #e6f4ff; }
.stage-cell .stage-name { font-size: 12px; color: rgba(0,0,0,0.65); white-space: nowrap; }
.stage-cell .stage-count { font-size: 22px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stage-cell.final .stage-name::after { content: " 🔒"; font-size: 10px; }

/* ========== 工具类 ========== */
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.text-secondary { color: rgba(0,0,0,0.45); }
.text-danger { color: #ff4d4f; }
.text-success { color: #52c41a; }
.text-warning { color: #fa8c16; }
.text-sm { font-size: 12px; }
.fw500 { font-weight: 500; } .fw600 { font-weight: 600; }
.mono { font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.92em; }
.nowrap { white-space: nowrap; }
.w50 { width: 50%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.divider { height: 1px; background: #f0f0f0; margin: 16px 0; border: none; }
.avatar-sm {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
}
