/* ============================================================
   Detail Page — Classroom Monitoring
   Polished teacher-portal style, blue-purple palette
   ============================================================ */

/* ── Detail Header ── */
.detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin: -24px -26px 0;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-back-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 160ms, box-shadow 160ms;
}
.detail-back-btn:hover {
  border-color: var(--primary-mid);
  box-shadow: 0 2px 8px rgba(88, 120, 255, 0.12);
}

.detail-title-group h1 {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 2px;
  line-height: 1.3;
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.detail-meta-sep {
  color: var(--line-strong);
}

.detail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.detail-status-pill.live {
  color: var(--green);
  background: var(--green-weak);
  border: 1px solid rgba(22, 163, 74, 0.2);
}
.detail-status-pill.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 1500ms ease-in-out infinite;
}
.detail-status-pill.done {
  color: var(--muted);
  background: #edf1f7;
  border: 1px solid var(--line);
}

/* ── Detail Body ── */
.detail-body {
  padding-top: 20px;
}

/* ── Hero ── */
.detail-hero-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(57, 78, 136, 0.05);
}

.detail-hero-top {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.hero-left-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.hero-progress-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.hero-progress-circle {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.hero-progress-circle svg {
  transform: rotate(-90deg);
}
.hero-progress-circle .pct-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--primary);
}

.hero-progress-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.hero-progress-label strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

.hero-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.hero-task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.hero-task-idx {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.hero-task-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-task-pct {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.hero-task-bar {
  grid-column: 2 / 4;
  height: 5px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: -6px;
}
.hero-task-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 400ms ease;
}
.hero-task-bar-fill.green { background: var(--green); }
.hero-task-bar-fill.amber { background: var(--amber); }
.hero-task-bar-fill.red { background: var(--red); }

/* ── Quick Nav ── */
.detail-quick-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.detail-quick-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-right: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: background 150ms;
  text-align: left;
}
.detail-quick-chip:last-child { border-right: 0; }
.detail-quick-chip:hover { background: #f5f8ff; }

.chip-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.chip-icon.blue { background: var(--primary-weak); color: var(--primary); }
.chip-icon.green { background: var(--green-weak); color: var(--green); }
.chip-icon.amber { background: var(--amber-weak); color: var(--amber); }
.chip-icon.red { background: var(--red-weak); color: var(--red); }

.chip-label { font-size: 13px; font-weight: 800; color: var(--text); }
.chip-sub { font-size: 11px; color: var(--muted); }

.chip-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
}
.chip-badge.count { background: #eef2ff; color: var(--primary); }
.chip-badge.warn { background: var(--amber-weak); color: var(--amber); }
.chip-badge.danger { background: var(--red-weak); color: var(--red); }
.chip-badge.success { background: var(--green-weak); color: var(--green); }

/* ── Core Metrics Grid ── */
.detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-metric-card {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: box-shadow 160ms, border-color 160ms;
}
.detail-metric-card:hover {
  border-color: var(--primary-mid);
  box-shadow: 0 4px 12px rgba(88, 120, 255, 0.08);
}

.dmc-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

.dmc-value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.dmc-value.primary { color: var(--primary); }
.dmc-value.green { color: var(--green); }
.dmc-value.amber { color: var(--amber); }
.dmc-value.red { color: var(--red); }

.dmc-sub {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted-soft);
}

/* ── Section Block ── */
.detail-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(57, 78, 136, 0.04);
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbff;
}

.dsh-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dsh-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dsh-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: var(--primary-weak);
  color: var(--primary);
}

.dsh-title {
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.dsh-sub {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.detail-section-body {
  padding: 16px 18px;
}

/* ── Tabs (Main View) ── */
.detail-tabs-shell {
  overflow: hidden;
}

.detail-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fafbff;
}

.detail-tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms;
  white-space: nowrap;
}

.detail-tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background 160ms;
}

