/* 线索管家 · 样式表 */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #46586e;
  --ink-3: #8b9bb0;
  --line: #e6ebf2;
  --line-2: #eef2f7;
  --primary: #0d9488;
  --primary-d: #0b7c72;
  --primary-l: #e6f7f4;
  --primary-l2: #f0fbf9;
  --amber: #f59e0b;
  --amber-l: #fef6e7;
  --red: #e5484d;
  --red-l: #fdeeee;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  overflow: hidden;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
::selection { background: #b8ece5; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: -.5px;
  box-shadow: 0 3px 10px rgba(13, 148, 136, .3);
}
.brand-text b { display: block; font-size: 14.5px; letter-spacing: .2px; }
.brand-text span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: background .14s, color .14s;
  position: relative;
}
.nav-item:hover { background: var(--line-2); color: var(--ink); }
.nav-item.active { background: var(--primary-l); color: var(--primary-d); font-weight: 600; }
.nav-item .ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav-item.active .ico { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 600; display: grid; place-items: center;
}

.side-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line-2); }
.side-stat { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); padding: 3px 0; }
.side-stat b { color: var(--ink-2); font-weight: 600; }

/* ---------------- 主区 ---------------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 62px; flex: 0 0 62px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px; z-index: 15;
}

.quick {
  flex: 1; max-width: 720px; position: relative;
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; height: 38px; padding: 0 4px 0 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.quick:focus-within {
  background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}
.quick .spark { width: 15px; height: 15px; color: var(--primary); flex: 0 0 15px; }
.quick input {
  flex: 1; border: none; background: none; height: 100%;
  padding: 0 8px; font-size: 13.5px;
}
.quick input::placeholder { color: var(--ink-3); }
.quick-btn {
  height: 30px; padding: 0 13px; border-radius: 7px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.quick-btn:hover { background: var(--primary-d); }
.quick-btn:disabled { opacity: .5; cursor: default; }
.kbd {
  font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 0 4px;
  margin-right: 6px; background: #fff;
}

.parse-hint {
  position: absolute; top: 46px; left: 0; right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 10px 12px; font-size: 12.5px; color: var(--ink-2);
  display: none; z-index: 50;
}
.parse-hint.show { display: block; }
.parse-hint .ph-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.parse-chip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--primary-l); color: var(--primary-d); font-weight: 500;
}
.parse-chip.warn { background: var(--amber-l); color: #b45309; }

.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.user-box { display: flex; align-items: center; gap: 6px; }
.user-box #btnUser { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-num { text-align: right; line-height: 1.25; }
.today-num small { display: block; font-size: 11px; color: var(--ink-3); }
.today-num b { font-size: 15px; font-variant-numeric: tabular-nums; }

.view { flex: 1; overflow-y: auto; padding: 22px 24px 60px; }
.view::-webkit-scrollbar { width: 10px; }
.view::-webkit-scrollbar-thumb { background: #d5dee8; border-radius: 6px; border: 3px solid var(--bg); }
.view::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 通用组件 ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 20px; font-weight: 650; letter-spacing: -.3px; }
.page-head p { font-size: 12.5px; color: var(--ink-3); padding-bottom: 2px; }
.page-head .spacer { flex: 1; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 13.5px; font-weight: 620; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 14px 16px 16px; }
/* 内容比同排卡片矮时，让卡片撑满并纵向居中，避免大片空白 */
.card-flex { display: flex; flex-direction: column; }
.card-flex .card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.grid { display: grid; gap: 14px; }
.g-kpi { grid-template-columns: repeat(4, 1fr); }
.g-2 { grid-template-columns: 1.35fr 1fr; }
.g-2e { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) {
  .g-kpi, .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-2, .g-3, .g-2e { grid-template-columns: 1fr; }
}

