/* 智拓 CRM · 蓝白灰企业管理系统风格 */
:root {
  --brand: #315FC5;
  --brand-dark: #234A9E;
  --brand-soft: #EAF0FB;
  --bg: #F4F7FC;
  --panel: #ffffff;
  --line: #e6eaf1;
  --text: #263650;
  --text-2: #5A6F8F;
  --text-3: #8CA0BC;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 登录 / 初始化 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 15% 0%, #e8f0ff 0%, transparent 60%),
    radial-gradient(700px 400px at 95% 100%, #eef2f9 0%, transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px 28px;
  box-shadow: 0 20px 50px -24px rgba(30, 64, 175, .28);
}
.brand-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(140deg, #4A7AE0, #234A9E);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 19px; letter-spacing: .5px;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55);
  margin-bottom: 16px;
}
.auth-card h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: .2px; }
.auth-card .sub { color: var(--text-2); font-size: 13px; margin: 0 0 22px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: #f8fafc; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: -6px; margin-bottom: 14px; }
.err {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 9px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px;
}

/* ---------- 应用骨架 ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 236px;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 20;
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 16px;
}
.side-brand .logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(140deg, #4A7AE0, #234A9E);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.side-brand b { font-size: 15px; display: block; line-height: 1.25; }
.side-brand span { font-size: 11px; color: var(--text-3); }
.nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  color: var(--text-2); font-size: 13.5px; margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left;
  transition: background .13s, color .13s;
}
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item:hover { background: #f4f7fc; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav-item.off { opacity: .45; cursor: default; }
.nav-item.off:hover { background: none; color: var(--text-2); }
.nav-sep { font-size: 11px; color: var(--text-3); padding: 14px 11px 6px; letter-spacing: .6px; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: #f8fafc;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #E3ECF9; color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.user-chip .who { flex: 1; min-width: 0; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who span { font-size: 11px; color: var(--text-3); }
.icon-btn {
  border: none; background: none; cursor: pointer; color: var(--text-3);
  padding: 5px; border-radius: 7px; display: grid; place-items: center;
}
.icon-btn:hover { background: #eef2f7; color: var(--text); }

.main { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 15.5px; margin: 0; font-weight: 600; }
.topbar .date { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.content { padding: 22px 26px 40px; flex: 1; }

/* ---------- 卡片与网格 ---------- */
.grid { display: grid; gap: 14px; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.kpi .k-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 27px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 2px; }
.kpi .k-value small { font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 3px; }
.kpi .k-foot { font-size: 12px; color: var(--text-3); }
.kpi.brand { background: linear-gradient(150deg, #315FC5, #1E3A8A); border-color: transparent; }
.kpi.brand .k-label, .kpi.brand .k-foot { color: rgba(255, 255, 255, .8); }
.kpi.brand .k-value { color: #fff; }

.section-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title .badge {
  font-size: 11px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); padding: 2px 8px; border-radius: 999px;
}
.two-col { grid-template-columns: 1.35fr 1fr; }

.roadmap { display: flex; flex-direction: column; gap: 2px; }
.rm-row {
  display: flex; align-items: center; gap: 11px; padding: 9px 2px;
  border-bottom: 1px dashed #eef1f6; font-size: 13.5px;
}
.rm-row:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #cbd5e1; }
.dot.done { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }
.dot.now { background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.rm-row .name { flex: 1; }
.rm-row .tag { font-size: 11.5px; color: var(--text-3); }
.rm-row .tag.done { color: var(--ok); font-weight: 600; }
.rm-row .tag.now { color: var(--brand); font-weight: 600; }

.note { font-size: 12.5px; color: var(--text-2); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed #eef1f6; }
.kv:last-child { border-bottom: none; }
.kv b { font-weight: 600; }
code.inline {
  background: #f1f5f9; padding: 1px 6px; border-radius: 5px;
  font-size: 12px; color: #334155;
}

.empty {
  text-align: center; padding: 30px 16px; color: var(--text-3); font-size: 13px;
}

/* ---------- 移动端 ---------- */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 54px; }
  .topbar .date { display: none; }
  .content { padding: 16px 14px calc(78px + env(safe-area-inset-bottom)); }
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi .k-value { font-size: 23px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bn-item {
    flex: 1; border: none; background: none; padding: 9px 2px 7px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--text-3); font-size: 10.5px; cursor: pointer;
  }
  .bn-item svg { width: 21px; height: 21px; }
  .bn-item.active { color: var(--brand); font-weight: 600; }
  .auth-card { padding: 26px 22px 22px; }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 99; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
  max-width: 90vw;
}
.toast.bad { background: #b91c1c; }

/* ================= M1 客户档案 ================= */
.split3 { display: grid; grid-template-columns: 268px 252px minmax(0, 1fr); gap: 14px; align-items: start; }
.pane {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  height: calc(100vh - 118px); overflow: hidden;
}
.pane-head {
  padding: 11px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex: none;
}
.pane-head .t {
  font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pane-body { flex: 1; overflow-y: auto; padding: 7px; }

.search { position: relative; flex: 1; min-width: 0; }
.search input {
  width: 100%; padding: 8px 10px 8px 30px; border: 1px solid var(--line);
  border-radius: 9px; background: #f8fafc; outline: none; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--brand); background: #fff; }
.search svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-3); pointer-events: none;
}

.row {
  display: flex; align-items: center; gap: 6px; padding: 8px 9px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.row:hover { background: #f7f9fd; }
.row.active { background: var(--brand-soft); border-color: #E3ECF9; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-name {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .r-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-act { display: flex; gap: 1px; opacity: 0; transition: opacity .12s; }
.row:hover .r-act, .row.active .r-act { opacity: 1; }
.row .icon-btn svg { width: 15px; height: 15px; }

.ccard {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px;
  margin-bottom: 8px; transition: border-color .14s, box-shadow .14s;
}
.ccard:hover { border-color: #c7d9f5; box-shadow: 0 4px 14px -8px rgba(37,99,235,.35); }
.ccard .top { display: flex; align-items: center; gap: 6px; }
.ccard .nm { font-weight: 600; font-size: 13.5px; }
.ccard .star { color: #f59e0b; display: inline-flex; }
.ccard .star svg { width: 14px; height: 14px; }
.ccard .meta {
  font-size: 12px; color: var(--text-2); margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 4px 12px;
}
.ccard .icon-btn svg { width: 15px; height: 15px; }

.chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); }
.chip.key { background: #fff7ed; color: #c2410c; }

.only-m { display: none; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42);
  display: grid; place-items: center; z-index: 60; padding: 18px;
  animation: fadein .16s ease-out;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 500px;
  max-height: 88vh; display: flex; flex-direction: column; margin: 0;
  box-shadow: 0 30px 70px -24px rgba(2, 6, 23, .45);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985) } to { opacity: 1; transform: none } }
.modal-head { padding: 18px 20px 6px; font-weight: 600; font-size: 15px; flex: none; }
.modal-body { padding: 8px 20px 4px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 15px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; }

/* ================= M2 项目跟进 ================= */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { max-width: 290px; }
.toolbar select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 13px; color: var(--text); outline: none; cursor: pointer;
}
.toolbar select:focus { border-color: var(--brand); }
.seg { display: flex; background: #eef2f8; border-radius: 9px; padding: 2px; }
.seg button {
  border: none; background: none; padding: 6px 13px; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--brand-dark); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

.statstrip {
  display: flex; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 2px; margin-bottom: 14px; overflow-x: auto;
  box-shadow: var(--shadow);
}
.statstrip > div { flex: 1; min-width: 108px; padding: 0 16px; border-right: 1px solid var(--line); }
.statstrip > div:last-child { border-right: none; }
.statstrip span { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.statstrip b { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol {
  flex: 0 0 240px; background: #F4F7FC; border: 1px solid var(--line);
  border-radius: 12px; display: flex; flex-direction: column;
  max-height: calc(100vh - 300px);
}
.kcol-head {
  padding: 9px 12px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line);
}
.kcol-head .cnt { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 8px; font-size: 11px; color: var(--text-2); }
.kcol-body { padding: 8px; overflow-y: auto; flex: 1; min-height: 56px; }
.kcol-foot { padding: 7px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-2); }

.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .14s, transform .1s, box-shadow .14s;
}
.pcard:last-child { margin-bottom: 0; }
.pcard:hover { border-color: #c7d9f5; transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(37, 99, 235, .55); }
.pcard .pt { display: flex; gap: 5px; align-items: flex-start; font-size: 13px; font-weight: 600; line-height: 1.45; }
.pcard .pu { font-size: 11.5px; color: var(--text-3); margin: 4px 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pf { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.pcard .amt { margin-left: auto; font-weight: 600; color: var(--brand-dark); }
.pcard .star { color: #f59e0b; display: inline-flex; flex: none; }
.pcard .star svg { width: 13px; height: 13px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafcff; white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: #f8fafd; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.star-inline { width: 12px; height: 12px; color: #f59e0b; vertical-align: -1px; }
.chip.ok { background: #ecfdf5; color: #047857; }

.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.phead h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.2px; }

.stagebar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; }
.stage-step {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 9px; font-size: 12.5px;
  background: #F4F7FC; color: var(--text-2); border: 1px solid var(--line);
  cursor: pointer; white-space: nowrap; transition: .14s;
}
.stage-step:hover { border-color: var(--brand); color: var(--brand-dark); }
.stage-step.done { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.stage-step.cur { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; box-shadow: 0 4px 12px -6px rgba(37, 99, 235, .7); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 13px 18px; }
.info-item span { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.info-item b { font-size: 13.5px; font-weight: 600; }
.info-item b small { font-size: 11px; color: var(--text-2); font-weight: 500; }

.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px dashed #eef1f6; }
.tl-item:last-child { border-bottom: none; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-top: 7px; flex: none; }
.tl-dot.stage { background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.tl-dot.create { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }
.tl-dot.contact { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .12); }
.tl-body { flex: 1; min-width: 0; }
.tl-body .t { font-size: 13px; line-height: 1.6; }
.tl-body .d { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

@media (max-width: 860px) {
  .toolbar .search { max-width: none; flex: 1 1 100%; }
  .toolbar select { flex: 1; }
  .toolbar .btn { flex: 1 1 100%; }
  .kcol { flex: 0 0 80vw; max-height: none; }
  .kcol-body { max-height: 60vh; }
  .statstrip > div { min-width: 92px; padding: 0 12px; }
  .phead h3 { font-size: 16px; width: 100%; order: -1; }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .split3 { grid-template-columns: 240px 220px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .only-m { display: inline-flex; }
  .split3 { display: block; }
  .split3 .pane { display: none; height: calc(100vh - 210px); }
  .split3 .pane.m-on { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .modal { max-height: 92vh; }
  .row .r-act { opacity: 1; }
}

/* ================= M3 拜访日志 ================= */
.modal.wide { max-width: 700px; }

.vlist { display: flex; flex-direction: column; gap: 10px; }
.vcard {
  display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .15s, transform .15s;
}
.vcard:hover { border-color: #c7d7f5; transform: translateY(-1px); }
.vdate {
  flex: none; width: 48px; text-align: center; border-right: 1px solid var(--line);
  padding-right: 12px; align-self: flex-start;
}
.vdate b { display: block; font-size: 20px; line-height: 1.15; letter-spacing: -.5px; }
.vdate span { display: block; font-size: 11px; color: var(--text-3); }
.vdate i { display: block; font-size: 10px; color: #cbd5e1; font-style: normal; }
.vmain { flex: 1; min-width: 0; }
.vtop {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-2);
}
.vtop b { color: var(--text); font-size: 13.5px; }
.vsep { color: #cbd5e1; }
.vsum {
  margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: #334155;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vline { display: flex; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.vline em {
  flex: none; font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 4px;
  background: #f1f5f9; color: var(--text-2); height: 19px; line-height: 19px; margin-top: 1px;
}
.vline span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vline.warn em { background: #fef2f2; color: #b91c1c; }
.vline.next em { background: var(--brand-soft); color: var(--brand-dark); }
.vline .nd {
  font-size: 11.5px; color: #c2410c; background: #fff7ed;
  padding: 0 6px; border-radius: 4px; font-weight: 600; flex: none;
}
.vact { flex: none; display: flex; gap: 2px; align-items: flex-start; opacity: 0; transition: opacity .15s; }
.vcard:hover .vact { opacity: 1; }

.vlist.tight { gap: 6px; }
.vcard.slim { padding: 10px 14px; box-shadow: none; }
.vcard.slim .vsum { -webkit-line-clamp: 1; font-size: 13px; }

.chip.proj { background: var(--brand-soft); color: var(--brand-dark); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.m-onsite { background: #EAF0FB; color: #234A9E; }
.chip.m-phone { background: #ecfdf5; color: #047857; }
.chip.m-wechat { background: #f0fdf4; color: #15803d; }
.chip.m-online { background: #f5f3ff; color: #6d28d9; }
.chip.m-report { background: #fff7ed; color: #c2410c; }

.dmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.dmeta b { color: var(--text); font-size: 14px; }
.drow { display: flex; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #eef1f6; }
.drow > span { flex: none; width: 72px; color: var(--text-3); font-size: 12.5px; }
.drow > div { flex: 1; min-width: 0; }
.dblock { margin-top: 12px; }
.dblock em { display: inline-block; font-style: normal; font-size: 11.5px; padding: 1px 8px; border-radius: 5px; background: #f1f5f9; color: var(--text-2); margin-bottom: 5px; }
.dblock p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #334155; white-space: normal; }
.dblock.warn em { background: #fef2f2; color: #b91c1c; }
.dblock.next em { background: var(--brand-soft); color: var(--brand-dark); }

@media (max-width: 860px) {
  .vcard { padding: 12px; gap: 10px; }
  .vdate { width: 40px; padding-right: 9px; }
  .vact { opacity: 1; flex-direction: column; }
  .vline span { white-space: normal; }
  .drow > span { width: 60px; }
  .modal.wide { max-width: none; }
}

/* ================= M4 提醒待办 ================= */
.tgroup { margin-bottom: 18px; }
.tgroup-head {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin: 0 2px 8px;
}
.tgroup-head .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.tgroup-head .dot.od { background: var(--danger); }
.tgroup-head .dot.td { background: var(--brand); }
.tgroup-head .cnt {
  font-weight: 600; font-size: 11.5px; color: var(--text-2);
  background: #eef2f8; border-radius: 999px; padding: 0 7px; line-height: 18px;
}
.tgroup-head.od { color: #b91c1c; }
.tgroup-head.od .cnt { background: #fef2f2; color: #b91c1c; }

.todo {
  display: flex; align-items: flex-start; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; box-shadow: var(--shadow); transition: border-color .15s;
}
.todo:hover { border-color: #c7d7f5; }
.todo.is-overdue { border-left: 3px solid var(--danger); }
.tick {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  border: 1.6px solid #cbd5e1; background: #fff; cursor: pointer; padding: 0;
  display: grid; place-items: center; color: transparent; transition: all .15s;
}
.tick svg { width: 13px; height: 13px; stroke-width: 2.6; }
.tick:hover { border-color: var(--ok); color: var(--ok); background: #f0fdf4; }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.tmain { flex: 1; min-width: 0; }
.ttitle { font-size: 13.5px; line-height: 1.6; color: var(--text); word-break: break-word; }
.tmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.chip.src { background: #f1f5f9; color: var(--text-2); }
.chip.src.auto { background: var(--brand-soft); color: var(--brand-dark); }
.chip.pri { font-weight: 600; }
.chip.pri.p-high { background: #fef2f2; color: #b91c1c; }
.chip.pri.p-mid { background: #f1f5f9; color: var(--text-2); }
.chip.pri.p-low { background: #f8fafc; color: var(--text-3); }
.tproj {
  font-size: 11.5px; color: var(--brand-dark); background: #f8fbff;
  border: 1px solid #E3ECF9; border-radius: 999px; padding: 1px 8px; cursor: pointer;
}
.tproj:hover { background: var(--brand-soft); }
.tdue { font-size: 11.5px; color: var(--text-3); }
.tdue.od { color: var(--danger); font-weight: 600; }
.tdue.td { color: var(--brand-dark); font-weight: 600; }
.tact { flex: none; opacity: 0; transition: opacity .15s; }
.todo:hover .tact { opacity: 1; }

.donebox { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 12px; }
.donebox summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-2); list-style: none;
  padding: 4px 2px; user-select: none;
}
.donebox summary::-webkit-details-marker { display: none; }
.donebox summary::before { content: '▸ '; color: var(--text-3); }
.donebox[open] summary::before { content: '▾ '; }
.donebox .hint { color: var(--text-3); font-size: 11.5px; }
.todo.done { opacity: .62; }
.todo.done .ttitle { text-decoration: line-through; }
.tnote { margin-top: 14px; font-size: 11.5px; line-height: 1.9; color: var(--text-3); }

.dashtodo { display: flex; flex-direction: column; }
.drow-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 2px;
  border-bottom: 1px dashed #eef1f6; cursor: pointer; font-size: 13px;
}
.drow-item:last-child { border-bottom: none; }
.drow-item:hover .dtt { color: var(--brand-dark); }
.drow-item .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; flex: none; }
.drow-item .dot.od { background: var(--danger); }
.drow-item .dot.now { background: var(--brand); }
.dtt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .todo { padding: 12px; gap: 10px; }
  .tact { opacity: 1; }
  .tick { width: 26px; height: 26px; }
  .tick svg { width: 15px; height: 15px; }
  .tproj { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* ---------- 工作台：数据聚合 ---------- */
.dash-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }

/* 本月小结 */
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mg { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; text-align: center; }
.mg b { display: block; font-size: 19px; font-weight: 650; color: var(--brand-dark); line-height: 1.3; }
.mg span { font-size: 11.5px; color: var(--text-3); }
.mfoot > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 12.5px; border-top: 1px dashed #eef1f6; }
.mfoot > div:first-child { border-top: none; }
.mfoot span { color: var(--text-2); }
.mfoot b { font-weight: 600; }
.mfoot i { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 4px; }

/* 阶段漏斗 */
.funnel { display: flex; flex-direction: column; gap: 2px; }
.fn-row {
  display: grid; grid-template-columns: 76px 54px 1fr 86px 44px;
  align-items: center; gap: 10px; padding: 5px 4px; border-radius: 8px;
}
.fn-row:hover { background: #f8fafc; }
.fn-row.closed { opacity: .62; }
.fn-name { font-size: 12.5px; color: var(--text); }
.fn-cnt { font-size: 12.5px; color: var(--text-2); }
.fn-cnt i { font-style: normal; font-size: 10.5px; color: var(--text-3); margin-left: 1px; }
.fn-track { height: 9px; border-radius: 6px; background: #eef2f7; overflow: hidden; }
.fn-track > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6E96E5, var(--brand)); }
.fn-row.closed .fn-track > i { background: #cbd5e1; }
.fn-amt { text-align: right; font-size: 12.5px; font-weight: 600; color: var(--text); }
.fn-amt small { font-size: 10px; font-weight: 400; color: var(--text-3); margin-left: 1px; }
.fn-prob { text-align: right; font-size: 11px; color: var(--text-3); }
.fn-total {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2);
}
.fn-total b { color: var(--text); font-weight: 650; margin-left: 3px; }
.fn-total b.lost { color: var(--danger); }
.fn-total b small { font-size: 10px; font-weight: 400; color: var(--text-3); }

/* 最近动态 */
.feed { display: flex; flex-direction: column; }
.fd-item { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed #eef1f6; cursor: pointer; }
.fd-item:last-child { border-bottom: none; }
.fd-item:hover .fd-title { color: var(--brand-dark); }
.fd-date { width: 38px; flex: none; font-size: 11.5px; color: var(--text-3); padding-top: 2px; font-variant-numeric: tabular-nums; }
.fd-body { min-width: 0; flex: 1; }
.fd-head { display: flex; align-items: center; gap: 6px; }
.fd-tag {
  flex: none; font-size: 10.5px; padding: 1px 6px; border-radius: 5px;
  background: #eef2f7; color: var(--text-2); line-height: 1.6;
}
.fd-tag.visit { background: #ecfdf5; color: #047857; }
.fd-tag.stage { background: var(--brand-soft); color: var(--brand-dark); }
.fd-tag.create { background: #f5f3ff; color: #6d28d9; }
.fd-tag.contact { background: #fff7ed; color: #c2410c; }
.fd-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-detail {
  font-size: 12px; color: var(--text-2); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 风险区 */
.rk-group { margin-bottom: 14px; }
.rk-group:last-child { margin-bottom: 0; }
.rk-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); margin-bottom: 4px; }
.rk-head .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.rk-head .dot.od { background: var(--danger); }
.rk-head .dot.now { background: var(--brand); }
.rk-head b { color: var(--text); font-weight: 650; }
.rk-item {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 8px;
  border-radius: 8px; cursor: pointer; font-size: 12.5px;
}
.rk-item:hover { background: #f8fafc; }
.rk-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-x { flex: none; font-size: 11.5px; color: var(--text-3); }
.badge.ok { background: #ecfdf5; color: #047857; }

@media (max-width: 1180px) and (min-width: 861px) {
  .dash-2 { grid-template-columns: 1fr; }
  .mgrid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 860px) {
  .dash-2 { grid-template-columns: 1fr; }
  .mgrid { grid-template-columns: repeat(3, 1fr); }
  .mg b { font-size: 17px; }
  .fn-row { grid-template-columns: 62px 42px 1fr 68px; gap: 8px; }
  .fn-prob { display: none; }
  .fn-amt { font-size: 12px; }
  .fn-total { gap: 4px 14px; }
  .fd-date { width: 34px; }
}

/* ---------- 合同回款 ---------- */
.chip.od { background: #fef2f2; color: #b91c1c; }
.chip.part { background: #fffbeb; color: #b45309; }
.chip.wait { background: #f1f5f9; color: var(--text-2); }
.chip.stop { background: #f1f5f9; color: var(--text-3); text-decoration: line-through; }

.crow {
  display: flex; gap: 14px; padding: 13px 4px; border-bottom: 1px dashed #eef1f6;
  cursor: pointer; align-items: center;
}
.crow:last-child { border-bottom: none; }
.crow:hover { background: #f8fafc; }
.crow:hover .c-name { color: var(--brand-dark); }
.c-main { flex: 1; min-width: 0; }
.c-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.c-sub { font-size: 11.5px; color: var(--text-3); margin: 3px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-amt { text-align: right; flex: none; min-width: 128px; }
.c-amt b { display: block; font-size: 14px; font-weight: 650; }
.c-amt b small { font-size: 10px; font-weight: 400; color: var(--text-3); }
.c-amt span { font-size: 11.5px; color: var(--text-3); }
.c-stat { flex: none; min-width: 150px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.c-due { font-size: 11px; color: var(--text-3); }
.c-due.od { color: var(--danger); }

.cbar { height: 6px; border-radius: 5px; background: #eef2f7; overflow: hidden; }
.cbar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6E96E5, var(--brand)); }
.cbar.ok > i { background: linear-gradient(90deg, #34d399, #059669); }

@media (max-width: 860px) {
  .crow { flex-wrap: wrap; gap: 8px; padding: 12px 2px; }
  .c-main { flex: 1 1 100%; }
  .c-amt { text-align: left; min-width: 0; flex: 1; }
  .c-stat { align-items: flex-start; min-width: 0; flex: 1; }
  .c-stat .c-due { text-align: left; }
}

/* 工作台：合同回款条 */
.dash-pay { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.dp span { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.dp b { font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.dp b.ok { color: #047857; }
.dp b.warn { color: #b45309; }
.dp b.bad { color: var(--danger); }
.dp b small { font-size: 10px; font-weight: 400; color: var(--text-3); }
.dp-bar { grid-column: 1 / -1; margin-top: 4px; }
.dp-bar span { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
@media (max-width: 860px) {
  .dash-pay { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ================= M7 文件管理 ================= */
.fchips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.fcat {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 11px; font-size: 12px; color: var(--text-2); cursor: pointer; line-height: 1.7;
}
.fcat:hover { border-color: #c7d7f5; color: var(--brand-dark); }
.fcat i { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 4px; }
.fcat.on { background: var(--brand-soft); border-color: #bfdbfe; color: var(--brand-dark); font-weight: 600; }
.fcat.on i { color: var(--brand-dark); }

.fscope {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #E3ECF9; border-radius: 999px;
  padding: 3px 6px 3px 11px; margin-bottom: 12px;
}
.fscope button {
  border: none; background: rgba(37, 99, 235, .12); color: var(--brand-dark);
  width: 17px; height: 17px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 13px;
}

.frow {
  display: flex; gap: 12px; align-items: center; padding: 11px 4px;
  border-bottom: 1px dashed #eef1f6;
}
.frow:last-child { border-bottom: none; }
.frow:hover { background: #f8fafc; }
.frow.slim { padding: 8px 2px; }
.frow.slim .fsub { margin-top: 2px; }

.fico {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: #f1f5f9; color: #475569;
}
.fico svg { width: 19px; height: 19px; }
.fico.doc { background: #fef2f2; color: #b91c1c; }
.fico.sheet { background: #ecfdf5; color: #047857; }
.fico.slide { background: #fff7ed; color: #c2410c; }
.fico.image { background: #EAF0FB; color: #234A9E; }
.fico.text { background: #f8fafc; color: #5A6F8F; }
.fico.archive { background: #f5f3ff; color: #6d28d9; }

.fmain { flex: 1; min-width: 0; }
.fname {
  font-size: 13.5px; font-weight: 600; display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap; word-break: break-all;
}
.fname a { color: inherit; text-decoration: none; border-bottom: 1px dashed #cbd5e1; }
.fname a:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }
.fsub {
  font-size: 11.5px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fnote { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.fact { flex: none; display: flex; gap: 4px; align-items: center; }
.fact .btn { padding: 5px 9px; }
.fact .icon-btn { width: 27px; height: 27px; }
.fact .icon-btn svg { width: 15px; height: 15px; }

.fdrop {
  border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 18px 14px;
  text-align: center; background: #fbfdff; color: var(--text-2); font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.fdrop:hover { border-color: #9DB8EC; background: #f8fbff; }
.fdrop.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.fdrop span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

.fpick { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fpick .fitem {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px;
}
.fpick .fitem span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpick .fitem i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.fpick .fitem .icon-btn { width: 20px; height: 20px; font-size: 14px; line-height: 1; }

.upbar { height: 3px; border-radius: 3px; background: #eef2f7; overflow: hidden; margin: 6px 0 10px; }
.upbar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* 手机端底部「更多」面板 */
.sheet-mask { align-items: end; padding: 0; }
.sheet {
  width: 100%; background: #fff; border-radius: 16px 16px 0 0;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(100%) } to { transform: none } }
.sheet-head { font-size: 12.5px; color: var(--text-3); padding: 12px 4px 6px; }
.sheet-item {
  width: 100%; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 11px; padding: 13px 4px;
  font-size: 14px; color: var(--text); border-bottom: 1px dashed #eef1f6; text-align: left;
}
.sheet-item:last-child { border-bottom: none; }
.sheet-item svg { width: 19px; height: 19px; color: var(--text-2); }
.sheet-item em { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: auto; }

@media (max-width: 860px) {
  .frow { flex-wrap: wrap; gap: 9px; padding: 11px 2px; }
  .fmain { flex: 1 1 calc(100% - 50px); }
  .fact { flex: 1 1 100%; justify-content: flex-end; }
  .fact .btn { padding: 6px 10px; }
  .fsub { white-space: normal; }
  .flex-note { display: none; }
}

/* ================= M8 客户全景 / 覆盖分析 / 数据导入 ================= */
.muted { color: var(--text-3); }
.bad { color: var(--danger); }
.hide { display: none !important; }

.pill { display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); white-space: nowrap; }
.pill.ok { background: #ecfdf5; color: #047857; }
.pill.warn { background: #fff7ed; color: #b45309; }
.pill.info { background: var(--brand-soft); color: var(--brand-dark); }
.pill.mute { background: #f1f5f9; color: var(--text-3); }

.pbar { display: inline-block; height: 6px; width: 100%; background: #eef2f7; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.pbar i.ok { background: #10b981; }
.pbar i.warn { background: #f59e0b; }

.flag { display: inline-block; margin-left: 6px; font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.linkbtn { background: none; border: none; color: var(--brand); font-size: 12.5px; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.mini-select, .mini-input {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--text); font-size: 13px; outline: none;
}
.mini-select:focus, .mini-input:focus { border-color: #bfdbfe; box-shadow: 0 0 0 3px #EAF0FB; }
.mini-input { min-width: 160px; }

/* --- 全景 --- */
.plist { display: flex; flex-direction: column; gap: 8px; }
.prow {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff;
  transition: .15s;
}
.prow:hover { border-color: #bfdbfe; background: #f8fbff; }
.prow-main { display: flex; flex-direction: column; min-width: 0; }
.prow-main b { font-size: 14.5px; }
.prow-meta { display: flex; gap: 14px; color: var(--text-3); font-size: 12.5px; margin-left: auto; }
.prow-go { color: var(--text-3); width: 16px; height: 16px; transform: rotate(180deg); }
.prow-go svg { width: 16px; height: 16px; }

.pan-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pan-top-l { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.pan-name { margin: 0 0 2px; font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.pan-top-r { margin-left: auto; }

.jumpbar {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 0 10px; margin-bottom: 4px; background: linear-gradient(#F4F7FC 70%, rgba(245,247,251,0));
  scrollbar-width: none;
}
.jumpbar::-webkit-scrollbar { display: none; }
.jump {
  flex: 0 0 auto; font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); cursor: pointer;
}
.jump:hover { border-color: #bfdbfe; color: var(--brand-dark); }

#content > .card { scroll-margin-top: 56px; }
.conclusion { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #E3ECF9; }
.conclusion b { font-size: 12.5px; color: var(--brand-dark); }
.conclusion p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: #1e3a8a; }

.unit-group { margin-top: 12px; }
.ug-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 4px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.uchip {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 11px;
  padding: 8px 12px; cursor: pointer; min-width: 150px; transition: .15s;
}
.uchip:hover { border-color: #bfdbfe; background: #f8fbff; }
.uchip b { display: block; font-size: 13px; font-weight: 600; }
.uchip em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.kcontacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.kc { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; }
.kc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kc-top b { font-size: 14px; }
.kc-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.kc-duty { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.kc-note { font-size: 12.5px; margin-top: 6px; padding: 7px 9px; background: #f8fafc; border-radius: 8px; color: #334155; }

.two-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 6px 0 14px; }
.two-bars > div { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.two-bars b { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.cov-table td.name-cell { font-weight: 600; white-space: nowrap; }
.name-cell { font-weight: 600; }
.duty-cell { color: var(--text-2); font-size: 12.5px; max-width: 340px; }
.code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #334155; }
.act-cell { text-align: right; white-space: nowrap; }

.need-block { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.need-row { padding: 8px 0; border-bottom: 1px dashed #eef1f6; }
.need-row:last-child { border-bottom: none; }
.need-row b { font-size: 13px; margin-right: 8px; }
.need-row p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.75; }

.noterow { padding: 10px 0; border-bottom: 1px dashed #eef1f6; }
.noterow:last-child { border-bottom: none; }
.nr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.noterow p { margin: 5px 0 0; font-size: 12.8px; color: var(--text-2); line-height: 1.75; }
.src { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.src.bad { color: var(--danger); }

.tdrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f6; font-size: 13px; }
.tdrow:last-child { border-bottom: none; }
.tdt { flex: 1; min-width: 0; }

.intel-list { display: flex; flex-direction: column; gap: 8px; }
.intel { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #fff; }
.intel-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.intel-h b { font-size: 13px; }
.intel p { margin: 5px 0 0; font-size: 12.8px; color: var(--text-2); line-height: 1.75; }

/* --- 覆盖分析 --- */
.cov-top { margin-bottom: 14px; }
.cov-top-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.cov-top-row select { margin-left: auto; }
.tabs { display: flex; gap: 6px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tab {
  border: none; background: none; padding: 8px 14px; font-size: 13px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.on { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 600; }

.grid.kpi6 { grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi.alert { border-color: #fecaca; background: #fffafa; }
.kpi.alert .k-value { color: #b91c1c; }

.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rate-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.rate-h b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.rate-f { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.fsel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.fsel select {
  height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 12.5px; color: var(--text); outline: none;
}

.mob-cards { display: none; }

/* --- 建议 --- */
.sug-head { margin-bottom: 14px; }
.sug-group { margin-bottom: 14px; }
.sug { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-top: 9px; background: #fff; cursor: pointer; }
.sug:hover { border-color: #bfdbfe; }
.sug-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sug-top b { font-size: 13.5px; }
.sug-basis { margin: 7px 0 0; padding-left: 18px; }
.sug-basis li { font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.sug-act { margin-top: 7px; font-size: 12.5px; color: var(--brand-dark); background: var(--brand-soft); padding: 6px 9px; border-radius: 8px; }
.sug-evi { margin-top: 6px; font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 6px 9px; line-height: 1.7; }

/* --- 数据导入 --- */
.imp-drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1.5px dashed #cbd5e1; border-radius: 14px; padding: 26px 16px;
  background: #fbfdff; text-align: center; cursor: pointer; transition: .15s;
}
.imp-drop:hover { border-color: #9DB8EC; background: #f6faff; }
.imp-drop svg { width: 26px; height: 26px; color: var(--brand); }
.imp-drop b { font-size: 14px; }
.imp-drop span { font-size: 12px; color: var(--text-3); }
.imp-drop button { margin-top: 4px; }

.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff;
}
.opt input { margin-top: 4px; }
.opt b { display: block; font-size: 13px; }
.opt span { display: block; font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 2px; }
.imp-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.warnbox { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 12.5px; line-height: 1.8; border: 1px solid #fde68a; }

.rawbox { max-height: 62vh; overflow: auto; }
.rawrow { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #eef1f6; font-size: 11.8px; line-height: 1.7; }
.rawsheet { flex: 0 0 130px; color: var(--brand-dark); font-family: ui-monospace, Menlo, monospace; }
.rawrow span:last-child { color: var(--text-2); word-break: break-all; }

.panel { max-width: 900px; }
.panel .modal-head { display: flex; align-items: center; gap: 10px; }
.panel-tools { margin-bottom: 10px; }

@media (max-width: 1180px) and (min-width: 861px) {
  .grid.kpi6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .grid.kpi6 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi6 .k-value { font-size: 20px; }
  .rate-grid { grid-template-columns: 1fr; gap: 14px; }
  .two-bars { grid-template-columns: 1fr; gap: 10px; }
  .table-wrap.cov-only-pc { display: none; }
  .mob-cards { display: flex; flex-direction: column; gap: 9px; }
  .mcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
  .mcard-top { display: flex; align-items: center; gap: 6px; }
  .mcard-top b { font-size: 13.5px; }
  .mcard-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
  .mcard-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; font-size: 12px; }
  .mcard-why { margin-top: 7px; font-size: 11.5px; color: #92400e; background: #fffbeb; border-radius: 7px; padding: 5px 8px; line-height: 1.7; }
  .prow-meta { display: none; }
  .pan-top-r { margin-left: 0; width: 100%; }
  .pan-top-r select { width: 100%; }
  .opt-row { grid-template-columns: 1fr; }
  .kcontacts { grid-template-columns: 1fr; }
  .jumpbar { top: 0; }
  .filters { gap: 6px; }
  .mini-input { min-width: 0; flex: 1 1 100%; }
  .fsel { flex: 1 1 auto; }
  .fsel select { width: 100%; }
  .imp-drop { padding: 20px 12px; }
  .rawsheet { flex: 0 0 92px; }
  .panel { max-width: none; }
}

.warn-text { color: #b45309; }

/* V2.1 表单细节：工作日志表单的标签与文本域排版 */
#jrBody label.muted { display: block; margin-bottom: 3px; font-size: 12.5px; }
#jrBody textarea.ipt { width: 100%; display: block; }
#jrBody input.ipt, #jrBody select.ipt { width: 100%; }

/* ---------- V2.2 工作台优化：KPI 可点击 / 待办勾选 / 8 周趋势 / 页脚 ---------- */
.kpi-link { cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.kpi-link:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px -8px rgba(37, 99, 235, .35);
  transform: translateY(-1px);
}
.kpi-link:active { transform: translateY(0); }

.dcheck {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #cbd5e1; background: #fff; color: #cbd5e1;
  font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
  display: grid; place-items: center; transition: all .15s;
}
.dcheck:hover { border-color: var(--ok); color: var(--ok); background: #f0fdf4; }
.dcheck.busy { opacity: .5; pointer-events: none; }
.drow-item.done-out { opacity: .45; text-decoration: line-through; transition: opacity .3s; }

.wk-trend { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #eef1f6; }
.wk-head { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.wk-head span { color: var(--brand-dark); font-weight: 600; }
.wk-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wk i {
  display: block; width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px;
  background: #E3ECF9; margin-top: auto; min-height: 2px;
  transition: background .15s;
}
.wk:hover i { background: #9DB8EC; }
.wk.cur i { background: linear-gradient(180deg, #6E96E5, var(--brand)); }
.wk span { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.wk.cur span { color: var(--brand-dark); font-weight: 600; }

.dash-foot {
  margin-top: 14px; padding: 10px 4px 2px; text-align: center;
  font-size: 11.5px; color: var(--text-3);
}
.dash-foot code { font-size: 11px; }

/* ---------- V2.2 小序鹿建议卡 ---------- */
.xl-card .section-title { display: flex; align-items: center; gap: 7px; }
.xl-ava {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--teal, #52B7A5));
  display: grid; place-items: center; font-size: 14px;
  box-shadow: 0 4px 10px -3px rgba(49, 95, 197, .45);
}
.xl-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px;
  border-bottom: 1px dashed #eef1f6; cursor: pointer;
}
.xl-row:last-of-type { border-bottom: none; }
.xl-row:hover .xl-title b { color: var(--brand-dark); }
.xl-no {
  flex: none; width: 20px; height: 20px; border-radius: 7px; margin-top: 1px;
  background: #EAF0FB; color: var(--brand-dark); font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}
.xl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xl-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.xl-title b { font-weight: 650; color: var(--text); }
.xl-pri {
  font-style: normal; font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 0 7px;
}
.xl-pri.hi { color: #b91c1c; background: #fee2e2; }
.xl-pri.md { color: #92400e; background: #fef3c7; }
.xl-pri.lo { color: var(--text-2); background: #eef1f6; }
.xl-detail { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.xl-go { flex: none; color: var(--text-3); font-size: 17px; margin-top: 2px; }
.xl-empty { padding: 10px 2px; font-size: 13px; color: var(--text-2); }


