/**
 * 后台管理面板 - 终极字体配置
 * 基于国内大厂最佳实践 (Ant Design / TDesign)
 * 针对长时间阅读和数据展示优化
 */

/* 1. 全局基础字体配置 */
body {
  /* 终极字体栈：优先系统默认英文 -> 苹果简体 -> Windows简体 -> 繁体 -> 兜底 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", 
               "PingFang TC", "Microsoft JhengHei", 
               sans-serif !important;
  
  /* 字体抗锯齿平滑（极度重要：让 macOS 下的中文字体边缘更细腻，不发虚） */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* 后台标准字号与行高 */
  font-size: 14px;
  line-height: 1.5715; /* 业界标准的后台行距比例 */
  
  /* 文本颜色：绝对不要用纯黑 (#000)，使用深灰可降低屏幕刺眼感 */
  color: #1f2937; 
}

/* 2. 确保所有元素继承字体配置 */
* {
  font-family: inherit;
}

/* 3. 数据表格与图表专用类（极其重要：数字对齐） */
.admin-data-table,
.numeric-data,
table,
.table,
.dataTables_wrapper,
.apexcharts-text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 4. 代码与终端日志专用类 */
code, 
pre, 
.admin-log-panel,
.code-block,
.log-viewer {
  font-family: "JetBrains Mono", "Fira Code", Consolas, Menlo, Courier, monospace !important;
  font-size: 13px; /* 等宽字体通常视觉显大，字号建议比正文小 1px */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

/* 5. 标题字体优化 */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", 
               sans-serif !important;
  font-weight: 600;
  line-height: 1.35;
}

/* 6. 输入框、按钮、表单元素字体继承 */
input, 
textarea, 
select, 
button,
.btn,
.form-control,
.form-select {
  font-family: inherit !important;
  font-size: inherit;
}

/* 7. 卡片和面板标题 */
.card-title,
.card-header,
.panel-title {
  font-weight: 600;
}

/* 8. 侧边栏菜单字体优化 */
.main-menu,
.navigation,
.menu-content {
  font-family: inherit !important;
}

/* 9. Bootstrap 表格数字对齐 */
.table td,
.table th {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 10. 数据可视化图表文本 */
.chart-label,
.axis-label,
.legend-text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
