/* ============================================================
   rectify_e.css — 排版整改切片E（数据看板/质检/台词/批量工具）
   纪律：只复用既有 CSS 变量，不新增色值；覆盖 style.css
   ============================================================ */

/* ---------- 通用弹窗（克制居中，对齐 .modal 三区） ---------- */
.rt-mask {
  position: fixed; inset: 0; z-index: 2400;
  background: rgba(15, 20, 30, .45);
  display: flex; align-items: center; justify-content: center;
}
.rt-modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
  width: 640px; max-width: 94vw; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.rt-modal.rt-lg { width: 860px; }
.rt-modal.rt-sm { width: 460px; }
.rt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.rt-head .rt-title { font-size: 14px; font-weight: 600; color: var(--text); }
.rt-x { border: none; background: transparent; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; }
.rt-x:hover { color: var(--danger); }
.rt-body { padding: 14px 16px; overflow-y: auto; flex: 1; font-size: var(--fs-body); color: var(--text); }
.rt-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--border);
}
.rt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.rt-row > label { font-size: var(--fs-hint); color: var(--text-muted); min-width: 72px; }
.rt-row select, .rt-row input[type=text], .rt-row input[type=number] {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft); color: var(--text); font-size: var(--fs-body);
}
.rt-hint { font-size: var(--fs-hint); color: var(--text-muted); line-height: 1.6; }
.rt-warnline {
  background: var(--warn-soft); color: var(--warn);
  padding: 8px 10px; border-radius: 8px; font-size: var(--fs-hint); line-height: 1.6;
}

/* ---------- 抽屉（数据看板 86） ---------- */
.rt-drawer-mask {
  position: fixed; inset: 0; z-index: 2300; background: rgba(15,20,30,.35);
}
.rt-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 760px; max-width: 96vw;
  background: var(--card); border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
  display: flex; flex-direction: column; z-index: 2301;
  animation: rtSlideIn .18s ease-out;
}
@keyframes rtSlideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.rt-drawer .rt-body { overflow-y: auto; }

/* 统计卡片区 */
.rt-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.rt-stat {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.rt-stat .rt-num { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.rt-stat .rt-lab { font-size: var(--fs-hint); color: var(--text-muted); margin-top: 2px; }
.rt-stat.tone-ok .rt-num { color: var(--st-ok); }
.rt-stat.tone-run .rt-num { color: var(--st-run); }
.rt-stat.tone-queued .rt-num { color: var(--st-queued); }
.rt-stat.tone-fail .rt-num { color: var(--st-fail); }

.rt-panel-sec { font-size: var(--fs-h2); font-weight: 600; color: var(--text); margin: 14px 0 8px; }
.rt-chart-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.rt-chart-box {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; flex: 1; min-width: 260px;
}
.rt-chart-title { font-size: var(--fs-hint); color: var(--text-muted); margin-bottom: 8px; }
.rt-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: var(--fs-hint); color: var(--text-muted); }
.rt-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* 柱状图 */
.rt-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 6px; }
.rt-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.rt-bar .rt-bar-col { width: 70%; border-radius: 4px 3px 0 0; background: var(--st-queued); min-height: 2px; }
.rt-bar .rt-bar-x { font-size: 12px; color: var(--text-muted); }

/* 空状态 */
.rt-empty {
  text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: var(--fs-body);
}
.rt-empty .rt-empty-t { font-size: var(--fs-h2); color: var(--text); margin-bottom: 6px; }

/* ---------- 87 台词字数/时长预估 ---------- */
.rt-audio-meta {
  display: flex; justify-content: flex-end; gap: 10px;
  font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4;
}
.rt-audio-meta.rt-over { color: var(--warn); font-weight: 600; }
.rt-audio-wrap { position: relative; }
.rt-split-btn {
  position: absolute; right: 4px; bottom: 20px;
  font-size: 12px; padding: 2px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text-muted); cursor: pointer;
}
.rt-split-btn:hover { color: var(--primary); border-color: var(--primary); }

.rt-sel-summary {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 8px;
  font-size: var(--fs-hint); color: var(--primary);
}

/* ---------- 88 断句对比 ---------- */
.rt-split-cmp { display: flex; gap: 12px; }
.rt-split-cmp > div { flex: 1; }
.rt-split-cmp h5 { margin: 0 0 6px; font-size: var(--fs-hint); color: var(--text-muted); font-weight: 600; }
.rt-split-cmp .rt-orig, .rt-split-cmp .rt-out {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; font-size: var(--fs-body); line-height: 1.8; min-height: 120px; white-space: pre-wrap;
}

/* ---------- 90 质检结果 ---------- */
.rt-qc-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--bg-soft);
}
.rt-qc-item.sev-warn { border-left: 3px solid var(--warn); }
.rt-qc-item.sev-danger { border-left: 3px solid var(--danger); }
.rt-qc-item.sev-info { border-left: 3px solid var(--primary); }
.rt-qc-item .rt-qc-shot { font-weight: 600; color: var(--text); min-width: 56px; }
.rt-qc-item .rt-qc-type { font-size: var(--fs-hint); color: var(--text-muted); min-width: 90px; }
.rt-qc-item .rt-qc-desc { flex: 1; font-size: var(--fs-hint); color: var(--text); }
.rt-qc-item .rt-qc-act { white-space: nowrap; }
.rt-qc-pass { padding: 10px; text-align: center; color: var(--st-ok); font-size: var(--fs-body); }

/* ---------- 93 场次汇总条 ---------- */
.rt-scene-sum {
  display: inline-flex; align-items: center; gap: 10px; margin-left: 10px;
  font-size: var(--fs-hint); color: var(--text-muted);
}
.rt-scene-sum b { color: var(--text); font-weight: 600; }
.rt-scene-sum .rt-sum-dur { color: var(--st-queued); }
.rt-scene-exp {
  font-size: 12px; margin-left: 6px; padding: 2px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text-muted); cursor: pointer;
}
.rt-scene-exp:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 94/95 预览清单 ---------- */
.rt-preview {
  margin-top: 10px; max-height: 180px; overflow-y: auto;
  border: 1px dashed var(--border); border-radius: 8px; padding: 8px; font-size: var(--fs-hint);
  color: var(--text-muted);
}
.rt-preview .rt-prev-line { padding: 2px 0; border-bottom: 1px dashed var(--border); }
.rt-preview .rt-prev-line:last-child { border-bottom: none; }
.rt-badge-ct {
  display: inline-block; padding: 1px 8px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary); font-size: var(--fs-hint); margin-left: 6px;
}
