:root {
  --primary: #3d7bfd;
  --primary-light: #ecf2ff;
  --text: #303133;
  --text-sub: #606266;
  --text-light: #909399;
  --border: #e4e7ed;
  --bg: #f2f4f7;
  --danger: #f56c6c;
  --success: #67c23a;
  --warning: #e6a23c;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; color: var(--text); background: var(--bg); overflow: hidden;
}
#app { height: 100%; }

/* ---------- 框架 ---------- */
.crm-layout { display: flex; flex-direction: column; height: 100%; }
.crm-header {
  height: 56px; background: #fff; display: flex; align-items: center;
  padding: 0 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: relative; z-index: 20; flex-shrink: 0;
}
.crm-logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; color: var(--primary); margin-right: 28px; white-space: nowrap; }
.crm-logo .dot { width: 22px; height: 22px; border-radius: 6px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.crm-nav { display: flex; align-items: stretch; height: 100%; flex: 1; }
.crm-nav-item {
  position: relative; display: flex; align-items: center; padding: 0 16px; cursor: pointer;
  color: var(--text-sub); font-size: 14px; white-space: nowrap;
}
.crm-nav-item:hover, .crm-nav-item.active { color: var(--primary); }
.crm-nav-item.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--primary); border-radius: 2px;
}
.crm-subnav {
  position: absolute; top: 56px; left: 0; min-width: 168px; background: #fff; border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 6px 0; z-index: 30;
}
.crm-subnav a {
  display: block; padding: 8px 18px; color: var(--text-sub); text-decoration: none; font-size: 13px; white-space: nowrap;
}
.crm-subnav a:hover { background: var(--primary-light); color: var(--primary); }
.crm-subnav a.active { color: var(--primary); background: #f5f8ff; }
.crm-team { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-sub); white-space: nowrap; }
.crm-team .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; }

