* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; background: #f0f2f5; color: #303133; }
a { color: inherit; text-decoration: none; }

.app-layout { height: 100%; }
.app-aside { background: #1f2d3d; color: #bfcbd9; }
.app-aside .el-menu { background: #1f2d3d; border-right: none; }
.app-aside .logo { height: 56px; line-height: 56px; text-align: center; color: #fff; font-size: 16px; font-weight: 600; background: #182234; }
/* Font Awesome 菜单图标 */
.app-aside .el-menu-item i, .app-aside .el-sub-menu__title i { margin-right: 8px; width: 16px; text-align: center; font-size: 14px; }
.app-aside .el-menu-item.is-active i { color: #ffd04b; }
.app-header { background: #fff; border-bottom: 1px solid #e6e6e6; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
.user-avatar { background: linear-gradient(135deg,#409EFF,#2196f3); color:#fff; font-weight:600; flex-shrink:0; }
/* 头部-新线索通知铃铛 */
.notif-bell { cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; outline: none; }
.notif-bell:hover { transform: scale(1.12); transition: transform .15s; }
.app-header .el-badge__content { border: none; }
/* 月消费详情: 日期列不换行 */
.el-table .nowrap-cell .cell { white-space: nowrap; }
/* 来诊分析-信息列表按分类分块(一行两个) */
.arrive-group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.arrive-group { border: 1px solid #ebeef5; border-radius: 6px; padding: 10px 12px; background: #fafbfc; min-width: 0; }
.arrive-group-head { display: flex; align-items: center; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.arrive-group-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arrive-group .el-table { font-size: 12px; }
@media (max-width: 1200px) { .arrive-group-grid { grid-template-columns: 1fr; } }
.app-main { padding: 16px; overflow: auto; }

.page-card { background: #fff; border-radius: 6px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .scene-lbl { color: #606266; font-size: 13px; }

/* ===== 客户/公海/登记时间 顶 Tab ===== */
.pool-tabs { display: flex; gap: 6px; padding: 8px 2px; border-bottom: 1px solid #eef0f4; margin-bottom: 16px; flex-wrap: wrap; }
.pool-tab { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 16px; border-radius: 6px; transition: all .18s ease; color: #606266; font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.pool-tab i { font-size: 13px; width: 14px; text-align: center; }
.pool-tab:hover { background: #f0f5ff; color: #409eff; }
.pool-tab.active { background: #409eff; color: #fff; border-color: #409eff; }
.pool-tab.active i { color: #fff; }

/* ===== 用户管理: 左角色 + 右表格 ===== */
.user-layout { display: flex; gap: 16px; min-height: 400px; }
.user-role-nav { width: 200px; flex-shrink: 0; border: 1px solid #eef0f4; border-radius: 6px; overflow: hidden; }
.urn-title { padding: 10px 14px; font-size: 13px; font-weight: 600; color: #606266; background: #f5f7fa; border-bottom: 1px solid #eef0f4; }
.urn-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; cursor: pointer; font-size: 13px; color: #606266; border-bottom: 1px solid #f2f3f5; transition: all .15s; }
.urn-item:last-child { border-bottom: none; }
.urn-item:hover { background: #f0f5ff; color: #409eff; }
.urn-item.active { background: #ecf5ff; color: #409eff; font-weight: 600; }
.urn-count { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #f2f3f5; color: #909399; }
.urn-item.active .urn-count { background: #409eff; color: #fff; }
.user-table-wrap { flex: 1; min-width: 0; }

.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 8px; color: #fff; }
.stat-card .num { font-size: 26px; font-weight: 700; }
.stat-card .lbl { font-size: 13px; opacity: .9; }

.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f6feb 0%, #6f42c1 100%); }
.login-box { width: 360px; background: #fff; border-radius: 10px; padding: 32px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.login-box h2 { text-align: center; margin: 0 0 6px; color: #1f2d3d; }
.login-box .sub { text-align: center; color: #909399; font-size: 13px; margin-bottom: 22px; }

.tag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.chart-box { width: 100%; height: 320px; }
.muted { color: #909399; font-size: 12px; }
.overdue-row { color: #f56c6c; }

/* ===== 每日工作早报 ===== */
.mr-item { display:flex; align-items:baseline; gap:6px; padding:4px 14px; border-radius:8px; cursor:pointer; transition:background .15s; white-space:nowrap; }
.mr-item:hover { background:#f2f6fc; }
.mr-num { font-size:22px; font-weight:800; color:#303133; line-height:1; min-width:22px; text-align:center; }
.mr-lbl { font-size:13px; color:#5a6472; }
.mr-sep { width:1px; height:22px; background:#e4e7ed; margin:0 4px; }
@media (max-width:768px){ .mr-item{padding:2px 8px;} .mr-num{font-size:18px;} }

/* ===== 系统设置-参数设置 Tab ===== */
.setting-tabs > .el-tabs__header { margin-bottom: 20px; }
.setting-tabs > .el-tabs__header .el-tabs__item {
  font-size: 14px; height: 44px; line-height: 44px;
  padding: 0 22px; transition: color .15s;
}
.setting-tabs > .el-tabs__header .el-tabs__item.is-active {
  font-weight: 700;
}
.setting-tabs > .el-tabs__header .el-tabs__item i { color: #909399; font-size: 13px; }
.setting-tabs > .el-tabs__header .el-tabs__item.is-active i,
.setting-tabs > .el-tabs__header .el-tabs__item:not(.is-active):hover i { color: inherit; }
.setting-tabs > .el-tabs__content { min-height: 300px; }
.setting-tabs .el-divider--horizontal { margin: 6px 0 18px; }
.setting-tabs .el-divider__text { font-size: 13px; font-weight: 600; color: #5a6472; }

/* ===== 工作台仪表盘 ===== */
.dash-banner { background: linear-gradient(120deg,#1f2d3d 0%,#2b5a8f 55%,#36b9e0 100%); color:#fff; border-radius:10px; padding:20px 24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:16px; box-shadow:0 6px 18px rgba(31,45,61,.22); position:relative; overflow:hidden; }
.dash-banner::after { content:''; position:absolute; right:-40px; top:-40px; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,.08); }
.dash-banner .db-hello { font-size:19px; font-weight:700; letter-spacing:.5px; }
.dash-banner .db-sub { font-size:12px; opacity:.85; margin-top:8px; }
.dash-banner .db-sub i { margin-right:4px; }
.dash-banner .db-btns { display:flex; gap:10px; flex-wrap:wrap; position:relative; z-index:1; }
.dash-banner .db-btns .el-button { border:none; }
.dash-grid { display:grid; gap:14px; margin-bottom:16px; }
.dash-grid.g9 { grid-template-columns:repeat(9,1fr); }
.dash-grid.g8 { grid-template-columns:repeat(8,1fr); }
.dash-grid.g7 { grid-template-columns:repeat(7,1fr); }
.dash-grid.g6 { grid-template-columns:repeat(6,1fr); }
.dash-grid.g4 { grid-template-columns:repeat(4,1fr); }
.dash-grid.g3 { grid-template-columns:repeat(3,1fr); }
.dash-grid.g2 { grid-template-columns:repeat(4,1fr); }
@media (max-width:1500px){ .dash-grid.g9 { grid-template-columns:repeat(5,1fr); } .dash-grid.g7 { grid-template-columns:repeat(4,1fr); } }
@media (max-width:1400px){ .dash-grid.g8 { grid-template-columns:repeat(4,1fr); } .dash-grid.g6 { grid-template-columns:repeat(3,1fr); } .dash-grid.g9 { grid-template-columns:repeat(3,1fr); } .dash-grid.g3 { grid-template-columns:repeat(3,1fr); } }
@media (max-width:900px){ .dash-grid.g9,.dash-grid.g8,.dash-grid.g7,.dash-grid.g6,.dash-grid.g4,.dash-grid.g3,.dash-grid.g2 { grid-template-columns:repeat(2,1fr); } }
.dash-stat { background:#fff; border-radius:10px; padding:14px 16px; display:flex; align-items:center; gap:12px; box-shadow:0 2px 10px rgba(31,45,61,.07); border:1px solid #f0f2f5; transition:transform .18s ease, box-shadow .18s ease; cursor:default; }
.dash-stat:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(31,45,61,.14); }
.dash-stat .ds-icon { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:18px; color:#fff; flex-shrink:0; }
.dash-stat .ds-info { min-width:0; }
.dash-stat .ds-lbl { font-size:15px; font-weight:700; color:#909399; white-space:nowrap;f }
.dash-stat .ds-num { font-size:18px; font-weight:700; color:#303133; line-height:1.25; margin-top:2px; white-space:nowrap; }
.ds-bg-blue   { background:linear-gradient(135deg,#36b9e0,#2196f3); }
.ds-bg-green  { background:linear-gradient(135deg,#3ddc97,#16a085); }
.ds-bg-purple { background:linear-gradient(135deg,#9b6df0,#7c3aed); }
.ds-bg-orange { background:linear-gradient(135deg,#f5a623,#f5785f); }
.ds-bg-red    { background:linear-gradient(135deg,#f5785f,#e84a3f); }
.ds-bg-cyan   { background:linear-gradient(135deg,#38c6d9,#1a9fb8); }
.ds-bg-teal   { background:linear-gradient(135deg,#2bb3a3,#0e8f7e); }
.ds-bg-indigo { background:linear-gradient(135deg,#6a8dff,#4a6cf7); }
.ds-bg-slate { background:linear-gradient(135deg,#94a3b8,#64748b); }
.dash-cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.dash-cols.c3 { grid-template-columns:1.15fr 1fr 1fr; }
@media (max-width:1200px){ .dash-cols.c3 { grid-template-columns:1fr; } }
@media (max-width:1100px){ .dash-cols { grid-template-columns:1fr; } }
.dash-section-title { font-weight:600; font-size:14px; margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.dash-section-title i { color:#409eff; }
.rank-1 { color:#f5a623; font-weight:700; }
.rank-2 { color:#909399; font-weight:700; }
.rank-3 { color:#cd7f32; font-weight:700; }
.map-box { width:100%; height:420px; }

/* ===== 应用管理 ===== */
.appm-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.appm-title { display:flex; align-items:center; gap:12px; font-size:20px; font-weight:700; color:#1f2d3d; }
.appm-logo { width:42px; height:42px; border-radius:10px; background:linear-gradient(135deg,#ff9a56,#ff7a2e); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; box-shadow:0 4px 12px rgba(255,122,46,.35); }
.appm-sec { font-size:13px; color:#909399; margin:18px 0 10px; }
.appm-grid { display:flex; flex-wrap:wrap; gap:14px; }
.appm-card { width:264px; display:flex; align-items:center; gap:12px; padding:16px 14px; background:#fff; border:1px solid #f0f2f5; border-radius:10px; cursor:pointer; transition:transform .18s ease, box-shadow .18s ease; position:relative; }
.appm-card:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(31,45,61,.12); }
.appm-card.is-disabled { background:#f7f8fa; border-color:#ebeef2; }
.appm-card.is-disabled .appm-name { color:#909399; }
.appm-icon { width:46px; height:46px; border-radius:10px; color:#fff; display:flex; align-items:center; justify-content:center; font-size:19px; flex-shrink:0; }
.appm-name { font-size:14px; font-weight:600; color:#303133; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.appm-more { width:26px; height:26px; border-radius:6px; display:flex; align-items:center; justify-content:center; color:#909399; cursor:pointer; }
.appm-more:hover { background:#eef1f5; color:#409eff; }
.appm-soon { font-size:11px; color:#b8bfc9; border:1px solid #e4e8ee; border-radius:10px; padding:1px 8px; }
.appm-icons { display:flex; flex-wrap:wrap; gap:8px; }
.appm-pick-icon { width:38px; height:38px; border-radius:8px; border:2px solid transparent; background:#f2f4f7; color:#5a6472; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:15px; }
.appm-pick-icon:hover { background:#e8eef7; }
.appm-pick-icon.active { border-color:#409eff; color:#409eff; background:#ecf5ff; }
.appm-colors { display:flex; gap:10px; }
.appm-pick-color { width:26px; height:26px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; border:2px solid transparent; box-shadow:inset 0 0 0 2px rgba(255,255,255,.4); }
.appm-pick-color.active { border-color:#303133; }

/* ===== HTML 富文本编辑器(对话记录) ===== */
.html-editor { border: 1px solid #dcdfe6; border-radius: 4px; width: 100%; background: #fff; }
.html-editor .he-toolbar { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-bottom: 1px solid #ebeef5; background: #f5f7fa; flex-wrap: wrap; }
.he-btn { border: none; background: transparent; cursor: pointer; padding: 2px 6px; border-radius: 3px; font-size: 13px; color: #606266; line-height: 1.4; }
.he-btn:hover { background: #e6e8eb; color: #409eff; }
.he-sep { width: 1px; height: 14px; background: #dcdfe6; margin: 0 2px; }
.he-color { display: flex; align-items: center; gap: 2px; font-size: 13px; color: #606266; cursor: pointer; }
.he-color input[type=color] { width: 18px; height: 18px; border: none; padding: 0; background: none; cursor: pointer; }
.he-body { min-height: 110px; max-height: 260px; overflow-y: auto; padding: 8px 10px; font-size: 14px; line-height: 1.6; outline: none; }
.he-body:empty:before { content: attr(data-placeholder); color: #c0c4cc; }
.he-body img { max-width: 100%; }
.he-body ol, .he-body ul { padding-left: 20px; margin: 4px 0; }

/* ===== 详情页对话记录展示 ===== */
.chat-record { border: 1px solid #ebeef5; border-radius: 4px; padding: 10px 12px; background: #fafafa; font-size: 13px; line-height: 1.7; word-break: break-word; }
.chat-record ol, .chat-record ul { padding-left: 20px; margin: 4px 0; }
.chat-record img { max-width: 100%; }

/* ===== 信息列表美化 ===== */
.cust-table { border-radius: 6px; overflow: hidden; }
.cust-table th.el-table__cell { background: #f5f7fb !important; color: #303133; font-weight: 600; }
.cust-table .el-table__row:hover td.el-table__cell { background: #ecf5ff !important; }
.cust-no {
    display: inline-block; min-width: 34px; padding: 1px 8px; border-radius: 10px;
    background: #f4f4f5; color: #909399; font-family: Consolas, Menlo, monospace;
    font-size: 12px; text-align: center;
}
.contact-cell { font-family: Consolas, Menlo, monospace; font-size: 12px; color: #606266; }

/* 录入表单: 实时查重提示 */
.dup-tip {
    margin-top: 4px; padding: 4px 8px; border-radius: 4px;
    background: #fef0f0; border: 1px solid #fbc4c4; color: #f56c6c;
    font-size: 12px; line-height: 1.4;
}

/* ===== 线索详情美化 ===== */
.detail-back { margin-bottom: 12px; }
.detail-header {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
    border: 1px solid #e4ecf7; border-radius: 8px;
    padding: 14px 18px; margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dh-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cust-no-lg { background: #ecf5ff; color: #409eff; font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 12px; }
.dh-name { font-size: 17px; font-weight: 700; color: #1f2d3d; }
.dh-contact { font-size: 13px; }
.detail-tabs-card { padding-top: 4px; }
.detail-tabs-card .el-tabs__item { font-weight: 600; }
.detail-desc { margin-bottom: 18px; }
.detail-desc .el-descriptions__label { width: 110px; background: #fafbfc; }
.block-title {
    font-weight: 600; font-size: 14px; color: #303133;
    margin-bottom: 10px; padding-left: 8px; border-left: 3px solid #409eff; line-height: 1.2;
}
.chat-block { margin-top: 18px; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }

/* ===== 基本信息+沟通记录 左右布局 ===== */
.base-chat-wrap { display: flex; gap: 16px; align-items: flex-start; }
.base-info-col { flex: 0 0 44%; min-width: 380px; }
.chat-col { flex: 1; min-width: 0; }
.base-info-row { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid #ebeef5; border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.bi-item { display: inline-flex; align-items: baseline; border-bottom: 1px solid #f2f4f7; border-right: 1px solid #f2f4f7; padding: 6px 10px; min-width: 50%; font-size: 13px; line-height: 1.5; }
.bi-item.bi-full { width: 100%; }
.bi-lbl { color: #909399; white-space: nowrap; min-width: 64px; font-size: 12px; }
.bi-lbl::after { content: '：'; }
.bi-val { color: #303133; font-weight: 500; word-break: break-all; }
.base-info-extra { margin-bottom: 14px; }
.base-info-bottom { border: 1px solid #ebeef5; border-radius: 6px; overflow: hidden; }
.bi-bottom-item { display: flex; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.bi-bottom-item:last-child { border-bottom: none; }
.bi-bottom-item .bi-lbl { min-width: 50px; }
.chat-col .chat-record { min-height: 200px; max-height: 600px; overflow-y: auto; }
@media (max-width: 1024px) {
    .base-chat-wrap { flex-direction: column; }
    .base-info-col { flex: 1 1 100%; min-width: 0; }
    .chat-col { flex: 1 1 100%; }
}
.sub-card { margin-bottom: 16px; box-shadow: none; border: 1px solid #ebeef5; padding: 12px; }

/* 修改记录时间线 */
.cl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-user { font-weight: 600; font-size: 13px; color: #303133; }
.cl-changes { margin-top: 6px; border: 1px solid #ebeef5; border-radius: 6px; overflow: hidden; }
.cl-row {
    display: flex; align-items: flex-start; padding: 6px 10px; font-size: 13px; line-height: 1.5;
    border-bottom: 1px solid #f2f4f7;
}
.cl-row:last-child { border-bottom: none; }
.cl-row:nth-child(odd) { background: #fafbfc; }
.cl-label { flex: 0 0 88px; color: #909399; }
.cl-val { flex: 1; word-break: break-word; }
.cl-old { color: #f56c6c; background: #fef0f0; padding: 0 6px; border-radius: 3px; text-decoration: line-through; text-decoration-color: rgba(245,108,108,.5); }
.cl-arrow { color: #c0c4cc; margin: 0 6px; }
.cl-new { color: #67c23a; background: #f0f9eb; padding: 0 6px; border-radius: 3px; font-weight: 600; }

/* ===== 患者详情: 附加号码卡片(图标上/备注中/号码下, 一行四个) ===== */
.phone-extras {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.phone-card {
    position: relative;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 12px 8px 10px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    text-align: center;
    transition: box-shadow .15s, transform .15s;
}
.phone-card:hover {
    box-shadow: 0 2px 8px rgba(64, 158, 255, .12);
    transform: translateY(-1px);
    border-color: #c6e2ff;
}
.phone-card .ph-icon {
    font-size: 22px;
    line-height: 1;
    color: #409EFF;
    margin-bottom: 6px;
}
.phone-card .ph-remark {
    color: #909399;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phone-card .ph-num {
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
    color: #303133;
    letter-spacing: .3px;
}
.phone-card .ph-del {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 2px 4px;
    height: auto;
    min-height: 0;
}
/* 屏幕较窄时退化为两列, 避免挤压 */
@media (max-width: 1280px) {
    .phone-extras { grid-template-columns: repeat(2, 1fr); }
}
.phone-add { margin-top: 10px; display: flex; align-items: flex-start; gap: 4px; flex-wrap: wrap; }
.phone-add .dup-tip { width: 100%; }

/* ===== 下次回访: 快捷选择天数按钮 ===== */
.quick-days { margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quick-days .qd-lbl { color: #909399; font-size: 12px; }
.quick-days .el-button { padding: 4px 10px; }

/* ===== 患者灵活标签 ===== */
.cust-tag { border-radius: 10px; font-weight: normal; margin: 1px 3px 1px 0; }
.tag-pill { display: inline-block; border-radius: 10px; padding: 1px 9px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.tag-color-dot { display: inline-block; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; box-sizing: border-box; }
.tag-color-dot.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #409eff; }

/* ===== 回访弹窗: 智能话术推荐面板 ===== */
.kb-reco { background: #f4f9ff; border: 1px solid #d6e8ff; border-radius: 8px; padding: 10px 12px; margin-bottom: 4px; }
.kb-reco-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; font-size: 14px; }
.kb-reco-title { font-size: 13px; color: #303133; }
.kb-reco .el-collapse { border-top: none; }
.kb-reco .el-collapse-item__header { background: transparent; border-bottom: 1px dashed #c6ddff; height: 38px; line-height: 38px; }
.kb-reco .el-collapse-item__wrap { background: transparent; border-bottom: none; }
.kb-reco .el-collapse-item__content { padding-bottom: 8px; }
.kb-reco-desc { font-size: 13px; color: #444; background: #fff; border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; white-space: pre-wrap; border: 1px solid #e4eefb; }
.kb-qa { margin-bottom: 6px; }
.kb-qa-q { font-size: 13px; font-weight: 600; color: #303133; }
.kb-qa-a { font-size: 13px; color: #555; background: #fff; border-radius: 6px; padding: 6px 10px; margin-top: 2px; white-space: pre-wrap; border: 1px solid #e4eefb; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kb-qa-a .el-button { flex-shrink: 0; padding: 0; height: auto; }
.kb-reco-actions { text-align: right; }

/* ===== 回访任务: 表格行状态 ===== */
.ft-table .el-table__row.ft-row-overdue  td { background-color: #fef0f0 !important; }
.ft-table .el-table__row.ft-row-overdue:hover > td { background-color: #fde2e2 !important; }
.ft-table .el-table__row.ft-row-todo     td { background-color: #f4faff; }
.ft-table .el-table__row.ft-row-todo:hover > td { background-color: #e6f2ff; }
.ft-table .el-table__row.ft-row-done     td { opacity: .9; }
.txt-danger { color: #f56c6c; font-weight: 600; }
.urn-count-warn { background: #f56c6c !important; color: #fff !important; }

/* ===== 预约管理: 月视图日历 ===== */
.ap-wrap {}
.ap-cal-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.ap-cal-title { display: flex; align-items: center; }
.ap-cal-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ap-chip { padding: 4px 12px; border-radius: 16px; font-size: 13px; background: #f4f6fa; color: #303133; }
.ap-chip-all     { background: #ecf5ff; color: #2563eb; font-weight: 600; }
.ap-chip-pending { background: #fdf6ec; color: #e6a23c; }
.ap-chip-arrived { background: #f0f9eb; color: #67c23a; }
.ap-chip-noshow  { background: #fef0f0; color: #f56c6c; }
.ap-calendar { border: 1px solid #ebeef5; border-radius: 8px; overflow: hidden; }
.ap-cal-week { display: grid; grid-template-columns: repeat(7,1fr); background: #fafafa; }
.ap-cal-weekday { padding: 10px 0; text-align: center; font-size: 13px; color: #606266; border-right: 1px solid #ebeef5; }
.ap-cal-weekday:last-child { border-right: none; }
.ap-cal-weekday.wkend { color: #e6a23c; font-weight: 600; background: #fff7ed; }
.ap-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.ap-cal-cell { min-height: 110px; border-right: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2; display: flex; flex-direction: column; padding: 6px; transition: all .18s ease; cursor: pointer; background: #fff; }
.ap-cal-cell:nth-child(7n) { border-right: none; }
.ap-cal-cell.other { background: #fafafa; color: #c0c4cc; }
.ap-cal-cell.wkend { background: #fffdf7; }
.ap-cal-cell.today .ap-cal-hd .ap-cal-dnum { background: #409eff; color: #fff; border-radius: 50%; }
.ap-cal-cell.active { outline: 2px solid #409eff; outline-offset: -2px; background: #ecf5ff; z-index: 1; }
.ap-cal-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 4px; }
.ap-cal-dnum { width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 13px; font-weight: 500; }
.ap-cal-dot { background: #409eff; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.ap-cal-body { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.ap-cal-ap { font-size: 11.5px; padding: 2px 5px; border-radius: 4px; display: flex; justify-content: space-between; line-height: 1.5; cursor: pointer; }
.ap-cal-ap.st-pending { background: #ecf5ff; color: #1e56a0; border-left: 3px solid #409eff; }
.ap-cal-ap.st-arrived { background: #f0f9eb; color: #2b7e2b; border-left: 3px solid #67c23a; }
.ap-cal-ap.st-noshow  { background: #fef0f0; color: #9e3d3d; border-left: 3px solid #f56c6c; }
.ap-cal-ap.st-reschedule { background: #fdf6ec; color: #9a6b1c; border-left: 3px solid #e6a23c; }
.ap-cal-ap.st-medicine  { background: #f0eaff; color: #722ed1; border-left: 3px solid #9254de; }
.ap-cal-ap.st-inspect   { background: #e6fffb; color: #08979c; border-left: 3px solid #13c2c2; }
.ap-cal-tm { font-family: Menlo, Consolas, monospace; font-weight: 700; }
.ap-cal-nm { max-width: 60%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.ap-cal-more { font-size: 11px; padding: 1px 5px; cursor: pointer; }
.ap-list-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ap-list-title strong { font-size: 15px; }

/* ===== 消费管理(详情页模块 + 消费统计页) ===== */
.cons-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cons-total { font-size: 15px; color: #303133; }
.cons-total strong { color: #e6a23c; font-size: 20px; font-family: Menlo, Consolas, monospace; margin-left: 4px; }
.cons-meta { font-size: 12px; }
.cons-amt { color: #e6a23c; font-weight: 700; font-family: Menlo, Consolas, monospace; }
.cons-dot { background: #e6a23c; }
.ap-chip-cate { background: #fdf6ec; color: #b88230; }

/* 医生开发卡片 */
.doc-dept-section { margin-bottom: 20px; }
.doc-dept-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; margin-bottom: 10px;
    background: linear-gradient(135deg, #f0f5ff, #e6f0ff);
    border-left: 4px solid #409EFF; border-radius: 6px;
    font-weight: 600; font-size: 14px; color: #303133;
}
.doc-dept-summary { font-weight: 400; font-size: 13px; color: #606266; }
.doc-dept-summary b { font-size: 14px; }

.doc-card-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
    gap: 12px;
}
.doc-card {
    border: 1px solid #ebeef5; border-radius: 8px;
    background: #fff; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.doc-card:hover {
    box-shadow: 0 4px 12px rgba(64,158,255,0.15);
    transform: translateY(-2px);
}
.doc-card-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f9fcff, #f0f4f8);
    border-bottom: 1px solid #f0f0f0;
}
.doc-card-name { font-weight: 600; font-size: 14px; color: #303133; }
.doc-card-amt {
    font-size: 18px; font-weight: 700; color: #E6A23C;
    white-space: nowrap;
}
.doc-card-meta {
    display: flex; gap: 16px; padding: 6px 14px;
    font-size: 12px; color: #909399;
}
.doc-card-meta b { color: #606266; font-weight: 600; }
.doc-card-body { padding: 0 8px 8px; }
.doc-card-body .el-table { font-size: 12px; }
.doc-card-body .el-table th.el-table__cell { background: #fafbfc; padding: 4px 0; }
.doc-card-body .el-table td.el-table__cell { padding: 4px 0; }
.doc-card-tabs { margin-top: 2px; }
.doc-card-tabs .el-tabs__header { margin: 0 6px; }
.doc-card-tabs .el-tabs__nav-wrap::after { display: none; }
.doc-card-tabs .el-tabs__item {
    height: 30px; line-height: 30px; font-size: 13px; padding: 0 12px;
}
.doc-card-tabs .el-tabs__content { padding-top: 4px; }
.doc-tab-count {
    display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
    padding: 0 5px; margin-left: 4px; border-radius: 9px;
    font-size: 11px; font-weight: 600; text-align: center;
    background: #ecf5ff; color: #409eff;
}
.doc-tab-arrived { background: #f0f9eb; color: #67c23a; }

/* 回访核算 */
.fw-dept-section { margin-bottom: 20px; }
.fw-dept-section .doc-dept-header {
    background: linear-gradient(135deg, #f0f9eb, #e8f5e0);
    border-left-color: #67c23a;
}
.fw-card-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
    gap: 12px;
}
.fw-card {
    border: 1px solid #ebeef5; border-radius: 8px;
    background: #fff; padding: 12px 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.fw-card:hover {
    box-shadow: 0 4px 12px rgba(103,194,58,0.15);
    transform: translateY(-2px);
}
.fw-card-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 8px; margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.fw-card-name { font-weight: 600; font-size: 15px; color: #303133; }
.fw-card-ratio { font-size: 12px; color: #909399; }
.fw-card-ratio b { font-size: 15px; }
.fw-card-stats {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 6px 4px; text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.fw-stat-num { font-size: 22px; font-weight: 700; color: #303133; font-family: Menlo, Consolas, monospace; line-height: 1.2; }
.fw-stat-label { font-size: 12px; color: #909399; margin-top: 2px; }
.fw-card-patients {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px dashed #ebeef5;
}
.fw-patients-title {
    font-size: 13px; font-weight: 600; color: #303133;
    margin-bottom: 6px; display: flex; align-items: center;
}
.fw-patients-count {
    display: inline-block; min-width: 20px; height: 18px; line-height: 18px;
    padding: 0 6px; margin-left: 6px; border-radius: 9px;
    font-size: 11px; font-weight: 600; text-align: center;
    background: #f0f9eb; color: #67c23a;
}
.fw-card-patients .el-table { font-size: 12px; }
.fw-card-patients .el-table th.el-table__cell { background: #fafbfc; padding: 3px 0; }
.fw-card-patients .el-table td.el-table__cell { padding: 3px 0; }
.fw-pat-tabs { margin-top: 2px; }
.fw-pat-tabs .el-tabs__header { margin-bottom: 6px; }
.fw-pat-tabs .el-tabs__nav-wrap::after { display: none; }
.fw-pat-tabs .el-tabs__item { height: 30px; line-height: 30px; font-size: 13px; padding: 0 10px; }
.fw-pat-tabs .el-tabs__content { min-height: 40px; }
.ap-cal-ap.st-cons { background: #fdf6ec; color: #9a6b1c; border-left: 3px solid #e6a23c; }

/* ===== 通用文本工具类 ===== */
.muted { color: #909399; }

/* ===== 今日任务页 ===== */
/* ===== 今日任务: 卡片式布局 ===== */
.tt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tt-title { font-size: 16px; font-weight: 600; color: #303133; }
.tt-date { margin-left: 8px; font-size: 13px; font-weight: 400; }
.tt-card { background: #fff; border-radius: 8px; padding: 14px 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid #eef0f4; }
.tt-card-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #ebeef5; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.tt-user { display: flex; align-items: center; gap: 12px; }
.tt-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,#409eff,#67c23a); color: #fff; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tt-user-name { font-size: 14px; font-weight: 600; color: #303133; }
.tt-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.tt-stats .el-tag i { margin-right: 3px; }
.tt-section { margin-top: 10px; }

/* 自媒体列表-有效性Tab计数徽标 */
.tab-count { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 600; text-align: center; background: rgba(255,255,255,.25); color: #fff; }
.pool-tab:not(.active) .tab-count.all { background: #e4e7ed; color: #606266; }
.pool-tab:not(.active) .tab-count.valid { background: #e1f3d8; color: #67c23a; }
.pool-tab:not(.active) .tab-count.invalid { background: #fde2e2; color: #f56c6c; }
.pool-tab:not(.active) .tab-count.unset { background: #e9e9eb; color: #909399; }
.tt-section-title { font-size: 13px; font-weight: 600; color: #606266; margin-bottom: 8px; padding-left: 8px; border-left: 3px solid #409eff; }
.tt-empty-tip { padding: 14px 0; font-size: 13px; text-align: center; background: #fafafa; border-radius: 4px; margin-top: 8px; }
.tt-empty-tip i { margin-right: 4px; }

/* ===== 患者详情页 - 基本信息左右布局 ===== */
.base-info-grid { display: flex; gap: 16px; align-items: flex-start; }
.base-info-col { flex: 0 0 50%; min-width: 0; }
.base-chat-col { flex: 1; min-width: 0; }
.base-chat-col .chat-block { margin-top: 0; }
@media (max-width: 1200px) {
    .base-info-grid { flex-direction: column; }
    .base-info-col { flex: 1 1 100%; }
}

/* ===== 关联转介绍人弹窗 - 选中行高亮(高对比) ===== */
.ref-tbl .el-table__body tr { cursor: pointer; }
.ref-tbl .el-table__body tr.current-row > td.el-table__cell {
    background-color: #1890ff !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* ===== 自媒体有效性判定标准展示 ===== */
.valid-standard { background: #f4f8ff; border: 1px solid #d9e8ff; border-radius: 6px; padding: 10px 12px; font-size: 13px; line-height: 1.8; color: #4a5568; white-space: pre-wrap; }

/* ===== 客服数据(按科室→角色分组) ===== */
.wl-info { background: #ecf5ff; border-left: 3px solid #409eff; padding: 8px 12px; border-radius: 4px; color: #409eff; font-size: 13px; margin-bottom: 14px; }
.wl-dept-block { margin-bottom: 22px; border: 1px solid #ebeef5; border-radius: 8px; padding: 14px 16px; background: #fafbfc; }
.wl-dept-block:last-child { margin-bottom: 0; }
.wl-dept-title { font-size: 15px; font-weight: 700; color: #303133; padding: 0 4px 8px 4px; border-bottom: 2px solid #409eff; display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.wl-dept-title i { color: #409eff; }
.wl-role-sub { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px 2px; }
.wl-role-badge { display: inline-block; padding: 2px 12px; background: linear-gradient(135deg, #409eff, #5ca9ff); color: #fff; border-radius: 12px; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.wl-role-count { color: #909399; font-size: 12px; }
.wl-roles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wl-roles-grid > :only-child { grid-column: 1 / -1; } /* 只有一个角色时独占整行 */
.wl-role-cell { background: #fff; border: 1px solid #ebeef5; border-radius: 6px; padding: 8px 10px; overflow: hidden; }
.wl-role-cell .el-table { margin-top: 4px; font-size: 12px; }
.wl-role-cell .el-table th, .wl-role-cell .el-table td { padding: 4px 0 !important; font-size: 12px; }
.wl-today-row td { background: #ecf5ff !important; }

/* ========== 知识库/话术库 美化样式 ========== */
.kb-page { padding: 0; }
.kb-page-header { padding: 16px 20px 0; }
.kb-page-title {
    font-weight: 600; font-size: 16px; color: #303133;
    display: flex; align-items: center; gap: 8px;
}
.kb-page-title i { color: #409EFF; }

/* 角色 tab */
.kb-role-tabs-wrap { padding: 8px 20px 0; border-bottom: 1px solid #f0f2f5; }
.kb-role-tabs-wrap .el-tabs__item { font-size: 15px; }

/* 工具栏 */
.kb-toolbar {
    display: flex; gap: 10px; padding: 14px 20px 6px; align-items: center; flex-wrap: wrap;
}
.kb-search { max-width: 380px; }

/* 分类标签 */
.kb-cat-tags {
    display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 20px 12px;
    border-bottom: 1px solid #f0f2f5;
}
.kb-cat-tag { border-radius: 16px !important; font-size: 14px; }

/* 主布局 */
.kb-main-layout { display: flex; gap: 18px; padding: 16px 20px 24px; }

/* 左侧锚点导航 */
.kb-anchor-aside {
    width: 280px; flex-shrink: 0; position: sticky; top: 64px; align-self: flex-start;
    background: #fafbfc; border: 1px solid #ebeef5; border-radius: 10px;
    padding: 12px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.kb-anchor-aside::-webkit-scrollbar { width: 4px; }
.kb-anchor-aside::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 2px; }
.kb-anchor-title {
    font-size: 13px; color: #909399; padding: 2px 4px 10px;
    border-bottom: 1px dashed #e4e7ed; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.kb-anchor-group { margin-bottom: 12px; }
.kb-anchor-cat {
    font-weight: 600; font-size: 15px; color: #303133;
    padding: 6px 10px; background: #ecf5ff; color: #409EFF;
    border-radius: 6px; margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.kb-anchor-link {
    display: block; padding: 5px 10px; font-size: 13px; color: #606266;
    text-decoration: none; border-radius: 4px; line-height: 1.6;
    transition: all .15s; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-anchor-link:hover { background: #ecf5ff; color: #409EFF; }

/* 右侧列表区 */
.kb-list-area { flex: 1; min-width: 0; }

/* 话术卡片 */
.kb-script-card {
    border: 1px solid #ebeef5; border-radius: 10px; margin-bottom: 14px; overflow: hidden;
    background: #fff; transition: box-shadow .2s, transform .2s;
    scroll-margin-top: 80px;
}
.kb-script-card:hover {
    box-shadow: 0 4px 16px rgba(64,158,255,0.12);
    transform: translateY(-1px);
}
.kb-script-head {
    background: linear-gradient(135deg, #f0f7ff 0%, #fafbfc 100%);
    padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #ebeef5;
}
.kb-script-head-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-script-title { font-weight: 600; font-size: 15px; color: #303133; }
.kb-role-tag { margin-left: 2px !important; }
.kb-cat-badge {
    font-size: 12px; color: #909399; display: inline-flex; align-items: center; gap: 4px;
}
.kb-qa-count { font-size: 12px; color: #409EFF; background: #ecf5ff; padding: 3px 10px; border-radius: 12px;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* 描述 */
.kb-script-desc {
    padding: 10px 16px 0; color: #606266; font-size: 13px; line-height: 1.7;
    background: #fcfcfd;
}
.kb-script-desc i { color: #909399; margin-right: 6px; }

/* 问答区 */
.kb-script-body { padding: 8px 16px 14px; }
.kb-qa-item { padding: 10px 0; border-bottom: 1px dashed #ebeef5; }
.kb-qa-item:last-child { border-bottom: none; }

.kb-qa-q { color: #303133; font-weight: 500; font-size: 13px; margin-bottom: 6px; display: flex; gap: 8px; align-items: flex-start; }
.kb-q-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #409EFF; color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0;
}

.kb-qa-a { color: #606266; font-size: 13px; line-height: 1.8; white-space: pre-wrap; display: flex; gap: 8px; align-items: flex-start; padding-left: 2px; }
.kb-a-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #67C23A; color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0;
}

.kb-empty { padding: 10px 0; font-size: 13px; color: #909399; text-align: center; }
.kb-more { padding: 10px 0 2px; text-align: center; }

.kb-detail-wrap { padding: 16px 20px 24px; }
.kb-detail-back { margin-bottom: 12px; }
.kb-detail-card { border: 1px solid #ebeef5; border-radius: 10px; overflow: hidden; background: #fff; }
.kb-detail-head {
    background: linear-gradient(135deg, #f0f7ff 0%, #fafbfc 100%);
    padding: 18px 22px; border-bottom: 1px solid #ebeef5;
}
.kb-detail-title { font-weight: 600; font-size: 17px; color: #303133; margin-bottom: 10px; }
.kb-detail-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kb-detail-desc {
    margin-top: 10px; color: #606266; font-size: 13px; line-height: 1.7; padding-top: 10px;
    border-top: 1px dashed #e4e7ed;
}
.kb-detail-body { padding: 14px 22px 20px; }
.kb-detail-qa { padding: 14px 0; border-bottom: 1px dashed #ebeef5; }
.kb-detail-qa:last-child { border-bottom: none; }
.kb-detail-qa .kb-q-mark, .kb-detail-qa .kb-a-mark { width: 24px; height: 24px; font-size: 12px; }
.kb-detail-qa .kb-qa-q { font-size: 14px; }
.kb-detail-qa .kb-qa-a { font-size: 14px; }

/* ========== 转介渠道统计卡片 ========== */
.referral-stat-card {
    display: flex; align-items: center; gap: 14px;
    border-radius: 10px; padding: 18px 20px; min-height: 80px;
}
.referral-stat-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}
.referral-stat-info { display: flex; flex-direction: column; gap: 2px; }
.referral-stat-lbl { font-size: 13px; color: #909399; }
.referral-stat-num { font-size: 24px; font-weight: 700; color: #303133; }
.referral-stat-total { background: #f0f9ff; border: 1px solid #d0e8ff; }
.referral-stat-total .referral-stat-icon { background: linear-gradient(135deg, #409EFF, #79bbff); }
.referral-stat-arrived { background: #f0f9eb; border: 1px solid #d1edc4; }
.referral-stat-arrived .referral-stat-icon { background: linear-gradient(135deg, #67C23A, #95d475); }
.referral-stat-rate { background: #fdf6ec; border: 1px solid #f3d97e; }
.referral-stat-rate .referral-stat-icon { background: linear-gradient(135deg, #E6A23C, #eebe6d); }

/* 转介渠道统计卡: 6张一排紧凑显示 */
.referral-stat-row .el-col { min-width: 0; }
.referral-stat-row .referral-stat-card { height: 100%; padding: 14px 12px; gap: 8px; min-height: 72px; }
.referral-stat-row .referral-stat-icon { width: 40px; height: 40px; font-size: 18px; }
.referral-stat-row .referral-stat-info { min-width: 0; flex: 1; gap: 1px; }
.referral-stat-row .referral-stat-lbl { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.referral-stat-row .referral-stat-num { font-size: 20px; white-space: nowrap; }
@media (max-width: 1200px) {
    .referral-stat-row .referral-stat-icon { width: 34px; height: 34px; font-size: 16px; }
    .referral-stat-row .referral-stat-num { font-size: 18px; }
    .referral-stat-row .referral-stat-card { padding: 12px 10px; gap: 6px; }
}

/* 自媒体核算规则设置框 */
.ma-rule-box {
    background: #fdf9f0; border: 1px solid #f3d97e; border-radius: 8px;
    padding: 14px 16px; margin-top: 10px;
}
.ma-rule-box .el-input-number .el-input__inner { text-align: center; }

/* 月核算统计卡片行: 强制4张一排不换行 */
.ma-stat-row { display: flex; gap: 14px; margin-top: 14px; flex-wrap: nowrap; min-width: 0; }
.ma-stat-item { flex: 1 1 0; min-width: 0; }
.ma-stat-item .referral-stat-card { height: 100%; padding: 16px 14px; gap: 10px; }
.ma-stat-item .referral-stat-icon { width: 42px; height: 42px; font-size: 19px; }
.ma-stat-item .referral-stat-info { min-width: 0; flex: 1; }
.ma-stat-item .referral-stat-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-stat-item .referral-stat-num { font-size: 22px; white-space: nowrap; }

/* 成本核算 */
.ma-cost-box {
    margin-top: 16px; border: 1px solid #e4d7f5; border-radius: 8px;
    background: linear-gradient(135deg, #faf7ff 0%, #f3efff 100%);
    padding: 14px 16px;
}
.ma-cost-title { font-weight: 600; color: #6b46c1; margin-bottom: 12px; font-size: 14px; }
.ma-cost-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ma-cost-item {
    flex: 1 1 0; min-width: 130px; background: #fff; border: 1px solid #ece6f7;
    border-radius: 6px; padding: 10px 14px; text-align: center;
}
.ma-cost-item.ma-cost-total { border-color: #b794f4; background: linear-gradient(135deg, #faf5ff, #f3e8ff); }
.ma-cost-lbl { font-size: 12px; color: #888; margin-bottom: 4px; }

/* ===== 消息中心 / 待办提醒 ===== */
.msg-bell { font-size: 17px; color: #5a6a7a; }
.msg-bell:hover { color: #409eff; }
.notif-badge-wrap { display: inline-flex; align-items: center; }
/* 顶栏下拉 popover */
.notif-popover.el-popover.el-popper { padding: 0 !important; }
.notif-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
.notif-pop-unread { color: #f56c6c; font-size: 12px; margin-left: 8px; font-weight: 600; }
.notif-pop-empty { padding: 30px 10px; text-align: center; color: #b0b6bf; }
.notif-pop-empty i { font-size: 28px; margin-bottom: 8px; display: block; }
.notif-pop-list { max-height: 360px; overflow-y: auto; }
.notif-pop-item { display: flex; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5; position: relative; }
.notif-pop-item:hover { background: #f7f9fc; }
.notif-pop-item.unread { background: #f0f7ff; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: #c0c4cc; }
.notif-dot.lv-danger { background: #f56c6c; } .notif-dot.lv-warn { background: #e6a23c; }
.notif-dot.lv-info { background: #409eff; } .notif-dot.lv-success { background: #67c23a; }
.notif-pop-body { min-width: 0; flex: 1; }
.notif-pop-title { font-size: 13px; font-weight: 600; color: #303133; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-pop-content { font-size: 12px; color: #7a869a; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-pop-time { font-size: 11px; color: #b0b6bf; margin-top: 3px; }
.notif-pop-foot { text-align: center; padding: 9px; color: #409eff; font-size: 13px; cursor: pointer; border-top: 1px solid #f0f0f0; }
.notif-pop-foot:hover { background: #f5faff; }
/* 消息中心页 */
.page-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.notif-type-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-type-chips .chip { cursor: pointer; padding: 4px 12px; border-radius: 16px; background: #fff; border: 1px solid #dcdfe6; font-size: 13px; color: #606266; display: inline-flex; align-items: center; gap: 5px; }
.notif-type-chips .chip.on { background: #409eff; border-color: #409eff; color: #fff; }
.chip-cnt { font-style: normal; border-radius: 10px; padding: 0 6px; font-size: 11px; line-height: 16px; color: #fff; margin-left: 2px; }
.chip-cnt.lv-danger { background: #f56c6c; } .chip-cnt.lv-warn { background: #e6a23c; }
.chip-cnt.lv-info { background: #409eff; } .chip-cnt.lv-success { background: #67c23a; }
.notif-card-list { display: flex; flex-direction: column; gap: 10px; }
.notif-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #ebeef5; border-radius: 8px; padding: 12px 16px; cursor: pointer; transition: box-shadow .15s; }
.notif-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.notif-card.unread { border-left: 3px solid #409eff; background: #fafcff; }
.notif-card-icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; background: #c0c4cc; }
.notif-card-icon.lv-danger { background: #f56c6c; } .notif-card-icon.lv-warn { background: #e6a23c; }
.notif-card-icon.lv-info { background: #409eff; } .notif-card-icon.lv-success { background: #67c23a; }
.notif-card-main { flex: 1; min-width: 0; }
.notif-card-line1 { display: flex; align-items: center; gap: 8px; }
.notif-card-title { font-weight: 600; font-size: 14px; color: #303133; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-unread-flag { font-size: 11px; color: #fff; background: #f56c6c; border-radius: 8px; padding: 0 6px; line-height: 16px; flex-shrink: 0; }
.notif-card-time { margin-left: auto; font-size: 12px; color: #b0b6bf; flex-shrink: 0; }
.notif-card-content { font-size: 13px; color: #7a869a; margin-top: 5px; }
.notif-card-go { color: #c0c4cc; flex-shrink: 0; }
.ma-cost-val { font-size: 20px; font-weight: 700; color: #333; white-space: nowrap; }
.ma-cost-sub { font-size: 11px; color: #aaa; margin-top: 2px; }

/* 周结算表格 */
.ma-week-block { margin-bottom: 24px; min-width: 0; }
.ma-week-title {
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%);
    color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
    gap: 10px; flex-wrap: wrap;
}
.ma-week-info { font-size: 16px; flex: 1; min-width: 0; }
.ma-week-title .el-button { background: #fff; color: #0078d7; border-color: #fff; flex-shrink: 0; }
.ma-week-title .el-button:hover { background: #f0f7ff; }
.ma-week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #ddd; border-radius: 4px; }
.ma-week-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.ma-week-table th, .ma-week-table td { border: 1px solid #ddd; padding: 5px 4px; text-align: center; word-break: break-word; }
.ma-week-table thead tr:first-child th:nth-child(1) { width: 64px; }
.ma-week-table thead tr:first-child th:nth-child(2) { width: 70px; }
.ma-week-table thead tr:first-child th:nth-child(3) { width: 42px; }
.ma-week-table thead tr:first-child th:nth-child(4) { width: 46px; }
.ma-week-table thead tr:first-child th:nth-child(5) { width: 52px; }
.ma-week-table thead tr:first-child th:nth-child(6) { width: 60px; }
.ma-week-table thead tr:first-child th:nth-child(7) { width: 60px; }
.ma-week-table th { background: #f4f4f4; }
.ma-week-table tr:nth-child(even) { background: #f9f9f9; }
.ma-week-table .ma-day-md { font-size: 11px; color: #909399; font-weight: 400; }
.ma-week-table .ma-sub { font-size: 11px; background: #fafafa; }
.ma-week-table .ma-ok { color: #219653; font-weight: 600; }
.ma-week-table .ma-bonus { color: #F56C6C; font-weight: 700; font-size: 13px; }
.ma-week-table .ma-day-cell { vertical-align: middle; }
.ma-week-table .ma-eff-link { color: #0078d7; cursor: pointer; text-decoration: none; }
.ma-week-table .ma-eff-link:hover { text-decoration: underline; }
.ma-week-table .ma-bonus-text { color: #0078d7; font-size: 11px; }
.ma-week-table .ma-total-row { font-weight: 700; background: #e3f2fd; }
.ma-sign-row { display: flex; justify-content: space-between; margin-top: 36px; gap: 10px; flex-wrap: wrap; }
.ma-sign-box { width: 22%; min-width: 140px; text-align: center; flex: 1; }
.ma-sign-label { margin-bottom: 8px; font-size: 13px; }
.ma-sign-line { height: 30px; border-bottom: 1px solid #333; }
@media print {
    .ma-week-title .el-button { display: none !important; }
    .ma-week-scroll { overflow: visible !important; border: none; }
    .ma-week-table { min-width: 0; }
}

/* ===== 寄药管理: 状态看板 ===== */
.ap-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-tab { padding: 6px 16px; font-size: 13px; color: #606266; cursor: pointer; border-radius: 6px; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.ap-tab:hover { background: #f0f5ff; color: #409eff; }
.ap-tab.on { background: #409eff; color: #fff; font-weight: 600; }
.ap-tab.on .tab-badge { background: rgba(255,255,255,.3); color: #fff; }
.tab-badge { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #f2f3f5; color: #909399; min-width: 16px; text-align: center; }
.tab-badge-warn { background: #fdf6ec; color: #e6a23c; }
.tab-badge-info { background: #ecf5ff; color: #409eff; }
.tab-badge-ok { background: #f0f9eb; color: #67c23a; }
.ap-tab.on .tab-badge-warn { background: rgba(230,162,60,.25); color: #fff; }
.ap-tab.on .tab-badge-info { background: rgba(64,158,255,.25); color: #fff; }
.ap-tab.on .tab-badge-ok { background: rgba(103,194,58,.25); color: #fff; }

/* ===== 扫码 ===== */
.scan-box { position: relative; width: 100%; max-width: 360px; margin: 0 auto; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.scan-video { width: 100%; height: 100%; object-fit: cover; }
.scan-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 70%; height: 40%; border: 2px solid #409eff; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scan-hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }
.scan-error { text-align: center; padding: 30px 20px; color: #f56c6c; font-size: 13px; line-height: 1.8; }
.scan-result { margin-top: 10px; padding: 10px 14px; background: #f0f9eb; border-radius: 6px; color: #67c23a; font-size: 14px; font-weight: 600; text-align: center; }
