/* ==========================================================
   三级安全教育 · 员工学习端（微信小程序）高保真原型样式
   ========================================================== */
:root {
  --brand: #1565C0;
  --brand-d: #0d47a1;
  --brand-l: #e8f2fd;
  --ink: #16283c;
  --ink-2: #4a5d73;
  --ink-3: #8697a9;
  --line: #e6ebf1;
  --bg: #f2f5f9;
  --wx: #07c160;
  --danger: #e5484d;
  --warn: #f0a020;
  --ok: #16a34a;
  --fs: 14px;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(22, 40, 60, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #eef1f6;
  -webkit-font-smoothing: antialiased;
}

/* 外层舞台 */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px 1fr 300px;
  gap: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, #e3edfb 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #e8f3ec 0%, transparent 55%),
    #f4f6fa;
}

/* ---------- 左：页面导航 ---------- */
.side {
  padding: 26px 18px 26px 24px;
  overflow-y: auto;
  max-height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.side-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, #4a9bf5, #1565C0);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(21, 101, 192, .28);
}
.side-title { font-size: 14.5px; font-weight: 700; letter-spacing: .2px; }
.side-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.side-note {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.7;
  margin: 14px 0 16px; padding: 10px 12px;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 10px;
}
.side-group { font-size: 11px; color: #93a4b8; font-weight: 600; letter-spacing: .6px; margin: 16px 0 8px; padding-left: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 11px; margin-bottom: 4px;
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  font-size: 13px; color: var(--ink-2); cursor: pointer; text-align: left;
  font-family: inherit; transition: .15s;
}
.nav-btn:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.nav-btn.on { background: #fff; border-color: #c5dcf7; color: var(--brand-d); font-weight: 600; box-shadow: 0 2px 8px rgba(21, 101, 192, .08); }
.nav-btn .ni {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  background: #e7edf5; color: #66798f; display: grid; place-items: center;
}
.nav-btn.on .ni { background: var(--brand-l); color: var(--brand); }
.nav-btn .ni svg { width: 13px; height: 13px; }
.nav-btn .nbadge {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: #fdeaea; color: #d33; font-weight: 600;
}
.nav-btn .nbadge.info { background: #eaf3fe; color: var(--brand); }

/* ---------- 中：手机 ---------- */
.phone-wrap { display: grid; place-items: center; padding: 28px 10px; }
.phone {
  width: 390px; height: 844px; position: relative;
  background: #fff; border-radius: 46px;
  border: 11px solid #131a24;
  box-shadow: 0 26px 60px rgba(16, 30, 50, .26), 0 0 0 1px rgba(0, 0, 0, .4) inset;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 140px; height: 27px; background: #131a24;
  border-radius: 0 0 18px 18px; z-index: 60;
}
/* 状态栏 */
.statusbar {
  height: 44px; flex: 0 0 auto; display: flex; align-items: flex-end;
  justify-content: space-between; padding: 0 22px 5px;
  font-size: 12.5px; font-weight: 600; color: #0b1a2b; position: relative; z-index: 50;
  background: transparent;
}
.statusbar.on-brand { color: #fff; }
.sb-right { display: flex; align-items: center; gap: 5px; }
.sb-right svg { width: 15px; height: 15px; }

/* 小程序导航栏 */
.wxnav {
  flex: 0 0 auto; height: 44px; display: flex; align-items: center;
  padding: 0 8px 0 10px; position: relative; z-index: 40;
  background: #fff; border-bottom: 1px solid #f0f2f5;
}
.wxnav.brand { background: var(--brand); border-bottom: none; }
.wxnav .back { width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: 0 0 auto; }
.wxnav.brand .back { color: #fff; }
.wxnav .back svg { width: 17px; height: 17px; }
.wxnav .nav-title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 15.5px; font-weight: 600; pointer-events: none;
}
.wxnav.brand .nav-title { color: #fff; }
.wxnav .capsule {
  margin-left: auto; width: 78px; height: 30px; border-radius: 15px;
  border: .5px solid rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .85);
  display: flex; align-items: center; justify-content: space-around; z-index: 2;
}
.wxnav.brand .capsule { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .3); }
.capsule i { width: 4px; height: 4px; border-radius: 50%; background: #333; display: block; }
.wxnav.brand .capsule i { background: #fff; }
.capsule .ring { width: 13px; height: 13px; border: 1.6px solid #333; border-radius: 50%; position: relative; }
.wxnav.brand .capsule .ring { border-color: #fff; }
.capsule .ring::after { content: ''; position: absolute; inset: 2.5px; border-top: 1.6px solid #333; border-radius: 50%; }
.wxnav.brand .capsule .ring::after { border-color: #fff; }

/* 页面主体 */
.screen {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); position: relative;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { width: 0; }
.page { padding: 12px 14px 18px; }

/* 底部 tabBar */
.tabbar {
  flex: 0 0 auto; height: 62px; display: flex; background: #fff;
  border-top: 1px solid #eef1f5; padding-bottom: 4px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: #9aa8b8; cursor: pointer; border: none; background: none;
  font-family: inherit; padding: 0;
}
.tab svg { width: 21px; height: 21px; }
.tab.on { color: var(--brand); }
.tab.on svg { color: var(--brand); }

/* ---------- 右：说明 ---------- */
.aside {
  padding: 26px 24px 26px 6px; overflow-y: auto; max-height: 100vh;
}
.apanel {
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 16px 14px; margin-bottom: 12px;
  backdrop-filter: blur(6px);
}
.apanel h4 { margin: 0 0 10px; font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.apanel h4 .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.apanel p { margin: 0 0 8px; font-size: 12px; line-height: 1.75; color: var(--ink-2); }
.apanel p:last-child { margin-bottom: 0; }
.apanel ul { margin: 0; padding-left: 16px; }
.apanel li { font-size: 12px; line-height: 1.8; color: var(--ink-2); }
.apanel code {
  background: #eef3f9; padding: 1px 5px; border-radius: 4px; font-size: 11px; color: #33507a;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.apanel .kv { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed #edf1f6; }
.apanel .kv:last-child { border-bottom: none; }
.apanel .kv b { font-weight: 600; color: var(--ink); }
.tagline { display: inline-block; font-size: 10.5px; padding: 1.5px 7px; border-radius: 7px; margin: 0 4px 4px 0; }
.t-blue { background: var(--brand-l); color: var(--brand-d); }
.t-green { background: #e7f7ee; color: #0d7a3e; }
.t-amber { background: #fef3e2; color: #a5661a; }
.t-red { background: #fdeaea; color: #c33; }

/* ==========================================================
   小程序组件
   ========================================================== */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 10px; }
.pad { padding: 13px 14px; }

.sec-title { display: flex; align-items: center; gap: 7px; margin: 16px 2px 8px; font-size: 13px; font-weight: 600; }
.sec-title:first-child { margin-top: 2px; }
.sec-title .more { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 400; display: flex; align-items: center; gap: 2px; }
.sec-title .more svg { width: 11px; height: 11px; }
.sec-title .bar { width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }

.muted { color: var(--ink-3); }
.tiny { font-size: 11px; }
.sm { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; }
.spacer { margin-left: auto; }

.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 500; }
.chip.blue { background: var(--brand-l); color: var(--brand-d); }
.chip.green { background: #e7f7ee; color: #0d7a3e; }
.chip.gray { background: #f0f3f7; color: #74869a; }
.chip.amber { background: #fef3e2; color: #a5661a; }
.chip.red { background: #fdeaea; color: #c33; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: .15s; white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(21, 101, 192, .24); }
.btn.wx { background: var(--wx); color: #fff; border-color: var(--wx); box-shadow: 0 4px 12px rgba(7, 193, 96, .22); }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; box-shadow: none; }

/* 顶部个人信息条 */
.hero {
  background: linear-gradient(150deg, #1b6fd0 0%, #12539f 100%);
  padding: 4px 16px 46px; color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -46px; top: -60px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.hero-row { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .2);
  display: grid; place-items: center; font-size: 16px; font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, .35); flex: 0 0 auto;
}
.hero .nm { font-size: 16px; font-weight: 600; }
.hero .sub { font-size: 11.5px; opacity: .82; margin-top: 3px; }
.hero .bell { margin-left: auto; position: relative; width: 30px; height: 30px; display: grid; place-items: center; }
.hero .bell svg { width: 19px; height: 19px; }
.hero .bell .pip { position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a5f; border: 1.5px solid #12539f; }

/* 任务卡（压在 hero 上） */
.taskcard {
  margin: -36px 14px 0; background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 6px 20px rgba(16, 46, 90, .12); position: relative; z-index: 2;
}
.taskcard .tc-head { display: flex; align-items: center; margin-bottom: 11px; }
.taskcard .tc-head b { font-size: 13.5px; }
.ring-wrap { display: flex; align-items: center; gap: 13px; }
.ring { width: 74px; height: 74px; flex: 0 0 auto; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .rt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .rt b { font-size: 19px; }
.ring .rt span { font-size: 9.5px; color: var(--ink-3); display: block; margin-top: 2px; }
.ring-info { flex: 1; min-width: 0; }
.ri-line { display: flex; align-items: baseline; gap: 5px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.ri-line b { font-size: 13px; color: var(--ink); font-weight: 600; }

/* 三级路径 */
.lvl {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border-bottom: 1px solid #f2f5f8; position: relative;
}
.lvl:last-child { border-bottom: none; }
.lvl .ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
  background: #eef3f9; color: #93a4b8;
}
.lvl.done .ic { background: #e7f7ee; color: #0d7a3e; }
.lvl.going .ic { background: var(--brand-l); color: var(--brand); }
.lvl .ic svg { width: 15px; height: 15px; }
.lvl .info { flex: 1; min-width: 0; }
.lvl .nm { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.lvl .meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.lvl .go { flex: 0 0 auto; }
.lvl.locked { opacity: .62; }
.bar-track { height: 4px; border-radius: 2px; background: #eef2f7; overflow: hidden; margin-top: 7px; }
.bar-fill { height: 100%; border-radius: 2px; background: var(--brand); transition: width .4s; }
.bar-fill.ok { background: #16a34a; }

/* ============ 视频学习页 ============ */
.player {
  background: #0d1620; position: relative; width: 100%; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.player canvas { width: 100%; height: 100%; display: block; }
.player .pl-ov {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 14, 22, .32); cursor: pointer;
}
.big-play {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: grid; place-items: center; color: #16283c; box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.big-play svg { width: 22px; height: 22px; margin-left: 3px; }
.pl-badge {
  position: absolute; left: 10px; top: 10px; font-size: 10px; color: #fff;
  background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 6px; display: flex; align-items: center; gap: 4px;
}
.pl-badge .livedot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; }
.pl-guard {
  position: absolute; right: 10px; top: 10px; font-size: 10px; color: #fff;
  background: rgba(21, 101, 192, .82); padding: 3px 8px; border-radius: 6px;
  display: flex; align-items: center; gap: 4px;
}
.pl-guard svg { width: 10px; height: 10px; }

/* 控制条 */
.ctrl { background: #101a25; padding: 8px 12px 10px; }
.ctrl .prog { height: 20px; display: flex; align-items: center; position: relative; cursor: pointer; }
.ctrl .p-track { height: 3px; width: 100%; background: rgba(255, 255, 255, .18); border-radius: 2px; position: relative; }
.ctrl .p-fill { position: absolute; left: 0; top: 0; height: 100%; background: #4a9bf5; border-radius: 2px; }
.ctrl .p-dot {
  position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: #fff;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(74, 155, 245, .35);
}
.ctrl .row2 { display: flex; align-items: center; gap: 12px; color: #c9d6e4; font-size: 10.5px; margin-top: 4px; }
.ctrl .row2 svg { width: 15px; height: 15px; }
.ctrl .row2 .tt { font-variant-numeric: tabular-nums; }
.ctrl .sp { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* 学时面板 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #f0f3f7; }
.stat-cell { background: #fff; padding: 11px 6px; text-align: center; }
.stat-cell b { font-size: 17px; display: block; font-variant-numeric: tabular-nums; }
.stat-cell span { font-size: 10px; color: var(--ink-3); display: block; margin-top: 3px; }

/* 章节列表 */
.lesson { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #f3f6f9; cursor: pointer; }
.lesson:last-child { border-bottom: none; }
.lesson .idx { width: 26px; height: 26px; border-radius: 7px; background: #f0f4f9; color: #7b8da1; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: 0 0 auto; }
.lesson.cur { background: #f5faff; }
.lesson.cur .idx { background: var(--brand-l); color: var(--brand); }
.lesson.pass .idx { background: #e7f7ee; color: #0d7a3e; }
.lesson .ln { font-size: 12.5px; font-weight: 500; }
.lesson .lm { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.lesson .lic { color: #b6c4d4; flex: 0 0 auto; }
.lesson .lic svg { width: 16px; height: 16px; }

/* ============ 题目卡 ============ */
.qwrap { padding: 14px; }
.qtype { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--brand-l); color: var(--brand-d); }
.qtext { font-size: 14.5px; line-height: 1.62; margin: 11px 0 14px; font-weight: 500; }
.opt {
  display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  margin-bottom: 8px; cursor: pointer; transition: .15s; background: #fff;
}
.opt:active { background: #fafcff; }
.opt .ob {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #cfdae6; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: #7b8da1;
}
.opt .ot { font-size: 13px; line-height: 1.55; flex: 1; padding-top: 1px; }
.opt.sel { border-color: #9cc3f7; background: #f5faff; }
.opt.sel .ob { border-color: var(--brand); background: var(--brand); color: #fff; }
.opt.right { border-color: #9ed9b6; background: #f2fbf6; }
.opt.right .ob { border-color: #16a34a; background: #16a34a; color: #fff; }
.opt.wrong { border-color: #f3b6b8; background: #fef4f4; }
.opt.wrong .ob { border-color: #e5484d; background: #e5484d; color: #fff; }
.opt.multi .ob { border-radius: 5px; }

.explain { background: #f7fafd; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 10px 12px; margin-top: 4px; }
.explain .eh { font-size: 11.5px; font-weight: 600; color: var(--brand-d); display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.explain .eh svg { width: 12px; height: 12px; }
.explain p { margin: 0; font-size: 12px; line-height: 1.72; color: var(--ink-2); }
.explain .ref { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* 底部操作条 */
.actbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #eef1f5; padding: 9px 13px; display: flex; gap: 9px; z-index: 5; }

/* 答题卡 */
.sheet-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sq {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; font-size: 12.5px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.sq.done { background: var(--brand-l); border-color: #b7d6f8; color: var(--brand-d); font-weight: 600; }
.sq.cur { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(21, 101, 192, .16); }

/* 倒计时条 */
.exam-top {
  display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 13px;
  border-bottom: 1px solid #eef1f5; position: sticky; top: 0; z-index: 6;
}
.cd { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--brand-d); font-variant-numeric: tabular-nums; }
.cd.warn { color: #d97706; }
.cd.danger { color: #dc2626; }
.cd svg { width: 14px; height: 14px; }

/* 结果页 */
.result-hero { padding: 26px 16px 22px; text-align: center; }
.score-ring { width: 132px; height: 132px; margin: 0 auto 12px; position: relative; }
.score-ring .inner { position: absolute; inset: 0; display: grid; place-items: center; }
.score-ring .sc { font-size: 40px; font-weight: 700; line-height: 1; }
.score-ring .un { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ============ 实操拍摄 ============ */
.cambox {
  aspect-ratio: 3 / 4; background: #0a1119; position: relative; overflow: hidden;
  border-radius: 12px;
}
.cambox canvas { width: 100%; height: 100%; display: block; }
.cam-frame { position: absolute; inset: 22px; border: 1.5px dashed rgba(255, 255, 255, .45); border-radius: 8px; pointer-events: none; }
.cam-frame::before, .cam-frame::after {
  content: ''; position: absolute; width: 22px; height: 22px; border: 2.5px solid #4ade80;
}
.cam-frame::before { left: -1px; top: -1px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.cam-frame::after { right: -1px; bottom: -1px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }
.cam-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 10.5px; color: #fff; background: rgba(0, 0, 0, .45);
  padding: 4px 10px; border-radius: 10px; white-space: nowrap;
}
.shutter-row { display: flex; align-items: center; justify-content: center; gap: 34px; padding: 16px 0 4px; }
.shutter {
  width: 62px; height: 62px; border-radius: 50%; background: #fff; border: 3.5px solid #d5dee8;
  cursor: pointer; display: grid; place-items: center;
}
.shutter i { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); display: block; }
.shutter:active i { background: var(--brand-d); }
.cam-side { width: 38px; height: 38px; border-radius: 50%; background: #f0f4f9; display: grid; place-items: center; color: #66798f; cursor: pointer; }
.cam-side svg { width: 17px; height: 17px; }

/* ============ 签名 ============ */
.signpad {
  background: #fff; border: 1px dashed #b9cde4; border-radius: 10px; position: relative;
  touch-action: none; overflow: hidden;
}
.signpad canvas { display: block; width: 100%; height: 190px; cursor: crosshair; }
.signpad .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #b6c4d4; font-size: 13px; pointer-events: none;
}
.sign-role { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #f3f6f9; }
.sign-role:last-child { border-bottom: none; }
.sr-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: #f0f4f9; color: #9aa8b8; }
.sr-ic.ok { background: #e7f7ee; color: #16a34a; }
.sr-ic svg { width: 14px; height: 14px; }

/* ============ 证书 ============ */
.cert-card {
  border-radius: 14px; padding: 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a5fb4 0%, #0c3c7c 100%);
  box-shadow: 0 10px 26px rgba(12, 60, 124, .3);
}
.cert-card::before {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px;
  border-radius: 50%; border: 22px solid rgba(255, 255, 255, .06);
}
.cert-card .cc-top { display: flex; align-items: flex-start; margin-bottom: 14px; }
.cert-card .cc-t { font-size: 12.5px; font-weight: 600; letter-spacing: 1px; }
.cert-card .cc-t2 { font-size: 10px; opacity: .7; margin-top: 3px; letter-spacing: .5px; }
.cert-card .seal {
  margin-left: auto; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .45); display: grid; place-items: center;
  font-size: 8px; text-align: center; line-height: 1.15; opacity: .9; flex: 0 0 auto;
}
.cert-card .cc-name { font-size: 19px; font-weight: 700; margin-bottom: 5px; }
.cert-card .cc-meta { font-size: 11px; opacity: .82; line-height: 1.75; }
.cert-card .cc-bot { display: flex; align-items: flex-end; margin-top: 14px; gap: 12px; }
.cert-card .qr { width: 62px; height: 62px; background: #fff; border-radius: 6px; padding: 4px; flex: 0 0 auto; }
.cert-card .qr svg { width: 100%; height: 100%; display: block; }
.cert-card .cc-no { font-size: 10.5px; opacity: .8; line-height: 1.7; }

/* 档案行 */
.dl { display: flex; padding: 9px 0; border-bottom: 1px solid #f3f6f9; font-size: 12.5px; }
.dl:last-child { border-bottom: none; }
.dl dt { width: 84px; color: var(--ink-3); flex: 0 0 auto; margin: 0; }
.dl dd { margin: 0; color: var(--ink); flex: 1; }

/* toast / 弹层 */
.toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  background: rgba(20, 32, 46, .9); color: #fff; font-size: 12.5px; line-height: 1.5;
  padding: 9px 15px; border-radius: 8px; max-width: 290px; text-align: center;
  opacity: 0; transition: .22s; pointer-events: none; z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.mask {
  position: absolute; inset: 0; background: rgba(10, 18, 28, .5); z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.dlg { background: #fff; border-radius: 14px; width: 100%; overflow: hidden; }
.dlg-h { padding: 17px 16px 4px; font-size: 15px; font-weight: 600; text-align: center; }
.dlg-b { padding: 10px 16px 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.dlg-f { display: flex; border-top: 1px solid #f0f3f7; }
.dlg-f button {
  flex: 1; height: 46px; border: none; background: #fff; font-size: 14.5px;
  font-family: inherit; cursor: pointer; color: var(--ink-2);
}
.dlg-f button + button { border-left: 1px solid #f0f3f7; color: var(--brand); font-weight: 600; }

/* 人脸核验框 */
.facebox { width: 200px; height: 230px; margin: 0 auto 12px; position: relative; }
.facebox .fc { width: 100%; height: 100%; border-radius: 50% / 44%; overflow: hidden; background: #16202c; position: relative; }
.facebox canvas { width: 100%; height: 100%; display: block; }
.facebox .scan {
  position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #4ade80, transparent);
  animation: scan 1.6s linear infinite;
}
@keyframes scan { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }
.facebox .ok-badge {
  position: absolute; right: -4px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  background: #16a34a; color: #fff; display: grid; place-items: center;
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.facebox .ok-badge svg { width: 18px; height: 18px; }

/* 空态 */
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.empty svg { width: 34px; height: 34px; color: #cfdae6; margin-bottom: 10px; }

/* 底部安全区 */
.safe-bot { height: 12px; }

/* 单手机模式（手机/窄屏打开） */
body.only .stage { display: block; background: #fff; }
body.only .side, body.only .aside { display: none; }
body.only .phone-wrap { padding: 0; }
body.only .phone { width: 100%; height: 100vh; border: none; border-radius: 0; box-shadow: none; }
body.only .notch { display: none; }

@media (max-width: 1180px) {
  .stage { grid-template-columns: 232px 1fr; }
  .aside { display: none; }
}
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .side { display: none; }
  .phone-wrap { padding: 0; }
  .phone { width: 100%; height: 100vh; border: none; border-radius: 0; box-shadow: none; max-width: none; }
  .notch { display: none; }
}

/* 卡片内内容图标默认尺寸（:where 保持零优先级，不覆盖已有显式尺寸） */
.card :where(svg:not(.ring-svg)) { width: 14px; height: 14px; flex: 0 0 auto; }

/* ===== 所属单位条（小程序端显示学员单位全称） ===== */
.unitline {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(255, 255, 255, .92);
  padding-bottom: 9px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.unitline > svg { width: 12px; height: 12px; flex: 0 0 auto; opacity: .9; }
.unitline .uname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unitline .ustu {
  margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255, 255, 255, .18); border-radius: 20px; padding: 3px 9px;
  font-size: 10.5px; cursor: pointer; transition: .15s;
}
.unitline .ustu > svg { width: 10px; height: 10px; }
.unitline .ustu:hover { background: rgba(255, 255, 255, .3); }

/* ===== 切换学员列表 ===== */
.stu-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; margin-bottom: 7px; font-family: inherit; cursor: pointer; transition: .15s;
}
.stu-row:hover { border-color: #9cc3f7; background: #fafcff; }
.stu-row.on { border-color: var(--brand); background: var(--brand-l); }
.stu-row .sa {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(140deg, #3f97ff, #1565C0);
}
.stu-row .sb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stu-row .sb b { font-size: 12.5px; color: var(--ink); }
.stu-row .sb i {
  font-style: normal; font-size: 10.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stu-row .sc { width: 15px; height: 15px; flex: 0 0 auto; color: var(--brand); }
.stu-row .sc svg { width: 14px; height: 14px; }

/* 无需培训的级别 */
.lvl.skip { opacity: .75; }

/* 员工端：修改密码表单（dialog 内表单行） */
.fg { margin-bottom: 10px; }
.fg > label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.fg .input, .fg input {
  width: 100%; box-sizing: border-box; height: 38px; border: 1px solid #dbe4ee;
  border-radius: 8px; padding: 0 12px; font-size: 13.5px; color: var(--ink); outline: none;
  background: #fff;
}
.fg input:focus { border-color: #8fb6e0; }
