/* ============================================================
   教师成长循环 · 管理后台设计系统
   关键词：专业沉静 / 成长叙事 / 双栏对照 / 数据克制
   ============================================================ */

:root {
  --primary: #1D4ED8;
  --primary-2: #2563EB;
  --primary-soft: #E8EFFD;
  --teal: #0F766E;
  --teal-soft: #DCF3F0;
  --bg: #F7F9FC;
  --card: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;
  --line: #E7EDF5;
  --success: #10B981;
  --warn: #F59E0B;
  --danger: #EF4444;
  --violet: #8B5CF6;
  --sidebar: #0F172A;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

/* ---------------- 登录 ---------------- */
.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.22), transparent 46%),
    radial-gradient(circle at 82% 84%, rgba(15, 118, 110, 0.22), transparent 48%),
    #0F172A;
  z-index: 100;
}

.login-card {
  width: 420px;
  max-width: calc(100vw - 32px);
  padding: 40px 36px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  animation: rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.3);
}

.login-brand h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.login-brand p {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 1.6px;
  margin-top: 2px;
}

.login-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 13px;
  border: 1px solid #FECACA;
}

.login-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------------- 布局 ---------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #E2E8F0;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563EB, #0F766E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 600;
  color: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.4px;
}

.brand-text span {
  font-size: 11px;
  color: #64748B;
  letter-spacing: 1.6px;
}

.nav {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: #94A3B8;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(100deg, rgba(37, 99, 235, 0.26), rgba(15, 118, 110, 0.16));
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(148, 197, 255, 0.18);
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.nav-item.active .nav-dot {
  background: #38BDF8;
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  padding: 0 8px 12px;
  font-size: 13px;
  color: #E2E8F0;
}

.sidebar-user small {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px 22px;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h2 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view {
  padding: 26px 36px 56px;
  flex: 1;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.24);
}

.btn-primary:hover { box-shadow: 0 12px 26px rgba(29, 78, 216, 0.32); }

.btn-teal {
  background: linear-gradient(135deg, #0F766E, #10B981);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
}

.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: #CBD5E1; color: var(--ink); }

.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.btn-sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }

/* 卡片底部的操作按钮组 */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 侧栏内的 ghost 按钮 */
.sidebar .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------------- 卡片与网格 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.card + .card { margin-top: 18px; }

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--teal));
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: 0.6;
}

.stat-label {
  font-size: 12.5px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 6px;
  position: relative;
  z-index: 1;
  color: var(--ink);
}

.stat-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}

.stat-accent .stat-value { color: var(--primary); }
.stat-teal .stat-value { color: var(--teal); }
.stat-warn .stat-value { color: #B45309; }

/* ---------------- 活跃度趋势 ---------------- */
.trend-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
}

.trend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
}