.crm-body { flex: 1; overflow: auto; padding: 14px; }
.crm-card { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.crm-card + .crm-card { margin-top: 14px; }
.crm-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.crm-card-title { font-size: 15px; font-weight: 600; }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.filter-bar .el-input, .filter-bar .el-select, .filter-bar .el-date-editor { width: 150px; }
.filter-item { color: var(--text-light); font-size: 13px; }
.tool-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tool-bar .right { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 表格 ---------- */
.el-table th { background: #fafbfc !important; color: var(--text-sub); font-weight: 500; }
.el-table td, .el-table th { padding: 9px 0; }
.link-text { color: var(--primary); cursor: pointer; }
.link-text:hover { text-decoration: underline; }
.text-sub { color: var(--text-light); }
.text-strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-light); }
.pointer { cursor: pointer; }
.mt-10 { margin-top: 10px; } .mt-15 { margin-top: 15px; } .mb-10 { margin-bottom: 10px; }
.mr-5 { margin-right: 5px; } .ml-5 { margin-left: 5px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; } .flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.f-1 { flex: 1; }

/* ---------- 首页 ---------- */
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border-radius: 6px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.kpi .kpi-label { color: var(--text-light); font-size: 13px; margin-bottom: 10px; }
.kpi .kpi-value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { margin-top: 8px; font-size: 12px; color: var(--text-light); }
.panel { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.panel-title { font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.list-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #f0f2f5; font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; background: #fff3f3; color: var(--danger); font-size: 11px; }
.tag-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 12px; }

/* ---------- 客户档案 ---------- */
.profile-head { display: flex; gap: 18px; align-items: flex-start; }
.profile-avatar { width: 64px; height: 64px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.profile-name { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.profile-meta { color: var(--text-light); margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; margin-top: 6px; }
.info-cell { display: flex; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed #f2f4f7; }
.info-cell .k { width: 84px; color: var(--text-light); flex-shrink: 0; }
.info-cell .v { flex: 1; word-break: break-all; }

/* 时间线 */
.el-timeline-item__content { font-size: 13px; }
.act-item { padding: 2px 0 10px; }
.act-meta { color: var(--text-light); font-size: 12px; margin-bottom: 3px; }
.act-detail { white-space: pre-wrap; line-height: 1.6; }

/* 状态色块 */
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.empty-block { text-align: center; color: var(--text-light); padding: 30px 0; font-size: 13px; }
.section-tabs .el-tabs__header { margin-bottom: 12px; }
.form-tip { color: var(--text-light); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.report-table-wrap { max-height: none; }
.sub-menu-title { font-size: 12px; color: var(--text-light); margin: 12px 0 6px; }

.sys-info{margin-top:14px;padding-top:12px;border-top:1px dashed #e8eaef}
.sys-title{font-size:13px;font-weight:600;color:#303133;margin-bottom:10px;padding-left:8px;border-left:3px solid #409eff}

.global-search{position:relative;margin-bottom:12px}
.search-drop{position:absolute;left:0;right:0;top:40px;z-index:30;background:#fff;border:1px solid #e4e7ed;
  border-radius:6px;box-shadow:0 6px 22px rgba(0,0,0,.12);max-height:420px;overflow:auto;padding:6px 0}
.search-head{padding:6px 14px 8px;font-size:12px;color:#909399;border-bottom:1px solid #f2f3f5}
.search-item{display:flex;align-items:center;gap:10px;padding:8px 14px;cursor:pointer;font-size:13px}
.search-item:hover{background:#f5f9ff}
.s-name{font-weight:600;color:#303133;min-width:150px}
.s-badge{font-size:11px;padding:1px 6px;border-radius:9px;background:#e8f3ff;color:#1a73e8}
.s-badge.pool{background:#fff4e6;color:#e6a23c}
.s-badge.lead{background:#f0f9eb;color:#67c23a}


/* ================= 字号升级（对齐橙子：整体放大一号） ================= */
body { font-size: 14px; }
.el-table { font-size: 14px; }
.el-table th.el-table__cell { font-size: 14px; font-weight: 600; color: #303133; background: #fafbfc; }
.el-table td.el-table__cell { padding: 9px 0; color: #303133; }
.el-table .cell { line-height: 22px; }
.el-form-item__label { font-size: 14px; }
.el-button { font-size: 14px; }
.el-input__inner, .el-textarea__inner { font-size: 14px; }
.el-select-dropdown__item { font-size: 14px; }
.el-dialog__title { font-size: 17px; font-weight: 600; }
.el-tabs__item { font-size: 14px; }
.el-timeline-item__content { font-size: 14px; }
.el-radio-button__inner { font-size: 14px; }
.el-dropdown-menu__item { font-size: 14px; }
.crm-card-title { font-size: 17px; }
.crm-nav-item { font-size: 15px; }
.crm-logo { font-size: 18px; }
.kpi .kpi-value { font-size: 28px; }
.kpi .kpi-label { font-size: 14px; }
.kpi .kpi-foot { font-size: 12.5px; }
.info-cell { font-size: 14px; }
.list-row { font-size: 14px; }
.profile-name { font-size: 20px; }
.sys-title { font-size: 14.5px; }
.tag-pill { font-size: 12.5px; }
.badge { font-size: 12px; }
.text-sub { font-size: 13px; }
.act-meta { font-size: 13px; }
.filter-item { font-size: 14px; }
.el-pagination { font-size: 14px; }
.el-message, .el-message-box__message { font-size: 14.5px; }

/* ================= 移动端适配 ================= */
@media (max-width: 900px) {
  body { font-size: 15px; overflow-x: hidden; }
  .crm-header { height: 54px; padding: 0 10px; }
  .crm-logo { font-size: 15px; margin-right: 6px; gap: 6px; }
  .crm-logo span { display: none; }
  .crm-logo .dot { width: 22px; height: 22px; font-size: 13px; }
  .crm-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .crm-nav::-webkit-scrollbar { display: none; }
  .crm-nav-item { padding: 0 12px; font-size: 15px; }
  .crm-team .team-name { display: none; }
  .crm-body { padding: 8px; }
  .crm-card { padding: 12px; border-radius: 8px; }
  .crm-card-title { font-size: 16px; }
  .crm-card-head { margin-bottom: 10px; }

  .filter-bar { gap: 8px; }
  .filter-bar .filter-item { width: 100%; }
  .filter-bar .el-input, .filter-bar .el-select, .filter-bar .el-date-editor { width: 100% !important; }
  .tool-bar { flex-wrap: wrap; gap: 6px; }
  .tool-bar .el-button { margin-left: 0 !important; }

  .home-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .kpi { padding: 12px; }
  .kpi .kpi-value { font-size: 22px; }
  .kpi .kpi-foot { display: none; }

  .el-table { font-size: 14px; }
  .el-table td.el-table__cell { padding: 8px 0; }
  .crm-body .el-table { width: 100%; }

  .el-dialog { width: 94% !important; margin-top: 6vh !important; }
  .el-dialog__body { padding: 12px 14px !important; }
  .el-form-item { margin-bottom: 14px; }
  .el-form-item__label { float: none !important; display: block; width: auto !important;
    padding: 0 0 4px !important; text-align: left; line-height: 20px; }
  .el-form-item__content { margin-left: 0 !important; }

  .info-grid { grid-template-columns: 1fr !important; gap: 4px 0 !important; }

  .el-pagination { justify-content: center; flex-wrap: wrap; font-size: 14px; }
  .el-pagination .el-pagination__sizes, .el-pagination .el-pagination__jump { display: none; }

  .search-drop { max-height: 60vh; }
  .crm-subnav { position: fixed; left: 8px; right: 8px; top: 54px; min-width: auto; }
  .el-message-box { width: 90% !important; }
  .el-button--small, .el-button--mini { padding: 9px 12px; font-size: 14px; }
  .el-input--small .el-input__inner { height: 36px; line-height: 36px; }
  .el-timeline { padding-left: 2px; }
  .el-timeline-item { padding-bottom: 14px; }
}
@media (max-width: 480px) {
  .crm-nav-item { padding: 0 10px; font-size: 14.5px; }
  .kpi .kpi-value { font-size: 20px; }
  .kpi .kpi-label { font-size: 13px; }
  .el-dialog { width: 96% !important; }
}

/* ================= 移动端表格精简：只留编号/名称/状态/业务员 ================= */
@media (max-width: 900px) {
  .el-table .col-wx, .el-table .col-mobile, .el-table .col-src,
  .el-table .col-lastact, .el-table .col-lastdate,
  .el-table .col-tag, .el-table .col-created { display: none !important; }
  .el-table .col-name { min-width: 130px; }
  .el-table .col-no { width: 96px; }
  .el-table .col-status { width: 108px; }
  .el-table .col-sales { width: 72px; }
  .el-table .el-table__fixed-right, .el-table .el-table__fixed { display: none !important; }
  .el-table__body-wrapper { overflow-x: auto; }
  .crm-card .el-table { font-size: 14px; }
  .crm-card .el-table th.el-table__cell, .crm-card .el-table td.el-table__cell { padding: 8px 0; }
}

/* ================= 移动端筛选折叠 ================= */
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .filter-toggle { display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 12px; background: #fff; border: 1px solid #dcdfe6; border-radius: 8px;
    margin-bottom: 8px; font-size: 14.5px; color: var(--text-sub); }
  .filter-bar { display: none; }
  .filter-bar.filter-open { display: flex; }
  .crm-team .team { display: none; }
  .crm-header .el-dropdown { display: none; }
}

@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
  .tool-bar { gap: 6px; }
  .tool-bar .el-button { flex: 1 1 0; min-width: 0; }
  .tool-bar .el-button--primary { flex: 1.4 1 0; }
  .crm-card-head { flex-wrap: wrap; gap: 4px; }
  .el-table__header th .cell { font-size: 13.5px; }
  .el-table__body td .cell { font-size: 14px; }
}

/* ================= 移动端卡片列表（对齐橙子 App 样式） ================= */
.mob-list { display: flex; flex-direction: column; gap: 10px; }
.mob-item { background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.mob-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mob-name { font-size: 15.5px; font-weight: 600; color: #303133; line-height: 1.35; word-break: break-all; }
.mob-status { font-size: 11.5px; color: #3d7bfd; background: #ecf2ff; padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; flex-shrink: 0; }
.mob-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 13px; color: #909399; }
.mob-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px;
  padding-top: 9px; border-top: 1px solid #f2f4f7; }
.mob-last { font-size: 12.5px; color: #a0a4ab; }
.mob-last.warn { color: #f56c6c; font-weight: 500; }
.mob-more { text-align: center; padding: 16px; color: #3d7bfd; font-size: 14px; }

@media (max-width: 900px) {
  .crm-card { padding: 10px 10px 4px; background: transparent; box-shadow: none; }
  .crm-card-head { padding: 0 2px; }
  .crm-card-title { font-size: 17px; }
  .mob-list { padding-bottom: 8px; }
  .crm-body { background: #f2f4f7; }
}

.mob-fab { position: fixed; right: 18px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #ff9a3c, #f57c00); color: #fff; display: none;
  align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 6px 18px rgba(245,124,0,.4);
  z-index: 50; cursor: pointer; }
@media (max-width: 900px) { .mob-fab { display: flex; } }

/* ================= 移动端状态标签：单行左右滑动 ================= */
@media (max-width: 900px) {
  .status-tabs { display: flex; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .status-tabs::-webkit-scrollbar { display: none; }
  .status-tabs .el-radio-group { display: flex; flex-wrap: nowrap; gap: 0; }
  .status-tabs .el-radio-button { flex: 0 0 auto; }
  .status-tabs .el-radio-button__inner { white-space: nowrap; padding: 8px 13px; font-size: 14px; }
  .status-tabs .el-radio-button__orig-radio:checked + .el-radio-button__inner {
    box-shadow: -1px 0 0 0 #3d7bfd; }
}

/* 强制单行横滑（覆盖 Element 默认） */
@media (max-width: 900px) {
  .status-tabs { display: flex !important; overflow-x: auto !important; overflow-y: hidden !important;
    flex-wrap: nowrap !important; white-space: nowrap !important; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; }
  .status-tabs::-webkit-scrollbar { display: none !important; }
  .status-tabs .el-radio-group { display: flex !important; flex-wrap: nowrap !important; width: max-content !important; }
  .status-tabs .el-radio-button { flex: 0 0 auto !important; float: none !important; }
  .status-tabs .el-radio-button__inner { white-space: nowrap !important; padding: 8px 13px !important;
    font-size: 14px !important; display: inline-block !important; }
}

/* ================= 移动端：详情页 / 首页 排版修复 ================= */
@media (max-width: 900px) {
  /* 详情页头部：头像与姓名改为上下 */
  .profile-head { flex-direction: column !important; gap: 10px !important; align-items: flex-start !important; }
  .profile-name { font-size: 19px !important; flex-wrap: wrap; gap: 8px; line-height: 1.4; word-break: break-word; }
  .profile-meta { flex-wrap: wrap; gap: 6px 14px !important; font-size: 13.5px; margin-top: 8px !important; }

  /* 信息格：单列，标签固定宽、值自动换行，禁止逐字竖排 */
  .info-grid { grid-template-columns: 1fr !important; gap: 0 !important; margin-top: 8px !important; }
  .info-cell { display: flex !important; align-items: flex-start; gap: 10px;
    width: 100% !important; padding: 9px 0 !important; font-size: 14px;
    border-bottom: 1px solid #f4f6f8 !important; }
  .info-cell .k { flex: 0 0 84px !important; width: 84px !important; max-width: 84px;
    white-space: nowrap; color: #909399; }
  .info-cell .v { flex: 1 1 auto !important; min-width: 0 !important;
    white-space: normal !important; word-break: break-word !important;
    overflow-wrap: anywhere; color: #303133; }

  /* 系统信息块 */
  .sys-info { padding: 12px !important; border-radius: 10px; }
  .sys-title { font-size: 14px !important; }

  /* 首页 KPI 卡片紧凑 */
  .home-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .kpi { padding: 13px 12px !important; border-radius: 10px !important; }
  .kpi .kpi-label { font-size: 12.5px !important; margin-bottom: 5px !important; }
  .kpi .kpi-value { font-size: 21px !important; line-height: 1.25; }
  .kpi .kpi-foot { display: none !important; }

  /* 首页搜索框 */
  .global-search { margin-bottom: 10px; }
  .global-search .el-input__inner { font-size: 14px; }

  /* 首页列表行 */
  .list-row { font-size: 13.5px !important; padding: 10px 0 !important; gap: 8px;
    align-items: flex-start; }
  .list-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 卡片头与标题 */
  .crm-card-head { flex-wrap: wrap !important; gap: 4px 10px; }
  .crm-card-title { font-size: 16.5px !important; }

  /* 顶部公司与用户名：过长省略 */
  .crm-team { max-width: 96px; overflow: hidden; }
  .crm-team .team-name, .crm-team .team { display: none !important; }

  /* 详情页操作按钮组 */
  .crm-card .el-button + .el-button { margin-left: 6px; }
  .el-tabs__header { margin-bottom: 8px !important; }
  .el-tabs__item { padding: 0 12px !important; font-size: 14px !important; }
}

/* ================= 移动端：详情页第二轮精修 ================= */
@media (max-width: 900px) {
  /* 头部整体改上下排列，按钮组换行全宽 */
  .flex-between { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .profile-head { flex-direction: row !important; gap: 12px !important; align-items: flex-start !important; }
  .profile-head > div:last-child { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
  .profile-avatar { width: 46px !important; height: 46px !important; font-size: 19px !important; flex: 0 0 46px !important; }
  .profile-name { font-size: 18px !important; flex-wrap: wrap !important; gap: 6px !important; line-height: 1.4; }
  .profile-meta { display: flex !important; flex-wrap: wrap !important; gap: 4px 12px !important; margin-top: 7px !important; }
  .profile-meta > span { white-space: nowrap !important; font-size: 13px !important; color: #909399; }
  .tag-pill { white-space: nowrap !important; font-size: 11.5px !important; padding: 2px 8px !important;
    line-height: 1.6; display: inline-block; }

  /* 操作按钮：两行均分 */
  .flex.gap-8 { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  .flex.gap-8 > .el-button { flex: 1 1 calc(33.33% - 6px) !important; margin: 0 !important;
    padding: 9px 0 !important; font-size: 14px !important; }

  /* 信息格 */
  .info-cell .k { flex: 0 0 78px !important; width: 78px !important; max-width: 78px;
    font-size: 13.5px !important; white-space: nowrap; }
  .info-cell .v { font-size: 14px !important; }

  /* 系统信息标题与内容 */
  .sys-title { display: inline-block; padding-left: 8px; border-left: 3px solid #3d7bfd;
    line-height: 1.2; margin-bottom: 8px; }

  /* 底部金额行 */
  .flex.gap-12.mt-15 { flex-wrap: wrap !important; gap: 10px 16px !important; }
}

/* ===== 移动端信息格终极修复：强制单列 + 防止内容被压缩成竖排 ===== */
@media (max-width: 900px) {
  .info-grid,
  .crm-card .info-grid,
  .sys-info .info-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
  }
  .info-grid > .info-cell,
  .sys-info .info-cell {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-column: auto !important;
    padding: 9px 0 !important;
  }
  .info-cell > .k {
    flex: 0 0 84px !important;
    width: 84px !important;
    max-width: 84px !important;
    min-width: 84px !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .info-cell > .v {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100%;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
}

/* ===== 首页移动端 ===== */
.home-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) {
  .home-panels { grid-template-columns: minmax(0,1fr) !important; gap: 10px !important; margin-top: 10px !important; }
  .panel { padding: 13px !important; border-radius: 10px !important; }
  .panel-title { font-size: 15px !important; margin-bottom: 8px !important; }
  .flex.gap-8 { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  .flex.gap-8 > .el-button { flex: 1 1 calc(33.33% - 6px) !important; margin: 0 !important;
    padding: 8px 0 !important; font-size: 13.5px !important; }
  .list-row { display: flex !important; justify-content: space-between !important; align-items: center;
    gap: 10px; padding: 9px 0 !important; font-size: 13.5px !important; }
  .list-row > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .list-row > span:last-child { flex: 0 0 auto; font-size: 12.5px; }
  .panel [style*="height:240px"] { height: 190px !important; }
  .crm-card > .flex-between > div:first-child { width: 100%; }
  .crm-card-title { display: block; margin-bottom: 8px; }
  .el-radio-group[style*="margin-left"] { margin-left: 0 !important; margin-bottom: 8px; }
}

/* 快捷按钮：移动端改为 3 列网格，彻底避免溢出 */
@media (max-width: 900px) {
  .flex.gap-8 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important; }
  .flex.gap-8 > .el-button { width: 100% !important; margin: 0 !important; padding: 9px 0 !important;
    font-size: 13.5px !important; }
  .home-panels .list-row { border-bottom: 1px solid #f6f7f9; }
  .home-panels .list-row:last-child { border-bottom: 0; }
}

@media (max-width: 900px) {
  .flex.gap-8 > .el-button { min-width: 0 !important; padding: 9px 4px !important;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 图表容器 */
  .panel [style*="height:240px"], .panel .chart-box { height: 200px !important; }
}

@media (max-width: 900px) {
  .flex.gap-8 > .el-button { font-size: 12.5px !important; padding: 9px 2px !important;
    letter-spacing: -0.2px; }
  .flex.gap-8 { gap: 6px !important; }
}

@media (max-width: 900px) {
  /* 快捷按钮改 2 列 3 行，文字一定放得下 */
  .flex.gap-8 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important; }
  .flex.gap-8 > .el-button { width: 100% !important; margin: 0 !important; padding: 9px 4px !important;
    font-size: 13.5px !important; letter-spacing: 0; }
}

/* ================= 移动端：汉堡菜单 ================= */
.crm-burger { display: none; }
@media (max-width: 900px) {
  .crm-burger { display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-right: 8px; flex: 0 0 36px;
    font-size: 21px; color: #303133; cursor: pointer; border-radius: 8px; }
  .crm-burger:active { background: #f0f2f5; }
  .crm-nav { display: none !important; }
  .crm-header { padding: 0 10px !important; }
  .crm-logo { font-size: 15px !important; gap: 6px !important; }
  .crm-logo .dot { width: 26px !important; height: 26px !important; font-size: 14px !important; }
  .crm-team > span:first-child { display: none !important; }
  .crm-team .avatar { width: 26px !important; height: 26px !important; font-size: 12px !important; }

  /* 抽屉内容 */
  .mob-drawer .el-drawer__body { padding: 0 !important; overflow-y: auto; }
  .mob-menu { display: flex; flex-direction: column; min-height: 100%; background: #fff; }
  .mob-menu-brand { padding: 18px 16px 14px; font-weight: 700; font-size: 16px; color: #303133;
    border-bottom: 1px solid #f2f4f7; display: flex; align-items: center; gap: 8px; }
  .mob-menu-group { border-bottom: 1px solid #f7f8fa; }
  .mob-menu-1 { display: flex; align-items: center; justify-content: space-between;
    padding: 15px 16px; font-size: 15.5px; color: #303133; cursor: pointer; }
  .mob-menu-1:active { background: #f7f9fc; }
  .mob-menu-1.active { color: #3d7bfd; font-weight: 600; }
  .mob-arrow { font-size: 12px; color: #b0b4bb; transition: transform .2s; }
  .mob-arrow.up { transform: rotate(180deg); }
  .mob-menu-2 { background: #fafbfd; }
  .mob-menu-2 a { display: block; padding: 13px 16px 13px 30px; font-size: 14.5px;
    color: #606266; border-top: 1px solid #f2f4f7; }
  .mob-menu-2 a.active { color: #3d7bfd; font-weight: 600; background: #eef4ff; }
  .mob-menu-user { margin-top: auto; padding: 16px; font-size: 13px; color: #909399;
    border-top: 1px solid #f2f4f7; display: flex; align-items: center; gap: 8px; }
  .mob-menu-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: #3d7bfd;
    color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
}

/* ================= 客户详情页：分区配色 ================= */
/* 顶部档案区：淡蓝渐变 */
.profile-head { background: linear-gradient(135deg, #f3f7ff 0%, #ffffff 62%); border-radius: 12px;
  padding: 14px 16px; border: 1px solid #e8efff; }
.profile-avatar { box-shadow: 0 4px 12px rgba(61,123,253,.22); }

/* 基本信息块：浅灰底卡片 */
.crm-card > .info-grid { background: #f8fafc; border-radius: 12px; padding: 4px 16px;
  border: 1px solid #eef1f5; }
.crm-card > .info-grid .info-cell { border-bottom: 1px dashed #e8ecf2; }
.crm-card > .info-grid .info-cell:last-child { border-bottom: 0; }

/* 系统信息块：淡蓝底 + 蓝色引导 */
.sys-info { background: #f1f6ff; border: 1px solid #dfeaff; border-radius: 12px;
  padding: 14px 16px; margin-top: 14px; }
.sys-info .info-grid { padding: 0; background: transparent; border: 0; }
.sys-info .info-cell { border-bottom: 1px dashed #dbe6fa; }
.sys-info .info-cell:last-child { border-bottom: 0; }
.sys-title { color: #2b6cf6; font-size: 14.5px; }
.sys-info .info-cell .v { color: #1f3a68; font-weight: 500; }

/* 金额汇总：淡绿底 */
.sum-row { display: flex; flex-wrap: wrap; gap: 14px 26px; background: #f4faf6;
  border: 1px solid #e2f2e7; border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.sum-row > div { display: flex; flex-direction: column; gap: 3px; }
.sum-row .text-sub { font-size: 12.5px; color: #7a9a85; }

/* Tab 区：白色卡片包起来 */
.crm-card + .crm-card, .el-tabs__content { }
.crm-card .el-tabs__header { background: #fafbfd; border-radius: 10px 10px 0 0;
  margin: 0 -4px 12px !important; padding: 0 4px; }

/* 跟进/签单列表条目：隔行浅色 + 圆角 */
.act-item, .biz-item, .remind-item {
  background: #fff; border: 1px solid #f0f3f7; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }

/* 详情页分区强化：每块独立卡片 + 明显色差 */
.crm-card > .info-grid {
  background: #f4f8fd !important;
  border: 1px solid #e4ecf7 !important;
  border-radius: 12px !important;
  padding: 4px 16px !important;
  margin-top: 14px !important;
}
.sys-info { background: #eef5ff !important; border: 1px solid #d8e7ff !important; }
.sum-row { background: #f0f6fd !important; border: 1px solid #dde9f8 !important; }
.profile-head { border: 1px solid #dde8fb !important; }
.crm-card > .flex-between { margin-bottom: 4px; }

/* 每块之间留白，避免"一整块" */
.sys-info { margin-top: 16px !important; }
.sum-row { margin-top: 16px !important; }
.crm-card .el-tabs { margin-top: 16px; }

/* 小节标题 */
.sec-title { display: inline-block; padding-left: 9px; border-left: 3px solid #b6c2d4;
  color: #4a5566; font-size: 14.5px; font-weight: 600; line-height: 1.15;
  margin: 16px 0 10px; }
.sys-info .sys-title { border-left-color: #3d7bfd; color: #2b6cf6; }

/* 三个区块用不同色系，界限分明 */
.crm-card > .info-grid { background: #f7f9fc !important; border: 1px solid #e8edf5 !important; }
.sys-info { background: #eff4ff !important; border: 1px solid #d9e4fb !important; }
.sum-row { background: #f2f9f4 !important; border: 1px solid #dcefe2 !important; }
.sum-row .money { color: #1a7a3e !important; }

/* 移动端排序条 */
.mob-sortbar { display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden;
  padding: 8px 2px 10px; scrollbar-width: none; }
.mob-sortbar::-webkit-scrollbar { display: none; }
.mob-sortbar .sb-label { font-size: 12.5px; color: #a0a4ab; flex: 0 0 auto; }
.mob-sortbar a { flex: 0 0 auto; font-size: 13px; color: #606266; background: #fff;
  border: 1px solid #e4e7ed; border-radius: 14px; padding: 5px 12px; display: inline-flex;
  align-items: center; gap: 3px; }
.mob-sortbar a.on { background: #eef4ff; border-color: #b9d1ff; color: #2b6cf6; font-weight: 600; }
.mob-sortbar a i { font-size: 11px; transition: transform .2s; }
.mob-sortbar a i.flip { transform: rotate(180deg); }

/* ================= 移动端首页（对齐橙子 App） ================= */
.m-home { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }

/* 今日新增大卡 */
.m-hero { background: linear-gradient(135deg, #4b8bfd 0%, #2f6bf0 100%); border-radius: 14px;
  padding: 16px 14px 14px; color: #fff; box-shadow: 0 8px 20px rgba(47,107,240,.26); }
.m-hero-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mh-title { font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.m-mode .el-radio-button__inner { background: rgba(255,255,255,.16); border: 0 !important; color: #fff;
  padding: 4px 10px !important; font-size: 12px !important; box-shadow: none !important; border-radius: 8px !important; }
.m-mode .el-radio-button:not(:first-child) .el-radio-button__inner { margin-left: 4px; border-radius: 8px !important; }
.m-mode .el-radio-button__orig-radio:checked + .el-radio-button__inner { background: #fff !important;
  color: #2f6bf0 !important; font-weight: 600; }
.m-hero-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.m-hero-cell { text-align: center; }
.m-hero-cell b { display: block; font-size: 22px; font-weight: 700; line-height: 1.25; }
.m-hero-cell span { font-size: 11.5px; opacity: .86; }
.m-hero-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px;
  padding-top: 11px; border-top: 1px solid rgba(255,255,255,.2); font-size: 12.5px; opacity: .95; }
.m-hero-foot b { font-weight: 600; font-size: 13.5px; }

/* 搜索条 */
.m-search { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 22px;
  padding: 11px 16px; color: #b0b4bb; font-size: 13.5px; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.m-search i { font-size: 15px; color: #c0c4cc; }

/* 功能宫格 */
.m-gridcard { background: #fff; border-radius: 14px; padding: 14px 8px 8px; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 2px; }
.m-grid a { display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; color: #4a5263; }
.m-grid a i { width: 42px; height: 42px; border-radius: 13px; color: #fff; font-size: 19px;
  display: flex; align-items: center; justify-content: center; }
.m-grid a:active i { transform: scale(.94); }

/* 九宫格数据 */
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-stat { background: #fff; border-radius: 12px; padding: 14px 6px 12px; text-align: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.m-stat b { display: block; font-size: 20px; font-weight: 700; color: #303133; line-height: 1.25; }
.m-stat b.warn { color: #ff7f2a; }
.m-stat span { font-size: 11.5px; color: #909399; display: block; margin-top: 2px; }

/* 面板 & 悬浮按钮 */
.m-panel { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.m-fab { position: fixed; right: 18px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #ff9a3c, #f57c00); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 6px 18px rgba(245,124,0,.4); z-index: 60; }

/* 修正：防止 5 列/宫格溢出 */
.m-home { overflow-x: hidden; }
.m-hero-row { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.m-hero-cell b { font-size: 19px !important; }
.m-hero-cell span { font-size: 11px !important; }
.m-hero-foot { font-size: 12px !important; }
.m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.m-grid a span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.m-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.m-stat span { font-size: 11px !important; line-height: 1.25; }

/* 终极修正：flex 均分，绝不裁切 */
.m-hero-row { display: flex !important; grid-template-columns: none !important;
  justify-content: space-between !important; gap: 2px !important; width: 100% !important; }
.m-hero-cell { flex: 1 1 0 !important; min-width: 0 !important; }
.m-stats { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.m-stat { padding: 15px 10px 13px !important; }
.m-stat b { font-size: 22px !important; }
.m-stat span { font-size: 12px !important; }

/* ============ 列表卡片（橙子风） ============ */
.mi-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mi-title { font-size: 16px; font-weight: 600; color: #303133; word-break: break-all; }
.mi-status { font-size: 11.5px; color: #8a6d3b; background: #fff7e6; padding: 3px 9px;
  border-radius: 6px; white-space: nowrap; flex: 0 0 auto; }
.mi-name { font-size: 12.5px; color: #909399; margin-top: 4px; }
.mi-overdue { display: inline-block; font-size: 11.5px; color: #f56c6c; background: #fef0f0;
  padding: 2px 8px; border-radius: 5px; margin-top: 8px; }
.mi-kv { display: flex; gap: 8px; font-size: 13px; margin-top: 7px; color: #909399; }
.mi-kv b { color: #4a5263; font-weight: 500; }
.mi-foot { display: flex; align-items: center; gap: 16px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid #f4f6f8; }
.mi-star { font-size: 18px; color: #c8ccd4; cursor: pointer; }
.mi-star.on { color: #ffb400; }
.mi-act { font-size: 13px; color: #3d7bfd; }
.mi-more { margin-left: auto; font-size: 17px; color: #909399; }

/* ============ 客户详情（移动版） ============ */
.p-mob { padding-bottom: 68px; }
.pm-hero { background: linear-gradient(135deg, #1f2a4a 0%, #2b3a63 100%); border-radius: 12px;
  padding: 18px 16px; color: #fff; }
.pm-hero-id { font-size: 22px; font-weight: 700; color: #ffb347; display: flex;
  align-items: center; gap: 8px; word-break: break-all; }
.pm-hero-id i { font-size: 18px; color: #3ecf6d; flex: 0 0 auto; }
.pm-hero-name { font-size: 13px; opacity: .7; margin-top: 6px; }
.pm-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-top: 16px; }
.pm-hero-stats div { text-align: center; }
.pm-hero-stats span { display: block; font-size: 11px; opacity: .62; }
.pm-hero-stats b { display: block; font-size: 13px; margin-top: 4px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.pm-status { display: flex; justify-content: space-between; align-items: center; background: #fff8e6;
  color: #8a6d3b; border-radius: 10px; padding: 13px 15px; margin-top: 10px; font-size: 14px; }
.pm-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; padding: 0 2px; }
.pm-tag { font-size: 12.5px; color: #3d7bfd; border: 1px solid #b9d1ff; border-radius: 14px; padding: 5px 12px; }
.pm-tag.ghost { color: #909399; border-color: #e0e3eb; }
.pm-card { background: #fff; border-radius: 12px; margin-top: 10px; box-shadow: 0 1px 5px rgba(0,0,0,.04); overflow: hidden; }
.pm-card-head { display: flex; align-items: center; gap: 8px; padding: 13px 15px 11px; border-bottom: 1px solid #f4f6f8; }
.pm-card-head b { font-size: 15px; color: #303133; }
.pm-eye { margin-left: auto; color: #b0b4bb; font-size: 16px; }
.pm-plus { margin-left: auto; font-size: 20px; color: #909399; line-height: 1; }
.pm-sub { font-size: 12px; color: #909399; background: #f4f6f8; padding: 2px 8px; border-radius: 10px; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 12px 15px; font-size: 14px;
  border-bottom: 1px solid #f8f9fb; }
.pm-row:last-child { border-bottom: 0; }
.pm-row > span:first-child { color: #606266; flex: 0 0 auto; }
.pm-row > b { margin-left: auto; color: #303133; font-weight: 500; text-align: right; word-break: break-all; }
.pm-row > i { color: #c8ccd4; font-size: 13px; flex: 0 0 auto; }
.pm-badge { font-size: 11px; color: #909399; background: #f4f6f8; border-radius: 8px; padding: 1px 7px; flex: 0 0 auto; }
.pm-empty { padding: 16px; text-align: center; color: #b0b4bb; font-size: 13px; }
.pm-feed { padding: 13px 15px; border-bottom: 1px solid #f8f9fb; }
.pm-feed-txt { font-size: 14px; color: #303133; line-height: 1.58; }
.pm-feed-meta { font-size: 12px; color: #a0a4ab; margin-top: 6px; }
.pm-money { color: #e67700 !important; font-weight: 600 !important; }
.pm-bottom { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 70; max-width: 100%; }
.pm-bottom .el-button { flex: 1; margin: 0 !important; height: 40px; font-size: 15px; border-radius: 10px; }

/* 详情页在移动端不要外层白卡 padding */
@media (max-width: 900px) {
  .p-mob .pm-card, .p-mob .pm-hero, .p-mob .pm-status { margin-left: 0; margin-right: 0; }
  .crm-body .crm-card:has(.p-mob) { background: transparent; box-shadow: none; padding: 0; }
}

/* hero 指标改 2x2，保证 4 个都在 */
.pm-hero-stats { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
.pm-hero-stats b { font-size: 12.5px !important; }
.pm-hero-stats span { font-size: 10.5px !important; }
/* 基本资料行：保证值可见、箭头可见 */
.pm-row { flex-wrap: nowrap !important; }
.pm-row > b { flex: 1 1 auto !important; min-width: 0 !important; }
.pm-row > i { flex: 0 0 14px !important; display: inline-block !important; }

/* ============ 顶部返回按钮 ============ */
.crm-back { display: none; }
@media (max-width: 900px) {
  .crm-back { display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-right: 2px; font-size: 21px; color: #303133;
    cursor: pointer; border-radius: 8px; flex: 0 0 34px; }
  .crm-back:active { background: #f0f2f5; }

  /* 旧的「筛选条件 展开」按钮隐藏，改用新的 chip 条 */
  .filter-toggle { display: none !important; }
  .mob-sortbar { display: none !important; }
}

/* ============ 筛选 chip 条 ============ */
.m-filter { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 10px; }
.mf-row { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.mf-row::-webkit-scrollbar { display: none; }
.mf-chip { flex: 0 0 auto; font-size: 13px; color: #606266; background: #fff;
  border: 1px solid #e4e7ed; border-radius: 8px; padding: 7px 11px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; }
.mf-chip.on { background: #eef4ff; border-color: #b9d1ff; color: #2b6cf6; font-weight: 600; }
.mf-search { flex: 1 1 auto; min-width: 108px; padding: 0 10px; }
.mf-search i { color: #b0b4bb; font-size: 14px; }
.mf-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font-size: 13px;
  background: transparent; color: #303133; padding: 7px 0; font-family: inherit; }
.mf-search input::placeholder { color: #b0b4bb; }

/* 选择弹窗 */
.m-pick-list { max-height: 56vh; overflow-y: auto; }
.m-pick-item { padding: 13px 14px; font-size: 15px; color: #303133; border-bottom: 1px solid #f4f6f8; }
.m-pick-item.on { color: #3d7bfd; font-weight: 600; background: #f2f7ff; }

@media (max-width: 900px) {
  /* 隐藏旧的状态标签条（用新的 chip 条代替） */
  .status-tabs { display: none !important; }
  /* chip 更紧凑，四个都能放一行 */
  .mf-chip { padding: 7px 9px !important; font-size: 12.5px !important; }
  .mf-search { min-width: 72px !important; flex: 1 1 auto !important; }
  .mf-search input { font-size: 12.5px !important; }
  .m-filter { padding: 0 0 10px !important; }
}

@media (max-width: 900px) {
  .mf-search { flex: 0 0 66px !important; min-width: 66px !important; max-width: 66px !important; }
  .mf-chip { padding: 7px 8px !important; }
  .mf-row { gap: 5px !important; }
  .m-filter { padding-top: 4px !important; }
}

/* 底部按钮栏上移，避开手机手势条 */
.pm-bottom {
  padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
}
.pm-bottom .el-button { height: 42px !important; }
/* 内容底部留白加大，避免被按钮栏遮住 */
.p-mob { padding-bottom: 96px !important; }
/* 悬浮加号按钮也上移 */
.m-fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

@media (max-width: 900px) {
  /* ---------- 去汉堡，恢复横排菜单 ---------- */
  .crm-burger { display: none !important; }
  .crm-nav { display: flex !important; overflow-x: auto !important; overflow-y: hidden;
    flex-wrap: nowrap !important; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
  .crm-nav::-webkit-scrollbar { display: none; }
  .crm-nav-item { flex: 0 0 auto !important; white-space: nowrap; padding: 0 10px !important; }

  /* ---------- 筛选 chip 铺满整行，右侧不留空 ---------- */
  .mf-row { justify-content: space-between !important; gap: 5px !important; }
  .mf-row > .mf-chip { flex: 1 1 0 !important; min-width: 0 !important; justify-content: center !important;
    text-align: center; padding: 8px 4px !important; overflow: hidden; }
  .mf-row > .mf-search { flex: 1.5 1 0 !important; justify-content: flex-start !important; }
  .mf-chip { font-size: 12px !important; }

  /* ---------- 禁止整页 / 卡片左右滑动 ---------- */
  html, body { overflow-x: hidden !important; max-width: 100vw !important; }
  .crm-layout, .crm-body, .mob-list, .mob-item, .p-mob { overflow-x: hidden !important;
    max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }

  /* ---------- 首页移动搜索 ---------- */
  .m-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
    font-size: 13.5px; color: #303133; font-family: inherit; }
  .m-search input::placeholder { color: #b0b4bb; }
  .m-search .el-icon-close { color: #c0c4cc; font-size: 15px; }
  .m-sr { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
  .m-sr-head { padding: 10px 14px; font-size: 12px; color: #909399; background: #fafbfd;
    border-bottom: 1px solid #f2f4f7; }
  .m-sr-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-bottom: 1px solid #f7f8fa; }
  .m-sr-item:last-child { border-bottom: 0; }
  .m-sr-badge { flex: 0 0 auto; font-size: 11px; color: #3d7bfd; background: #eef4ff;
    border-radius: 5px; padding: 2px 7px; }
  .m-sr-badge.pub { color: #b8860b; background: #fff7e6; }
  .m-sr-badge.lead { color: #34a853; background: #eaf7ee; }
  .m-sr-main { flex: 1 1 auto; min-width: 0; }
  .m-sr-name { font-size: 14.5px; color: #303133; font-weight: 500; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .m-sr-sub { font-size: 12px; color: #a0a4ab; margin-top: 2px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .m-sr-empty { padding: 18px; text-align: center; color: #b0b4bb; font-size: 13px; }
}

@media (max-width: 900px) {
  /* 筛选 chip 用 grid 精确铺满，绝不右侧留空 */
  .m-filter .mf-row { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important; overflow: visible !important; }
  .m-filter .mf-row:first-child { grid-template-columns: 1fr 1fr 1.6fr 0.9fr !important; }
  .m-filter .mf-row > .mf-chip, .m-filter .mf-row > .mf-search {
    flex: none !important; width: auto !important; min-width: 0 !important;
    justify-content: center !important; padding: 8px 3px !important; font-size: 11.5px !important;
  }
  .m-filter .mf-row > .mf-search { justify-content: flex-start !important; padding: 0 8px !important; }
  .m-filter .mf-row > .mf-search input { font-size: 11.5px !important; }
}

@media (max-width: 900px) {
  /* 关键字框加宽，文字不被裁 */
  .m-filter .mf-row:first-child { grid-template-columns: 0.95fr 0.95fr 2.1fr 0.75fr !important; }
  .m-filter .mf-row > .mf-search { padding: 0 7px !important; }
  .m-filter .mf-row > .mf-search input { font-size: 11px !important; }

  /* 详情页可点击行 */
  .pm-row.clickable, .pm-status.clickable, .pm-tag { cursor: pointer; }
  .pm-row.clickable:active { background: #f5f8ff; }
  .pm-status.clickable:active, .pm-tag:active { opacity: .7; }
}

@media (max-width: 900px) {
  /* 详情行：左标题固定、值可换行、右侧箭头常显 */
  .pm-row { align-items: flex-start !important; }
  .pm-row > span:first-child { flex: 0 0 auto !important; min-width: 62px !important; }
  .pm-row > b { flex: 1 1 auto !important; min-width: 0 !important; margin-left: 8px !important;
    text-align: right !important; white-space: normal !important; word-break: break-all !important;
    overflow: visible !important; text-overflow: clip !important; font-size: 13.5px !important; }
  .pm-row > i { flex: 0 0 auto !important; margin-left: 6px !important; color: #c8ccd4 !important;
    font-size: 14px !important; display: inline-block !important; }
}

/* ============ 客户编辑弹窗：加长、铺满、可滚动 ============ */
.cus-edit-dlg { max-height: 92vh; display: flex; flex-direction: column; margin-bottom: 0 !important; }
.cus-edit-dlg .el-dialog__header { padding: 14px 16px 10px !important; }
.cus-edit-dlg .el-dialog__body { flex: 1 1 auto !important; overflow-y: auto !important;
  padding: 10px 16px 14px !important; max-height: calc(92vh - 108px) !important; }
.cus-edit-dlg .el-dialog__footer { padding: 10px 16px 14px !important; border-top: 1px solid #f2f4f7; }
.cus-edit-dlg .el-form-item { margin-bottom: 14px !important; }

/* ============ 标签选择器 ============ */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; max-height: 46vh; overflow-y: auto; }
.tag-opt { font-size: 12.5px; color: #606266; border: 1px solid #e4e7ed; border-radius: 14px;
  padding: 6px 12px; cursor: pointer; background: #fff; }
.tag-opt.on { color: #3d7bfd; border-color: #b9d1ff; background: #eef4ff; font-weight: 600; }
.tag-opt:active { opacity: .7; }

@media (max-width: 900px) {
  .cus-edit-dlg { width: 94% !important; margin-top: 3vh !important; }
  .cus-edit-dlg .grid-2 { grid-template-columns: 1fr !important; display: block !important; }
  .cus-edit-dlg .el-form-item__label { font-size: 13px !important; line-height: 34px !important; }
  .cus-edit-dlg .el-dialog__body { max-height: calc(92vh - 96px) !important; }
  /* 关键字搜索 placeholder 可见 */
  .m-filter .mf-row > .mf-search input { color: #303133 !important; }
  .m-filter .mf-row > .mf-search input::placeholder { color: #a8acb4 !important; font-size: 11px !important; }
}

@media (max-width: 900px) {
  /* 搜索框独占一整行，全宽 */
  .m-filter .mf-row.mf-searchrow { display: block !important; }
  .m-filter .mf-searchrow .mf-search {
    display: flex !important; align-items: center; gap: 8px;
    width: 100% !important; height: 40px !important; box-sizing: border-box;
    background: #fff !important; border: 1px solid #dfe3eb !important; border-radius: 10px !important;
    padding: 0 12px !important; box-shadow: 0 1px 2px rgba(0,0,0,.03);
  }
  .m-filter .mf-searchrow .mf-search i.el-icon-search { color: #9aa0a8 !important; font-size: 16px !important; flex: 0 0 auto; }
  .m-filter .mf-searchrow .mf-search i.el-icon-close { color: #c0c4cc !important; font-size: 15px !important; flex: 0 0 auto; cursor: pointer; }
  .m-filter .mf-searchrow .mf-search input {
    flex: 1 1 auto !important; min-width: 0 !important; width: 100% !important;
    border: 0 !important; outline: 0 !important; background: transparent !important;
    font-size: 14px !important; color: #303133 !important; padding: 0 !important; height: 100% !important;
  }
  .m-filter .mf-searchrow .mf-search input::placeholder { color: #a8acb4 !important; font-size: 13.5px !important; }

  /* 第二行：创建日期 / 分配日期 / 排序 三等分 */
  .m-filter .mf-row.mf-row3 { display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 6px !important; }
  .m-filter .mf-row.mf-row3 > .mf-chip { flex: none !important; justify-content: center !important;
    padding: 9px 4px !important; font-size: 12.5px !important; }
  /* 第三行 5 个仍均分 */
  .m-filter .mf-row.mf-scroll { display: grid !important; grid-template-columns: repeat(5, minmax(0,1fr)) !important; gap: 5px !important; }
  .m-filter .mf-row.mf-scroll > .mf-chip { flex: none !important; justify-content: center !important;
    padding: 9px 3px !important; font-size: 11.5px !important; }
}

@media (max-width: 900px) {
  /* 搜索框真正占满整行（覆盖之前的 66px 限制） */
  .m-filter .mf-searchrow .mf-search,
  .m-filter .mf-row > .mf-search {
    flex: none !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    box-sizing: border-box !important; display: flex !important; align-items: center !important;
  }
  /* 旧的四列规则不再作用于第一行 */
  .m-filter .mf-row.mf-searchrow { grid-template-columns: 1fr !important; }
}

@media (max-width: 900px) {
  /* 移动端：去掉顶部横排菜单栏 */
  .crm-nav { display: none !important; }
  /* 左上角保留一个精简的菜单按钮（抽屉导航），否则手机上无法切换模块 */
  .crm-burger {
    display: flex !important; align-items: center; justify-content: center;
    width: 34px !important; height: 34px !important; margin-right: 2px;
    font-size: 20px !important; color: #303133 !important; cursor: pointer;
  }
  .crm-burger:active { background: #f0f2f5; border-radius: 8px; }
  .crm-brand { flex: 1 1 auto; }
}

@media (max-width: 900px) {
  /* 汉堡菜单移到最右边 */
  .crm-burger {
    order: 99 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  .crm-brand { flex: 0 1 auto !important; margin-right: 0 !important; }
  /* 返回箭头留在最左 */
  .crm-back { order: -1 !important; }
  .crm-header > .crm-brand { order: 0 !important; }
}

@media (max-width: 900px) {
  /* 汉堡菜单绝对定位到最右侧 */
  .crm-header { position: relative !important; padding-right: 44px !important; }
  .crm-burger {
    position: absolute !important; right: 6px !important; top: 50% !important;
    transform: translateY(-50%) !important; margin: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 36px !important; height: 36px !important; font-size: 21px !important; color: #303133 !important;
    z-index: 5;
  }
  .crm-burger:active { background: #f0f2f5; border-radius: 8px; }
  .crm-nav { display: none !important; }
}

@media (max-width: 900px) {
  /* 纯 CSS 三条横线，不依赖图标字体 */
  .burger-lines { display: block !important; width: 19px !important; }
  .burger-lines i { display: block !important; height: 2px !important; background: #303133 !important;
    border-radius: 2px !important; margin: 4px 0 !important; }
  .burger-lines i:first-child { margin-top: 0 !important; }
  .burger-lines i:last-child { margin-bottom: 0 !important; }
}
