:root {
  --ink: #1f2937;
  --ink-2: #4b5563;
  --muted: #4b5563;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-dark: #2563eb;
  --primary-soft: #eff6ff;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #10b981;
  --ok-soft: #ecfdf5;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --err: #ef4444;
  --placeholder: #999999;
  --line: #d5dbe5;
  --line-soft: #e3e8ef;
  --bg: #ffffff;
  --soft: #eef2f7;
  --white: #fff;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 10px 28px rgba(15, 23, 42, .12);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.3; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 10px; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
::placeholder { color: var(--placeholder); opacity: 1; }
::selection { background: #bfdbfe; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page { padding: 26px 0 60px; }
.mt0 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* 顶部导航 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--primary);
  border-bottom: 1px solid var(--primary);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: rgba(255, 255, 255, .92); padding: 7px 12px; border-radius: 9px; font-size: 14px; }
.nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.nav a.active { color: #fff; background: var(--primary-2); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--primary); background: #fff; color: var(--primary);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 500;
  transition: all .18s ease; white-space: nowrap;
}
.btn:hover { background: var(--primary-soft); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.btn:active { background: #dbeafe; }
.btn:focus-visible { outline: 2px solid rgba(59, 130, 246, .5); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; background: #fff; }
.btn-primary { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-accent { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-accent:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary-2); padding-left: 8px; padding-right: 8px; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* 卡片与栅格 */
.card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card.primary { border-color: transparent; box-shadow: var(--shadow); }
.card.flat { border-color: transparent; background: transparent; box-shadow: none; padding-left: 0; padding-right: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 17px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 2px 9px; border-radius: 999px; background: #e2e8f0; color: var(--ink-2);
  white-space: nowrap;
}
.tag.ok { background: var(--ok-soft); color: #047857; }
.tag.warn { background: var(--warn-soft); color: #b45309; }
.tag.danger { background: #fee2e2; color: var(--danger); }
.tag.info { background: #dbeafe; color: #1d4ed8; }
.tag.accent { background: #dbeafe; color: #1d4ed8; }

/* 表单 */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 10px 12px; border-radius: 10px; outline: none; transition: border .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
.input.error, .select.error, .textarea.error { border-color: #fca5a5; background: #fffafa; }
.input.error:focus, .select.error:focus, .textarea.error:focus { border-color: var(--err); box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.input:disabled { background: var(--soft); color: var(--muted); }
.textarea { min-height: 92px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.error-text { font-size: 12px; color: var(--err); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* 步骤条 */
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.step .n { font-size: 12px; color: var(--muted); }
.step .t { font-weight: 600; font-size: 14px; margin-top: 2px; }
.step.done { background: var(--primary-soft); border-color: #bfdbfe; }
.step.done .n { color: var(--primary); }
.step.current { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { background: #fff; color: #1f2937; font-weight: 600; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--soft); }
tbody tr:hover { background: var(--primary-soft); }
td .actions { display: flex; gap: 6px; opacity: .75; transition: opacity .15s ease; }
tbody tr:hover td .actions, tbody tr:focus-within td .actions { opacity: 1; }

/* 统计块 */
.stat { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat .num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.stat.hot { background: #dbeafe; border-color: #93c5fd; }
.stat.hot .num { color: var(--primary-2); }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { display: grid; place-items: center; margin-bottom: 10px; }
.empty .icon svg { width: 38px; height: 38px; opacity: .55; color: var(--muted); }
.empty .btn { margin-top: 14px; }

/* 提示条 */
.banner { display: flex; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; border: 1px solid; margin-bottom: 16px; }
.banner.info { background: var(--primary-soft); border-color: #bfdbfe; color: var(--primary-hover); }
.banner.warn { background: var(--warn-soft); border-color: #fde68a; color: #b45309; }
.banner.danger { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.banner.ok { background: var(--ok-soft); border-color: #a7f3d0; color: #047857; }

/* 时间线 */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #cbd5e1; border: 2px solid #fff;
}
.timeline li.done::before { background: var(--primary); }
.timeline .t { font-weight: 600; font-size: 14px; }
.timeline .d { font-size: 12px; color: var(--muted); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 26, 31, .45); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* 轻提示：置于顶部，避免与答题底栏、移动端操作区重叠 */
#toast { position: fixed; right: 22px; top: 82px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--primary-2); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13.5px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18); animation: toastIn .24s ease;
  max-width: 360px;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #047857; }
.toast.warn { background: #b45309; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* 首页 */
.hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 54px 0 46px;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 0; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--primary-2); background: #dbeafe; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: -.02em; }
.hero .lead { color: var(--ink-2); font-size: 16px; margin: 14px 0 22px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.open-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.open-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; flex: 0 0 220px; }
.open-num { font-size: 22px; font-weight: 700; line-height: 1.3; }
.open-num span { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.job-card { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 22px; transition: .2s; }
.job-card:hover { border-color: #93c5fd; box-shadow: var(--shadow); transform: translateY(-2px); }
.job-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--primary-soft); color: var(--primary-2); }
.job-card .price { font-size: 12px; color: var(--muted); }
.job-card .lv { display: flex; gap: 6px; flex-wrap: wrap; }
.job-card .bar { margin-top: 4px; }

/* 网课展示 */
.course-card {
  display: flex; flex-direction: column; background: var(--soft); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; cursor: pointer; transition: .2s;
}
.course-card:hover { border-color: #93c5fd; box-shadow: var(--shadow); transform: translateY(-2px); }
.course-cover {
  position: relative; height: 132px; border-radius: 11px; background: #dbeafe;
  display: grid; place-items: center; margin-bottom: 12px;
}
.course-cover b {
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--primary-2);
  display: grid; place-items: center; font-size: 13px; padding-left: 2px;
}
.course-cover i {
  position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 600;
  color: var(--primary-2); background: #fff; border-radius: 999px; padding: 1px 8px;
}
.course-card h3 { font-size: 15px; margin-bottom: 2px; }

/* 报考项目横向滚动 */
.scroll-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.scroll-row > * { flex: 0 0 320px; scroll-snap-align: start; }
.scroll-row .empty { flex: 1 1 100%; }
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.scroll-btns { display: flex; gap: 8px; }
.scroll-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; font-size: 17px; line-height: 1;
  display: grid; place-items: center; transition: .15s;
}
.scroll-btn:hover { border-color: var(--primary); color: var(--primary-2); background: var(--primary-soft); }
.scroll-hint { display: none; }
@media (max-width: 768px) {
  .scroll-btns { display: none; }
  .scroll-row > * { flex-basis: 84%; }
  .scroll-hint { display: block; margin-top: -6px; }
}
.section { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.section-head .kicker { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: p; }
.process-item { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: relative; }
.process-item::before {
  counter-increment: p; content: "0" counter(p); font-size: 13px; font-weight: 700; color: #94a3b8;
}

/* 学习中心 */
.study-hero { background: var(--primary); color: #fff; border-radius: 18px; padding: 28px; }
.study-hero h2 { color: #fff; font-size: 24px; }
.study-hero .sub { color: rgba(255,255,255,.78); font-size: 13px; }
.study-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.metric { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 12px 14px; }
.metric .n { font-size: 22px; font-weight: 700; }
.metric .l { font-size: 12px; color: rgba(255,255,255,.75); }

.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.entry { display: flex; align-items: center; gap: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: .18s; }
.entry:hover { border-color: #93c5fd; transform: translateY(-1px); box-shadow: var(--shadow); }
.entry .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 20px; color: var(--primary); flex: none; }
.entry .t { font-weight: 600; }
.entry .d { font-size: 12.5px; color: var(--muted); }

/* 答题 */
.q-card { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 14px; }
.q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.q-no { font-size: 12px; color: var(--primary); background: var(--primary-soft); padding: 2px 9px; border-radius: 999px; }
.q-stem { font-size: 16px; font-weight: 600; line-height: 1.6; margin-bottom: 14px; }
.opt { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; margin-bottom: 8px; transition: .15s; }
.opt:hover { border-color: #93c5fd; background: #f8fbff; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt .k { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #cbd5e1; display: grid; place-items: center; font-size: 12px; flex: none; background: #fff; }
.opt.sel .k { background: var(--primary); border-color: var(--primary); color: #fff; }
.opt .txt { font-size: 14px; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--err); background: var(--danger-soft); }
.analysis { background: var(--soft); border-left: 3px solid var(--primary); padding: 12px 14px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 12px; }
.q-nav { position: sticky; bottom: 0; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); padding: 14px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }

/* 问卷 */
.survey-shell { max-width: 720px; margin: 0 auto; padding: 28px 20px 80px; }
.survey-head { text-align: center; padding: 26px 0 20px; }
.survey-head h1 { font-size: 26px; margin-bottom: 8px; }
.survey-intro { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; color: var(--ink-2); font-size: 13.5px; }
.sv-q { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 14px; }
.sv-title { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; display: flex; gap: 8px; }
.sv-title .idx { color: var(--muted); font-weight: 500; }
.rating { display: flex; gap: 8px; flex-wrap: wrap; }
.rating button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; }
.rating button.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.rank-item .num { width: 22px; height: 22px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { text-align: center; padding: 8px 6px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix input[type=radio] { accent-color: var(--primary); width: 17px; height: 17px; }

/* 后台 */
.admin-body { background: #fff; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--primary); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; font-weight: 700; }
.side-group { margin-top: 16px; }
.side-group .g-title { font-size: 11px; letter-spacing: .1em; color: rgba(255, 255, 255, .78); padding: 0 10px 8px; text-transform: uppercase; }
.side-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: rgba(255, 255, 255, .92); font-size: 13.5px; }
.side-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.side-link.active { background: var(--primary-2); color: #fff; font-weight: 600; }
.side-link.active::before {
  content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px;
  border-radius: 0 3px 3px 0; background: #fff;
}
.side-link .ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .95; flex: none; }
.side-link .ico svg { width: 18px; height: 18px; display: block; }
.side-toggle { display: none; }
.side-foot { margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 14px; }
.main { padding: 22px 26px 60px; min-width: 0; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.topline h1 { font-size: 23px; }
.crumb { font-size: 12.5px; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.filters .input, .filters .select { width: auto; min-width: 140px; }

/* 后台表格：表头吸附 + 长表格内部滚动，操作列默认弱化、悬停显现 */
.admin-body .table-wrap { max-height: 72vh; overflow: auto; }
.admin-body .table-wrap thead th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--line-soft); }

.modal-md { max-width: 720px; }
.modal-lg { max-width: 900px; }
.preview { width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); min-height: 160px; display: grid; place-items: center; }
.preview img { width: 100%; display: block; }
.preview iframe { width: 100%; height: 62vh; border: 0; }
.review-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.review-list { display: flex; flex-direction: column; gap: 8px; max-height: 72vh; overflow: auto; }
.review-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.review-item:hover { border-color: #93c5fd; }
.review-item.active { border-color: var(--primary); background: var(--primary-soft); }
.review-item .no { font-size: 12px; color: var(--muted); }
.review-item .nm { font-weight: 600; font-size: 14px; }
.mat-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.mat-item.reject { border-color: #fecaca; background: var(--danger-soft); }
.mat-item.pass { border-color: #a7f3d0; background: var(--ok-soft); }
.mat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mat-name { font-weight: 600; font-size: 14px; }
.mat-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quick-reasons { display: flex; flex-direction: column; gap: 6px; }
.quick-reasons label { font-size: 13px; display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.quick-reasons label:hover { border-color: #93c5fd; }

.survey-editor .q-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: #fff; }
.survey-editor .opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.survey-editor .opt-row .input { flex: 1; }
.bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width .3s ease; }

/* 学员端：我的页面 */
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 10px 12px; margin-top: 12px; font-size: 14px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: 0 0 auto; }
.me-name { font-size: 18px; font-weight: 700; }
.msg-item { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; transition: background .15s ease; }
.msg-item.unread { background: var(--primary-soft); border-color: #bfdbfe; }
.msg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: 1px; }

/* 学员端：底部固定导航（窄屏显示） */
.tabbar { display: none; }

@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-4, .process, .study-metrics, .review-layout { grid-template-columns: 1fr 1fr; }
  .open-strip { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .hero h1 { font-size: 32px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .side-group { margin: 0; }
  .side-group .g-title { display: none; }
  .side-foot { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; margin-top: 4px; padding-top: 0; border-top: 0; }
  .side-foot .small { display: none; }
  .main { padding: 18px; }
  .nav { overflow-x: auto; }
  .topbar-inner { gap: 14px; }
}

/* 手机端：导航分两行、表单 16px 防缩放、卡片与表格紧凑化 */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }

  .topbar-inner { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 10px 0 8px; }
  .brand { font-size: 16px; gap: 8px; }
  .nav {
    order: 3; flex: 0 0 100%; gap: 2px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 11px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
  .top-actions { margin-left: auto; gap: 6px; }
  .top-actions .btn { padding: 7px 12px; }
  .topbar .btn:focus-visible { outline-color: #fff; }
  .hide-sm { display: none !important; }

  .grid-2, .grid-3, .grid-4, .process, .open-strip, .hero-grid, .review-layout, .form-row, .entry-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 30px; }
  .hero h1 { font-size: 26px; }
  .hero .lead { font-size: 14.5px; margin: 12px 0 18px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-card { padding: 18px; }
  .open-strip { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .open-item { padding: 12px 14px; }

  .page { padding: 16px 0 40px; }
  .section { padding: 30px 0; }
  .section-head { flex-wrap: wrap; align-items: flex-start; }
  .card { padding: 16px; border-radius: 12px; }
  .card-head { flex-wrap: wrap; }

  /* 表单：iOS 聚焦时 16px 以下会自动放大页面 */
  .input, .select, .textarea { font-size: 16px; padding: 11px 12px; }
  .form-row { gap: 0; }
  .chip { padding: 9px 16px; font-size: 14px; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 34px; padding: 6px 12px; }
  .btn-lg { min-height: 48px; }
  .steps { flex-direction: column; }

  /* 表格：紧凑并支持横向滑动 */
  table { font-size: 13px; }
  th, td { padding: 9px 10px; }
  .table-wrap { border-radius: 10px; -webkit-overflow-scrolling: touch; }

  /* 学习中心 */
  .study-hero { padding: 20px 16px; border-radius: 14px; }
  .study-hero h2 { font-size: 20px; }
  .study-hero .flex-between, .study-hero .flex { flex-wrap: wrap; gap: 8px; }
  .study-metrics { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
  .metric { padding: 10px 12px; }
  .metric .n { font-size: 20px; }
  .entry { padding: 14px; }

  /* 答题页 */
  .q-card { padding: 16px; }
  .q-stem { font-size: 15.5px; }
  .opt { padding: 12px; }
  .q-nav { padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
  .analysis { font-size: 13px; }

  /* 弹窗 */
  .modal-mask { padding: 12px; }
  .modal { max-height: 92vh; border-radius: 14px; }
  .modal-head, .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px 16px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }

  /* 后台在窄屏下的筛选与卡片 */
  .filters { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .filters .input, .filters .select { width: 100%; }
  .topline { flex-wrap: wrap; }
  .admin-body .table-wrap { max-height: none; }
  .stat { padding: 14px; }
  .stat .num { font-size: 24px; }

  /* 后台手机端：侧栏折叠为顶部导航抽屉 */
  .admin-body .sidebar {
    position: sticky; top: 0; z-index: 40; display: block; height: auto;
    padding: 10px 14px; box-shadow: 0 6px 18px rgba(37, 99, 235, .2);
  }
  .admin-body .side-brand { padding: 0; }
  .admin-body .side-toggle {
    display: grid; place-items: center; margin-left: auto; width: 40px; height: 36px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 17px; line-height: 1;
  }
  .admin-body .sidebar:not(.open) .side-group,
  .admin-body .sidebar:not(.open) .side-foot { display: none; }
  .admin-body .sidebar.open .side-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
  .admin-body .sidebar.open .side-link { padding: 11px 12px; background: rgba(255, 255, 255, .12); font-weight: 500; }
  .admin-body .sidebar.open .side-link.active::before { display: none; }
  .admin-body .sidebar.open .side-foot { display: block; margin-top: 10px; padding-top: 10px; }
  .admin-body .main { padding: 14px 12px 48px; }
  .admin-body .topline { margin-bottom: 14px; gap: 10px; }
  .admin-body .topline h1 { font-size: 20px; }
  .admin-body .topline > .flex { width: 100%; flex-wrap: wrap; gap: 8px; }
  .admin-body .topline > .flex .btn { flex: 1 1 46%; justify-content: center; }
  .admin-body .filters { grid-template-columns: 1fr 1fr; }
  .admin-body .filters > .input,
  .admin-body .filters > .small { grid-column: 1 / -1; }
  .admin-body .filters > .btn { width: 100%; }
  .admin-body .filters .select { min-width: 0; }
  .admin-body .card { padding: 14px; }
  .admin-body .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-body .grid-2 { grid-template-columns: 1fr; }
  .admin-body .stat { padding: 12px; }
  .admin-body .stat .lbl { font-size: 12px; }
  .admin-body .table-wrap th,
  .admin-body .table-wrap td { padding: 9px 10px; }
  .admin-body td .actions { flex-wrap: wrap; opacity: 1; gap: 6px; }
  .admin-body .modal { max-width: none; }

  #toast { left: 12px; right: 12px; top: 112px; }
  .toast { max-width: none; }
  #footer { padding: 18px 0 !important; }
  #footer .wrap { justify-content: center; text-align: center; }
}

@media (max-width: 768px) {
  body.has-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--primary); border-top: 1px solid var(--primary);
    box-shadow: 0 -6px 20px rgba(37, 99, 235, .18);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0 2px; position: relative; color: #fff; font-size: 12px; font-weight: 500;
    border-radius: 10px; -webkit-tap-highlight-color: transparent;
  }
  .tabbar a.active { color: #fff; background: rgba(255, 255, 255, .16); font-weight: 700; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar-badge {
    position: absolute; top: 0; left: calc(50% + 4px); min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff;
    font-size: 10px; line-height: 16px; font-style: normal; text-align: center;
    box-shadow: 0 0 0 2px var(--primary);
  }
  .me-page .grid-2 { grid-template-columns: 1fr; }
  .me-page .kv { grid-template-columns: 76px 1fr; }
  .me-page h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .job-card:hover, .entry:hover { transform: none; }
}

/* ---------- 课程模块 ---------- */
.course-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; display: block; }
a.course-card { color: inherit; text-decoration: none; }

.course-hero {
  display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.course-hero-cover { height: 180px; border-radius: 14px; background: #dbeafe; display: grid; place-items: center; overflow: hidden; }
.course-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-hero-cover b {
  width: 50px; height: 50px; border-radius: 50%; background: #fff; color: var(--primary-2);
  display: grid; place-items: center; font-size: 15px; padding-left: 2px;
}

.lesson-list { display: flex; flex-direction: column; margin-top: 8px; }
.lesson-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 6px;
  border-bottom: 1px dashed var(--line); cursor: pointer; transition: .15s;
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: var(--primary-soft); border-radius: 10px; }
.lesson-item.active { background: var(--primary-soft); border-radius: 10px; }
.lesson-item.locked { opacity: .62; }
.lesson-idx {
  width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--primary-soft);
  color: var(--primary-2); font-weight: 600; font-size: 13px; display: grid; place-items: center;
}

.cover-thumb {
  width: 62px; height: 40px; flex: none; border-radius: 8px; overflow: hidden;
  background: #dbeafe; display: grid; place-items: center; color: var(--primary-2); font-size: 12px;
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview {
  width: 200px; height: 112px; flex: none; border: 1px dashed var(--line); border-radius: 10px;
  background: var(--soft); display: grid; place-items: center; color: var(--muted); font-size: 12px;
  text-align: center; overflow: hidden;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.lesson-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row .btn { padding: 5px 9px; }

/* 播放器 */
.course-player { background: #0f172a; border-radius: 14px; overflow: hidden; display: grid; place-items: center; min-height: 160px; }
.course-player video { width: 100%; max-height: 68vh; background: #000; display: block; }
.course-player.doc {
  display: flex; align-items: center; gap: 14px; padding: 20px;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
}
.course-player.doc .job-ico { flex: none; }
.player-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px;
  padding: 10px 14px; margin-top: -1px;
}
.speed-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.speed-btns button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 8px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; transition: .15s;
}
.speed-btns button.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 我的课程 */
.my-course {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft); transition: .18s;
}
.my-course:hover { border-color: #93c5fd; box-shadow: var(--shadow-sm); }
.my-course-cover {
  width: 86px; height: 56px; flex: none; border-radius: 9px; overflow: hidden;
  background: #dbeafe; display: grid; place-items: center; color: var(--primary-2);
}
.my-course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-progress { height: 6px; border-radius: 999px; background: #dbeafe; overflow: hidden; }
.course-progress i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* 首页网课展示：首课大图 + 其余横条 */
.course-showcase { display: grid; gap: 14px; }
.course-feature {
  display: grid; grid-template-columns: 44% 1fr; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: .2s;
}
.course-feature:hover { border-color: #93c5fd; box-shadow: var(--shadow); transform: translateY(-2px); }
.course-feature-cover { position: relative; min-height: 230px; background: #dbeafe; display: grid; place-items: center; }
.course-feature-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-feature-cover b {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--primary-2);
  display: grid; place-items: center; font-size: 16px; padding-left: 3px; z-index: 1;
}
.course-flag {
  position: absolute; top: 12px; left: 12px; z-index: 2; font-style: normal; font-size: 12px;
  font-weight: 600; color: #fff; background: var(--primary-2); border-radius: 999px; padding: 3px 10px;
}
.course-feature-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; min-width: 0; }
.course-feature-body h3 { font-size: 20px; line-height: 1.35; }
.course-feature-intro {
  font-size: 13px; color: var(--muted); margin: 0; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.course-showcase-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.course-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: inherit; transition: .18s;
}
.course-row:hover { border-color: #93c5fd; box-shadow: var(--shadow-sm); }
.course-row-cover {
  width: 96px; height: 60px; flex: none; border-radius: 10px; overflow: hidden;
  background: #dbeafe; display: grid; place-items: center; color: var(--primary-2);
}
.course-row-cover img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .course-hero { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .course-hero-cover { height: 160px; }
  .course-player video { max-height: 42vh; }
  .player-bar { border-radius: 0 0 12px 12px; padding: 10px; }
  .my-course-cover { width: 72px; height: 48px; }
  .cover-preview { width: 140px; height: 80px; }
  .course-feature { grid-template-columns: 1fr; }
  .course-feature-cover { min-height: 180px; }
  .course-feature-body { padding: 16px; }
  .course-feature-body h3 { font-size: 18px; }
  .course-row-cover { width: 76px; height: 50px; }
}

/* 右上角学员动态头像：男生/女生 + 未读消息红点 */
.user-avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); overflow: visible; }
.user-avatar svg { width: 34px; height: 34px; display: block; transform-origin: 50% 90%; animation: avatar-bob 2.8s ease-in-out infinite; }
.user-avatar svg .eye { transform-box: fill-box; transform-origin: center; animation: avatar-blink 4.5s ease-in-out infinite; }
.user-avatar .dot { position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: #ff4d4f; border: 2px solid #12325c; animation: avatar-pulse 1.8s ease-out infinite; }
@keyframes avatar-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2px) rotate(-2deg); } }
@keyframes avatar-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.15); } }
@keyframes avatar-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,79,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,77,79,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); } }
@media (max-width: 640px) { .user-avatar { width: 36px; height: 36px; } .user-avatar svg { width: 29px; height: 29px; } }