.trend-dot-evidence { background: linear-gradient(180deg, #60A5FA, #2563EB); }
.trend-dot-closed { background: linear-gradient(180deg, #34D399, #0F766E); }

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.trend-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trend-bars {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 2px;
  border-bottom: 1px solid #F1F5FB;
}

.trend-bar {
  width: 9px;
  max-width: 42%;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.trend-bar-evidence { background: linear-gradient(180deg, #60A5FA, #2563EB); }
.trend-bar-closed { background: linear-gradient(180deg, #34D399, #0F766E); }

.trend-col:hover .trend-bar {
  filter: brightness(1.06);
}

.trend-x {
  height: 15px;
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 15px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------------- 表格 ---------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 13px 12px;
  border-bottom: 1px solid #F1F5FB;
  vertical-align: middle;
}

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

.table tbody tr {
  transition: background 0.14s ease;
}

.table tbody tr:hover { background: #FAFCFE; }

.table .row-action {
  color: var(--primary);
  font-size: 12.5px;
  cursor: pointer;
  margin-right: 12px;
}

.table .row-action:hover { text-decoration: underline; }

.table .row-action.danger { color: #DC2626; }

/* ---------------- 徽章 / 标签 ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.badge-success { background: #E7F8F1; color: #047857; }
.badge-warn { background: #FEF4E4; color: #B45309; }
.badge-danger { background: #FEECEC; color: #B91C1C; }
.badge-muted { background: #F1F5F9; color: #64748B; }
.badge-violet { background: #F3EEFE; color: #6D28D9; }
.badge-teal { background: var(--teal-soft); color: #0F766E; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: #F1F5FB;
  color: var(--ink-2);
  font-size: 12px;
  margin: 0 6px 6px 0;
}

.chip-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.chip-teal { background: var(--teal-soft); color: #0F766E; }

/* ---------------- 表单 ---------------- */
.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 7px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar input,
.toolbar select {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.toolbar input { min-width: 240px; }

.spacer { flex: 1; }

/* ---------------- 状态与空态 ---------------- */
.empty {
  padding: 64px 20px;
  text-align: center;
  color: var(--ink-3);
}

.empty-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-soft), var(--teal-soft));
  color: var(--primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading {
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
}

.loading-dots {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
}

.loading-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: blink 1.2s ease-in-out infinite;
}

.loading-dots i:nth-child(2) { animation-delay: 0.18s; }
.loading-dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes blink {
  0%, 100% { opacity: 0.22; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

.error-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------------- 待验证列表 ---------------- */
.review-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.review-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #CFE0FA;
}

.review-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-q {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.review-meta {
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------------- 导师审核工作台 ---------------- */
/* 首次审核步骤引导条 */
.workbench-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--primary-soft);
  border: 1px solid #D6E4FF;
}

.workbench-guide-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.workbench-guide-steps strong {
  color: var(--ink);
  font-weight: 600;
}

.wgs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wgs b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.wgs-arrow {
  font-style: normal;
  color: var(--ink-3);
}

.workbench-guide-close {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
}

.workbench-guide-close:hover {
  opacity: 0.88;
}

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

.workbench-q {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.45;
}

.workbench-meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.ai-summary {
  background: linear-gradient(135deg, #F5F8FF, #FFFFFF 46%, #F3FBFA);
  border: 1px solid #DDE9FA;
}

.ai-summary-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-tag {
  font-size: 11px;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
}

.ai-summary-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.summary-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.summary-col {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.summary-col h4 {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.summary-col h4 span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.col-good h4 span { background: var(--success); }
.col-flat h4 span { background: var(--ink-3); }
.col-new h4 span { background: var(--warn); }

.summary-item {
  padding: 9px 0;
  border-bottom: 1px dashed #EDF1F7;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.summary-item:last-child { border-bottom: none; }

.summary-item strong {
  color: var(--ink);
  font-weight: 500;
}

.summary-item em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  color: var(--ink-3);
  font-size: 11.5px;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.evidence-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  max-height: 620px;
  box-shadow: var(--shadow);
}

.evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: 14px 14px 0 0;
  z-index: 2;
}

.evidence-title {
  font-size: 13.5px;
  font-weight: 600;
}

.evidence-body {
  padding: 18px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}

.evidence-reflection {
  margin: 0 18px 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #F7F9FC;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------------- 两轮逐字稿差异 ---------------- */
.card-head-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.diff-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.diff-switch input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.diff-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

.diff-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}

.diff-legend-note {
  color: var(--ink-3);
}

.lg-add { background: #E7F8F1; box-shadow: inset 0 -2px 0 rgba(16, 185, 129, 0.6); }
.lg-change { background: #FEF4E4; box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.6); }
.lg-del { background: #FEECEC; box-shadow: inset 0 -2px 0 rgba(239, 68, 68, 0.5); }

.diff-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.diff-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.diff-pill-add { background: #E7F8F1; color: #047857; }
.diff-pill-del { background: #FEECEC; color: #B91C1C; }
.diff-pill-change { background: #FEF4E4; color: #B45309; }

/* 用 inset 下划线而不是底色块，避免行高被撑开破坏阅读节奏 */
.diff-sent {
  border-radius: 3px;
}

.diff-added {
  background: #E7F8F1;
  box-shadow: inset 0 -2px 0 rgba(16, 185, 129, 0.6);
}

.diff-removed {
  background: #FEECEC;
  box-shadow: inset 0 -2px 0 rgba(239, 68, 68, 0.5);
}

.diff-changed {
  background: #FEF4E4;
  box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.6);
}

.diff-same {
  background: transparent;
}

/* 只看差异：差异句各自成块，未变的句子与换行一并收起 */
.evidence-body.diff-only .diff-sent {
  display: block;
  padding: 3px 0;
}

.evidence-body.diff-only .diff-same {
  display: none;
}

.evidence-body.diff-only .diff-br {
  display: none;
}

/* ---------------- 指标前后对比条 ---------------- */
.mcmp-item {
  padding: 14px 0;
}

.mcmp-item + .mcmp-item {
  border-top: 1px dashed var(--line);
}

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

.mcmp-head-left {
  min-width: 0;
}

.mcmp-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.mcmp-sub {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}

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

.mcmp-delta {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mcmp-delta-better { color: #047857; }
.mcmp-delta-worse { color: #B91C1C; }
.mcmp-delta-flat { color: var(--ink-3); }

.mcmp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.mcmp-tag {
  flex-shrink: 0;
  width: 34px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.mcmp-track {
  flex: 1;
  min-width: 0;
  height: 10px;
  border-radius: 5px;
  background: #F1F5FB;
  overflow: hidden;
}

.mcmp-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.35s ease;
}

.mcmp-fill-before {
  background: #CBD5E1;
}

.mcmp-fill-after.mcmp-tone-better { background: linear-gradient(90deg, #34D399, #0F766E); }
.mcmp-fill-after.mcmp-tone-worse { background: linear-gradient(90deg, #FCA5A5, #DC2626); }
.mcmp-fill-after.mcmp-tone-flat { background: linear-gradient(90deg, #93C5FD, #2563EB); }

.mcmp-value {
  flex-shrink: 0;
  width: 78px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 待确认清单 */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
  transition: background 0.24s ease, transform 0.24s ease, border-color 0.24s ease;
}

.checklist-item.confirmed {
  background: #F2FBF7;
  border-color: #BBEBD7;
  transform: translateX(4px);
}

.checklist-item.rejected {
  background: #FDF8F5;
  border-color: #FADFC8;
  transform: translateX(4px);
}

.check-body {
  flex: 1;
  min-width: 0;
}

.check-text {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.65;
}

.check-evidence {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

.check-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.check-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: #fff;
  transition: all 0.14s ease;
}

.check-btn:hover { border-color: #CBD5E1; }

.check-btn.on-confirm {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.check-btn.on-reject {
  background: #F59E0B;
  border-color: #F59E0B;
  color: #fff;
}

/* 裁决区 */
.decision-bar {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.decision-btn {
  flex: 1;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: left;
  transition: all 0.16s ease;
}

.decision-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.decision-btn strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.decision-btn small {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.decision-close:hover { border-color: var(--success); }
.decision-next:hover { border-color: var(--primary); }
.decision-rework:hover { border-color: var(--warn); }

.decision-close strong { color: #047857; }
.decision-next strong { color: var(--primary); }
.decision-rework strong { color: #B45309; }

/* ---------------- 模态 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fade 0.18s ease both;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 620px;
  max-width: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: rise 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  z-index: 2;
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ink-3);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: #F1F5FB; color: var(--ink); }

.modal-body { padding: 22px 24px; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: #fff;
}

.modal-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.modal-text strong { color: var(--ink); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13.5px;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.22s ease both;
}

.toast.error { background: #B91C1C; }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- 标签体系 ---------------- */
.tag-dim {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: #fff;
  margin-bottom: 14px;
}

.tag-dim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tag-dim-name {
  font-size: 14.5px;
  font-weight: 600;
}

.tag-dim-desc {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.tag-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  background: #FCFDFF;
}

.tag-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-card-name {
  font-size: 13.5px;
  font-weight: 500;
}

.tag-card-code {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tag-card-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.tag-card-stats {
  margin-top: 9px;
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ---------------- 课程库 ---------------- */
.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-height: 260px;
  overflow-y: auto;
}

.tag-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--ink-2);
  transition: all 0.14s ease;
}

.tag-pick:hover { border-color: #CBD5E1; }

.tag-pick.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tag-pick.selected.main-tag {
  background: var(--teal);
  border-color: var(--teal);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1440px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  .duo { grid-template-columns: 1fr; }
  .summary-cols { grid-template-columns: 1fr; }
  .evidence-panel { max-height: 420px; }
  .view { padding: 22px 24px 48px; }
  .topbar { padding: 22px 24px 18px; }
}

@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-bar { flex-direction: column; }
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }
  .brand { border-bottom: none; padding-bottom: 0; }
  .brand-text { display: none; }
  .nav { flex-direction: row; margin-top: 0; gap: 6px; }
  .nav-item { white-space: nowrap; padding: 8px 12px; }
  .sidebar-foot { border-top: none; padding-top: 0; display: flex; align-items: center; gap: 8px; }
  .sidebar-user { padding: 0; }
  .field-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------------- 微信扫码登录与项目切换 ---------------- */
.login-qr {
  margin: 14px 0 10px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  background: #F8FAFC;
}
.login-qr-title { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.login-qr-image { min-height: 160px; display: flex; align-items: center; justify-content: center; }
.login-qr-image img { width: 180px; height: 180px; image-rendering: pixelated; }
.login-qr-status { font-size: 12.5px; color: var(--ink-2); margin: 10px 0; min-height: 18px; }
.project-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.project-switch select {
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.project-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.project-tab {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}
.project-tab.active { background: var(--brand, #1D4ED8); color: #fff; border-color: transparent; }
