:root{
  --crm-font:
    "PingFang SC","Microsoft YaHei UI","Microsoft YaHei",
    "Alibaba PuHuiTi","Noto Sans SC","Source Han Sans CN",
    -apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,
.page-title,.page-title-icon,.card-title,.card-subtitle,
.navbar .navbar-brand,.preview-list h6,.dropdown-header{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;          /* 中文标题不留字间距 */
}
.card-title{ font-weight: 600 !important; }     /* 标题用 600，与正文拉开层级 */
.page-title{ font-weight: 600 !important; }

/* ---------- 2. 正文 / 段落 / 列表 / 卡片文字 ---------- */
p, li, span, a, small, .card-text, .text-muted, .text-gray,
.font-weight-light,.font-weight-normal,.font-weight-bold,
.main-panel,.content-wrapper,.card,.card-body,
.purchase-popup,.footer,.footer span{
  font-family: var(--crm-font) !important;
}
body{ letter-spacing: 0 !important; line-height: 1.6 !important; }
.card-text,.text-muted,.text-gray{ font-weight: 400 !important; }

/* ---------- 3. 表格（合同/到期/项目列表等核心内容区） ---------- */
.table, .table th, .table td, .table thead th, .table .badge,
.table-responsive, .breadcrumb,.breadcrumb-item,.breadcrumb-item a{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}
.table thead th{ font-weight: 600 !important; }   /* 表头加重，与数据区分 */
.table td{ font-weight: 400 !important; }

/* ---------- 4. 表单（添加客户/方案参数录入等所有录入页） ---------- */
.form-control,.form-group label,.custom-control-label,
.input-group-text,.input-group-prepend,.input-group-append,
select,option,textarea,.form-text,.custom-select{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}
.form-group label,.custom-control-label{ font-weight: 500 !important; }

/* ---------- 5. 按钮 / 徽章 / 进度条文字 ---------- */
.btn,.btn-lg,.btn-sm,.btn-gradient-primary,.download-button,.purchase-button,
.badge,.label,.badge-gradient-success,.badge-gradient-warning,
.badge-gradient-info,.badge-gradient-danger,.progress,.progress-bar{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}
.btn{ font-weight: 500 !important; }

/* ---------- 6. 下拉菜单 / 通知 / 消息预览 / 顶栏文本 ---------- */
.dropdown-menu,.dropdown-item,.navbar-dropdown,
.preview-item,.preview-item-content,.preview-subject,
.navbar .nav-link,.nav-profile-text,.nav-profile-text p{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}
.preview-subject{ font-weight: 500 !important; }

/* ---------- 7. 统计卡片大数字（本月收款/待签约/到期数等） ---------- */
.card h2,.card h4,.card .card-text,.statistics-num,.fin-num{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}

/* ---------- 8. 图表图例文字（Chart.js legend） ---------- */
.rounded-legend,.rounded-legend *,.legend-text,.chart-legend{
  font-family: var(--crm-font) !important;
  letter-spacing: 0 !important;
}

/* ---------- 9. 数字等宽：金额/到期日/编号表格上下对齐 ---------- */
.table td,.table th,.card h2,.fin-num,.badge{
  font-variant-numeric: tabular-nums;
}

/* ---------- 10. 排除图标字体，防止图标变方块（务必放在最后） ---------- */
.mdi,[class*="mdi-"],.material-design-icons,.icon,
.nav-profile-badge,.menu-icon,.preview-icon i,.input-group-text i,
.availability-status,.login-status{
  font-family: "Material Design Icons" !important;
  letter-spacing: normal !important;
}
.sidebar .nav .nav-item > .nav-link .menu-title {
    font-size: 15px !important; /* 默认通常是 13px 左右，这里调大到 15px */
    font-weight: 500;
}

.sidebar .nav .sub-menu .nav-item .nav-link {
    font-size: 14px !important; /* 子菜单稍微比一级小一点，保持层级感 */
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.sidebar .nav-profile-text .font-weight-bold {
    font-size: 15px !important;
}
.sidebar .nav-profile-text .text-small {
    font-size: 12.5px !important;
}

.sidebar .nav .nav-item > .nav-link .menu-icon {
    font-size: 18px !important;
}
.navbar-menu-wrapper .search-field {
    margin-right: 20px;
}
.custom-search-group {
    width: 100%;
    background-color: #f4f5f7; /* 加一个极浅的背景色，让它在白色导航栏中有区域感 */
    border-radius: 6px;
    padding: 4px 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* 2. 底部高亮特效条（默认隐藏） */
.custom-search-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b66dff, #4e73df); /* 渐变色特效 */
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

/* 3. 聚焦时的特效 (Focus) */
.custom-search-group:focus-within {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(182, 109, 255, 0.1); /* 微微浮起的阴影 */
}
.custom-search-group:focus-within::after {
    width: 100%; /* 底部线条从中间向两边展开 */
}

/* 4. 聚焦时图标颜色变化 */
.custom-search-group .search-icon {
    color: #8e94a1;
    transition: color 0.3s ease;
}
.custom-search-group:focus-within .search-icon {
    color: #b66dff; /* 聚焦时图标变成主题紫色 */
}

/* 5. 输入框文字大小调整 */
.custom-search-group .search-input {
    font-size: 14px;
    color: #333;
}
.custom-search-group .search-input::placeholder {
    color: #a7afb7;
    font-size: 13px;
}