/* ============================================================
 * 学宪法 讲宪法 · 校园知识竞赛系统  全局样式（蓝白主色）
 * ============================================================ */
:root {
  --blue-900: #0b3a67;
  --blue-700: #16568f;
  --blue-600: #1d6fb9;
  --blue-500: #2b86d4;
  --blue-100: #e8f1fa;
  --blue-050: #f5f9fd;
  --ink: #1c2b3a;
  --ink-2: #4a5b6c;
  --ink-3: #7b8a99;
  --line: #dce6f0;
  --bg: #f4f7fb;
  --white: #ffffff;
  --red: #c8102e;
  --green: #1a7f5a;
  --amber: #b98100;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(16, 58, 96, 0.08);
  --shadow-sm: 0 2px 8px rgba(16, 58, 96, 0.06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------------- 头部 ---------------- */
.site-header {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700) 55%, var(--blue-600));
  color: #fff;
  padding: 16px 0;
  box-shadow: 0 4px 18px rgba(11, 58, 103, 0.18);
  position: relative;
  z-index: 5;
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: 1px;
}
.brand h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0.5px; }
.brand p { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.78); }

.header-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.header-nav a, .header-nav button {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.header-nav a:hover, .header-nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}
.header-nav .user-chip {
  font-size: 13px; padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------------- 布局 ---------------- */
main { padding: 28px 0 60px; }
.page-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--blue-900); }
.page-sub { margin: 0 0 20px; color: var(--ink-3); font-size: 13.5px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  font-size: 16px; font-weight: 650; color: var(--blue-900);
}
.card-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(var(--blue-500), var(--blue-700));
}
.card-title .right { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--ink-3); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--red); }
.field input[type="text"], .field input[type="password"], .field input[type="tel"],
.field input[type="number"], .field input[type="datetime-local"], .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(43, 134, 212, 0.14);
}
.field textarea { min-height: 82px; resize: vertical; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.inline-check input { width: 16px; height: 16px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  font-size: 14.5px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 12px rgba(29, 111, 185, 0.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 111, 185, 0.3); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost {
  background: #fff; color: var(--blue-700);
  border: 1px solid var(--blue-500);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--blue-050); box-shadow: none; }
.btn.soft {
  background: var(--blue-100); color: var(--blue-700);
  border: 1px solid #cfe4f7; box-shadow: none;
}
.btn.soft:hover { background: #ddeaf8; box-shadow: none; }
.btn.danger { background: #fff; color: var(--red); border-color: #f0c8cf; box-shadow: none; }
.btn.danger:hover { background: #fff6f7; box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 标签/状态 ---------------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7;
  background: var(--blue-100); color: var(--blue-700);
}
.badge.gray { background: #eef1f5; color: var(--ink-3); }
.badge.green { background: #e5f5ee; color: var(--green); }
.badge.red { background: #fdecef; color: var(--red); }
.badge.amber { background: #fdf3e2; color: var(--amber); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--blue-050); color: var(--blue-900); font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data td.mono { font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--ink-3); }

/* ---------------- 统计卡 ---------------- */
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--blue-050); border: 1px solid #e3eefa;
}
.stat .k { font-size: 12.5px; color: var(--ink-3); }
.stat .v { font-size: 26px; font-weight: 700; color: var(--blue-900); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }

/* ---------------- 提示 / 空状态 ---------------- */
.notice {
  border-radius: 10px; padding: 12px 16px; font-size: 13.5px;
  background: var(--blue-050); border: 1px solid #d9e9f8; color: var(--blue-700);
}
.notice.warn { background: #fdf7e8; border-color: #f4e3b7; color: #8a6400; }
.notice.danger { background: #fdf0f2; border-color: #f3ccd3; color: var(--red); }
.notice.ok { background: #edf8f3; border-color: #c8ead9; color: var(--green); }
.notice strong { font-weight: 700; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty-state h2 { font-size: 18px; color: var(--ink-3); margin: 0 0 8px; }

.config-bar {
  background: #fdf3e2; border-bottom: 1px solid #f0dcb4;
  color: #8a6400; font-size: 13px; padding: 8px 20px; text-align: center;
}
.config-bar code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

/* ---------------- 登录页 ---------------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 380px;
  gap: 40px;
  align-items: center;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0;
}
@media (max-width: 880px) { .auth-hero { grid-template-columns: 1fr; gap: 24px; padding: 26px 0; } }
.auth-copy h2 {
  font-size: 34px; line-height: 1.3; margin: 0 0 14px;
  color: var(--blue-900); letter-spacing: 1px;
}
.auth-copy h2 em { font-style: normal; color: var(--blue-600); }
.auth-copy p { color: var(--ink-2); font-size: 14.5px; max-width: 520px; }
.auth-features { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 480px; }
.auth-features div {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.auth-features div b { display: block; color: var(--blue-900); font-size: 14px; margin-bottom: 2px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 26px; }
.auth-card h3 { margin: 0 0 4px; font-size: 19px; color: var(--blue-900); }
.auth-card .sub { margin: 0 0 20px; font-size: 13px; color: var(--ink-3); }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.site-footer { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 18px 0 26px; }

/* ---------------- 答题 ---------------- */
.exam-topbar {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 0; box-shadow: 0 2px 10px rgba(16,58,96,.06);
}
.exam-topbar .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.timer {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700;
  color: var(--blue-900);
  background: var(--blue-050); border: 1px solid #d9e9f8;
  padding: 4px 16px; border-radius: 10px;
}
.timer.urgent { color: var(--red); background: #fdf0f2; border-color: #f3ccd3; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }

.q-list { display: grid; gap: 14px; }
.q-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; scroll-margin-top: 84px; }
.q-item.is-answered { border-color: #b8d8f2; box-shadow: 0 0 0 2px rgba(43,134,212,.08); }
.q-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.q-index {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-700); font-weight: 700; font-size: 13px;
}
.q-text { font-size: 15px; font-weight: 550; line-height: 1.7; }
.q-text .tag { margin-right: 8px; }
.q-score { margin-left: auto; flex: none; font-size: 12.5px; color: var(--ink-3); }
.opt-list { display: grid; gap: 8px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer; font-size: 14px; background: #fcfdff;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--blue-500); background: var(--blue-050); }
.opt input { margin-top: 3px; flex: none; }
.opt.checked { border-color: var(--blue-600); background: var(--blue-050); }
.fill-input { display: grid; gap: 8px; }
.fill-input input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.fill-input input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(43,134,212,.14); }

.sheet { position: sticky; top: 84px; }
.sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sheet-cell {
  height: 32px; border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; font-size: 12.5px; cursor: pointer; background: #fff;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.sheet-cell.done { background: var(--blue-100); border-color: #b8d8f2; color: var(--blue-700); font-weight: 600; }
.sheet-cell:hover { border-color: var(--blue-500); }
.exam-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 900px) {
  .exam-layout { grid-template-columns: 1fr; }
  .sheet { position: static; }
}
.exam-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.exam-actions .progress-text { font-size: 13.5px; color: var(--ink-2); }

/* ---------------- 结果 ---------------- */
.result-hero {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-600));
  color: #fff; border-radius: 16px; padding: 30px; text-align: center;
  box-shadow: var(--shadow);
}
.result-hero .score { font-size: 46px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-hero .score small { font-size: 15px; font-weight: 500; opacity: .8; }
.result-hero .meta { margin-top: 8px; font-size: 13.5px; opacity: .85; }
.verdict { display: inline-block; margin-top: 14px; padding: 4px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }

/* ---------------- 模态框 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10, 30, 50, .45);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: min(560px, 100%);
  max-height: calc(100vh - 60px); overflow: auto;
  box-shadow: 0 24px 60px rgba(6, 30, 54, .28);
}
.modal-head { padding: 18px 22px 12px; display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 17px; color: var(--blue-900); }
.modal-head .close { margin-left: auto; border: none; background: none; font-size: 20px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.modal-body { padding: 4px 22px 8px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- toast ---------------- */
.toast-box { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; }
.toast {
  background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 8px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 1; transition: opacity .25s;
  max-width: 86vw;
}
.toast.out { opacity: 0; }
.toast-success { background: #16724f; }
.toast-error { background: #b01a33; }
.toast-info { background: #17456e; }

/* ---------------- 管理端 ---------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 9px 16px; font-size: 14px; color: var(--ink-2); border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap;
}
.tab.active { color: var(--blue-700); font-weight: 650; border-bottom-color: var(--blue-600); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 140px; }
.toolbar input, .toolbar select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; font-family: inherit;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--blue-500); }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.bar-row .name { width: 150px; flex: none; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); min-width: 6px; }
.bar-row .n { width: 56px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 题目预览 */
.q-preview { background: var(--blue-050); border: 1px dashed #cfe0f0; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: var(--ink-2); }
.q-preview b { color: var(--blue-900); }

@media (max-width: 620px) {
  .site-header { padding: 12px 0; }
  .brand h1 { font-size: 15px; }
  .auth-copy h2 { font-size: 26px; }
  .card { padding: 16px; }
  .timer { font-size: 17px; padding: 3px 12px; }
}

/* ================= v2 扩展样式 ================= */
.brand-sub-unit { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 1px; line-height: 1.5; }
.site-footer .foot-main { display: block; }
.site-footer .foot-sub { display: block; margin-top: 4px; color: var(--ink-3); }

/* 首页 / 选手中心 导航卡片 */
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 900px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); display: block; color: var(--ink);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #b8d8f2; text-decoration: none; }
.hub-card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-700); font-size: 20px; margin-bottom: 12px;
}
.hub-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--blue-900); }
.hub-card p { margin: 0; font-size: 13px; color: var(--ink-3); }

/* 公告 / 消息列表 */
.news-item { padding: 14px 4px; border-bottom: 1px dashed var(--line); }
.news-item:last-child { border-bottom: none; }
.news-item .t { font-weight: 600; color: var(--ink); }
.news-item .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.news-item .body { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; white-space: pre-line; }
.pinned-tag { background: #fdecef; color: var(--red); }

/* 赛事卡片 */
.comp-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px; box-shadow: var(--shadow-sm); }
.comp-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.comp-head h3 { margin: 0; font-size: 17px; color: var(--blue-900); }
.comp-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.comp-meta b { color: var(--ink); }

/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-no { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--blue-100); color: var(--blue-700); }
.rank-no.top1 { background: #fbeecb; color: #9a6b00; }
.rank-no.top2 { background: #eef1f5; color: #5a6672; }
.rank-no.top3 { background: #f7e2d3; color: #a3551f; }
.rank-main { flex: 1; min-width: 0; }
.rank-main .nm { font-weight: 600; }
.rank-main .sub { font-size: 12.5px; color: var(--ink-3); }
.rank-score { font-weight: 700; color: var(--blue-900); font-variant-numeric: tabular-nums; }

/* 验证码 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-canvas { width: 118px; height: 42px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #eef3fb; flex: none; }

/* 证书 */
.cert-box {
  max-width: 720px; margin: 0 auto; background: #fff; border: 10px solid var(--blue-100);
  border-radius: 18px; padding: 36px 30px; text-align: center; box-shadow: var(--shadow);
}
.cert-box .cert-org { color: var(--ink-3); font-size: 13.5px; }
.cert-box .cert-title { font-size: 28px; font-weight: 800; color: var(--blue-900); letter-spacing: 4px; margin: 14px 0; }
.cert-box .cert-name { font-size: 26px; font-weight: 700; margin: 10px 0; }
.cert-box .cert-line { font-size: 14px; color: var(--ink-2); margin: 6px 0; }
.cert-box .cert-foot { margin-top: 22px; font-size: 12.5px; color: var(--ink-3); display: flex; justify-content: space-between; }

/* 草稿板 */
.draft-board { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 260px; }
.draft-board textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; font-family: inherit; box-shadow: var(--shadow); }
.draft-board .db-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--blue-900); }

/* 图表 */
.chart-bars { display: grid; gap: 10px; }
.chart-bar-row { display: grid; grid-template-columns: 170px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.chart-bar-row .track { height: 10px; background: var(--blue-050); border-radius: 5px; overflow: hidden; }
.chart-bar-row .fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); }
.chart-bar-row .val { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 管理端角色 / 状态小标签 */
.role-chip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; background: var(--blue-100); color: var(--blue-700); }
.role-chip.q { background: #eef4ff; color: #3456c4; }
.role-chip.p { background: #fdf3e2; color: var(--amber); }
.role-chip.s { background: #edf8f3; color: var(--green); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: var(--green); }
.status-dot.off { background: var(--ink-3); }

/* 工具条分段 */
.section-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 14px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; }
@media (max-width: 620px) { .kv { grid-template-columns: 1fr; } }
.kv .item { background: var(--blue-050); border: 1px solid #e3eefa; border-radius: 10px; padding: 12px 14px; }
.kv .item .k { font-size: 12.5px; color: var(--ink-3); }
.kv .item .v { font-weight: 600; color: var(--blue-900); margin-top: 2px; }

/* 防作弊弹窗 */
.cheat-modal .modal { border-top: 4px solid var(--red); }
.cheat-warn { color: var(--red); font-weight: 600; }

/* 空列表辅助 */
.link-btn { background: none; border: none; color: var(--blue-600); cursor: pointer; font-size: 13px; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ============ v2 管理端补充样式 ============ */
.badge.tag { background: var(--blue-100); color: var(--blue-700); }
.badge.blue { background: #e8f0fb; color: var(--blue-700); }
.link-btn.danger { color: var(--red); }
table.data td.op, .op { white-space: nowrap; }
.op .link-btn { margin-right: 10px; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat-label { font-size: 13px; color: var(--ink-3); }
.stat-value { font-size: 30px; font-weight: 800; color: var(--blue-900); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--ink-3); }

.chart-row { display: grid; grid-template-columns: 240px 1fr 90px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.chart-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { height: 10px; background: var(--blue-050); border-radius: 5px; overflow: hidden; }
.chart-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); }
.chart-num { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.comp-title { font-size: 16px; font-weight: 700; color: var(--blue-900); }
.comp-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.comp-rules { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.comp-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 620px) {
  .chart-row { grid-template-columns: 1fr; gap: 4px; }
}