.kpi {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px 14px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent, var(--primary)); opacity: .85;
}
.kpi-label { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi-val {
  font-size: 29px; font-weight: 640; letter-spacing: -1px;
  margin-top: 5px; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi-val small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.kpi-foot em { font-style: normal; color: var(--primary-d); font-weight: 600; }
.kpi-foot em.warn { color: #b45309; }
.kpi-foot em.bad { color: var(--red); }

.btn {
  height: 32px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 550; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .14s; white-space: nowrap;
}
.btn:hover { border-color: #cbd6e2; background: #fafbfc; color: var(--ink); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 27px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--red); border-color: #f6d5d6; }
.btn.danger:hover { background: var(--red-l); }
.btn svg { width: 14px; height: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px; border-radius: 11px;
  font-size: 11.5px; font-weight: 550; white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }

.tag-src {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
}

/* ---------------- 筛选栏 ---------------- */
.filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-box {
  display: flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  height: 33px; padding: 0 11px; min-width: 230px;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.09); }
.search-box svg { width: 14px; height: 14px; color: var(--ink-3); flex: 0 0 14px; }
.search-box input { border: none; background: none; flex: 1; font-size: 13px; }
select.sel {
  height: 33px; padding: 0 28px 0 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9bb0' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  font-size: 13px; appearance: none; -webkit-appearance: none; color: var(--ink-2);
  cursor: pointer;
}
select.sel:focus { border-color: var(--primary); }

/* ---------------- 表格 ---------------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  padding: 10px 14px; background: #fafbfd; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .2px;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: #fafcfd; }
tbody tr:last-child td { border-bottom: none; }
.cell-name { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 29px; height: 29px; border-radius: 8px; flex: 0 0 29px;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 650;
  background: var(--primary-l); color: var(--primary-d);
}
.cell-name b { font-weight: 570; display: block; line-height: 1.3; }
.cell-name span { font-size: 11.5px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.empty {
  padding: 56px 20px; text-align: center; color: var(--ink-3); font-size: 13px;
}
.empty svg { width: 38px; height: 38px; opacity: .3; margin-bottom: 10px; }

/* ---------------- 看板 ---------------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1080px) { .kanban { grid-template-columns: 1fr; } }
.kcol {
  background: #f9fbfc; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 200px;
}
.kcol-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.kcol-head h4 { font-size: 13px; font-weight: 620; }
.kcol-head .cnt {
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 7px; height: 19px; display: grid; place-items: center;
}
.kcol.danger { background: #fffaf9; border-color: #fbdfd8; }
.kcol.danger .kcol-head { border-bottom-color: #fbdfd8; }
.kcol-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.kcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; cursor: pointer; transition: all .14s;
}
.kcard:hover { border-color: #c9d5e2; box-shadow: 0 3px 12px rgba(15,23,42,.07); transform: translateY(-1px); }
.kcard.danger { border-left: 3px solid var(--red); }
.kcard-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.kcard-top b { font-size: 13px; font-weight: 600; }
.kcard-need { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-bottom: 8px; }
.kcard-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.kcard-reason {
  font-size: 11.5px; color: #b45309; background: var(--amber-l);
  padding: 3px 8px; border-radius: 6px; margin-bottom: 8px;
  display: inline-block;
}
.kcard-actions { display: flex; gap: 6px; margin-top: 9px; }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -17px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px #fff;
}
.tl-item.auto::before { border-color: var(--ink-3); }
.tl-item.handoff::before { border-color: var(--amber); }
.tl-head { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.tl-head b { font-weight: 600; font-size: 12.5px; }
.tl-head time { color: var(--ink-3); font-size: 11.5px; margin-left: auto; }
.tl-body { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.55; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .28);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 100;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 540px; max-width: 92vw;
  background: #fff; box-shadow: -8px 0 40px rgba(15,23,42,.14);
  transform: translateX(100%); transition: transform .24s cubic-bezier(.32,.72,0,1);
  z-index: 101; display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  padding: 16px 20px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 12px;
}
.drawer-head h2 { font-size: 17px; font-weight: 640; letter-spacing: -.2px; }
.drawer-head .meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drawer-close { margin-left: auto; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--ink-3); }
.drawer-close:hover { background: var(--line-2); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 11px 20px; display: flex; gap: 8px; background: #fff; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 16px; }
.field { font-size: 12.5px; }
.field label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.field .v { color: var(--ink); font-weight: 500; word-break: break-all; }
.field .v.empty-v { color: var(--ink-3); font-weight: 400; }

.section-title {
  font-size: 12px; font-weight: 620; color: var(--ink-2);
  margin: 20px 0 10px; display: flex; align-items: center; gap: 7px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

.log-input {
  display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start;
}
.log-input textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; resize: none; min-height: 62px;
  transition: border-color .15s, box-shadow .15s; line-height: 1.5;
}
.log-input textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.09); }

/* 抽屉里的阶段轨迹 */
.stage-flow { border-left: 1px solid var(--line); margin-left: 5px; padding-left: 16px; }
.sf-item { position: relative; padding: 4px 0 6px; }
.sf-item .sf-dot {
  position: absolute; left: -20.5px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 0 3px #fff;
}
.sf-body b { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sf-body b em {
  font-style: normal; font-size: 10px; font-weight: 600;
  background: var(--primary-l); color: var(--primary-d);
  padding: 0 5px; border-radius: 8px; line-height: 15px;
}
.sf-body span { font-size: 11px; color: var(--ink-3); }

/* ---------------- 表单弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.3); z-index: 110;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(15,23,42,.24);
  animation: pop .2s cubic-bezier(.32,.72,0,1);
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.modal-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; font-weight: 630; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; color: var(--ink-2); font-weight: 550; margin-bottom: 5px; }
.form-row label .req { color: var(--red); margin-left: 2px; }
.input, .form-row input, .form-row select, .form-row textarea {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 11px; font-size: 13px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.form-row textarea { height: auto; min-height: 66px; padding: 8px 11px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.09);
}
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint-line { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #16232f; color: #fff; font-size: 13px; padding: 9px 16px;
  border-radius: 9px; box-shadow: 0 8px 28px rgba(15,23,42,.24);
  animation: toastin .22s ease; display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: #0b7c72; }
.toast.warn { background: #b45309; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- 图表 ---------------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.bar-name { font-size: 12px; color: var(--ink-2); width: 68px; flex: 0 0 68px; }
.bar-track { flex: 1; height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.32,.72,0,1); }
.bar-val { font-size: 12px; font-weight: 600; color: var(--ink-2); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

.funnel-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.funnel-label { font-size: 12px; width: 64px; flex: 0 0 64px; color: var(--ink-2); }
.funnel-bar { flex: 1; height: 22px; background: var(--line-2); border-radius: 5px; overflow: hidden; position: relative; }
.funnel-fill {
  height: 100%; border-radius: 5px; display: flex; align-items: center;
  padding-left: 8px; color: #fff; font-size: 11px; font-weight: 600;
  transition: width .5s cubic-bezier(.32,.72,0,1); min-width: 0;
}

.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ch-card {
  border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px;
  background: #fff; position: relative; overflow: hidden;
}
.ch-card-top { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.ch-card-top b { font-size: 13px; font-weight: 620; }
.ch-card-num { font-size: 23px; font-weight: 650; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.ch-card-num small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 2px; letter-spacing: 0; }
.ch-card-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }
.ch-card-meta b { color: var(--ink-2); font-weight: 600; }

.settings-sec { margin-bottom: 18px; }
.kv-list { font-size: 12.5px; }
.kv-list div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.kv-list div:last-child { border-bottom: none; }
.kv-list span { color: var(--ink-3); }
.kv-list b { font-weight: 550; }

.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.help-item { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.help-item b { color: var(--ink); display: block; font-size: 12px; margin-bottom: 2px; }
code {
  background: var(--line-2); padding: 1px 5px; border-radius: 4px;
  font-family: "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--primary-d);
}

/* ---------------- 进度统计 ---------------- */
.seg { display: flex; gap: 2px; background: var(--line-2); border-radius: 9px; padding: 3px; }
.seg-btn { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; transition: all .14s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: #fff; color: var(--primary-d); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.1); }

.dt { font-weight: 600; }
.dt.up { color: var(--primary-d); }
.dt.down { color: var(--red); }
.dt.flat { color: var(--ink-3); font-weight: 500; }

.ff-head { display: flex; align-items: center; font-size: 11px; color: var(--ink-3); padding: 0 0 6px; }
.ff-row { display: flex; align-items: center; gap: 8px; padding: 3.5px 0; }
.ff-name { width: 74px; flex: 0 0 74px; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.ff-track { flex: 1; height: 20px; background: #f4f6f9; border-radius: 5px; overflow: hidden; }
.ff-fill {
  height: 100%; border-radius: 5px; color: #fff; font-size: 10.5px; font-weight: 600;
  display: flex; align-items: center; padding-left: 7px; transition: width .5s cubic-bezier(.32,.72,0,1);
}
.ff-conv { width: 52px; text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ff-drop { width: 34px; text-align: right; font-size: 11px; color: #c43438; }

.cyc-sum { display: flex; gap: 10px; margin-bottom: 16px; }
.cyc-sum > div { flex: 1; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; }
.cyc-sum b { font-size: 19px; font-weight: 650; letter-spacing: -.4px; display: block; font-variant-numeric: tabular-nums; }
.cyc-sum b small { font-size: 10.5px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.cyc-sum span { font-size: 10.5px; color: var(--ink-3); }
.cyc-bars { display: flex; align-items: flex-end; gap: 6px; height: 122px; }
.cyc-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.cyc-count { font-size: 10.5px; color: var(--ink-3); height: 15px; font-variant-numeric: tabular-nums; }
.cyc-col { width: 70%; max-width: 38px; background: linear-gradient(180deg, #5eead4, #0d9488); border-radius: 4px 4px 2px 2px; }
.cyc-label { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; white-space: nowrap; }

.dw-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.dw-name { width: 70px; flex: 0 0 70px; font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.dw-track { flex: 1; height: 8px; background: #f4f6f9; border-radius: 4px; overflow: hidden; }
.dw-fill { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.32,.72,0,1); }
.dw-val { width: 44px; text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dw-n { width: 62px; text-align: right; font-size: 10.5px; color: var(--ink-3); }

.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut-legend { flex: 1; }
.donut-legend > div { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; }
.donut-legend span { color: var(--ink-2); }
.donut-legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-legend em { font-style: normal; color: var(--ink-3); width: 46px; text-align: right; font-size: 11.5px; }

.effort-box { border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 10px; font-size: 12px; color: var(--ink-2); }
.effort-box > div { display: flex; justify-content: space-between; padding: 2px 0; }
.effort-box > div.hint-line { display: block; }
.effort-box b { font-weight: 600; color: var(--primary-d); }

.mchart { display: flex; align-items: flex-end; gap: 6px; height: 174px; }
.mcol { flex: 1; display: flex; flex-direction: column; height: 100%; }
.mbars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.mbar { width: 24px; max-width: 30%; border-radius: 4px 4px 2px 2px; position: relative; transition: height .5s cubic-bezier(.32,.72,0,1); }
.mbar.leads { background: #c7dcfb; }
.mbar.won { background: linear-gradient(180deg, #5eead4, #0d9488); }
.mbar span { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 9.5px; color: #8b9bb0; }
.mbar.won span { color: var(--primary-d); font-weight: 600; }
.mlabel { text-align: center; font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }
.mamt { text-align: center; font-size: 10.5px; color: var(--ink-2); font-weight: 600; }
.legend-row { display: flex; gap: 14px; font-size: 11px; color: var(--ink-3); margin-top: 8px; justify-content: center; }
.legend-row span { display: flex; align-items: center; gap: 4px; }

.goal-row { margin-bottom: 14px; }
.goal-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.goal-top b { font-weight: 650; font-variant-numeric: tabular-nums; }
.goal-top em { font-style: normal; color: var(--ink-3); font-weight: 400; font-size: 11.5px; }
.goal-track { height: 8px; background: #f4f6f9; border-radius: 5px; overflow: hidden; }
.goal-fill { height: 100%; border-radius: 5px; transition: width .5s cubic-bezier(.32,.72,0,1); }
.goal-pct { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; text-align: right; }

@media (max-width: 860px) {
  .sidebar { width: 62px; flex: 0 0 62px; padding: 14px 8px; }
  .brand-text, .nav-item span:not(.nav-badge), .side-foot { display: none; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .nav-badge { position: absolute; top: 2px; right: 2px; margin: 0; }
  .view { padding: 16px 14px 40px; }
  .g-kpi, .g-4 { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 14px; gap: 10px; }
}
