/* ============ H5 监护证管理系统 · 考生端样式 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #eef2f8;
  color: #222;
  font-size: 15px;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.page { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #eef2f8; padding-bottom: 30px; }

/* 顶栏 */
.topbar {
  height: 50px; background: linear-gradient(90deg, #003fa0, #1565d8);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 63, 160, .25);
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-action { font-size: 14px; opacity: .92; min-width: 34px; }
.content { padding: 12px; }

/* 卡片 */
.card {
  background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(20, 40, 80, .07);
}
.card-title { font-size: 15px; font-weight: 700; color: #14305e; margin-bottom: 10px;
  border-left: 4px solid #003fa0; padding-left: 8px; }
.mt10 { margin-top: 10px; }
.muted { color: #8a94a6; font-size: 13px; }
.center { text-align: center; }
.green { color: #12a15a; }
.red { color: #d3232f; }
.tip { color: #8a94a6; font-size: 12px; margin: 8px 0 0; }

/* 登录页 */
.login-wrap { padding: 40px 18px; }
.login-logo { text-align: center; margin-bottom: 26px; }
.brand-line { width: 54px; height: 5px; background: #d3232f; margin: 0 auto 16px; border-radius: 3px; }
.login-logo h1 { font-size: 19px; color: #14305e; margin: 0 0 4px; letter-spacing: .5px; }
.login-logo h2 { font-size: 16px; color: #003fa0; margin: 0 0 6px; font-weight: 600; }
.login-logo .sub { font-size: 10px; color: #a9b2c2; letter-spacing: 1.2px; margin: 0; }
.footer-tip { text-align: center; color: #a9b2c2; font-size: 11px; margin-top: 26px; line-height: 1.8; }

/* 表单 */
.form-item { margin-bottom: 13px; }
.form-item label { display: block; font-size: 13px; color: #5d6879; margin-bottom: 5px; }
.form-item input, .form-item select, .search-input {
  width: 100%; height: 44px; border: 1px solid #d8dfea; border-radius: 9px;
  padding: 0 12px; font-size: 15px; background: #fafbfd; outline: none; color: #222;
}
.form-item input:focus, .form-item select:focus, .search-input:focus {
  border-color: #003fa0; background: #fff;
}
.form-item input:disabled { background: #f2f4f8; color: #98a1b1; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 9px; border: 0; font-size: 15px; cursor: pointer;
  padding: 0 18px; font-family: inherit;
}
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(90deg, #003fa0, #1565d8); color: #fff; }
.btn-primary:disabled { background: #b7c3d6; }
.btn-outline { background: #fff; color: #003fa0; border: 1px solid #b9c9e2; flex: 1; }
.btn:active { opacity: .85; }

/* 首页用户卡 */
.user-card {
  background: linear-gradient(120deg, #003fa0, #1a72e0); border-radius: 14px;
  padding: 16px; display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 12px;
}
.user-card .avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.8); background: #fff; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 18px; font-weight: 700; }
.user-unit { font-size: 12px; opacity: .9; }
.user-edit { color: #fff; font-size: 13px; border: 1px solid rgba(255,255,255,.6);
  border-radius: 20px; padding: 3px 12px; }

/* 菜单宫格 */
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.menu-item { background: #fff; border-radius: 12px; padding: 14px 4px; text-align: center;
  box-shadow: 0 1px 6px rgba(20,40,80,.07); }
.menu-item i { display: block; font-style: normal; font-size: 22px; margin-bottom: 6px; }
.menu-item span { font-size: 12.5px; color: #334; }

/* 统计 */
.stat-row { display: flex; }
.stat { flex: 1; text-align: center; }
.stat b { display: block; font-size: 20px; color: #003fa0; }
.stat span { font-size: 12px; color: #8a94a6; }

/* 键值行 */
.kv { display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed #eef1f6; font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: #7d8798; flex: 0 0 auto; }
.kv b { font-weight: 600; text-align: right; word-break: break-all; }
.done-tip { margin-top: 10px; background: #e8f7ee; color: #12a15a; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; text-align: center; }

/* 头像编辑 */
.avatar-edit { display: flex; gap: 14px; align-items: flex-start; }
.avatar-box { width: 96px; height: 128px; border: 1px solid #d8dfea; border-radius: 8px;
  overflow: hidden; background: #f5f7fb; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; }
.avatar-box img { width: 100%; height: 100%; object-fit: cover; display: none; }
.avatar-box span { color: #aeb7c6; font-size: 12px; }
.avatar-ops { flex: 1; }
.avatar-ops .btn { width: 100%; }

/* 试题 */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 4px 11px; border-radius: 20px; background: #f0f3f9; color: #4c586c;
  font-size: 12.5px; cursor: pointer; }
.chip.active { background: #003fa0; color: #fff; }
.q-list { display: block; }
.q-card { background: #fff; border-radius: 12px; padding: 13px; margin-bottom: 11px;
  box-shadow: 0 1px 6px rgba(20,40,80,.07); }
.q-head { display: flex; gap: 6px; margin-bottom: 7px; flex-wrap: wrap; }
.tag { background: #eaf0fb; color: #1565d8; border-radius: 5px; padding: 1px 7px; font-size: 11.5px; }
.tag-done { background: #e8f7ee; color: #12a15a; }
.q-title { font-size: 14.5px; font-weight: 600; color: #22304a; margin-bottom: 9px; }
.opt { border: 1px solid #e3e9f2; border-radius: 8px; padding: 8px 11px; margin-bottom: 7px;
  font-size: 13.5px; color: #3b4657; background: #fafbfd; cursor: pointer; }
.opt.active { border-color: #003fa0; background: #eef4ff; color: #003fa0; font-weight: 600; }
.opt-line { font-size: 13px; color: #4c586c; margin-bottom: 4px; }
.q-answer { background: #f7f9fc; border-radius: 8px; padding: 9px 11px; font-size: 13px; margin-bottom: 8px; }
.q-actions { display: flex; justify-content: space-between; }
.link { color: #1565d8; font-size: 13px; cursor: pointer; }
.analysis { background: #f7f9fc; border-radius: 7px; padding: 8px 10px; font-size: 12.5px;
  color: #5d6879; margin-top: 6px; }
.wrong-item { border-top: 1px dashed #eef1f6; padding-top: 10px; margin-top: 10px; }
.wrong-item:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* 考试 */
.rule-list { margin: 0 0 12px; padding-left: 20px; color: #5d6879; font-size: 13px; }
.rule-list li { margin-bottom: 5px; }
.quiz-bar { position: sticky; top: 50px; z-index: 40; background: #fff; border-radius: 10px;
  padding: 9px 13px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(20,40,80,.1); font-size: 13.5px; color: #4c586c; }
.timer { font-weight: 700; color: #003fa0; font-variant-numeric: tabular-nums; }
.timer.danger { color: #d3232f; }
.quiz-foot { padding: 6px 0 20px; }
.result-card { text-align: center; }
.score { font-size: 52px; font-weight: 800; color: #003fa0; line-height: 1.1; }
.score span { font-size: 18px; margin-left: 4px; }
.score.pass { color: #12a15a; }
.score.fail { color: #d3232f; }
.pass-tip { color: #12a15a; font-weight: 700; margin-top: 4px; }
.fail-tip { color: #d3232f; font-weight: 600; margin-top: 4px; font-size: 14px; }

/* 证件 */
.cert-box { position: relative; text-align: center; }
.cert-status { position: absolute; right: 12px; top: 12px; font-size: 12px;
  padding: 2px 10px; border-radius: 20px; }
.cert-status.ok { background: #e8f7ee; color: #12a15a; }
.cert-status.bad { background: #fdecec; color: #d3232f; }
.cert-img { width: 100%; border-radius: 9px; margin: 8px 0; border: 1px solid #e6ebf3; display: block; }
.ops { display: flex; gap: 10px; margin-top: 8px; }
.cancel-tip { background: #fdecec; color: #c01c28; border-radius: 8px; padding: 9px;
  font-size: 13px; margin-top: 8px; }

/* 核验页 */
.verify-icon { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 10px;
  font-size: 34px; line-height: 64px; font-weight: 700; color: #fff; }
.verify-icon.ok { background: #12a15a; }
.verify-icon.bad { background: #d3232f; }
.verify-avatar { width: 78px; height: 104px; object-fit: cover; border-radius: 7px;
  display: block; margin: 0 auto 10px; border: 1px solid #e6ebf3; }
.cancel-banner { background: #fdecec; border: 1px solid #f7c8cb; border-radius: 9px;
  padding: 11px; text-align: left; color: #a31722; font-size: 13.5px; margin-top: 8px; }
.cancel-title { font-weight: 700; margin: 0 0 6px; }
.cancel-banner p { margin: 3px 0; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 68px; transform: translate(-50%, 20px);
  background: rgba(24, 32, 48, .92); color: #fff; padding: 9px 18px; border-radius: 22px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999;
  max-width: 82%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ============ 补充样式：按钮 / 徽标 / 进度 / 分页 / 结果卡 / 证件卡 ============ */
.btn-sm { height: 34px; font-size: 13px; padding: 0 14px; border-radius: 8px; }
.btn-ghost { background: #fff; color: #1565d8; border: 1px solid #c4d3ea; }
.btn-ghost:active { background: #f2f6fd; }
.blue { color: #003fa0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.warn-text { color: #d3232f; }
.alert-error {
  background: #fdecec; color: #c01c28; border: 1px solid #f7c8cb; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; margin-bottom: 10px;
}
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.badge-ok { background: #e8f7ee; color: #12a15a; }
.badge-bad { background: #fdecec; color: #d3232f; }
.badge-warn { background: #fff6e5; color: #d78b00; }
.tag-warn { background: #fdecec; color: #d3232f; }

/* 进度条 */
.progress { height: 8px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #003fa0, #36a3ff); transition: width .3s; }

/* 证件照编辑 */
.avatar-row { display: flex; gap: 14px; align-items: flex-start; }
.photo-box { width: 96px; height: 128px; flex: 0 0 auto; border: 1px dashed #c4d3ea; border-radius: 9px;
  background: #f6f8fc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { color: #aeb7c6; font-size: 12px; text-align: center; }
.avatar-tips { flex: 1; min-width: 0; }
.avatar-tips .btn { width: 100%; }
.avatar-tips .kv b { font-size: 13px; }

/* 检索 / 分页 */
.mini-select { height: 32px; border: 1px solid #d8dfea; border-radius: 8px; background: #fafbfd;
  font-size: 13px; color: #4c586c; padding: 0 8px; font-family: inherit; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 0 20px; }
.page-btn, .page-num { min-width: 32px; height: 32px; line-height: 30px; text-align: center;
  border-radius: 8px; border: 1px solid #d8dfea; background: #fff; color: #4c586c; font-size: 13px;
  padding: 0 8px; cursor: pointer; }
.page-num.active { background: #003fa0; border-color: #003fa0; color: #fff; font-weight: 700; }
.pager-info { width: 100%; text-align: center; color: #8a94a6; font-size: 12px; margin-top: 6px; }
.empty { text-align: center; color: #98a1b1; font-size: 13.5px; padding: 22px 8px; line-height: 1.9; }

/* 答案与解析 */
.ans-box { background: #f7f9fc; border-radius: 8px; padding: 9px 11px; margin: 8px 0 4px; }
.ans-line { font-size: 13px; color: #4c586c; line-height: 1.7; }
.opt.right { border-color: #12a15a; background: #eefaf3; color: #0d7d46; font-weight: 600; }
.opt.wrong { border-color: #d3232f; background: #fdecec; color: #b21e29; font-weight: 600; }

/* 结果卡 */
.result-card { background: #fff; border-radius: 14px; padding: 20px 16px; text-align: center;
  margin-bottom: 12px; box-shadow: 0 1px 6px rgba(20,40,80,.07); }
.result-card.ok { border-top: 4px solid #12a15a; }
.result-card.bad { border-top: 4px solid #d3232f; }
.result-card.warn { border-top: 4px solid #d78b00; }
.score-big { font-size: 46px; font-weight: 800; color: #003fa0; line-height: 1.1; }
.score-big span { font-size: 16px; margin-left: 4px; }
.result-card.ok .score-big { color: #12a15a; }
.result-card.bad .score-big { color: #d3232f; }
.score-sub { color: #5d6879; font-size: 13.5px; margin-top: 6px; }
.score-tip { color: #8a94a6; font-size: 12.5px; margin: 8px 0 0; }
.pass-flag { margin-top: 10px; font-size: 15px; font-weight: 700; }
.result-card.ok .pass-flag { color: #12a15a; }
.result-card.bad .pass-flag { color: #d3232f; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* 考试须知 */
.rules { margin: 0; padding-left: 20px; color: #5d6879; font-size: 13px; }
.rules li { margin-bottom: 5px; }

/* 成绩记录 */
.record-card .cert-img { margin-top: 6px; }
.record-line { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 8px; margin-top: 8px; border-top: 1px dashed #eef1f6; }
.record-main { min-width: 0; font-size: 13px; line-height: 1.7; }
.record-score { font-size: 26px; font-weight: 800; color: #8a94a6; flex: 0 0 auto; }
.record-score span { font-size: 12px; font-weight: 500; margin-left: 2px; }

/* 证件卡与放大预览 */
.cert-card { padding-bottom: 14px; }
.cert-actions { display: flex; gap: 10px; margin-top: 10px; }
.cert-actions .btn { flex: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(10,16,28,.9); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { width: 100%; max-width: 520px; border-radius: 10px; background: #fff; }
.lightbox-tip { color: rgba(255,255,255,.75); font-size: 12.5px; margin-top: 12px; }
