/* Visual Mapper — dual-pane CW ↔ form field binder */

.vm {
  /* Use nearly full viewport so the contract pane can grow */
  max-width: min(1920px, 100%);
  margin: 0 auto;
  padding: 0.65rem 0.75rem 2.5rem;
}

.vm-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.vm h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  color: #111827;
}

.vm-sub {
  margin: 0;
  max-width: 52rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.vm-sub code {
  font-size: 0.8rem;
  background: #f3f4f6;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.vm-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.9rem;
  font-size: 0.86rem;
}

.vm-links a {
  color: #1e3a5f;
  font-weight: 600;
}

.vm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.vm-save-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  max-width: min(36rem, 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}

.vm-save-badge.is-idle {
  background: #f3f4f6;
  color: #4b5563;
}

.vm-save-badge.is-dirty {
  background: #fef0c7;
  border-color: #fcd34d;
  color: #b54708;
}

.vm-save-badge.is-saving {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  animation: vm-pulse 1.1s ease-in-out infinite;
}

.vm-save-badge.is-saved {
  background: #dcfae6;
  border-color: #6ce9a6;
  color: #067647;
}

.vm-save-badge.is-error {
  background: #fee4e2;
  border-color: #fca5a5;
  color: #b42318;
  white-space: normal;
}

@keyframes vm-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.vm-autosave-hint {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}

.vm-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vm-toolbar input,
.vm-toolbar select {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  min-height: 2.3rem;
  min-width: 9rem;
  background: #fff;
  color: #111827;
}

.vm-toolbar #vm-form {
  min-width: 16rem;
}

.vm-btn {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #1e3a5f;
  cursor: pointer;
  min-height: 2.3rem;
}

.vm-btn:hover {
  background: #f9fafb;
}

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

.vm-btn--primary {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

.vm-btn--primary:hover:not(:disabled) {
  background: #16304f;
}

.vm-btn--ghost {
  background: #fff;
  color: #1e3a5f;
}

.vm-btn--danger {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}

.vm-status {
  font-size: 0.86rem;
  color: #6b7280;
  margin: 0.25rem 0 0.65rem;
  min-height: 1.25rem;
}

.vm-status.is-error {
  color: #b91c1c;
}

.vm-status.is-ok {
  color: #067647;
}

.vm-status.is-warn {
  color: #b54708;
}

.vm-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 1000px) {
  .vm-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .vm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vm-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.vm-stat span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vm-stat b {
  font-size: 1.15rem;
  color: #111827;
}

.vm-stat.is-ok b {
  color: #067647;
}

.vm-stat.is-warn b {
  color: #b54708;
}

.vm-stat.is-bad b {
  color: #b91c1c;
}

.vm-bind-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.vm-bind-bar__text {
  font-size: 0.9rem;
  color: #1e3a5f;
  line-height: 1.4;
  flex: 1;
  min-width: 14rem;
}

.vm-bind-bar__text code {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
}

.vm-bind-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Small pull-down above each field list */
.vm-panel__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.vm-panel__view-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.vm-panel__view-mini-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.vm-panel__view-mini select {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  cursor: pointer;
  min-width: 8.5rem;
  max-width: 11rem;
}

.vm-panel__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.vm-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.vm-pane[hidden] {
  display: none !important;
}

.vm-pane--pdf {
  background: #e5e7eb;
}

.vm-pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.55rem;
  background: #111827;
  color: #f9fafb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.vm-pdf-toolbar > span:first-child {
  margin-right: 0.35rem;
}

.vm-pdf-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-right: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.vm-pdf-legend__item.is-mapped {
  color: #4ade80;
}

.vm-pdf-legend__item.is-unmapped {
  color: #f87171;
}

.vm-pdf-legend__item.is-partial {
  color: #fbbf24;
}

.vm-pdf-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  text-transform: none;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0;
}

.vm-pdf-toolbar .vm-btn {
  min-height: 1.7rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  color: #e5e7eb;
  border-color: #4b5563;
  background: transparent;
}

