/* Version History Panel */
.vh-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: flex-end;
}

.vh-panel {
  width: 320px;
  max-width: 90vw;
  height: 100%;
  background: var(--surface, #161d3d);
  border-left: 1px solid var(--border, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
  animation: vh-slide-in 0.2s ease-out;
}

@keyframes vh-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.vh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  flex-shrink: 0;
}

.vh-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #e7ecff);
}

.vh-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--muted, #9aa4c7);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vh-close:hover {
  background: var(--surface-2, #1d254a);
  color: var(--text, #e7ecff);
}

.vh-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vh-empty {
  color: var(--muted, #9aa4c7);
  font-size: 13px;
  text-align: center;
  padding: 32px 16px;
  margin: 0;
  line-height: 1.5;
}

.vh-item {
  background: var(--surface-2, #1d254a);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}

.vh-item:hover {
  border-color: var(--accent, #6ea8ff);
}

.vh-item.vh-current {
  border-color: rgba(110, 168, 255, 0.3);
  background: rgba(110, 168, 255, 0.06);
}

.vh-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vh-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e7ecff);
}

.vh-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent, #6ea8ff);
  background: rgba(110, 168, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.vh-label {
  font-size: 12px;
  color: var(--muted, #9aa4c7);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vh-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.vh-restore-btn {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent, #6ea8ff);
  background: transparent;
  color: var(--accent, #6ea8ff);
  cursor: pointer;
  transition: background 0.15s;
}

.vh-restore-btn:hover {
  background: rgba(110, 168, 255, 0.12);
}

.vh-delete-btn {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: transparent;
  color: var(--muted, #9aa4c7);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.vh-delete-btn:hover {
  color: var(--danger, #f87171);
  border-color: var(--danger, #f87171);
}
