/* 手机端为主：大字号、大按钮、少层级 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: #f2f5f9; color: #1d2530;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px; line-height: 1.6;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.brand { background: #1f3b73; color: #fff; padding: 22px 18px; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.brand p { margin: 6px 0 0; font-size: 14px; color: #c2d2e8; }
/* 顶部软件名：明显但不抢戏 */
.brand-line { font-size: 13px; color: #9fb6d6; letter-spacing: .5px; margin-bottom: 10px;
  padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.13); }
/* 页脚版本号：能查到，但不显眼 */
.ver { text-align: center; font-size: 12px; color: #a7b3c2; margin: 22px 0 6px; letter-spacing: .3px; }
.admin .ver { color: #98a5b5; }
.card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(20,40,70,.06); margin-bottom: 14px; }
.bigbtn {
  display: block; width: 100%; padding: 22px 18px; border: 0; border-radius: 14px;
  background: #fff; color: #1d2530; font-size: 20px; font-weight: 600; text-align: left;
  box-shadow: 0 2px 10px rgba(20,40,70,.06); margin-bottom: 14px; text-decoration: none;
}
.bigbtn small { display: block; font-size: 14px; font-weight: 400; color: #6b7a8c; margin-top: 4px; }
.bigbtn.primary { background: #1f3b73; color: #fff; }
.bigbtn.primary small { color: #c2d2e8; }
.bigbtn.green { background: #15803d; color: #fff; }
.bigbtn.green small { color: #cdebd8; }
label { display: block; font-size: 15px; color: #52606f; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 14px; font-size: 18px; border: 1px solid #d5dde7; border-radius: 10px;
  background: #fff; color: #1d2530;
}
textarea { min-height: 96px; }
.btn { display: inline-block; padding: 13px 22px; border: 0; border-radius: 10px; background: #1f3b73;
  color: #fff; font-size: 17px; text-decoration: none; cursor: pointer; }
.btn.ghost { background: #e8eef7; color: #1f3b73; }
.btn.red { background: #b91c1c; }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.tip { font-size: 14px; color: #6b7a8c; }
.err { background: #fdecec; color: #b91c1c; padding: 12px 14px; border-radius: 10px; font-size: 15px; margin-bottom: 12px; }
.ok { background: #e8f6ee; color: #15803d; padding: 12px 14px; border-radius: 10px; font-size: 15px; margin-bottom: 12px; }
.muted { color: #7b8797; font-size: 14px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.list-item:last-child { border-bottom: 0; }
.q { margin-bottom: 18px; }
.q .stem { font-weight: 600; margin-bottom: 10px; }
.opt { display: block; padding: 13px 14px; border: 1px solid #d5dde7; border-radius: 10px; margin-bottom: 8px; background: #fff; }
.opt input { margin-right: 8px; transform: scale(1.25); }
.opt.sel { border-color: #1f3b73; background: #eef3fb; }
.score { font-size: 52px; font-weight: 700; line-height: 1; }
.pass { color: #15803d; } .fail { color: #b91c1c; }
canvas#pad { width: 100%; height: 200px; background: #fff; border: 1px dashed #b9c4d2; border-radius: 10px; touch-action: none; }

/* 后台 */
.admin { font-size: 15px; }
.admin .wrap { max-width: 1180px; }
.nav { background: #1f3b73; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: center; }
.nav a { color: #d6e2f0; text-decoration: none; padding: 14px 12px; font-size: 15px; }
.nav a:hover, .nav a.on { color: #fff; background: rgba(255,255,255,.08); }
.nav .sp { flex: 1; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eef1f5; text-align: left; vertical-align: top; font-size: 14px; }
th { background: #eef3fb; color: #1f3b73; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #fafcff; }
.kpi { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi div { background: #fff; border-radius: 12px; padding: 16px 20px; min-width: 130px; box-shadow: 0 2px 8px rgba(20,40,70,.05); }
.kpi b { display: block; font-size: 28px; color: #1f3b73; }
.form-grid { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; align-items: center; }
.form-grid label { margin: 0; }
@media print {
  .nav, .noprint { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
}

/* 防横向溢出（手机上最常见的问题） */
html, body { max-width: 100%; overflow-x: hidden; }
.wrap { width: 100%; }
.card, .bigbtn { width: 100%; max-width: 100%; overflow-wrap: anywhere; }
input, select, textarea { min-width: 0; max-width: 100%; }
p, div, td, th { overflow-wrap: break-word; }
.form-grid > * { min-width: 0; }

/* ===== 跑马灯（最近通过考核）===== */
.marquee { overflow: hidden; background: #fff6e0; border-bottom: 1px solid #f2e2b8; padding: 9px 0; }
.marquee-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: mq 26s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes mq { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.mq-item { display: inline-block; margin-right: 48px; color: #8a5a00; font-size: 15px; }
.mq-item::before { content: '●'; color: #e0a11a; margin-right: 8px; font-size: 11px; vertical-align: 2px; }

/* ===== 范围标签（全员 / 本车间 / 本岗位）===== */
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px;
  margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.tag-all { background: #e8eef7; color: #1f3b73; }
.tag-group { background: #e6f4ea; color: #15803d; }
.tag-position { background: #fdf0e3; color: #9a5b00; }
.tag-rec { background: #fff1f2; color: #be123c; }

/* ===== 学习资料分组标题 ===== */
.sec-h { margin: 20px 2px 8px; font-size: 15px; font-weight: 700; color: #1f3b73; }
.sec-h .tip { font-weight: 400; margin-left: 6px; }

/* ===== 榜单 ===== */
.rank-title { font-size: 18px; font-weight: 700; color: #1f3b73; margin-bottom: 10px; }
.rank-title .muted { font-size: 13px; font-weight: 400; margin-left: 4px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef1f5; }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 30px; height: 30px; border-radius: 50%; background: #eef1f5; color: #7b8797;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: 0 0 auto; }
.rank-1 { background: #f5c542; color: #6b4a00; }
.rank-2 { background: #cfd8e3; color: #46536b; }
.rank-3 { background: #e0b58a; color: #6b3f12; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 16px; font-weight: 600; }
.rank-name .muted { font-size: 13px; font-weight: 400; }
.rank-bar { height: 7px; background: #eef1f5; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: #1f3b73; border-radius: 4px; }
.rank-val { font-size: 20px; font-weight: 700; color: #1f3b73; flex: 0 0 auto; }
.rank-val .muted { font-size: 13px; font-weight: 400; margin-left: 2px; }

/* 题库目录的缺口标记 */
.ok-txt { color: #15803d; font-weight: 600; }
.gap-txt { color: #b91c1c; font-weight: 700; }

/* ===== 首页紧凑化 ===== */
.card.tight { padding: 16px 18px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.accent { color: #1f3b73; font-size: 18px; }
.bar { height: 10px; background: #e6ecf5; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: #1f3b73; border-radius: 6px; }

/* 三宫格功能入口 */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.tile { position: relative; background: #fff; border-radius: 12px; padding: 16px 8px; text-align: center;
  text-decoration: none; color: #1d2530; font-size: 15px; box-shadow: 0 2px 10px rgba(20,40,70,.06);
  display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile:active { background: #eef3fb; }
.tile-ico { font-size: 24px; line-height: 1; }
.tile .dot { position: absolute; top: 8px; right: 10px; background: #b91c1c; color: #fff;
  font-size: 11px; font-style: normal; min-width: 17px; height: 17px; line-height: 17px;
  border-radius: 9px; padding: 0 4px; }

/* 公告列表 */
.notice-item { display: block; text-decoration: none; color: inherit; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.notice-item:last-child { border-bottom: 0; }
.notice-item .t { font-weight: 600; font-size: 16px; }
.notice-item .m { color: #7b8797; font-size: 13px; margin-top: 4px; }
.notice-pin { display: inline-block; background: #fdecec; color: #b91c1c; font-size: 11px;
  border-radius: 5px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
.notice-body { white-space: pre-wrap; font-size: 16px; line-height: 1.85; color: #2b3440; }