.vm-pdf-scroll {
  flex: 1 1 auto;
  min-height: 18rem;
  max-height: 70vh;
  overflow: auto;
  padding: 0.5rem;
}

.vm-pdf-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.vm-pdf-page {
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  line-height: 0;
}

.vm-pdf-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.vm-pdf-page__overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.vm-pdf-page__label {
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  z-index: 4;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d1d5db;
  border-radius: 3px;
  padding: 0.05rem 0.28rem;
  line-height: 1.2;
}

/* Default / selected outline — selection is blue so red stays “no CW map” */
.vm-pdf-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #64748b;
  background: rgba(100, 116, 139, 0.12);
  pointer-events: auto;
  cursor: pointer;
  border-radius: 2px;
  z-index: 3;
}

/* GREEN = mapped to Contract Writer path */
.vm-pdf-box.is-mapped {
  border-color: #16a34a !important;
  background: rgba(34, 197, 94, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.45);
}

/* RED = no Contract Writer mapping on this form place */
.vm-pdf-box.is-unmapped {
  border-color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.4);
}

/* AMBER = partial (dataKey only / e-sign slot, not full CW path) */
.vm-pdf-box.is-partial {
  border-color: #d97706 !important;
  background: rgba(251, 191, 36, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.4);
}

/* Selected for connect — blue ring, keep fill color from status */
.vm-pdf-box.is-active {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  z-index: 5;
}

.vm-pdf-box.is-pair {
  outline: 2px solid #059669;
  outline-offset: 2px;
  z-index: 5;
}

/* Tiny label chip on each box */
.vm-pdf-box__chip {
  position: absolute;
  left: 0;
  top: -1.05rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 0.08rem 0.28rem;
  border-radius: 3px;
  pointer-events: none;
  z-index: 6;
  color: #fff;
  background: #334155;
}

.vm-pdf-box.is-mapped .vm-pdf-box__chip {
  background: #15803d;
}

.vm-pdf-box.is-unmapped .vm-pdf-box__chip {
  background: #b91c1c;
}

.vm-pdf-box.is-partial .vm-pdf-box__chip {
  background: #b45309;
}

/* Checkbox placements — selectable + toggle autofill on/off */
.vm-pdf-box--checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  min-height: 14px;
  border-radius: 3px;
  z-index: 6;
}

.vm-pdf-box--checkbox.is-cb-on {
  background: rgba(22, 163, 74, 0.45) !important;
  border-color: #15803d !important;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.35);
}

.vm-pdf-box__check {
  width: 12px;
  height: 12px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  accent-color: #15803d;
  pointer-events: auto;
  z-index: 7;
}

.vm-pdf-box--checkbox .vm-pdf-box__chip {
  top: -1.15rem;
}

.vm-item-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.vm-item-wrap .vm-item {
  flex: 1 1 auto;
  min-width: 0;
}

.vm-item-wrap--cb .vm-item__cb {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 0.45rem;
}

.vm-item__cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.vm-item__cb:hover {
  background: #e5e7eb;
}

.vm-item__cb input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #15803d;
}

.vm-item.is-cb-on .vm-item__title::before {
  content: "☑ ";
  color: #15803d;
}

#vm-cb-toggle[aria-pressed="true"] {
  background: #dcfae6;
  border-color: #abefc6;
  color: #067647;
}

.vm-pdf-empty {
  margin: 1.25rem 0.75rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: #6b7280;
  background: #fff;
  border-radius: 10px;
  border: 1px dashed #d1d5db;
  line-height: 1.45;
}

.vm-workspace {
  position: relative;
  display: grid;
  /* Compact data fields (left) · thin connector · large contract (right) */
  grid-template-columns: minmax(200px, 0.62fr) 32px minmax(0, 1.7fr);
  gap: 0;
  min-height: min(78vh, 56rem);
  margin-bottom: 1.25rem;
}

