* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f9;
  color: #1f2329;
  font-size: 16px;
  line-height: 1.5;
}
.page { max-width: 640px; margin: 0 auto; padding: 16px; min-height: 100vh; }
.card {
  background: #fff; border-radius: 12px; padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px;
}
h1 { font-size: 22px; font-weight: 700; text-align: center; margin: 8px 0 16px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.label { font-size: 14px; color: #4e5969; margin-bottom: 6px; display: block; }
.input, select.input {
  width: 100%; padding: 12px 14px; border: 1px solid #d9dee7; border-radius: 8px;
  font-size: 16px; background: #fff; outline: none; margin-bottom: 14px;
}
.input:focus { border-color: #3370ff; }
.essay-input {
  width: 100%; padding: 12px 14px; border: 1px solid #d9dee7; border-radius: 8px;
  font-size: 16px; background: #fff; outline: none; box-sizing: border-box;
  font-family: inherit; resize: vertical; min-height: 72px;
}
.essay-input:focus { border-color: #3370ff; }
.btn {
  width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 16px;
  font-weight: 600; cursor: pointer; text-align: center;
}
.btn-primary { background: #3370ff; color: #fff; }
.btn-primary:disabled { background: #a9c2ff; }
.btn-light { background: #f0f3f8; color: #1f2329; border: 1px solid #e0e6ee; }
.btn-danger { background: #f53f3f; color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 14px; width: auto; border-radius: 6px; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }
.muted { color: #86909c; font-size: 13px; }
.center { text-align: center; }
.hint { font-size: 13px; color: #86909c; margin-top: 8px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-green { background: #e8ffea; color: #00b42a; }
.badge-red { background: #ffece8; color: #f53f3f; }
.badge-grey { background: #f0f3f8; color: #4e5969; }
.badge-blue { background: #e8f3ff; color: #3370ff; }
.opt { display: block; padding: 11px 12px; border: 1px solid #e0e6ee; border-radius: 8px;
  margin-bottom: 8px; cursor: pointer; user-select: none; }
.opt.selected { border: 2px solid #3370ff; background: #3370ff; color: #fff; font-weight: 600; box-shadow: 0 0 0 3px rgba(51,112,255,.35); }
.opt.selected::before { content: '✓ '; }
.q-num { font-weight: 700; }
.q-title { margin-bottom: 12px; }
.timer { text-align: center; font-size: 15px; color: #3370ff; font-weight: 600; margin-bottom: 12px; }
.result-score { font-size: 40px; font-weight: 800; text-align: center; margin: 8px 0; }
.result-pass { font-size: 18px; font-weight: 700; text-align: center; }
.row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.row .k { color: #4e5969; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border: 1px solid #e5e8ef; padding: 8px 6px; text-align: left; }
.table th { background: #f7f8fa; position: sticky; top: 0; }
.detail-q { border: 1px solid #e5e8ef; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.detail-q .ans { margin-top: 6px; font-size: 14px; }
.detail-q .ok { color: #00b42a; } .detail-q .no { color: #f53f3f; }
.nav-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.nav-tabs .tab { padding: 8px 14px; border-radius: 6px; background: #f0f3f8; color: #4e5969;
  cursor: pointer; font-size: 14px; }
.nav-tabs .tab.active { background: #3370ff; color: #fff; }
.nav-tabs .tab.logout { background: #ffece8; color: #f53f3f; margin-left: auto; }
.panel { display: none; }
.panel.active { display: block; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-row .input, .filter-row select.input { flex: 1; min-width: 90px; margin-bottom: 0; }
.list-item { border: 1px solid #eef0f4; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.ck { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }
a.link { color: #3370ff; text-decoration: none; }
.d-opt { padding: 8px 10px; border: 1px solid #e0e6ee; border-radius: 6px; margin-top: 6px; line-height: 1.5; color: #1f2329; }
.d-opt span { color: #8a919f; font-size: 13px; }
.d-correct { border-color: #00b42a; background: #e8ffea; }
.d-correct span { color: #00b42a; font-weight: 600; }
.d-wrong { border-color: #f53f3f; background: #ffece8; }
.d-wrong span { color: #f53f3f; font-weight: 600; }
.list-item.drag-over { border-color: #3370ff; box-shadow: 0 0 0 2px rgba(51,112,255,.2); }
.list-item.dragging { opacity: .5; border-style: dashed; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.modal { background: #fff; border-radius: 10px; padding: 18px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-sizing: border-box; }
.modal h3 { margin: 0 0 12px; font-size: 18px; }
.modal .label { display: block; margin-bottom: 4px; font-size: 13px; color: #4e5969; }
.modal .input { margin-bottom: 10px; }
.modal .row2 { display: flex; gap: 8px; }
.modal .row2 .input { margin-bottom: 10px; }
.modal .btn-row { margin-top: 4px; }
