* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; background: #f4f6f9; color: #1f2733; font-size: 14px; }
a { color: #12716B; text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: #55677c; }
.error { color: #d4380d; min-height: 18px; }
.small { font-size: 12px; }
h1 { font-size: 24px; font-weight: 700; color: #12263f; margin: 2px 0 14px; }
h2 { font-size: 16px; margin: 18px 0 8px; }
h3 { font-size: 14px; margin: 12px 0 6px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: #E9F1F8; }
.login-box { background: #fff; border-radius: 12px; padding: 28px; width: 340px; max-width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.login-box label { display: block; margin: 12px 0; }
.login-box input { width: 100%; margin-top: 4px; }

/* 侧边壳（rail- 图标竖栏 + submenu- 二级菜单列 + 内容区） */
.shell { display: flex; align-items: stretch; min-height: 100vh; }
.rail { width: 64px; flex: none; background: #fff; border-right: 1px solid #e8edf3; display: flex; flex-direction: column; padding: 8px 6px; gap: 2px; position: sticky; top: 0; height: 100vh; z-index: 20; }
.rail-brand { text-align: center; font-weight: 800; font-size: 13px; color: #12716B; padding: 6px 0 10px; letter-spacing: .5px; }
#rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 10px; color: #43536a; font-size: 11px; line-height: 1.2; text-decoration: none; }
.rail-item:hover { background: #EAF3F1; text-decoration: none; }
.rail-item.active { background: #12716B; color: #fff; }
.rail-ico { display: block; line-height: 0; }
.rail-ico svg { width: 22px; height: 22px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; border-top: 1px solid #eef1f4; padding-top: 8px; }
.rail-foot .rail-item { width: 100%; }
.rail-user { font-size: 11px; color: #7a8699; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submenu { width: 152px; flex: none; background: #fff; border-right: 1px solid #e8edf3; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 8px; }
.submenu-title { font-size: 16px; font-weight: 700; color: #12263f; padding: 2px 10px 12px; }
#submenu-nav { display: flex; flex-direction: column; }
#submenu-nav a { display: block; padding: 8px 10px 8px 13px; margin: 1px 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; color: #1f2733; }
#submenu-nav a:hover { background: #F3F7F6; text-decoration: none; }
#submenu-nav a.active { background: #E3EFED; color: #12716B; border-left-color: #12716B; font-weight: 600; }

main { flex: 1; min-width: 0; padding: 16px 20px 16px 14px; background: #E9F1F8; }

@media (max-width: 900px) {
  .shell { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .rail { grid-row: 1 / span 2; }
  .submenu { width: auto; height: auto; position: static; display: flex; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 8px; border-right: none; border-bottom: 1px solid #e8edf3; }
  .submenu-title { padding: 0 8px 0 2px; white-space: nowrap; font-size: 15px; }
  #submenu-nav { flex-direction: row; gap: 2px; }
  #submenu-nav a { white-space: nowrap; border-left: none; border-radius: 8px; padding: 6px 10px; }
  #submenu-nav a.active { border-left: none; }
  main { padding: 12px; }
}

/* 按钮与表单 */
.btn { border: 1px solid #c9d4e3; background: #fff; color: #1f2733; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: #12716B; color: #12716B; }
.btn.primary { background: #12716B; border-color: #12716B; color: #fff; }
.btn.primary:hover { background: #0C5A54; color: #fff; }
.btn.danger { color: #d4380d; border-color: #f0b8a8; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.block { width: 100%; padding: 9px; }
input, select, textarea { border: 1px solid #c9d4e3; border-radius: 6px; padding: 6px 8px; font-size: 13px; font-family: inherit; background: #fff; max-width: 100%; }
textarea { width: 100%; min-height: 56px; resize: vertical; }
label.f { display: block; margin: 8px 0; }
label.f > span { display: block; color: #5a6a80; margin-bottom: 3px; font-size: 12px; }
label.f input, label.f select { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.toolbar input[type=search] { min-width: 200px; }

/* 卡片与表格 */
.card { background: #fff; border-radius: 10px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 1px 4px rgba(16,42,80,.06); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.grid > .card { margin: 0; }
.stat { display: inline-block; background: #fff; border-radius: 10px; padding: 10px 16px; margin: 0 8px 8px 0; box-shadow: 0 1px 4px rgba(16,42,80,.06); }
.stat b { font-size: 20px; display: block; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(16,42,80,.06); }
table.tbl { border-collapse: collapse; width: 100%; min-width: 640px; }
table.tbl th, table.tbl td { border-bottom: 1px solid #e8edf3; padding: 8px 10px; text-align: left; vertical-align: top; }
table.tbl th { background: #f7fafc; color: #43536a; font-weight: 600; white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 12.5px; background: #E0EEE9; color: #1C463F; margin-right: 4px; white-space: nowrap; }
.tag.red { background: #fdeceb; color: #b3261e; }
.tag.green { background: #e6f4ea; color: #137333; }
.tag.grey { background: #E4EAF0; color: #3E5069; }
.star { cursor: pointer; color: #c2ccd9; font-size: 16px; }
.star.on { color: #f5a623; }

/* 跟进卡 */
.fu { border-left: 3px solid #12716B; }
.fu.quote { border-left-color: #d4380d; }
.seg { border-radius: 8px; padding: 8px 10px; margin: 12px 0; white-space: pre-wrap; word-break: break-word; }
.seg.customer { background: #f2f4f7; }
.seg.me { background: #e8f1fd; }
.seg .who { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.seg.customer .who { color: #5a6a80; }
.seg.me .who { color: #1668dc; }
.fu-details { background: #EAF3F1; border: 1px solid #CFE4DF; border-radius: 8px; padding: 8px 10px; margin: 12px 0; }
.fu-details-title { font-size: 12px; font-weight: 700; color: #12716B; margin-bottom: 2px; }
.fu-details-body { white-space: pre-wrap; word-break: break-word; }
.fu-next { margin: 8px 0; }
.fu-next-label { color: #12716B; font-weight: 700; }
.fu-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e8edf3; }
.att-pdf { border: 1px solid #e3eaf2; border-radius: 8px; margin: 8px 0; overflow: hidden; }
.att-pdf-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f7fafc; font-size: 13px; }
.att-pdf-frame { width: 100%; height: 320px; border: none; display: block; background: #fff; }
.att { display: inline-flex; gap: 6px; align-items: center; background: #F3F7F6; border-radius: 6px; padding: 3px 8px; margin: 2px 4px 2px 0; font-size: 12px; }
.att img { max-width: 120px; max-height: 90px; border-radius: 4px; display: block; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(10,20,35,.45); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 10px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 760px; max-width: 100%; padding: 18px 20px; }
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.qi-row, .seg-row { border: 1px solid #e3eaf2; border-radius: 8px; padding: 8px; margin: 6px 0; }
.qi-row .form-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* 看板 */
.board-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.board-col h2 { margin-top: 4px; }

/* toast */
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99; }
.toast { background: #12263f; color: #fff; padding: 9px 16px; border-radius: 8px; margin-top: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.err { background: #b3261e; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px; }
.kv dt { color: #7a8699; }
.kv dd { margin: 0; word-break: break-word; }
img.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #fff; border: 1px solid #d7e0ea; }
img.big { max-width: 100%; border-radius: 8px; }

/* 工作台（home- 前缀，仅工作台使用） */
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 2px 0 12px; }
.home-stat { background: #fff; border-radius: 12px; padding: 14px 16px 12px; box-shadow: 0 1px 4px rgba(16,42,80,.06); }
.home-stat b { display: block; font-size: 24px; line-height: 1.25; color: #12263f; font-weight: 700; }
.home-stat span { color: #7a8699; font-size: 12px; }
.home-say { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #EAF3F1; border: 1px solid #CFE4DF; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.home-say-label { font-weight: 700; color: #12716B; white-space: nowrap; }
.home-say input { flex: 1; min-width: 200px; padding: 8px 10px; }
.home-say .btn { padding: 8px 14px; }
.home-review-card { padding: 16px 18px; }
.home-review-title { margin: 0 0 10px; }
.home-reconcile { background: #fff8e1; border: 1px solid #f0dfa0; border-radius: 10px; padding: 10px 14px 6px; margin-bottom: 12px; }
.home-reconcile h3 { margin-top: 2px; color: #8a6d1a; }
.home-review-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-review-col { border-radius: 10px; padding: 10px 14px 4px; }
.home-review-col.bad { background: #fdf1f0; }
.home-review-col.bad h3 { color: #b3261e; margin-top: 2px; }
.home-review-col.improve { background: #eef7f0; }
.home-review-col.improve h3 { color: #137333; margin-top: 2px; }
.rv-entry { margin: 7px 0; line-height: 1.7; }
.rv-entry .btn { margin-left: 2px; }
.rv-edit-input { width: min(420px, 70%); }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 12px; }
.home-cols .card { margin: 0; }
.home-col-main > h2 { margin-top: 14px; }
.home-todo-item { margin: 7px 0; }
.home-secretary h3 { color: #43536a; border-top: 1px solid #eef1f4; padding-top: 10px; }
.home-secretary h3:first-of-type { border-top: none; padding-top: 0; }

@media (max-width: 900px) {
  .home-cols { grid-template-columns: 1fr; }
  .home-review-cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  main { padding: 10px; }
  table.tbl { min-width: 560px; }
}

/* 登录页品牌标记（仅视觉，不动登录逻辑） */
.login-logo { width: 52px; height: 52px; border-radius: 14px; background: #12716B; color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; letter-spacing: .5px; }
.login-box { text-align: center; border-top: 4px solid #12716B; }
.login-box label { text-align: left; }
.login-box h1 { margin-bottom: 2px; }

/* 客户列表（cust- 前缀，表头驱动） */
.cust-wrap { border-radius: 12px; }
.cust-tbl th.cust-th { position: relative; cursor: default; user-select: none; }
.cust-th-label { cursor: pointer; }
.cust-th-label:hover { color: #12716B; }
.cust-ind-sort { color: #d4380d; font-size: 10px; margin-left: 3px; }
.cust-ind-dot { color: #2B7CD3; font-size: 8px; margin-left: 3px; vertical-align: middle; }
.cust-th-caret { border: none; background: transparent; color: #b6c2d2; cursor: pointer; font-size: 10px; padding: 0 2px; margin-left: 1px; }
.cust-th-caret:hover { color: #12716B; }
.cust-th-caret.on { color: #12716B; }
.cust-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: #fff; border: 1px solid #dbe4f0; border-radius: 10px; box-shadow: 0 10px 32px rgba(16,42,80,.18); padding: 10px 12px; min-width: 190px; max-height: 320px; overflow-y: auto; font-weight: 400; text-align: left; }
.cust-pop-sec + .cust-pop-sec { border-top: 1px solid #eef1f4; margin-top: 8px; padding-top: 8px; }
.cust-pop-title { font-size: 12px; color: #7a8699; margin-bottom: 4px; }
.cust-pop-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; color: #1f2733; cursor: pointer; white-space: nowrap; }
.cust-pop-foot { display: flex; gap: 6px; justify-content: flex-end; border-top: 1px solid #eef1f4; margin-top: 8px; padding-top: 8px; }
.cust-group-row td { background: #EAF3F1; font-weight: 700; color: #2F5D58; padding: 6px 10px; }
.cust-grade-A { background: #fdeceb; color: #b3261e; }
.cust-grade-B { background: #fff4e0; color: #8a5a00; }
.cust-grade-C { background: #EAF3F1; color: #2F5D58; }
/* 采购品类蓝 pill + 等级徽章 pill */
.cust-cat-pill { display: inline-block; background: #12716B; color: #fff; border-radius: 999px; padding: 2px 11px; font-size: 13px; margin: 1px 3px 1px 0; white-space: nowrap; }
.cust-grade-pill { display: inline-block; border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }
.cust-grade-pill-A { background: #e8590c; }
.cust-grade-pill-B { background: #2B7CD3; }
.cust-grade-pill-C { background: #98a4b3; }
.cust-grade-none { color: #98a4b3; font-size: 14px; }

/* 客户详情（cust- 前缀：报价表/评论/高亮） */
.cust-quote-scroll { overflow-x: auto; margin: 6px 0; border: 1px solid #eef1f4; border-radius: 8px; }
.cust-quote-tbl { min-width: 760px; font-size: 12.5px; }
.cust-quote-tbl th, .cust-quote-tbl td { padding: 5px 8px; }
.cust-comments .cust-comment { border-bottom: 1px solid #eef1f4; padding: 8px 0; }
.cust-comments .cust-comment:first-child { padding-top: 0; }
.cust-comment-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.cust-fu-flash { outline: 2px solid #d4380d; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(212,56,13,.12); transition: box-shadow .3s; }

/* 客户跟进（feed- 前缀） */
.feed-reminders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.feed-reminder { background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 4px rgba(16,42,80,.06); display: flex; flex-direction: column; gap: 5px; }
.feed-reminder b { font-size: 14px; }
.feed-reminder-due { border-top: 3px solid #f5a623; }
.feed-reminder-wait { border-top: 3px solid #d4380d; }
.feed-toolbar { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 4px rgba(16,42,80,.06); }
.feed-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.feed-day { border-bottom: 2px solid #e3eaf2; padding-bottom: 4px; }
@media (max-width: 900px) { .feed-reminders { grid-template-columns: 1fr; } }

/* 产品（prod- 前缀） */
.prod-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px; align-items: start; }
.prod-tree { margin: 0; position: sticky; top: 12px; }
.prod-tree-item { padding: 6px 9px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.prod-tree-item:hover { background: #EAF3F1; }
.prod-tree-item.active { background: #12716B; color: #fff; }
.prod-tree-item.active .muted { color: #D3EAE4; }
.prod-tree-child { margin-left: 16px; font-size: 13px; }
.prod-webonly { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.prod-web-cell { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
@media (max-width: 900px) { .prod-layout { grid-template-columns: 1fr; } .prod-tree { position: static; } }

/* 报价单一览（qd- 前缀） */
.qd-row { cursor: pointer; }
.qd-row:hover { background: #f7fafc; }
.qd-row-waiting { background: #fff7f5; }
.qd-row-waiting:hover { background: #fdeceb; }

/* 单据看板（board- 前缀补充） */
.board-col-head { display: flex; align-items: center; gap: 7px; border-left: 4px solid #c9d4e3; padding-left: 9px; }
.board-accent-quote { border-left-color: #d4380d; }
.board-accent-pi { border-left-color: #12716B; }
.board-accent-contract { border-left-color: #7b61ff; }
.board-accent-payment { border-left-color: #137333; }
.board-accent-shipping { border-left-color: #f5a623; }
.board-count { background: #EAF3F1; color: #2F5D58; border-radius: 9px; padding: 1px 8px; font-size: 12.5px; }
.board-card { margin: 8px 0; padding: 11px 13px; border-radius: 12px; }
.board-amount { font-weight: 700; color: #12263f; }
.board-round { margin: 7px 0; padding-top: 7px; border-top: 1px dashed #e8edf3; }
.board-round-click { cursor: pointer; }
.board-round-click:hover { background: #eef5f3; border-radius: 7px; }
.board-total { font-size: 12.5px; font-weight: 400; color: #55677c; }
.board-round:first-of-type { border-top: none; padding-top: 2px; }
.board-round-latest { background: #fdf6f5; border-radius: 7px; padding: 6px 8px; }

/* 待办 / 供应商 / 设置（轻量对齐） */
.todo-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.todo-stat { background: #fff; border-radius: 10px; padding: 8px 14px; box-shadow: 0 1px 4px rgba(16,42,80,.06); color: #5a6a80; font-size: 12.5px; }
.todo-stat b { font-size: 17px; color: #12263f; margin-right: 5px; }
.todo-stat-overdue b { color: #d4380d; }
.sup-wrap { border-radius: 12px; }
.set-card { border-radius: 12px; }

/* ===== 整体排版与 Muse 版一比一对齐（align 段） ===== */
/* 客户列表：浅蓝页底 + 大标题 + 状态工具条（卡外） + 白色大卡片（轻列名行 + 三行行块 + 按月分组条） */
.cust-list-card { margin-top: 0; padding: 0; overflow: visible; border: 1px solid #DFE9F2; }
.cust-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0 0 12px; }
.cust-top-label { font-weight: 400; color: #5a6a80; font-size: 14px; }
.cust-top-count { color: #7a8699; font-size: 13.5px; }
.cust-top select { min-width: 170px; padding: 7px 8px; background: #fff; }
.cust-top input[type=search] { min-width: 210px; }
.cust-head { display: flex; align-items: center; gap: 2px 14px; flex-wrap: wrap; padding: 7px 16px; background: transparent; border-bottom: 1px solid #e8edf3; font-size: 12.5px; color: #7a8699; }
.cust-head-check { display: inline-flex; align-items: center; margin-right: 2px; }
.cust-hcell { position: relative; display: inline-flex; align-items: center; white-space: nowrap; padding: 2px 0; }
.cust-hcell-sorted .cust-th-label { color: #12263f; font-weight: 600; }
.cust-sel-count { color: #12716B; font-size: 12.5px; font-weight: 600; }
.cust-month { background: #EDF3F9; color: #1f2733; font-weight: 600; padding: 8px 16px; font-size: 13.5px; border-bottom: 1px solid #e8edf3; }
.cust-row { padding: 14px 16px 13px; border-bottom: 1px solid #eef1f4; cursor: pointer; }
.cust-row:last-child { border-bottom: none; }
.cust-row:hover { background: #F5FAF9; }
.cust-row-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cust-check { width: 15px; height: 15px; cursor: pointer; flex: none; }
.cust-row .star { flex: none; font-size: 17px; line-height: 1; }
.cust-row-name { font-size: 17px; font-weight: 700; color: #12263f; }
.cust-row-name:hover { color: #12716B; }
.cust-row-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.cust-row-source { color: #5a6a80; font-size: 13px; }
.cust-row-sub { margin: 4px 0 0 47px; color: #7a8699; font-size: 14px; }
.cust-row-company { color: #5a6a80; }
.cust-row-fu { margin: 4px 0 0 47px; font-size: 13px; color: #43536a; display: flex; align-items: baseline; gap: 4px; }
.cust-fu-tag { color: #1668DC; font-weight: 600; flex: none; }
.cust-fu-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 640px; }
.cust-eye { margin-left: auto; text-decoration: none; flex: none; }
.cust-eye:hover { text-decoration: none; }
.cust-empty { padding: 16px; margin: 0; }
.cust-load-error { padding: 32px 16px; text-align: center; }
.cust-load-error p:first-child { font-size: 15px; font-weight: 600; color: #12263f; margin: 0 0 6px; }
.cust-load-error .btn { margin-top: 12px; }

/* 客户详情：主档 hero 卡 + 关联产品卡片 + 时间线 */
.cust-hero { padding: 18px 20px; }
.cust-hero-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cust-hero-title h1 { margin: 0; font-size: 24px; color: #12263f; }
.cust-hero-company { margin-top: 4px; color: #5a6a80; font-size: 14.5px; }
.cust-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #eef1f4; }
.cust-meta-item { font-size: 13.5px; }
.cust-meta-label { color: #7a8699; margin-right: 6px; font-size: 12.5px; }
.cust-hero-notes { margin: 12px 0 0; background: #f7fafc; border-radius: 8px; padding: 9px 12px; color: #43536a; white-space: pre-wrap; word-break: break-word; }
.cust-prod-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cust-prod-chip { display: inline-flex; align-items: center; gap: 9px; background: #f7fafc; border: 1px solid #e8edf3; border-radius: 10px; padding: 7px 12px 7px 8px; color: #1f2733; max-width: 320px; }
.cust-prod-chip:hover { border-color: #12716B; text-decoration: none; }
.cust-prod-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; background: #eef1f4; flex: none; }
.cust-prod-noimg { width: 44px; height: 44px; border-radius: 7px; background: #eef1f4; color: #98a4b3; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cust-prod-info { display: flex; flex-direction: column; min-width: 0; }
.cust-prod-info b { color: #12263f; }
.cust-prod-info span { color: #5a6a80; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-timeline .card.fu { margin: 10px 0; }

/* 客户跟进：天分组头改浅色条 */
.feed-day { background: #EDF3F9; border-bottom: none; border-radius: 9px; padding: 7px 13px; color: #1f2733; font-size: 14.5px; }

/* 产品：右侧行块列表 */
.prod-list-card { margin: 0; padding: 4px 16px; }
.prod-row { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid #e6ecf2; }
.prod-row:last-child { border-bottom: none; }
.prod-row-thumb { flex: none; line-height: 0; }
.prod-row-thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid #d7e0ea; display: block; }
.prod-noimg { width: 76px; height: 76px; border-radius: 8px; background: #eef1f4; border: 1px solid #d7e0ea; color: #7c8a9c; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.prod-row-main { flex: 1; min-width: 0; }
.prod-row-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prod-sku { font-size: 15px; font-weight: 700; color: #12263f; }
.prod-sku:hover { color: #12716B; }
.prod-row-name { margin-top: 3px; font-size: 14.5px; color: #1d2f45; }
.prod-row-tiers { margin-top: 3px; color: #55677c; font-size: 13px; }
.prod-row .prod-web-cell { flex: none; }

/* 报价单一览：白卡行块 */
.qd-card { padding: 4px 16px; }
.qd-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef1f4; }
.qd-item:last-child { border-bottom: none; }
div.qd-item[data-qd-jump] { cursor: pointer; }
div.qd-item[data-qd-jump]:hover { background: #F5FAF9; }
.qd-item-waiting { background: #fff7f5; border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.qd-item-main { flex: 1; min-width: 0; }
.qd-item-line1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qd-item-line1 b { font-size: 14.5px; color: #12263f; }
.qd-item-sub { margin-top: 2px; color: #5a6a80; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-item-right { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.qd-amount { color: #12263f; font-size: 14.5px; }

/* 单据看板：列面板 */
.board-panel { background: #f8fafc; border: 1px solid #e8edf3; border-radius: 12px; padding: 10px 12px 12px; height: 100%; }
.board-panel .board-col-head { margin: 2px 0 8px; }
.board-panel .board-card { margin: 8px 0; }
.board-panel .board-card:last-child { margin-bottom: 2px; }

/* 待办：白卡行块 */
.todo-card { padding: 4px 16px; }
.todo-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1f4; }
.todo-row:last-child { border-bottom: none; }
.todo-row > input[type=checkbox] { width: 15px; height: 15px; flex: none; cursor: pointer; }
.todo-check-done { color: #137333; flex: none; }
.todo-row-main { flex: 1; min-width: 0; }
.todo-row-title { font-size: 14px; }
.todo-row-btns { flex: none; white-space: nowrap; }

/* 关联客户选择器（待办表单共用组件，第 14 波）：搜索 + 最近 + 平铺点选 */
.cp-field { margin: 8px 0; }
.cp-field-label { display: block; color: #5a6a80; margin-bottom: 3px; font-size: 12px; }
.cp-search { display: flex; align-items: center; gap: 6px; border: 1.5px solid #12716B; border-radius: 8px; padding: 0 10px; background: #fff; }
.cp-search-ic { flex: none; font-size: 14px; }
.cp-search input { flex: 1; border: none; outline: none; padding: 9px 0; font-size: 14px; background: transparent; }
.cp-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-recent:not(:empty) { margin-top: 10px; }
.cp-recent-label { color: #5a6a80; font-size: 13px; font-weight: 600; }
.cp-chip { border: none; background: #e3efed; color: #0f4c47; border-radius: 999px; padding: 5px 14px; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.cp-chip-sel { background: #12716B; color: #fff; }
.cp-list { margin-top: 10px; border: 1px solid #dfe7ee; border-radius: 10px; max-height: 302px; overflow-y: auto; background: #fff; }
.cp-row { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #eef1f4; cursor: pointer; }
.cp-row:last-child { border-bottom: none; }
.cp-row:hover { background: #f3f7f6; }
.cp-row-sel, .cp-row-sel:hover { background: #e7f2f0; }
.cp-row-main { flex: 1; min-width: 0; }
.cp-row-line1 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #12263f; }
.cp-row-comp { color: #7a8699; font-size: 12.5px; margin-top: 1px; }
.cp-pool-tag { font-size: 11px; color: #5b6b7f; background: #edf1f5; border: 1px solid #dde4ec; padding: 0 6px; border-radius: 8px; line-height: 17px; }
.cp-check { width: 24px; height: 24px; border-radius: 50%; background: #12716B; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.cp-empty { color: #7a8699; text-align: center; padding: 16px 0; margin: 0; }
.cp-hint { color: #98a4b3; font-size: 12px; margin: 6px 0 0; }

/* 供应商 / 通讯录 / 模板库：行块 */
.sup-card, .contacts-card, .tpl-card { padding: 4px 16px; }
.sup-row, .ct-row, .tpl-row { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef1f4; }
.sup-row:last-child, .ct-row:last-child, .tpl-row:last-child { border-bottom: none; }
.sup-row-main, .ct-row-main, .tpl-row-main { flex: 1; min-width: 0; }
.sup-row-line1 b, .ct-row-line1 b { font-size: 14.5px; color: #12263f; }
.sup-row-sub { margin-top: 2px; font-size: 13px; }
.sup-row-btns { flex: none; white-space: nowrap; }
.ct-row-cust { flex: none; }

/* 查重卡片微调 */
.dedupe-group { border-radius: 12px; }

/* 供应商分类 */
.sup-cat { display: inline-block; background: #12716B; color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 12.5px; margin-left: 6px; white-space: nowrap; }
.sup-filter { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 12px; }
.catchips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.catchip { border: 1px solid #c4d2de; background: #fff; color: #3e5069; border-radius: 999px; padding: 3px 13px; font-size: 13px; cursor: pointer; }
.catchip:hover { border-color: #12716B; }
.catchip.on { background: #12716B; border-color: #12716B; color: #fff; }
.catchip-add { display: inline-flex; gap: 5px; align-items: center; }
.catchip-add input { width: 96px; padding: 3px 9px; border: 1px solid #c4d2de; border-radius: 999px; font-size: 13px; }

/* 跟进卡拖放附件高亮 */
.fu.drag-over { outline: 2px dashed #12716B; outline-offset: -6px; background: #F3F7F6; }

/* 跟进表单附件区（与 Muse 版构成一致） */
.att-zone { margin-bottom: 6px; }
.att-zone.drag-over { outline: 2px dashed #12716B; outline-offset: 4px; border-radius: 8px; }
.att-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.att-grid:empty { margin-bottom: 0; }
.att-cell { position: relative; width: 76px; height: 76px; border: 1px solid #d7e0ea; border-radius: 8px; overflow: hidden; background: #fff; flex: none; }
.att-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-cell.file { display: flex; align-items: center; justify-content: center; padding: 6px; background: #F3F7F6; }
.att-fname { font-size: 11px; color: #33507a; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-align: center; }
.att-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(18, 38, 63, .72); color: #fff; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; padding: 0; }
.att-add { border: 1.5px dashed #b9c9d8; border-radius: 8px; padding: 14px; text-align: center; color: #12716B; cursor: pointer; font-size: 14px; background: #fbfdfd; }
.att-add:hover { border-color: #12716B; background: #F3F7F6; }
.att-help { margin: 6px 0 0; }

/* 做单编辑器 QuoteDocEditor */
.modal.wide { width: 1020px; }
.qde-row { display: flex; gap: 12px; border: 1px solid #dfe7ee; border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #fbfcfd; }
.qde-row.drag-over { outline: 2px dashed #12716B; outline-offset: -4px; }
.qde-imgbox { flex: none; width: 118px; text-align: center; }
.qde-imgbox img { width: 108px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid #d7e0ea; display: block; margin: 0 auto 6px; }
.qde-noimg { display: flex; align-items: center; justify-content: center; width: 108px; height: 84px; margin: 0 auto 6px; border: 1px dashed #c3d0dd; border-radius: 6px; color: #8a97a5; font-size: 12px; background: #fff; }
.qde-imgbtns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.qde-fields { flex: 1; min-width: 0; }
.qde-rowfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.qde-picker { border: 1px solid #cfdce8; border-radius: 10px; padding: 10px; margin: 8px 0; background: #fff; max-height: 320px; overflow: auto; }
.qde-pick-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; cursor: pointer; }
.qde-pick-item:hover { background: #eef4f8; }
.qde-pick-item img { width: 52px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid #d7e0ea; }
.qde-pick-item .qde-noimg { width: 52px; height: 40px; margin: 0; }
.qde-summary { display: flex; gap: 22px; justify-content: flex-end; margin-top: 10px; font-size: 14px; }
.qde-msg { min-height: 18px; color: #66788c; font-size: 12.5px; margin: 6px 0 0; text-align: right; }
.qde-msg.err { color: #c0392b; }

/* PDF 附件小瓦片（用户三次定死尺寸：宽 120px、含头部总高 ≤92px；头部只留文件名+✕，占位区只放图标+「PDF」） */
.att-pdf { display: inline-block; vertical-align: top; width: 120px; max-width: 100%; margin: 4px 6px 4px 0; }
.att-pdf-head { font-size: 12px; padding: 4px 8px; gap: 6px; }
.att-pdf-head a:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* PDF 附件静态占位区（替代 iframe 内联预览：手机上 iframe 的 PDF 会变下载弹窗，且渲染即拉全文件） */
.att-pdf-body { height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #7a8699; font-size: 11px; cursor: pointer; background: #fbfcfd; }
.att-pdf-body .att-pdf-icon { font-size: 20px; }
.att-pdf-body.has-thumb { padding: 0; background: #fff; }
.att-pdf-body img.att-pdf-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 第 6 波：沉默客户名单 + 数据简报（分布条/活跃 chips） */
.home-stale-list { max-height: 320px; overflow: auto; }
.home-stale-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid #eef3f6; margin: 0; }
.act-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dist-dim h4 { margin: 4px 0 6px; }
.dist-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 2px 0; }
.dist-row .dist-label { flex: 0 0 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-row .dist-bar { flex: 1; height: 8px; background: #eef3f6; border-radius: 4px; overflow: hidden; }
.dist-row .dist-bar i { display: block; height: 100%; background: #12716B; }
.dist-row .dist-num { flex: 0 0 30px; text-align: right; }
.dist-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0 4px; }
.dist-tabs .btn.active { background: #12716B; color: #fff; border-color: #12716B; }

/* ===== 第 7 波：客户详情页签 / 报价历程 / 聊天记录 / 聊天导入草稿 ===== */
.cust-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid #e3eaf2; margin: 14px 0 4px; }
.cust-tab { border: none; background: none; cursor: pointer; font-size: 14.5px; color: #55677c; padding: 8px 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.cust-tab:hover { color: #12716B; }
.cust-tab.on { color: #12716B; border-bottom-color: #12716B; font-weight: 700; }
.cust-tab-cnt { background: #E3EFED; color: #2F5D58; border-radius: 9px; font-size: 11.5px; padding: 0 7px; font-weight: 600; }
.cust-panel h2:first-child { margin-top: 10px; }
.qh-group { padding: 8px 0 4px; border-bottom: 1px solid #eef1f4; }
.qh-group:last-child { border-bottom: none; }
.qh-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.qh-tbl { max-width: 640px; }
.qh-tbl td, .qh-tbl th { padding: 4px 8px; }
.qh-up { color: #d4380d; }
.qh-down { color: #389e0d; }
.qh-reason td { color: #7a8699; font-size: 12.5px; }
.chat-box { padding: 14px; }
.chat-day { text-align: center; color: #7a8699; font-size: 12.5px; margin: 12px 0 8px; }
.chat-day:first-child { margin-top: 0; }
.chat-row { display: flex; margin: 6px 0; }
.chat-row.me { justify-content: flex-end; }
.chat-bubble { max-width: 78%; border-radius: 10px; padding: 7px 10px; word-break: break-word; }
.chat-bubble.customer { background: #f2f4f7; }
.chat-bubble.me { background: #e8f1fd; }
.chat-name { font-size: 12px; font-weight: 700; color: #5a6a80; margin-bottom: 2px; }
.chat-row.me .chat-name { color: #1668dc; }
.chat-text { white-space: pre-wrap; }
.chat-time { font-size: 11px; color: #98a4b3; text-align: right; margin-top: 3px; }
.ci-senders { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ci-day { margin: 10px 0; }
.ci-seg textarea { box-sizing: border-box; }

/* ===== 第 8 波：表单草稿恢复横幅 ===== */
.draft-banner { display: flex; align-items: center; gap: 10px; background: #EAF3F1; border: 1px solid #12716B; color: #2F5D58; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13.5px; }

/* ===== 第 9 波：权限开关行 / 邮件正文 ===== */
.perm-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; font-size: 14px; border-bottom: 1px dashed #e3e9f0; cursor: pointer; }
.perm-row:last-child { border-bottom: none; }
.perm-row input { width: 17px; height: 17px; accent-color: #12716B; }
.mail-body { white-space: pre-wrap; background: #f7faf9; border: 1px solid #dfe7e4; border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.65; max-height: 55vh; overflow: auto; }

/* 客户表单（对齐 Muse 版）：查重栏 + 双栏 + 采购品类 chips + 亲密度星星 */
div.f { display: block; margin: 8px 0; }
div.f > span { display: block; color: #5a6a80; margin-bottom: 3px; font-size: 12px; }
.cf-search { display: flex; gap: 8px; margin-bottom: 10px; }
.cf-search input { flex: 1; }
.cf-results { border: 1px solid #e8edf3; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; background: #f7faf9; }
.cf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cf-col h3 { margin-top: 2px; }
.cf-inline { display: flex; gap: 8px; align-items: center; }
.cf-inline input { flex: 1; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.cf-chip { border: 1px solid #cfd9e3; background: #fff; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 13px; color: #43536a; }
.cf-chip.on { background: #12716B; color: #fff; border-color: #12716B; }
.cf-stars { display: flex; gap: 2px; }
.cf-star { background: none; border: none; font-size: 22px; line-height: 1; color: #c8d2dc; cursor: pointer; padding: 2px; }
.cf-star.on { color: #f5a623; }
@media (max-width: 760px) { .cf-cols { grid-template-columns: 1fr; } }

/* 宣传物料（2026-12-03） */
.promo-ch{display:flex;align-items:flex-start;gap:10px;margin-top:14px;flex-wrap:wrap}
.promo-ch-name{font-weight:600;min-width:118px;padding-top:8px}
.promo-cap{flex:1;min-width:240px}