.vm-workspace.is-pdf-wide {
  /* Even more room for Actual PDF / contract view */
  grid-template-columns: minmax(180px, 0.48fr) 28px minmax(0, 2.1fr);
}

/* Connection lines between CW data fields and form/PDF boxes */
.vm-link-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
  overflow: visible;
}

.vm-link-layer path.vm-link {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.25;
  stroke-linecap: round;
  opacity: 0.9;
  filter: drop-shadow(0 0 1px rgba(37, 99, 235, 0.45));
}

.vm-link-layer path.vm-link--pair {
  stroke: #059669;
  stroke-width: 2.75;
  opacity: 1;
}

.vm-link-layer path.vm-link--mapped {
  stroke: #93c5fd;
  stroke-width: 1.5;
  opacity: 0.55;
}

.vm-link-layer circle.vm-link-dot {
  fill: #2563eb;
  stroke: #fff;
  stroke-width: 1.5;
}

.vm-link-layer circle.vm-link-dot--pair {
  fill: #059669;
}

.vm-link-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e3a5f;
  cursor: pointer;
  user-select: none;
  margin-left: 0.25rem;
}

.vm-item.is-pair,
.vm-pdf-box.is-pair {
  outline: 2px solid #059669;
  outline-offset: 1px;
}

.vm-pdf-box.is-pair {
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.35);
}

@media (max-width: 900px) {
  .vm-workspace {
    grid-template-columns: 1fr;
  }

  .vm-connector {
    display: none;
  }
}

.vm-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.vm-panel--cw {
  border-right: none;
  border-radius: 12px 0 0 12px;
  /* Keep left column tight so fields stay scannable */
  min-width: 0;
}

.vm-panel--form {
  border-left: none;
  border-radius: 0 12px 12px 0;
  min-width: 0;
}

/* —— Compact left (CW data fields) —— */
.vm-panel--cw .vm-panel__head {
  padding: 0.4rem 0.55rem;
}

.vm-panel--cw .vm-panel__head h2 {
  font-size: 0.82rem;
}

.vm-panel--cw .vm-panel__meta {
  font-size: 0.68rem;
}

.vm-panel--cw .vm-legend {
  gap: 0.35rem 0.55rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.65rem;
}

.vm-panel--cw .vm-panel__view-mini select {
  min-width: 6.5rem;
  max-width: 8.5rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.35rem;
}

.vm-panel--cw .vm-list {
  max-height: min(74vh, 780px);
  padding: 0.15rem 0;
}

.vm-panel--cw .vm-group {
  margin: 0.05rem 0 0.2rem;
}

.vm-panel--cw .vm-group__title {
  padding: 0.22rem 0.5rem;
  font-size: 0.64rem;
}

.vm-panel--cw .vm-item {
  grid-template-columns: 6px 1fr auto;
  gap: 0.3rem;
  padding: 0.28rem 0.45rem;
}

.vm-panel--cw .vm-item__rail {
  width: 6px;
  height: 6px;
  margin-top: 0.28rem;
}

.vm-panel--cw .vm-item__title {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
}

.vm-panel--cw .vm-item__meta {
  font-size: 0.64rem;
  margin-top: 0.04rem;
  line-height: 1.25;
  /* One-line meta keeps the list denser */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vm-panel--cw .vm-item__meta code {
  font-size: 0.62rem;
  padding: 0 0.15rem;
}

.vm-panel--cw .vm-item__badge {
  font-size: 0.58rem;
  padding: 0.08rem 0.3rem;
  margin-top: 0.05rem;
}

/* —— Larger contract / form pane —— */
.vm-panel--form .vm-list {
  max-height: min(74vh, 780px);
}

.vm-panel--form .vm-pdf-scroll {
  min-height: 24rem;
  max-height: min(78vh, 860px);
  padding: 0.4rem;
}

@media (max-width: 900px) {
  .vm-panel--cw,
  .vm-panel--form {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
  }
}

.vm-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #f3f4f6;
  background: #f9fafb;
}

