/* ==========================================================================
   山西新东方专升本教学产品看板 —— 主样式
   配色：新东方深蓝 + 品牌红，浅色背景
   ========================================================================== */

:root {
  --xdf-blue:      #123a6b;
  --xdf-blue-mid:  #1c5aa8;
  --xdf-blue-soft: #eaf1fa;
  --xdf-red:       #d8272c;
  --xdf-red-soft:  #fdeced;
  --xdf-orange:    #e8760f;
  --xdf-orange-soft:#fdf0e2;

  --bg:            #f4f6fa;
  --surface:       #ffffff;
  --border:        #e3e8f0;
  --border-strong: #d2dae6;

  --text:          #1a2233;
  --text-sub:      #5b667a;
  --text-muted:    #939eb0;

  --radius:        14px;
  --radius-sm:     9px;
  --shadow:        0 1px 2px rgba(18,58,107,.05), 0 8px 24px rgba(18,58,107,.06);
  --shadow-hover:  0 4px 10px rgba(18,58,107,.09), 0 18px 40px rgba(18,58,107,.13);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------- 顶部导航 ---------------- */
.topbar {
  background: linear-gradient(115deg, var(--xdf-blue) 0%, #1a4c8b 55%, var(--xdf-blue-mid) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.topbar::after {
  content: "";
  position: absolute;
  right: -60px; top: -110px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(216,39,44,.35), transparent 68%);
  pointer-events: none;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--xdf-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(216,39,44,.4);
}
.brand-logo span { display: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.brand-text h1 { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.brand-text p {
  font-size: 10.5px; color: rgba(255,255,255,.6);
  letter-spacing: 1.1px; margin-top: 3px;
}
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.term-tag {
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 20px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
}
.owner { font-size: 13px; color: rgba(255,255,255,.8); }

/* ---------------- 布局 ---------------- */
.wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 32px 46px;
  flex: 1;
}
.section { margin-bottom: 34px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 16px;
  font-weight: 600;
  padding-left: 11px;
  position: relative;
}
.section-head h2::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3.5px; height: 15px;
  border-radius: 2px;
  background: var(--xdf-red);
}
.section-note, .update-time { font-size: 12.5px; color: var(--text-muted); }
.update-time b { color: var(--text-sub); font-weight: 500; }

/* ---------------- KPI 卡片 ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: .22s;
}
.kpi-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.kpi-label {
  font-size: 12.5px; color: var(--text-sub);
  display: flex; align-items: center; gap: 6px;
}
.kpi-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--xdf-blue-mid); }
.kpi-value {
  font-size: 30px; font-weight: 650;
  margin: 9px 0 3px;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-value.pending { color: var(--text-muted); font-weight: 500; }
.kpi-value .unit { font-size: 13px; font-weight: 400; color: var(--text-sub); margin-left: 3px; }
.kpi-hint { font-size: 11.5px; color: var(--text-muted); }

/* ---------------- 模块卡片 ---------------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: .25s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.module-card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent-border); }
.module-card:hover::before { transform: scaleX(1); }
.module-card:active { transform: translateY(-1px); }

.module-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 13px; }
.module-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.module-icon svg { width: 23px; height: 23px; }
.module-heading { flex: 1; min-width: 0; }
.module-heading h3 { font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.module-heading .en {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: .9px; text-transform: uppercase; margin-top: 2px;
}
.status-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 11px;
  flex-shrink: 0;
  white-space: nowrap;
  background: #f0f2f6;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.status-chip.live { background: #e8f6ee; color: #1c8a4d; border-color: #c6e9d5; }

.module-desc {
  font-size: 13px; line-height: 1.75; color: var(--text-sub);
  margin-bottom: 14px;
}
.module-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.module-tags span {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}
.module-metrics {
  display: flex;
  gap: 26px;
  padding: 13px 0 0;
  border-top: 1px dashed var(--border);
  margin-top: auto;
}
.module-metrics div { min-width: 0; }
.module-metrics .m-label { font-size: 11.5px; color: var(--text-muted); }
.module-metrics .m-value {
  font-size: 17px; font-weight: 600; margin-top: 2px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.module-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.enter-btn {
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 5px;
}
.enter-btn svg { width: 14px; height: 14px; transition: transform .25s; }
.module-card:hover .enter-btn svg { transform: translateX(3px); }
.link-hint { font-size: 11.5px; color: var(--text-muted); }

/* 三种主题色 */
.accent-blue   { --accent: #1c5aa8; --accent-soft: var(--xdf-blue-soft);   --accent-border: #b9d0ec; }
.accent-orange { --accent: #d9700f; --accent-soft: var(--xdf-orange-soft); --accent-border: #f0cfa4; }
.accent-red    { --accent: #cf2b30; --accent-soft: var(--xdf-red-soft);    --accent-border: #f2c2c4; }

/* ---------------- 预留占位卡 ---------------- */
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.placeholder-card {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255,255,255,.5);
  transition: .22s;
}
.placeholder-card:hover { background: #fff; border-color: #b9c6d8; }
.placeholder-plus {
  width: 34px; height: 34px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 1.5px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  color: #b3bfd0;
}
.placeholder-card h4 { font-size: 14px; font-weight: 500; color: var(--text-sub); margin-bottom: 4px; }
.placeholder-card p { font-size: 12px; }

/* ---------------- 底部面板 ---------------- */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 9px; }
.quick-links a {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  color: var(--text-sub);
  text-decoration: none;
  transition: .2s;
  cursor: pointer;
}
.quick-links a:hover { border-color: var(--xdf-blue-mid); color: var(--xdf-blue-mid); background: var(--xdf-blue-soft); }
.quick-links a.disabled { color: var(--text-muted); background: #f7f8fb; }
.changelog { list-style: none; }
.changelog li {
  font-size: 12.5px; color: var(--text-sub);
  padding: 7px 0 7px 15px;
  position: relative;
  line-height: 1.7;
}
.changelog li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-strong);
}
.changelog li:first-child::before { background: var(--xdf-red); }
.changelog time { color: var(--text-muted); margin-right: 9px; font-variant-numeric: tabular-nums; }

/* ---------------- 页脚 ---------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 32px;
  text-align: center;
}
.footer p { font-size: 12px; color: var(--text-muted); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translate(-50%, 20px);
  background: rgba(26,34,51,.94);
  color: #fff;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: .28s;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-inner, .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .brand-text h1 { font-size: 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 26px; }
}