.detail-tab-btn.is-active {
  color: var(--text);
  background: #fff;
}
.detail-tab-btn.is-active.tab-realtime::after { background: #22c55e; }
.detail-tab-btn.is-active.tab-attention::after { background: #f97316; }
.detail-tab-btn.is-active.tab-praise::after { background: var(--primary); }

.detail-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.tab-realtime .detail-tab-dot { background: #22c55e; }
.tab-attention .detail-tab-dot { background: #f97316; }
.tab-praise .detail-tab-dot { background: var(--primary); }

.detail-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.detail-tab-content {
  padding: 0;
}

/* ── Realtime Table ── */
.rt-table-wrap {
  overflow-x: auto;
}

.rt-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.rt-table th {
  height: 40px;
  padding: 0 12px;
  background: #f5f7fb;
  color: #4e5874;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.rt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f3f9;
  vertical-align: middle;
  font-size: 13px;
}

.rt-table tr:last-child td { border-bottom: 0; }

.rt-table tbody tr {
  cursor: pointer;
  transition: background 120ms;
}
.rt-table tbody tr:hover { background: #f8faff; }
.rt-table tbody tr.row-orange { background: #fffaf3; }
.rt-table tbody tr.row-orange:hover { background: #fff5e8; }
.rt-table tbody tr.row-red { background: #fff7f7; }
.rt-table tbody tr.row-red:hover { background: #fff1f1; }

.rt-student-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rt-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.rt-avatar.blue { background: #2563eb; }
.rt-avatar.green { background: #16a34a; }
.rt-avatar.amber { background: #f59e0b; }
.rt-avatar.red { background: #ef4444; }
.rt-avatar.cyan { background: #06b6d4; }
.rt-avatar.violet { background: #7c3aed; }

.rt-name { font-weight: 800; font-size: 13px; }
.rt-state { font-size: 11px; color: var(--muted); margin-top: 1px; }

.rt-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.rt-state-pill.studying { color: var(--green); background: var(--green-weak); }
.rt-state-pill.done { color: var(--primary); background: var(--primary-weak); }
.rt-state-pill.idle { color: var(--amber); background: var(--amber-weak); }
.rt-state-pill.not-started { color: var(--muted); background: #edf1f7; }

.rt-progress-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 100px;
}
.rt-progress-cell .rt-track {
  flex: 1;
  height: 5px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
}
.rt-progress-cell .rt-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.rt-progress-cell .rt-fill.green { background: var(--green); }
.rt-progress-cell .rt-fill.amber { background: var(--amber); }
.rt-progress-cell .rt-fill.red { background: var(--red); }
.rt-progress-cell strong { font-size: 12px; font-weight: 800; white-space: nowrap; }

.rt-tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.rt-tag {
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.rt-tag.att { color: var(--red); background: var(--red-weak); }
.rt-tag.praise { color: var(--green); background: var(--green-weak); }
.rt-tag.neutral { color: var(--muted); background: #edf1f7; }

.rt-action-group { display: flex; gap: 5px; flex-wrap: wrap; }
.rt-action-btn {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms, background 140ms;
  white-space: nowrap;
}
.rt-action-btn:hover { border-color: var(--primary-mid); background: #f5f8ff; }
.rt-action-btn.warn { color: var(--amber); border-color: #f7d99d; }
.rt-action-btn.warn:hover { background: #fffbf2; }
.rt-action-btn.good { color: var(--green); border-color: #bfe7cc; }
.rt-action-btn.good:hover { background: #f0fbf4; }
.rt-action-btn:disabled { color: var(--muted-soft); background: #f3f5f9; cursor: not-allowed; }

/* ── Signal List (Attention / Praise) ── */
.signal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.signal-list-header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 16px;
  padding: 10px 18px;
  background: #f5f7fb;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: #4e5874;
}

.signal-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f4fa;
  transition: background 120ms;
}
.signal-card:last-child { border-bottom: 0; }
.signal-card:hover { background: #fafcff; }

.signal-student-cell { display: flex; align-items: center; gap: 10px; }
.signal-student-name { font-weight: 800; font-size: 13px; }
.signal-student-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }

.signal-reason-area {}
.signal-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.signal-pill {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}
.signal-pill.orange { color: var(--amber); background: var(--amber-weak); }
.signal-pill.green { color: var(--green); background: var(--green-weak); }

.signal-reason-text { font-size: 12px; color: var(--muted); line-height: 1.5; }

.signal-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Task Detail Cards ── */
.task-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbff;
}

.task-section-header h2 {
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.task-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.task-filter-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.task-filter-select {
  min-width: 200px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.task-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
}

.task-detail-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 160ms, border-color 160ms;
}
.task-detail-card:hover {
  border-color: var(--primary-mid);
  box-shadow: 0 4px 14px rgba(88, 120, 255, 0.09);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 10px;
}

.task-card-name {
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 3px;
  line-height: 1.3;
}

.task-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.task-type-badge {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-weak);
  white-space: nowrap;
  flex-shrink: 0;
}

.task-card-progress {
  padding: 0 14px 10px;
}

.tcp-bar {
  height: 6px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 5px;
}
.tcp-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 400ms;
}
.tcp-fill.green { background: var(--green); }
.tcp-fill.amber { background: var(--amber); }
.tcp-fill.red { background: var(--red); }

.tcp-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.task-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.tcm-item {
  padding: 10px 12px;
  background: #fafbff;
}
.tcm-item span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tcm-item strong { font-size: 14px; font-weight: 800; }

/* ── Interaction (Ask + Comment) ── */
.interaction-columns {
  display: block;
}

.teacher-interaction-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  min-height: 380px;
}

.teacher-interaction-panel.comment-mode {
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.comment-mode-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  flex: 1;
  min-height: 0;
}

.teacher-interaction-panel.comment-mode.no-preview {
  grid-template-columns: minmax(0, 1fr);
}
.teacher-interaction-panel.comment-mode.no-preview .comment-mode-body {
  grid-template-columns: minmax(0, 1fr);
}
.interaction-col-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.interaction-col-title h3 {
  font-size: 14px;
  font-weight: 900;
  margin: 0;
}

.unread-badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ff4d4d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.msg-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
  transition: border-color 140ms;
}
.msg-card:last-child { margin-bottom: 0; }
.msg-card.unread {
  border-color: #aebfff;
  background: #fafcff;
}
.msg-card:hover { border-color: var(--primary-mid); }

.msg-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.msg-avatar.blue { background: #2563eb; }
.msg-avatar.green { background: #16a34a; }
.msg-avatar.amber { background: #f59e0b; }
.msg-avatar.red { background: #ef4444; }
.msg-avatar.cyan { background: #06b6d4; }
.msg-avatar.violet { background: #7c3aed; }

.msg-name { font-size: 13px; font-weight: 800; }
.msg-time { font-size: 11px; color: var(--muted); margin-left: auto; }

.msg-status-tag {
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.msg-status-tag.unread { color: var(--primary); background: var(--primary-weak); }
.msg-status-tag.read { color: var(--muted); background: #edf1f7; }

.msg-body { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
.msg-source { font-size: 11px; color: var(--muted); }
.msg-view-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* ── Mistakes ── */
.mistake-summary-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #fafbff;
  border-bottom: 1px solid var(--line);
}
.mistake-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.mistake-stat strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.mistake-stat strong.warn { color: var(--amber); }
.mistake-stat-sep { width: 1px; height: 20px; background: var(--line); }

.mistake-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.mistake-list-v2 {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 14px 18px;
  gap: 12px;
}

.mistake-card-v2 {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.mcv2-status-bar {
  height: 3px;
  background: var(--primary-weak);
}

.mcv2-body { padding: 12px 14px; }
.mcv2-question {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 8px;
}
.mcv2-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.mcv2-tag {
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.mcv2-tag.att { color: var(--red); background: var(--red-weak); }
.mcv2-tag.neutral { color: var(--muted); background: #edf1f7; }
.mcv2-tag.info { color: var(--primary); background: var(--primary-weak); }

.mcv2-cause { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.mcv2-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #4e5874;
  margin-bottom: 10px;
}
.mcv2-stats strong { color: var(--red); }
.mcv2-actions { display: flex; gap: 6px; }

.mistake-card-v2 { position: relative; }

/* ── Review Panel ── */
.review-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 14px 16px;
}

.review-block {
  min-width: 0;
  min-height: 260px;
  padding: 16px;
  border-radius: 10px;
  background: #fff;
}

.review-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.review-block-head h3 {
  margin: 0;
  color: #343a56;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.review-count-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #7781a3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.review-count-link:hover {
  color: var(--primary);
}

.review-card-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.review-row-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe5f2;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.review-row-card:hover {
  border-color: #b8c4e6;
  box-shadow: 0 4px 14px rgba(55, 73, 120, 0.08);
  transform: translateY(-1px);
}

.review-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset -8px -7px 0 rgba(255, 255, 255, 0.22);
}

.review-avatar.blue { background: linear-gradient(135deg, #5bc6ff 0%, #2463e8 100%); }
.review-avatar.green { background: linear-gradient(135deg, #80e7a8 0%, #14a55a 100%); }
.review-avatar.amber { background: linear-gradient(135deg, #ffd46b 0%, #f59e0b 100%); }
.review-avatar.red { background: linear-gradient(135deg, #ff9fb2 0%, #ef4444 100%); }
.review-avatar.cyan { background: linear-gradient(135deg, #78e1ef 0%, #5487f7 100%); }
.review-avatar.violet { background: linear-gradient(135deg, #f3a0c8 0%, #7c3aed 100%); }

.review-avatar-stack {
  display: inline-flex;
  flex: 0 0 70px;
  align-items: center;
  min-width: 70px;
}

.review-avatar-stack .review-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 2px solid #fff;
  font-size: 10px;
  box-shadow: inset -7px -6px 0 rgba(255, 255, 255, 0.22);
}

.review-avatar-stack .review-avatar + .review-avatar {
  margin-left: -10px;
}

.review-card-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.review-card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #3d435f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.review-card-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-inline-tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.review-inline-tag.success {
  background: #eafbe4;
  color: #18b21c;
}

.review-inline-tag.danger {
  background: #fff0f0;
  color: #ff2f32;
}

.review-card-desc {
  min-width: 0;
  overflow: hidden;
  color: #7781a3;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card-arrow {
  flex: 0 0 auto;
  color: #a7b0cc;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.review-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 20px;
  border: 0;
  border-radius: 10px;
  color: #8a91aa;
  text-align: center;
  background: #fff;
}

/* ── Timeline ── */
.timeline-v2 { display: flex; flex-direction: column; gap: 0; padding: 14px 18px; gap: 10px; }

.timeline-item-v2 {
  display: grid;
  grid-template-columns: 54px 20px minmax(0, 1fr);
  gap: 0 10px;
  align-items: start;
}

.tiv2-time {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
}

.tiv2-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tiv2-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 4px;
  flex-shrink: 0;
}
.tiv2-line {
  width: 2px;
  flex: 1;
  min-height: 18px;
  background: var(--line);
  margin-top: 2px;
}
.timeline-item-v2:last-child .tiv2-line { display: none; }

.tiv2-content {
  padding-bottom: 14px;
}
.tiv2-title { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.tiv2-detail { font-size: 12px; color: var(--muted); }

/* ── Finished Hero ── */
.finished-hero-body {
  padding: 18px 20px;
}

.fh-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.fh-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fh-donut {
  --p: 65;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle closest-side, white 68%, transparent 69% 100%),
    conic-gradient(var(--primary) calc(var(--p) * 1%), #e7edf6 0);
}
.fh-donut strong { display: block; font-size: 26px; font-weight: 900; line-height: 1; }
.fh-donut span { display: block; font-size: 11px; color: var(--muted); }

.fh-donut-label { font-size: 12px; color: var(--muted); text-align: center; }

.fh-buckets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fh-bucket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: box-shadow 140ms, border-color 140ms;
}
.fh-bucket:hover { border-color: var(--primary-mid); box-shadow: 0 2px 8px rgba(88,120,255,0.08); }
.fh-bucket.green { border-left: 4px solid #22c55e; }
.fh-bucket.blue { border-left: 4px solid var(--primary); }
.fh-bucket.amber { border-left: 4px solid var(--amber); }
.fh-bucket.red { border-left: 4px solid var(--red); color: var(--red); }
.fh-bucket-count { font-size: 16px; font-weight: 900; }

/* ── Hero Task Section (Finished) ── */
.fh-task-section { padding: 16px 20px; border-top: 1px solid var(--line); }
.fh-task-section h3 { font-size: 14px; font-weight: 900; margin: 0 0 12px; }
.fh-task-list { display: flex; flex-direction: column; gap: 10px; }

.fh-task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}
.fh-task-name { font-size: 13px; font-weight: 700; }
.fh-task-pct { font-size: 13px; font-weight: 800; text-align: right; }
.fh-task-bar { grid-column: 2 / 4; }
.fh-bar-track { height: 5px; background: #e8edf5; border-radius: 999px; overflow: hidden; }
.fh-bar-fill { height: 100%; border-radius: inherit; background: var(--primary); }
.fh-bar-fill.green { background: var(--green); }
.fh-bar-fill.amber { background: var(--amber); }
.fh-bar-fill.red { background: var(--red); }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-task-list { display: none; }
  .detail-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-quick-nav { grid-template-columns: repeat(2, 1fr); }
  .fh-layout { grid-template-columns: 1fr; }
  .interaction-columns { grid-template-columns: 1fr; }
  .interaction-col:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .task-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-cols { grid-template-columns: 1fr; }
  .review-col:not(:last-child) { border-right: 0; border-bottom: 1px solid var(--line); }
  .signal-list-header, .signal-card { grid-template-columns: 180px minmax(0, 1fr) 220px; }
}

@media (max-width: 820px) {
  .detail-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-cards-grid { grid-template-columns: 1fr; }
  .fh-buckets { grid-template-columns: 1fr; }
  .signal-list-header, .signal-card { grid-template-columns: 1fr; }
  .detail-quick-nav { grid-template-columns: repeat(2, 1fr); }
}

.amber-text { color: var(--amber); }
.red-text-inline { color: var(--red); }

/* ============================================================
   Teacher classroom-page alignment pass
   ============================================================ */
.teacher-detail.is-active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: -24px -24px -28px;
  background: #f6f8ff;
}

.teacher-detail .detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 24px;
  background: rgba(246, 248, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.teacher-detail .detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 24px;
  padding-top: 0;
}

.teacher-detail .detail-back-btn {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #646b8a;
}

.teacher-detail .detail-title-group h1 {
  max-width: 440px;
  margin: 0;
  color: #1f2433;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
}

.teacher-detail .detail-header-meta {
  margin-top: 1px;
  color: #777d98;
  font-size: 12px;
  line-height: 18px;
}

.teacher-detail .detail-status-pill {
  height: 18px;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 12px;
}

.teacher-detail .detail-status-pill.live {
  background: #33c481;
  border-color: #33c481;
  color: #fff;
}

.teacher-detail .detail-status-pill.done {
  background: transparent;
  border: 0;
  color: #777d98;
  padding: 0;
}

.teacher-detail .detail-status-pill.live::before {
  background: #fff;
  width: 4px;
  height: 4px;
}

.detail-top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.goal-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 18px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #fff;
  color: #646b8a;
  font-size: 12px;
  line-height: 1;
  box-shadow: none;
}

.goal-progress-copy {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.goal-progress-copy strong {
  color: #1f2433;
  font-family: Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.goal-progress-label {
  color: #646b8a;
  font-weight: 500;
}

.goal-progress-ring {
  --p: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 55%, transparent 57% 100%),
    conic-gradient(#4a4ffd calc(var(--p) * 1%), #cfd5e8 0);
}

.goal-progress-arrow {
  color: #777d98;
  font-size: 13px;
  transform: translateY(-1px);
}

.detail-shortcut-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #fff;
}

.detail-shortcut {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #777d98;
  padding: 0;
}

.detail-shortcut.is-active,
.detail-shortcut:hover {
  color: #4a4ffd;
}

.shortcut-icon {
  font-size: 16px;
  line-height: 1;
}

.shortcut-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  border-radius: 999px;
  background: #fa5a57;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
}

.teacher-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: transparent;
  color: #777d98;
  font-size: 13px;
  font-weight: 500;
}

.teacher-pill-button:hover,
.goal-progress-pill:hover,
.detail-shortcut-bar:hover {
  border-color: #cfd5e8;
  background: #fff;
}

.teacher-pill-button:disabled,
.teacher-icon-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.goal-progress-pill:disabled {
  cursor: default;
  opacity: 1;
}

.goal-progress-pill:disabled .goal-progress-arrow {
  display: none;
}

.teacher-pill-button.tiny {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.inline-link {
  border: 0;
  background: transparent;
  color: #4a4ffd;
  font-size: inherit;
  font-weight: 600;
  padding: 0;
}

.teacher-course-section {
  margin-bottom: 24px;
}

.teacher-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 12px;
}

.teacher-section-title h2 {
  margin: 0;
  color: #1f2433;
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
}

.teacher-section-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #4a4ffd;
  font-size: 17px;
}

.teacher-detail .detail-hero-wrap[hidden],
.teacher-detail .detail-metrics-grid[hidden] {
  display: none !important;
}

.teacher-detail .detail-section {
  margin-bottom: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.teacher-detail .detail-section-header,
.teacher-detail .task-section-header {
  min-height: 32px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.teacher-detail .dsh-title,
.teacher-detail .task-section-header h2 {
  color: #1f2433;
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
}

.teacher-detail .dsh-icon {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent !important;
  color: #4a4ffd !important;
}

.teacher-detail .dsh-sub {
  color: #777d98;
  font-size: 12px;
  font-weight: 400;
}

.teacher-detail .detail-tabs-shell {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 16px 0 rgba(74, 79, 253, 0.08);
}

.detail-tabs-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0;
  min-height: 52px;
  padding: 0;
  background: #eef1fb;
  border-radius: 0;
}

.teacher-detail .detail-tabs-nav {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  border-bottom: 0;
  background: transparent;
  gap: 0;
  align-items: flex-end;
}

.teacher-detail .detail-tab-btn {
  height: 44px;
  min-width: 160px;
  padding: 0 28px;
  /* 顶部圆角，底部直角，激活时和内容区白色无缝衔接 */
  border-radius: 10px 10px 0 0;
  color: #8b93b8;
  font-size: 15px;
  font-weight: 400;
  transition: background 160ms, color 160ms;
}

.teacher-detail .detail-tab-btn.is-active {
  background: #fff;
  color: #3d4566;
  font-weight: 500;
}

.teacher-detail .detail-tab-btn::after {
  display: none;
}

.teacher-detail .detail-tab-dot {
  width: 3px;
  height: 14px;
  border-radius: 2px;
}

.teacher-detail .tab-realtime .detail-tab-dot { background: #33c481; }
.teacher-detail .tab-attention .detail-tab-dot { background: #fa9524; }
.teacher-detail .tab-praise .detail-tab-dot { background: #4a4ffd; }

.detail-tab-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 44px;
  padding: 0 16px 8px 0;
}

.tab-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #fff;
  color: #4b536b;
  font-size: 13px;
  font-weight: 500;
}

.tab-bulk-btn:hover {
  border-color: #cfd5e8;
  background: #f8faff;
}

.tab-bulk-btn.warn {
  color: #fa9524;
}

.tab-bulk-btn.good {
  color: #33a76f;
}

.teacher-detail .detail-tab-content {
  padding: 0 0 24px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}

.teacher-carousel-note {
  padding: 8px 12px 0;
  color: #777d98;
  font-size: 12px;
}

.learning-status-table {
  overflow: hidden;
  border-radius: 12px;
}

.teacher-detail .rt-table-wrap {
  overflow: hidden;
  border-radius: 12px;
}

.teacher-detail .rt-table {
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-detail .rt-table th {
  height: 44px;
  background: #f5f7fb;
  border-bottom: 0;
  color: #646b8a;
  font-size: 14px;
  font-weight: 400;
}

.teacher-detail .rt-table td {
  height: 52px;
  padding: 9px 12px;
  border-bottom: 1px solid #e1e5f2;
  color: #1f2433;
  font-size: 14px;
}

.teacher-detail .rt-table tbody tr {
  cursor: default;
}

.teacher-detail .rt-table tbody tr:hover {
  background: transparent;
}

.teacher-detail .rt-table tbody tr.row-abnormal {
  background: #fff;
}

.rt-student-pin {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #c7cdde;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.rt-student-pin.is-pinned {
  color: #fa9524;
}

.teacher-detail .rt-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.rt-content-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.rt-content-cell span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-content-cell.is-orange span:last-child {
  color: #d97900;
}

.rt-content-cell.is-red span:last-child {
  color: #e0443f;
}

.abnormal-dot {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.abnormal-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(250, 90, 87, 0.28);
  animation: learningStatusPulse 2s ease-in-out infinite;
}

.abnormal-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: inherit;
  background: #fa5a57;
  transform: translate(-50%, -50%);
}

@keyframes learningStatusPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.35; }
  50% { transform: scale(1.22); opacity: 0.85; }
}

.rt-empty-value {
  color: #9aa1b8;
}

.teacher-detail .rt-progress-cell {
  min-width: 0;
}

.teacher-detail .rt-progress-cell .rt-track {
  height: 4px;
  background: #edf1f7;
}

.teacher-detail .rt-progress-cell strong {
  min-width: 38px;
  color: #646b8a;
  font-weight: 400;
}

.teacher-signal-table {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.teacher-signal-table.expanded {
  padding-bottom: 48px;
}

.teacher-signal-head,
.teacher-signal-row {
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr) 120px;
  align-items: center;
}

.teacher-signal-head {
  height: 44px;
  background: #fff7ed;
  color: #646b8a;
  font-size: 14px;
}

.teacher-signal-table.good .teacher-signal-head {
  background: #edf9f3;
}

.teacher-signal-head span {
  padding: 0 16px;
}

.teacher-signal-row {
  min-height: 52px;
  border-bottom: 1px solid #e7ebe7;
  background: #fff;
}

.teacher-signal-row.is-handled {
  opacity: 0.56;
}

.teacher-signal-row:last-child {
  border-bottom: 0;
}

.teacher-signal-student {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 16px;
}

.teacher-signal-name {
  min-width: 0;
  overflow: hidden;
  color: #1f2433;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-signal-behavior {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.teacher-behavior-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.teacher-behavior-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: #fa9524;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.teacher-behavior-tag.subtle {
  background: #f0f4ff;
  color: #4a4ffd;
}

.teacher-behavior-tag.dimmed {
  opacity: 0.4;
}

.teacher-signal-table.good .teacher-behavior-tag.dimmed {
  opacity: 0.4;
}

.teacher-signal-table.good .teacher-behavior-tag {
  background: #33c481;
}

.teacher-signal-table.good .teacher-behavior-tag.subtle {
  background: #edf9f3;
  color: #25815b;
}

.teacher-behavior-value {
  margin-left: auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f0f4ff;
  color: #4a4ffd;
  font-size: 12px;
  line-height: 22px;
  white-space: nowrap;
}

.teacher-signal-action {
  display: flex;
  justify-content: center;
}

.teacher-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #fff;
  color: #646b8a;
  font-size: 12px;
  font-weight: 500;
}

.teacher-icon-action.warn {
  color: #fa9524;
}

.teacher-icon-action.good {
  color: #33a76f;
}

.finished-learning-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.snapshot-student-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid #e1e5f2;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  text-align: left;
}

.snapshot-student-card:hover {
  border-color: #cfd5e8;
  background: #fafcff;
}

.snapshot-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-state {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf9f3;
  color: #25815b;
  font-size: 12px;
  line-height: 22px;
}

.snapshot-state.warn {
  background: #fff0ef;
  color: #e0443f;
}

.snapshot-progress {
  color: #646b8a;
  font-family: Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

/* teacher-interaction-panel 已在 interaction-columns 区块定义 */

/* 看课/评论模式工具栏 */
.interaction-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafbff;
}
.mode-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}
.mode-switch-btn {
  height: 32px;
  padding: 0 16px;
  border: 1px solid #4a4ffd;
  border-radius: 6px;
  background: #fff;
  color: #4a4ffd;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.mode-switch-btn:hover {
  background: #4a4ffd;
  color: #fff;
}
.comment-mode-body .course-preview-card {
  border-right: 1px solid var(--line);
}

.course-preview-card,
.interaction-side-panel,
.interaction-feed-panel {
  border: none;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 评论模式左右分割线由 .comment-mode-body .course-preview-card 处理 */

/* ── 题目详情页 ── */
.question-detail-view {
  padding: 24px 26px;
  min-height: calc(100vh - 52px);
}
.question-detail-view .detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin: -24px -26px 0;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.question-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.question-detail-body {
  padding: 20px 0 40px;
  flex: 1;
}
.qd-section {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.qd-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.qd-question {
  font-size: 16px;
  font-weight: 700;
  color: #1f2433;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 16px;
}
.qd-answer-block {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #f8fafb;
  border-radius: 8px;
  border-left: 3px solid #4a4ffd;
}
.qd-answer-label {
  font-size: 12px;
  font-weight: 700;
  color: #4a4ffd;
  margin-bottom: 4px;
}
.qd-answer-content {
  font-size: 14px;
  color: #1f2433;
  line-height: 1.6;
}
.qd-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #1f2433;
  margin: 0 0 14px;
}
.qd-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.qd-stat {
  text-align: center;
  padding: 10px;
  border: 1px solid #e4e8f4;
  border-radius: 8px;
}
.qd-stat strong {
  display: block;
  font-size: 18px;
  color: #1f2433;
}
.qd-stat span {
  font-size: 11px;
  color: #8a91aa;
}
.qd-distribution h4,
.qd-student-list h4 {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  margin: 0 0 10px;
}
.qd-option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.qd-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
}
.qd-option-row.is-correct {
  background: #f0fdf4;
}
.qd-option-label {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e4e8f4;
  font-size: 12px;
  font-weight: 800;
}
.qd-option-row.is-correct .qd-option-label {
  background: #bbf7d0;
  color: #166534;
}
.qd-option-row.is-wrong .qd-option-label {
  background: #fecaca;
  color: #991b1b;
}
.qd-option-bar-wrap {
  flex: 1;
  height: 8px;
  background: #e4e8f4;
  border-radius: 4px;
  overflow: hidden;
}
.qd-option-bar {
  height: 100%;
  border-radius: 4px;
  background: #ef4444;
}
.qd-option-row.is-correct .qd-option-bar {
  background: #22c55e;
}
.qd-option-count {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  min-width: 40px;
}
.qd-option-names {
  font-size: 11px;
  color: #8a91aa;
}
.qd-student-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f3ff;
}
.qd-student-row.is-wrong {
  cursor: pointer;
}
.qd-student-row.is-wrong:hover {
  background: #fef2f2;
  border-radius: 8px;
}
.qd-student-name {
  font-size: 13px;
  font-weight: 600;
  min-width: 60px;
}
.qd-student-answer {
  flex: 1;
  font-size: 13px;
  color: #4b5563;
}
.qd-student-result {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.qd-student-result.correct {
  color: #166534;
  background: #dcfce7;
}
.qd-student-result.wrong {
  color: #991b1b;
  background: #fee2e2;
}
.qd-student-time {
  font-size: 12px;
  color: #8a91aa;
  min-width: 70px;
  text-align: right;
}
.qd-student-detail-card {
  border: 1px solid #e4e8f4;
  border-radius: 10px;
  padding: 16px;
}
.qd-sd-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f3ff;
  font-size: 14px;
}
.qd-sd-row:last-child {
  border-bottom: 0;
}
.qd-sd-row span {
  color: #8a91aa;
}
.qd-sd-row strong {
  color: #1f2433;
}
.qd-sd-row strong.correct {
  color: #16a34a;
}
.qd-sd-row strong.wrong {
  color: #ef4444;
}

.course-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.course-select-button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #4b536b;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.course-select-button.compact {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.course-select-popover {
  position: fixed;
  z-index: 100;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 36, 51, 0.12);
  padding: 6px;
}
.csp-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2433;
  cursor: pointer;
}
.csp-item:hover {
  background: #f0f3ff;
}
.csp-item.is-active {
  color: #4a4ffd;
  font-weight: 700;
  background: #f0f3ff;
}

/* 课程预览占位区 */
.course-preview-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffbeb;
  min-height: 360px;
}

.course-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.cpp-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  font-size: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.cpp-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  max-width: 240px;
}

.cpp-sub {
  font-size: 12px;
  color: var(--muted);
}

.cpp-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.interaction-side-panel {
  padding: 14px;
}

.interaction-side-title {
  margin-bottom: 10px;
  color: #1f2433;
  font-size: 15px;
  font-weight: 700;
}

.mini-interaction-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #e1e5f2;
  border-radius: 10px;
  background: #fff;
  color: #4b536b;
  text-align: left;
}

.mini-interaction-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-interaction-item.unread {
  border-color: #9cb1fc;
  background: #fafcff;
}

.interaction-feed-panel {
  min-height: 320px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.interaction-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.interaction-feed-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.interaction-feed-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #7a819b;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.interaction-feed-tab.is-active {
  border-bottom-color: #4a4ffd;
  color: #4a4ffd;
}

.interaction-feed-tab span,
.feed-unread-dot {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #f25d5d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 0 4px;
}

.interaction-feed-list {
  display: flex;
  max-height: 410px;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.qa-card {
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
  transition: border-color 160ms, box-shadow 160ms;
  position: relative;
}

.qa-card.unread {
  border-color: #a9bbff;
  box-shadow: 0 0 0 1px rgba(74, 79, 253, 0.08);
}

.qa-card.is-selected {
  border-left: 3px solid #4a4ffd;
  padding-left: 13px;
}

.qa-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.qa-card-top .msg-name {
  font-weight: 700;
  font-size: 13px;
  color: #1f2433;
}

.qa-card-top .msg-time {
  font-size: 12px;
  color: #a0a6b8;
  margin-left: auto;
}

.msg-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.msg-status-tag.unread {
  color: #4a4ffd;
  background: #eef1ff;
}

.qa-question {
  color: #1f2433;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 6px;
}

.qa-quote {
  margin: 6px 0 0;
  padding: 8px 12px;
  background: #f5f6fa;
  border-left: 3px solid #d0d5e4;
  border-radius: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.qa-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
  color: #8a91aa;
  font-size: 12px;
  flex-wrap: wrap;
}

.qa-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f3ff;
  color: #5b6abf;
  font-size: 11px;
  font-weight: 600;
}

.qa-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
}

.qa-footer-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.qa-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qa-footer-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #8a91aa;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 120ms, background 120ms;
}
.qa-footer-action:hover {
  color: #4a4ffd;
  background: #f0f3ff;
}
.qa-footer-action.is-active {
  color: #ef4444;
}
.qa-footer-action.is-readonly,
.qa-footer-action:disabled {
  cursor: default;
  opacity: 0.72;
}
.qa-footer-action.is-readonly:hover,
.qa-footer-action:disabled:hover {
  color: inherit;
  background: transparent;
}
.qa-footer-action.is-readonly.is-active:hover,
.qa-footer-action:disabled.is-active:hover {
  color: #ef4444;
}
.qa-footer-action .action-count {
  font-weight: 700;
  font-size: 12px;
}

.qa-reply-block {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8f9fc;
  border-radius: 8px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  position: relative;
}
.qa-reply-block .reply-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #a0a6b8;
  cursor: pointer;
  font-size: 14px;
}

.qa-reply-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #e4e8f4;
  border-radius: 8px;
  background: #fff;
}
.qa-reply-input input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 13px;
  color: #1f2433;
  background: transparent;
}
.qa-reply-input input::placeholder {
  color: #b0b6c8;
}
.qa-reply-input .reply-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: #4a4ffd;
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 120ms;
}
.qa-reply-input .reply-send-btn:hover {
  background: #3b40e0;
}

.msg-view-link {
  border: 0;
  background: transparent;
  color: #4a4ffd;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}
.msg-view-link:hover {
  text-decoration: underline;
}

.ask-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 51, 0.42);
}

.ask-modal-backdrop[hidden] {
  display: none;
}

.ask-modal {
  width: min(864px, calc(100vw - 48px));
  max-height: min(552px, calc(100vh - 64px));
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 36, 51, 0.22);
  overflow: hidden;
}

.ask-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
}

.ask-modal-header h2 {
  margin: 0;
  color: #171b29;
  font-size: 22px;
  font-weight: 900;
}

.ask-modal-content {
  padding: 8px 64px 44px;
}

.ask-modal-question {
  width: fit-content;
  max-width: 360px;
  margin-left: auto;
  margin-bottom: 42px;
  border-radius: 14px;
  background: #f5f7ff;
  padding: 16px 24px;
  color: #1f2433;
  font-size: 16px;
  line-height: 1.6;
}

.ask-modal-answer-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ask-modal-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffb14a, #ff8668);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.ask-modal-answer {
  max-height: 300px;
  overflow: auto;
  padding-right: 12px;
  color: #2f3446;
  font-size: 17px;
  line-height: 1.7;
}

.ask-modal-answer p {
  margin: 0 0 14px;
}

.task-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 51, 0.42);
}

.task-preview-backdrop[hidden] {
  display: none;
}

.task-preview-modal {
  width: min(760px, calc(100vw - 48px));
  max-height: min(640px, calc(100vh - 64px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 36, 51, 0.22);
}

.task-preview-header {
  padding: 24px 28px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.task-preview-eyebrow {
  margin: 0 0 6px;
  color: #8a91aa;
  font-size: 12px;
  font-weight: 900;
}

.task-preview-header h2 {
  margin: 0;
  color: #171b29;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.task-preview-content {
  min-height: 0;
  overflow: auto;
  padding: 22px 28px 28px;
}

.task-preview-list {
  display: grid;
  gap: 10px;
}

.task-preview-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
}

.task-preview-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #eef3ff;
  color: #5878ff;
  font-size: 13px;
  font-weight: 900;
}

.task-preview-main {
  min-width: 0;
}

.task-preview-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-preview-item-head span {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0f3fb;
  color: #687086;
  font-size: 12px;
  font-weight: 800;
}

.task-preview-item-head strong {
  min-width: 0;
  overflow: hidden;
  color: #171b29;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-preview-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #8a91aa;
  font-size: 12px;
  font-weight: 700;
}

.task-preview-empty {
  padding: 24px;
  border-radius: 12px;
  background: #f7f8fb;
  color: #8a91aa;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.msg-action-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.question-index {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-right: 8px;
  border-radius: 50%;
  background: #f0f4ff;
  color: #4a4ffd;
  font-size: 12px;
  font-weight: 700;
}

.report-placeholder,
.teacher-detail .report-placeholder {
  border-radius: 12px;
  background: #fff;
}

.report-version-block {
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.report-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.report-left {
  padding: 20px 24px;
  border-right: 1px solid #e4e8f4;
}
.report-right {
  padding: 20px 24px;
}
.report-block-title {
  font-size: 15px;
  font-weight: 800;
  color: #1f2433;
  margin: 0 0 16px;
}
.report-block-sub {
  font-size: 12px;
  font-weight: 400;
  color: #8a91aa;
  margin-left: 8px;
}
.report-task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-task-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-task-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.report-task-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: #eef1ff;
  color: #4a4ffd;
  font-size: 11px;
  font-weight: 700;
}
.report-task-name {
  flex: 1;
  font-size: 13px;
  color: #1f2433;
}
.report-task-pct {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
}
.report-task-bar .fh-bar-track {
  height: 8px;
}
.report-task-summary {
  font-size: 12px;
  color: #8a91aa;
}
.report-completion-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}
.report-donut {
  --p: 0;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#22c55e calc(var(--p) * 1%), #e7edf6 0);
  flex-shrink: 0;
}
.report-donut-inner {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}
.report-donut-inner strong {
  font-size: 21px;
  color: #1f2433;
  line-height: 1.2;
}
.report-donut-inner strong span {
  font-size: 13px;
  color: #8a91aa;
  font-weight: 400;
}
.report-donut-inner > span {
  font-size: 11px;
  color: #8a91aa;
}
.report-buckets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}
.report-bucket {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #e4e8f4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms, background 120ms;
}
.report-bucket:hover {
  border-color: #4a4ffd;
  background: #f8f9ff;
}
.report-more-link {
  justify-self: start;
  align-self: center;
  height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.report-more-link:hover {
  text-decoration: underline;
}
.bucket-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bucket-dot.green { background: #22c55e; }
.bucket-dot.blue { background: #2f80ed; }
.bucket-dot.amber { background: #f59e0b; }
.bucket-dot.red { background: #ef4444; }
.bucket-label {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  color: #1f2433;
  text-align: left;
}
.bucket-count {
  min-width: 44px;
  font-size: 14px;
  font-weight: 800;
  color: #1f2433;
  text-align: right;
  white-space: nowrap;
}
.report-student-summary {
  border: 1px solid #e4e8f4;
  border-radius: 10px;
  padding: 16px;
}

@media (max-width: 820px) {
  .report-two-col {
    grid-template-columns: 1fr;
  }

  .report-left {
    border-right: 0;
    border-bottom: 1px solid #e4e8f4;
  }

}

.task-popover-item {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  padding: 12px 14px 14px;
  border-radius: 8px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.task-popover-item:last-child {
  border-bottom: 0;
}

.task-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-popover-index,
.task-popover-type {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.task-popover-index {
  background: #eef2ff;
  color: var(--primary);
}

.task-popover-type {
  background: #f3f4f6;
  color: #4b5563;
}

.task-popover-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-popover-name {
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--text);
}

.task-popover-pct {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
}
.task-popover-pct.green { color: var(--green); }
.task-popover-pct.amber { color: var(--amber); }
.task-popover-pct.red { color: var(--red); }

.task-popover-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}

.task-popover-stat {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f8faff;
}

.task-popover-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 700;
}

.task-popover-stat strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.task-popover-stat strong.red {
  color: var(--red);
}

.task-progress-popover .popover-card {
  width: min(560px, calc(100vw - 56px));
}

.goal-popover-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 10px 12px;
  background: #f8faff;
  border-radius: 8px;
}

.gps-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}
.gps-item:not(:last-child) {
  border-right: 1px solid var(--line);
}
.gps-item span {
  font-size: 11px;
  color: var(--muted-soft);
}
.gps-item strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.teacher-finished-reserved p {
  margin: -4px 0 12px;
  color: #777d98;
  font-size: 12px;
}

.teacher-expand-mask {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 54px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, #fff -12.5%, rgba(255, 255, 255, 0) 139.06%);
}

.teacher-expand-button {
  height: 26px;
  padding: 0 12px;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #fff;
  color: #646b8a;
  font-size: 13px;
}

.teacher-detail .task-filter-row,
.teacher-detail .task-cards-grid,
.teacher-detail .interaction-columns,
.teacher-detail .mistake-summary-row,
.teacher-detail .mistake-list-v2,
.teacher-detail .review-cols,
.teacher-detail .timeline-v2 {
  border-radius: 12px;
  background: #fff;
}

.teacher-detail .task-filter-row {
  margin-bottom: 0;
  border-bottom: 1px solid #e1e5f2;
}

.teacher-detail .task-cards-grid {
  border-radius: 0 0 12px 12px;
}

.teacher-detail .interaction-columns,
.teacher-detail .review-cols {
  overflow: hidden;
}

.teacher-detail .mistake-summary-row {
  border-bottom: 1px solid #e1e5f2;
}

.teacher-detail .mistake-list-v2 {
  border-radius: 0 0 12px 12px;
}

@media (max-width: 1180px) {
  .detail-top-actions {
    gap: 8px;
  }
  .goal-progress-label,
  .teacher-detail .updated-at {
    display: none;
  }
  .teacher-detail .detail-tab-btn {
    min-width: 150px;
  }
}

@media (max-width: 820px) {
  .teacher-detail.is-active {
    margin: -24px -24px -28px;
  }
  .teacher-detail .detail-header {
    height: auto;
    min-height: 70px;
    align-items: flex-start;
    padding: 14px 18px;
  }
  .detail-top-actions {
    flex-wrap: wrap;
  }
  .detail-shortcut-bar {
    order: 3;
  }
  .detail-tabs-head {
    flex-direction: column;
    gap: 4px;
    padding-bottom: 10px;
  }
  .teacher-detail .detail-tabs-nav {
    width: 100%;
    overflow-x: auto;
  }
  .detail-tab-action {
    padding-left: 8px;
  }
  .teacher-signal-head,
  .teacher-signal-row {
    grid-template-columns: 1fr;
  }
  .teacher-signal-action {
    justify-content: flex-start;
    padding: 0 16px 12px;
  }
}

@media (max-width: 1180px) {
  .teacher-interaction-panel {
    grid-template-columns: 1fr;
  }
  .report-reserved-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finished-learning-snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .report-reserved-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 学生学习详情 Drawer 重构样式 ── */
.sdd-top-card {
  background: #eef1fb;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.sdd-top-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.sdd-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.sdd-avatar.green { background: #16a34a; }
.sdd-avatar.blue { background: #2563eb; }
.sdd-avatar.amber { background: #d97706; }
.sdd-avatar.red { background: #dc2626; }
.sdd-avatar.cyan { background: #0891b2; }
.sdd-avatar.violet { background: #7c3aed; }
.sdd-top-info { flex: 1; min-width: 0; }
.sdd-top-name { font-size: 17px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.sdd-top-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-top-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.drawer-top-tag.warn { background: #fff0f0; color: #dc2626; border: 1px solid rgba(220,38,38,0.2); }
.drawer-top-tag.good { background: #f0fdf4; color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.sdd-top-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.sdd-action-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.sdd-action-btn:hover { border-color: var(--primary-mid); color: var(--primary); }
.sdd-metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sdd-metric { text-align: center; }
.sdd-metric-value { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.2; }
.sdd-metric-unit { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.sdd-metric-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sdd-section { margin-bottom: 16px; }
.sdd-section-title { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 10px; }
.sdd-records-list { display: flex; flex-direction: column; gap: 8px; }
.sdd-record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.sdd-record-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sdd-record-body { flex: 1; min-width: 0; }
.sdd-record-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.sdd-goal-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--primary-weak);
  color: var(--primary);
  flex-shrink: 0;
}
.sdd-record-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sdd-record-duration {
  font-size: 11px;
  color: var(--muted);
  background: #eef1fb;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sdd-record-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.sdd-detail-link {
  font-size: 12px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0;
}
.sdd-detail-link:hover { text-decoration: underline; }
.sdd-evaluate-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sdd-evaluate-box textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: none;
  outline: none;
  resize: none;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.6;
}
.sdd-evaluate-footer {
  display: flex;
  justify-content: flex-end;
  padding: 6px 12px;
  border-top: 1px solid var(--line);
}
.sdd-char-count { font-size: 11px; color: var(--muted); }
.sdd-send-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.sdd-send-btn {
  height: 34px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.sdd-send-btn:not(:disabled):hover { border-color: var(--primary-mid); color: var(--primary); }
.sdd-send-btn:disabled { opacity: 0.5; cursor: default; }
.sdd-encourage-bar {
  position: sticky;
  bottom: 0;
  background: rgba(244,247,255,0.95);
  backdrop-filter: blur(8px);
  padding: 12px 0 16px;
  margin-top: 8px;
}
.sdd-encourage-btn {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6d5dfc 0%, #8b7aff 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 160ms;
}
.sdd-encourage-btn:hover:not(:disabled) { opacity: 0.88; }
.sdd-encourage-btn:disabled { background: #c8cfe8; cursor: default; }

/* ── 学生名单弹窗（当堂任务达成统计）── */
.slm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 51, 0.42);
}
.slm-backdrop[hidden] { display: none; }
.slm-inner {
  width: min(860px, calc(100vw - 48px));
  max-height: min(72vh, 620px);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 36, 51, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.slm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 0;
  flex-shrink: 0;
}
.slm-title { margin: 0 0 2px; font-size: 20px; font-weight: 900; color: #1f2433; }
.slm-subtitle { font-size: 13px; color: #8a91aa; }
.slm-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 28px 0;
  border-bottom: 1px solid #e4e8f4;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.slm-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8a91aa;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms;
}
.slm-tab.is-active { color: #4a4ffd; border-bottom-color: #4a4ffd; font-weight: 700; }
.slm-tab-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #eef1ff;
  color: #4a4ffd;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
}
.slm-tab.is-active .slm-tab-count { background: #4a4ffd; color: #fff; }
.slm-body { padding: 16px 28px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.slm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slm-section + .slm-section { margin-top: 18px; }
.slm-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #1f2433;
  font-size: 14px;
  font-weight: 900;
}
.slm-section.is-empty {
  opacity: 0.72;
}
.slm-section-title span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef1ff;
  color: #4a4ffd;
  font-size: 11px;
  font-weight: 800;
}
.slm-section-empty {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px dashed #dfe5f2;
  border-radius: 10px;
  background: #fafbff;
  color: #9aa2b8;
  font-size: 13px;
}
.slm-student-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms, box-shadow 140ms;
  width: 100%;
}
.slm-student-card:hover { border-color: #a9bbff; box-shadow: 0 2px 8px rgba(74,79,253,0.08); }
.slm-card-info { flex: 1; min-width: 0; }
.slm-card-name { font-size: 14px; font-weight: 700; color: #1f2433; margin-bottom: 6px; }
.slm-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #8a91aa; }
.slm-state-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.slm-state-tag.green { background: #dcfce7; color: #166534; }
.slm-state-tag.amber { background: #fef9c3; color: #854d0e; }
.slm-state-tag.red { background: #fee2e2; color: #991b1b; }

/* ── 学情关怀全量弹窗 ── */
.review-modal-inner {
  width: min(1080px, calc(100vw - 48px));
  height: min(78vh, 760px);
  border-radius: 20px;
  background: #f3f6ff;
  box-shadow: 0 28px 80px rgba(31, 36, 51, 0.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.review-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 34px 18px;
  flex-shrink: 0;
}

.review-modal-header h2 {
  margin: 0;
  color: #111524;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.review-modal-header h2 span {
  margin-left: 10px;
  color: #68718f;
  font-size: 15px;
  font-weight: 700;
}

.review-modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #9aa3b8;
  font-size: 32px;
  font-weight: 200;
  line-height: 30px;
  cursor: pointer;
}

.review-modal-close:hover {
  color: #5d6680;
}

.review-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px 14px;
  padding: 0 34px 34px;
  overflow-y: auto;
  min-height: 0;
}

.review-modal-grid .review-row-card {
  min-height: 78px;
  border-radius: 12px;
  padding: 13px 16px;
}

.review-modal-grid .review-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 14px;
}

.review-modal-grid .review-card-title {
  font-size: 15px;
}

.review-modal-grid .review-card-desc {
  font-size: 12px;
}

/* ── 题目详情页重构样式 ── */
.question-detail-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

/* 题干卡片 */
.qd-question-card {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.qd-question-body {
  padding: 28px 32px 20px;
}
.qd-question-text {
  font-size: 16px;
  font-weight: 500;
  color: #1f2433;
  line-height: 1.8;
  white-space: pre-wrap;
}
.qd-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px 20px;
  flex-wrap: wrap;
}
.qd-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  background: #f0f3ff;
  color: #5b6abf;
  font-size: 12px;
  font-weight: 500;
}
.qd-answer-toggle-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 32px 16px;
  border-top: 1px solid #f0f3ff;
  padding-top: 14px;
}
.qd-answer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #4a4ffd;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.qd-toggle-arrow {
  font-size: 12px;
  transition: transform 160ms;
}
.qd-answer-panel {
  padding: 20px 32px 24px;
  background: #f8f9fc;
  border-top: 1px solid #e4e8f4;
}
.qd-answer-panel[hidden] { display: none; }
.qd-answer-line {
  font-size: 15px;
  color: #1f2433;
  margin-bottom: 12px;
  line-height: 1.7;
}
.qd-analysis-line {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.8;
  white-space: pre-wrap;
}
.qd-answer-key {
  font-weight: 700;
  color: #1f2433;
}

/* 作答详情区 */
.qd-answer-detail-section {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  overflow: hidden;
}
.qd-answer-detail-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2433;
  margin: 0;
  padding: 20px 28px 16px;
  border-bottom: 1px solid #f0f3ff;
}

/* 4个大指标 */
.qd-big-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 20px 28px;
  border-bottom: 1px solid #f0f3ff;
}
.qd-big-stat {
  padding: 0 16px;
  border-right: 1px solid #f0f3ff;
}
.qd-big-stat:first-child { padding-left: 0; }
.qd-big-stat:last-child { border-right: none; }
.qd-big-val {
  font-size: 36px;
  font-weight: 900;
  color: #1f2433;
  line-height: 1.1;
  margin-bottom: 6px;
}
.qd-big-unit {
  font-size: 16px;
  font-weight: 500;
  color: #8a91aa;
  margin-left: 2px;
}
.qd-big-stat.green .qd-big-val { color: #16a34a; }
.qd-big-stat.red .qd-big-val { color: #ef4444; }
.qd-big-label {
  font-size: 13px;
  color: #8a91aa;
}
.qd-time-val {
  font-size: 24px !important;
}

/* 选项分布行 */
.qd-option-dist-list {
  padding: 8px 0;
}
.qd-option-dist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid #f5f6fa;
  min-height: 56px;
}
.qd-option-dist-row:last-child { border-bottom: none; }
.qd-opt-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.qd-opt-icon.correct { background: #dcfce7; color: #16a34a; }
.qd-opt-icon.wrong { background: #fee2e2; color: #ef4444; }
.qd-opt-label {
  width: 32px;
  font-size: 15px;
  font-weight: 700;
  color: #1f2433;
  flex-shrink: 0;
}
.qd-opt-bar-wrap {
  width: 160px;
  height: 8px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.qd-opt-bar {
  height: 100%;
  border-radius: inherit;
  min-width: 4px;
}
.qd-opt-bar.correct { background: #22c55e; }
.qd-opt-bar.wrong { background: #ef4444; }
.qd-opt-count {
  width: 36px;
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
  flex-shrink: 0;
}
.qd-opt-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.qd-sa-avatar {
  width: 28px !important;
  height: 28px !important;
  font-size: 11px !important;
  cursor: default;
}
.qd-sa-avatar.is-clickable {
  cursor: pointer;
  outline: 2px solid transparent;
  transition: outline-color 140ms;
}
.qd-sa-avatar.is-clickable:hover {
  outline-color: #4a4ffd;
}
.qd-sa-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qd-sa-name {
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}

/* 学生布置作答详情 */
.qd-student-answer-card {
  padding: 20px 28px 24px;
}
.qd-sa-student-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.qd-sa-student-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2433;
}
.qd-sa-result-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.qd-sa-result-tag.correct { background: #dcfce7; color: #166534; }
.qd-sa-result-tag.wrong { background: #fee2e2; color: #991b1b; }
.qd-sa-detail-rows {
  border: 1px solid #e4e8f4;
  border-radius: 10px;
  overflow: hidden;
}
.qd-sa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f3ff;
  font-size: 14px;
}
.qd-sa-row:last-child { border-bottom: none; }
.qd-sa-row span { color: #8a91aa; }
.qd-sa-row strong { color: #1f2433; font-weight: 700; }

/* ── 作答详情抽屉 ── */
.adr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(31,36,51,0.32);
  display: flex;
  justify-content: flex-end;
}
.adr-backdrop[hidden] { display: none; }
.adr-panel {
  width: 360px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(31,36,51,0.12);
  display: flex;
  flex-direction: column;
}
.adr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e4e8f4;
  flex-shrink: 0;
}
.adr-header h2 { margin: 0; font-size: 18px; font-weight: 800; color: #1f2433; }
.adr-content { padding: 20px 24px; flex: 1; overflow-y: auto; }
.adr-student-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.adr-student-name { font-size: 16px; font-weight: 700; color: #1f2433; }
.adr-card {
  border: 1px solid #e4e8f4;
  border-radius: 10px;
  overflow: hidden;
}
.adr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f3ff;
  font-size: 14px;
}
.adr-row:last-child { border-bottom: none; }
.adr-label { color: #8a91aa; }
.adr-value { color: #1f2433; font-weight: 700; }
.adr-value.correct { color: #16a34a; }
.adr-value.wrong { color: #ef4444; }

/* 未作答分组图标 */
.qd-opt-icon.info { background: #e0f2fe; color: #0284c7; }
.qd-opt-bar.info { background: #7dd3fc; }

/* ── 错题卡片重构 ── */
.mk-card {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  transition: box-shadow 140ms, border-color 140ms;
}
.mk-card:hover {
  border-color: #c5cef5;
  box-shadow: 0 2px 10px rgba(74,79,253,0.07);
}
.mk-card-body {
  padding: 16px 20px 12px;
}
.mk-question {
  font-size: 15px;
  font-weight: 500;
  color: #1f2433;
  line-height: 1.65;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mk-source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.mk-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
}
.mk-tag.task { background: #f0f3ff; color: #5b6abf; }
.mk-tag.kp { background: #f0fdf4; color: #16a34a; }
.mk-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #8a91aa;
}
.mk-stat strong { color: #1f2433; font-weight: 700; }
.mk-stat-sep { color: #d0d5e4; }
.mk-wrong-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}
.mk-wrong-tag.mk-tag-partial {
  background: #fef3c7;
  color: #92400e;
}
.mk-wrong-tag.mk-tag-unanswered {
  background: #f1f5f9;
  color: #64748b;
}
.mk-result-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.mk-result-tag.wrong { background: #fee2e2; color: #991b1b; }
.mk-result-tag.partial { background: #fef9c3; color: #854d0e; }
.mk-card-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 20px 14px;
  border-top: 1px solid #f5f6fa;
}
.mk-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #4a4ffd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.mk-detail-btn:hover { text-decoration: underline; }
.adr-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2433;
  padding: 14px 16px 8px;
}

/* ── 问题反馈 Drawer ── */
.feedback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.42);
}

.feedback-panel {
  width: min(560px, 100vw);
  height: 100vh;
  overflow: auto;
  background: #f3f8ff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.24);
}

.feedback-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 14px;
  background: #f3f8ff;
}

.feedback-header h2 {
  margin: 0;
  color: #101522;
  font-size: 21px;
  font-weight: 900;
}

.feedback-form {
  display: grid;
  gap: 14px;
  padding: 10px 26px 24px;
}

.feedback-card {
  padding: 18px;
  border: 1px solid #dfe6f5;
  border-radius: 8px;
  background: #fff;
}

.feedback-card h3 {
  margin: 0 0 14px;
  color: #151925;
  font-size: 15px;
  font-weight: 900;
}

.feedback-card h3 span {
  color: #ef4444;
}

.feedback-card h3 strong {
  color: #151925;
  font-weight: 900;
}

.feedback-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.feedback-type {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #d9e1f2;
  border-radius: 6px;
  background: #fff;
  color: #3d4964;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.feedback-type.is-selected {
  border-color: #635bff;
  background: #f0efff;
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.2);
}

.feedback-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-image,
.feedback-image-add {
  position: relative;
  width: 84px;
  height: 84px;
  border: 1px solid #d9e1f2;
  border-radius: 6px;
  background: #f9fbff;
  color: #8089a8;
  font-size: 12px;
  font-weight: 700;
}

.feedback-image {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.feedback-image-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.feedback-image-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  cursor: pointer;
}

.feedback-image-add strong {
  color: #7f89ac;
  font-size: 24px;
  line-height: 1;
}

.feedback-textarea-wrap {
  position: relative;
  display: block;
}

.feedback-textarea-wrap textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px 14px 32px;
  border: 1px solid #d9e1f2;
  border-radius: 6px;
  color: #1f2937;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.feedback-textarea-wrap textarea:focus {
  border-color: #635bff;
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}

.feedback-textarea-wrap span {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #8a91aa;
  font-size: 12px;
  font-weight: 800;
}

.feedback-submit {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #635bff;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(99, 91, 255, 0.25);
}

@media (max-width: 680px) {
  .feedback-header,
  .feedback-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .feedback-type-grid {
    grid-template-columns: 1fr;
  }
}
