/* ============================================================
   答题中心
   ============================================================ */

.head-stats {
  display: flex;
  gap: 30px;
  padding: 16px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-xs);
}

.head-stats div { display: grid; gap: 1px; text-align: center; }
.head-stats strong { color: var(--navy); font-size: 22px; line-height: 1.2; }
.head-stats span { color: var(--muted); font-size: 11.5px; }

.center-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 40px;
}

/* ---------- 编者视图提示 ---------- */
.role-banner { margin-top: 18px; }

.role-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #fff8ec, #f3f8ff);
  border: 1px solid #f0dcb8;
}

.role-banner-badge {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 11.5px;
  font-weight: 700;
}

.role-banner-inner strong { color: var(--navy); font-size: 13.5px; }
.role-banner-inner p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.role-banner-actions { margin-left: auto; flex: none; }

.exam-row-actions { display: flex; gap: 8px; }

/* ---------- 左侧筛选 ---------- */
.filter-panel {
  position: sticky;
  top: 86px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.filter-block { margin-bottom: 22px; }

.filter-title {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.filter-search { position: relative; }

.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.filter-list { display: grid; gap: 3px; }

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #4a6584;
  font-size: 13.5px;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}

.filter-btn:hover { background: var(--blue-50); color: var(--blue-700); }

.filter-btn.is-active {
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--blue-500);
}

.filter-count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.filter-btn.is-active .filter-count { background: #fff; color: var(--blue-700); }

/* ---------- 右侧列表 ---------- */
.center-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-count { color: var(--muted); font-size: 13px; }
.result-count strong { color: var(--navy); font-size: 15px; }

.sort-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.sort-box .select { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; font-size: 13px; }

.exam-list { display: grid; gap: 14px; }

.exam-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.exam-row:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.exam-row.is-done { background: linear-gradient(100deg, #f8fcff, #fff 55%); }

.exam-row-main { min-width: 0; flex: 1; }

.exam-row-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 8px;
}

.exam-row h3 { font-size: 18px; letter-spacing: -.01em; }
.exam-row h3 a { color: var(--navy); }
.exam-row h3 a:hover { color: var(--blue-600); }

.exam-row-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.exam-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.exam-row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-row-meta svg { width: 14px; height: 14px; color: var(--blue-400); }

.exam-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: none;
  min-width: 128px;
}

.exam-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--navy);
  font-weight: 700;
}

.exam-score strong { font-size: 27px; line-height: 1; letter-spacing: -.02em; }
.exam-score span { color: var(--muted); font-size: 11.5px; font-weight: 400; }

.exam-score.good strong { color: var(--success); }
.exam-score.mid strong { color: var(--blue-600); }
.exam-score.low strong { color: var(--warning); }

.exam-side-note { color: var(--muted-2); font-size: 11.5px; }

.exam-row-side .btn { min-width: 104px; }

.list-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 4px;
  color: var(--muted-2);
  font-size: 12px;
}

/* ---------- 空状态 ---------- */
.exam-list .empty { padding: 64px 24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .head-stats { display: none; }
  .center-layout { grid-template-columns: 1fr; gap: 16px; }
  .filter-panel {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    padding: 16px;
  }
  .filter-block { margin-bottom: 0; }
  .filter-block:first-child { grid-column: 1 / -1; }
  .filter-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .filter-btn { width: auto; flex: none; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
  .filter-btn.is-active { box-shadow: none; border-color: var(--blue-300); }
  .filter-panel > .btn { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .role-banner-inner { flex-wrap: wrap; align-items: flex-start; }
  .role-banner-actions { margin-left: 0; width: 100%; }
  .role-banner-actions .btn { width: 100%; }
  .filter-panel { grid-template-columns: 1fr; }
  .exam-row { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .exam-row-side { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .exam-row-side .btn { min-width: 0; }
  .center-toolbar { flex-wrap: wrap; }
  .filter-block:first-child { grid-column: auto; }
}
