/* =========================================================
   《机械设计》智慧课程平台 · 机械工业风设计系统 v1.0
   深钢蓝 + 机械黄 | 图纸网格 | 图框式标题栏 | 等宽数据字
   ========================================================= */

:root {
  --steel-950: #08182a;
  --steel-900: #0e2a47;
  --steel-800: #14375a;
  --steel-700: #1b4b7a;
  --steel-600: #2a6394;
  --steel-400: #6c8ca9;
  --steel-200: #c6d4e1;
  --steel-100: #e3ebf3;
  --paper: #f3f6f9;
  --white: #ffffff;
  --amber: #f2a900;
  --amber-dark: #c98a00;
  --amber-soft: #fff3d6;
  --green: #1e8a5b;
  --red: #c7463a;
  --line: #d5dfe9;
  --line-strong: #b9c8d6;
  --text: #12263a;
  --muted: #5d7286;
  --mono: "Consolas", "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
  --sans: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --r: 3px;
  --wrap: 1280px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--steel-700); text-decoration: none; }
a:hover { color: var(--steel-900); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .2px; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; letter-spacing: .5px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; } .mt48 { margin-top: 48px; }

/* ---------- 图纸网格底纹 ---------- */
.blueprint {
  position: relative;
  background-color: var(--steel-900);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
.paper-grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(14, 42, 71, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 42, 71, .038) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- 顶部标题栏 ---------- */
.top {
  height: 58px;
  background: var(--steel-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: relative;
  z-index: 30;
}
.top::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber) 0 132px, rgba(255, 255, 255, .14) 132px 100%);
}
.top-l, .top-r { display: flex; align-items: center; gap: 14px; }

.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 30px; height: 30px; border: 1.5px solid var(--amber);
  display: grid; place-items: center; position: relative; flex: none;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 15.5px; letter-spacing: 1.5px; }
.brand-txt span { font-size: 10px; letter-spacing: 2.2px; color: var(--steel-400); }

.role-chip {
  font-size: 11px; letter-spacing: 1px; padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, .3); color: var(--steel-200);
}
.role-chip.teacher { border-color: var(--amber); color: var(--amber); }

