:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1f2933;
  --muted: #6b7480;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #16a34a;
  --orange: #ea8a0a;
  --red: #dc2626;
  --purple: #7c3aed;
  --blue: #2563eb;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 650; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: .3em 0; }
.muted { color: var(--muted); }
.sm-text { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none; }
.mt { margin-top: 14px; }
.w-60 { width: 60px; } .w-100 { width: 100px; } .w-120 { width: 120px; }
.w-140 { width: 140px; } .w-160 { width: 160px; } .w-200 { width: 200px; } .w-300 { width: 300px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 20px; padding-bottom: 60px; }

/* 顶栏 */
.topbar { background: #101828; color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { color: #fff; font-weight: 700; font-size: 16px; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { color: #cdd5df; font-size: 14px; }
.topbar nav a:hover { color: #fff; }
.topbar-user { color: #fff; font-size: 14px; }
.topbar .btn.ghost { color: #e6e9ee; border-color: rgba(255, 255, 255, .35); }
.topbar .btn.ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); }
.inline { display: inline; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card.no-pad { padding: 0; overflow: hidden; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 16px; }
.page-head h2, .page-head h3 { margin: 0; }

/* 按钮 */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 7px; padding: 6px 14px; font-size: 14px; cursor: pointer; line-height: 1.5;
}
.btn:hover { border-color: #c8cdd4; background: #f8f9fb; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--red); border-color: #f3c1c1; }
.btn.danger:hover { background: #fdf0f0; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 3px 10px; font-size: 13px; }
.btn.block { display: block; width: 100%; }
.btn.wide { min-width: 160px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: #fafbfc; color: var(--muted); font-weight: 600; font-size: 13px; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfd; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.form-row label.checkbox { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; cursor: pointer; }
input[type=text], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: 14px; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.inline-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-edit input, .inline-edit select { width: auto; }
.btn-row { display: flex; gap: 10px; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* 徽标 */
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; line-height: 1.7; vertical-align: middle; }
.badge.green { background: #e7f6ec; color: var(--green); }
.badge.orange { background: #fdf2e0; color: var(--orange); }
.badge.red { background: #fdeaea; color: var(--red); }
.badge.blue { background: #e8effd; color: var(--blue); }
.badge.purple { background: #f1e9fd; color: var(--purple); }
.badge.gray { background: #eef0f3; color: var(--muted); }
.badge.teal { background: #dcf3f3; color: #0e7490; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

/* 提示 */
.notice { background: #e8f0fe; border: 1px solid #c4d7fb; color: #1e40af; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.notice.warn { background: #fdf6e3; border-color: #f3dcab; color: #92650c; }

/* 登录 */
.login-box { max-width: 360px; margin: 80px auto; padding: 32px; }
.login-box h1 { text-align: center; }
.login-box .muted { text-align: center; margin-bottom: 18px; }

/* 我的赛事 */
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card h3 { margin-bottom: 2px; }
.event-card .btn { margin-top: 10px; }
.narrow { max-width: 420px; margin: 40px auto; }
.narrow-wide { max-width: 720px; }

/* 赛事头与 Tabs */
.event-head { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px 0; margin-bottom: 16px; }
.event-head-main h2 { margin-bottom: 0; }
.tabs { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* 批量操作条 */
.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.batch-bar select { width: auto; }
.batch-bar .sep { width: 1px; height: 22px; background: var(--line); }
.batch-bar .right { margin-left: auto; }

/* 进度条 */
.progress-card { padding: 16px 20px; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.progress-head b { color: var(--text); font-size: 15px; }
.progress { height: 8px; background: #e9ecf0; border-radius: 99px; overflow: hidden; }
.progress.big { height: 12px; }
.progress .bar { height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }

/* 评审工作台 */
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.review-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-meta h2 { margin: 0; }
.review-progress { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.review-progress .progress { flex: 1; }
.review-grid { display: grid; grid-template-columns: minmax(340px, 5fr) minmax(340px, 6fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } }
.field-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--muted); font-size: 13px; padding-top: 2px; }
.field-value { word-break: break-all; }
.field-value a.link { word-break: break-all; }
.field-value .btn { margin-top: 6px; }
.bottombar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 18px; margin-top: 16px; box-shadow: 0 -4px 16px rgba(16,24,40,.06);
}
#saveHint { font-size: 13px; }
.score-item { display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.score-item label { font-size: 14px; }
.score-item .hint { display: block; }
.readonly-tip { margin-top: 10px; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: #101828; color: #fff; padding: 9px 22px; border-radius: 8px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* 二维码字段 */
.qr-box { display: flex; align-items: center; gap: 10px; }
.qr-small {
  width: 110px; height: 110px; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in;
}
.qr-small:hover { border-color: var(--primary); }
.qr-small svg { display: block; width: 100%; height: 100%; }
.qr-big {
  width: 340px; height: 340px; margin: 0 auto 12px;
  display: flex; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.qr-big svg { display: block; margin: auto; }
.qr-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .62); z-index: 90;
  display: flex; align-items: center; justify-content: center;
}
.qr-modal {
  background: #fff; border-radius: 12px; padding: 22px; max-width: 440px;
  text-align: center; box-shadow: 0 12px 40px rgba(16, 24, 40, .25);
}
.qr-text { word-break: break-all; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.qr-hint { margin-top: 2px; }
.qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.qr-actions svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* 图片字段 */
.field-img {
  display: block; max-width: 100%; max-height: 150px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: zoom-in;
}
.field-img:hover { border-color: var(--primary); }
.img-modal { max-width: 720px; }
.img-big {
  max-width: 620px; max-height: 62vh; overflow: auto;
  display: flex; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.img-big img { margin: auto; display: block; }

/* 赛事信息 */
.info-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.info-progress .muted { font-size: 13px; white-space: nowrap; }
.info-progress .progress { flex: 1; }
.info-progress b { white-space: nowrap; }
