/* FITP 2026 现代化工业级证据图与检测详情弹窗 (Evidence Modal) */
.evidence-modal {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  animation: modalFadeIn 0.2s ease-out;
}

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

.evidence-modal > section {
  width: min(1500px, 96vw);
  max-height: calc(100vh - 48px);
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.evidence-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.evidence-modal h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-modal-toolbar > div {
  display: flex;
  gap: 10px;
}

.evidence-modal .evidence-print {
  height: 36px;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evidence-modal .evidence-print:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.evidence-modal .close {
  height: 36px;
  padding: 0 18px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evidence-modal .close:hover {
  background: #e2e8f0;
  color: #000000;
}

.evidence-review {
  height: min(780px, calc(100vh - 160px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.evidence-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.evidence-panel h3 {
  margin: 0 0 12px;
  color: #0f172a !important;
  font-size: 15px;
  font-weight: 700;
}

.evidence-grid {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.evidence-figures {
  min-height: 0;
  overflow: auto;
}

.evidence-grid figure {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: zoom-in;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.evidence-grid figure:focus-visible {
  outline: 3px solid #0d9488;
  outline-offset: 2px;
}

.evidence-grid img {
  display: block;
  width: 100%;
  height: calc(100% - 36px);
  min-height: 0;
  max-height: none;
  object-fit: contain;
  background: #0f172a;
}

.evidence-grid figcaption {
  padding: 8px 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.recognition-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.recognition-fields {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border-top: 1px solid #e2e8f0;
}

.recognition-fields div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.recognition-fields dt {
  color: #64748b !important;
  font-weight: 600;
}

.recognition-fields dd {
  margin: 0;
  color: #0f172a !important;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.reading-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.ocr-order-note {
  margin: -3px 0 10px;
  color: #64748b !important;
  font-size: 12px;
  line-height: 1.45;
}

.ocr-lines {
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #0f172a !important;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ocr-lines li {
  position: relative;
  padding: 9px 12px 9px 42px;
  border-bottom: 1px solid #f1f5f9;
}

.ocr-lines li:last-child {
  border-bottom: 0;
}

.ocr-lines em {
  position: absolute;
  left: 12px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: #ccfbf1;
  color: #0f766e;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ocr-lines b,
.ocr-lines span {
  display: block;
}

.ocr-lines b {
  color: #0f172a !important;
  line-height: 1.45;
  font-weight: 700;
}

.ocr-lines span {
  margin-top: 3px;
  color: #64748b !important;
  font-size: 12px;
}

.raw-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.ocr-full-text {
  min-height: 0;
  height: auto;
  overflow: auto;
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  color: #0f172a !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.image-zoom {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  animation: modalFadeIn 0.2s ease-out;
}

.image-zoom img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.image-zoom button {
  position: fixed;
  top: 24px;
  right: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-zoom button:hover {
  background: #ffffff;
}

@media (max-width: 1000px) {
  .evidence-modal > section {
    max-height: calc(100vh - 24px);
    padding: 16px;
    overflow: auto;
  }
  .evidence-review {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 360px 420px 360px 360px;
  }
  .evidence-grid img {
    max-height: none;
  }
}

/* ==========================================================================
   证据对比弹窗 - 双图横排对比布局
   ========================================================================== */

/* 双图容器：左原图 右AI分析图（占满左侧整列） */
.evidence-dual-grid {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.evidence-dual-header {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  padding: 14px 20px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.evidence-two-cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.evidence-two-cols figure {
  margin: 0;
  padding: 16px;
  cursor: pointer;
  border-right: 1px solid rgba(226, 232, 240, 0.6);
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.evidence-two-cols figure:last-child {
  border-right: none;
}

.evidence-two-cols figure:hover {
  background: rgba(248, 250, 252, 0.9);
}

.evidence-two-cols figure img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
}

.evidence-two-cols figcaption {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

/* 加载与错误状态 */
.evidence-figure-loading .ev-img-loading,
.evidence-figure-loading .ev-img-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  width: 100%;
  color: #94a3b8;
  font-size: 14px;
}

.ev-event-id {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: #7c3aed;
  background: #faf5ff;
  padding: 2px 8px;
  border-radius: 6px;
}

