@font-face {
  font-family: "SourceHanSansSC Regular";
  src: url("../fonts/Source_Han_Sans_SC_Regular.otf") format("opentype");
}

@font-face {
  font-family: "SourceHanSansSC Medium";
  src: url("../fonts/Source_Han_Sans_SC_Medium_Medium.otf") format("opentype");
}

/**
 * 通用样式 common.css
 * 兼容 IE11 | Flex栅格 | 响应式 | 设计稿最大1920px
 */

/* ===================== 主题配置 ===================== */
:root {
  --color-primary: #4a90e2;
  --color-success: #34c759;
  --color-warning: #ff9500;
  --color-danger: #ff3b30;
  --color-gray: #8e8e93;
  --color-gray-light: #f2f2f7;
  --color-dark: #1c1c1e;
  --gutter: 12px; /* 列间距 */
  --radius: 4px;
}

/* ===================== CSS Reset ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -ms-text-size-adjust: 100%; /* IE11禁止字体自动缩放 */
}

body {
  margin: 0;
  padding: 0;
  font-family: "SourceHanSansSC Regular","Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.6;
}
body{
  max-width:2300px; margin: 0 auto; 
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0 0 0.5rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
  color: #4a90e2;
}
a:hover {
  color: #357abd;
}

img {
  border: 0;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  border: none;
}
:focus{
  outline: none;
}

/* ===================== 容器 ===================== */
/* 设计稿最大1920px：容器随屏幕流式变宽，到1920px锁定并水平居中，不再放大 */
.container {
  width: 90%;
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== Flex 栅格系统（IE11兼容，无负margin） ===================== */
.row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* 基础列定义 flex: 0 0 宽度; IE11必须写-ms-flex */
.col-12 {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
}
.col-6 {
  -ms-flex: 0 0 50%;
  flex: 0 0 50%;
  max-width: 50%;
}
.col-4 {
  -ms-flex: 0 0 33.333333%;
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.col-3 {
  -ms-flex: 0 0 25%;
  flex: 0 0 25%;
  max-width: 25%;
}
.col-2 {
  -ms-flex: 0 0 16.666667%;
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}

/* ----- sm ≥576px ----- */
@media (min-width: 576px) {
  .col-sm-12 {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-sm-6 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-4 {
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

/* ----- md ≥768px ----- */
@media (min-width: 768px) {
  .col-md-12 {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-md-6 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-md-4 {
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-md-2 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }  
}

/* ----- lg ≥1024px ----- */
@media (min-width: 1025px) {
  .col-lg-12 {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-lg-6 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-lg-4 {
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-lg-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* ----- xl ≥1200px ----- */
@media (min-width: 1200px) {
  .col-xl-6 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-xl-4 {
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-xl-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* ===================== Flex工具类 ===================== */
.flex {
  display: -ms-flexbox;
  display: flex;
}
.flex-wrap {
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.flex-col {
  -ms-flex-direction: column;
  flex-direction: column;
}
.jc-start {
  -ms-flex-pack: start;
  justify-content: flex-start;
}
.jc-center {
  -ms-flex-pack: center;
  justify-content: center;
}
.jc-between {
  -ms-flex-pack: justify;
  justify-content: space-between;
}
.ai-center {
  -ms-flex-align: center;
  align-items: center;
}

/* ===================== 间距工具类 ===================== */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: 8px; }
.pt-md { padding-top: 16px; }
.pt-lg { padding-top: 24px; }

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: 8px; }
.pb-md { padding-bottom: 16px; }
.pb-lg { padding-bottom: 24px; }

/* ===================== 卡片 ===================== */
.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  border-radius: var(--radius);
}
.card-body {
  padding: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
}

/* ===================== Alert提示框 ===================== */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.alert-primary {
  background-color: #e8f2fc;
  color: #2c6cad;
}
.alert-success {
  background-color: #e6f9eb;
  color: #1f8b3b;
}
.alert-warning {
  background-color: #fff4e5;
  color: #b36b00;
}
.alert-danger {
  background-color: #ffe9e8;
  color: #b8261d;
}


/* ===================== 表格 ===================== */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  border: 1px solid #ddd;
  padding: 10px;
}
.table-striped tbody tr:nth-child(odd) {
  background-color: #f8f8f8;
}
.table-responsive {
  overflow-x: auto;
}

/* ===================== 文本工具 ===================== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #8e8e93; }
.text-primary {
  color: #4a90e2;
  color: var(--color-primary);
}
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===================== 多行文本省略（1~5行）=====================
 * 现代浏览器：基于 -webkit-line-clamp 实现，超出部分以省略号结尾
 * IE11 兼容：不支持 line-clamp，仅靠 overflow:hidden 截断，不显示省略号
 * 用法：在需要截断的元素上添加 .line-clamp-N（N=1~5）
 */
.line-clamp-1,
.line-clamp-2,
.line-clamp-3,
.line-clamp-4,
.line-clamp-5 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.line-clamp-4 { -webkit-line-clamp: 4; }
.line-clamp-5 { -webkit-line-clamp: 5; }

/* ===================== 可见性控制 ===================== */
/* 语义：hidden-xs=在xs区间(<576px)隐藏；visible-xs=仅在xs区间显示，其余同理 */
.hidden {
  display: none !important;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
  display: none !important;
}

/* xs：<576px */
@media (max-width: 575px) {
  .visible-xs {
    display: block !important;
  }
  .hidden-xs {
    display: none !important;
  }
}
/* sm：576~767px */
@media (min-width: 576px) and (max-width: 767px) {
  .visible-sm {
    display: block !important;
  }
  .hidden-sm {
    display: none !important;
  }
}
/* md：768~991px */
@media (min-width: 768px) and (max-width: 991px) {
  .visible-md {
    display: block !important;
  }
  .hidden-md {
    display: none !important;
  }
}
/* lg：≥992px */
@media (min-width: 992px) {
  .visible-lg {
    display: block !important;
  }
  .hidden-lg {
    display: none !important;
  }
}

/* ===================== IE11 已知限制注释 ===================== */
/*
 * IE11不支持: gap, sticky, object-fit, line-clamp
 * 栅格使用-ms-flex前缀，不用gap，靠列padding制造间隙
 * CSS变量IE11会直接忽略，全部样式已做硬编码兜底
 * 设计稿最大1920px，屏幕大于1920时，容器锁定1920px居中
 */
