/* ============================================================
   b39 · AI 数据核查工作台 / 角色授予审批 / 法规护栏
   与既有卡片视觉保持一致（浅色底、深色字、蓝灰主色）
   ============================================================ */

.b39-wrap { display: flex; flex-direction: column; gap: 12px; }

.b39-redline {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
}
.b39-redline code { background: #fef3c7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.b39-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b39-bar .b39-hint { margin: 0; }

.b39-run {
  font-size: 12.5px; color: #475569; background: #f8fafc;
  border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px 12px;
}

.b39-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.b39-stat {
  flex: 1 1 130px; min-width: 120px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 10px 12px;
}
.b39-stat-n { font-size: 22px; font-weight: 700; color: #1e293b; line-height: 1.2; }
.b39-stat-l { font-size: 12px; color: #64748b; margin-top: 2px; }
.b39-stat.blue   { border-left: 3px solid #3b82f6; }
.b39-stat.red    { border-left: 3px solid #ef4444; }
.b39-stat.orange { border-left: 3px solid #f59e0b; }
.b39-stat.purple { border-left: 3px solid #8b5cf6; }
.b39-stat.green  { border-left: 3px solid #10b981; }

.b39-tool { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.b39-tool .btn-p, .b39-tool .btn-o { padding: 5px 10px; font-size: 12.5px; }
.b39-kw {
  flex: 1 1 200px; min-width: 160px; border: 1px solid #cbd5e1; border-radius: 6px;
  padding: 6px 10px; font-size: 12.5px;
}

.b39-scroll { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.b39-tb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.b39-tb th {
  background: #f8fafc; color: #475569; font-weight: 600; text-align: left;
  padding: 8px 10px; border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.b39-tb td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; line-height: 1.6; }
.b39-tb tr:last-child td { border-bottom: none; }
.b39-tb .btn-o, .b39-tb .btn-p { padding: 3px 8px; font-size: 12px; margin: 2px 4px 2px 0; }

.b39-tag {
  display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px;
  border: 1px solid transparent; white-space: nowrap;
}
.b39-sev-high   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.b39-sev-medium { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.b39-sev-low    { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.b39-st-open     { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.b39-st-query    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.b39-st-waived   { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.b39-st-fixed    { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.b39-st-reviewed { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.b39-dc { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; margin-left: 4px; }

.b39-ft { font-weight: 600; color: #1e293b; }
.b39-adv { color: #64748b; margin-top: 3px; font-size: 12px; }
.b39-mut { color: #94a3b8; font-size: 11.5px; }

.b39-empty {
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px;
  padding: 16px; text-align: center; color: #64748b; font-size: 12.5px;
}
.b39-empty .btn-p { margin: 8px 0; }
.b39-hint { font-size: 12px; color: #64748b; line-height: 1.7; }

.b39-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.b39-foot .btn-o { padding: 5px 10px; font-size: 12.5px; }

.b39-panel {
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 0 12px;
}
.b39-panel > summary {
  cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: #334155;
}
.b39-panel > summary::marker { color: #94a3b8; }

.b39-legal { font-size: 12.5px; color: #334155; line-height: 1.75; padding-bottom: 10px; }
.b39-legal ol { margin: 0 0 12px; padding-left: 20px; }
.b39-legal li { margin-bottom: 10px; }
.b39-legal .b39-ev { color: #1d4ed8; }
.b39-ok { color: #047857; }
.b39-li { padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.b39-li:last-child { border-bottom: none; }
.b39-ul { margin: 6px 0 12px; padding-left: 20px; font-size: 12.5px; line-height: 1.8; color: #334155; }
.b39-gd { border-top: 1px solid #e2e8f0; padding-top: 10px; font-size: 12.5px; color: #334155; }

/* 研究者审定对话框 */
.b39-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 99998;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.b39-dlg {
  width: 560px; max-width: 100%; background: #fff; border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28); overflow: hidden;
}
.b39-dlg-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #e2e8f0; font-size: 14px;
}
.b39-dlg-hd a { color: #94a3b8; text-decoration: none; font-size: 18px; line-height: 1; }
.b39-dlg-bd { padding: 14px 16px; max-height: 60vh; overflow-y: auto; }
.b39-dlg-ft {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc;
}
.b39-dlg-item { font-size: 13px; color: #1e293b; margin-bottom: 8px; }
.b39-dlg-note {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 8px 10px; font-size: 12.5px; color: #334155; line-height: 1.7; margin-bottom: 10px;
}
.b39-dlg-note.b39-ai { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; font-size: 11.5px; }
.b39-field { margin-bottom: 10px; }
.b39-field label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 4px; }
.b39-field select, .b39-field textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 6px;
  padding: 7px 9px; font-size: 12.5px; font-family: inherit;
}
.b39-field textarea { min-height: 74px; resize: vertical; }

/* 账号页：角色授予审批卡 */
.b39-grant .b39-empty { margin: 8px 0; }
.b39-grant table.tb td { font-size: 12.5px; }
.b39-grant .btn-p, .b39-grant .btn-o { padding: 3px 8px; font-size: 12px; margin-right: 4px; }

/* AI 证据治理页：核查入口卡 */
.b39-evlink {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 12px 14px; margin: 12px 0; flex-wrap: wrap;
}
.b39-evlink b { font-size: 13.5px; color: #1e3a8a; }
.b39-evlink span { display: block; font-size: 12px; color: #1e40af; margin-top: 3px; }
.b39-evlink .btn-p { padding: 6px 12px; font-size: 12.5px; }

@media (max-width: 760px) {
  .b39-stats { gap: 8px; }
  .b39-stat { flex: 1 1 45%; min-width: 0; }
  .b39-dlg { width: 100%; }
}