.vm-panel__head h2 {
  margin: 0;
  font-size: 0.95rem;
  color: #111827;
}

.vm-panel__meta {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

.vm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.72rem;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
}

.vm-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  margin-right: 0.2rem;
  vertical-align: middle;
}

.vm-dot--mapped {
  background: #12b76a;
}

.vm-dot--partial {
  background: #f79009;
}

.vm-dot--unmapped,
.vm-dot--gap {
  background: #f04438;
}

.vm-dot--sel {
  background: #2e90fa;
  box-shadow: 0 0 0 2px rgba(46, 144, 250, 0.25);
}

.vm-list {
  overflow: auto;
  flex: 1;
  max-height: min(62vh, 640px);
  padding: 0.35rem 0;
}

.vm-group {
  margin: 0.15rem 0 0.4rem;
}

.vm-group__title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.vm-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.5rem;
  align-items: start;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.vm-item:hover {
  background: #f9fafb;
}

.vm-item.is-mapped {
  border-left-color: #12b76a;
}

.vm-item.is-partial {
  border-left-color: #f79009;
}

.vm-item.is-unmapped,
.vm-item.is-gap {
  border-left-color: #f04438;
}

.vm-item.is-selected {
  background: #eff6ff;
  border-left-color: #2e90fa;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.vm-item.is-pair {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.vm-item__rail {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 0.35rem;
  background: #d0d5dd;
}

.vm-item.is-mapped .vm-item__rail {
  background: #12b76a;
}

.vm-item.is-partial .vm-item__rail {
  background: #f79009;
}

.vm-item.is-unmapped .vm-item__rail,
.vm-item.is-gap .vm-item__rail {
  background: #f04438;
}

.vm-item.is-selected .vm-item__rail {
  background: #2e90fa;
  box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.25);
}

.vm-item__body {
  min-width: 0;
}

.vm-item__title {
  font-size: 0.86rem;
  font-weight: 650;
  color: #111827;
  line-height: 1.3;
  word-break: break-word;
}

.vm-item__meta {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.12rem;
  line-height: 1.35;
  word-break: break-word;
}

.vm-item__meta code {
  font-size: 0.7rem;
  background: #f3f4f6;
  padding: 0.02rem 0.25rem;
  border-radius: 3px;
  color: #374151;
}

.vm-item__badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 0.15rem;
}

.vm-item__badge--ok {
  background: #dcfae6;
  color: #067647;
}

.vm-item__badge--partial {
  background: #fef0c7;
  color: #b54708;
}

.vm-item__badge--gap {
  background: #fee4e2;
  color: #b42318;
}

.vm-item__badge--crit {
  background: #f4ebff;
  color: #6941c6;
}

.vm-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f9fafb, #fff);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vm-connector__line {
  width: 2px;
  flex: 1;
  max-height: 40%;
  background: repeating-linear-gradient(
    to bottom,
    #cbd5e1 0 6px,
    transparent 6px 12px
  );
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

.vm-connector.has-pair .vm-connector__line {
  background: linear-gradient(to bottom, #2e90fa, #12b76a);
  opacity: 1;
}

.vm-connector.has-pair .vm-connector__label {
  color: #067647;
}

.vm-gaps {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.9rem 1rem 1.1rem;
}

.vm-gaps h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.vm-gaps h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: #374151;
}

.vm-gaps__hint {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  color: #6b7280;
  line-height: 1.45;
}

.vm-gaps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .vm-gaps__grid {
    grid-template-columns: 1fr;
  }
}

.vm-gaps ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  background: #fafafa;
}

.vm-gaps li {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  line-height: 1.35;
}

.vm-gaps li:last-child {
  border-bottom: none;
}

.vm-gaps li code {
  font-size: 0.72rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.02rem 0.25rem;
  border-radius: 3px;
}

.vm-gaps li.empty {
  color: #067647;
  font-weight: 600;
}

.vm-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.88rem;
}
