/* ============================================================
   MERGE-SPECIFIC STYLES
   ============================================================ */
.top-bar h1 em { color: var(--blue); }

.fuzzy-section { display: none; }
.fuzzy-section.visible { display: block; }

/* ---- 3-panel grid ---- */
.tables-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
  min-height: 0;
}

.table-panel {
  display: flex; flex-direction: column;
  overflow: hidden; border-right: 1px solid var(--gray-200);
}
.table-panel:last-child { border-right: none; }

.table-panel-header {
  padding: 10px 16px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.3px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--gray-200); background: var(--white);
}
.table-panel-header .tag {
  font-size: 0.65rem; padding: 2px 7px; border-radius: 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.table-panel-header.tbl-a .tag { background: var(--blue-bg); color: var(--blue); }
.table-panel-header.tbl-b .tag { background: var(--gray-100); color: var(--gray-700); }
.table-panel-header.tbl-r .tag { background: var(--green-bg); color: var(--green); }

.table-panel-body { flex: 1; overflow-y: auto; background: var(--white); }

/* ---- Merge row states ---- */
.data-table tr.highlight-a { background: var(--blue-bg) !important; }
.data-table tr.highlight-b { background: #f3f0ff !important; }
.data-table tr.match { background: var(--green-light) !important; }
.data-table tr.nomatch { background: var(--red-light) !important; }

/* ---- Log colors ---- */
.log-line .key-check { color: var(--gray-700); }
.log-line .match-yes { color: var(--green); font-weight: 700; }
.log-line .match-no  { color: var(--red); }
.log-line .action    { color: var(--blue); font-weight: 600; }
.log-line .finalize  { color: var(--orange); font-weight: 700; }
.log-line .fuzzy-score { color: var(--orange); font-weight: 600; }

/* ---- Compare bubble ---- */
.compare-bubble {
  position: fixed; background: var(--white);
  border: 2px solid var(--gray-300); border-radius: 8px;
  padding: 6px 12px; font-size: 0.8rem;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  z-index: 100; pointer-events: none; opacity: 0;
  transition: opacity 0.15s; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.compare-bubble.visible { opacity: 1; }
.compare-bubble .eq  { color: var(--green); font-weight: 700; }
.compare-bubble .neq { color: var(--red); font-weight: 700; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .tables-area { grid-template-columns: 1fr 1fr; }
  .table-panel:nth-child(3) { grid-column: 1 / -1; max-height: 260px; }
}
@media (max-width: 700px) {
  .tables-area { grid-template-columns: 1fr; }
  .table-panel { max-height: 220px; }
}