.user-box { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--steel-100); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--steel-700); border: 1px solid rgba(255, 255, 255, .25);
  display: grid; place-items: center; font-size: 12px; color: #fff;
}
.top-link { color: var(--steel-200); font-size: 12.5px; }
.top-link:hover { color: #fff; }

/* ---------- 横向导航 ---------- */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav-in { display: flex; align-items: stretch; height: 50px; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; padding: 0 17px;
  font-size: 14px; color: var(--text); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { background: #fafbfd; color: var(--steel-800); }
.nav a.active {
  color: var(--steel-900); font-weight: 700;
  border-bottom-color: var(--amber);
  background: linear-gradient(180deg, #fff 55%, #fffaf0);
}
.nav .sep { width: 1px; background: var(--line); margin: 14px 6px; flex: none; }
.nav .grouplabel {
  display: flex; align-items: center; font-size: 10.5px; letter-spacing: 1.5px;
  color: var(--steel-400); padding: 0 10px 0 16px; white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 20px; border-radius: var(--r);
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.btn-amber { background: var(--amber); color: #2a1d00; border-color: var(--amber); }
.btn-amber:hover { background: #ffb916; color: #2a1d00; }
.btn-dark { background: var(--steel-900); color: #fff; border-color: var(--steel-900); }
.btn-dark:hover { background: var(--steel-800); color: #fff; }
.btn-line { background: transparent; color: var(--steel-800); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--steel-700); color: var(--steel-900); background: #fff; }
.btn-line-inv { background: transparent; color: var(--steel-200); border-color: rgba(255,255,255,.35); }
.btn-line-inv:hover { color: #fff; border-color: #fff; }
.btn-sm { height: 30px; padding: 0 13px; font-size: 12.5px; }
.btn-lg { height: 46px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- 卡片（图框角标） ---------- */
.card {
  position: relative; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r);
}
.card::before, .card::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  border: 1px solid var(--steel-400); opacity: .5; pointer-events: none;
}
.card::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.card::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-h h3 { font-size: 14.5px; }
.card-b { padding: 18px; }
.card-b.tight { padding: 12px 18px; }

/* ---------- 小标题（编号） ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2.4px;
  color: var(--steel-400); text-transform: uppercase;
}
.eyebrow.dark { color: var(--steel-600); }
.eyebrow span { color: var(--amber); }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.sec-head h2 { font-size: 22px; letter-spacing: .5px; }
.sec-head .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.rule { height: 1px; background: var(--line); flex: 1; margin-bottom: 8px; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: #fff; }
.stats > div { padding: 20px 22px; border-right: 1px solid var(--line); position: relative; }
.stats > div:last-child { border-right: 0; }
.stat-num { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--steel-900); line-height: 1; }
.stat-num small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 7px; letter-spacing: .5px; }

.kpi { background: #fff; border: 1px solid var(--line); padding: 18px 20px; position: relative; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--steel-700); }
.kpi.amber::before { background: var(--amber); }
.kpi.green::before { background: var(--green); }
.kpi.red::before { background: var(--red); }
.kpi .k-label { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.kpi .k-num { font-family: var(--mono); font-size: 27px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.kpi .k-sub { font-size: 11.5px; color: var(--steel-400); margin-top: 2px; }

/* ---------- 进度条 ---------- */
.bar { height: 6px; background: var(--steel-100); border-radius: 1px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--steel-700); }
.bar.amber > i { background: var(--amber); }
.bar.green > i { background: var(--green); }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row .bar { flex: 1; }
.bar-row .pct { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 38px; text-align: right; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 2px 8px; border: 1px solid var(--line-strong);
  color: var(--muted); border-radius: 2px; background: #fff; white-space: nowrap;
}
.tag.amber { border-color: #f0c66a; color: #8a6100; background: var(--amber-soft); }
.tag.blue { border-color: var(--steel-200); color: var(--steel-700); background: #f2f7fc; }
.tag.green { border-color: #a8d8c1; color: #146b45; background: #eefaf3; }
.tag.red { border-color: #e8b4ae; color: #9c2f25; background: #fdf1f0; }
.tag.solid { background: var(--steel-900); color: #fff; border-color: var(--steel-900); }

/* ---------- 列表行 ---------- */
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #fbfcfe; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 13.5px; font-weight: 600; color: var(--text); }
.row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row .s .mono { color: var(--steel-600); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .5px; }
.input {
  width: 100%; height: 42px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: #fff; font-family: var(--sans); font-size: 14px; color: var(--text);
  outline: none; transition: .15s;
}
.input:focus { border-color: var(--steel-700); box-shadow: 0 0 0 3px rgba(27, 75, 122, .1); }
.input.mono { font-family: var(--mono); letter-spacing: 1px; }
.input::placeholder { color: #9aa9b7; }

.captcha-row { display: flex; gap: 10px; }
.captcha {
  width: 104px; flex: none; height: 42px; border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, #eef3f8, #dfe8f1);
  display: grid; place-items: center; font-family: var(--mono); font-size: 19px;
  letter-spacing: 4px; color: var(--steel-800); font-weight: 700; user-select: none;
}

.check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.check input { accent-color: var(--steel-700); }

/* ---------- 表格 ---------- */
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px;
  letter-spacing: 1px; padding: 10px 14px; border-bottom: 1px solid var(--line-strong);
  background: #f8fafc; white-space: nowrap;
}
table.tb td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb tbody tr:hover { background: #fbfcfe; }
table.tb .num { font-family: var(--mono); }

/* ---------- 页脚 ---------- */
.foot {
  background: var(--steel-950); color: var(--steel-400);
  padding: 26px 0; font-size: 12px; margin-top: 56px;
}
.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--steel-200); }

/* ---------- 章节编号方块 ---------- */
.ch-no {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: #f8fafc;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--steel-700);
}

/* ---------- 分割线（带标注） ---------- */
.divider-label {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 2px; color: var(--steel-400);
  font-family: var(--mono);
}
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 0 20px; }
.page-head h1 { font-size: 25px; letter-spacing: .5px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.head-side { display: flex; align-items: center; gap: 10px; }

/* ---------- 大屏 ---------- */
.screen-body { background: var(--steel-950); color: #fff; height: 100%; overflow: hidden; }

@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(1), .stats > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .wrap { padding: 0 18px; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  .top { padding: 9px 14px; gap: 8px; }
  .top-l, .top-r { gap: 8px; min-width: 0; }
  .brand { min-width: 0; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-txt b { font-size: 14px; white-space: nowrap; letter-spacing: 1px; }
  .brand-txt span { display: none; }
  .role-chip { display: none; }
  .user-box { gap: 6px; font-size: 12px; white-space: nowrap; }
  .user-box .avatar { width: 24px; height: 24px; }
  .user-box .tiny { display: none; }
  .top-link { font-size: 12px; }

  .nav-in { height: 44px; }
  .nav a { padding: 0 13px; font-size: 13px; }
  .nav .grouplabel { display: none; }

  .wrap { padding: 0 14px; }
  .sec-head { flex-wrap: wrap; gap: 12px; }
  .sec-head .rule { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 24px; }
  .foot { margin-top: 36px; }
  .foot .wrap { flex-direction: column; gap: 6px; }
}

